/* Traquencheres — design system « Palette » (voir DESIGN_SYSTEM.md). Tokens en tête, thème sombre redéfini (pas inversé).
   Code couleur unique : jaune = bonne affaire · teal foncé = prix normal · hachuré = trop cher · gris = hors périmètre. */
:root {
  color-scheme: dark;
  --canvas: #0f0f0f;
  --surface: #161616;
  --surface-2: #1f1f1f;
  --ink: #f2f2f2;
  --ink-2: #a3a3a3;
  --ink-3: #858585;
  --line: rgb(255 255 255 / .07);
  --line-2: rgb(255 255 255 / .16);
  --cell: #2a2a2a;
  --accent: #ededed;
  --accent-ink: #111111;
  --brand: #ededed;
  --panel: #1f1f1f;
  --panel-ink: #f2f2f2;
  --panel-ink-2: #a3a3a3;
  --alert: #c4c4c4;
  --hatch: repeating-linear-gradient(135deg, var(--line-2) 0 1.5px, transparent 1.5px 6px);

  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Consolas, monospace;
  --t-display: clamp(2.5rem, 1.4rem + 4.6vw, 4.75rem);
  --t-figure: clamp(3rem, 2rem + 4vw, 5.5rem);
  --t-h2: 1.375rem;
  --t-small: 0.875rem;
  --t-eyebrow: 0.6875rem;
  --r-1: 6px;
  --r-2: 16px;
  --r-3: 14px;
  /* mouvement */
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-back: cubic-bezier(.34, 1.56, .64, 1);
  --t-fast: 160ms;
  --t-mid: 320ms;

  /* alias historiques (graphiques, gabarits existants) */
  --bg: var(--canvas);
  --accent-soft: var(--surface-2);
  --series-1: var(--ink);
  --series-2: var(--accent);
  --grid: var(--line);
  --row-hl: var(--surface-2);
}
:root[data-theme="dark"] { color-scheme: dark; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 15px/1.55 var(--font); font-feature-settings: "ss01"; }
a { color: var(--ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { line-height: 1.1; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2rem, 1.3rem + 2.6vw, 3.25rem); font-weight: 600; letter-spacing: -0.035em; margin: 0.35em 0 0.25em; }
h2 { font-size: var(--t-h2); font-weight: 600; letter-spacing: -0.02em; margin: 2.5rem 0 0.9rem; }
h3 { font-size: 1rem; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0 0 0.8em; }
section { margin-bottom: 1rem; }
.wrap { max-width: 1200px; margin: 0 auto; padding-inline: 16px; }
@media (min-width: 720px) { .wrap { padding-inline: 28px; } }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.muted { color: var(--ink-2); }
.small { font-size: var(--t-small); }
.nowrap { white-space: nowrap; }
.num, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.lede { font-size: 1.0625rem; color: var(--ink-2); max-width: 64ch; margin: 0 0 1.4rem; }
.note { font-size: var(--t-small); color: var(--ink-2); max-width: 78ch; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Étiquette mono — nomme, ne décore pas */
.eyebrow, .stat-label, .sales th, .field label, .crumbs, .legend, .k-label {
  font-family: var(--mono); font-size: var(--t-eyebrow); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); font-weight: 400;
}

/* Titre éditorial : sujet + complément gris */
.title { font-size: var(--t-display); font-weight: 600; letter-spacing: -0.045em; line-height: 0.98; margin: 0.3em 0 0.3em; }
.title-2 { color: var(--ink-3); font-weight: 500; }
.meta { font-size: 0.8125rem; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; }

/* ---------- En-tête ---------- */
.top { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; }
.top-in { display: flex; align-items: center; gap: 28px; min-height: 56px; flex-wrap: wrap; padding-block: 6px; }
.logo { font-weight: 600; font-size: 0.875rem; letter-spacing: 0.16em; color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 10px; }
.logo-mark { width: 26px; height: 26px; display: block; overflow: visible; }
.icon-sprite { display: none; }
.ui-icon { display: inline-block; width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.18em; }
.btn .ui-icon { width: 17px; height: 17px; vertical-align: -0.2em; }
.nav { display: flex; gap: 20px; flex-wrap: wrap; }
.nav a { color: var(--ink-2); text-decoration: none; font-size: 0.875rem; padding: 17px 0 15px; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current] { color: var(--ink); border-bottom-color: var(--ink); }
.nav .nav-cta { color: var(--ink); font-weight: 500; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.updated { font-size: 0.75rem; color: var(--ink-3); white-space: nowrap; }
.search-top { width: 250px; }

/* ---------- Recherche (champ « sélecteur » façon NOMA) ---------- */
.search { position: relative; }
.search input { width: 100%; font: inherit; font-size: 0.875rem; color: var(--ink); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-1); padding: 7px 10px; }
.search input::placeholder { color: var(--ink-3); }
.search input:focus { outline: none; border-color: var(--ink); }
.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px; list-style: none; background: var(--surface); border: 1px solid var(--ink); border-radius: var(--r-1); z-index: 40; max-height: 360px; overflow: auto; }
.suggest a { display: flex; justify-content: space-between; gap: 12px; padding: 8px 10px; border-radius: 2px; color: var(--ink); text-decoration: none; font-size: 0.875rem; }
.suggest a:hover, .suggest a[aria-selected="true"] { background: var(--surface-2); }
.suggest .k { font-family: var(--mono); font-size: 0.75rem; color: var(--ink-2); white-space: nowrap; }
.search-hero input { font-size: 1.05rem; padding: 12px 14px; }

/* ---------- Cartes, panneaux ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-2); padding: 20px; min-width: 0; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.card-head h2, .card-head h3 { margin: 0; font-size: 1rem; letter-spacing: -0.01em; }
.card-sub { font-size: 0.8125rem; color: var(--ink-2); margin: 2px 0 0; }
.panel { background: var(--panel); color: var(--panel-ink); border-radius: var(--r-2); padding: 22px; min-width: 0; }
.panel .eyebrow, .panel .stat-label { color: var(--panel-ink-2); }
.panel a { color: var(--panel-ink); }
.figure-xl { font-size: var(--t-figure); font-weight: 500; letter-spacing: -0.05em; line-height: 0.95; font-variant-numeric: tabular-nums; }
.figure-xl small { font-size: 0.45em; letter-spacing: -0.02em; margin-left: 0.08em; }
.badge { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 4px; background: var(--ink); color: var(--surface); font-family: var(--mono); font-size: 0.6875rem; border-radius: 2px; }
.badge-ghost { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.focus-box { border: 1px dashed var(--ink-3); border-radius: var(--r-1); }

/* Points et puces d'état */
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: var(--ink); flex: none; vertical-align: 0; }
.dot.is-good { background: var(--accent); box-shadow: inset 0 0 0 1.5px var(--ink); }
.dot.is-fair { background: var(--ink); }
.dot.is-high { background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--ink); background-image: linear-gradient(135deg, transparent 42%, var(--ink) 42% 58%, transparent 58%); }
.dot.is-out { background: var(--cell); }
.verdict-chip { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 0.9375rem; padding: 6px 12px 6px 10px; border-radius: var(--r-1); border: 1px solid var(--ink); }
.verdict-chip.is-good { background: var(--accent); color: var(--accent-ink); }
.verdict-chip.is-fair { background: var(--ink); color: var(--surface); }
.verdict-chip.is-high { background: var(--surface); background-image: var(--hatch); color: var(--ink); }
.verdict-chip.is-high b { color: var(--alert); }

/* Fiabilité : 3 barres */
.signal { display: inline-flex; gap: 3px; align-items: flex-end; vertical-align: -2px; }
.signal i { width: 14px; height: 6px; background: var(--line-2); display: block; }
.signal i.on { background: var(--ink); }
.panel .signal i { background: color-mix(in srgb, var(--panel-ink) 25%, transparent); }
.panel .signal i.on { background: var(--accent); }

/* ---------- Boutons, champs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-size: 0.875rem; font-weight: 500; min-height: 38px; background: var(--ink); color: var(--surface); border: 1px solid var(--ink); border-radius: var(--r-1); padding: 8px 16px; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { background: color-mix(in srgb, var(--ink) 86%, var(--surface)); }
.btn-ghost { background: var(--surface); color: var(--ink); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { background: color-mix(in srgb, var(--accent) 85%, #000); }
.btn-lg { min-height: 56px; font-size: 1rem; padding: 12px 22px; }
.panel .btn { background: var(--panel-ink); color: var(--panel); border-color: var(--panel-ink); }
.panel .btn-accent { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.cta { margin: 2rem 0; display: flex; gap: 10px; flex-wrap: wrap; }
.field label { display: block; margin-bottom: 6px; }
.filter { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.filter label { font-family: var(--mono); font-size: var(--t-eyebrow); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.filter input, .field input, .field select, .input { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-1); padding: 9px 12px; width: 100%; }
.filter input:focus, .field input:focus, .field select:focus, .input:focus { outline: none; border-color: var(--ink); }
.filter input { max-width: 320px; }
.field .err { color: var(--alert); font-size: 0.8rem; }

/* ---------- Chiffres clés ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-2); overflow: hidden; margin: 1.5rem 0; }
.kpis .stat { background: var(--surface); padding: 16px 18px; }
.stat-value { font-size: 1.75rem; font-weight: 500; letter-spacing: -0.03em; margin-top: 6px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat-sub { font-size: 0.8125rem; color: var(--ink-2); margin-top: 4px; }
.stat-hero .stat-value { font-size: clamp(2.6rem, 1.8rem + 2.6vw, 3.75rem); letter-spacing: -0.045em; line-height: 1; }

/* Encadré cote / verdict (pages expertes) */
.verdict { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-2); padding: 24px; margin: 1.5rem 0; }
.verdict-main { display: flex; flex-wrap: wrap; gap: 24px 56px; align-items: flex-end; }
.verdict-main .stat-hero { background: var(--panel); color: var(--panel-ink); padding: 18px 22px; border-radius: var(--r-2); margin: -4px 0; }
.verdict-main .stat-hero .stat-label, .verdict-main .stat-hero .stat-sub { color: var(--panel-ink-2); }
.basis { margin: 20px 0 4px; padding-top: 16px; border-top: 1px solid var(--line); max-width: 82ch; }
.verdict-empty { background: var(--surface); background-image: var(--hatch); }
.verdict-empty p { background: var(--surface); display: inline; box-decoration-break: clone; -webkit-box-decoration-break: clone; padding: 2px 4px; }

/* Cartes modèles */
.cards { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.cards .card { padding: 0; }
.cards .card a { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 16px 18px; color: var(--ink); text-decoration: none; border-radius: var(--r-2); }
.cards .card:hover { border-color: var(--ink); }
.card-title { font-weight: 600; font-size: 1rem; letter-spacing: -0.01em; }
.card-meta { font-size: 0.8125rem; color: var(--ink-2); }
.card-figure { margin-top: auto; padding-top: 12px; font-size: 1.375rem; font-weight: 500; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.card-figure .muted { font-family: var(--mono); font-size: var(--t-eyebrow); letter-spacing: .06em; text-transform: uppercase; font-weight: 400; display: block; margin-top: 2px; }

/* ---------- Tableaux ---------- */
.table-wrap { position: relative; overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-2); }
table.sales { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
table.sales caption { text-align: left; padding: 12px 14px 0; color: var(--ink-2); }
.sales th { text-align: left; padding: 12px 14px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.sales td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.sales tbody tr:last-child td { border-bottom: 0; }
.sales tbody tr:hover { background: var(--surface-2); }
.sales .num { text-align: right; white-space: nowrap; font-size: 0.8125rem; }
.sales .strong { font-weight: 500; color: var(--ink); font-size: 0.875rem; }
.sales .org { min-width: 180px; color: var(--ink-2); }
.sales tr.is-current { background: var(--surface-2); box-shadow: inset 2px 0 0 var(--ink); }
.sales.compact { width: auto; min-width: 320px; }
.row-link { white-space: nowrap; text-decoration: none; font-size: 0.8125rem; font-weight: 500; }
.row-link:hover { text-decoration: underline; }
.tag { display: inline-block; font-family: var(--mono); font-size: 0.6875rem; letter-spacing: .04em; text-transform: uppercase; padding: 1px 6px; border-radius: 2px; border: 1px solid var(--line-2); color: var(--ink-2); margin: 2px 0; background: var(--surface); }
.tag-warn { border-color: var(--ink); color: var(--ink); background-image: var(--hatch); }
.label { font-family: var(--mono); font-size: var(--t-eyebrow); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); margin-right: 8px; }

/* ---------- Graphiques ---------- */
.figure { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-2); padding: 14px 10px 6px; }
.figure figcaption { padding: 4px 12px 8px; font-size: 0.8125rem; }
.chart { width: 100%; height: auto; display: block; font-family: var(--mono); }
.chart .grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 3; }
.chart .axis { stroke: var(--ink); stroke-width: 1; }
.chart .tick { fill: var(--ink-3); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart .axis-label { fill: var(--ink-2); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.chart .hit { fill: transparent; }
.chart .mark { stroke: var(--surface); stroke-width: 2; }
.chart .s1 .mark { fill: var(--ink); }
.chart .s1 .range { stroke: var(--ink); stroke-width: 3; stroke-linecap: butt; opacity: .28; }
.chart .s2 .mark { fill: var(--accent); stroke: var(--ink); stroke-width: 1.5; r: 7; }
.chart .pt { cursor: default; outline: none; }
.chart a .pt { cursor: pointer; }
.chart .pt:hover .mark, .chart .pt:focus .mark { stroke: var(--ink); fill: var(--accent); stroke-width: 1.5; }
.chart .curve-under { fill: none; stroke: var(--ink); stroke-width: 4.5; stroke-linejoin: round; }
.chart .curve { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; }
.chart .rv .mark, .chart .rv .adj { fill: var(--accent); stroke: var(--ink); stroke-width: 1.2; }
.chart .rv .raw { fill: var(--ink); stroke: var(--surface); stroke-width: 1.5; }
.chart .rv .link { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 2 2; }
.chart .rv:hover .adj, .chart .rv:focus .adj { opacity: 1 !important; stroke-width: 2; }
.chart .ref-raw { stroke: var(--ink); stroke-width: 1.2; stroke-dasharray: 6 4; }
.chart .ref-rev { stroke: var(--ink); stroke-width: 1.2; }
.chart .ref-label { font-size: 11px; fill: var(--ink); paint-order: stroke; stroke: var(--surface); stroke-width: 4px; }
.legend .key-rv { background: var(--accent); box-shadow: inset 0 0 0 1.2px var(--ink); border-radius: 1px; }
.legend .key-curve { width: 18px; height: 4px; border-radius: 0; background: var(--accent); box-shadow: 0 0 0 1px var(--ink); }
.legend .key-line { width: 18px; height: 0; border-radius: 0; border-top: 1.5px dashed var(--ink); }
.legend .key-line.solid { border-top-style: solid; }
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 0; margin: 0 0 10px; }
.legend li { display: flex; align-items: center; gap: 6px; }
.key { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.key-s1 { background: var(--ink); }
.key-s2 { background: var(--accent); box-shadow: inset 0 0 0 1.5px var(--ink); width: 11px; height: 11px; }
.tip { position: fixed; z-index: 60; pointer-events: none; background: var(--panel); color: var(--panel-ink); font-family: var(--mono); font-size: 0.75rem; padding: 8px 10px; border-radius: var(--r-1); max-width: 280px; font-variant-numeric: tabular-nums; line-height: 1.45; }

/* ---------- Fiches ---------- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
.specs { display: grid; grid-template-columns: max-content 1fr; gap: 0; margin: 0 0 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-2); padding: 6px 18px; }
.specs dt, .specs dd { padding: 9px 0; border-bottom: 1px solid var(--line); }
.specs dt { font-family: var(--mono); font-size: var(--t-eyebrow); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); padding-right: 24px; padding-top: 11px; }
.specs dd { margin: 0; font-size: 0.875rem; }
.specs dt:last-of-type, .specs dd:last-of-type { border-bottom: 0; }
.raw { margin: 0; padding: 14px 16px; background: var(--surface); border: 1px dashed var(--ink-3); border-radius: var(--r-1); font-family: var(--mono); font-size: 0.8125rem; white-space: pre-wrap; word-break: break-word; color: var(--ink-2); }
.photo { max-width: 100%; border-radius: var(--r-2); margin-top: 12px; }
.orgs { list-style: none; padding: 0; margin: 0; columns: 2 260px; column-gap: 32px; }
.orgs li { padding: 8px 0; break-inside: avoid; border-bottom: 1px solid var(--line); display: flex; gap: 6px; font-size: 0.875rem; }
.orgs .count { margin-left: auto; font-family: var(--mono); font-size: 0.8125rem; color: var(--ink-2); }
.pills { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.pills a { display: inline-block; padding: 5px 10px; border: 1px solid var(--line-2); border-radius: var(--r-1); text-decoration: none; background: var(--surface); font-size: 0.8125rem; }
.pills a:hover { border-color: var(--ink); }
.crumbs { margin-top: 22px; }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.crumbs [aria-current] { color: var(--ink); }
.analyse { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr auto; gap: 12px; align-items: end; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-2); padding: 18px; margin-bottom: 1.5rem; }
.prose { max-width: 72ch; }
.prose li { margin-bottom: 0.4em; }

/* ---------- Pied ---------- */
.foot { margin-top: 72px; border-top: 1px solid var(--line); background: var(--surface); padding: 28px 0 36px; font-size: 0.8125rem; }
.foot p { margin: 0 0 6px; }

/* =====================================================================
   Parcours « Combien je mise ? »
   ===================================================================== */

/* Silhouettes */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(138px, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.tile { position: relative; display: flex; flex-direction: column; gap: 2px; text-align: left; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-2); padding: 12px 14px 14px; text-decoration: none; cursor: pointer; min-height: 100%; width: 100%; transition: border-color .12s, background-color .12s; }
.tile:hover { border-color: var(--ink); }
.tile[aria-pressed="true"], .tile.is-on { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.tile[aria-pressed="true"] .tile-ex, .tile[aria-pressed="true"] .tile-n, .tile.is-on .tile-ex, .tile.is-on .tile-n { color: var(--ink-3); }
/* pictos de véhicules : un gris clair cerné d'un trait (ils accompagnent les véhicules 3D, clairs), le choisi passe en accent.
   --pb : la caisse · --pl : le trait, les vitres et les roues */
.tile-pic { --pb: color-mix(in srgb, var(--ink-3) 30%, var(--surface)); --pl: var(--ink-3);
  display: block; width: 100%; height: auto; aspect-ratio: 2 / 1; margin: 2px 0 8px; color: var(--pb); }
.tile-pic > g > path:not(.win) { stroke: var(--pl); stroke-width: 1.6; stroke-linejoin: round; transition: fill var(--t-fast), stroke var(--t-fast); }
.tile-pic .win { fill: var(--surface); stroke: var(--pl); stroke-width: 1.2; stroke-linejoin: round; }
.tile-pic .wheel { fill: var(--surface); stroke: var(--pl); stroke-width: 3.5; }
.tile:hover .tile-pic, .rail-item:hover .tile-pic, .sil-chip:hover .tile-pic { --pl: var(--ink); }
/* choisi : le camion devient blanc (comme en 3D), c'est le fond de la carte qui marque le choix */
.tile[aria-pressed="true"] .tile-pic, .tile.is-on .tile-pic { --pb: #fff; --pl: #fff; }
.tile[aria-pressed="true"] .tile-pic .win, .tile.is-on .tile-pic .win, .tile[aria-pressed="true"] .tile-pic .wheel, .tile.is-on .tile-pic .wheel { fill: var(--ink); }
.tile-name { font-weight: 600; font-size: 0.9375rem; letter-spacing: -0.01em; line-height: 1.2; }
.tile-ex { font-size: 0.75rem; color: var(--ink-2); line-height: 1.35; }
.tile-n { font-family: var(--mono); font-size: 0.6875rem; color: var(--ink-3); margin-top: auto; padding-top: 8px; letter-spacing: .04em; }
.tile-tag { font-family: var(--mono); font-size: 0.625rem; letter-spacing: .08em; color: var(--ink-3); }
.tiles-text .tile { min-height: 76px; justify-content: space-between; }
.tile-unknown { border-style: dashed; border-color: var(--ink-3); background: transparent; }

/* Accueil */
.home-hero { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: end; padding: 28px 0 22px; }
.home-hero .lede { margin-bottom: 0; font-size: 1.125rem; }
.hero-panel { align-self: stretch; display: flex; flex-direction: column; gap: 14px; }
.hero-panel .figure-xl { font-size: clamp(2.6rem, 2rem + 2vw, 3.5rem); }
.bar-track { height: 14px; background: repeating-linear-gradient(90deg, var(--panel-ink-2) 0 1px, transparent 1px 4px); opacity: .55; position: relative; }
.split-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; border-top: 1px solid color-mix(in srgb, var(--panel-ink) 18%, transparent); padding-top: 12px; }
.split-stats b { display: block; font-size: 1.375rem; font-weight: 500; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.home-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; margin-top: 20px; }
.how { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.how li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.how li:last-child { border-bottom: 0; }
.how b { display: block; font-size: 0.9375rem; }
.how span { font-size: 0.8125rem; color: var(--ink-2); }

/* Jeu du marteau */
.game-lot { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.03em; line-height: 1.15; margin: 4px 0 4px; }
.game-meta { font-size: 0.8125rem; color: var(--ink-2); margin-bottom: 16px; }
.game-choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.game-choices button { font: inherit; font-family: var(--mono); font-size: 1.0625rem; min-height: 56px; border: 1px solid var(--ink); border-radius: var(--r-1); background: var(--surface); color: var(--ink); cursor: pointer; font-variant-numeric: tabular-nums; }
.game-choices button:hover:not(:disabled) { background: var(--surface-2); }
.game-choices button.is-right { background: var(--accent); color: var(--accent-ink); }
.game-choices button.is-wrong { background-image: var(--hatch); color: var(--ink-3); text-decoration: line-through; }
.game-choices button:disabled { cursor: default; }
.game-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 14px; min-height: 38px; flex-wrap: wrap; }
.game-score { font-family: var(--mono); font-size: 0.75rem; color: var(--ink-2); letter-spacing: .04em; }

/* Assistant */
.wizard { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; margin-top: 8px; }
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 0 0 22px; padding: 0; list-style: none; }
.steps button { all: unset; cursor: pointer; display: flex; flex-direction: column; gap: 6px; font-family: var(--mono); font-size: var(--t-eyebrow); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.steps button::before { content: ""; height: 6px; background: var(--line-2); display: block; }
.steps button.is-done { color: var(--ink-2); }
.steps button.is-done::before { background: var(--ink); }
.steps button[aria-current="step"] { color: var(--ink); }
.steps button[aria-current="step"]::before { background: var(--accent); box-shadow: inset 0 0 0 1px var(--ink); }
.steps button:disabled { cursor: default; }
.steps button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.q { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.5rem); font-weight: 600; letter-spacing: -0.035em; margin: 0 0 6px; }
.q-help { color: var(--ink-2); margin: 0 0 20px; }
.stage { min-height: 360px; }
.stage-nav { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }

/* Grand compteur (année / km) */
.dial { display: grid; grid-template-columns: 64px minmax(0, 1fr) 64px; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-2); padding: 18px; }
.dial-btn { font: inherit; font-size: 1.75rem; line-height: 1; height: 64px; border: 1px solid var(--ink); border-radius: var(--r-1); background: var(--surface); color: var(--ink); cursor: pointer; }
.dial-btn:hover { background: var(--surface-2); }
.dial-btn:active { background: var(--accent); }
.dial-value { text-align: center; min-width: 0; }
.dial-value output { display: block; font-size: clamp(3rem, 2rem + 5vw, 5.5rem); font-weight: 500; letter-spacing: -0.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.dial-value output small { font-size: 0.35em; letter-spacing: 0; color: var(--ink-2); font-weight: 400; }
.dial-sub { font-family: var(--mono); font-size: 0.75rem; color: var(--ink-2); margin-top: 6px; letter-spacing: .04em; }
.dial-range { grid-column: 1 / -1; width: 100%; accent-color: var(--ink); margin: 6px 0 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip { font: inherit; font-size: 0.875rem; padding: 8px 12px; border: 1px solid var(--line-2); border-radius: var(--r-1); background: var(--surface); color: var(--ink); cursor: pointer; }
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.chip b { font-family: var(--mono); font-weight: 400; font-size: 0.75rem; color: var(--ink-3); margin-left: 6px; }
.chip-dashed { border-style: dashed; border-color: var(--ink-3); background: transparent; }
.yesno { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.yesno .tile { min-height: 132px; justify-content: flex-end; }
.yesno .big { font-size: 2rem; font-weight: 600; letter-spacing: -0.04em; line-height: 1; margin-bottom: 6px; }

/* Fiche récapitulative (colonne droite) */
.recap { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 12px; }
.recap-list { list-style: none; margin: 0; padding: 0; }
.recap-list li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid color-mix(in srgb, var(--panel-ink) 16%, transparent); font-size: 0.875rem; }
.recap-list li:last-child { border-bottom: 0; }
.recap-list span { font-family: var(--mono); font-size: var(--t-eyebrow); letter-spacing: .08em; text-transform: uppercase; color: var(--panel-ink-2); padding-top: 3px; }
.recap-list b { font-weight: 500; text-align: right; }
.recap-list .empty { color: var(--panel-ink-2); font-weight: 400; }

/* Résultat */
#result { scroll-margin-top: 72px; }
.result { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.result-main { display: grid; gap: 20px; min-width: 0; }
.result-side { display: grid; gap: 20px; min-width: 0; }
.answer { display: grid; gap: 18px; }
.answer-say { font-size: clamp(1.25rem, 1rem + 1vw, 1.625rem); font-weight: 500; letter-spacing: -0.02em; line-height: 1.2; margin: 0; }
.answer-say .title-2 { color: var(--panel-ink-2); }
.answer-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; }
.ticket { font-family: var(--mono); font-size: 0.8125rem; border-top: 1px solid color-mix(in srgb, var(--panel-ink) 18%, transparent); padding-top: 12px; display: grid; gap: 6px; }
.ticket div { display: flex; justify-content: space-between; gap: 12px; font-variant-numeric: tabular-nums; }
.ticket .t-total { border-top: 1px dashed var(--panel-ink-2); padding-top: 8px; margin-top: 2px; font-size: 1rem; color: var(--panel-ink); }
.ticket span { color: var(--panel-ink-2); }
.ticket .t-total span { color: var(--panel-ink); }

/* Échelle palette */
.scale-wrap { position: relative; padding-top: 6px; }
.scale-dots { position: relative; height: 92px; }
.scale-dots .d { position: absolute; width: 9px; height: 9px; border-radius: 50%; transform: translate(-50%, 50%); background: var(--ink); border: 0; padding: 0; cursor: default; box-shadow: 0 0 0 2px var(--surface); }
.scale-dots .d.is-good { background: var(--accent); box-shadow: 0 0 0 2px var(--surface), inset 0 0 0 1.5px var(--ink); }
.scale-dots .d.is-high { background: var(--surface); box-shadow: 0 0 0 2px var(--surface), inset 0 0 0 1.5px var(--ink); }
.scale-dots .d:hover, .scale-dots .d:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; z-index: 2; }
.scale-dots .seen { position: absolute; bottom: 0; top: 0; width: 0; border-left: 1px dashed var(--ink); }
.scale-dots .seen span { position: absolute; top: -2px; left: 6px; font-family: var(--mono); font-size: 0.6875rem; white-space: nowrap; background: var(--ink); color: var(--surface); padding: 2px 5px; border-radius: 2px; }
.scale-dots .seen.flip span { left: auto; right: 6px; }
.scale { display: flex; height: 44px; border: 1px solid var(--ink); border-radius: var(--r-1); overflow: hidden; }
.scale > div { display: flex; align-items: center; padding: 0 10px; font-weight: 600; font-size: 0.8125rem; letter-spacing: .02em; white-space: nowrap; overflow: hidden; min-width: 0; }
.z-good { background: var(--accent); color: var(--accent-ink); }
.z-fair { background: var(--ink); color: var(--surface); justify-content: center; }
.z-high { background: var(--surface); background-image: var(--hatch); color: var(--ink); justify-content: flex-end; border-left: 1px solid var(--ink); }
.scale-ticks { position: relative; height: 34px; font-family: var(--mono); font-size: 0.75rem; font-variant-numeric: tabular-nums; }
.scale-ticks span { position: absolute; top: 6px; transform: translateX(-50%); white-space: nowrap; }
.scale-ticks span::before { content: ""; position: absolute; left: 50%; top: -6px; height: 5px; border-left: 1px solid var(--ink); }
.scale-ticks .t-med { font-weight: 500; }
.scale-ticks .t-edge { color: var(--ink-3); }
.scale-ticks .t-edge::before { display: none; }
.scale-legend { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 8px; }
.scale-legend div { font-size: 0.8125rem; color: var(--ink-2); display: grid; grid-template-columns: 12px 1fr; gap: 8px; align-items: start; }
.scale-legend b { display: block; color: var(--ink); font-size: 0.875rem; }
.scale-legend .dot { margin-top: 5px; }

.proof { display: flex; gap: 12px; align-items: flex-start; font-size: 0.875rem; }
.proof .signal { margin-top: 5px; }
.check-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.check-row .input { font-family: var(--mono); font-size: 1.125rem; padding: 12px 14px; }
.check-out { margin-top: 12px; min-height: 40px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 0.875rem; color: var(--ink-2); }
.actions { display: grid; gap: 8px; }
.actions .btn { width: 100%; }
.more { margin-top: 10px; }
.empty-state { padding: 22px; background: var(--surface); background-image: var(--hatch); border: 1px solid var(--ink); border-radius: var(--r-2); }
.empty-state > * { background: var(--surface); }
.empty-state .q { display: inline; box-decoration-break: clone; -webkit-box-decoration-break: clone; padding: 0 6px; }

/* Mode salle des ventes */

/* Styleguide */
.sg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.swatch { border: 1px solid var(--line); border-radius: var(--r-2); overflow: hidden; background: var(--surface); }
.swatch i { display: block; height: 64px; border-bottom: 1px solid var(--line); }
.swatch div { padding: 8px 10px; font-family: var(--mono); font-size: 0.6875rem; color: var(--ink-2); }
.swatch b { display: block; color: var(--ink); font-family: var(--font); font-size: 0.8125rem; font-weight: 500; }
.sg-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ---------- Adaptations ---------- */
@media (max-width: 980px) {
  .wizard, .result, .home-hero, .home-grid { grid-template-columns: 1fr; }
  .recap { position: static; }
  .wizard .recap { order: -1; }
  .wizard .recap .panel { padding: 14px 16px; }
  .wizard .recap .recap-list { display: flex; flex-wrap: wrap; gap: 4px 14px; }
  .wizard .recap .recap-list li { border: 0; padding: 0; }
  .wizard .recap .eyebrow, .wizard .recap .recap-list span { display: none; }
}
@media (max-width: 860px) {
  .two-col { grid-template-columns: 1fr; }
  .analyse { grid-template-columns: 1fr 1fr; }
  .analyse .field:first-child { grid-column: 1 / -1; }
  .top-right { width: 100%; order: 3; margin-left: 0; }
  .search-top { width: 100%; }
  .updated { display: none; }
}
@media (max-width: 560px) {
  body { font-size: 15px; }
  .analyse { grid-template-columns: 1fr; }
  .verdict { padding: 18px; }
  .sales th, .sales td { padding: 9px 10px; }
  .nav { gap: 14px; }
  .nav a { padding: 12px 0 10px; font-size: 0.8125rem; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps button { font-size: 0.5625rem; letter-spacing: .04em; }
  .dial { grid-template-columns: 52px minmax(0, 1fr) 52px; padding: 14px 10px; gap: 8px; }
  .dial-btn { height: 52px; }
  .yesno { grid-template-columns: 1fr; }
  .yesno .tile { min-height: 84px; }
  .game-choices { grid-template-columns: 1fr; }
  .scale > div { font-size: 0.6875rem; padding: 0 6px; }
  .scale-legend { grid-template-columns: 1fr; }
  .split-stats b { font-size: 1.125rem; }
}

/* =====================================================================
   Mouvement et jeu — couche dynamique du design system
   Règle : tout est lisible à l'arrêt ; l'animation part d'un état visible
   ou n'est ajoutée qu'en JS (classes is-pre / is-in), jamais en reduced-motion.
   ===================================================================== */

/* Bandeau « derniers coups de marteau » (site statique : dernières ventes intégrées, pas du direct) */
.ticker { display: flex; align-items: stretch; background: var(--ink); color: var(--surface); font-family: var(--mono); font-size: 0.75rem; height: 34px; overflow: hidden; border-bottom: 1px solid var(--ink); }
.ticker-tag { flex: none; display: flex; align-items: center; gap: 8px; padding: 0 14px; background: var(--accent); color: var(--accent-ink); text-transform: uppercase; letter-spacing: .08em; font-size: 0.6875rem; z-index: 1; }
.ticker-tag .gavel-svg { width: 15px; height: 15px; fill: currentColor; stroke: none; flex: none; }
.ticker-upd { opacity: .6; }
.ticker-viewport { flex: 1; overflow: hidden; min-width: 0; mask-image: linear-gradient(90deg, transparent, #000 40px); -webkit-mask-image: linear-gradient(90deg, transparent, #000 40px); }
.ticker-track { list-style: none; margin: 0; padding: 0; display: flex; width: max-content; height: 100%; align-items: center; animation: marquee 90s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-track li { white-space: nowrap; padding: 0 22px; border-right: 1px solid color-mix(in srgb, var(--surface) 22%, transparent); color: color-mix(in srgb, var(--surface) 72%, transparent); }
.ticker-track b { color: var(--accent); font-weight: 500; letter-spacing: .06em; }
.ticker-p { color: var(--surface); font-weight: 500; }
.ticker-d { color: color-mix(in srgb, var(--surface) 45%, transparent); margin-left: 6px; }

/* Mot tournant du titre */
.rotor { display: inline-block; color: var(--ink); background: linear-gradient(transparent 72%, var(--accent) 72% 92%, transparent 92%); padding: 0 .04em; }
.rotor-word { display: inline-block; transition: transform 260ms var(--ease-out), opacity 260ms; }
.rotor-word.is-out { transform: translateY(-45%); opacity: 0; }
.rotor-word.is-in { transform: translateY(45%); opacity: 0; transition: none; }
.bar-track i { position: absolute; inset: 0 auto 0 0; width: 100%; background: var(--accent); animation: fill 1.6s var(--ease-out) .2s backwards; mix-blend-mode: normal; opacity: .9; }

/* Compteur à rouleaux */
.odo { display: inline-flex; align-items: flex-start; line-height: 1; font-variant-numeric: tabular-nums; vertical-align: top; }
.odo-d { display: inline-block; height: 1em; overflow: hidden; }
.odo-col { display: flex; flex-direction: column; transition: transform 700ms var(--ease-out); }
.odo-col > span { height: 1em; line-height: 1; display: block; text-align: center; }
.odo-d:nth-child(2) .odo-col { transition-delay: 40ms; } .odo-d:nth-child(3) .odo-col { transition-delay: 80ms; }
.odo-d:nth-child(4) .odo-col { transition-delay: 120ms; } .odo-d:nth-child(5) .odo-col { transition-delay: 160ms; }
.odo-d:nth-child(6) .odo-col { transition-delay: 200ms; } .odo-d:nth-child(7) .odo-col { transition-delay: 240ms; }
.odo-s { display: inline-block; }
.odo-box { font-family: var(--mono); font-weight: 500; letter-spacing: 0; }
.odo-box .odo-d { background: linear-gradient(180deg, #000 0%, #2a2c2f 50%, #000 100%); color: #fff; padding: 0.08em 0.1em; height: 1.16em; margin-right: 3px; border-radius: 3px; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .08); }
.odo-box .odo-d:nth-last-child(-n+3) { background: linear-gradient(180deg, #1a1a1a 0%, #3a3d40 50%, #1a1a1a 100%); }
.odo-box .odo-d:last-child { background: var(--accent); color: var(--accent-ink); }
.odo-unit { font-size: 0.3em; color: var(--ink-2); margin-left: 8px; align-self: flex-end; letter-spacing: 0; }
.dial-num { display: flex; justify-content: center; align-items: flex-end; font-size: clamp(2.6rem, 1.4rem + 5vw, 5.25rem); font-weight: 500; letter-spacing: -0.05em; line-height: 1; min-height: 1.2em; }
.dial-num.odo { justify-content: center; }

/* Tuiles : le camion démarre au survol, part au clic */
.tile { overflow: hidden; transition: border-color var(--t-fast), background-color var(--t-fast), transform var(--t-fast) var(--ease-out), box-shadow var(--t-fast); }
.tile:hover { transform: translateY(-2px); box-shadow: 0 3px 0 var(--ink); }
.tile:active { transform: translateY(1px); box-shadow: none; }
.tile-pic { transition: transform 380ms cubic-bezier(.55, 0, .9, .4); }
.tile-pic .wheel { stroke-dasharray: 5 2.4; transform-box: fill-box; transform-origin: center; }
.tile:hover .tile-pic .wheel, .is-driving .wheel { animation: spin .5s linear infinite; }
.tile:hover .tile-pic { animation: idle .18s ease-in-out infinite alternate; }
.tile.is-leaving .tile-pic { transform: translateX(140%); animation: none; }
.tile.is-picked { background: var(--accent); color: var(--accent-ink); border-color: var(--ink); transform: scale(.97); box-shadow: none; }
.tile.is-picked .tile-ex, .tile.is-picked .tile-n { color: var(--accent-ink); }
.tile-bar { display: block; height: 4px; background: var(--line); margin-top: 8px; }
.tile-bar i { display: block; height: 100%; background: var(--ink); }
.tile[aria-pressed="true"] .tile-bar { background: color-mix(in srgb, var(--surface) 25%, transparent); }
.tile[aria-pressed="true"] .tile-bar i { background: var(--accent); }
.tiles li:nth-child(2) { --i: 1; } .tiles li:nth-child(3) { --i: 2; } .tiles li:nth-child(4) { --i: 3; } .tiles li:nth-child(5) { --i: 4; }
.tiles li:nth-child(6) { --i: 5; } .tiles li:nth-child(7) { --i: 6; } .tiles li:nth-child(8) { --i: 7; } .tiles li:nth-child(9) { --i: 8; }
.tiles li:nth-child(10) { --i: 9; } .tiles li:nth-child(11) { --i: 10; } .tiles li:nth-child(12) { --i: 11; } .tiles li:nth-child(n+13) { --i: 12; }
.pick .tiles li { animation: rise 420ms var(--ease-out) backwards; animation-delay: calc(var(--i, 0) * 45ms + 150ms); }

/* Assistant : la route */
.wizard-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 6px 24px; margin-top: 22px; }
.title-sm { font-size: clamp(2rem, 1.2rem + 3vw, 3.25rem); margin: 0; }
.road { --p: 0; position: relative; height: 70px; margin: 18px 0 8px; }
.road-line { position: absolute; left: 0; right: 0; bottom: 7px; height: 2px; background: repeating-linear-gradient(90deg, var(--ink-3) 0 12px, transparent 12px 22px); }
.road-line::before { content: ""; position: absolute; left: 0; top: 0; height: 2px; width: calc((100% - 72px) * var(--p) + 40px); background: var(--ink); transition: width 800ms var(--ease-out); }
.road-truck { position: absolute; bottom: 3px; left: calc((100% - 160px) * var(--p)); width: 86px; transition: left 800ms var(--ease-out); color: var(--ink); }
.road-truck svg { display: block; width: 100%; height: auto; margin: 0; }
.road-truck.is-driving svg { animation: bump .16s ease-in-out 5 alternate; }
.road-truck.is-driving .wheel { animation: spin .4s linear 2; }
.road-flag { position: absolute; right: 0; bottom: 12px; display: flex; flex-direction: column; align-items: center; gap: 2px; font-family: var(--mono); font-size: 0.625rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.road-flag .gavel-svg { width: 38px; overflow: visible; }
.road.is-done .road-flag { color: var(--ink); }
.road.is-done .road-flag .gavel-svg { color: var(--ink); }
.road.is-done .road-flag span { background: var(--accent); color: var(--accent-ink); padding: 1px 5px; border-radius: 2px; }
.steps { margin-bottom: 18px; }
.steps button::before { height: 4px; }

.stage.enter-fwd > .q, .stage.enter-fwd > .q-help { animation: enterF 380ms var(--ease-out) backwards; }
.stage.enter-back > .q, .stage.enter-back > .q-help { animation: enterB 380ms var(--ease-out) backwards; }
.stage.enter-fwd > .q-help, .stage.enter-back > .q-help { animation-delay: 50ms; }
.stage.enter-fwd .tiles li, .stage.enter-back .tiles li, .stage.enter-fwd .yesno .tile { animation: rise 380ms var(--ease-out) backwards; animation-delay: calc(var(--i, 0) * 35ms + 80ms); }
.stage.enter-fwd .dial, .stage.enter-back .dial { animation: rise 420ms var(--ease-out) 80ms backwards; }
.stage.enter-fwd .chips, .stage.enter-fwd .stage-nav { animation: rise 420ms var(--ease-out) 160ms backwards; }
.btn-go { min-width: 180px; }
.btn-go:hover { box-shadow: 0 3px 0 var(--accent); transform: translateY(-1px); }
.dial-btn { transition: transform var(--t-fast), background-color var(--t-fast); }
.dial-btn:active { transform: scale(.94); }
.recap-list li.is-new b { animation: print 600ms var(--ease-out); }

/* Résultat : l'affiche */
.poster { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 20px 36px; background: var(--panel); color: var(--panel-ink); border-radius: var(--r-2); padding: clamp(20px, 3vw, 34px); margin-top: 4px; }
.poster .eyebrow { color: var(--panel-ink-2); }
.poster .conf { display: flex; align-items: center; gap: 10px; }
.poster .signal i { background: color-mix(in srgb, var(--panel-ink) 25%, transparent); }
.poster .signal i.on { background: var(--accent); }
.poster-fig { display: flex; align-items: flex-start; font-size: clamp(4.5rem, 2.4rem + 9vw, 10.5rem); font-weight: 500; letter-spacing: -0.065em; line-height: .92; margin: 12px 0 16px; font-variant-numeric: tabular-nums; }
.poster-fig .odo-s { width: .18em; }
.poster-eur { font-size: .36em; letter-spacing: 0; margin: .12em 0 0 .12em; color: var(--accent); }
.poster .answer-say { font-size: clamp(1.2rem, 1rem + 1vw, 1.6rem); font-weight: 500; letter-spacing: -0.02em; line-height: 1.2; margin: 0; max-width: 34ch; }
.poster .answer-say .title-2 { color: var(--panel-ink-2); }
.poster-side { display: flex; flex-direction: column; justify-content: flex-end; gap: 18px; min-width: 0; }
.btn-inv { background: transparent; color: var(--panel-ink); border-color: color-mix(in srgb, var(--panel-ink) 45%, transparent); }
.btn-inv:hover { background: color-mix(in srgb, var(--panel-ink) 10%, transparent); border-color: var(--panel-ink); }
.poster .btn-accent { border-color: var(--accent); }
.poster .btn-accent:hover { box-shadow: 0 3px 0 color-mix(in srgb, var(--accent) 50%, transparent); transform: translateY(-1px); }
.gavel { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center; gap: clamp(14px, 3vw, 36px); background: var(--panel); color: var(--panel-ink); opacity: 0; pointer-events: none; transition: opacity 260ms; }
.poster.is-revealing .gavel { opacity: 1; }
.gavel-svg { width: clamp(70px, 10vw, 130px); height: auto; fill: currentColor; stroke: none; overflow: visible; }
.gavel .gavel-svg { width: clamp(150px, 21vw, 270px); }
.gavel-word { font-size: clamp(2.4rem, 1.2rem + 5.5vw, 6.5rem); font-weight: 700; letter-spacing: -0.055em; text-transform: uppercase; line-height: .9; }
.gavel-word.hit { animation: hit 420ms var(--ease-back); }
.shake { animation: shake 380ms; }

/* Résultat : l'arène (palette à glisser) */
.refine { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-2); padding: 14px clamp(16px, 2.4vw, 26px); margin-top: 20px; display: grid; gap: 10px; }
.refine-row { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 4px 16px; align-items: center; }
.refine-row .chips { margin-top: 0; }
.refine-k { font-size: 0.8125rem; color: var(--ink-2); }
.chip[aria-pressed="true"] b { color: inherit; opacity: .7; }
@media (max-width: 640px) { .refine-row { grid-template-columns: 1fr; } }
.arena { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-2); padding: clamp(16px, 2.4vw, 26px); margin-top: 20px; overflow: hidden; }
.arena-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 14px 24px; }
.arena-head h2 { margin: 0; }
.arena-say { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; padding: 12px 16px; border: 1px solid var(--ink); border-radius: var(--r-1); min-width: min(300px, 100%); transition: background-color var(--t-fast), color var(--t-fast); }
.arena-word { font-size: clamp(1.4rem, 1rem + 1.6vw, 2rem); font-weight: 700; letter-spacing: -0.035em; text-transform: uppercase; line-height: 1; }
.arena-detail { font-family: var(--mono); font-size: 0.75rem; }
.arena-say.is-good { background: var(--accent); color: var(--accent-ink); }
.arena-say.is-fair { background: var(--ink); color: var(--surface); }
.arena-say.is-high { background: var(--surface); background-image: var(--hatch); color: var(--ink); }
.arena-say.is-high .arena-word { color: var(--alert); }
.arena-say.pop { animation: pop 300ms var(--ease-back); }
.arena .scale-wrap { position: relative; padding-top: 58px; margin-top: 8px; cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.arena .scale-wrap.is-dragging { cursor: grabbing; }
.arena .scale { height: 52px; }
.arena .scale > div { font-size: 0.875rem; }
.paddle { position: absolute; top: 0; bottom: 34px; width: 0; left: 50%; z-index: 3; transition: left 140ms var(--ease-out); outline: none; }
.is-dragging .paddle { transition: none; }
.paddle-price { position: absolute; top: 0; left: 0; transform: translateX(-50%); font-family: var(--mono); font-size: 0.8125rem; font-weight: 500; background: var(--ink); color: var(--surface); padding: 3px 8px; border-radius: 2px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.paddle-head { position: absolute; top: 26px; left: 0; width: 32px; height: 32px; transform: translateX(-50%); border-radius: 50%; border: 2px solid var(--ink); background: var(--accent); box-shadow: 0 3px 0 var(--ink); transition: transform var(--t-fast) var(--ease-back), background-color var(--t-fast); }
.paddle-head::after { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: var(--ink); opacity: .9; }
.paddle.is-fair .paddle-head { background: var(--surface); }
.paddle.is-high .paddle-head { background: var(--surface); background-image: var(--hatch); border-color: var(--alert); box-shadow: 0 3px 0 var(--alert); }
.paddle.is-high .paddle-head::after { background: var(--alert); }
.paddle-stick { position: absolute; top: 58px; bottom: 0; left: -1px; width: 2px; background: var(--ink); }
.is-dragging .paddle-head, .paddle:focus-visible .paddle-head, .scale-wrap:hover .paddle-head { transform: translateX(-50%) scale(1.12); }
.paddle:focus-visible .paddle-price { outline: 2px solid var(--accent); }
.arena-foot { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 300px); gap: 16px 28px; align-items: end; margin-top: 4px; }
.arena .scale-legend { margin-top: 0; }
.arena .check-row .input { font-size: 1rem; padding: 9px 12px; }
.arena.is-pre .scale-dots .d, .arena.is-pre .paddle { opacity: 0; }
.arena.is-pre .scale > div { transform: scaleX(0); }
.arena.is-in .scale-dots .d { animation: drop 520ms var(--ease-back) backwards; animation-delay: calc(min(var(--i, 0), 40) * 22ms + 260ms); }
.arena.is-in .scale > div { transform-origin: left; animation: grow 520ms var(--ease-out) backwards; }
.arena.is-in .scale > div:nth-child(2) { animation-delay: 110ms; }
.arena.is-in .scale > div:nth-child(3) { animation-delay: 220ms; }
.arena.is-in .paddle { animation: rise 500ms var(--ease-back) 700ms backwards; }

/* Mode salle et répétition */

/* Démo du mode salle (accueil) */

/* Jeu du marteau */
.game { position: relative; }
.game-badges { display: flex; gap: 6px; align-items: center; }
.game-timer { height: 4px; background: var(--line); margin: -2px 0 14px; overflow: hidden; border-radius: 2px; }
.game-timer i { display: block; height: 100%; width: 100%; background: var(--ink); }
.game-choices button { transition: transform var(--t-fast) var(--ease-out), box-shadow var(--t-fast), background-color var(--t-fast); }
.game-choices button:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 3px 0 var(--ink); background: var(--surface); }
.game-choices button:active:not(:disabled) { transform: translateY(1px); box-shadow: none; }
.game-choices button.is-right { animation: pop 320ms var(--ease-back); }
.game.shake { animation: shake 400ms; }
.game.flip .game-lot, .game.flip .game-meta, .game.flip #game-when, .game.flip .game-choices { animation: rise 360ms var(--ease-out) backwards; }
.game.flip .game-meta { animation-delay: 40ms; } .game.flip .game-choices { animation-delay: 90ms; }
.spark { position: fixed; width: 9px; height: 9px; margin: -4px 0 0 -4px; background: var(--accent); border: 1px solid var(--ink); z-index: 300; pointer-events: none; animation: spark 720ms var(--ease-out) forwards; }
.spark.is-ink { background: var(--ink); }

/* Boutons : un peu de ressort */
.btn { transition: background-color var(--t-fast), transform var(--t-fast) var(--ease-out), box-shadow var(--t-fast); }
.btn:active { transform: translateY(1px); }

/* Images clés */
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes fill { from { width: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes idle { to { transform: translateY(-1.5px); } }
@keyframes bump { to { transform: translateY(-2px); } }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
@keyframes enterF { from { opacity: 0; transform: translateX(32px); } }
@keyframes enterB { from { opacity: 0; transform: translateX(-32px); } }
@keyframes pop { 40% { transform: scale(1.06); } }
@keyframes shake { 20% { transform: translateX(-7px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(2px); } }
@keyframes hit { from { opacity: 0; transform: scale(1.7); } }
@keyframes slam { 0% { transform: rotate(-38deg); } 70% { transform: rotate(6deg); } 100% { transform: rotate(0); } }
@keyframes drop { from { opacity: 0; transform: translate(-50%, -260%); } }
@keyframes grow { from { transform: scaleX(0); } }
@keyframes drain { from { width: 100%; } to { width: 0; } }
@keyframes spark { to { transform: translate(var(--dx), var(--dy)) rotate(220deg) scale(.4); opacity: 0; } }
@keyframes print { 0% { background: var(--accent); color: var(--accent-ink); transform: translateY(-5px); opacity: 0; } 40% { opacity: 1; transform: none; background: var(--accent); color: var(--accent-ink); } 100% { background: transparent; } }

@media (max-width: 980px) {
  .poster { grid-template-columns: 1fr; }
  .arena-foot { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .ticker-tag { padding: 0 10px; font-size: 0; gap: 0; }
  .ticker-tag .gavel-svg { width: 16px; height: 16px; }
  .road { height: 58px; }
  .road-truck { width: 66px; left: calc((100% - 120px) * var(--p)); }
  .arena-say { align-items: flex-start; width: 100%; }
  .arena .scale > div { font-size: 0.6875rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .ticker-viewport { overflow-x: auto; }
}

/* Deux lectures du prix (page cote) */
.two-reads { margin: 2rem 0; }
.reads { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-2); overflow: hidden; margin-bottom: 14px; }
.read { background: var(--surface); padding: 18px 20px; }
.read-rev { background: var(--surface-2); }
.read-fig { font-size: clamp(2rem, 1.4rem + 2vw, 2.75rem); font-weight: 500; letter-spacing: -0.04em; margin: 6px 0 4px; font-variant-numeric: tabular-nums; }
.read p { margin: 0; color: var(--ink-2); }
@media (max-width: 560px) { .reads { grid-template-columns: 1fr; } }

/* Bascule « prix payés récents / remis à niveau » (affiche du résultat) */
.mode-switch { display: inline-flex; gap: 2px; padding: 2px; margin-bottom: 16px; border: 1px solid color-mix(in srgb, var(--panel-ink) 35%, transparent); border-radius: var(--r-1); }
.mode-switch button { font: inherit; font-size: 0.8125rem; font-weight: 500; background: transparent; color: var(--panel-ink-2); border: 0; padding: 7px 12px; border-radius: 2px; cursor: pointer; transition: background-color var(--t-fast), color var(--t-fast); }
.mode-switch button:hover:not(:disabled) { color: var(--panel-ink); }
.mode-switch button[aria-pressed="true"] { background: var(--panel-ink); color: var(--panel); }
.mode-switch button[data-mode="rev"][aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.mode-switch button:disabled { opacity: .35; cursor: not-allowed; }
.mode-switch button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.alt-read { font-family: var(--mono); font-size: 0.8125rem; color: var(--panel-ink-2); margin: 14px 0 0; }
.alt-read b { color: var(--panel-ink); font-weight: 500; }

/* Groupes de tuiles (modèles / marques des poids lourds) */
.tiles-label { margin: 18px 0 8px; }
.tiles-label:first-of-type { margin-top: 0; }
.tiles-unknown { margin-top: 10px; }

/* « La cote en direct » (/cotes/) : recherche, puces, fiche, décote */
.finder { position: relative; margin-top: 22px; }
.finder-ico { position: absolute; left: 18px; top: 50%; width: 22px; height: 22px; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.finder-in { width: 100%; font: inherit; font-size: clamp(1.05rem, .95rem + .6vw, 1.35rem); font-weight: 500; letter-spacing: -0.01em; padding: 18px 18px 18px 52px; border: 1.5px solid var(--ink); border-radius: var(--r-2); background: var(--surface); color: var(--ink); }
.finder-in:focus { outline: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 70%, transparent); }
.finder-sug { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none; background: var(--surface); border: 1px solid var(--ink); border-radius: var(--r-2); box-shadow: 0 12px 30px rgb(0 0 0 / .14); }
.finder-sug li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 10px 12px; border-radius: var(--r-1); cursor: pointer; }
.finder-sug li[aria-selected="true"], .finder-sug li:hover { background: var(--surface-2); box-shadow: inset 3px 0 0 var(--accent); }
.sug-l { font-weight: 600; }
.sug-k { font-family: var(--mono); font-size: 0.75rem; color: var(--ink-2); text-align: right; }
.finder-none { color: var(--ink-2); cursor: default !important; }
.finder-or { display: flex; align-items: center; gap: 12px; margin: 18px 0 10px; font-family: var(--mono); font-size: var(--t-eyebrow); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.finder-or::before, .finder-or::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.sil-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.sil-chip { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; font: inherit; text-align: left; padding: 10px 12px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-2); cursor: pointer; transition: border-color var(--t-fast), transform var(--t-fast) var(--ease-out), background-color var(--t-fast); }
.sil-chip .tile-pic { width: 70%; margin: 0 0 6px; }
.sil-chip:hover { border-color: var(--ink); transform: translateY(-2px); }
.sil-chip[aria-pressed="true"] { background: var(--accent); border-color: var(--ink); color: var(--accent-ink); }
.sil-chip[aria-pressed="true"] .tile-pic { --pb: #fff; --pl: var(--accent-ink); }
.sil-chip[aria-pressed="true"] .tile-pic .win, .sil-chip[aria-pressed="true"] .tile-pic .wheel { fill: var(--accent-ink); }
.sil-chip-l { font-weight: 600; font-size: 0.8125rem; line-height: 1.2; }
.sil-chip-n { font-family: var(--mono); font-size: 0.6875rem; color: var(--ink-3); margin-top: auto; }
.sil-chip[aria-pressed="true"] .sil-chip-n { color: var(--accent-ink); opacity: .65; }
.pickers { display: grid; gap: 10px; margin-top: 14px; padding: 14px clamp(14px, 2vw, 22px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-2); }
.picker-row { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 4px 16px; align-items: start; }
.picker-row .chips { margin-top: 0; }
.picker-k { font-size: 0.8125rem; color: var(--ink-2); padding-top: 9px; }
.chip.is-zero { opacity: .5; }
.chip-more { background: transparent; border-style: dotted; }
#fiche { margin-top: 20px; transition: opacity var(--t-fast); }
#fiche.is-loading { opacity: .45; }
.fiche-empty { padding: 26px; border: 1px dashed var(--ink-3); border-radius: var(--r-2); color: var(--ink-2); }
.fiche-empty .q { color: var(--ink); margin-bottom: 4px; }
.fiche-empty p { margin: 0; }
.fiche-poster { margin-top: 0; }
.f-dial { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.f-dial .dial-btn { height: 44px; width: 44px; font-size: 1.4rem; background: transparent; color: var(--panel-ink); border-color: color-mix(in srgb, var(--panel-ink) 45%, transparent); }
.f-dial .dial-btn:hover { border-color: var(--accent); color: var(--accent); }
.f-year { font-family: var(--mono); font-size: 1.6rem; font-weight: 500; min-width: 3.2em; padding: 2px 10px; text-align: center; background: var(--accent); color: var(--accent-ink); border-radius: var(--r-1); }
.f-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; margin: 0; }
.f-facts div { border-top: 1px solid color-mix(in srgb, var(--panel-ink) 16%, transparent); padding-top: 8px; }
.f-facts dt { font-family: var(--mono); font-size: var(--t-eyebrow); letter-spacing: .08em; text-transform: uppercase; color: var(--panel-ink-2); }
.f-facts dd { margin: 3px 0 0; font-weight: 500; font-variant-numeric: tabular-nums; }
.f-cta { display: flex; flex-wrap: wrap; gap: 10px; }
.conf-row { display: flex; gap: 8px; align-items: center; }
.caveats { padding-left: 18px; margin: 0; }
.decote { margin-top: 20px; }
.dc { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 8px; }
.dc-axis { position: relative; height: 200px; font-family: var(--mono); font-size: 0.625rem; color: var(--ink-3); }
.dc-axis span { position: absolute; right: 0; transform: translateY(50%); white-space: nowrap; }
.dc-cols { display: flex; align-items: flex-start; gap: 3px; min-width: 0; }
.dc-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 6px; padding: 0; border: 0; background: transparent; cursor: pointer; font: inherit; color: var(--ink-3); }
.dc-plot { position: relative; display: block; height: 200px; border-radius: 2px; border-bottom: 1px solid var(--line-2); transition: background-color var(--t-fast); }
.dc-col:hover .dc-plot { background: var(--surface-2); }
.dc-range { position: absolute; left: 15%; right: 15%; background: var(--ink); border-radius: 2px; opacity: .8; transform-origin: bottom; }
.dc-med { position: absolute; left: 0; right: 0; height: 3px; margin-bottom: -1px; background: var(--accent); box-shadow: 0 0 0 1px var(--ink); }
.dc-none { position: absolute; left: 30%; right: 30%; bottom: 0; height: 3px; background: var(--line-2); }
.dc-col.is-on .dc-plot { background: color-mix(in srgb, var(--accent) 35%, transparent); }
.dc-col.is-on .dc-range { opacity: 1; left: 5%; right: 5%; }
.dc-col.is-on .dc-y { color: var(--ink); font-weight: 600; }
.dc-y { font-family: var(--mono); font-size: 0.625rem; text-align: center; white-space: nowrap; height: 1em; overflow: visible; }
.decote.is-in .dc-range { animation: grow-up 520ms var(--ease-out) backwards; }
@keyframes grow-up { from { transform: scaleY(0); } }
.sc { position: relative; height: 240px; margin: 6px 6px 0; border-left: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.sc-band { position: absolute; left: 0; right: 0; background: var(--hatch); opacity: .8; }
.sc-med { position: absolute; left: 0; right: 0; border-top: 2px dashed var(--ink-3); }
.sc-med span { position: absolute; right: 4px; top: -18px; font-family: var(--mono); font-size: 0.6875rem; color: var(--ink-2); background: var(--surface); padding: 0 4px; }
.sc-d { position: absolute; width: 12px; height: 12px; margin: 0 0 -6px -6px; border-radius: 50%; background: var(--ink); border: 1.5px solid var(--surface); transition: transform var(--t-fast); }
.sc-d:hover, .sc-d:focus { transform: scale(1.5); z-index: 2; }
.sc-d.is-good { background: var(--accent); border-color: var(--ink); }
.sc-d.is-high { background: var(--surface); border-color: var(--ink); }
.sc-x { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 0.6875rem; color: var(--ink-3); margin: 6px 6px 0; }
@media (max-width: 980px) { .sil-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .sil-strip { display: flex; overflow-x: auto; scroll-snap-type: x proximity; margin: 0 -16px; padding: 0 16px 4px; scrollbar-width: none; }
  .sil-strip li { flex: 0 0 128px; scroll-snap-align: start; }
  .sil-chip .tile-pic { width: 56%; }
  .picker-row { grid-template-columns: 1fr; }
  .picker-row .chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -14px; padding: 0 14px 2px; scrollbar-width: none; }
  .picker-row .chip { flex: none; }
  .picker-k { padding-top: 0; }
  .dc { grid-template-columns: 48px minmax(0, 1fr); }
  .dc-cols { gap: 1px; }
  .f-facts { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .decote.is-in .dc-range { animation: none; } .sil-chip:hover { transform: none; } }

/* Remorques : section hors parcours, et le clin d'œil depuis l'onglet tracteur */
.rem-why { max-width: 72ch; margin: 10px 0 0; color: var(--ink-2); }
.rem-why b { color: var(--ink); }
.sil-strip-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sil-strip-3 .sil-chip .tile-pic { width: 100%; max-width: 116px; }
.sil-chip-x { font-size: 0.75rem; line-height: 1.3; color: var(--ink-2); margin-bottom: 6px; }
.sil-chip[aria-pressed="true"] .sil-chip-x { color: var(--accent-ink); opacity: .75; }
.tow-link { display: flex; align-items: center; gap: 14px; padding: 10px 16px 10px 10px; border: 1px dashed var(--ink-3); border-radius: var(--r-2); color: var(--ink); text-decoration: none; overflow: hidden; transition: border-color var(--t-fast), background-color var(--t-fast); }
.tow-link .tile-pic { flex: none; width: 92px; margin: 0; animation: tow-hitch .7s var(--ease-out) both .15s; }
.tow-link span { flex: 1; font-size: 0.875rem; color: var(--ink-2); }
.tow-link b { color: var(--ink); font-weight: 600; margin-right: 4px; }
.tow-link > .ui-icon { width: 20px; height: 20px; transition: transform var(--t-fast) var(--ease-out); }
.tow-link:hover { border-color: var(--ink); border-style: solid; background: var(--accent); }
.tow-link:hover span, .tow-link:hover b { color: var(--accent-ink); }
.tow-link:hover .tile-pic { animation: tow-roll .5s var(--ease-out); }
.tow-link:hover > .ui-icon { transform: translateX(4px); }
.tow-link:hover .tile-pic .win, .tow-link:hover .tile-pic .wheel { fill: var(--accent); }
.tow-link-back { margin-top: 20px; }
/* la remorque arrive en marche arrière et s'attelle */
@keyframes tow-hitch { 0% { transform: translateX(-70%); opacity: 0; } 70% { transform: translateX(4%); opacity: 1; } 85% { transform: translateX(-2%); } 100% { transform: none; } }
@keyframes tow-roll { 0% { transform: none; } 40% { transform: translateX(8px); } 100% { transform: none; } }
@media (max-width: 640px) {
  .sil-strip-3 li { flex: 0 0 172px; }
  .tow-link .tile-pic { width: 64px; }
}
@media (prefers-reduced-motion: reduce) { .tow-link .tile-pic, .tow-link:hover .tile-pic { animation: none; } }

/* =====================================================================
   Accueil : tableau de bord (garage, jauge, cours, corbeille)
   ===================================================================== */
/* -- Garage -- */
.garage { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-2); padding: 18px clamp(14px, 2vw, 22px) 14px; margin-top: 6px; }
.garage .card-head { margin-bottom: 4px; }
.garage .card-head h2 { font-size: 1.125rem; }
.garage-hint { color: var(--ink-2); font-size: .6875rem; text-align: right; }
.garage.is-touched .garage-hint { opacity: .72; }
.garage-stage { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 8px 24px; align-items: center; }
.garage-show { display: block; color: var(--ink); touch-action: pan-y; cursor: grab; -webkit-tap-highlight-color: transparent; border-radius: var(--r-2); }
.garage.is-dragging .garage-show, .garage.is-dragging .garage-rail { cursor: grabbing; }
.garage-pic { display: block; width: 100%; height: auto; overflow: visible; user-select: none; }
.garage-pic .g-car { color: var(--ink); fill: currentColor; transition: transform 520ms cubic-bezier(.55, 0, .9, .4); }
.garage-pic .g-body, .garage-pic .g-x1, .garage-pic .g-x2 { fill: currentColor; }
.garage-pic .win { fill: var(--surface); }
.garage-pic .wheel { fill: var(--surface); stroke: currentColor; stroke-width: 3.5; stroke-dasharray: 5 2.4; }
.garage-pic .g-road { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 7 5; }
.garage-pic .g-speed { stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; fill: none; opacity: 0; }
.garage-show:hover .g-lean { animation: idle .18s ease-in-out infinite alternate; }
.garage-show.is-leaving .g-car { transform: translateX(160%); }
.garage-info { min-width: 0; padding-bottom: 6px; }
.garage-name { font-size: clamp(1.75rem, 1.2rem + 1.6vw, 2.5rem); font-weight: 600; letter-spacing: -0.04em; line-height: 1.05; margin: 6px 0 8px; overflow: hidden; }
.garage-name span { display: inline-block; }
.is-swap { animation: swapIn 360ms var(--ease-out); }
.garage-ex { color: var(--ink-2); font-size: 0.9375rem; margin-bottom: 10px; min-height: 1.5em; }
.garage-n { font-size: 0.8125rem; color: var(--ink-2); display: flex; align-items: baseline; gap: 8px; margin-bottom: 16px; }
.garage-n-fig { font-family: var(--mono); font-size: 1.375rem; color: var(--ink); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.garage-info .btn-go { width: auto; min-width: 0; white-space: nowrap; }   /* un bouton à sa taille : le véhicule reste la vedette */

/* rail des gabarits, du plus petit au plus gros — repris des frises isométriques de jast-sas.fr :
   des tuiles en ligne, celle qu'on met en avant se soulève et prend toute sa couleur, les autres pâlissent,
   un repère rouge (numéro + point) court de l'une à l'autre le long d'un chemin pointillé. */
.garage-rail { position: relative; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--line); touch-action: pan-y; user-select: none; }
.rail-item { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 0; padding: 0 0 6px; color: var(--ink-3); text-decoration: none; border-radius: var(--r-1); -webkit-tap-highlight-color: transparent; }
.rail-item .tile-pic { width: 78%; margin: 6px 0 4px; transition: transform var(--t-mid) var(--ease-back); }
.rail-iso { display: none; width: 100%; height: auto; aspect-ratio: 380 / 232; object-fit: contain; pointer-events: none; transform-origin: 50% 80%;
  opacity: .55; filter: saturate(.35); transition: opacity .5s ease, filter .5s ease, transform .5s var(--ease-back); }
.garage.is-3d .rail-iso { display: block; }
.garage.is-3d .rail-item .tile-pic { display: none; }
.rail-item:hover .rail-iso { opacity: .78; filter: saturate(.7); }
.rail-item.is-on .rail-iso, .garage:not(.is-live) .rail-item.is-on .rail-iso { opacity: 1; filter: none; transform: translateY(-7px) scale(1.04); }
.rail-item.is-on .tile-pic { --pb: #fff; --pl: var(--accent-ink); transform: translateY(-3px) scale(1.06); }
.rail-item.is-on .tile-pic .win, .rail-item.is-on .tile-pic .wheel { fill: var(--surface); }
.rail-item:hover, .rail-item.is-on { color: var(--ink); }
.rail-item:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
/* numéro d'étape façon jast : rond gris, rouge pour la tuile en avant */
.rail-num { display: none; width: 20px; height: 20px; border-radius: 50%; align-items: center; justify-content: center; margin-top: 2px;
  font: 600 .6875rem/1 var(--mono); color: var(--ink-3); background: var(--surface-2); border: 1px solid var(--line);
  transition: background .3s ease, color .3s ease, border-color .3s ease, transform .3s var(--ease-back); }
.garage.is-3d .rail-num { display: inline-flex; }
.rail-item.is-on .rail-num { background: var(--alert); border-color: var(--alert); color: #fff; transform: scale(1.12); }
.rail-name { font-size: 0.6875rem; line-height: 1.2; text-align: center; font-weight: 500; margin-top: 3px; }
/* le chemin pointillé qui relie les tuiles, et le point rouge qui le parcourt */
.rail-path { display: none; position: absolute; left: 0; right: 0; height: 0; border-top: 2px dashed var(--line-2); pointer-events: none; z-index: 0; }
.garage.is-3d.is-live .rail-path { display: block; }
.rail-thumb { position: absolute; left: 0; top: 0; width: 28px; height: 28px; margin: -14px 0 0 -14px; border-radius: 50%; border: 2px solid var(--alert); box-shadow: 0 0 0 0 color-mix(in srgb, var(--alert) 50%, transparent); pointer-events: none; z-index: 2; animation: railPing 1.6s ease-out infinite; }
@keyframes railPing { 70%, 100% { box-shadow: 0 0 0 9px transparent; } }
.garage:not(.is-live) .rail-thumb { display: none; }
.garage:not(.is-live) .rail-item.is-on { box-shadow: inset 0 -3px 0 var(--accent); }

/* -- étape « C'est quoi, ton camion ? » : tuiles isométriques, même langage que le rail de l'accueil (vignettes 3D sur dalle, numéro rouge, tuile choisie soulevée) -- */
.tile-iso { display: none; width: calc(100% + 12px); max-width: none; margin: -6px -6px 0; height: auto; aspect-ratio: 380 / 232; object-fit: contain; pointer-events: none;
  transform-origin: 50% 80%; transition: transform .45s var(--ease-back), filter .4s ease, opacity .4s ease; }
.tile-num { display: none; position: absolute; top: 10px; left: 10px; width: 22px; height: 22px; border-radius: 50%; align-items: center; justify-content: center;
  font: 600 .6875rem/1 var(--mono); color: var(--ink-3); background: var(--surface-2); border: 1px solid var(--line); transition: background .3s ease, color .3s ease, border-color .3s ease, transform .3s var(--ease-back); }
.has-iso #tiles-sil .tile-iso { display: block; }
.has-iso #tiles-sil .tile-num { display: inline-flex; }
.has-iso #tiles-sil .tile-pic { display: none; }
.has-iso #tiles-sil .tile:hover .tile-iso { transform: translateY(-5px) scale(1.04); }
.has-iso #tiles-sil .tile[aria-pressed="true"], .has-iso #tiles-sil .tile.is-on { background: var(--surface); color: var(--ink); border-color: var(--alert); box-shadow: 0 0 0 1px var(--alert); }
.has-iso #tiles-sil .tile[aria-pressed="true"] .tile-iso { transform: translateY(-7px) scale(1.05); }
.has-iso #tiles-sil .tile[aria-pressed="true"] .tile-ex, .has-iso #tiles-sil .tile[aria-pressed="true"] .tile-n { color: var(--ink-2); }
.has-iso #tiles-sil .tile[aria-pressed="true"] .tile-num, .has-iso #tiles-sil .tile:hover .tile-num { background: var(--alert); border-color: var(--alert); color: #fff; }
.has-iso #tiles-sil .tile.is-picked .tile-iso { transform: translateX(140%); }
.has-iso #tiles-sil .tile:hover { transform: none; box-shadow: 0 3px 0 var(--ink); }
.has-iso #tiles-sil .tile[aria-pressed="true"]:hover { box-shadow: 0 3px 0 var(--alert), 0 0 0 1px var(--alert); }

/* même langage pour les bandes de silhouettes des pages /cotes/ et /remorques/ */
.sil-chip { position: relative; overflow: hidden; }
.sil-chip .tile-iso { width: calc(100% + 8px); margin: -6px -4px 0; }
.sil-chip .tile-num { top: 8px; left: 8px; }
.has-iso .sil-strip .tile-iso { display: block; }
.has-iso .sil-strip .tile-num { display: inline-flex; }
.has-iso .sil-strip .tile-pic { display: none; }
.has-iso .sil-strip .sil-chip:hover .tile-iso { transform: translateY(-5px) scale(1.04); }
.has-iso .cotes .sil-strip .sil-chip[aria-pressed="true"], .has-iso .sil-strip .sil-chip[aria-pressed="true"] { background: var(--surface); color: var(--ink); border-color: var(--alert); box-shadow: 0 0 0 1px var(--alert); }
.has-iso .sil-strip .sil-chip[aria-pressed="true"] .tile-iso { transform: translateY(-7px) scale(1.05); }
.has-iso .sil-strip .sil-chip[aria-pressed="true"] .sil-chip-n, .has-iso .sil-strip .sil-chip[aria-pressed="true"] .sil-chip-x { color: var(--ink-2); opacity: 1; }
.has-iso .sil-strip .sil-chip[aria-pressed="true"] .tile-num, .has-iso .sil-strip .sil-chip:hover .tile-num { background: var(--alert); border-color: var(--alert); color: #fff; }

/* -- Corbeille : tableau de cotation, même fond que le reste de la page -- */
.is-wide .wrap { max-width: 1560px; }
.bourse { container-type: inline-size; display: flex; flex-direction: column; min-height: 560px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-2); overflow: hidden; }
.bourse-head { padding: 18px 16px 12px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 20px; align-items: end; }
.bourse-head .eyebrow { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; margin: 0; }
.bourse h2 { margin: 8px 0 4px; font-size: 1.375rem; }
.bourse-sub { font-size: 0.8125rem; color: var(--ink-2); margin: 0; }
.bourse-legend { grid-row: 2 / 4; grid-column: 2; display: flex; flex-direction: column; gap: 4px; font-size: 0.75rem; color: var(--ink-2); margin: 0; }
.bourse-legend i { font-style: normal; margin-right: 6px; }
.live-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.q-row { --q-cols: 40px minmax(0, 1fr) 64px minmax(0, 92px) 74px 80px 62px 60px; display: grid; grid-template-columns: var(--q-cols); gap: 0 10px; align-items: center; }
.q-headrow { padding: 8px 16px; border-block: 1px solid var(--line); background: var(--surface-2); font-family: var(--mono); font-size: 0.625rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.q-r { text-align: right; justify-self: end; }
.bourse-viewport { flex: 1 1 0; min-height: 0; overflow: hidden; position: relative; mask-image: linear-gradient(transparent, #000 20px, #000 calc(100% - 32px), transparent); -webkit-mask-image: linear-gradient(transparent, #000 20px, #000 calc(100% - 32px), transparent); }
.bourse-viewport:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.bourse-track { list-style: none; margin: 0; padding: 0; }
/* li.q : neutralise la règle .q des titres (grande taille, letter-spacing négatif hérité) */
li.q { border-bottom: 1px solid var(--line); font-size: 1rem; font-weight: 400; letter-spacing: normal; margin: 0; }
.q-in { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
.q:nth-child(even) .q-in { background: color-mix(in srgb, var(--ink) 2.5%, transparent); }
.q-in { padding: 9px 16px 9px 13px; border-left: 3px solid transparent; color: var(--ink); text-decoration: none; font-size: 0.8125rem; }
a.q-in:hover { background: var(--surface-2) !important; }
.q-under .q-in { border-left-color: var(--accent); }
.q-over .q-in { border-left-color: var(--alert); }
.q-d, .q-km, .q-cote { font-family: var(--mono); font-size: 0.75rem; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.q-name { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-y { color: var(--ink-2); font-family: var(--mono); font-size: 0.75rem; font-weight: 400; }
.q-p abbr { text-decoration: none; border: 1px solid currentColor; border-radius: 2px; padding: 0 3px; font-family: var(--mono); font-size: 0.5625rem; font-weight: 400; color: var(--ink-2); vertical-align: 1px; }
.q-lieu { font-size: 0.75rem; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-p { font-family: var(--mono); font-size: 0.875rem; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.q-pill { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; font-family: var(--mono); font-size: 0.6875rem; font-weight: 500; padding: 2px 5px; border-radius: 2px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.q-pill .q-icon { width: 12px; height: 12px; vertical-align: 0; }
.q-pill.q-under { background: var(--accent); color: var(--accent-ink); }
.q-pill.q-over { background: var(--alert); color: #fff; }
.q-pill.q-flat { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px currentColor; }
.q-gauge { position: relative; height: 12px; }
.q-gauge::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--line-2); }
.q-band { position: absolute; top: 3px; bottom: 3px; background: color-mix(in srgb, var(--ink) 18%, transparent); border-radius: 1px; }
.q-tick { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--ink); }
.q-dot { position: absolute; top: 50%; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 2px var(--surface); }
.q-under .q-dot { background: var(--accent); }
.q-over .q-dot { background: var(--alert); }
.bourse-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 20px; padding: 12px 16px 14px; border-top: 1px solid var(--line); font-size: 0.8125rem; color: var(--ink-2); }
.bourse-foot p { margin: 0; flex: 1 1 280px; }
.bourse-foot b { color: var(--ink); font-family: var(--mono); font-weight: 500; }
.bourse-foot a { color: var(--ink); font-weight: 500; white-space: nowrap; }

/* -- Page jeu -- */
.jeu-hero { padding: 26px 0 8px; max-width: 760px; }
.jeu-hero ~ .game, .jeu-hero ~ .cta { max-width: 760px; }

@keyframes board { to { transform: translateY(-50%); } }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@keyframes swapIn { from { opacity: 0; transform: translateY(40%); } }

@media (max-width: 720px) {
  .garage-stage { grid-template-columns: 1fr; }
  .garage-name { font-size: 1.75rem; }
  .garage-rail { grid-template-columns: repeat(7, 86px); overflow-x: auto; margin-inline: -14px; padding: 10px 14px 8px; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; touch-action: pan-x pan-y; }
  .garage-rail::-webkit-scrollbar { height: 5px; }
  .garage-rail::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 5px; }
  .rail-name { font-size: 0.625rem; }
}
@media (prefers-reduced-motion: reduce) {
  .bourse-viewport { overflow-y: auto; mask-image: none; -webkit-mask-image: none; }
  .bourse-track li[aria-hidden] { display: none; }
}

/* =====================================================================
   Coquille d'application : barre latérale (ordinateur) / barre d'onglets (mobile)
   ===================================================================== */
.shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.shell-main { min-width: 0; display: flex; flex-direction: column; }
.shell-main > main { flex: 1; width: 100%; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 24px; padding: 18px 14px 16px; background: var(--surface); border-right: 1px solid var(--line); overflow-y: auto; z-index: 31; }
.side .logo { padding: 6px 10px; font-size: 0.8125rem; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a { display: flex; align-items: center; gap: 0; padding: 10px 12px; border-radius: var(--r-3); color: var(--ink-2); text-decoration: none; font-size: 0.875rem; font-weight: 500; transition: background-color var(--t-fast), color var(--t-fast); }
.side-nav a:hover { background: var(--surface-2); color: var(--ink); }
.side-nav a[aria-current] { background: var(--accent); color: var(--accent-ink); }
.side-group { display: flex; flex-direction: column; gap: 2px; width: 100%; }
.side-group-label { padding: 8px 12px 2px; color: var(--ink-3); font-family: var(--mono); font-size: .6875rem; letter-spacing: .08em; text-transform: uppercase; }
.side-nav .side-subnav { padding-left: 24px; }
.sn-s { display: none; }
.side-promo { margin-top: auto; position: relative; display: flex; flex-direction: column; gap: 6px; padding: 44px 16px 16px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; color: var(--ink); text-decoration: none; font-size: 0.75rem; overflow: hidden; }
.side-promo::before { content: ""; position: absolute; inset: 0 0 auto; height: 30px; background: repeating-linear-gradient(115deg, var(--accent) 0 6px, transparent 6px 14px); opacity: .22; }
.side-promo-ico { position: absolute; top: 12px; left: 16px; width: 40px; height: 40px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); border-radius: 50%; border: 3px solid var(--surface-2); }
.side-promo-ico .gavel-svg { width: 20px; height: 20px; fill: currentColor; stroke: none; }
.side-promo b { font-size: 0.9375rem; letter-spacing: -0.01em; margin-top: 6px; }
.side-promo > span:not([class]) { color: var(--ink-2); line-height: 1.4; }
.side-promo-go { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; padding: 6px 6px 6px 12px; background: var(--ink); color: var(--surface); border-radius: 999px; font-weight: 500; }

.shell .top { position: sticky; top: 0; }
.shell .top-in { gap: 16px; min-height: 64px; }
.logo-m { display: none; }
.top-ctx { display: flex; align-items: center; gap: 12px; font-size: 0.875rem; min-width: 0; }
.top-crumb { font-weight: 600; }
.date-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 999px; font-family: var(--mono); font-size: 0.75rem; color: var(--ink-2); white-space: nowrap; }
.date-pill .ui-icon { width: 15px; height: 15px; vertical-align: -0.15em; }
.top-right { gap: 12px; }
.top-cta { min-height: 36px; border-radius: 999px; }
.is-wide .wrap { max-width: 1480px; }

/* ---------- Tableau de bord ---------- */
.dash { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; padding-top: 22px; }
.dash > * { min-width: 0; margin: 0; }
.dash .card, .dash .garage, .dash .bourse { border-radius: 14px; }
.dash-head { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 32px; }
.dash-head .title { font-size: clamp(2.1rem, 1.3rem + 2.2vw, 3.5rem); margin: .2em 0 0; }
.dash-head .lede { margin: 0 0 6px; max-width: 40ch; font-size: 1rem; }

.dash .kpis { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; list-style: none; margin: 0; padding: 0; background: none; border: 0; border-radius: 0; overflow: visible; }
.kpi { position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; min-height: 132px; height: 100%; padding: 18px 20px; border-radius: 14px; text-decoration: none; overflow: hidden; color: var(--ink); background: var(--surface); border: 1px solid var(--line); transition: transform var(--t-fast) var(--ease-out), box-shadow var(--t-fast); }
.kpi:hover { transform: translateY(-3px); box-shadow: 0 6px 0 -2px var(--line-2); }
.kpi-fig { font-size: clamp(2rem, 1.3rem + 1.6vw, 2.75rem); font-weight: 600; letter-spacing: -0.045em; line-height: 1; font-variant-numeric: tabular-nums; }
.kpi-l { font-size: 0.8125rem; line-height: 1.35; max-width: 30ch; color: var(--ink-2); }
.kpi-l b { color: var(--ink); font-weight: 600; font-family: var(--mono); font-size: 0.75rem; }
.kpi-l .q-pill { font-style: normal; margin-right: 4px; }
.kpi-ink { background-image: repeating-linear-gradient(115deg, var(--line) 0 2px, transparent 2px 9px); background-size: 46% 100%; background-repeat: no-repeat; background-position: right; }
.kpi-plain { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.kpi-plain .kpi-l { color: var(--accent-ink); }
.kpi-plain .kpi-l .q-pill { background: var(--accent-ink); color: var(--accent); }
.kpi-alert { background: var(--alert); border-color: var(--alert); color: #fff; }
.kpi-alert .kpi-l { color: #fff; }

.dash-garage { grid-column: span 8; padding: 18px 22px 14px; display: flex; flex-direction: column; }
.dash-garage .garage-stage { flex: 1; }
.dash-gauge { grid-column: span 4; display: flex; flex-direction: column; gap: 12px; }
.dash-chart { grid-column: span 8; }
.dash-bourse { grid-column: span 5; grid-row: span 2; }
.dash-top { grid-column: span 7; }

/* jauge */
.tabs { display: flex; gap: 2px; margin: -8px -20px 2px; padding: 0 14px; border-bottom: 1px solid var(--line); }
.tabs button { font: inherit; font-size: 0.8125rem; background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: 8px 10px 10px; color: var(--ink-2); cursor: pointer; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); font-weight: 600; }
.dash-gauge h2 { margin: 6px 0 0; font-size: 1rem; }
.gauge-row { display: grid; grid-template-columns: minmax(150px, 190px) minmax(0, 1fr); gap: 16px; align-items: end; }
.gauge { position: relative; }
.gauge svg { display: block; width: 100%; height: auto; overflow: visible; }
.gauge-track { fill: none; stroke: var(--line-2); stroke-width: 18; stroke-dasharray: 1.6 .9; }
.gauge-val { fill: none; stroke: var(--accent); stroke-width: 18; transition: stroke-dasharray 1.2s var(--ease-out); }
.gauge-fig { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; align-items: baseline; gap: 2px; }
.gauge-fig b { font-size: 2.75rem; font-weight: 600; letter-spacing: -0.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.gauge-fig small { font-size: 1rem; color: var(--ink-2); }
.gauge-say { font-size: 0.8125rem; color: var(--ink-2); margin: 0 0 4px; line-height: 1.45; }
.gauge-say b { color: var(--ink); }
.details { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; margin: 4px 0 0; padding-top: 14px; border-top: 1px solid var(--line); }
.details dt { font-size: 0.75rem; color: var(--ink-2); }
.details dd { margin: 2px 0 0; font-size: 1.0625rem; font-weight: 500; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; min-width: 0; }
.details dd small { display: block; font-size: 0.6875rem; color: var(--ink-2); font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-gauge.is-flip .details dd { animation: rise 320ms var(--ease-out) backwards; }
.gauge-foot { margin: auto 0 0; padding-top: 12px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 8px; font-size: 0.75rem; color: var(--ink-2); }
.gauge-foot a { color: var(--ink); margin-left: auto; white-space: nowrap; }

/* cours */
.chart-legend { list-style: none; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 14px; margin: 0; padding: 0; font-size: 0.75rem; color: var(--ink-2); }
.chart-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }
.lg-line { background: var(--ink); }
.lg-under { background: var(--accent); }
.lg-over { background: var(--alert); }
.chart-legend .lg-vol { background: var(--line-2); border-radius: 2px; }
.dash-chart .card-sub { max-width: 52ch; }
.cours { display: block; width: 100%; height: auto; overflow: visible; }
.c-grid { stroke: var(--line); stroke-dasharray: 2 4; }
.c-zero { stroke: var(--ink-3); stroke-dasharray: none; }
.c-tick, .c-month { font-family: var(--mono); font-size: 10px; fill: var(--ink-3); }
.c-vol rect { fill: var(--line-2); transform-box: fill-box; transform-origin: bottom; animation: grow-up 600ms var(--ease-out) backwards; animation-delay: calc(var(--i) * 22ms + 150ms); }
.c-line { fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 1; animation: draw 1.6s var(--ease-out) .2s backwards; }
.c-areas { animation: fadeIn 700ms ease 1s backwards; }
.c-dot { fill: var(--surface); stroke: var(--ink); stroke-width: 1.6; animation: fadeIn 300ms ease 1.5s backwards; }
.c-dot.is-under { fill: var(--accent); }
.c-dot.is-over { fill: var(--alert); }
.c-hit { fill: transparent; cursor: crosshair; outline: none; }
.c-hit:hover, .c-hit:focus-visible { fill: color-mix(in srgb, var(--ink) 6%, transparent); }
.chart-last { display: flex; align-items: baseline; gap: 10px; margin: 8px 0 0; font-size: 0.8125rem; color: var(--ink-2); }
.chart-last b { font-family: var(--mono); font-size: 1.125rem; color: var(--ink); font-weight: 500; }
.chart-last b.is-under { background: var(--accent); color: var(--accent-ink); padding: 0 6px; border-radius: 2px; }
.chart-last b.is-over { background: var(--alert); color: #fff; padding: 0 6px; border-radius: 2px; }
@keyframes draw { from { stroke-dashoffset: 1; } }
@keyframes fadeIn { from { opacity: 0; } }

/* classement */
.dash-top .card-head { align-items: center; }
.toplist { list-style: none; margin: 0; padding: 0; }
.toplist a { display: grid; grid-template-columns: 26px minmax(0, 1.4fr) minmax(0, 1fr) 104px 16px; gap: 14px; align-items: center; padding: 10px 8px; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; border-radius: var(--r-2); }
.toplist li:first-child a { border-top-color: transparent; }
.toplist a:hover { background: var(--surface-2); }
.tl-rank { font-size: 0.75rem; color: var(--ink-3); }
.tl-name { display: flex; flex-direction: column; font-weight: 500; min-width: 0; }
.tl-name small { font-weight: 400; font-size: 0.75rem; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-bar { height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.tl-bar i { display: block; height: 100%; background: var(--ink); border-radius: 3px; transform-origin: left; animation: grow 900ms var(--ease-out) .3s backwards; }
.toplist li:first-child .tl-bar i { background: var(--accent); }
.tl-fig { text-align: right; font-family: var(--mono); font-weight: 500; font-variant-numeric: tabular-nums; }
.tl-fig small { display: block; font-size: 0.5625rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); font-weight: 400; }
.tl-go { color: var(--ink-3); transition: transform var(--t-fast), color var(--t-fast); }
.toplist a:hover .tl-go { color: var(--ink); transform: translateX(3px); }

/* corbeille : colonnes selon la largeur de la carte */
@container (max-width: 680px) {
  .q-row { --q-cols: 40px minmax(0, 1fr) 64px 74px 80px 62px 56px; }
  .q-c-lieu { display: none; }
}
@container (max-width: 540px) {
  .q-row { --q-cols: 40px minmax(0, 1fr) 72px 80px 62px; }
  .q-c-km, .q-c-g { display: none; }
  .bourse-head { grid-template-columns: 1fr; }
  .bourse-legend { grid-column: 1; grid-row: auto; margin-top: 10px; }
}
@container (max-width: 400px) {
  .q-row { --q-cols: minmax(0, 1fr) 80px 60px; }
  .q-row > :first-child, .q-row > :nth-child(5) { display: none; }
}

/* ---------- Adaptations ---------- */
@media (max-width: 1440px) {
  .dash-garage { grid-column: span 7; }
  .dash-gauge { grid-column: span 5; }
  .dash-chart { grid-column: span 7; }
  .dash-bourse { grid-column: span 7; grid-row: auto; min-height: 640px; }
  .dash-top { grid-column: span 5; }
  .toplist a { grid-template-columns: 22px minmax(0, 1fr) 96px 12px; }
  .tl-bar { display: none; }
}
@media (max-width: 1100px) {
  .shell { grid-template-columns: 168px minmax(0, 1fr); }
  .side { padding-inline: 10px; align-items: stretch; }
  .side .logo span, .sn-l, .side-promo { display: none; }
  .sn-s { display: block; }
  .side-group-label { display: none; }
  .side-nav .side-subnav { padding-left: 12px; }
  .side-nav a { padding: 12px; }
  .dash-garage, .dash-gauge, .dash-chart, .dash-bourse, .dash-top { grid-column: 1 / -1; }
  .dash .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .shell { display: block; }
  .shell-main { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
  .side { position: fixed; top: auto; bottom: 0; left: 0; right: 0; height: auto; flex-direction: row; padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px)); border-right: 0; border-top: 1px solid var(--line); overflow: visible; }
  .side .logo { display: none; }
  .side-nav { flex-direction: row; flex: 1; justify-content: space-around; }
  .side-nav a { flex-direction: column; justify-content: center; gap: 3px; padding: 6px 4px; flex: 1; font-size: 0.6875rem; text-align: center; border-radius: var(--r-2); }
  .side-nav .side-subnav { padding: 6px 4px; }
  .sn-s { display: block; }
  .logo-m { display: flex; }
  .top-ctx, .top-cta { display: none; }
  .dash { gap: 12px; padding-top: 14px; }
  .dash-bourse { min-height: 520px; }
}
@media (max-width: 560px) {
  .kpi { min-height: 112px; padding: 14px 16px; }
  .gauge-row { grid-template-columns: 1fr; }
  .gauge { max-width: 220px; margin: 0 auto; }
  .chart-legend { justify-content: flex-start; }
  .dash-chart .card-head { flex-direction: column; }
}


/* =====================================================================
   « Combien je mise ? » aux couleurs du tableau de bord (accueil)
   ===================================================================== */
.is-wide .wizard-head { margin-top: 22px; }
.wizard-head .title-sm { font-size: clamp(2.1rem, 1.3rem + 2.2vw, 3.5rem); margin: .2em 0 0; }
.wizard-head .meta { margin-bottom: 6px; }
.wiz-top { margin-top: 0; padding: 8px 22px 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.wiz-top .steps { margin-bottom: 14px; display: flex; }
.wiz-top .steps li { flex: 1 1 0; min-width: 0; } /* 5 ou 6 étapes (gabarit des poids lourds) sur une seule ligne */
.wizard { margin-top: 22px; gap: 24px; grid-template-columns: minmax(0, 1fr); }
.wizard > * { min-width: 0; } /* la rangée de marques défile, elle n'élargit pas la page */
@media (min-width: 981px) { .wizard { grid-template-columns: minmax(0, 1fr) 320px; } }
.wizard .recap .panel { border-radius: 14px; }
.wizard .tile, .wizard .dial { border-radius: var(--r-3); }
.recap { top: 84px; }
#result { margin-top: 22px; }

/* -- la route en 3D (truck3d.js) : le canevas remplace la ligne et le camion 2D -- */
.road-3d { background: var(--scene-bg); position: absolute; inset: 0; pointer-events: none; border-radius: var(--r-2); overflow: hidden; }
.road-3d canvas { display: block; width: 100%; height: 100%; }
.road.is-3d { height: 340px; margin: 0; touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none; }
.road.is-3d.is-grab { cursor: grabbing; }
.road.is-3d .road-line, .road.is-3d .road-truck { display: none; }
/* « Adjugé » au bout de la route : une étiquette lisible posée sur la scène */
.road.is-3d .road-flag { right: 12px; bottom: 12px; flex-direction: row; gap: 6px; padding: 4px 10px 4px 7px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 999px; box-shadow: 0 2px 8px rgb(0 0 0 / .12); }
.road.is-3d .road-flag .gavel-svg { width: 16px; color: var(--ink); }
.road.is-3d.is-done .road-flag { background: var(--accent); border-color: var(--accent); }
.road.is-3d.is-done .road-flag span { padding: 0; background: none; }

/* -- filtre par marque de l'étape modèle -- */
.brand-filter { display: flex; align-items: center; gap: 8px 14px; margin: -6px 0 22px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.brand-filter-l { flex: none; margin: 0; }
.brand-chips { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.brand-chip { display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 999px; font-size: 0.8125rem; font-weight: 500; white-space: nowrap; transition: background-color var(--t-fast), border-color var(--t-fast), color var(--t-fast); }
.brand-chip b { margin-left: 8px; }
.brand-chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.brand-chip[aria-pressed="true"] b { color: var(--accent-ink); opacity: .6; }
.tiles-none { margin: 0 0 4px; font-size: 0.875rem; color: var(--ink-2); }
.item-lists.is-filtered .tiles li { animation: rise 320ms var(--ease-out) backwards; animation-delay: calc(var(--i, 0) * 25ms); }

@media (max-width: 720px) {
  .wiz-top { padding: 4px 12px 2px; margin-inline: -2px; }
  .road.is-3d { height: 150px; }
  .road.is-3d .road-flag { right: 8px; bottom: 8px; }
  .wizard { margin-top: 16px; gap: 16px; }
  .brand-filter { flex-direction: column; align-items: stretch; gap: 8px; padding: 10px; }
  .brand-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -10px; padding-inline: 10px; }
  .brand-chips::-webkit-scrollbar { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .rail-thumb { animation: none; }
  .item-lists.is-filtered .tiles li { animation: none; }
}

/* fond commun des scènes 3D : ciel pâle teinté de bleu en haut, halo clair derrière le véhicule, qui suit le thème */
:root { --scene-bg: linear-gradient(180deg, #1b1b1b 0%, #121212 100%); }

/* -- accueil : le garage en 3D (truck3d.js) par-dessus la silhouette 2D, gardée pour la taille du cadre -- */
.garage-show { position: relative; }
.garage-3d { background: var(--scene-bg); position: absolute; inset: 0; pointer-events: none; border-radius: var(--r-2); overflow: hidden; }
.garage-3d canvas { display: block; width: 100%; height: 100%; }
.garage.is-3d .garage-pic { visibility: hidden; }
.garage.is-3d .garage-show:hover .g-lean { animation: none; }


/* =====================================================================
   « La cote en direct » et « Les remorques » aux couleurs du tableau de bord
   (même cotes.js : tout est tenu sous .cotes pour ne pas toucher aux autres pages)
   ===================================================================== */
.cotes .dash-head .lede b { color: var(--ink); font-weight: 600; }
.cotes .card, .cotes .poster, .cotes .tow-link { border-radius: 14px; }

/* carte de recherche : champ, exemples, formes, filtres */
.cotes-find { grid-column: 1 / -1; position: relative; z-index: 3; padding: 18px clamp(14px, 2vw, 22px); }
.cotes .finder { margin-top: 0; }
.cotes .finder-in { border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface-2); padding: 16px 18px 16px 52px; transition: border-color var(--t-fast), box-shadow var(--t-fast); }
.cotes .finder-in:focus { border-color: var(--ink); }
.cotes .finder-sug { border-radius: 12px; }
.try { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.try .eyebrow { margin: 0 4px 0 2px; }
.try .brand-chip { cursor: pointer; }
.try .brand-chip:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.cotes .finder-or { margin: 16px 0 12px; }
.cotes .sil-strip { gap: 10px; }
.cotes .sil-chip { background: var(--surface-2); border: 1px solid transparent; border-radius: 12px; padding: 12px 12px 10px; }
.cotes .sil-chip:hover { border-color: var(--ink); }
.cotes .sil-chip .tile-pic .win, .cotes .sil-chip .tile-pic .wheel { fill: var(--surface-2); }
.cotes .sil-chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.cotes .sil-chip[aria-pressed="true"] .tile-pic .win, .cotes .sil-chip[aria-pressed="true"] .tile-pic .wheel { fill: var(--accent); }
/* au survol, il vibre et les roues tournent, comme les tuiles du parcours */
.cotes .sil-chip:hover .tile-pic { animation: idle .18s ease-in-out infinite alternate; }
.cotes .sil-chip:hover .tile-pic .wheel { animation: spin .5s linear infinite; }
.cotes .pickers { margin-top: 16px; padding: 14px 0 0; background: none; border: 0; border-top: 1px solid var(--line); border-radius: 0; }
.cotes .picker-row .chip { padding: 6px 12px; font-size: 0.8125rem; border-radius: 999px; background: var(--surface-2); border-color: transparent; }
.cotes .picker-row .chip:hover { border-color: var(--ink); }
.cotes .picker-row .chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.cotes .picker-row .chip-dashed { background: transparent; border: 1px dashed var(--ink-3); }
.cotes .picker-row .chip-dashed[aria-pressed="true"] { background: var(--accent); border: 1px solid var(--accent); }
.cotes .picker-row .chip-more { background: transparent; border: 1px dotted var(--ink-3); }

/* la fiche : grille de 12 comme l'accueil */
.fiche-grid { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; margin: 0 !important; }
.fiche-grid > * { min-width: 0; margin: 0; }
.fiche-grid > .fiche-empty { grid-column: 1 / -1; border-radius: 14px; }
.cotes .kpi:hover { transform: none; box-shadow: none; }
.kpis-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
.fp-top { grid-column: span 6; }
.fp-top-wide { grid-column: 1 / -1; }
.fp-top .card-head { align-items: center; margin-bottom: 8px; }
.fp-top .toplist { margin: 0 -8px; }
.fp-poster { grid-column: span 8; }
.fp-solo { grid-column: 1 / -1; }
.fp-conf { grid-column: span 4; display: flex; flex-direction: column; gap: 12px; }
.fp-decote { grid-column: span 7; }
.fp-decote .dc-plot, .fp-decote .dc-axis { height: 250px; }
.fp-scatter { grid-column: span 5; }
.fp-table { grid-column: 1 / -1; }
.dash-note, .cotes .tow-link-back { grid-column: 1 / -1; margin: 0; }

.cotes .poster { grid-template-columns: minmax(0, 1fr) minmax(0, 300px); gap: 20px 28px; padding: clamp(18px, 2.4vw, 28px); margin: 0; }
.cotes .fp-solo { grid-template-columns: 1fr; }
.cotes .poster-fig { font-size: clamp(3.5rem, 2rem + 4.2vw, 6.25rem); margin: 10px 0 12px; }
.cotes .poster-eur { color: var(--accent); }
.cotes .f-cta .btn-lg { min-height: 48px; white-space: normal; text-align: center; }

.fp-conf h2 { margin: 0; font-size: 1rem; }
.fp-conf .gauge-row { grid-template-columns: 150px minmax(0, 1fr); }
.fp-conf .gauge-say { font-size: 0.875rem; }
.conf-crit { margin: 0; color: var(--ink-2); }
.fp-conf .caveats { margin: 0; }
.fp-conf .details dd { font-size: 1rem; }

.lg-good { background: var(--accent); box-shadow: 0 0 0 1px var(--ink); }
.lg-fair { background: var(--ink); }
.lg-high { background: var(--surface); box-shadow: 0 0 0 1px var(--ink); }
.fp-scatter .card-head { flex-wrap: wrap; }
.fp-scatter .chart-legend { justify-content: flex-start; }
.fp-table .card-head { align-items: center; }
.fp-table .table-wrap { margin: 0 -8px; border: 0; border-radius: 0; background: none; }

@media (max-width: 1280px) {
  .fp-poster, .fp-conf, .fp-decote, .fp-scatter { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .fiche-grid { gap: 12px; }
  .fp-top { grid-column: 1 / -1; }
  .cotes .poster { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .cotes .sil-strip { margin: 0 -14px; padding: 0 14px 4px; }
  .cotes .pickers { padding-top: 12px; }
  .fp-conf .gauge-row { grid-template-columns: 1fr; }
  .fp-conf .gauge { max-width: 200px; }
}
@media (prefers-reduced-motion: reduce) {
  .cotes .sil-chip:hover .tile-pic, .cotes .sil-chip:hover .tile-pic .wheel { animation: none; }
}

/* la route et les étapes (comme « Combien je mise ? ») au-dessus de la recherche */
.cotes .wiz-top { grid-column: 1 / -1; margin: 0; }

/* tuile rouge de l'accueil : la perte, en clair */
.kpi-alert .kpi-l { max-width: 34ch; }
/* Étiquette « perte » : statique, police sans-serif, gros corps → nette partout */
.kpi-loss { display: inline-flex; align-items: baseline; gap: 8px; width: fit-content; margin-top: 10px; padding: 5px 10px 6px; border-radius: 6px; background: #fff; color: var(--alert) !important; font-family: var(--font) !important; font-size: 1rem !important; font-weight: 700; line-height: 1; letter-spacing: 0; box-shadow: 3px 3px 0 #000; }
.kpi-loss span { font-size: 0.6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: #1a1405; }
.kpi-loss strong { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.kpi-alert .kpi-l em { display: block; margin-top: 4px; font-style: normal; font-size: 0.75rem; opacity: .9; }

/* L'accueil mène d'abord au choix du véhicule ; les chiffres restent disponibles ensuite. */
.dash-garage { grid-column: 1 / -1; }
.dash .kpis { gap: 0; margin: 2px 0 12px; border-block: 1px solid var(--line); }
.dash .kpis .kpi { min-height: 96px; padding: 14px 20px; border: 0; border-right: 1px solid var(--line); border-radius: 0; background: var(--surface); color: var(--ink); box-shadow: none; }
.dash .kpis li:last-child .kpi { border-right: 0; }
.dash .kpis .kpi:hover { transform: none; box-shadow: none; background: var(--surface-2); }
.dash .kpis .kpi-fig { font-size: clamp(1.5rem, 1.2rem + .7vw, 2rem); }
.dash .kpis .kpi-l, .dash .kpis .kpi-alert .kpi-l, .dash .kpis .kpi-plain .kpi-l { color: var(--ink-2); }
.dash .kpis .kpi-plain .kpi-l .q-pill { color: var(--accent-ink); }
.dash .kpis .kpi-loss { display: inline-flex; gap: 5px; margin-top: 4px; padding: 0; background: none; color: var(--ink-2) !important; font-size: .75rem !important; font-weight: 400; box-shadow: none; }
.dash .kpis .kpi-loss span { color: var(--ink-2); font-size: .6875rem; font-weight: 400; text-transform: none; letter-spacing: 0; }
.dash .kpis .kpi-loss strong { color: var(--ink); font-size: .8125rem; font-weight: 600; }

/* Repères de marché : contexte explicite, puis quatre indicateurs compacts. */
.dash .market-kpis { grid-column: 1 / -1; margin: 0 0 12px; }
.market-kpis-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 0 0 10px; border-bottom: 1px solid var(--line); }
.market-kpis-head h2 { margin: 0; font-size: 1rem; font-weight: 600; letter-spacing: -.02em; }
.market-kpis-head p { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 7px; margin: 0; color: var(--ink-2); font-size: .75rem; font-variant-numeric: tabular-nums; }
.market-kpis-sample { margin-left: 5px; padding-left: 12px; border-left: 1px solid var(--line-2); }
.dash .market-kpis .kpis { grid-column: auto; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 0; border: 0; }
.dash .market-kpis .kpi { display: grid; grid-template-rows: auto auto 1fr; align-content: start; justify-content: stretch; gap: 5px; min-height: 118px; height: auto; padding: 14px 18px; border: 0; border-right: 1px solid var(--line); border-radius: 0; background: var(--surface); color: var(--ink); }
.dash .market-kpis li:last-child .kpi { border-right: 0; }
.dash .market-kpis .kpi:hover { background: var(--surface-2); }
.dash .market-kpis .kpi:focus-visible { position: relative; z-index: 1; outline: 2px solid var(--ink); outline-offset: -2px; }
.dash .market-kpis .kpi-l { display: flex; align-items: center; gap: 5px; max-width: 100%; color: var(--ink-2); font-size: .75rem; font-weight: 550; line-height: 1.3; }
.dash .market-kpis .kpi-fig { font-size: clamp(1.65rem, 1.25rem + .7vw, 2.1rem); letter-spacing: -.035em; }
.dash .market-kpis .kpi-note { align-self: start; color: var(--ink-2); font-size: .6875rem; line-height: 1.4; }
.dash .market-kpis .kpi-note b { color: var(--ink); font-variant-numeric: tabular-nums; font-weight: 600; }
.dash .market-kpis .kpi-loss { display: inline-flex; margin: 2px 0 0; color: var(--ink-2) !important; font-size: .6875rem !important; }
.dash .market-kpis .kpi-loss strong { color: var(--ink); font-size: .75rem; }
@media (max-width: 860px) {
  .dash .market-kpis .kpi { min-height: 112px; padding: 12px; }
}
@media (max-width: 560px) {
  .market-kpis-head { align-items: flex-start; flex-direction: column; gap: 5px; }
  .market-kpis-head p { flex-wrap: wrap; row-gap: 4px; }
  .market-kpis-sample { margin-left: 0; padding-left: 0; border: 0; }
  .dash .market-kpis .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash .market-kpis .kpi { min-height: 108px; padding: 12px; border-bottom: 1px solid var(--line); }
  .dash .market-kpis li:nth-child(2) .kpi { border-right: 0; }
  .dash .market-kpis li:nth-child(n+3) .kpi { border-bottom: 0; }
}

/* Destinations secondaires regroupées dans « Plus » sur la barre mobile. */
.mobile-more { display: none; }
.mobile-more summary { list-style: none; cursor: pointer; }
.mobile-more summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.mobile-more summary::-webkit-details-marker { display: none; }
.mobile-more-menu { display: none; }
@media (max-width: 860px) {
  .side-group { display: contents; }
  .side-group-label, .side-nav a[href="/remorques/"], .side-nav a[href="/analyse/"] { display: none; }
  .side { gap: 0; }
  .mobile-more { display: block; position: relative; flex: 0 0 58px; }
  .mobile-more summary { display: flex; height: 100%; min-height: 48px; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 6px 4px; border-radius: var(--r-2); color: var(--ink-2); font-size: .6875rem; text-align: center; }
  .mobile-more[open] summary, .mobile-more.is-current summary { background: var(--accent); color: var(--accent-ink); }
  .mobile-more[open] .mobile-more-menu { position: absolute; right: 0; bottom: calc(100% + 10px); display: grid; min-width: 190px; gap: 2px; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-3); box-shadow: 0 10px 28px color-mix(in srgb, var(--ink) 16%, transparent); }
  .mobile-more-menu a { padding: 10px 12px; border-radius: var(--r-2); color: var(--ink); text-decoration: none; font-size: .8125rem; }
  .mobile-more-menu a:hover, .mobile-more-menu a:focus-visible { background: var(--surface-2); outline: none; }
  .mobile-more-menu a[aria-current="page"] { background: var(--accent); color: var(--accent-ink); }
}
@media (max-width: 560px) {
  .dash .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash .kpis .kpi { min-height: 80px; padding: 12px; border-bottom: 1px solid var(--line); }
  .dash .kpis li:nth-child(2) .kpi { border-right: 0; }
  .dash .kpis li:nth-child(n+3) .kpi { border-bottom: 0; }
  .garage .card-head { align-items: flex-start; flex-direction: column; gap: 4px; }
  .garage-hint { text-align: left; }
}

/* Première passe responsive transversale : petits écrans et largeur minimale. */
@media (max-width: 860px) {
  html, body { max-width: 100%; overflow-x: clip; }
  .shell .top-in { column-gap: 12px; row-gap: 6px; padding-block: 8px; }
  .shell .top-right { width: 100%; }
  .shell .search-top { flex: 1 1 auto; min-width: 0; }
  .card, .panel, .verdict { min-width: 0; }
  .filter { align-items: stretch; flex-wrap: wrap; }
  .filter input { flex: 1 1 220px; max-width: none; min-width: 0; }
  .table-wrap { max-width: 100%; overscroll-behavior-inline: contain; scrollbar-width: thin; }
  .side-nav a, .mobile-more summary { min-height: 48px; }
  .foot { padding-bottom: 12px; }
}
@media (max-width: 560px) {
  .wrap { padding-inline: 14px; }
  .shell .top-in { min-height: 58px; }
  .shell .logo-m { font-size: .75rem; letter-spacing: .12em; }
  .shell .top-right { gap: 0; }
  .shell .search-top input { min-height: 44px; font-size: 16px; }
  .crumbs { margin-top: 14px; line-height: 1.7; }
  .title { overflow-wrap: anywhere; }
  .card { padding: 16px; }
  .card-head { align-items: flex-start; flex-wrap: wrap; }
  .filter { gap: 8px; }
  .filter label { flex: 0 0 100%; }
  .filter input, .field input, .field select, .input { min-height: 44px; font-size: 16px; }
  .cta > .btn { flex: 1 1 100%; justify-content: center; min-height: 48px; }
  .tiles { gap: 8px; }
  .sales { min-width: 620px; }
  .sales th, .sales td { padding: 9px 8px; }
  .dash { gap: 10px; }
  .dash-garage { padding: 14px; }
  .dash-bourse { min-height: 460px; }
  .foot-in { display: grid; gap: 8px; }
  .foot-in p { overflow-wrap: anywhere; }
}
@media (max-width: 380px) {
  .wrap { padding-inline: 12px; }
  .side { padding-inline: 3px; }
  .side-nav a { padding-inline: 2px; font-size: .6875rem; }
  .mobile-more { flex-basis: 48px; }
  .mobile-more summary { font-size: .6875rem; }
  .shell .logo-m { font-size: .6875rem; gap: 6px; }
  .dash .kpis .kpi, .dash .market-kpis .kpi { padding: 10px; }
  .dash .kpis .kpi-fig { font-size: 1.35rem; }
  .check-row { grid-template-columns: minmax(0, 1fr); }
  .check-row .btn { min-height: 44px; }
}



/* -- pictos choisis en thème sombre : pas de fond, juste le camion blanc -- */
@media not all { /* thème sombre désactivé : le site est clair par défaut */
  .rail-item.is-on { background: none; color: var(--ink); }
  .rail-item.is-on .tile-pic, .tile:has(.tile-pic)[aria-pressed="true"] .tile-pic, .sil-chip[aria-pressed="true"] .tile-pic { --pb: #fff; --pl: #fff; }
  .rail-item.is-on .tile-pic .win, .rail-item.is-on .tile-pic .wheel,
  .tile:has(.tile-pic)[aria-pressed="true"] .tile-pic .win, .tile:has(.tile-pic)[aria-pressed="true"] .tile-pic .wheel,
  .sil-chip[aria-pressed="true"] .tile-pic .win, .sil-chip[aria-pressed="true"] .tile-pic .wheel { fill: var(--surface); }
  .tile:has(.tile-pic)[aria-pressed="true"], .sil-chip[aria-pressed="true"] { background: var(--surface); color: var(--ink); border-color: var(--ink); }
  .tile:has(.tile-pic)[aria-pressed="true"] .tile-ex, .tile:has(.tile-pic)[aria-pressed="true"] .tile-n,
  .sil-chip[aria-pressed="true"] .sil-chip-n, .sil-chip[aria-pressed="true"] .sil-chip-x { color: var(--ink-3); opacity: 1; }
}

/* -- « Estimer ma mise » : la fiche dans la colonne de droite, alignée sur la scène -- */
.wiz-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px 24px; margin-top: 18px; align-items: start; }
.wiz-layout > * { min-width: 0; }
.wiz-layout > .wizard:not([hidden]) { display: contents; }
@media (min-width: 981px) {
  .wiz-layout { grid-template-columns: minmax(0, 1fr) 320px; }
  .wiz-layout .wiz-top { grid-column: 1; grid-row: 1; }
  .wiz-layout .stage { grid-column: 1; grid-row: 2; }
  .wiz-layout .recap { grid-column: 2; grid-row: 1 / span 2; }
  .wiz-layout:has(> .wizard[hidden]) .wiz-top { grid-column: 1 / -1; }
}
@media (max-width: 980px) {
  .wiz-layout .wiz-top { order: -2; }
  .wiz-layout { gap: 16px; }
}
.kpi-fig small { font-size: .5em; font-weight: 500; letter-spacing: 0; color: inherit; opacity: .75; }

/* jeu du marteau : photo du lot et modes */
.game-modes { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; }
.game-modes .btn { min-height: 36px; padding: 4px 12px; font-size: .875rem; }
.game-modes .btn[aria-pressed="true"] { background: var(--ink); color: var(--surface); }
.game-pic { margin: 0 0 12px; height: 280px; width: 100%; border: 1px solid var(--line); border-radius: var(--r-1); background: var(--surface-2); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.game-pic img { width: 100%; height: 100%; object-fit: contain; display: block; }
.game-pic.is-none { flex-direction: column; gap: 6px; color: var(--ink-3); font-size: .875rem; }
.game-pic.is-none svg { width: 45%; max-width: 180px; }
.game-hard { font-family: var(--mono); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; padding: 2px 8px; border: 1px solid var(--ink); border-radius: var(--r-1); color: var(--ink); }
.game-desc { margin: 0 0 14px; font-size: .9375rem; line-height: 1.5; color: var(--ink-2); overflow-wrap: anywhere; }
.game-desc:empty { display: none; }


/* =====================================================================
   Atelier sombre — brief : coque arrondie sur fond chaud, rail d'icônes, panneau à cartes,
   scène plein cadre avec étiquettes flottantes, aucune couleur : la sélection = bordure claire.
   Noir et gris très sombres : #0f0f0f · #161616 · #1f1f1f ; texte #f2f2f2 / #a3a3a3 ; aucune teinte.
   ===================================================================== */
body { background: #080808; }
::selection { background: var(--accent); color: var(--accent-ink); }

/* -- coque + rail -- */
.shell { grid-template-columns: 72px minmax(0, 1fr); gap: 12px; padding: 12px; }
.shell-main { background: var(--canvas); border: 1px solid var(--line); border-radius: 28px; overflow: clip; box-shadow: 0 24px 60px rgb(0 0 0 / .4); }
.side.dock { position: sticky; top: 12px; height: calc(100vh - 24px); width: 72px; padding: 14px 0; gap: 22px; align-items: center; overflow: visible; z-index: 60;
  background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 24px 60px rgb(0 0 0 / .4); }
.dock-logo { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink); }
.dock-logo .logo-mark { width: 32px; height: 32px; overflow: visible; }
.side.dock .side-nav { gap: 6px; align-items: center; }
.side.dock .side-nav a { position: relative; display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border-radius: 14px; color: var(--ink-2); box-shadow: none; }
.side.dock .side-nav a .ui-icon { width: 22px; height: 22px; }
.side.dock .side-nav a .gavel-svg { width: 20px; height: 20px; fill: currentColor; stroke: none; }
.side.dock .side-nav a:hover { background: var(--surface-2); color: var(--ink); }
.side.dock .side-nav a[aria-current] { background: var(--surface-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.side.dock .side-nav a[aria-current]::before { content: ""; position: absolute; left: -13px; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); margin: 0; height: auto; }
.side.dock .sn-s { display: none; }
.dock [data-tip] { position: relative; }
.dock [data-tip]::after, .btn-icon[data-tip]::after { content: attr(data-tip); position: absolute; left: calc(100% + 14px); top: 50%; translate: 0 -50%; padding: 6px 10px; border-radius: 10px; background: #0a0a0a; border: 1px solid var(--line-2); color: var(--ink); font-size: .75rem; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity var(--t-fast); z-index: 80; }
.btn-icon[data-tip]::after { left: auto; right: 0; top: auto; bottom: calc(100% + 8px); translate: 0 0; }
.dock [data-tip]:hover::after, .dock [data-tip]:focus-visible::after, .btn-icon[data-tip]:hover::after, .btn-icon[data-tip]:focus-visible::after { opacity: 1; }

/* -- barre du haut : pastilles flottantes -- */
.top { background: rgb(15 15 15 / .85); border: 0; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.shell .top-in { min-height: 68px; padding-block: 14px 0; }
.top-crumb { padding: 7px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: .8125rem; }
.date-pill { background: var(--surface); border-color: var(--line); }
.top .updated { display: none; }
.search input { background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 9px 16px; }
.search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgb(255 255 255 / .1); }
.suggest { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 16px; box-shadow: 0 16px 40px rgb(0 0 0 / .5); padding: 6px; }
.suggest a { border-radius: 10px; }
.top-cta { border-radius: 999px; }

/* -- boutons, champs, cartes : un seul langage -- */
.btn { border-radius: 14px; background: var(--surface-2); color: var(--ink); border: 1px solid var(--line-2); min-height: 40px; }
.btn:hover { background: #2a2a2a; }
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--surface-2); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn-accent:hover { background: #ffffff; }
.btn-icon { position: relative; display: grid; place-items: center; width: 46px; height: 46px; flex: none; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--ink); text-decoration: none; transition: background-color var(--t-fast); }
.btn-icon:hover { background: #2a2a2a; }
.btn-icon .ui-icon { width: 20px; height: 20px; }
.filter input, .field input, .field select, .input, select, textarea { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 14px; color: var(--ink); }
.filter input:focus, .field input:focus, .field select:focus, .input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgb(255 255 255 / .1); }
.card, .garage:not(.atelier), .bourse { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; }
.panel { background: var(--surface-2); border: 1px solid var(--line); border-radius: 24px; color: var(--ink); }
.foot { background: transparent; border-top: 1px solid var(--line); }
.tile { background: var(--surface); border-radius: 18px; }
.tile:hover { border-color: var(--line-2); box-shadow: none; transform: translateY(-2px); }
.tile[aria-pressed="true"], .tile.is-on { background: var(--surface-2); color: var(--ink); border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.tile[aria-pressed="true"] .tile-ex, .tile[aria-pressed="true"] .tile-n, .tile.is-on .tile-ex, .tile.is-on .tile-n { color: var(--ink-2); }
.tile[aria-pressed="true"] .tile-pic .win, .tile.is-on .tile-pic .win, .tile[aria-pressed="true"] .tile-pic .wheel, .tile.is-on .tile-pic .wheel { fill: var(--surface-2); }
.tabs [role=tab], .tab { border-radius: 999px; }
.kpi { border-radius: 22px; }
.kpi:hover { box-shadow: none; }
.kpi-ink { background-color: var(--surface); }
.kpi-alert, .q-pill.q-over, .chart-last b.is-over { color: #111111; }
.kpi-alert .kpi-l { color: #111111; }
.kpi-loss { background: #fff; color: #111111 !important; box-shadow: none; }
.kpi-loss span { color: #333333; }
.brand-chip { border-radius: 999px; }
.sales th { color: var(--ink-3); }

/* -- l'atelier d'accueil : la scène en grand, cartes en surimpression -- */
.is-home main.wrap, .is-home .top-in.wrap { max-width: none; padding-inline: 14px; }
.is-home .dash { max-width: 1480px; margin-inline: auto; }
.garage.atelier { position: relative; height: clamp(620px, calc(100vh - 110px), 980px); margin: 14px 0 6px; padding: 0; background: none; border: 0; border-radius: 0; box-shadow: none; }
.at-stage { position: absolute; inset: 0; min-width: 0; border-radius: 26px; overflow: hidden; border: 1px solid var(--line); background: var(--scene-bg); }
.at-stage .garage-show { position: absolute; inset: 0; border-radius: 0; }
.at-stage .garage-3d { border-radius: 0; }
.at-stage .garage-pic { position: absolute; inset: 0; width: 100%; height: 100%; }
.garage.is-dragging .at-stage { cursor: grabbing; }

.gcard, .at-card, .rail-item { background: rgb(15 15 15 / .84); border: 1px solid var(--line-2); border-radius: 22px; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.at-head { position: absolute; left: 18px; top: 18px; width: min(430px, calc(100% - 36px)); padding: 18px 20px; pointer-events: none; }
.gcard-t { margin: 0 0 8px; font-size: 1.5rem; font-weight: 600; letter-spacing: -.03em; line-height: 1.12; }
.gcard-s { margin: 0; color: var(--ink-2); font-size: .875rem; line-height: 1.45; }

.at-card { position: absolute; right: 18px; top: 18px; width: min(360px, calc(100% - 36px)); padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 12px; }
.at-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.at-id { margin: 0; display: flex; align-items: center; gap: 10px; min-width: 0; }
.at-id b { font-size: 1.0625rem; font-weight: 600; letter-spacing: -.02em; }
.at-id small { color: var(--ink-3); font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; font-family: var(--mono); white-space: nowrap; }
.gdot { width: 9px; height: 9px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 4px rgb(255 255 255 / .1); flex: none; }
.at-nav { display: flex; align-items: center; flex: none; }
.gcount { display: flex; padding: 0 6px; font: 500 .75rem var(--mono); color: var(--ink-2); }
.gnav { all: unset; box-sizing: border-box; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; color: var(--ink); cursor: pointer; transition: background-color var(--t-fast); }
.gnav:hover { background: var(--surface-2); }
.gnav:focus-visible { outline: 2px solid var(--ink); }
.gnav .ui-icon { width: 17px; height: 17px; }
.at-say { margin: 0; font-size: 1.0625rem; line-height: 1.35; color: var(--ink-2); }
.at-say b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.at-say b:first-child { font-size: 1.5rem; letter-spacing: -.03em; margin-right: 2px; }
.at-range { position: relative; height: 10px; border-radius: 999px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.at-range i { position: absolute; top: 0; bottom: 0; border-radius: 999px; background: var(--ink); transition: left 520ms var(--ease-out), width 520ms var(--ease-out); }
.at-range u { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: #0a0a0a; box-shadow: 0 0 0 1px var(--ink-2); border-radius: 2px; transition: left 520ms var(--ease-out); }
.at-sub { margin: 0; color: var(--ink-2); font-size: .8125rem; line-height: 1.4; }
.at-sub .garage-n-fig { color: var(--ink); font-family: var(--mono); font-size: .875rem; }
.at-card .gpill-go { align-self: stretch; justify-content: space-between; min-height: 48px; padding: 6px 6px 6px 16px; border-radius: 16px; background: var(--ink); border-color: var(--ink); color: #111; font-weight: 600; font-size: .9375rem; transition: translate var(--t-fast) var(--ease-out), background-color var(--t-fast); }
.at-card .gpill-go:hover { translate: 0 -2px; background: #fff; }
.at-card .gpill-go .ui-icon { width: 36px; height: 36px; padding: 9px; border-radius: 12px; background: #111; color: var(--ink); }

/* sélection : bandeau de cartes en bas de la scène */
.at-strip { position: absolute; left: 18px; right: 18px; bottom: 18px; pointer-events: none; }
.garage-rail { display: flex; flex-direction: row; gap: 10px; margin: 0; padding: 0; border: 0; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; position: relative; user-select: none; pointer-events: auto; width: fit-content; max-width: 100%; }
.garage-rail::-webkit-scrollbar { display: none; }
.rail-item { flex: 0 0 148px; flex-direction: column; align-items: stretch; gap: 8px; padding: 8px 8px 10px; color: var(--ink); transition: background-color var(--t-fast), border-color var(--t-fast), translate var(--t-fast) var(--ease-out); }
.rail-item:hover { background: rgb(30 30 30 / .92); translate: 0 -3px; }
.rail-item.is-on { background: rgb(36 36 36 / .94); border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.rail-item .rail-av, .rail-item > .rail-iso { flex: none; width: 100%; height: 66px; border-radius: 14px; background: #0c0c0c; border: 0; display: grid; place-items: center; overflow: hidden; }
.rail-item .rail-av .tile-pic { width: 70%; margin: 0; transform: none; --pl: var(--ink-2); --pb: #2e2e2e; }
.rail-item.is-on .rail-av .tile-pic { --pl: var(--ink); --pb: #3a3a3a; transform: none; }
.rail-item > .rail-iso { display: none; object-fit: contain; padding: 0; opacity: 1; filter: none; transform: none; aspect-ratio: auto; }
.garage.is-3d .rail-item > .rail-iso { display: block; }
.garage.is-3d .rail-av { display: none; }
.rail-item.is-on > .rail-iso, .garage:not(.is-live) .rail-item.is-on .rail-iso { transform: none; }
.rail-text { text-align: left; align-items: flex-start; display: flex; flex-direction: column; gap: 1px; padding-inline: 4px; min-width: 0; }
.rail-name { font-size: .875rem; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.rail-sub { color: var(--ink-3); font-size: .75rem; font-family: var(--mono); white-space: nowrap; }
.rail-path, .rail-thumb, .rail-num, .rail-badge, .rail-group { display: none !important; }

.dash { padding-top: 14px; }
.is-home .dash .kpis { margin-top: 0; }

@media (max-width: 860px) {
  .shell { display: block; padding: 0; }
  .shell-main { border-radius: 0; border: 0; box-shadow: none; padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
  .side.dock { position: fixed; inset: auto 8px calc(8px + env(safe-area-inset-bottom, 0px)) 8px; top: auto; width: auto; height: auto; flex-direction: row; padding: 6px; gap: 0; border-radius: 22px; }
  .dock-logo, .side.dock .dock-more { display: none; }
  .side.dock .side-nav { flex: 1; flex-direction: row; justify-content: space-around; gap: 2px; }
  .side.dock .side-nav a { width: auto; flex: 1; height: 54px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 3px; border-radius: 16px; font-size: .6875rem; }
  .side.dock .sn-s { display: block; }
  .side.dock .side-nav a[aria-current]::before { display: none; }
  .dock [data-tip]::after { display: none; }
}

.game-choices button { border: 1px solid var(--line-2); border-radius: 16px; background: var(--surface-2); }
.game-choices button:hover:not(:disabled) { border-color: var(--accent); background: var(--surface-2); }
.game-hard { border-color: var(--line-2); border-radius: 999px; padding: 3px 10px; }
.verdict-chip { border-radius: 999px; border-color: var(--line-2); }
.tag { border-radius: 999px; }
.rail-text { align-items: flex-start; } .rail-name, .rail-sub { text-align: left; max-width: 100%; }

/* -- zéro couleur : « sous la cote » = clair plein, « au-dessus » = gris hachuré (jamais la couleur seule) -- */
.kpi-plain, .kpi-alert { background: var(--surface); border-color: var(--line); color: var(--ink); }
.kpi-plain .kpi-l, .kpi-alert .kpi-l, .dash .kpis .kpi-plain .kpi-l, .dash .kpis .kpi-alert .kpi-l { color: var(--ink-2); }
.kpi-alert { background-image: repeating-linear-gradient(115deg, var(--line) 0 2px, transparent 2px 9px); background-size: 46% 100%; background-repeat: no-repeat; background-position: right; }
.kpi-plain .kpi-l .q-pill, .dash .kpis .kpi-plain .kpi-l .q-pill { background: var(--accent); color: var(--accent-ink); }
.q-pill.q-over, .chart-last b.is-over { background: var(--surface-2) repeating-linear-gradient(135deg, var(--line-2) 0 1.5px, transparent 1.5px 6px); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.kpi-loss { background: var(--surface-2); color: var(--ink) !important; box-shadow: inset 0 0 0 1px var(--line-2); }
.kpi-loss span { color: var(--ink-2); }
.gpill-go .ui-icon { background: var(--ink); color: #111; }
.at-stage, .gcard, .side.dock, .shell-main { box-shadow: none; }

/* mobile : la scène garde sa hauteur, les cartes passent dessous (pas de surimpression sur un petit écran) */
@media (max-width: 860px) {
  .is-home main.wrap, .is-home .top-in.wrap { padding-inline: 12px; }
  .garage.atelier { height: auto; display: flex; flex-direction: column; gap: 10px; }
  .at-stage { position: relative; inset: auto; height: min(80vw, 440px); order: 2; }
  .at-head { position: static; width: auto; order: 1; pointer-events: auto; }
  .at-card { position: static; width: auto; order: 3; }
  .at-strip { position: static; order: 4; }
  .garage-rail { width: auto; padding-bottom: 4px; }
  .rail-item { flex-basis: 132px; }
}
@media (max-height: 700px) and (min-width: 861px) { .at-sub { display: none; } .gcard-s { display: none; } }
.at-id b { white-space: nowrap; } .at-card { width: min(380px, calc(100% - 36px)); }
@media (max-width: 860px) { .at-card { width: auto; } .at-id small { display: none; } }
@media (min-width: 861px) and (max-width: 1220px) { .at-head { width: calc(100% - 36px - 398px); } .gcard-s { display: none; } }

/* -- toasts : dernières adjudications de la catégorie, empilés au-dessus du bandeau -- */
.at-toasts { position: absolute; right: 18px; bottom: 170px; width: min(340px, calc(100% - 36px)); display: flex; flex-direction: column; gap: 8px; pointer-events: none; z-index: 2; }
.toast { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 14px; border-radius: 16px; background: rgb(15 15 15 / .88); border: 1px solid var(--line-2); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); color: var(--ink); text-decoration: none; pointer-events: auto;
  opacity: 0; translate: 24px 0; transition: opacity 320ms var(--ease-out), translate 320ms var(--ease-out); }
.toast.is-in { opacity: 1; translate: 0 0; }
.toast.is-out { opacity: 0; translate: 0 -10px; }
a.toast:hover { background: rgb(30 30 30 / .95); }
.toast-t { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.toast-t b { font-size: .8125rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toast-t small { color: var(--ink-3); font-size: .6875rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toast-p { flex: none; font: 600 .9375rem var(--mono); letter-spacing: -.02em; }
@media (max-width: 860px) { .at-toasts { position: absolute; right: 10px; left: 10px; bottom: 10px; width: auto; top: auto; } .at-stage { position: relative; } }
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }
@media (max-width: 860px) { .at-toasts { position: static; order: 3; width: auto; min-height: 128px; } .at-card { order: 4; } .at-strip { order: 5; } }
.toast { justify-content: flex-start; }
.toast-i { flex: none; width: 64px; height: 44px; border-radius: 10px; object-fit: cover; background: var(--surface-2); }
.toast-t { flex: 1; }
.toast-p { margin-left: auto; }

/* -- rail avec libellés : icône + nom, on sait où l'on va sans survoler -- */
@media (min-width: 861px) {
  .shell { grid-template-columns: 92px minmax(0, 1fr); }
  .side.dock { width: 92px; gap: 18px; }
  .side.dock .side-nav { width: 100%; padding-inline: 8px; gap: 4px; }
  .side.dock .side-nav a { width: 100%; height: 60px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px; border-radius: 16px; }
  .side.dock .sn-s { display: block; font-size: .75rem; font-weight: 500; letter-spacing: .01em; line-height: 1; }
  .side.dock .side-nav a[aria-current] .sn-s { color: var(--ink); }
  .side.dock .side-nav a[aria-current]::before { left: -9px; top: 16px; bottom: 16px; }
  .dock [data-tip]::after { display: none; }
}

/* ==========================================================================================================
   La salle des enchères (jeu.js) — 5 modes, même fiche, même révélation. Zéro couleur : plein = bon,
   hachuré = raté, jamais la couleur seule. Seulement transform et opacité ; tout est coupé en reduced-motion.
   ========================================================================================================== */
.jeu-hero-mode { padding-bottom: 0; }
.jeu-hero-mode .title { font-size: clamp(2rem, 1.2rem + 3vw, 3.25rem); }
.jeu-crumb { padding-top: 14px; color: var(--ink-3); }
.jeu-crumb a { color: var(--ink-2); }
.jeu-hero ~ .game, .jeu-hero ~ .cta, .jeu-hero ~ .jeu-rules, .jeu-hero ~ .jeu-h2, .jeu-hero ~ .jeu-modes, .jeu-crumb ~ .game, .jeu-crumb ~ .cta { max-width: 760px; }
.jeu-rules { max-width: 760px; margin: 12px 0 0; }
.jeu-h2 { margin: 28px 0 12px; }

.jh { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.jh-t { display: flex; align-items: center; gap: 10px; min-width: 0; }
.jh-t b { display: block; font-size: .9375rem; letter-spacing: -.01em; }
.jh-m { display: block; font-family: var(--mono); font-size: .6875rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.jh-logo { width: 32px; height: 32px; border-radius: 10px; border: 1px solid var(--line-2); display: grid; place-items: center; background: var(--surface-2); }
.jprog { display: flex; gap: 4px; flex: 1 1 90px; max-width: 220px; }
.jprog i { flex: 1; height: 5px; border-radius: 3px; background: var(--cell); }
.jprog i.done { background: var(--ink-2); }
.jprog i.now { background: var(--ink); }
.jsound { font: inherit; font-family: var(--mono); font-size: .6875rem; letter-spacing: .06em; text-transform: uppercase; padding: 6px 12px; min-height: 32px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--ink-2); cursor: pointer; }
.jsound[aria-pressed="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }

.jintro { text-align: center; padding: 28px 8px 20px; display: grid; justify-items: center; gap: 6px; }
.jintro h2 { margin: 0; font-size: clamp(2rem, 1.4rem + 3vw, 3rem); letter-spacing: -.04em; line-height: 1; }
.jintro-n { font-family: var(--mono); font-size: .8125rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); margin: 0; }
.jintro .lede { max-width: 46ch; margin: 8px auto 14px; }
.is-intro .jintro { animation: rise 420ms var(--ease-out) backwards; }

/* chrono : segments qui se vident, les 3 derniers clignotent */
.jt { display: flex; gap: 3px; margin: 0 0 10px; }
.jt i { flex: 1; height: 5px; border-radius: 2px; background: var(--ink); transition: opacity var(--t-mid), transform var(--t-mid) var(--ease-out); transform-origin: left; }
.jt i.off { opacity: .15; transform: scaleY(.6); }
.jt.is-last i:not(.off) { animation: jblink 700ms steps(2) infinite; background-image: var(--hatch); }
@keyframes jblink { 50% { opacity: .35; } }
.jcount { position: absolute; inset: 0; display: grid; place-items: center; font-size: clamp(5rem, 28vw, 9rem); font-weight: 700; color: var(--ink); text-shadow: 0 0 40px rgb(0 0 0 / .7), 0 2px 0 rgb(0 0 0 / .8); pointer-events: none; opacity: 0; }
.jcount.is-on { animation: jcount 900ms var(--ease-out) forwards; }
@keyframes jcount { 0% { opacity: 0; transform: scale(1.7); } 25% { opacity: 1; transform: scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: scale(.85); } }

/* photo + bandeau + tampon */
.jeu-card .game-pic, .jpic { position: relative; height: clamp(118px, 23vh, 250px); margin-bottom: 10px; }
.jpic.is-hidden { background-image: var(--hatch); }
.jpic.is-none { text-align: center; padding: 8px; }
.jband { position: absolute; left: 0; right: 0; bottom: 0; padding: 8px 12px; background: rgb(15 15 15 / .9); border-top: 1px solid var(--line-2); display: grid; gap: 1px; font-size: .75rem; line-height: 1.35; color: var(--ink-2); text-align: left; }
.jband[hidden] { display: none; }
.jband b { color: var(--ink); font-weight: 600; }
.jband em { font-style: normal; color: var(--ink); border-bottom: 1px solid var(--ink); }
.jband.is-on { animation: jband 420ms var(--ease-out) backwards; }
@keyframes jband { from { transform: translateY(100%); opacity: 0; } }
.jstamp { position: absolute; top: 12px; right: 12px; padding: 4px 12px; border: 2px solid var(--ink); border-radius: 6px; background: var(--ink); color: var(--surface); font-family: var(--mono); font-weight: 700; letter-spacing: .18em; font-size: .875rem; transform: rotate(-8deg); }
.jstamp[hidden] { display: none; }
.jstamp.is-on { animation: hit 320ms var(--ease-back) backwards; }
.jtitle { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 2px 0 8px; }
.jtitle .game-lot { margin: 0; font-size: 1.25rem; }

/* fiche standard : 6 cases */
.jgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 0 0 8px; }
.jcell { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 6px 9px; min-width: 0; min-height: 46px; }
.jcell dt { font-family: var(--mono); font-size: .625rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jcell dd { margin: 1px 0 0; font-size: .8125rem; font-weight: 500; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; line-height: 1.25; }
.jcell.is-wait { opacity: 0; }
.jcell.is-in { animation: jflash 600ms var(--ease-out); }
@keyframes jflash { 0% { background: var(--ink); transform: translateY(-4px) scale(1.03); } 100% { background: var(--surface-2); transform: none; } }
.jcell.is-masked { background-image: var(--hatch); }
.jcell.is-masked dd { color: var(--ink-3); }
.jcell dd.is-yes { animation: pop 420ms var(--ease-back); font-weight: 700; }
.jcell dd.is-no { animation: shake 400ms; font-weight: 700; text-decoration: underline wavy; }
.jnote { margin: 0 0 10px; font-size: .8125rem; color: var(--ink-2); line-height: 1.4; }
.jnote b { font-family: var(--mono); font-size: .625rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-right: 6px; }

/* réponses : A B C, 56 px mini */
.jchoices { grid-template-columns: repeat(3, 1fr); gap: 8px; }
.jchoices-2 { grid-template-columns: repeat(2, 1fr); }
.jans, .game-choices .jans { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-height: 58px; padding: 6px 4px; font-size: 1rem; }
.jans[hidden] { display: none; }
.jans.is-pop { animation: jpop 320ms var(--ease-back) backwards; }
@keyframes jpop { from { opacity: 0; transform: translateY(14px) scale(.9); } }
.jk { font-family: var(--mono); font-size: .625rem; letter-spacing: .1em; color: var(--ink-3); }
.game-choices button.is-right .jk { color: var(--accent-ink); }
.game-choices button.is-right { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--ink); animation: pop 320ms var(--ease-back); }
.jeu-card.shake { animation: shake 180ms 2; }
.jq { margin: 4px 0 8px; font-weight: 600; font-size: 1.0625rem; letter-spacing: -.01em; position: relative; }
.jq-big { font-size: 1.5rem; margin: 18px 0 14px; }
.jq-s { margin: 14px 0 4px; font-family: var(--mono); font-size: .75rem; color: var(--ink-3); }
.jeu-card .game-foot { margin-top: 10px; }

/* Duel */
.jduel { display: grid; grid-template-columns: 1fr; gap: 8px; position: relative; }
.jduel-c { position: relative; display: grid; grid-template-columns: 112px 1fr; align-items: stretch; gap: 10px; text-align: left; font: inherit; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 16px; padding: 8px; cursor: pointer; min-height: 100px; transition: transform var(--t-fast) var(--ease-out), border-color var(--t-fast); }
.jduel-c .jk { position: absolute; top: 12px; left: 14px; z-index: 1; background: var(--surface); padding: 1px 6px; border-radius: 6px; color: var(--ink); }
.jduel-c:hover:not(:disabled) { border-color: var(--ink); transform: translateY(-2px); }
.jduel-c .jpic { height: 100%; min-height: 84px; margin: 0; }
.jduel-t { display: grid; gap: 3px; align-content: center; min-width: 0; font-size: .9375rem; }
.jduel-d { font-size: .75rem; color: var(--ink-2); line-height: 1.3; }
.jduel-p { font-family: var(--mono); font-size: .75rem; font-weight: 600; color: var(--ink); }
.jduel-p[hidden] { display: none; }
.jduel-c .jstamp { top: 8px; right: 8px; font-size: .6875rem; }
.jduel-c.is-win { border-color: var(--ink); box-shadow: 0 0 0 2px var(--ink); animation: pop 320ms var(--ease-back); }
.jduel-c.is-lost { opacity: .55; background-image: var(--hatch); }
.jduel-c:disabled { cursor: default; }
.jvs { display: none; }
@media (min-width: 640px) {
  .jduel { grid-template-columns: 1fr 1fr; }
  .jduel-c { grid-template-columns: 1fr; padding: 10px; }
  .jduel-c .jpic { height: 150px; }
  .jvs { display: grid; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 44px; height: 44px; place-items: center; border-radius: 50%; background: var(--ink); color: var(--surface); font-family: var(--mono); font-size: .5625rem; text-transform: uppercase; z-index: 2; }
}

/* Affaire / Budget / résultat / records */
.jlines { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.jlines li { padding: 9px 12px; border: 1px solid var(--line-2); border-left: 3px solid var(--ink); border-radius: 10px; background: var(--surface-2); font-size: .8125rem; line-height: 1.4; }
.jlines li.is-in { animation: rise 320ms var(--ease-out) backwards; }
.jbudgets { grid-template-columns: repeat(3, 1fr); }
.jgauge { margin-bottom: 10px; }
.jgauge p { margin: 4px 0 0; font-size: .8125rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.jgauge b { color: var(--ink); font-size: 1.125rem; }
.jgauge-b { height: 8px; border-radius: 4px; background: var(--cell); overflow: hidden; }
.jgauge-b i { display: block; height: 100%; background: var(--ink); transform-origin: left; transition: transform var(--t-mid) var(--ease-out); }
.jlots { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width: 640px) { .jlots { grid-template-columns: repeat(3, 1fr); } }
.jlot { position: relative; display: grid; gap: 3px; align-content: start; text-align: left; font: inherit; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 16px; padding: 8px; cursor: pointer; transition: transform var(--t-fast) var(--ease-out), border-color var(--t-fast); }
.jlot .jpic { height: 78px; margin: 0 0 4px; }
.jlot .jk { position: absolute; top: 12px; left: 14px; z-index: 1; background: var(--surface); padding: 1px 6px; border-radius: 6px; color: var(--ink); }
.jlot b { font-size: .875rem; }
.jlot-p { font-family: var(--mono); font-weight: 600; font-size: 1rem; font-variant-numeric: tabular-nums; }
.jlot:hover:not(:disabled) { border-color: var(--ink); transform: translateY(-2px); }
.jlot.is-on { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.jlot.is-on .jduel-d { color: var(--surface); }
.jlot:disabled { opacity: .4; background-image: var(--hatch); cursor: not-allowed; }
.jreveal { text-align: center; padding: 6px 0 12px; }
.jreveal .lede { margin: 6px auto 0; max-width: 46ch; }
.jtab { list-style: none; margin: 10px 0; padding: 0; display: grid; gap: 6px; }
.jtab li { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); font-size: .8125rem; }
.jtab li span { color: var(--ink-2); grid-column: 1; }
.jtab li em { grid-row: 1 / span 2; grid-column: 2; font-style: normal; font-family: var(--mono); font-weight: 600; align-self: center; font-size: .9375rem; }
.jtab li i { grid-column: 1 / -1; font-style: normal; font-family: var(--mono); font-size: .625rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.jtab li.is-pick { border-color: var(--ink); }
.jtab li.is-best { background-image: var(--hatch); }
.jtab-l li { grid-template-columns: 1fr; }
.jtab-l a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.jres { text-align: center; padding: 10px 0 6px; }
.jres .figure-xl { margin: 4px 0; }
.jres .lede { margin: 4px auto; }
.jgridtxt { font-size: 1.75rem; letter-spacing: .12em; margin: 8px 0; }
.jshare { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 6px 0 4px; flex-wrap: wrap; }
.jactions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.jactions .btn { flex: 1 1 140px; }
.jslide { margin: 6px 0 4px; text-align: center; }
.jslide label { font-family: var(--mono); font-size: .6875rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.jslide output { display: block; font-size: 2.25rem; margin: 2px 0 6px; }
.jslide input[type=range] { width: 100%; min-height: 36px; accent-color: var(--ink); }
.jslide-b { display: flex; justify-content: space-between; font-family: var(--mono); font-size: .6875rem; color: var(--ink-3); }

/* hub */
.defi-grid { display: grid; grid-template-columns: 1fr; gap: 14px; align-items: center; }
@media (min-width: 640px) { .defi-grid { grid-template-columns: 1fr 1fr; } }
.defi-grid .jpic { height: clamp(150px, 26vh, 240px); margin: 0; }
.jeu-modes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 640px) { .jeu-modes { grid-template-columns: repeat(2, 1fr); } }
.jeu-mode { display: grid; gap: 2px; text-decoration: none; color: var(--ink); height: 100%; transition: transform var(--t-fast) var(--ease-out), border-color var(--t-fast); }
.jeu-mode:hover { transform: translateY(-3px); border-color: var(--ink); }
.jeu-mode-n { font-size: 1.25rem; font-weight: 600; letter-spacing: -.02em; }
.jeu-mode-q { color: var(--ink-2); font-size: .9375rem; }
.jeu-mode-d, .jeu-mode-b { font-size: .6875rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin-top: 6px; }
.jeu-mode-b { color: var(--ink); margin-top: 0; }
.jeu-mode-b[hidden] { display: none; }

@media (max-width: 480px) {
  .jeu-card { padding: 14px; }
  .jgrid { gap: 5px; }
  .jcell { padding: 5px 7px; min-height: 42px; }
  .jduel-c { grid-template-columns: 96px 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .jcell.is-in, .jcell dd.is-yes, .jcell dd.is-no, .jband.is-on, .jstamp.is-on, .jans.is-pop, .jlines li.is-in, .jintro, .jcount.is-on, .jt.is-last i { animation: none !important; }
  .jt, .jcount { display: none; }
  .jduel-c, .jlot, .jeu-mode { transition: none; transform: none !important; }
}

/* pages de mode : tout le jeu tient dans le premier écran. Le titre reste pour les lecteurs d'écran et le référencement, l'en-tête du jeu porte déjà le nom du mode. */
.jeu-crumb { display: none; }
.jeu-hero-mode { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.jeu-crumb ~ .game { margin-top: 14px; }
@media (max-width: 639px) {
  .is-affaire .jpic { height: clamp(92px, 16vh, 130px); }
  .is-affaire .jgrid { margin-bottom: 6px; }
  .is-budget .jlot .jpic { height: 54px; margin-bottom: 2px; }
  .is-budget .jlot { padding: 6px 8px; gap: 1px; }
  .is-budget .jlot .jk { top: 9px; left: 12px; }
  .is-budget .jlots { gap: 6px; }
  .is-budget .jduel-d { font-size: .6875rem; }
  .is-budget .jgauge { margin-bottom: 8px; }
}
@media (max-width: 639px) {
  .is-budget .jlots { grid-template-columns: 1fr; }
  .is-budget .jlot { grid-template-columns: 64px 1fr auto; grid-template-areas: "pic t p" "pic d f"; align-items: center; column-gap: 10px; row-gap: 0; padding: 5px 8px; }
  .is-budget .jlot .jpic { grid-area: pic; height: 44px; margin: 0; }
  .is-budget .jlot > b { grid-area: t; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .is-budget .jlot > span.jduel-d:nth-of-type(2) { grid-area: d; }
  .is-budget .jlot > .jlot-p { grid-area: p; text-align: right; font-size: .9375rem; }
  .is-budget .jlot > span.jduel-d:nth-of-type(4) { grid-area: f; text-align: right; }
  .is-budget .jlot .jk { top: 7px; left: 12px; font-size: .5625rem; padding: 0 4px; }
}
@media (max-width: 480px) {
  .jh { flex-wrap: nowrap; margin-bottom: 8px; gap: 8px; }
  .jh-logo { display: none; }
  .jh-t b { font-size: .8125rem; white-space: nowrap; }
  .jh-m { font-size: .5625rem; white-space: nowrap; }
  .jprog { max-width: 70px; flex: 0 1 70px; }
  .jsound { padding: 4px 9px; min-height: 28px; font-size: .625rem; }
  .is-budget .jduel-d { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

/* hub : défi du jour à gauche, modes à droite, tout dans le premier écran */
.jeu-hero-hub { padding: 14px 0 6px; max-width: none; }
.jeu-hero-hub .title { font-size: clamp(1.75rem, 1rem + 2.4vw, 2.75rem); margin: 0 0 .25em; }
.jeu-hero-hub .lede { margin: 0; font-size: .9375rem; }
.jeu-hero ~ .jeu-hub, .jeu-hero ~ #vente { max-width: none; }
.jeu-hub { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 10px; align-items: start; }
.jeu-hub .jeu-h2 { margin: 0 0 8px; font-size: 1rem; }
.jeu-hub .defi-grid { grid-template-columns: 1fr; }
@media (min-width: 900px) {
  .jeu-hub { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 20px; }
  .jeu-hub .jeu-modes { grid-template-columns: 1fr; gap: 8px; }
  .jeu-hub .jeu-mode { grid-template-columns: 1fr auto; grid-template-areas: "n d" "q b"; padding: 12px 16px; align-items: baseline; }
  .jeu-hub .jeu-mode-n { grid-area: n; font-size: 1.0625rem; }
  .jeu-hub .jeu-mode-q { grid-area: q; font-size: .8125rem; }
  .jeu-hub .jeu-mode-d { grid-area: d; margin: 0; text-align: right; }
  .jeu-hub .jeu-mode-b { grid-area: b; margin: 0; text-align: right; }
}
@media (min-width: 560px) and (max-width: 899px) { .jeu-hub .defi-grid { grid-template-columns: 1fr 1fr; } }

/* GAVEL:BEGIN (généré par identite/make_logo.py, ne pas éditer à la main) */
.gv { --gv-base: #4a2c14; --gv-side: #b07a40; --gv-shade: #8c5b2b; --gv-top: #e3ab6b; --gv-ring: #c8905a;
  --gv-head: #7a4a22; --gv-band: #3d2411; --gv-hl: #a8703b; --gv-handle: #94602f; --gv-fx: #ffd9a0; }
.gv-mono { --gv-base: color-mix(in srgb, currentColor 32%, transparent); --gv-side: color-mix(in srgb, currentColor 50%, transparent);
  --gv-shade: color-mix(in srgb, currentColor 38%, transparent); --gv-top: color-mix(in srgb, currentColor 70%, transparent);
  --gv-ring: color-mix(in srgb, currentColor 42%, transparent); --gv-head: currentColor; --gv-band: color-mix(in srgb, currentColor 55%, transparent);
  --gv-hl: transparent; --gv-handle: currentColor; --gv-fx: currentColor; --gv-trail: currentColor; }
.gv-base { fill: var(--gv-base); } .gv-side { fill: var(--gv-side); } .gv-shade { fill: var(--gv-shade); } .gv-top { fill: var(--gv-top); }
.gv-ring { fill: none; stroke: var(--gv-ring); stroke-width: 1; } .gv-head { fill: var(--gv-head); } .gv-band { fill: var(--gv-band); }
.gv-hl { fill: var(--gv-hl); } .gv-handle { fill: var(--gv-handle); }
.gv-trail { fill: none; stroke: var(--gv-trail, #d9a066); stroke-linecap: round; }
.gv-spark { fill: none; stroke: var(--gv-fx); stroke-width: 1.9; stroke-linecap: round; } .gv-chip { fill: var(--gv-fx); }
.gv-arm, .gv-block, .gv-fx { transform-box: view-box; }
.gv-arm { transform-origin: 60px 35px; } .gv-block { transform-origin: 24px 56px; } .gv-fx { transform-origin: 24px 47px; opacity: 0; }
.gv-fx-on .gv-fx { opacity: 1; }
.gv-up .gv-arm { transform: rotate(26deg); } .gv-up .gv-fx { display: none; }
.gv-mono .gv-trail { display: none; }
@keyframes gv-arm-strike { 0% { transform: rotate(0deg); animation-timing-function: cubic-bezier(.2,.7,.3,1); } 30% { transform: rotate(31deg); } 40% { transform: rotate(31deg); animation-timing-function: cubic-bezier(.6,0,1,.5); } 50% { transform: rotate(-1.5deg); animation-timing-function: cubic-bezier(.3,.6,.4,1); } 61.0% { transform: rotate(8deg); animation-timing-function: cubic-bezier(.3,.6,.4,1); } 75.0% { transform: rotate(-0.4deg); animation-timing-function: cubic-bezier(.3,.6,.4,1); } 86.0% { transform: rotate(2.24deg); animation-timing-function: cubic-bezier(.3,.6,.4,1); } 100% { transform: rotate(0deg); } }
@keyframes gv-block-strike { 0%, 49.99% { transform: none; } 50% { transform: scale(1.035, 0.9); } 59.00% { transform: scale(.99, 1.02); } 70.00%, 100% { transform: none; } }
@keyframes gv-fx-strike { 0%, 49.99% { opacity: 0; transform: scale(.55); } 50% { opacity: 1; transform: scale(.7); } 72.00%, 100% { opacity: 0; transform: scale(1.3); } }
@keyframes gv-arm-tap { 0% { transform: rotate(0deg); animation-timing-function: cubic-bezier(.2,.7,.3,1); } 34% { transform: rotate(19deg); } 40% { transform: rotate(19deg); animation-timing-function: cubic-bezier(.6,0,1,.5); } 56% { transform: rotate(-1.5deg); animation-timing-function: cubic-bezier(.3,.6,.4,1); } 65.68% { transform: rotate(4.5deg); animation-timing-function: cubic-bezier(.3,.6,.4,1); } 78.0% { transform: rotate(-0.4deg); animation-timing-function: cubic-bezier(.3,.6,.4,1); } 87.68% { transform: rotate(1.2600000000000002deg); animation-timing-function: cubic-bezier(.3,.6,.4,1); } 100% { transform: rotate(0deg); } }
@keyframes gv-block-tap { 0%, 55.99% { transform: none; } 56% { transform: scale(1.035, 0.955); } 65.90% { transform: scale(.99, 1.02); } 78.00%, 100% { transform: none; } }
@keyframes gv-fx-tap { 0%, 55.99% { opacity: 0; transform: scale(.55); } 56% { opacity: 1; transform: scale(.7); } 78.00%, 100% { opacity: 0; transform: scale(1.3); } }
@keyframes gv-arm-slam { 0% { transform: rotate(0deg); animation-timing-function: cubic-bezier(.2,.7,.3,1); } 30% { transform: rotate(54deg); } 44% { transform: rotate(54deg); animation-timing-function: cubic-bezier(.6,0,1,.5); } 60% { transform: rotate(-1.5deg); animation-timing-function: cubic-bezier(.3,.6,.4,1); } 68.8% { transform: rotate(13deg); animation-timing-function: cubic-bezier(.3,.6,.4,1); } 80.0% { transform: rotate(-0.4deg); animation-timing-function: cubic-bezier(.3,.6,.4,1); } 88.8% { transform: rotate(3.6400000000000006deg); animation-timing-function: cubic-bezier(.3,.6,.4,1); } 100% { transform: rotate(0deg); } }
@keyframes gv-block-slam { 0%, 59.99% { transform: none; } 60% { transform: scale(1.035, 0.85); } 70.80% { transform: scale(.99, 1.02); } 84.00%, 100% { transform: none; } }
@keyframes gv-fx-slam { 0%, 59.99% { opacity: 0; transform: scale(.55); } 60% { opacity: 1; transform: scale(.7); } 86.00%, 100% { opacity: 0; transform: scale(1.3); } }
@keyframes gv-arm-loop { 0% { transform: rotate(0deg); animation-timing-function: cubic-bezier(.2,.7,.3,1); } 22% { transform: rotate(31deg); } 32% { transform: rotate(31deg); animation-timing-function: cubic-bezier(.6,0,1,.5); } 38% { transform: rotate(-1.5deg); animation-timing-function: cubic-bezier(.3,.6,.4,1); } 51.64% { transform: rotate(8deg); animation-timing-function: cubic-bezier(.3,.6,.4,1); } 69.0% { transform: rotate(-0.4deg); animation-timing-function: cubic-bezier(.3,.6,.4,1); } 82.64% { transform: rotate(2.24deg); animation-timing-function: cubic-bezier(.3,.6,.4,1); } 100% { transform: rotate(0deg); } }
@keyframes gv-block-loop { 0%, 37.99% { transform: none; } 38% { transform: scale(1.035, 0.9); } 43.40% { transform: scale(.99, 1.02); } 50.00%, 100% { transform: none; } }
@keyframes gv-fx-loop { 0%, 37.99% { opacity: 0; transform: scale(.55); } 38% { opacity: 1; transform: scale(.7); } 52.00%, 100% { opacity: 0; transform: scale(1.3); } }
/* logo du site : un coup au chargement, un autre au survol */
.gv-brand .gv-arm { animation: gv-arm-strike 1.3s .45s 1 backwards; } .gv-brand .gv-block { animation: gv-block-strike 1.3s .45s 1 backwards; }
.gv-brand .gv-fx { animation: gv-fx-strike 1.3s .45s 1 backwards; }
a:hover > .gv-brand .gv-arm, a:focus-visible > .gv-brand .gv-arm { animation: gv-arm-strike-2 1.3s 1; }
a:hover > .gv-brand .gv-block, a:focus-visible > .gv-brand .gv-block { animation: gv-block-strike-2 1.3s 1; }
a:hover > .gv-brand .gv-fx, a:focus-visible > .gv-brand .gv-fx { animation: gv-fx-strike-2 1.3s 1; }
/* pastille « Adjugé », bouton de la barre latérale */
.road.is-done .gv-flag .gv-arm { animation: gv-arm-strike 1.3s .5s 1 backwards; } .road.is-done .gv-flag .gv-block { animation: gv-block-strike 1.3s .5s 1 backwards; }
.road.is-done .gv-flag .gv-fx { animation: gv-fx-strike 1.3s .5s 1 backwards; }
.side-promo:hover .gv-arm { animation: gv-arm-strike 1.3s 1; } .side-promo:hover .gv-block { animation: gv-block-strike 1.3s 1; } .side-promo:hover .gv-fx { animation: gv-fx-strike 1.3s 1; }
/* révélation de /combien/ : deux petits coups puis le grand */
.gavel.tap .gv-arm { animation: gv-arm-tap .5s 1; } .gavel.tap .gv-block { animation: gv-block-tap .5s 1; } .gavel.tap .gv-fx { animation: gv-fx-tap .5s 1; }
.gavel.slam .gv-arm { animation: gv-arm-slam .8s 1; } .gavel.slam .gv-block { animation: gv-block-slam .8s 1; } .gavel.slam .gv-fx { animation: gv-fx-slam .8s 1; }
@media (prefers-reduced-motion: reduce) { .gv-brand .gv-arm, .gv-brand .gv-block, .gv-brand .gv-fx, .gv-flag .gv-arm, .gv-flag .gv-block, .gv-flag .gv-fx { animation: none !important; } }
@keyframes gv-arm-strike-2 { 0% { transform: rotate(0deg); animation-timing-function: cubic-bezier(.2,.7,.3,1); } 30% { transform: rotate(31deg); } 40% { transform: rotate(31deg); animation-timing-function: cubic-bezier(.6,0,1,.5); } 50% { transform: rotate(-1.5deg); animation-timing-function: cubic-bezier(.3,.6,.4,1); } 61.0% { transform: rotate(8deg); animation-timing-function: cubic-bezier(.3,.6,.4,1); } 75.0% { transform: rotate(-0.4deg); animation-timing-function: cubic-bezier(.3,.6,.4,1); } 86.0% { transform: rotate(2.24deg); animation-timing-function: cubic-bezier(.3,.6,.4,1); } 100% { transform: rotate(0deg); } }
@keyframes gv-block-strike-2 { 0%, 49.99% { transform: none; } 50% { transform: scale(1.035, 0.9); } 59.00% { transform: scale(.99, 1.02); } 70.00%, 100% { transform: none; } }
@keyframes gv-fx-strike-2 { 0%, 49.99% { opacity: 0; transform: scale(.55); } 50% { opacity: 1; transform: scale(.7); } 72.00%, 100% { opacity: 0; transform: scale(1.3); } }
/* GAVEL:END */
