/* Le Crible — jetons de design. Direction « revue technique suisse » :
   blanc franc, grotesque néo-suisse (Hanken Grotesk) pour la structure et les données,
   serif de texte à empattements nets (Source Serif 4) pour les titres, un seul accent outremer. */

/* Polices auto-hébergées (OFL), sous-ensemble latin + français, préchargées dans index.html.
   font-display: optional + préchargement : la police est prête au premier rendu, jamais d'échange
   tardif, donc CLS nul ; les replis ci-dessous ont des métriques calées sur les originales. */
@font-face {
  font-family: 'Source Serif 4';
  src: url('/fonts/serif-600.v1.woff2') format('woff2');
  font-weight: 600 700;
  font-style: normal;
  font-display: optional;
}
@font-face {
  font-family: 'Source Serif 4';
  src: url('/fonts/serif-400.v1.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: optional;
}
@font-face {
  font-family: 'Hanken Grotesk';
  src: url('/fonts/sans-400.v2.woff2') format('woff2');
  font-weight: 400 500;
  font-style: normal;
  font-display: optional;
}
@font-face {
  font-family: 'Hanken Grotesk';
  src: url('/fonts/sans-650.v2.woff2') format('woff2');
  font-weight: 600 800;
  font-style: normal;
  font-display: optional;
}

/* Replis ajustés : même chasse moyenne et mêmes jambages que les polices finales. */
@font-face {
  font-family: 'Serif Repli';
  src: local('Georgia'), local('Times New Roman');
  font-weight: 400;
  size-adjust: 101.7%;
  ascent-override: 101.8%;
  descent-override: 32.9%;
  line-gap-override: 0%;
}
@font-face {
  font-family: 'Serif Repli';
  src: local('Georgia Bold'), local('Georgia-Bold'), local('Times New Roman Bold');
  font-weight: 600 700;
  size-adjust: 85.1%;
  ascent-override: 121.7%;
  descent-override: 39.4%;
  line-gap-override: 0%;
}
@font-face {
  font-family: 'Sans Repli';
  src: local('Arial'), local('Helvetica'), local('Roboto');
  font-weight: 400 500;
  size-adjust: 100%;
  ascent-override: 100%;
  descent-override: 30.3%;
  line-gap-override: 0%;
}
@font-face {
  font-family: 'Sans Repli';
  src: local('Arial Bold'), local('Arial-BoldMT'), local('Helvetica Bold'), local('Roboto Bold');
  font-weight: 600 800;
  size-adjust: 93.7%;
  ascent-override: 106.7%;
  descent-override: 32.3%;
  line-gap-override: 0%;
}

:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-2: #f4f5f7;
  --fg: #0f1012;
  --fg-2: #3d3e42;
  --muted: #595a60;
  --rule: #d9dadd;
  --rule-strong: #0f1012;
  --accent: #1f3fd6;
  --accent-fg: #ffffff;
  --accent-wash: #e8ecfd;
  --ok: #17693a;
  --ko: #b3261e;
  --bar: #dfe4fb;
  --rule-wash: #c9d1f5;
  /* Bandeau à l'encre (« À suivre ») : l'accent de nuit sur fond d'encre. */
  --band-bg: #0f1012;
  --band-fg: #ffffff;
  --band-fg-2: #b9bbc1;
  --band-rule: #3a3c42;
  --band-accent: #8da0ff;

  --font-serif: 'Source Serif 4', 'Serif Repli', Georgia, serif;
  --font-sans: 'Hanken Grotesk', 'Sans Repli', Arial, Helvetica, sans-serif;

  /* Échelle typographique (ratio ~1,25, corps 17 px en desktop). */
  --step--2: 0.75rem;
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.5625rem;
  --step-3: clamp(1.875rem, 1.35rem + 2.2vw, 2.75rem);
  --step-4: clamp(2.125rem, 1.4rem + 3.2vw, 3.625rem);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2.5rem;
  --space-6: 4rem;

  --measure: 42rem;
  --page: 75rem;
  --gutter: 1rem;
  --col-gap: 1.5rem;
  --hair: 1px;
  --bold-rule: 3px;
  --target: 2.75rem;
}

@media (min-width: 48rem) {
  :root {
    --gutter: 2rem;
  }
}
@media (min-width: 75rem) {
  :root {
    --gutter: 2.5rem;
    --col-gap: 2rem;
  }
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --bg: #0f1012;
    --bg-2: #17181b;
    --fg: #ececed;
    --fg-2: #c9cacd;
    --muted: #9da0a6;
    --rule: #2e3035;
    --rule-strong: #ececed;
    --accent: #8da0ff;
    --accent-fg: #0f1012;
    --accent-wash: #1b2140;
    --ok: #7fd49b;
    --ko: #ff8a80;
    --bar: #252c52;
    --rule-wash: #2f386a;
    --band-bg: #1b2140;
    --band-fg: #ececed;
    --band-fg-2: #bcc2dc;
    --band-rule: #343d73;
    --band-accent: #a9b6ff;
  }
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #0f1012;
  --bg-2: #17181b;
  --fg: #ececed;
  --fg-2: #c9cacd;
  --muted: #9da0a6;
  --rule: #2e3035;
  --rule-strong: #ececed;
  --accent: #8da0ff;
  --accent-fg: #0f1012;
  --accent-wash: #1b2140;
  --ok: #7fd49b;
  --ko: #ff8a80;
  --bar: #252c52;
  --rule-wash: #2f386a;
  --band-bg: #1b2140;
  --band-fg: #ececed;
  --band-fg-2: #bcc2dc;
  --band-rule: #343d73;
  --band-accent: #a9b6ff;
}

/* Le Crible — page /benchmarks. Document statique servi hors de l'appli : cette feuille est précédée, au
   moment de l'écriture, des jetons de web/src/styles/tokens.css (couleurs clair/sombre, polices, échelle).
   Les règles d'en-tête, de navigation et de pied reprennent celles de web/src/styles/base.css (même rendu),
   le reste est propre à la page. Graphiques : SVG en ligne, couleurs par jetons. Filtre « poids » sans
   script : boutons radio et :has(). */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 var(--step-0) / 1.55 var(--font-sans);
  font-kerning: normal;
  font-variant-numeric: lining-nums;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3 { font-family: var(--font-serif); font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 var(--space-2); text-wrap: balance; }
p { margin: 0 0 var(--space-3); }
a { color: inherit; text-decoration-line: underline; text-decoration-thickness: 1px; text-decoration-color: var(--rule); text-underline-offset: 0.18em; }
a:hover { color: var(--accent); text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
ol, ul { margin: 0; padding: 0; list-style: none; }
dl, dd { margin: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; min-height: var(--target); z-index: 10; left: var(--gutter); top: -4rem; background: var(--fg); color: var(--bg); padding: var(--space-2) var(--space-3); font-weight: 600; }
.skip:focus { top: var(--space-2); }
.wrap { width: min(100% - 2 * var(--gutter), var(--page)); margin-inline: auto; }
.nw { white-space: nowrap; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- En-tête (comme base.css) */
.masthead-main { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: var(--space-3); padding-top: 0.25rem; }
.masthead-main > .brand { grid-column: 1; grid-row: 1; }
.masthead-date { grid-column: 2; grid-row: 1; justify-self: end; margin: 0; font-size: 0.875rem; color: var(--fg-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.masthead-main > .nav { grid-column: 1 / -1; grid-row: 2; }
.brand { display: inline-flex; align-items: center; gap: 0.2em; justify-self: start; min-height: var(--target); font: 700 1.75rem / 1 var(--font-sans); letter-spacing: -0.05em; text-decoration: none; color: var(--fg); }
.brand:hover { color: var(--fg); }
.brand .logo { width: 0.62em; height: 0.62em; flex: none; margin-right: 0.14em; }
.logo rect { fill: currentColor; }
.logo .logo-accent { fill: var(--accent); }
.nav ul { display: flex; gap: 0 1.25rem; overflow-x: auto; scrollbar-width: none; border-top: var(--bold-rule) solid var(--rule-strong); border-bottom: var(--hair) solid var(--rule); }
.nav ul::-webkit-scrollbar { display: none; }
.nav li { flex: none; }
.nav a { display: flex; align-items: center; position: relative; min-height: var(--target); min-width: var(--target); font: 600 var(--step--1) / 1 var(--font-sans); letter-spacing: 0.01em; text-decoration: none; }
.nav a[aria-current='page'] { color: var(--accent); }
.nav a[aria-current='page']::before { content: ''; position: absolute; left: 0; top: calc(-1 * var(--bold-rule)); width: 100%; height: var(--bold-rule); background: var(--accent); }
@media (max-width: 47.99rem) {
  /* Les cinq rubriques tiennent sur la ligne (comme base.css), Benchmarks comprise. */
  .nav ul { gap: 0; overflow: visible; justify-content: space-between; }
  .nav a { min-width: 0; }
}
@media (min-width: 48rem) {
  .brand { font-size: 2rem; }
  .nav ul { gap: 0 2rem; }
  .nav a { font-size: var(--step-0); }
}
@media (min-width: 64rem) {
  .masthead-main { grid-template-columns: auto minmax(0, 1fr) auto; column-gap: var(--space-5); padding-top: 0.35rem; border-bottom: var(--bold-rule) solid var(--rule-strong); }
  .masthead-main > .nav { grid-column: 2; grid-row: 1; align-self: stretch; }
  .masthead-date { grid-column: 3; }
  .nav ul { border: 0; height: 100%; gap: 0 1.75rem; }
  .nav a { height: 100%; }
  .nav a[aria-current='page']::before { top: auto; bottom: calc(-1 * var(--bold-rule)); }
}

/* ---------------------------------------------------------------- Ouverture */
.bm { padding-bottom: var(--space-5); }
.bm-head { padding-top: var(--space-3); margin-bottom: var(--space-2); }
.kicker { margin: 0 0 var(--space-1); font: 600 var(--step--1) / 1.3 var(--font-sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.bm-title { margin: 0 0 var(--space-2); font-size: var(--step-3); line-height: 1; letter-spacing: -0.025em; }
.bm-lede { margin: 0 0 var(--space-1); max-width: 48rem; font: 400 var(--step-0) / 1.45 var(--font-serif); color: var(--fg); text-wrap: pretty; }
@media (min-width: 48rem) { .bm-lede { font-size: var(--step-1); } }
.bm-note { max-width: 42rem; margin: 0; font-size: 1rem; line-height: 1.5; color: var(--fg-2); text-wrap: pretty; }

/* Date de chaque source, sur une ligne : ce qu'Artificial Analysis n'affiche pas. */
.bm-fresh { margin: 0; max-width: none; font-size: 0.875rem; line-height: 1.5; color: var(--fg-2); font-variant-numeric: tabular-nums; }
.bm-fresh strong { color: var(--fg); font-weight: 650; }
.bm-fresh .ko { color: var(--ko); font-weight: 650; }

/* Filtre poids ouverts / fermés : sans script. */
.bm-filter { position: sticky; top: 0; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-3); margin: 0 0 var(--space-3); padding: var(--space-2) 0; border: 0; border-bottom: var(--hair) solid var(--rule); background: var(--bg); }
.bm-filter legend { float: left; padding: 0; margin-right: var(--space-2); font: 600 0.8125rem / 1.3 var(--font-sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.bm-filter input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.bm-filter label { display: inline-flex; align-items: center; min-height: var(--target); padding: 0 0.15rem; font-weight: 600; font-size: var(--step--1); cursor: pointer; border-bottom: var(--bold-rule) solid transparent; }
.bm-filter input:checked + label { color: var(--accent); border-bottom-color: var(--accent); }
.bm-filter input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
.bm-filter .bm-count { margin-left: auto; font-size: 0.875rem; color: var(--fg-2); }

.bm:has(#w-o:checked) [data-w]:not([data-w='o']),
.bm:has(#w-f:checked) [data-w]:not([data-w='f']) { display: none; }
.bm [data-v]:not([data-v='a']) { display: none; }
.bm:has(#w-o:checked) [data-v='a'],
.bm:has(#w-f:checked) [data-v='a'] { display: none; }
.bm:has(#w-o:checked) [data-v='o'],
.bm:has(#w-f:checked) [data-v='f'] { display: revert; }
.bm:has(#w-o:checked) .bm-count-a, .bm:has(#w-f:checked) .bm-count-a,
.bm .bm-count-o, .bm .bm-count-f { display: none; }
.bm:has(#w-o:checked) .bm-count-o, .bm:has(#w-f:checked) .bm-count-f { display: inline; }

/* ---------------------------------------------------------------- L'essentiel (premier écran) */
.hero { display: grid; gap: var(--space-4) var(--col-gap); }
@media (min-width: 40rem) { .hero { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64rem) { .hero { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.hero-p { min-width: 0; padding-top: var(--space-2); border-top: var(--bold-rule) solid var(--rule-strong); }
.hero-t { margin: 0; font: 650 var(--step-1) / 1.2 var(--font-sans); letter-spacing: -0.01em; }
.hero-s { margin: 0.1rem 0 var(--space-2); font-size: 0.8125rem; line-height: 1.35; color: var(--muted); }
@media (min-width: 40rem) { .hero-s { min-height: 2.7em; } }
.hero-p[aria-labelledby='h-prix'] .hb { fill: var(--muted); }
.hero-p .bm-source { margin-top: var(--space-1); }
.hero-bars li { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 0.5rem; align-items: baseline; padding: 0.3rem 0 0.35rem; border-bottom: var(--hair) solid var(--rule); line-height: 1.25; }
.hero-bars .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.9375rem; font-weight: 600; }
.hero-bars .v { font: 700 1.0625rem / 1.2 var(--font-sans); font-variant-numeric: tabular-nums; }
.hero-bars .v a { text-decoration: none; }
.hero-bars .v a:hover { text-decoration: underline; }
.hero-bars svg { grid-column: 1 / -1; display: block; width: 100%; height: 10px; margin-top: 0.25rem; }
.hero-bars .hb { fill: var(--fg); }
.hero-bars .o .hb { fill: var(--accent); }
.hero-bars .wo, .tbl .wo { color: var(--accent); font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.04em; margin-left: 0.4em; }
.bm-hero > .bm-source { margin-top: var(--space-3); max-width: 60rem; }

/* ---------------------------------------------------------------- Sections */
.bm-section { margin-bottom: var(--space-5); }
@media (min-width: 48rem) { .bm-section { margin-bottom: var(--space-6); } }
.group-head { padding-top: var(--space-2); border-top: var(--bold-rule) solid var(--rule-strong); margin-bottom: var(--space-3); }
.group-head::before { content: ''; display: block; margin: 0 0 var(--space-2); border-top: var(--hair) solid var(--rule-strong); transform: translateY(-5px); }
.group-title { margin: 0; font: 600 var(--step-2) / 1.15 var(--font-serif); letter-spacing: -0.02em; }
.group-note { margin: var(--space-2) 0 0; max-width: 44rem; font: 400 var(--step-0) / 1.45 var(--font-serif); color: var(--fg-2); text-wrap: pretty; }
.bm-source { margin: var(--space-2) 0 0; font-size: 0.8125rem; line-height: 1.45; color: var(--muted); }
.bm-source a { color: var(--fg-2); }

/* ---------------------------------------------------------------- Graphiques SVG */
.chart { margin: 0; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; font-family: var(--font-sans); }
.chart-m { display: block; }
.chart-d { display: none; }
@media (min-width: 48rem) { .chart-m { display: none; } .chart-d { display: block; } }
.ax line, .ax path { stroke: var(--rule); stroke-width: 1; fill: none; }
.ax .ax-base { stroke: var(--rule-strong); }
.ax text { fill: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.ax .ax-title { fill: var(--fg-2); font-weight: 600; }
.ax .ax-better { fill: var(--accent); font-weight: 650; }
.pt circle { fill: var(--bg); stroke: var(--fg); stroke-width: 1.5; }
.pt[data-w='o'] circle { fill: var(--accent); stroke: var(--accent); }
.pt.on circle { stroke-width: 2.5; }
.lbl { fill: var(--fg); font-size: 12.5px; font-weight: 600; paint-order: stroke; stroke: var(--bg); stroke-width: 4px; stroke-linejoin: round; }
.chart-m .lbl { font-size: 11px; }
.lead { stroke: var(--fg-2); stroke-width: 1; }
.pareto { fill: none; stroke: var(--accent); stroke-width: 2; stroke-dasharray: 5 4; }
.zone { fill: var(--accent-wash); }
.zone-t { fill: var(--accent); font-size: 12px; font-weight: 650; }
.step-f { fill: none; stroke: var(--fg); stroke-width: 2; }
.step-o { fill: none; stroke: var(--accent); stroke-width: 2.5; }
.rec-f { fill: var(--fg); }
.rec-o { fill: var(--accent); }
.legend { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4); margin: var(--space-2) 0 0; font-size: 0.875rem; color: var(--fg-2); }
.legend span { display: inline-flex; align-items: center; gap: 0.45em; }
.key { display: inline-block; width: 0.8em; height: 0.8em; border-radius: 50%; border: 1.5px solid var(--fg); background: var(--bg); }
.key-o { background: var(--accent); border-color: var(--accent); }
.key-line { width: 1.4em; height: 0; border-radius: 0; border: 0; border-top: 2px dashed var(--accent); }
.key-step-f { width: 1.4em; height: 0; border-radius: 0; border: 0; border-top: 2px solid var(--fg); }
.key-step-o { width: 1.4em; height: 0; border-radius: 0; border: 0; border-top: 2.5px solid var(--accent); }
.frontier-list { margin-top: var(--space-3); font-size: 0.9375rem; color: var(--fg-2); }
.frontier-list strong { color: var(--fg); }

/* ---------------------------------------------------------------- Tableau dense */
/* Défilement signalé : ombre à droite tant qu'il reste des colonnes (couvercles « local » sur une ombre fixe). */
.tbl-wrap {
  overflow-x: auto; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter);
  background:
    linear-gradient(to left, var(--bg) 40%, transparent) right center / 2.5rem 100% no-repeat local,
    radial-gradient(farthest-side at 100% 50%, color-mix(in srgb, var(--fg) 22%, transparent), transparent) right center / 0.9rem 100% no-repeat scroll;
}
.tbl-hint { display: none; margin: 0 0 var(--space-2); font-size: 0.8125rem; font-weight: 600; color: var(--accent); }
.tbl { width: 100%; border-collapse: collapse; font-size: 0.9375rem; font-variant-numeric: tabular-nums; }
.tbl caption { text-align: left; font-size: 0.875rem; color: var(--fg-2); padding-bottom: var(--space-2); }
.tbl th, .tbl td { padding: 0.55rem 0.9rem 0.55rem 0; border-bottom: var(--hair) solid var(--rule); text-align: right; white-space: nowrap; vertical-align: baseline; }
.tbl th:first-child, .tbl td:first-child { text-align: left; position: sticky; left: 0; background: var(--bg); padding-left: 0; z-index: 1; box-shadow: inset -1px 0 0 var(--rule-strong); }
.tbl thead th { font: 600 0.8125rem / 1.25 var(--font-sans); color: var(--muted); border-bottom: var(--hair) solid var(--rule-strong); vertical-align: bottom; white-space: normal; min-width: 4.5rem; }
.tbl thead th:first-child { min-width: 9rem; }
.tbl .t-left { text-align: left; }
.tbl tbody th { font-weight: 650; }
.tbl td a { text-decoration-color: var(--rule); }
.tbl .ci { color: var(--muted); font-size: 0.8125rem; margin-left: 0.35em; }
@media (max-width: 47.99rem) {
  .tbl-hint { display: block; }
  .tbl { font-size: 0.875rem; }
  .tbl th, .tbl td { padding-right: 0.7rem; }
  .tbl thead th:first-child { min-width: 0; }
  .tbl tbody th { white-space: normal; width: 8.5rem; min-width: 8.5rem; max-width: 8.5rem; line-height: 1.25; }
  .tbl .ci { display: block; margin: 0.1rem 0 0; font-size: 0.75rem; }
}
.tbl .w-o { color: var(--accent); font-weight: 650; }
.tbl .none { color: var(--muted); }
.tbl tbody tr:hover th, .tbl tbody tr:hover td { background: var(--bg-2); }

/* ---------------------------------------------------------------- Classements */
.ranks { display: grid; gap: var(--space-5) var(--col-gap); }
@media (min-width: 48rem) { .ranks { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 75rem) { .ranks { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.rank-title { margin: 0; padding-top: var(--space-2); border-top: var(--bold-rule) solid var(--rule-strong); font: 650 var(--step-0) / 1.3 var(--font-sans); letter-spacing: -0.005em; }
.rank-meta { margin: 0.15rem 0 var(--space-2); font-size: 0.8125rem; color: var(--muted); }
.bars li { display: grid; grid-template-columns: 1.6rem minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 0.5rem; padding: 0.35rem 0 0.4rem; border-bottom: var(--hair) solid var(--rule); font-size: 0.9375rem; line-height: 1.3; }
.bars .r { grid-row: 1; color: var(--muted); font-variant-numeric: tabular-nums; font-size: 0.8125rem; align-self: baseline; }
.bars .n { grid-row: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bars .tr .n { font-weight: 650; }
.bars .v { grid-row: 1; font-variant-numeric: tabular-nums; font-weight: 650; }
.bars .v a { text-decoration-color: var(--rule); }
.bars svg { grid-column: 2 / 4; grid-row: 2; display: block; width: 100%; height: 6px; margin-top: 0.3rem; }
.bars .bar { fill: var(--bar); }
.bars .tr .bar { fill: var(--accent); }
.bars .wo { color: var(--accent); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; margin-left: 0.35em; }
.bars .cil { stroke: var(--fg-2); stroke-width: 1.5; }

/* ---------------------------------------------------------------- Évolution */
.evo { display: grid; gap: var(--space-5) var(--col-gap); }
@media (min-width: 64rem) { .evo { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); } }
.sm { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3) var(--space-3); }
@media (min-width: 48rem) { .sm { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.sm-item h4 { margin: 0; font: 650 0.875rem / 1.3 var(--font-sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sm-item p { margin: 0; font-size: 0.8125rem; color: var(--fg-2); font-variant-numeric: tabular-nums; }
.sm-item svg { display: block; width: 100%; height: auto; margin-top: 0.25rem; }
.sm-line { fill: none; stroke: var(--fg); stroke-width: 1.75; }
.sm-item[data-w='o'] .sm-line { stroke: var(--accent); }
.sm-band { fill: var(--bar); }
.sm-grid { stroke: var(--rule); stroke-width: 1; }
.changes li { padding: 0.4rem 0; border-bottom: var(--hair) solid var(--rule); font-size: 0.9375rem; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- Méthode et sources */
.srcs { display: grid; gap: var(--space-4) var(--col-gap); }
@media (min-width: 48rem) { .srcs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.src { padding-top: var(--space-2); border-top: var(--bold-rule) solid var(--rule-strong); font-size: 0.9375rem; }
.src h3 { margin: 0 0 var(--space-1); font: 650 var(--step-0) / 1.3 var(--font-sans); }
.src p { margin: 0 0 var(--space-2); color: var(--fg-2); }
.src dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0.25rem var(--space-3); font-size: 0.875rem; }
.src dt { color: var(--muted); font-weight: 600; }
.src dd { overflow-wrap: anywhere; }
.method { max-width: 46rem; }
.method h3 { margin: var(--space-4) 0 var(--space-2); font: 650 var(--step-0) / 1.3 var(--font-sans); }
.method p, .method li { font: 400 var(--step-0) / 1.5 var(--font-serif); color: var(--fg-2); }
.method ul { list-style: disc; padding-left: 1.2em; }
.method li { margin-bottom: var(--space-1); }
.excl li { padding: 0.5rem 0; border-bottom: var(--hair) solid var(--rule); font-size: 0.9375rem; color: var(--fg-2); }
.excl strong { color: var(--fg); }
details.map { margin-top: var(--space-3); }
details.map summary { cursor: pointer; min-height: var(--target); display: flex; align-items: center; font-weight: 650; }

/* ---------------------------------------------------------------- Pied */
.footer { border-top: var(--bold-rule) solid var(--rule-strong); font-size: var(--step--1); color: var(--fg-2); }
.footer-grid { display: grid; gap: var(--space-3); padding-top: var(--space-4); padding-bottom: var(--space-4); }
.footer-name { display: flex; align-items: center; gap: 0.4em; margin-bottom: var(--space-2); font: 700 1.625rem / 1 var(--font-sans); letter-spacing: -0.045em; color: var(--fg); }
.footer-name .logo { width: 0.62em; height: 0.62em; }
.footer-brand p:last-child { max-width: 30rem; margin: 0; }
.footer-links a { display: flex; align-items: center; min-height: var(--target); text-decoration: none; font-weight: 600; color: var(--fg); }
.footer-links a:hover { color: var(--accent); }
@media (min-width: 48rem) {
  .footer-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); padding-top: var(--space-5); }
  .footer-brand { grid-column: 1 / span 7; }
  .footer-links { grid-column: 9 / span 4; }
}

/* Bascule de thème (comme base.css) ; masquée tant que le script n'est pas chargé. */
.theme-toggle { grid-column: 3; grid-row: 1; display: inline-flex; align-items: center; gap: 0.45em; min-height: var(--target); min-width: var(--target); justify-content: flex-end; padding: 0; font: 600 var(--step--1) / 1 var(--font-sans); color: var(--fg); background: none; border: 0; cursor: pointer; }
.theme-toggle[hidden] { display: none; }
.theme-toggle:hover { color: var(--accent); }
.theme-to-light { display: none; }
:root[data-theme='dark'] .theme-to-light { display: inline; }
:root[data-theme='dark'] .theme-to-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .theme-to-light { display: inline; }
  :root:not([data-theme='light']) .theme-to-dark { display: none; }
}
.masthead-main { grid-template-columns: auto minmax(0, 1fr) auto; }
@media (min-width: 64rem) {
  .masthead-main { grid-template-columns: auto minmax(0, 1fr) auto auto; }
  .theme-toggle { grid-column: 4; }
}
.bars .track { stroke: var(--rule); stroke-width: 1; vector-effect: non-scaling-stroke; }
.bars .dot { fill: var(--fg-2); }
.bars .tr .dot { fill: var(--accent); }
.bars .cil { vector-effect: non-scaling-stroke; }

/* ---------------------------------------------------------------- Tour 3 : explications, filtres, fiches */
.bm-how { margin: var(--space-2) 0 0; font-size: 0.9375rem; font-weight: 600; }
.bm-how a { text-decoration-color: var(--accent); }
.bm-warn { margin: var(--space-2) 0; padding: var(--space-2) var(--space-3); border-left: var(--bold-rule) solid var(--accent); background: var(--accent-wash); font-size: 0.875rem; line-height: 1.45; color: var(--fg); }
.hero-bars .hs { display: block; font-size: 0.75rem; font-weight: 400; color: var(--muted); }
.hero-bars .n a, .bars .n a { text-decoration: none; }
.hero-bars .n a:hover, .bars .n a:hover { text-decoration: underline; }

/* Explications des benchmarks */
.xps { display: grid; gap: var(--space-4) var(--col-gap); }
@media (min-width: 48rem) { .xps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.xp { padding-top: var(--space-2); border-top: var(--bold-rule) solid var(--rule-strong); scroll-margin-top: 4.5rem; }
.xp:target { border-top-color: var(--accent); }
.xp h3 { margin: 0; font: 650 var(--step-1) / 1.2 var(--font-sans); letter-spacing: -0.01em; }
.xp summary { list-style: none; cursor: pointer; }
.xp summary::-webkit-details-marker { display: none; }
.xp summary::after { content: 'Lire la suite +'; display: flex; align-items: center; min-height: var(--target); font: 650 0.875rem / 1 var(--font-sans); color: var(--accent); }
.xp[open] summary::after { content: 'Refermer −'; }
.xp-what { display: block; margin: 0; font: 400 var(--step-0) / 1.5 var(--font-serif); color: var(--fg); text-wrap: pretty; }
.xp-task { display: block; margin: 0.15rem 0 var(--space-2); font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent); }
.xp dl { display: grid; gap: 0.15rem 0; }
.xp dt { margin-top: var(--space-2); font: 650 0.8125rem / 1.3 var(--font-sans); color: var(--muted); }
.xp dt:first-child { margin-top: 0; }
.xp dd { font: 400 var(--step-0) / 1.5 var(--font-serif); color: var(--fg); text-wrap: pretty; }
.xp dd:last-child { font: 400 0.875rem / 1.45 var(--font-sans); color: var(--fg-2); }

/* Filtres du tableau (script de la page ; caché sans script) */
.bm-tf { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-2) var(--space-3); margin: 0 0 var(--space-3); }
.bm-tf[hidden] { display: none; }
.bm-tf label { display: grid; gap: 0.2rem; font: 600 0.8125rem / 1.3 var(--font-sans); color: var(--muted); }
.bm-tf select { min-height: var(--target); max-width: 15rem; padding: 0 0.5rem; font: 500 0.9375rem / 1.2 var(--font-sans); color: var(--fg); background: var(--bg); border: var(--hair) solid var(--rule-strong); border-radius: 0; }
.bm-tf select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.bm-tf-n { margin-left: auto; align-self: center; font-size: 0.875rem; color: var(--fg-2); }
.tbl thead th a { color: inherit; text-decoration-color: var(--rule); }
.tbl thead th.sorted { color: var(--accent); }
.tbl thead th.sorted::after { content: ' ↓'; }
.tbl-all tbody th a { text-decoration: none; }
.tbl-all tbody th a:hover { text-decoration: underline; }
.tbl tr[hidden] { display: none; }

/* Fiche modèle */
.crumbs { padding-top: var(--space-3); font-size: 0.875rem; color: var(--fg-2); }
.crumbs a { text-decoration-color: var(--rule); }
.fiche .bm-head { padding-top: var(--space-2); }
.fiche .w-o { color: var(--accent); font-weight: 650; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3) var(--col-gap); margin: var(--space-3) 0 var(--space-5); }
@media (min-width: 48rem) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tile { padding-top: var(--space-2); border-top: var(--bold-rule) solid var(--rule-strong); }
.tile p { margin: 0; }
.tile-k { font: 600 0.8125rem / 1.3 var(--font-sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.tile-v { font: 700 var(--step-2) / 1.15 var(--font-sans); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.tile-v a { text-decoration: none; }
.tile-v a:hover { text-decoration: underline; }
.tile-s { font-size: 0.875rem; color: var(--fg-2); }
.tbl-fiche th, .tbl-fiche td { white-space: normal; }
.tbl-fiche tbody th { min-width: 10rem; }
.tbl-fiche .big { font-size: 1.0625rem; font-weight: 650; white-space: nowrap; }
.tbl-fiche .nope th, .tbl-fiche .nope td { color: var(--muted); }
.tbl-fiche .ref th, .tbl-fiche .ref td { background: var(--bg-2); }
.tbl-fiche code, .tools code { font: 500 0.8125rem / 1.4 ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }
.xp-mini { display: block; font-size: 0.75rem; font-weight: 500; color: var(--muted); }
.tag { margin-left: 0.4em; padding: 0 0.3em; font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent); border: var(--hair) solid var(--accent); }
.facts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.2rem var(--space-3); max-width: 52rem; margin-bottom: var(--space-4); }
@media (min-width: 48rem) { .facts { grid-template-columns: 11rem minmax(0, 1fr); } }
.facts dt { font: 650 0.875rem / 1.5 var(--font-sans); color: var(--muted); }
.facts dd { margin-bottom: var(--space-2); font-size: 0.9375rem; overflow-wrap: anywhere; }
.tools { max-width: 52rem; }
.tools li { padding: 0.55rem 0; border-bottom: var(--hair) solid var(--rule); font-size: 0.9375rem; }
.tools code { padding: 0.05rem 0.3rem; background: var(--bg-2); }
.chart-s svg { max-width: 40rem; }
.chart-s .sm-line { stroke-width: 2; }
.xp-refs a { display: inline-flex; align-items: center; min-height: var(--target); margin-right: 0.9em; }
.frontier-list a { display: inline-block; padding-block: 0.15rem; }
