/* mitsubishi-pieces.com — feuille de style principale (sans dépendance externe) */
:root {
  --red: #E60012;
  --red-dark: #b8000e;
  --red-soft: #fdecee;
  --ink: #15171c;
  --ink-2: #3a3f4a;
  --muted: #6b7280;
  --line: #e3e6eb;
  --bg: #ffffff;
  --bg-alt: #f5f6f8;
  --ok: #0f7a45;
  --ok-bg: #e6f5ec;
  --ko: #9a3412;
  --ko-bg: #fff1e6;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 16px rgba(16, 24, 40, .06);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font: 16px/1.6 var(--font); color: var(--ink); background: var(--bg); }
img, svg { max-width: 100%; height: auto; }
a { color: var(--red-dark); text-underline-offset: 2px; }
a:hover { color: var(--red); }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.75rem); font-weight: 800; }
h2 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.85rem); font-weight: 750; }
h3, .h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; border-radius: 4px; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .wrap { padding: 0 24px; } }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; }
.skip:focus { top: 8px; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.lead { font-size: 1.1rem; color: var(--ink-2); max-width: 62ch; }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 .75rem; color: var(--red); font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }

.ico { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }
.ico--sm { width: .9em; height: .9em; }

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 10px;
  border: 1.5px solid transparent; font: 600 .95rem/1.2 var(--font); text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, color .15s, transform .1s; }
.btn:active { transform: translateY(1px); }
.btn--red { background: var(--red); color: #fff; }
.btn--red:hover { background: var(--red-dark); color: #fff; }
.btn--ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn--white { background: #fff; color: var(--red-dark); }
.btn--white:hover { background: var(--red-soft); color: var(--red-dark); }
.btn--sm { min-height: 38px; padding: 7px 14px; font-size: .88rem; }
.btn--block { width: 100%; }
.link { font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }

/* Bandeau supérieur */
.topbar { background: var(--ink); color: #d6d9de; font-size: .82rem; }
.topbar__in { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 36px; }
.topbar__in > span { display: flex; align-items: center; gap: 6px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.topbar__link { color: #fff; text-decoration: none; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.topbar__link:hover { color: #fff; text-decoration: underline; }
@media (max-width: 640px) { .topbar__in > span { display: none; } .topbar__in { justify-content: flex-end; } }

/* En-tête */
.header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.96); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); }
.header__in { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand__mark { width: 40px; height: 40px; flex: none; }
.brand__txt { display: flex; flex-wrap: wrap; align-items: baseline; line-height: 1.1; }
.brand__txt strong { font-weight: 850; letter-spacing: .06em; font-size: 1.1rem; }
.brand__txt > span { color: var(--red); font-weight: 600; }
.brand__txt small { flex-basis: 100%; color: var(--muted); font-size: .72rem; margin-top: 2px; }
.brand--light, .brand--light:hover { color: #fff; }
.brand--light .brand__txt > span { color: #ff6b75; }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: .95rem; }
.nav a:hover { color: var(--red); }
.header__actions { display: flex; align-items: center; gap: 10px; }
@media (max-width: 900px) { .nav { display: none; } .header__actions { margin-left: auto; } }
@media (max-width: 520px) { .header__actions .btn span { display: none; } .brand__txt small { display: none; } .header__in { gap: 12px; } }

/* Sélecteur de langue */
.lang { position: relative; }
.lang summary { list-style: none; display: flex; align-items: center; gap: 6px; min-height: 38px; padding: 6px 10px; border: 1.5px solid var(--line); border-radius: 10px; cursor: pointer; font-weight: 700; font-size: .85rem; }
.lang summary::-webkit-details-marker { display: none; }
.lang[open] summary { border-color: var(--ink); }
.lang ul { position: absolute; right: 0; top: calc(100% + 6px); min-width: 170px; margin: 0; padding: 6px; list-style: none; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); z-index: 60; }
.lang a { display: flex; gap: 10px; padding: 8px 10px; border-radius: 6px; color: var(--ink); text-decoration: none; font-size: .92rem; }
.lang a:hover, .lang a[aria-current] { background: var(--bg-alt); }
.lang a b { width: 22px; color: var(--red); }

/* Hero */
.hero { background: radial-gradient(1200px 400px at 85% -10%, var(--red-soft), transparent 70%), linear-gradient(180deg, #fff, var(--bg-alt)); border-bottom: 1px solid var(--line); }
.hero__in { display: grid; gap: 32px; padding-top: 48px; padding-bottom: 56px; align-items: center; }
@media (min-width: 960px) { .hero__in { grid-template-columns: 1.25fr 1fr; padding-top: 72px; padding-bottom: 80px; } }
.hero h1 span { color: var(--red); }
.hero__points { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 22px 0 0; padding: 0; list-style: none; color: var(--ink-2); font-weight: 600; font-size: .93rem; }
.hero__points li { display: flex; align-items: center; gap: 6px; }
.hero__points .ico { color: var(--ok); }
.hero__visual img { width: 100%; border-radius: 18px; box-shadow: 0 20px 50px rgba(16,24,40,.18); aspect-ratio: 3 / 2; object-fit: cover; }
@media (max-width: 959px) { .hero__visual { display: none; } }

/* Recherche */
.search { position: relative; max-width: 640px; margin-top: 18px; }
.search__field { display: flex; align-items: center; background: #fff; border: 2px solid var(--ink); border-radius: 14px; padding: 5px 5px 5px 14px; box-shadow: var(--shadow); }
.search__field:focus-within { border-color: var(--red); }
.search__ico { color: var(--muted); }
.search__input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; padding: 10px; font: 600 1.05rem var(--mono); letter-spacing: .02em; color: var(--ink); text-transform: uppercase; }
.search__input::placeholder { font-family: var(--font); font-weight: 400; text-transform: none; letter-spacing: 0; color: #9aa0a6; }
.search__input::-webkit-search-cancel-button { display: none; }
.search__btn { min-height: 46px; }
@media (max-width: 480px) { .search__btn span { display: none; } .search__btn { padding: 10px 14px; } }
.search--compact { margin-top: 12px; }
.search--compact .search__field { border-width: 1.5px; box-shadow: none; }
.search__hint { margin: 8px 2px 0; font-size: .85rem; color: var(--muted); }
.search__list { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 40; margin: 0; padding: 6px; list-style: none; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(16,24,40,.16); max-height: 420px; overflow: auto; }
.search__list a { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 12px; align-items: center; padding: 9px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.search__list [aria-selected="true"] a, .search__list a:hover { background: var(--bg-alt); }
.search__list b { font-family: var(--mono); }
.search__list span { color: var(--ink-2); font-size: .9rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.search__list small { color: var(--muted); font-weight: 600; }
.search__list .search__empty { padding: 10px; color: var(--muted); font-size: .9rem; }

/* Sections */
.section { padding: 56px 0; }
.section--alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section--tight { margin: 40px 0; }
.section__head { max-width: 720px; margin-bottom: 28px; }
.section__head p { color: var(--ink-2); }
.prose { max-width: 820px; }
.prose p { color: var(--ink-2); }

/* Familles */
.groups { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.group { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; border-top: 4px solid var(--red); }
.group__h { margin-bottom: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chip { display: inline-block; padding: 7px 12px; border-radius: 999px; background: var(--bg-alt); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: .9rem; font-weight: 500; }
.chip:hover { background: var(--red-soft); border-color: #f5b5bb; color: var(--red-dark); }

/* Modèles */
.models { display: grid; gap: 20px; }
@media (min-width: 820px) { .models { grid-template-columns: 1fr 1fr; } }
.models__col { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.models__col h3 { display: flex; align-items: center; gap: 8px; }
.models__col h3 .ico { color: var(--red); }
.mlist { margin: 0; padding: 0; list-style: none; columns: 1; }
@media (min-width: 480px) { .mlist { columns: 2; column-gap: 24px; } }
.mlist li { display: flex; justify-content: space-between; gap: 8px; padding: 7px 0; border-bottom: 1px dashed var(--line); break-inside: avoid; font-size: .93rem; }
.mlist em { font-style: normal; color: var(--muted); font-size: .85em; }
.mlist small { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.models__note { margin-top: 18px; color: var(--ink-2); }

/* Étapes */
.steps { display: grid; gap: 16px; margin: 0 0 32px; padding: 0; list-style: none; }
@media (min-width: 820px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { position: relative; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.steps p { color: var(--ink-2); margin: 0; }
.steps__n { display: inline-grid; place-items: center; width: 34px; height: 34px; margin-bottom: 10px; border-radius: 50%; background: var(--red); color: #fff; font-weight: 800; }

.cta-band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; padding: 26px 28px; border-radius: 16px; background: linear-gradient(120deg, var(--red), #9e000c); color: #fff; }
.cta-band h2, .cta-band h3 { margin-bottom: 4px; }
.cta-band p { margin: 0; opacity: .92; max-width: 60ch; }
.cta-band--soft { background: var(--red-soft); color: var(--ink); margin: 40px 0; }
.cta-band--soft p { color: var(--ink-2); }

/* FAQ */
.faq { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 16px 32px 16px 0; font-weight: 650; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font-size: 1.4rem; color: var(--red); }
.faq[open] summary::after { content: "–"; }
.faq p { padding-bottom: 12px; }

/* Fil d'Ariane */
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 18px 0 0; list-style: none; font-size: .85rem; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin-right: 4px; }
.crumbs a { color: var(--muted); }

/* Fiche produit */
.product { padding-bottom: 24px; }
.product__head { margin: 20px 0 28px; }
.product__head h1 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
.product__ref { font-family: var(--mono); letter-spacing: .02em; }
.product__des { font-weight: 600; color: var(--ink-2); font-size: .7em; }
.product__grid { display: grid; gap: 24px; align-items: start; }
@media (min-width: 900px) { .product__grid { grid-template-columns: 1.1fr 1fr; gap: 32px; } .product__media { position: sticky; top: 92px; } }
.label { margin: 0; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg-alt); }
.label img, .label svg { display: block; width: 100%; height: auto; border-radius: 10px; background: #fff; }
.label figcaption { margin-top: 10px; font-size: .8rem; color: var(--muted); text-align: center; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 20px; box-shadow: var(--shadow); }
.card__h { font-size: 1.1rem; }
.card--buy { border-top: 4px solid var(--red); }
.buy__status { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.buy__status small { color: var(--muted); }
.buy__price { display: grid; margin: 18px 0; }
.buy__price span { color: var(--muted); font-size: .85rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.buy__price strong { font-size: 2.1rem; line-height: 1.2; font-variant-numeric: tabular-nums; }
.buy__price small { color: var(--muted); }
.buy__actions { display: grid; gap: 10px; margin-top: 16px; }
.buy__trust { margin: 18px 0 0; padding: 16px 0 0; border-top: 1px solid var(--line); list-style: none; display: grid; gap: 8px; font-size: .9rem; color: var(--ink-2); }
.buy__trust li { display: flex; align-items: center; gap: 8px; }
.buy__trust .ico { color: var(--red); }
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.badge--lg { font-size: .88rem; padding: 5px 12px; }
.badge--ok { background: var(--ok-bg); color: var(--ok); }
.badge--ko { background: var(--ko-bg); color: var(--ko); }
.specs { margin: 0; }
.specs div { display: grid; grid-template-columns: 42% 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.specs div:last-child { border-bottom: 0; }
.specs dt { color: var(--muted); font-size: .92rem; }
.specs dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }

/* Listes de références */
.plist { margin: 0 0 16px; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.plist__item + .plist__item { border-top: 1px solid var(--line); }
.plist__link { display: grid; grid-template-columns: minmax(120px, 180px) 1fr auto auto; align-items: center; gap: 6px 16px; padding: 12px 16px; color: var(--ink); text-decoration: none; }
.plist__link:hover { background: var(--bg-alt); color: var(--ink); }
.plist__ref { font-family: var(--mono); font-weight: 700; }
.plist__des { color: var(--ink-2); font-size: .93rem; }
.plist__meta { display: flex; align-items: center; gap: 12px; }
.plist__price { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.plist__go { color: var(--muted); }
@media (max-width: 640px) {
  .plist__link { grid-template-columns: 1fr auto; }
  .plist__des { grid-column: 1 / -1; grid-row: 2; }
  .plist__meta { grid-column: 1 / -1; grid-row: 3; }
  .plist__go { grid-column: 2; grid-row: 1; }
}
.refgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.refgrid a { display: grid; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); text-decoration: none; }
.refgrid a:hover { border-color: var(--red); }
.refgrid b { font-family: var(--mono); }
.refgrid span { color: var(--muted); font-size: .84rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* Catégories / recherche */
.catpage { padding-bottom: 32px; }
.catpage__head { margin: 20px 0 28px; }
.catpage__head h1 small { font-size: .5em; color: var(--muted); font-weight: 600; }
.pager { display: flex; justify-content: space-between; gap: 12px; margin: 20px 0; }
.pager a[rel="next"] { margin-left: auto; }
.empty { padding: 32px; border: 1px dashed var(--line); border-radius: var(--radius); text-align: center; background: var(--bg-alt); }

/* Erreurs */
.errorpage { padding: 64px 16px 80px; text-align: center; }
.errorpage .search { margin: 24px auto 0; text-align: left; }
.errorpage .lead { margin: 0 auto; }
.errorpage__code { font: 800 5rem/1 var(--mono); color: var(--red); margin: 0 0 12px; }
.errorpage__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; }

/* Pied de page */
.footer { background: var(--ink); color: #b9bec7; margin-top: 24px; font-size: .92rem; }
.footer__grid { display: grid; gap: 32px; padding-top: 48px; padding-bottom: 32px; }
@media (min-width: 820px) { .footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; } }
.footer p { margin: 14px 0 0; }
.footer a { color: #fff; text-decoration: none; }
.footer a:hover { text-decoration: underline; color: #fff; }
.footer ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.footer__h { color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 14px; }
.footer__small { font-size: .84rem; }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding-top: 18px; padding-bottom: 24px; border-top: 1px solid #2c3039; font-size: .8rem; }

/* Barre d'action mobile (fiche produit) */
.sticky-cta { display: none; }
@media (max-width: 899px) {
  .sticky-cta { display: grid; grid-template-columns: 1.4fr 1fr; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.97); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(16,24,40,.08); }
  .has-sticky .footer { padding-bottom: 72px; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media print { .topbar, .header, .footer, .sticky-cta, .search, .buy__actions { display: none !important; } }
