/* Observatoire des données publiques — feuille de style commune à toutes les pages.
   Jetons (couleurs, polices, espacements), mise en page à filets, composants de graphiques. */
  /* ───────── Tokens ───────── */
  :root {
    color-scheme: light;
    --paper: #edefec;
    --sheet: #fafbf9;
    --ink: #121417;
    --ink-2: #4c5157;
    --ink-3: #676b70;
    --hair: #c9cdc8;
    --s1: #256bbf;
    --s2: #e95a21;
    --s3: #189b6c;
    --s4: #b77d00;
    --s5: #3b3f44;
    --s6: #848984;
    --s7: #4a3aa7;
    --s8: #c9cdc8;
    /* Alias du module carburants */
    --c-brut: var(--s1); --c-raff: var(--s2); --c-dist: var(--s3);
    --c-cee: var(--s4); --c-ticpe: var(--s5); --c-tva: var(--s6);
    --on-dark: #fafbf9;
    --on-light: #121417;
    --hatch: rgba(18,20,23,0.55);
    --est: rgba(255,255,255,0.32);

    --f-display: "Big Shoulders Display", "Arial Narrow", sans-serif;
    --f-body: "Public Sans", system-ui, sans-serif;
    --f-mono: "IBM Plex Mono", ui-monospace, monospace;

    --gutter: clamp(16px, 4vw, 56px);
    --gap: clamp(20px, 3vw, 40px);
    --section-y: clamp(40px, 7vw, 96px);
    --max: 1320px;
  }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      color-scheme: dark;
      --paper: #0f1113;
      --sheet: #16191c;
      --ink: #eceeea;
      --ink-2: #b4b9b6;
      --ink-3: #7c8280;
      --hair: #2e3337;
      --s1: #3987e5;
      --s2: #d95926;
      --s3: #199e70;
      --s4: #c98500;
      --s5: #c3c7c3;
      --s6: #6c716f;
      --s7: #9085e9;
      --s8: #3e4347;
      --hatch: rgba(236,238,234,0.6);
      --est: rgba(255,255,255,0.22);
    }
  }
  :root[data-theme="dark"] {
    color-scheme: dark;
    --paper: #0f1113;
    --sheet: #16191c;
    --ink: #eceeea;
    --ink-2: #b4b9b6;
    --ink-3: #7c8280;
    --hair: #2e3337;
    --s1: #3987e5;
    --s2: #d95926;
    --s3: #199e70;
    --s4: #c98500;
    --s5: #c3c7c3;
    --s6: #6c716f;
    --s7: #9085e9;
    --s8: #3e4347;
    --hatch: rgba(236,238,234,0.6);
    --est: rgba(255,255,255,0.22);
  }

  /* ───────── Base ───────── */
  *, *::before, *::after { box-sizing: border-box; border-radius: 0 !important; }
  html { -webkit-text-size-adjust: 100%; }
  body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font: 400 clamp(15px, 0.35vw + 14px, 17px)/1.6 var(--f-body);
  }
  a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
  a:hover { text-decoration-thickness: 2px; }
  :focus-visible { outline: 2px solid var(--s1); outline-offset: 2px; }
  .wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
  .mono { font-family: var(--f-mono); }
  .eyebrow {
    font: 500 0.72rem/1.3 var(--f-mono);
    letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2);
  }

  /* ───────── En-tête du site ───────── */
  /* L'en-tête (et son menu déroulant) passe au-dessus du sommaire collant et des titres de section collants */
  .masthead { border-bottom: 1px solid var(--ink); background: var(--paper); position: relative; z-index: 60; }
  .masthead .wrap {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: 8px 32px; padding-block: 12px;
  }
  .brand {
    font: 800 1.35rem/1 var(--f-display); letter-spacing: 0.02em; text-transform: uppercase;
    text-decoration: none;
  }
  .brand span { font-weight: 600; color: var(--ink-3); }
  /* Navigation par familles de thèmes : une ligne à droite du titre, panneau déroulant en colonnes */
  .masthead > .wrap { position: relative; }
  /* Panneau du menu (grand écran) : fond sur toute la largeur de l'écran, contenu aligné sur la largeur du site.
     Le panneau part du bord gauche de l'écran ; ses marges intérieures le ramènent sur les bords du conteneur. */
  body { overflow-x: clip; }
  .nav { display: flex; align-items: center; gap: 2px; margin-left: auto; font: 500 0.74rem/1 var(--f-mono); text-transform: uppercase; letter-spacing: 0.06em; }
  .nav > * { margin: 0; }
  .nav details { position: static; display: block; }
  .nav summary, .nav .nav-lien { list-style: none; cursor: pointer; color: var(--ink-2); padding: 10px 12px; text-decoration: none; display: flex; align-items: center; gap: 7px; white-space: nowrap; }
  .nav summary::-webkit-details-marker { display: none; }
  .nav summary::after { content: ""; width: 5px; height: 5px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .15s; }
  .nav details[open] summary::after { transform: translateY(1px) rotate(-135deg); }
  .nav summary:hover, .nav .nav-lien:hover, .nav details[open] summary { color: var(--ink); }
  .nav details[data-courant] summary, .nav .nav-lien[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink); }
  .nav .panneau { position: absolute; top: calc(100% - 6px); left: 0; right: 0; z-index: 30; background: var(--sheet); border-top: 2px solid var(--ink);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18); display: grid; grid-template-columns: repeat(var(--colonnes, 1), minmax(0, 1fr)); gap: 0 clamp(20px, 3vw, 48px);
    padding: 24px clamp(20px, 3vw, 40px) 28px; text-transform: none; letter-spacing: 0; }
  .nav .groupe { display: grid; align-content: start; gap: 2px; }
  .nav .groupe-titre { margin: 0 0 8px; padding-bottom: 8px; border-bottom: 1px solid var(--hair); font: 500 0.7rem/1 var(--f-mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); }
  .nav .groupe > a, .nav .groupe > .a-venir { display: grid; gap: 3px; padding: 9px 0; text-decoration: none; color: var(--ink); }
  .nav .panneau b { font: 650 0.95rem/1.25 var(--f-body); }
  .nav .panneau span { font: 400 0.8rem/1.35 var(--f-body); color: var(--ink-3); }
  .nav .panneau a:hover b, .nav .panneau a:focus-visible b { text-decoration: underline; text-underline-offset: 3px; }
  .nav .panneau a[aria-current="page"] b { box-shadow: inset 0 -2px 0 var(--s1); }
  .nav .panneau a.sous { padding: 0 0 9px; margin-top: -4px; }
  .nav .panneau a.sous b { font: 500 0.8rem/1.2 var(--f-mono); color: var(--ink-2); }
  .nav .panneau a.sous b::before { content: "→ "; }
  .nav .panneau .a-venir b { color: var(--ink-3); }
  .nav .panneau .vue-famille { grid-column: 1 / -1; justify-self: start; margin-bottom: 14px; font: 500 0.74rem/1 var(--f-mono); text-transform: uppercase;
    letter-spacing: 0.06em; color: var(--ink); text-decoration: none; border-bottom: 2px solid var(--s1); padding-bottom: 4px; }
  .nav .panneau .vue-famille:hover { color: var(--s1); }
  .menu-bouton { display: none; font: 500 0.76rem/1 var(--f-mono); text-transform: uppercase; letter-spacing: 0.06em;
    background: transparent; color: var(--ink); border: 1px solid var(--ink); padding: 9px 12px; cursor: pointer; }
  .fil { border-top: 1px solid var(--hair); font: 400 0.72rem/1.4 var(--f-mono); color: var(--ink-3); }
  .fil .wrap { display: block; padding-block: 7px; }
  .fil a { color: var(--ink-2); text-decoration: none; }
  .fil a:hover { text-decoration: underline; }
  .fil [aria-current] { color: var(--ink); }
  /* Écrans moyens : le sous-titre du site laisse la place au menu, sur une seule ligne */
  @media (max-width: 440px) { .masthead > .wrap > .brand span { display: none; } }
  /* Éléments propres au menu plein écran du téléphone */
  .nav-tete, .nav-pied { display: none; }
  .menu-bouton::before { content: ""; width: 16px; height: 9px; border-block: 2px solid currentColor; box-sizing: border-box; }
  /* Téléphone : menu plein écran qui glisse depuis la droite ; fond sur toute la largeur, contenu aligné sur les marges du site */
  @media (max-width: 760px) {
    .menu-bouton { display: inline-flex; align-items: center; gap: 9px; }
    .nav { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: stretch; gap: 0; margin: 0;
      padding: 0 var(--gutter) calc(28px + env(safe-area-inset-bottom)); background: var(--paper); overflow-y: auto; overscroll-behavior: contain;
      transform: translateX(100%); visibility: hidden; transition: transform .28s cubic-bezier(.2, .7, .2, 1), visibility 0s linear .28s; }
    .nav.ouvert { transform: none; visibility: visible; transition: transform .28s cubic-bezier(.2, .7, .2, 1); }
    .nav-tete { display: flex; align-items: center; justify-content: space-between; gap: 16px; position: sticky; top: 0; z-index: 1;
      padding: 12px 0; margin-bottom: 6px; background: var(--paper); border-bottom: 2px solid var(--ink); }
    .nav-tete .brand { font-size: 1.15rem; }
    .menu-fermer { display: inline-flex; align-items: center; gap: 9px; font: 500 0.76rem/1 var(--f-mono); text-transform: uppercase; letter-spacing: 0.06em;
      background: var(--ink); color: var(--paper); border: 1px solid var(--ink); padding: 9px 12px; cursor: pointer; }
    .menu-fermer::before { content: "×"; font: 400 1.1rem/0.6 var(--f-body); }
    .nav summary { font: 800 clamp(1.7rem, 8vw, 2.3rem)/1 var(--f-display); text-transform: uppercase; letter-spacing: 0.01em; color: var(--ink);
      padding: 20px 0 16px; border-bottom: 1px solid var(--hair); justify-content: space-between; width: 100%; box-shadow: none !important; }
    .nav summary::after { width: 9px; height: 9px; border-width: 2px; }
    .nav details[data-courant] summary { box-shadow: inset 4px 0 0 var(--s1) !important; padding-left: 14px; }
    .nav .panneau { position: static; grid-template-columns: 1fr; gap: 20px; padding: 16px 0 24px; background: transparent; border-top: 0;
      border-bottom: 1px solid var(--ink); box-shadow: none; }
    .nav .groupe > a, .nav .groupe > .a-venir { padding: 10px 0; }
    .nav .panneau b { font-size: 1.05rem; }
    .nav .nav-lien { font: 500 0.82rem/1 var(--f-mono); padding: 18px 0; border-bottom: 1px solid var(--hair); justify-content: space-between; width: 100%; box-shadow: none !important; color: var(--ink); }
    .nav .nav-lien::after { content: "→"; }
    .nav .nav-lien[aria-current="page"] { font-weight: 700; }
    .nav-pied { display: block; margin-top: auto; padding-top: 28px; font: 400 0.72rem/1.5 var(--f-mono); color: var(--ink-3); text-transform: none; letter-spacing: 0; }
    html.menu-ouvert { overflow: hidden; }
  }
  @media (max-width: 760px) and (prefers-reduced-motion: reduce) { .nav, .nav.ouvert { transition: none; } }

  .draft {
    border-bottom: 1px solid var(--hair);
    font: 400 0.78rem/1.5 var(--f-mono); color: var(--ink-2);
  }
  .draft .wrap { padding-block: 8px; }
  .draft strong { color: var(--ink); font-weight: 500; }

  /* ───────── Ouverture ───────── */
  .hero { padding-block: clamp(24px, 4vw, 56px) 0; }
  .hero h1 {
    font: 800 clamp(2rem, 4.4vw, 3.8rem)/1.05 var(--f-display);
    text-transform: uppercase; letter-spacing: 0.005em;
    margin: 14px 0 0; max-width: 24ch;
  }
  .hero .lede { max-width: 62ch; color: var(--ink-2); margin: 20px 0 0; }

  .switch { display: inline-flex; border: 1px solid var(--ink); margin-top: 28px; }
  .switch button {
    font: 500 0.8rem/1 var(--f-mono); letter-spacing: 0.06em; text-transform: uppercase;
    background: transparent; color: var(--ink); border: 0; padding: 12px 18px; cursor: pointer;
  }
  .switch button + button { border-left: 1px solid var(--ink); }
  .switch button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

  /* Totem des prix : rappel des panneaux de station */
  .totem {
    display: grid; grid-template-columns: 1fr 1fr;
    border-top: 2px solid var(--ink); border-bottom: 1px solid var(--ink);
    margin-top: clamp(28px, 4vw, 48px);
  }
  .totem > div { padding: clamp(16px, 2.4vw, 28px) 0; }
  .totem > div + div { border-left: 1px solid var(--ink); padding-left: clamp(16px, 2.4vw, 32px); }
  .totem .price {
    font: 800 clamp(3.6rem, 13vw, 10.5rem)/1 var(--f-display);
    font-variant-numeric: tabular-nums; letter-spacing: -0.01em;
    margin-top: 12px; display: flex; align-items: flex-start; gap: 0.08em;
  }
  /* Unité : lisible à côté du chiffre (le « % » seul est plus grand) */
  .totem .price small { font: 800 0.4em/1 var(--f-display); margin-top: 0.14em; color: var(--ink); text-transform: uppercase; letter-spacing: 0.01em; }
  .totem .price small.pct { font-size: 0.62em; margin-top: 0.05em; }
  .totem > div > .eyebrow { font-size: 0.78rem; color: var(--ink); font-weight: 600; }
  /* Légende du chiffre : indispensable pour le comprendre, donc en texte courant et contrasté */
  .totem .meta { font: 500 clamp(0.95rem, 1.2vw, 1.08rem)/1.45 var(--f-body); color: var(--ink); margin-top: 14px; max-width: 46ch;
    padding-left: 12px; border-left: 3px solid var(--s1); }

  /* ───────── Sections ───────── */
  .section { padding-block: var(--section-y) 0; }
  .section-grid {
    display: grid; gap: var(--gap);
    grid-template-columns: minmax(0, 1fr);
    border-top: 1px solid var(--ink); padding-top: 18px;
  }
  @media (min-width: 900px) {
    .section-grid { grid-template-columns: minmax(200px, 3fr) minmax(0, 9fr); }
  }
  .section h2 {
    font: 800 clamp(1.45rem, 2.2vw, 2.05rem)/1.15 var(--f-display);
    text-transform: uppercase; margin: 10px 0 12px; letter-spacing: 0.01em;
  }
  .section .aside p { color: var(--ink-2); font-size: 0.92rem; margin: 0 0 10px; max-width: 42ch; }

  /* Éléments clés : grille à filets */
  .keys {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    border-top: 1px solid var(--hair); border-left: 1px solid var(--hair);
  }
  .key { border-right: 1px solid var(--hair); border-bottom: 1px solid var(--hair); padding: 16px 18px 18px; }
  .key .k-label { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--ink-2); }
  .key .k-values {
    font: 700 clamp(1.5rem, 2.2vw, 2rem)/1.05 var(--f-display);
    font-variant-numeric: tabular-nums; margin-top: 10px;
  }
  .key .k-values .arrow { color: var(--ink-3); font-weight: 600; padding-inline: 0.2em; }
  .key .k-delta { font: 400 0.78rem/1.3 var(--f-mono); color: var(--ink-2); margin-top: 6px; }
  .sw { display: inline-block; width: 10px; height: 10px; flex: none; }

  /* Légende */
  .legend { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 0.82rem; color: var(--ink-2); margin-bottom: 28px; }
  .legend span { display: inline-flex; align-items: center; gap: 7px; }
  .legend .group { font: 500 0.7rem/1 var(--f-mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); width: 100%; margin-top: 4px; }
  .hatch { background-image: repeating-linear-gradient(45deg, var(--hatch) 0 1px, transparent 1px 5px); }

  /* Le litre : barres cotées */
  .litre { margin-bottom: 40px; }
  .litre-head {
    display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
    border-bottom: 1px solid var(--hair); padding-bottom: 6px; margin-bottom: 30px;
  }
  .litre-head .period { font: 700 1.05rem/1.2 var(--f-body); }
  .litre-head .total { font: 500 0.85rem/1 var(--f-mono); }
  .plot { position: relative; }
  .cotes { position: relative; height: 22px; }
  .cote {
    position: absolute; bottom: 0; height: 9px;
    border-left: 1px solid var(--ink-2); border-right: 1px solid var(--ink-2);
  }
  .cote::after { content: ""; position: absolute; left: 0; right: 0; top: 4px; border-top: 1px solid var(--ink-2); }
  .cote span {
    position: absolute; left: 50%; bottom: 11px; transform: translateX(-50%);
    font: 500 0.72rem/1 var(--f-mono); white-space: nowrap; color: var(--ink);
    background: var(--paper); padding-inline: 3px;
  }
  .track { position: relative; height: clamp(44px, 5vw, 60px); margin-top: 4px; }
  .gridline { position: absolute; top: -6px; bottom: -6px; width: 0; border-left: 1px dashed var(--hair); }
  .segment {
    position: absolute; top: 0; height: 100%;
    box-shadow: inset -2px 0 0 var(--paper);
    transform-origin: left center;
    animation: flow 520ms cubic-bezier(.2,.7,.2,1) both;
    cursor: default;
  }
  .segment.est { background-image: repeating-linear-gradient(135deg, var(--est) 0 1.5px, transparent 1.5px 6px); }
  @keyframes flow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
  .remise {
    position: absolute; top: -8px; height: calc(100% + 16px);
    border: 1px dashed var(--ink); background-color: transparent;
    animation: fade 400ms 700ms both;
  }
  .pump {
    position: absolute; top: -14px; bottom: -14px; width: 0; border-left: 2px solid var(--ink);
    animation: fade 300ms 650ms both;
  }
  .pump span {
    position: absolute; top: -18px; left: 6px; white-space: nowrap;
    font: 500 0.72rem/1 var(--f-mono);
  }
  @keyframes fade { from { opacity: 0; } to { opacity: 1; } }
  .axis { position: relative; height: 26px; margin-top: 16px; border-top: 1px solid var(--ink); }
  .axis span {
    position: absolute; top: 0; transform: translateX(-50%);
    font: 400 0.7rem/1 var(--f-mono); color: var(--ink-3); padding-top: 7px;
  }
  .axis span::before { content: ""; position: absolute; left: 50%; top: -1px; height: 5px; border-left: 1px solid var(--ink); }
  .axis span:first-child { transform: none; }
  .axis span:first-child::before { left: 0; }
  .note { font-size: 0.82rem; color: var(--ink-2); margin-top: 12px; max-width: 70ch; }

  /* Distribution décomposée */
  .dist-grid { display: grid; gap: var(--gap); grid-template-columns: minmax(0, 1fr); }
  @media (min-width: 1240px) { .dist-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } }
  .zoom { border-top: 2px solid var(--ink); padding-top: 14px; }
  .zoom-row { margin-bottom: 22px; }
  .zoom-row .lab { display: flex; justify-content: space-between; font-size: 0.88rem; margin-bottom: 8px; }
  .zoom-row .lab b { font-weight: 700; }
  .zoom-row .lab .mono { font-size: 0.8rem; }
  .zoom-bar { position: relative; height: 34px; border-left: 1px solid var(--ink); }
  .zoom-bar .segment { animation-duration: 600ms; }
  .zoom-scale { display: flex; justify-content: space-between; font: 400 0.7rem/1 var(--f-mono); color: var(--ink-3); border-top: 1px solid var(--ink); padding-top: 6px; }

  .ranges { border-top: 2px solid var(--ink); }
  .range-row {
    display: grid; grid-template-columns: minmax(120px, 1.1fr) minmax(0, 1.6fr) 64px;
    gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--hair);
  }
  .range-row .who { display: block; font-size: 0.75rem; color: var(--ink-3); margin-top: 2px; }
  .range-row .name { font-size: 0.9rem; }
  .range-track { position: relative; height: 14px; }
  .range-track .base { position: absolute; top: 0; height: 100%; }
  .range-track .span { position: absolute; top: 0; height: 100%; }
  .range-row .val { font: 500 0.78rem/1 var(--f-mono); text-align: right; white-space: nowrap; }
  .range-row.head { font: 500 0.7rem/1 var(--f-mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); padding: 10px 0; }
  .range-row.sum { border-bottom: 1px solid var(--ink); font-weight: 700; }
  .range-key { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 0.78rem; color: var(--ink-2); margin-top: 12px; }
  .range-key span { display: inline-flex; align-items: center; gap: 6px; }
  .empty-detail { border-top: 2px solid var(--ink); padding-top: 14px; color: var(--ink-2); font-size: 0.92rem; }

  /* Écarts */
  .deltas { border-top: 2px solid var(--ink); }
  .delta-row {
    display: grid; grid-template-columns: minmax(130px, 2.4fr) minmax(0, 7fr);
    gap: 16px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--hair);
  }
  .delta-row .name { font-size: 0.9rem; }
  .delta-row .name small { display: block; font-size: 0.75rem; color: var(--ink-3); }
  .delta-track { position: relative; height: 22px; margin-right: 4.5em; }
  .delta-track .zero { position: absolute; top: -10px; bottom: -10px; border-left: 1px solid var(--ink); }
  .delta-track .bar { position: absolute; top: 3px; height: 16px; transform-origin: left center; animation: flow 500ms cubic-bezier(.2,.7,.2,1) both; }
  .delta-track .bar.neg { transform-origin: right center; }
  .delta-track .v { position: absolute; top: 3px; font: 500 0.78rem/16px var(--f-mono); white-space: nowrap; }
  .delta-row.total { border-bottom: 1px solid var(--ink); }
  .delta-row.total .name { font-weight: 700; }
  .delta-row.total .sum { font: 700 clamp(1.4rem, 2vw, 1.8rem)/1 var(--f-display); }

  details { margin-top: 24px; border-top: 1px solid var(--hair); }
  details summary { cursor: pointer; font: 500 0.78rem/1 var(--f-mono); text-transform: uppercase; letter-spacing: 0.06em; padding: 14px 0; }
  .table-wrap { overflow-x: auto; }
  table { border-collapse: collapse; width: 100%; font-size: 0.88rem; }
  th, td { text-align: right; padding: 8px 10px; border-bottom: 1px solid var(--hair); white-space: nowrap; font-family: var(--f-mono); font-size: 0.82rem; }
  th:first-child, td:first-child { text-align: left; white-space: normal; font-family: var(--f-body); font-size: 0.88rem; }
  thead th { border-bottom: 1px solid var(--ink); color: var(--ink-2); font-weight: 500; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; }
  tr.sub td:first-child { padding-left: 26px; color: var(--ink-2); }
  tr.total td { font-weight: 700; border-bottom: 1px solid var(--ink); }
  .est-mark { color: var(--ink-3); }

  /* Listes à filets */
  .ruled { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
  .ruled li { padding: 14px 0; border-bottom: 1px solid var(--hair); max-width: 78ch; }
  .ruled li b { font-weight: 700; }
  .ruled.cols { columns: 2 300px; column-gap: var(--gap); border-top: 0; }
  .ruled.cols li { break-inside: avoid; border-top: 1px solid var(--hair); border-bottom: 0; }
  .src-type {
    display: inline-block; min-width: 92px;
    font: 500 0.68rem/1 var(--f-mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3);
  }
  .formula {
    font: 500 clamp(0.8rem, 1.2vw, 0.95rem)/1.6 var(--f-mono);
    border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink);
    padding: 14px 0; margin: 0 0 18px; overflow-x: auto; white-space: nowrap;
  }

  /* Pied de page */
  .footer { margin-top: var(--section-y); border-top: 2px solid var(--ink); }
  .footer .mention-ia { flex-basis: 100%; order: 3; color: var(--ink-3); }
  .footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-block: 18px 40px; font: 400 0.75rem/1.5 var(--f-mono); color: var(--ink-2); }

  /* Infobulle */
  .tooltip {
    position: fixed; z-index: 20; pointer-events: none;
    background: var(--ink); color: var(--paper);
    font: 400 0.8rem/1.45 var(--f-body);
    padding: 9px 11px; max-width: 280px;
    opacity: 0; transition: opacity 0.1s;
  }
  .tooltip.show { opacity: 1; }
  .tooltip b { font-weight: 700; }

  .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

  @media (max-width: 560px) {
    .totem { grid-template-columns: 1fr; }
    .totem > div + div { border-left: 0; border-top: 1px solid var(--ink); padding-left: 0; }
    .range-row { grid-template-columns: minmax(0, 1fr) 58px; }
    .range-row .range-track { grid-column: 1 / -1; grid-row: 2; }
    .range-row.head .range-track { display: none; }
  }
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
  }

/* ───────── Histogramme dans le temps ───────── */
.colonnes { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
  gap: clamp(2px, 0.6vw, 8px); align-items: end; height: clamp(220px, 32vw, 340px);
  border-bottom: 1px solid var(--ink); margin-top: 28px; }
.colonnes .grid-h { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--hair); pointer-events: none; }
.colonnes .grid-h span { position: absolute; right: 0; top: -16px; font: 400 0.68rem/1 var(--f-mono); color: var(--ink-3); background: var(--paper); padding-left: 4px; }
.colonne { position: relative; height: 100%; display: flex; flex-direction: column-reverse; }
.colonne .part { width: 100%; box-shadow: inset 0 2px 0 var(--paper); transform-origin: bottom;
  animation: monte 520ms cubic-bezier(.2,.7,.2,1) both; }
.colonne .part.est { background-image: repeating-linear-gradient(135deg, var(--est) 0 1.5px, transparent 1.5px 6px); }
.colonne .vide { flex: 1; display: flex; align-items: flex-end; justify-content: center; }
.colonne .vide span { font: 500 0.66rem/1 var(--f-mono); color: var(--ink-3); writing-mode: vertical-rl; transform: rotate(180deg); padding-bottom: 8px; }
.colonne .valeur { position: absolute; left: 50%; transform: translateX(-50%); font: 500 0.68rem/1 var(--f-mono); white-space: nowrap; }
@keyframes monte { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.colonnes-axe { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: clamp(2px, 0.6vw, 8px); margin-top: 6px; }
.colonnes-axe span { font: 400 0.66rem/1.2 var(--f-mono); color: var(--ink-2); text-align: center; }
.colonnes-axe small { display: block; color: var(--ink-3); font-size: 0.6rem; }
@media (max-width: 640px) { .colonnes .valeur { display: none; } .colonnes-axe span:nth-child(even) { visibility: hidden; } }

/* ───────── Répartition par zone (une ligne de points) ───────── */
.repartition { position: relative; height: 64px; margin: 34px 0 8px; border-bottom: 1px solid var(--ink); }
.repartition .point { position: absolute; bottom: 10px; width: 9px; height: 9px; margin-left: -4.5px;
  background: var(--s1); box-shadow: 0 0 0 2px var(--paper); cursor: default; }
.repartition .reference { position: absolute; top: -18px; bottom: 0; border-left: 2px solid var(--ink); }
.repartition .reference span { position: absolute; top: -2px; left: 6px; font: 500 0.7rem/1 var(--f-mono); white-space: nowrap; }
.repartition-axe { position: relative; height: 22px; }
.repartition-axe span { position: absolute; transform: translateX(-50%); font: 400 0.68rem/1 var(--f-mono); color: var(--ink-3); padding-top: 6px; }
.repartition-bornes { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--ink-2); margin-top: 10px; gap: 16px; }

/* ───────── Encadré « chiffres à vérifier » ───────── */
.a-verifier { border: 1px dashed var(--ink); padding: 18px 20px; }
.a-verifier .etiquette { font: 500 0.7rem/1 var(--f-mono); text-transform: uppercase; letter-spacing: 0.08em;
  border: 1px solid var(--ink); display: inline-block; padding: 4px 6px; margin-bottom: 12px; }

/* ───────── Courbes (SVG) ───────── */
.courbes { position: relative; margin-top: 20px; }
.courbes svg { display: block; overflow: visible; }
.courbes .c-grille { stroke: var(--hair); stroke-dasharray: 3 3; }
.courbes .c-zero { stroke: var(--ink); }
.courbes .c-repere { stroke: var(--ink); stroke-width: 1; }
.courbes .c-reticule { stroke: var(--ink-2); stroke-width: 1; }
.courbes .c-axe { font: 400 10.5px var(--f-mono); fill: var(--ink-3); }
.courbes .c-axe-fort { font: 500 10.5px var(--f-mono); fill: var(--ink); }
.courbes .c-point { stroke: var(--paper); stroke-width: 2; }
.tooltip .sw { display: inline-block; width: 8px; height: 8px; }

/* ───────── Barres horizontales ───────── */
.barres-h { border-top: 2px solid var(--ink); }
.barre-h { display: grid; grid-template-columns: minmax(110px, 1.2fr) minmax(0, 5fr) 56px; gap: 12px; align-items: center;
  padding: 5px 0; border-bottom: 1px solid var(--hair); font-size: 0.85rem; }
.barre-h.fort { font-weight: 700; }
.barre-h.fort .nom::before { content: "▸ "; }
.barre-h .piste { position: relative; height: 14px; }
.barre-h .barre { position: absolute; left: 0; top: 0; height: 100%; transform-origin: left center; animation: flow 500ms cubic-bezier(.2,.7,.2,1) both; }
.barre-h .ref { position: absolute; top: -5px; bottom: -5px; border-left: 1px dashed var(--ink); }
.barre-h .val { font: 500 0.78rem/1 var(--f-mono); text-align: right; }

/* ───────── Points d'attention ───────── */
.points { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.points li { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 18px 0 20px; border-bottom: 1px solid var(--hair); }
@media (min-width: 900px) { .points li { grid-template-columns: 150px minmax(0, 1fr); column-gap: 24px; } .points .corps { grid-column: 2; } .points .type { grid-row: 1 / span 2; } }
.points .type { align-self: start; justify-self: start; font: 500 0.68rem/1 var(--f-mono); text-transform: uppercase; letter-spacing: 0.08em;
  border: 1px solid var(--ink); padding: 5px 7px; }
.points .attention .type { background: var(--ink); color: var(--paper); }
.points .favorable .type { border-style: dashed; }
.points .repere .type { border-color: var(--ink-3); color: var(--ink-2); }
.points .constat { font: 700 clamp(1.05rem, 1.6vw, 1.3rem)/1.3 var(--f-body); max-width: 60ch; }
.points .corps { display: grid; gap: 4px; font-size: 0.92rem; color: var(--ink-2); max-width: 70ch; }
.points .corps b { font: 500 0.7rem/1 var(--f-mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); margin-right: 6px; }

/* ───────── Contributions (barres positives et négatives) ───────── */
.colonnes.contributions { align-items: stretch; border-bottom: 0; }
.colonnes.contributions .grid-h.zero { border-top: 1px solid var(--ink); }
.colonne.contrib { position: relative; }
.colonne.contrib .trait-total { position: absolute; left: -2px; right: -2px; height: 0; border-top: 2px solid var(--ink); }

/* ───────── Ouverture : titre + encadré « Comment lire » ───────── */
.hero-grille { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap); align-items: start; }
@media (min-width: 980px) { .hero-grille { grid-template-columns: minmax(0, 8fr) minmax(260px, 4fr); } }
.lecture { border-top: 2px solid var(--ink); padding-top: 12px; margin-top: 14px; }
.lecture ul { list-style: none; margin: 10px 0 0; padding: 0; }
.lecture li { font-size: 0.84rem; line-height: 1.5; color: var(--ink-2); padding: 9px 0; border-bottom: 1px solid var(--hair); }
.lecture li b { color: var(--ink); font-weight: 600; }
.lecture li.propre { color: var(--ink); }

/* Décomposition d'un écart (Graph.ecarts) */
.ecarts { border-top: 2px solid var(--ink); }
.ecart { display: grid; grid-template-columns: minmax(130px, 1.6fr) minmax(0, 4fr) 72px; gap: 12px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--hair); font-size: 0.88rem; }
.ecart.total { font-weight: 700; border-top: 1px solid var(--ink); }
.ecart .piste { position: relative; height: 14px; }
.ecart .axe { position: absolute; left: 50%; top: -4px; bottom: -4px; width: 1px; background: var(--ink-3); }
.ecart .barre { position: absolute; top: 0; height: 100%; }
.ecart .val { font: 500 0.78rem/1 var(--f-mono); text-align: right; }
.analyse { list-style: none; margin: 0 0 28px; padding: 0; border-top: 2px solid var(--ink); }
.analyse li { padding: 14px 0 16px; border-bottom: 1px solid var(--hair); }
.analyse .question { display: block; font: 500 0.7rem/1.2 var(--f-mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); margin-bottom: 6px; }
.analyse .verdict { font-weight: 700; }
.analyse p { margin: 6px 0 0; font-size: 0.92rem; color: var(--ink-2); max-width: 70ch; }

/* Bloc « En bref » */
.enbref { list-style: none; counter-reset: enbref; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.enbref li { counter-increment: enbref; display: grid; grid-template-columns: 2.2rem minmax(0, 1fr); gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--hair);
  font: 600 clamp(1.02rem, 1.5vw, 1.2rem)/1.4 var(--f-body); max-width: 62ch; }
.enbref li::before { content: counter(enbref); font: 800 1.4rem/1.1 var(--f-display); color: var(--s1); }

/* Pages des familles de thèmes */
.sommaire-famille { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 20px 0 0; padding: 0; }
.sommaire-famille a { display: inline-block; padding: 8px 12px; border: 1px solid var(--ink); font: 500 0.74rem/1 var(--f-mono); text-transform: uppercase;
  letter-spacing: 0.05em; text-decoration: none; color: var(--ink); }
.sommaire-famille a:hover, .sommaire-famille a:focus-visible { background: var(--ink); color: var(--paper); }
.cartes-themes { display: grid; gap: 0; border-top: 2px solid var(--ink); }
.carte-theme { display: grid; gap: 12px; padding: 22px 0 26px; border-bottom: 1px solid var(--hair); }
.carte-theme h3 { margin: 0; font: 800 clamp(1.5rem, 2.6vw, 2.1rem)/1 var(--f-display); text-transform: uppercase; letter-spacing: 0.01em; }
.carte-theme h3 a { color: var(--ink); text-decoration: none; }
.carte-theme h3 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.carte-theme .sujet { margin: 0; color: var(--ink-2); max-width: 70ch; }
.chiffres-theme { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 28px; }
.chiffres-theme > div { display: grid; gap: 4px; border-left: 3px solid var(--s1); padding-left: 12px; }
.chiffres-theme .v { font: 800 2rem/1 var(--f-display); }
.chiffres-theme .v small { font: 500 0.8rem/1 var(--f-mono); margin-left: 4px; color: var(--ink-2); }
.chiffres-theme .l { font-size: 0.82rem; color: var(--ink-3); line-height: 1.35; }
.points.constats { border-top: 1px solid var(--hair); }
.points.constats li { padding: 12px 0; }
.points.constats .constat { font-size: 0.98rem; font-weight: 600; }
.lien-theme { justify-self: start; font: 500 0.76rem/1 var(--f-mono); text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink); }
.famille-accueil h2 a { color: inherit; text-decoration: none; }
.famille-accueil h2 a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Contenus repliés : détail des points et des lectures, annexes (vigilance, limites, sources, tableaux) */
details.detail > summary, details.annexe > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
  font: 500 0.72rem/1 var(--f-mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-2); }
details.detail > summary::-webkit-details-marker, details.annexe > summary::-webkit-details-marker { display: none; }
details.detail > summary::before, details.annexe > summary::before { content: "+"; font: 600 0.95rem/1 var(--f-mono); width: 0.8em; color: var(--s1); }
details.detail[open] > summary::before, details.annexe[open] > summary::before { content: "−"; }
details.detail > summary:hover, details.annexe > summary:hover { color: var(--ink); }
details.detail { margin-top: 2px; }
details.detail[open] > summary { margin-bottom: 8px; }
.points details.corps-repli { grid-column: 1 / -1; }
@media (min-width: 900px) { .points details.corps-repli { grid-column: 2; } }
details.annexe > summary { padding: 11px 14px; border: 1px solid var(--ink); color: var(--ink); }
details.annexe > summary:hover { background: var(--ink); color: var(--paper); }
details.annexe[open] > summary { margin-bottom: 18px; }
.lecture details.detail { margin-top: 10px; }
@media print { details.detail > :not(summary), details.annexe > :not(summary) { display: block !important; } }

/* ───────── Hiérarchie des pages : chapitres, sommaire collant, titres de section collants ───────── */
/* Bandeau de chapitre : fond sur toute la largeur (fluide), contenu aligné sur la largeur du site */
.chapitre { margin-top: calc(var(--section-y) * 1.4); background: var(--ink); color: var(--paper); scroll-margin-top: calc(var(--entete, 0px) + 48px); }
.chapitre .wrap { display: flex; align-items: baseline; gap: 18px; padding-block: clamp(18px, 2.6vw, 30px); }
.chapitre .num { font: 500 0.8rem/1 var(--f-mono); letter-spacing: 0.08em; color: var(--paper); opacity: 0.8; }
.chapitre h2 { margin: 0; font: 800 clamp(1.9rem, 4vw, 3.2rem)/1 var(--f-display); text-transform: uppercase; letter-spacing: 0.01em; }
.chapitre p { margin: 0 0 0 auto; font: 400 0.8rem/1.4 var(--f-mono); color: var(--paper); opacity: 0.75; max-width: 40ch; text-align: right; }
.chapitre + .section { padding-top: clamp(20px, 3vw, 36px); }
@media (max-width: 700px) { .chapitre .wrap { flex-wrap: wrap; } .chapitre p { margin: 0; text-align: left; } }
/* Sommaire de la page : barre collante en haut de l'écran */
.sommaire-page { position: sticky; top: var(--entete, 0px); z-index: 40; transition: top .25s ease; background: var(--paper); border-bottom: 1px solid var(--ink); }
.sommaire-page .wrap { display: flex; align-items: center; gap: 4px; overflow-x: auto; scrollbar-width: none; padding-block: 6px; }
/* Fil d'Ariane, à gauche du sommaire dans la même barre ; sur téléphone, seul le niveau parent reste (le titre de la page suit) */
.sommaire-page .ariane { flex: none; display: flex; align-items: center; gap: 6px; padding-right: 14px; margin-right: 6px; border-right: 1px solid var(--hair);
  font: 400 0.72rem/1.4 var(--f-mono); color: var(--ink-3); white-space: nowrap; }
.sommaire-page .ariane i { font-style: normal; }
.sommaire-page .ariane a { color: var(--ink-2); text-decoration: none; }
.sommaire-page .ariane a:hover { color: var(--ink); text-decoration: underline; }
.sommaire-page .ariane [aria-current] { color: var(--ink); }
@media (max-width: 760px) {
  .sommaire-page .ariane > :first-child, .sommaire-page .ariane > :first-child + i,
  .sommaire-page .ariane > i:has(+ [aria-current]), .sommaire-page .ariane > [aria-current] { display: none; }
  .sommaire-page .ariane { padding-right: 6px; margin-right: 0; }
  .sommaire-page .wrap { gap: 2px; }
  .sommaire-page .wrap .chapitres { gap: 0; }
  .sommaire-page .wrap .chapitres a { padding-inline: 5px; font-size: 0.63rem; letter-spacing: 0.02em; }
  .sommaire-page .ariane { font-size: 0.68rem; }
  .sommaire-page .wrap .chapitres a span { display: none; }
}
.sommaire-page .chapitres { flex: none; display: flex; gap: 4px; }
.sommaire-page .chapitres a { flex: none; padding: 8px 12px; font: 500 0.72rem/1 var(--f-mono); text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--ink-2); text-decoration: none; border-bottom: 2px solid transparent; }
.sommaire-page a span { color: var(--s1); margin-right: 6px; }
.sommaire-page a:hover { color: var(--ink); }
.sommaire-page a[aria-current="true"] { color: var(--ink); border-bottom-color: var(--s1); }
/* Titre et texte de chaque section restent visibles pendant le défilement du graphique (grand écran) */
@media (min-width: 900px) {
  .section-grid > .aside { position: sticky; top: calc(var(--entete, 0px) + 64px); align-self: start; transition: top .25s ease; }
  .section-grid > .aside.non-collant { position: static; }
}
.section { scroll-margin-top: calc(var(--entete, 0px) + 56px); }

/* ───────── Transitions ───────── */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  /* Menu déroulant (grand écran) : apparition en fondu et glissement */
  @media (min-width: 761px) {
    .nav details[open] > .panneau { animation: panneau-entree .22s cubic-bezier(.2, .7, .2, 1); }
    .nav details[open] > .panneau > * { animation: element-entree .3s cubic-bezier(.2, .7, .2, 1) both; }
    .nav details[open] > .panneau > :nth-child(2) { animation-delay: .04s; }
    .nav details[open] > .panneau > :nth-child(3) { animation-delay: .08s; }
    .nav details[open] > .panneau > :nth-child(4) { animation-delay: .12s; }
  }
  /* Menu plein écran (téléphone) : les familles apparaissent l'une après l'autre */
  @media (max-width: 760px) {
    .nav.ouvert > * { animation: element-entree .35s cubic-bezier(.2, .7, .2, 1) both; }
    .nav.ouvert > :nth-child(2) { animation-delay: .05s; }
    .nav.ouvert > :nth-child(3) { animation-delay: .09s; }
    .nav.ouvert > :nth-child(4) { animation-delay: .13s; }
    .nav.ouvert > :nth-child(5) { animation-delay: .17s; }
    .nav.ouvert > :nth-child(n+6) { animation-delay: .21s; }
    .nav details[open] > .panneau { animation: element-entree .25s ease both; }
  }
  /* Contenus repliés : le contenu déplié apparaît en fondu */
  details.detail[open] > :not(summary), details.annexe[open] > :not(summary) { animation: element-entree .25s ease both; }
  details.detail > summary::before, details.annexe > summary::before { transition: transform .2s; }
  details.detail[open] > summary::before, details.annexe[open] > summary::before { transform: rotate(180deg); }
  /* Sommaire de page : soulignement qui glisse ; bandeau visé par un lien : bref signal */
  .sommaire-page a { transition: color .2s, border-color .25s; }
  .chapitre:target h2, .section:target h2 { animation: cible .9s ease; }
  .nav summary::after { transition: transform .2s; }
}
@keyframes panneau-entree { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes element-entree { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes cible { 0% { color: var(--s1); } 100% { color: inherit; } }

/* Panneau du menu (grand écran) : fond sur toute la largeur de l'écran, contenu aligné sur la largeur du site */
@media (min-width: 761px) {
  .masthead .nav .panneau { left: calc((100% - 100vw) / 2); right: auto; width: 100vw; padding-inline: calc((100vw - 100%) / 2); }
}

/* ───────── Séparateurs sur toute la largeur de l'écran ─────────
   Les traits qui séparent les sections et encadrent les chiffres clés débordent du conteneur jusqu'aux bords de l'écran
   (border-image prolongée de 100vw de chaque côté, coupée par body { overflow-x: clip }) ; le contenu reste dans le conteneur. */
.section-grid { border-image: linear-gradient(var(--ink) 0 0) 1 / 1px 0 0 / 0 100vw; }
.totem { border-image: linear-gradient(var(--ink) 0 0) 1 / 2px 0 1px / 0 100vw; }
@media (max-width: 560px) {
  .totem > div + div { border-image: linear-gradient(var(--ink) 0 0) 1 / 1px 0 0 / 0 100vw; }
}

/* ───────── Menu plus lisible (grand écran) ───────── */
@media (min-width: 761px) {
  .masthead .wrap { padding-block: 16px; }
  .brand { font-size: clamp(1.35rem, 1.6vw, 1.7rem); }
  .nav { font-size: clamp(0.74rem, 0.85vw, 0.92rem); font-weight: 600; letter-spacing: 0.05em; }
  .nav summary, .nav .nav-lien { padding: 12px clamp(8px, 0.9vw, 16px); color: var(--ink); }
  .nav summary::after { width: 6px; height: 6px; border-right-width: 2px; border-bottom-width: 2px; }
  .masthead .nav .panneau { top: calc(100% - 2px); padding-block: 36px 44px; gap: 0 clamp(28px, 4vw, 64px); }
  .nav .groupe-titre { font-size: 0.8rem; color: var(--ink-2); margin-bottom: 10px; }
  .nav .groupe > a, .nav .groupe > .a-venir { padding: 11px 0; gap: 4px; }
  .nav .panneau b { font-size: 1.12rem; }
  .nav .panneau span { font-size: 0.9rem; color: var(--ink-2); }
  .nav .panneau a.sous b { font-size: 0.85rem; }
  .nav .panneau .vue-famille { font-size: 0.85rem; margin-bottom: 22px; }
}

/* Écrans moyens : le menu passe sur sa propre ligne, sous le titre du site, pour garder des entrées lisibles */
@media (min-width: 761px) and (max-width: 1239px) {
  .masthead > .wrap { row-gap: 6px; }
  .masthead .nav { width: 100%; margin-left: 0; justify-content: space-between; border-top: 1px solid var(--hair); padding-top: 4px; }
  .masthead .nav summary, .masthead .nav .nav-lien { padding-inline: 0 6px; }
}

/* ───────── Menu très aéré (grand écran) ───────── */
@media (min-width: 761px) {
  .masthead .wrap { padding-block: 22px; }
  .masthead > .wrap { column-gap: 40px; }
  .nav { gap: clamp(4px, 1vw, 18px); }
  .nav summary, .nav .nav-lien { padding-block: 14px; }
  .masthead .nav .panneau { padding-block: 52px 64px; gap: 0 clamp(40px, 5.5vw, 96px); box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25); }
  .nav .panneau .vue-famille { margin-bottom: 36px; padding-bottom: 8px; }
  .nav .groupe { gap: 6px; }
  .nav .groupe-titre { margin-bottom: 16px; padding-bottom: 12px; letter-spacing: 0.1em; }
  .nav .groupe > a, .nav .groupe > .a-venir { padding: 14px 0; gap: 6px; border-bottom: 1px solid var(--hair); }
  .nav .groupe > a:last-child { border-bottom: 0; }
  .nav .groupe > a.sous { border-bottom: 1px solid var(--hair); padding: 0 0 14px; margin-top: -6px; }
  .nav .panneau b { font-size: 1.2rem; line-height: 1.25; }
  .nav .panneau span { line-height: 1.45; }
}
@media (min-width: 761px) and (max-width: 1239px) {
  .masthead .nav { padding-top: 8px; margin-top: 4px; }
}
/* Menu plein écran (téléphone) : plus d'espace entre les entrées */
@media (max-width: 760px) {
  .nav summary { padding: 26px 0 22px; }
  .nav .panneau { gap: 28px; padding: 22px 0 32px; }
  .nav .groupe-titre { margin-bottom: 10px; }
  .nav .groupe > a, .nav .groupe > .a-venir { padding: 13px 0; }
  .nav .nav-lien { padding: 22px 0; }
}

/* ───────── En-tête centré (grand écran) : titre du site, puis menu ───────── */
@media (min-width: 761px) {
  .masthead > .wrap { flex-direction: column; align-items: center; justify-content: center; row-gap: 10px; padding-block: 22px 8px; }
  .masthead .nav { margin-left: 0; width: auto; justify-content: center; border-top: 0; padding-top: 0; margin-top: 0; }
  .masthead .nav summary, .masthead .nav .nav-lien { padding-inline: clamp(8px, 1vw, 16px); }
}
/* Menu ouvert : panneau sur un fond teinté, page floutée et assombrie derrière */
@media (min-width: 761px) {
  .masthead .nav .panneau { background: color-mix(in srgb, var(--paper) 86%, var(--s1) 14%); border-top: 3px solid var(--s1);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.35); }
  .masthead .nav .panneau .groupe > a, .masthead .nav .panneau .groupe-titre { border-color: color-mix(in srgb, var(--ink) 18%, transparent); }
  html.menu-deroule body::after { content: ""; position: fixed; inset: 0; z-index: 50; background: rgba(10, 12, 14, 0.45);
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
}
@media (min-width: 761px) and (prefers-reduced-motion: no-preference) {
  html.menu-deroule body::after { animation: voile .2s ease; }
}
@keyframes voile { from { opacity: 0; } to { opacity: 1; } }

/* Menu : encore plus d'air ; une sous-page (→ Analyse approfondie) reste collée à son thème, sous un même filet */
@media (min-width: 761px) {
  .masthead > .wrap { padding-block: 28px 12px; row-gap: 14px; }
  .masthead .nav .panneau { padding-block: 64px 80px; gap: 0 clamp(48px, 6.5vw, 120px); }
  .nav .panneau .vue-famille { margin-bottom: 44px; }
  .nav .groupe-titre { margin-bottom: 18px; padding-bottom: 14px; }
  .nav .groupe > a, .nav .groupe > .a-venir { padding: 18px 0; gap: 7px; }
  .nav .groupe > a:has(+ a.sous) { border-bottom: 0; padding-bottom: 8px; }
  .nav .groupe > a.sous { margin-top: 0; padding: 0 0 18px; }
  .nav .panneau a.sous b { display: inline-flex; gap: 6px; font-weight: 500; color: var(--ink-2); }
  .nav .panneau a.sous:hover b { color: var(--ink); }
}
@media (max-width: 760px) {
  .nav .groupe > a.sous { margin-top: -6px; padding: 0 0 13px; }
}

/* Aide à la lecture des graphiques */
.cle-graph { margin: 0 0 14px; padding: 12px 14px; background: var(--sheet); border-left: 3px solid var(--s1); font-size: 0.88rem; line-height: 1.5; color: var(--ink-2); }
.cle-graph p { margin: 0; }
.cle-graph p + p { margin-top: 6px; }
.cle-graph b { display: inline-block; margin-right: 8px; font: 500 0.68rem/1 var(--f-mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink); }
.cle-graph .serie { display: block; color: var(--ink); }
.cle-graph .serie .sw { display: inline-block; width: 10px; height: 10px; margin-right: 6px; vertical-align: baseline; }

/* ───────── En-tête collant ─────────
   Il reste accessible pendant la lecture : compact dès qu'on a défilé, masqué quand on descend, réaffiché dès qu'on remonte.
   (Animation sur « top » et non « transform », pour ne pas casser le menu plein écran du téléphone.) */
/* En-tête fixé en haut de l'écran ; un espace de même hauteur le remplace dans la page, pour que le passage en version
   compacte ne déplace pas le contenu */
.masthead { position: fixed; top: 0; left: 0; right: 0; transition: top .25s ease; }
.entete-espace { height: var(--hauteur-pleine, 0px); }
.masthead.cache { top: calc(-1 * var(--hauteur-entete, 120px) - 4px); }
.masthead.compact .fil { display: none; }
@media (min-width: 761px) {
  .masthead.compact > .wrap { flex-direction: row; justify-content: space-between; padding-block: 8px; row-gap: 0; }
  .masthead.compact .brand { font-size: 1.15rem; }
  .masthead.compact .nav { font-size: 0.78rem; }
  .masthead.compact .nav summary, .masthead.compact .nav .nav-lien { padding-block: 10px; }
}
@media (min-width: 761px) and (max-width: 1239px) {
  .masthead.compact > .wrap > .brand span { display: none; }
}
/* Bouton de retour en haut de page */
.haut-de-page { position: fixed; right: var(--gutter); bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 45; display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 14px; border: 1px solid var(--ink); background: var(--paper); color: var(--ink); font: 500 0.72rem/1 var(--f-mono); text-transform: uppercase;
  letter-spacing: 0.06em; cursor: pointer; opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .2s, transform .2s, visibility 0s linear .2s; }
.haut-de-page.visible { opacity: 1; visibility: visible; transform: none; transition: opacity .2s, transform .2s; }
.haut-de-page:hover { background: var(--ink); color: var(--paper); }
@media (prefers-reduced-motion: reduce) { .masthead, .haut-de-page, .sommaire-page { transition: none; } }

/* ───────── Recherche ───────── */
.recherche-bouton { display: inline-flex; align-items: center; gap: 8px; font: 600 0.78rem/1 var(--f-mono); text-transform: uppercase; letter-spacing: 0.05em;
  background: transparent; color: var(--ink); border: 1px solid var(--ink); padding: 9px 12px; cursor: pointer; }
.recherche-bouton::before { content: ""; width: 11px; height: 11px; border: 2px solid currentColor; border-radius: 50%; box-sizing: border-box;
  box-shadow: 4px 4px 0 -3px currentColor; }
.recherche-bouton:hover { background: var(--ink); color: var(--paper); }
.recherche-bouton kbd { font: inherit; opacity: 0.6; border: 1px solid currentColor; padding: 1px 4px; }
@media (max-width: 760px) { .recherche-bouton kbd, .recherche-bouton .txt { display: none; } }
.recherche { position: fixed; inset: 0; z-index: 200; }
.recherche[hidden] { display: none; }
.recherche-voile { position: absolute; inset: 0; background: rgba(10, 12, 14, 0.55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.recherche-boite { position: relative; width: min(100% - 2 * var(--gutter), 760px); margin: clamp(16px, 9vh, 96px) auto 0; background: var(--paper);
  border-top: 3px solid var(--s1); box-shadow: 0 40px 80px rgba(0, 0, 0, 0.35); max-height: calc(100vh - 2 * clamp(16px, 9vh, 96px)); display: flex; flex-direction: column; }
.recherche-champ { display: flex; gap: 10px; padding: 16px; border-bottom: 1px solid var(--ink); }
.recherche-champ input { flex: 1; min-width: 0; font: 600 1.1rem/1.2 var(--f-body); padding: 10px 12px; border: 1px solid var(--ink); background: var(--sheet); color: var(--ink); }
.recherche-fermer { font: 500 0.74rem/1 var(--f-mono); text-transform: uppercase; letter-spacing: 0.05em; background: var(--ink); color: var(--paper); border: 0; padding: 0 14px; cursor: pointer; }
.recherche-etat { margin: 0; padding: 10px 16px 0; font: 500 0.72rem/1.3 var(--f-mono); text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-3); }
.recherche-etat:empty { display: none; }
.recherche-liste { list-style: none; margin: 0; padding: 6px 0 10px; overflow-y: auto; }
.recherche-liste a { display: grid; gap: 4px; padding: 12px 16px; text-decoration: none; color: var(--ink); border-left: 3px solid transparent; }
.recherche-liste a:hover, .recherche-liste a.actif { background: var(--sheet); border-left-color: var(--s1); }
.recherche-rubrique { font: 500 0.68rem/1.2 var(--f-mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--s1); }
.recherche-liste b { font: 800 1.3rem/1.1 var(--f-display); text-transform: uppercase; }
.recherche-extrait { font-size: 0.86rem; line-height: 1.45; color: var(--ink-2); }
.recherche-extrait mark { background: color-mix(in srgb, var(--s1) 30%, transparent); color: var(--ink); padding: 0 1px; }
html.recherche-ouverte { overflow: hidden; }
@media (min-width: 761px) {
  .masthead > .wrap > .recherche-bouton { position: absolute; right: 0; top: 22px; }
  .masthead.compact > .wrap > .recherche-bouton { position: static; order: 3; }
}
@media (max-width: 760px) { .masthead > .wrap > .recherche-bouton { margin-left: auto; padding: 9px 11px; } }

/* Lien vers la sous-page « Analyse détaillée » */
.carte-detail { display: grid; gap: 8px; padding: 22px 24px; border: 2px solid var(--ink); text-decoration: none; color: var(--ink); background: var(--sheet); }
.carte-detail b { font: 800 clamp(1.4rem, 2.6vw, 2rem)/1.05 var(--f-display); text-transform: uppercase; }
.carte-detail span:last-child { font-size: 0.9rem; color: var(--ink-2); }
.carte-detail:hover { background: var(--ink); color: var(--paper); }
.carte-detail:hover span { color: inherit; }

[hidden] { display: none !important; }

/* Pages des familles : cartes d'aiguillage aérées vers les pages de chaque thème */
.cartes-themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: clamp(20px, 3vw, 36px); border-top: 0; }
.carte-theme { display: flex; flex-direction: column; gap: 14px; padding: clamp(22px, 2.6vw, 32px); border: 1px solid var(--hair); border-top: 3px solid var(--ink);
  background: var(--paper); transition: border-color .2s, background .2s; }
.carte-theme:hover { border-color: var(--ink); background: var(--sheet); }
.carte-theme .sujet { font-size: 0.95rem; }
.chiffre-theme { display: grid; gap: 4px; border-left: 3px solid var(--s1); padding-left: 12px; margin-top: 4px; }
.chiffre-theme .v { font: 800 2.2rem/1 var(--f-display); }
.chiffre-theme .v small { font: 800 0.45em/1 var(--f-display); margin-left: 4px; text-transform: uppercase; }
.chiffre-theme .l { font-size: 0.82rem; color: var(--ink-3); line-height: 1.4; }
.liens-theme { list-style: none; margin: auto 0 0; padding: 14px 0 0; border-top: 1px solid var(--hair); display: grid; gap: 8px; }
.liens-theme a { font: 500 0.78rem/1.3 var(--f-mono); text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink); text-decoration: none; }
.liens-theme a:hover { color: var(--s1); }
.liens-theme li:first-child a { font-weight: 700; }
/* La recherche n'apparaît pas dans l'en-tête compact (pendant le défilement) */
.masthead.compact .recherche-bouton { display: none; }

/* Bandeau « plus agréable sur ordinateur » (petits écrans, affiché une fois) */
.avis-ordinateur { display: flex; align-items: center; gap: 12px; padding: 10px var(--gutter); background: var(--sheet); border-bottom: 1px solid var(--hair);
  font-size: 0.84rem; line-height: 1.4; color: var(--ink-2); }
.avis-ordinateur p { margin: 0; flex: 1; }
.avis-ordinateur button { flex: none; font: 600 0.74rem/1 var(--f-mono); text-transform: uppercase; background: var(--ink); color: var(--paper); border: 0; padding: 9px 12px; cursor: pointer; }

/* Budget de l'État par mission et « qui paie quoi » (page Dépenses publiques) */
.en-clair-graph { margin: 0 0 18px; max-width: 75ch; font: 650 1.02rem/1.5 var(--f-body); }
.missions { display: grid; border-top: 1px solid var(--hair); }
.mission { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px 20px; padding: 12px 0; border-bottom: 1px solid var(--hair); }
@media (min-width: 900px) { .mission { grid-template-columns: minmax(200px, 4fr) minmax(0, 6fr) 7em; align-items: center; } }
.mission .nom b { display: block; font: 650 0.95rem/1.25 var(--f-body); }
.mission .nom span { font-size: 0.8rem; color: var(--ink-3); }
.mission .piste { height: 18px; background: var(--sheet); }
.mission .barre { display: block; height: 100%; background: var(--s1); transform-origin: left center; animation: flow 600ms cubic-bezier(.2,.7,.2,1) both; }
.mission.autres .barre { background: var(--s6); }
.mission .val { font: 800 1.4rem/1 var(--f-display); white-space: nowrap; }
@media (min-width: 900px) { .mission .val { text-align: right; } }
.mission .val small { display: block; margin-top: 4px; font: 500 0.72rem/1 var(--f-mono); color: var(--ink-2); }
.qui-paie { border-top: 1px solid var(--hair); }
.qp-ligne { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px 20px; padding: 14px 0; border-bottom: 1px solid var(--hair); }
@media (min-width: 900px) { .qp-ligne { grid-template-columns: minmax(150px, 2fr) minmax(0, 6fr); align-items: center; } .qp-parts { grid-column: 2; } }
.qp-ligne .nom b { display: block; font: 800 1.3rem/1.1 var(--f-display); text-transform: uppercase; }
.qp-ligne .nom span { font: 500 0.76rem/1.4 var(--f-mono); color: var(--ink-2); }
.qp-piste { height: 30px; }
.qp-barre { display: flex; gap: 2px; height: 100%; min-width: 3px; transform-origin: left center; animation: flow 600ms cubic-bezier(.2,.7,.2,1) both; }
.qp-barre i { display: block; min-width: 3px; }
.qp-parts { display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: 0.86rem; color: var(--ink-2); }
.qp-parts .sw { margin-right: 6px; }
.qp-parts b { color: var(--ink); }

/* Niveau de vie selon la situation et l'âge (page Revenus des ménages) */
.legende-ecarts { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 10px; font-size: 0.82rem; color: var(--ink-2); }
.legende-ecarts .sw { margin-right: 6px; }
.si-sous { margin: 22px 0 6px; font: 500 0.76rem/1.3 var(--f-mono); text-transform: uppercase; letter-spacing: 0.08em; }
.si-lignes { border-top: 1px solid var(--hair); }
.si-ligne { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 20px; padding: 12px 0; border-bottom: 1px solid var(--hair); }
@media (min-width: 900px) { .si-ligne { grid-template-columns: minmax(170px, 3fr) minmax(0, 6fr) 7.5em; align-items: center; } }
.si-ligne .nom b { display: block; font: 650 0.95rem/1.25 var(--f-body); }
.si-ligne .nom span { font-size: 0.78rem; color: var(--ink-3); }
.si-piste { position: relative; height: 22px; grid-column: 1 / -1; }
@media (min-width: 900px) { .si-piste { grid-column: auto; } }
.si-piste .si-plage, .sw.si-plage { position: absolute; top: 5px; height: 12px; background: var(--s1); opacity: 0.35; }
.sw.si-plage { position: static; display: inline-block; height: 10px; }
.si-piste .si-med { position: absolute; top: 0; width: 4px; height: 22px; margin-left: -2px; background: var(--s1); }
.sw.si-med { background: var(--s1); }
.si-piste .si-ref { position: absolute; top: -4px; bottom: -4px; border-left: 1px dashed var(--ink); }
.sw.si-ref { width: 0; height: 12px; border-left: 1px dashed var(--ink); }
.si-ligne .val { font: 800 1.4rem/1 var(--f-display); white-space: nowrap; text-align: right; }
.si-ligne .val small { display: block; margin-top: 4px; font: 500 0.72rem/1 var(--f-mono); color: var(--ink-2); }
@media (max-width: 899px) { .si-ligne .val { grid-row: 1; grid-column: 2; } }
.si-compte { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--hair); }
.si-compte li { padding: 12px 0; border-bottom: 1px solid var(--hair); max-width: 85ch; font-size: 0.95rem; line-height: 1.55; color: var(--ink-2); }
.si-compte b { color: var(--ink); }

/* Pas de défilement horizontal sur téléphone : les colonnes de grille peuvent rétrécir sous la largeur de leur contenu
   (tableaux et formules défilent alors dans leur propre cadre), et la page ne déborde jamais */
.section-grid > *, .hero-grille > *, .edito-grille > *, .cent > *, .periodes > * { min-width: 0; }
.table-wrap, .formula { max-width: 100%; }
select { max-width: 100%; }
html, body { overflow-x: clip; }   /* sur html aussi : posée sur body seul, la règle ne s applique pas au défilement de la page */

/* Listes longues repliées au-delà de 3 éléments (graphiques.js) */
.voir-plus { margin-top: 18px; padding: 11px 16px; border: 1px solid var(--ink); background: transparent; color: var(--ink); cursor: pointer;
  font: 500 0.74rem/1 var(--f-mono); text-transform: uppercase; letter-spacing: 0.06em; }
.voir-plus:hover, .voir-plus:focus-visible { background: var(--ink); color: var(--paper); }

/* ───────── Téléphone : lisibilité et zones tactiles ───────── */
/* Encadré « Comment lire cette page » replié (graphiques.js) */
details.lecture-repli > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; min-height: 32px; margin: 0; }
details.lecture-repli > summary::-webkit-details-marker { display: none; }
details.lecture-repli > summary::after { content: "↓"; color: var(--s1); }
details.lecture-repli[open] > summary::after { content: "↑"; }
/* Suite d'une section longue, repliée (graphiques.js) */
details.suite-section { margin-top: 18px; }
details.suite-section > summary { list-style: none; cursor: pointer; display: inline-block; padding: 11px 16px; border: 1px solid var(--ink);
  font: 500 0.74rem/1.3 var(--f-mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink); }
details.suite-section > summary::-webkit-details-marker { display: none; }
details.suite-section[open] > summary { margin-bottom: 18px; }
@media (max-width: 760px) {
  /* Textes : 12 px au minimum pour les étiquettes et les boutons de dépliage */
  .points .type, .analyse .question, details.detail > summary, details.annexe > summary { font-size: max(0.75rem, 12px); }
  /* Zones tactiles d'au moins 32 px de haut, sans changer l'aspect des liens */
  .sommaire-page .ariane a { display: inline-block; padding-block: 9px; }
  details.detail > summary, details.annexe > summary { min-height: 32px; }
  td a, .rapides a, a.voir, .voir-aussi a, .liens-theme a, a.lien-fleche, .methode-courte a { display: inline-block; padding-block: 7px; }
  /* Petites étiquettes (police à chasse fixe) : 12 px au minimum ; « html body » l'emporte sur les styles propres aux pages */
  html body :is(.eyebrow, .chapitre p, .cle-graph b, .colonnes-axe span, .corps b, .voir-plus, details.suite-section > summary, th, .src-type,
    .question, .badge, a.voir, dl.sens dt, .une-famille, .une-type, .une-lien, .index-groupe, .carte .groupe, .nouveautes .date) { font-size: max(0.75rem, 12px); }
  /* Séparateurs de chapitres plus bas : la barre du haut les rappelle déjà */
  .chapitre { margin-top: var(--section-y); }
  .chapitre .wrap { padding-block: 12px; row-gap: 4px; }
  .chapitre h2 { font-size: 1.6rem; }
  .chapitre p { font-size: 0.72rem; }
}

/* ───────── Accessibilité ───────── */
.visuellement-cache { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.evitement { position: fixed; left: 8px; top: -80px; z-index: 1000; padding: 10px 14px; background: var(--ink); color: var(--paper); font: 600 0.9rem/1 var(--f-body); text-decoration: none; }
.evitement:focus { top: 8px; }
main:focus { outline: none; }
