/* =========================================================================
   Mot suivant — feuille de style unique.
   Ordre : polices → jetons → base → mise en page → composants → prose → utilitaires.
   ========================================================================= */

/* --- Polices auto-hébergées (SIL OFL 1.1, voir fonts/LICENSE.txt) --------- */

@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/hanken-grotesk-latin-wght-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/hanken-grotesk-latin-ext-wght-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308,
    U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: italic;
  font-weight: 100 900;
  font-display: optional;
  src: url('/fonts/hanken-grotesk-latin-wght-italic.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('/fonts/newsreader-latin-standard-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('/fonts/newsreader-latin-ext-wght-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308,
    U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 200 800;
  font-display: optional;
  src: url('/fonts/newsreader-latin-wght-italic.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 100 800;
  font-display: optional;
  src: url('/fonts/jetbrains-mono-latin-wght-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 100 800;
  font-display: optional;
  src: url('/fonts/jetbrains-mono-latin-ext-wght-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308,
    U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* --- Jetons -------------------------------------------------------------- */

:root {
  --font-sans: 'Hanken Grotesk', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-serif: 'Newsreader', ui-serif, Georgia, 'Times New Roman', serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Échelle alignée sur la documentation de Claude Code (code.claude.com/docs, relevée le
     2026-11-23) : texte 16 px, intertitres 24, 20 et 18 px, tableaux et code 14 px, titre de
     page 30 px sur téléphone et 36 px sur grand écran. Les tailles ne grandissent pas avec la
     fenêtre, comme dans cette documentation ; seuls les deux titres d'affichage s'adaptent. */
  --step--2: 0.8125rem;                                 /* 13 px : étiquettes, mentions */
  --step--1: 0.875rem;                                  /* 14 px : tableaux, notes, menus */
  --step-0: 1rem;                                       /* 16 px : texte courant */
  --step-1: 1.125rem;                                   /* 18 px : chapeau, intertitre 4 */
  --step-2: 1.25rem;                                    /* 20 px : intertitre 3 */
  --step-3: 1.5rem;                                     /* 24 px : intertitre 2 */
  --step-4: clamp(1.875rem, 1.6rem + 1.2vw, 2.25rem);   /* 30 → 36 px : titre de page */
  --step-5: clamp(2.25rem, 1.7rem + 2.4vw, 3rem);       /* 36 → 48 px : titre d'affichage */

  --space-1: 0.5rem;
  --space-2: 0.875rem;
  --space-3: 1.25rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 4.5rem;
  --space-7: clamp(2.5rem, 2rem + 2vw, 4rem);

  --radius-s: 8px;
  --radius-m: 14px;
  --radius-l: 22px;
  --radius-pill: 999px;

  --container: 73.75rem;
  --measure: 68ch;

  --paper: #f7f4ed;
  --paper-raised: #fffdf8;
  --paper-sunk: #efeade;
  --ink: #16150f;
  --ink-2: #45423a;
  --ink-3: #6e6a5f;
  --line: #e3ddce;
  --line-strong: #cec6b3;
  --accent: #0e5b54;
  --accent-hover: #0a4741;
  --accent-tint: #dbeae6;
  --accent-on: #fffdf8;
  --frost: #c9dce3;
  --sun: #a8710f;
  --shadow: 0 1px 2px rgb(22 21 15 / 4%), 0 12px 32px -18px rgb(22 21 15 / 22%);

  color-scheme: light;
}

/* Le carnet s'ouvre en clair, toujours. Le sombre existe, mais il se demande :
   c'est un choix du lecteur, pas une conséquence du réglage de son système. La
   préférence est mémorisée d'une visite à l'autre. */

:root[data-theme='dark'] {
  --paper: #121210;
  --paper-raised: #1b1b17;
  --paper-sunk: #0c0c0a;
  --ink: #f2efe6;
  --ink-2: #bab5a8;
  --ink-3: #8d887c;
  --line: #2c2c26;
  --line-strong: #403f37;
  --accent: #74c6b6;
  --accent-hover: #93d6c8;
  --accent-tint: #16302c;
  --accent-on: #07201d;
  --frost: #2b4750;
  --sun: #d9a441;
  --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 14px 34px -20px rgb(0 0 0 / 70%);

  color-scheme: dark;
}

/* --- Base ---------------------------------------------------------------- */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

/* Deux pressions rapides sur un lien déclenchaient le zoom du navigateur, ce
   qui rend la lecture au doigt pénible. `manipulation` supprime ce geste — et
   avec lui l'attente de 300 ms qui le précède, donc les liens répondent plus
   vite. Le pincement, lui, reste actif : couper le zoom pour de bon punirait
   ceux qui en ont besoin pour lire. */
body { touch-action: manipulation; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.6;
  font-synthesis-weight: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 var(--space-3);
  text-wrap: balance;
}

h1 { font-size: var(--step-4); font-variation-settings: 'opsz' 40; }
h2 { font-size: var(--step-3); line-height: 1.25; font-variation-settings: 'opsz' 30; }
h3 { font-size: var(--step-2); line-height: 1.3; }
h4 { font-size: var(--step-1); line-height: 1.4; }

p { margin: 0 0 var(--space-3); text-wrap: pretty; }

a { color: inherit; text-decoration-color: var(--line-strong); text-underline-offset: 0.18em; }
a:hover { text-decoration-color: currentcolor; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

img, svg { max-width: 100%; height: auto; display: block; }

hr { border: 0; border-top: 1px solid var(--line); margin: var(--space-5) 0; }

code, kbd, pre { font-family: var(--font-mono); font-size: 0.9em; }

::selection { background: var(--accent-tint); color: var(--ink); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 var(--radius-s) 0;
}
.skip-link:focus { left: 0; }

/* Bascule de thème : les aplats changent en fondu court plutôt que d'un coup.
   Limité aux surfaces — animer « tout » rendrait le défilement pâteux.
   Le bloc `prefers-reduced-motion` plus haut neutralise déjà ces durées. */
body,
.panel,
.mock,
.table-wrap,
.featured-post {
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

/* --- Mise en page -------------------------------------------------------- */

.container {
  width: min(100% - 2.5rem, var(--container));
  margin-inline: auto;
}
.container--narrow { width: min(100% - 2.5rem, 760px); }

.section { padding-block: var(--space-7); }
.section--tight { padding-block: var(--space-5); }
/* Deux sections « nues » qui se suivent cumuleraient leur respiration : on
   supprime la seconde. Mais dès qu'une section porte un fond (.panel), sa marge
   intérieure fait partie du bloc coloré — la supprimer collerait le contenu au
   bord. Idem pour la section qui suit un panneau. */
.section + .section { padding-top: 0; }
.section + .panel.section,
.panel.section + .section { padding-top: var(--space-7); }

/* Le héros porte déjà sa propre respiration : la section suivante n'a pas
   besoin d'en rajouter une pleine. */
.hero + .section,
.hero + .section--tight { padding-top: var(--space-4); }
/* Le premier bloc sous le héros (schéma, carte du calculateur) ne rajoute pas sa propre marge :
   sinon trois respirations s'empilent, plus de 130 px de vide sur téléphone. */
.hero + .section > .container > :first-child { margin-top: 0; }
.hero > .container > :last-child { margin-bottom: 0; }
@media (max-width: 699px) {
  main .hero { padding-bottom: var(--space-4); }
  .hero + .section,
  .hero + .section--tight { padding-top: var(--space-3); }
}

/* Bandeau des modèles : un filet plutôt qu'un grand vide. */
.band {
  padding-block: var(--space-4);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.panel {
  background: var(--paper-sunk);
  border-block: 1px solid var(--line);
}
.panel--ink { background: var(--ink); color: var(--paper); border-color: transparent; }
.panel--ink .eyebrow { color: color-mix(in srgb, var(--accent) 55%, currentcolor); }
.panel--ink .muted,
.panel--ink .lead { color: color-mix(in srgb, currentcolor 80%, transparent); }
.panel--ink a { color: inherit; }

.stack > * + * { margin-top: var(--space-3); }
.grid { display: grid; gap: var(--space-3); }
@media (min-width: 700px) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1000px) {
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
}
/* Cinq cartes sur trois colonnes : la seconde rangée se centre au lieu de laisser une case vide. */
@media (min-width: 700px) {
  .grid--centre { display: flex; flex-wrap: wrap; justify-content: center; }
  .grid--centre > * { flex: 0 1 calc((100% - 2 * var(--space-3)) / 3); min-width: 0; }
}

.split {
  display: grid;
  gap: var(--space-2);
  align-items: start;
}
.nowrap { white-space: nowrap; }
@media (min-width: 900px) {
  .split { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--space-6); }
  .split--label { grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); }

  /* Dans la colonne de gauche, un titre pleine taille se casserait en quatre
     lignes : on le ramène d'un cran dans l'échelle. */
  .split--label > :first-child h2 {
    font-size: var(--step-3);
    font-variation-settings: 'opsz' 32;
    max-width: 13ch;
  }
  /* La note sous ce titre reste étroite dans sa colonne ; sur mobile elle prend toute la largeur. */
  .split--label > :first-child > .muted { max-width: 32ch; }
}

/* --- Typographie de composants ------------------------------------------ */

/* Étiquette de section, reprise du blog de l'auteur (« { Mon métier } ») : chasse fixe entre
   accolades, pour qu'on reconnaisse la même maison. Les accolades sont du décor : leur texte de
   remplacement est vide, les lecteurs d'écran ne les lisent pas. */
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink);
  margin: 0 0 var(--space-2);
  display: block;
}
.eyebrow::before, .eyebrow::after { color: var(--accent); font-weight: 500; }
.eyebrow::before { content: '{\00a0'; content: '{\00a0' / ''; }
.eyebrow::after { content: '\00a0}'; content: '\00a0}' / ''; }

.lead {
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--ink-2);
  max-width: var(--measure);
}

.muted { color: var(--ink-3); }
.small { font-size: var(--step--1); }

.display {
  font-size: var(--step-5);
  font-variation-settings: 'opsz' 72;
  letter-spacing: -0.025em;
  line-height: 1.02;
}

.serif-italic { font-family: var(--font-serif); font-style: italic; }

/* --- Boutons ------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.25rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font: inherit;
  font-size: var(--step--1);
  font-weight: 550;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: none; }

.btn--primary { background: var(--ink); color: var(--paper); }
.btn--primary:hover { background: var(--accent); color: var(--accent-on); }

.btn--accent { background: var(--accent); color: var(--accent-on); }
.btn--accent:hover { background: var(--accent-hover); }

.btn--ghost { border-color: var(--line-strong); color: var(--ink); background: transparent; }
.btn--ghost:hover { border-color: var(--ink); background: var(--paper-raised); }

/* Variante compacte, pour les boutons secondaires posés dans un formulaire. */
.btn--small {
  padding: 0.4rem 0.85rem;
  font-size: var(--step--2);
}

.panel--ink .btn--primary { background: var(--paper); color: var(--ink); }
.panel--ink .btn--ghost { border-color: color-mix(in srgb, currentcolor 30%, transparent); color: inherit; }
.panel--ink .btn--ghost:hover { background: color-mix(in srgb, currentcolor 10%, transparent); border-color: currentcolor; }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }

.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: var(--step--1);
  font-weight: 550;
  color: var(--accent);
  text-decoration: none;
}
.arrow-link::after { content: '\2192'; transition: transform 0.18s ease; }
.arrow-link:hover::after { transform: translateX(3px); }

/* --- En-tête ------------------------------------------------------------- */

html { background: var(--paper); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  /* Fond opaque, et surtout pas de `backdrop-filter` ici : sur un élément
     `sticky`, Chromium peint alors le fond à la position collée et le contenu
     à la position d'origine — l'en-tête se dédouble au défilement. Le flou
     translucide ne vaut pas ce défaut. */
  background: var(--paper);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, background-color 0.18s ease, color 0.18s ease;
}
.site-header[data-scrolled='true'] { border-bottom-color: var(--line); }

/* Barre de Safari (iOS 26 et suivants, et Safari pour Mac). Safari ignore la balise `theme-color` :
   il colore sa barre d'après l'élément fixe posé contre le haut de l'écran, et garde la couleur
   lue tant que cet élément reste le même. Cette bande de 12 px, de la couleur du fond, est cet
   élément ; à chaque changement de thème, app.js la remplace par une copie pour que Safari la
   relise. Elle vit dans l'en-tête, au-dessus de son fond mais sous ses boutons (z-index 0 contre
   1 pour `.site-header__inner`) : posée par-dessus l'en-tête, elle coupait le haut des boutons
   sur mobile, qui commencent à 11 px du bord. Rien ne la couvre contre le bord, où Safari lit. */
.teinte {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 12px;
  z-index: 0;
  background: var(--paper);
  pointer-events: none;
}
.site-header__inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 4.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  font-family: var(--font-serif);
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  font-variation-settings: 'opsz' 20;
  margin-right: auto;
}
.brand svg { width: 26px; height: 26px; flex: none; }

.site-nav { display: none; }
@media (min-width: 960px) {
  .site-nav { display: flex; gap: 0.35rem; align-items: center; }
}
.site-nav a {
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-pill);
  font-size: var(--step--1);
  font-weight: 500;
  text-decoration: none;
  color: var(--ink-2);
  transition: background-color 0.15s ease, color 0.15s ease;
}
.site-nav a:hover { background: var(--paper-sunk); color: var(--ink); }
.site-nav a[aria-current='page'] { color: var(--ink); font-weight: 600; }
/* Nombre de chapitres en cours de lecture, à côté de « Le carnet ». */
.en-cours[hidden] { display: none; }
.en-cours {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 1.35rem; height: 1.35rem; margin-left: 0.4rem; padding: 0 0.35rem;
  border-radius: var(--radius-pill); background: var(--accent); color: var(--accent-on);
  font-family: var(--font-mono); font-size: var(--step--2); font-weight: 600; line-height: 1;
  vertical-align: 0.05em; font-variant-numeric: tabular-nums;
}

/* « Plus » : un menu déroulant, sans script pour s'ouvrir. */
.nav-plus { position: relative; }
.nav-plus summary { list-style: none; cursor: pointer; padding: 0.45rem 0.75rem; border-radius: var(--radius-pill); font-size: var(--step--1); font-weight: 500; color: var(--ink-2); }
.nav-plus summary::-webkit-details-marker { display: none; }
.nav-plus summary::after { content: ' \25BE'; font-size: 0.8em; }
.nav-plus summary:hover, .nav-plus[open] summary { background: var(--paper-sunk); color: var(--ink); }
.nav-plus[data-actif] summary { color: var(--ink); font-weight: 600; }
.nav-plus__boite { position: absolute; right: 0; top: calc(100% + 0.4rem); z-index: 30; min-width: 15rem; padding: 0.5rem; border: 1px solid var(--line); border-radius: 12px; background: var(--paper-raised); box-shadow: 0 12px 32px rgba(0,0,0,0.12); }
.nav-plus__boite a { display: block; padding: 0.4rem 0.75rem; }
.nav-plus__titre { margin: 0.5rem 0.75rem 0.15rem; font-size: 0.6875rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.nav-plus__titre:first-child { margin-top: 0.15rem; }
.mobile-nav__titre { margin: var(--space-3) 0 0; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.header-actions { display: flex; align-items: center; gap: 0.5rem; flex: none; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
}
.icon-btn:hover { background: var(--paper-sunk); color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; }
@media (min-width: 960px) { .nav-toggle { display: none; } }

/* Menu mobile : un panneau qui se déplie sous l'en-tête, sur un voile qui
   assombrit la page. La hauteur s'anime par `grid-template-rows` (0fr → 1fr),
   sans mesurer le contenu en JavaScript ; les liens apparaissent l'un après l'autre. */
.mobile-nav {
  position: absolute;
  inset: 100% 0 auto 0;
  display: grid;
  grid-template-rows: 0fr;
  visibility: hidden;
  background: var(--paper);
  border-bottom: 1px solid transparent;
  box-shadow: 0 18px 30px -22px rgb(0 0 0 / 35%);
  transition: grid-template-rows 0.2s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 0.2s,
    border-color 0.2s ease;
}
.mobile-nav > .container { overflow: hidden; min-height: 0; }
.mobile-nav[data-open='true'] {
  grid-template-rows: 1fr;
  visibility: visible;
  border-bottom-color: var(--line);
  transition: grid-template-rows 0.2s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s, border-color 0.2s ease;
}
@media (min-width: 960px) { .mobile-nav, .nav-scrim { display: none !important; } }

/* `:not(.btn)` est indispensable : sans lui, la règle habillait aussi les
   boutons éventuels et leur collait une bordure de séparation. */
.mobile-nav a:not(.btn) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 3.4rem;
  font-size: var(--step-1);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: color 0.15s ease;
}
.mobile-nav a:not(.btn)::after { content: '\2192'; color: var(--ink-3); font-size: 0.9em; }
.mobile-nav a:not(.btn):active { color: var(--accent); }
.mobile-nav a[aria-current='page'] { color: var(--accent); font-weight: 550; }
.mobile-nav .en-cours { margin-left: 0.6rem; margin-right: auto; }
.mobile-nav__cta { padding: var(--space-3) 0 var(--space-4); }
.mobile-nav__cta .btn { width: 100%; justify-content: center; }

.nav-scrim {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgb(20 18 14 / 38%);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0s linear 0.2s;
}
.nav-scrim[data-open='true'] { opacity: 1; visibility: visible; transition: opacity 0.2s ease; }
html.nav-ouvert { overflow: hidden; }

/* Icône de menu : deux traits qui se croisent en croix. */
.burger { position: relative; display: block; width: 18px; height: 18px; }
.burger i {
  position: absolute;
  left: 1px;
  right: 1px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), top 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
.burger i:nth-child(1) { top: 5px; }
.burger i:nth-child(2) { top: 11px; }
.nav-toggle[aria-expanded='true'] .burger i:nth-child(1) { top: 8px; transform: rotate(45deg); }
.nav-toggle[aria-expanded='true'] .burger i:nth-child(2) { top: 8px; transform: rotate(-45deg); }

@media (max-width: 699px) {
  .site-header__inner { min-height: 3.75rem; gap: var(--space-2); }
  .brand { font-size: 1.3rem; gap: 0.5rem; }
  .brand svg { width: 22px; height: 22px; }
  .header-actions { gap: 0.4rem; }
  .icon-btn { width: 2.4rem; height: 2.4rem; }
}
/* Petits téléphones (moins de 375 px) : avec le compteur de lecteurs, l'en-tête dépassait l'écran
   de 6 px à 360 px et de 26 px à 320 px, et coupait le bouton du menu. On resserre ; sous 340 px,
   le nom laisse la place au logo seul (le lien garde son nom pour les lecteurs d'écran). */
@media (max-width: 374px) {
  .brand { font-size: 1.15rem; gap: 0.4rem; }
  .header-actions { gap: 0.3rem; }
  .presence { padding-inline: 0.5rem; }
}
@media (max-width: 339px) {
  .site-header .brand > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) {
  .mobile-nav, .nav-scrim, .burger i { transition: none; }
}

/* --- Héros --------------------------------------------------------------- */

.hero { padding-block: clamp(2.5rem, 1.5rem + 4vw, 4.5rem) var(--space-5); }
.hero__text { max-width: 22ch; }
.hero p.lead { max-width: 52ch; margin-top: var(--space-4); }
.hero .btn-row { margin-top: var(--space-4); }

.hero__note {
  margin-top: var(--space-4);
  font-size: var(--step--1);
  color: var(--ink-3);
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}
.hero__note svg { width: 1rem; height: 1rem; margin-top: 0.28em; color: var(--accent); flex: none; }

/* --- Cartes -------------------------------------------------------------- */

.card {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease,
    background-color 0.18s ease, color 0.18s ease;
}
.card h3 { margin: 0; hyphens: manual; }
.card p { margin: 0; color: var(--ink-2); }
.card > .arrow-link { margin-top: auto; padding-top: var(--space-2); }

a.card { text-decoration: none; }
a.card:hover { border-color: var(--line-strong); transform: translateY(-2px); box-shadow: var(--shadow); }

.card__index {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  color: var(--ink-3);
  letter-spacing: 0.1em;
}

.card--flat { background: transparent; border: 0; padding: 0; border-radius: 0; }
.card--flat + .card--flat { border-top: 1px solid var(--line); padding-top: var(--space-4); }
/* Première carte plate d'une pile : même respiration que celles qui la suivent. */
.stack > :not(.card--flat) + .card--flat { margin-top: calc(var(--space-3) + var(--space-4)); }
@media (min-width: 700px) {
  .card--flat + .card--flat { border-top: 0; }
}

/* --- Tableau des modèles ------------------------------------------------- */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--paper-raised);
}
table { border-collapse: collapse; width: 100%; min-width: 0; font-size: var(--step--1); }
th, td { text-align: left; padding: 0.9rem 1.1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap;
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--paper-sunk); }
td strong { font-weight: 600; }

.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.04em;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-pill);
  background: var(--accent-tint);
  color: var(--accent);
  white-space: nowrap;
}
.tag--neutral { background: var(--paper-sunk); color: var(--ink-3); }

/* --- Bandeau logos / mentions ------------------------------------------- */

.marquee {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  align-items: center;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--ink-3);
  letter-spacing: 0.02em;
}
/* Chaque mention tient sur une ligne — sauf quand l'écran est trop étroit
   pour la contenir, auquel cas mieux vaut qu'elle passe à la ligne que
   qu'elle fasse défiler la page. */
.marquee span { white-space: nowrap; }
@media (max-width: 380px) { .marquee span { white-space: normal; } }

/* --- Statistiques -------------------------------------------------------- */

.stat { border-top: 2px solid var(--ink); padding-top: var(--space-2); }
.stat__value {
  font-family: var(--font-serif);
  font-size: var(--step-3);
  line-height: 1.1;
  display: block;
}
.stat__label { font-size: var(--step--1); color: var(--ink-3); }
.panel--ink .stat { border-top-color: color-mix(in srgb, currentcolor 45%, transparent); }
.panel--ink .stat__label { color: color-mix(in srgb, currentcolor 68%, transparent); }

/* --- Maquette de conversation ------------------------------------------- */

.mock {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.mock__bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--line);
  background: var(--paper-sunk);
  font-family: var(--font-mono);
  font-size: var(--step--2);
  color: var(--ink-3);
}
.mock__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.mock__body { padding: var(--space-3); display: grid; gap: 0.75rem; }
.mock__msg { max-width: 88%; padding: 0.7rem 1rem; border-radius: var(--radius-m); font-size: var(--step--1); line-height: 1.55; }
.mock__msg--user { justify-self: end; background: var(--accent-tint); color: var(--ink); border-bottom-right-radius: 4px; }
.mock__msg--bot { background: var(--paper-sunk); border-bottom-left-radius: 4px; }
.mock__meta {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  color: var(--ink-3);
  display: flex;
  gap: 0.5rem;
  align-items: center;
  padding: 0 var(--space-3) var(--space-3);
}
.mock__pill {
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 0.15rem 0.6rem;
}

/* --- Tarifs -------------------------------------------------------------- */

.price-card { position: relative; }
.price-card--featured { border-color: var(--ink); box-shadow: var(--shadow); }
.price-card__badge {
  position: absolute;
  top: calc(-1 * var(--space-2));
  left: var(--space-4);
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.2rem 0.7rem;
  border-radius: var(--radius-pill);
}
.price {
  font-family: var(--font-serif);
  font-size: var(--step-3);
  line-height: 1;
  display: block;
  margin-top: var(--space-2);
}
.price + .muted { font-size: var(--step--1); }

.check-list { list-style: none; margin: var(--space-3) 0; padding: 0; display: grid; gap: 0.55rem; font-size: var(--step--1); }
.check-list li { display: grid; grid-template-columns: 1.1rem 1fr; gap: 0.6rem; align-items: start; color: var(--ink-2); }
.check-list li::before {
  content: '';
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.2rem;
  background: var(--accent);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M13.5 4.5 6.5 12 2.5 8' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.price-card .btn { width: 100%; justify-content: center; margin-top: auto; }

/* --- Journal ------------------------------------------------------------- */

.article-meta {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  align-items: center;
}

/* Mentions séparées par « · » : chaque mention est insécable, et le point est dessiné à sa gauche.
   Celui de la première mention d'une ligne tombe hors du cadre et n'est pas affiché : la ligne
   commence net, et aucun point ne reste seul en bout de ligne. */
.meta-liste { display: flex; flex-wrap: wrap; overflow: hidden; padding-block: 0.2em; margin-block: -0.2em; }
.meta-liste > span { position: relative; margin: 0 1.2em 0 -1.2em; padding-left: 1.2em; }
/* Un élément passe à la ligne d'un bloc (flex-wrap) ; il ne se coupe en deux que s'il est plus long
   que la ligne entière (« Prix et taux relevés le 22 novembre 2026 » sur un téléphone de 320 px).
   Avec `nowrap`, ce texte-là était tronqué. La date, elle, ne se coupe jamais. */
.meta-liste > span > :is(time, strong) { white-space: nowrap; }
.meta-liste > span::before { content: '·'; content: '·' / ''; position: absolute; left: 0.3em; }

.post-list { display: grid; gap: 0; }
.post-item {
  display: grid;
  gap: 0.35rem var(--space-4);
  padding-block: var(--space-4);
  border-top: 1px solid var(--line);
  text-decoration: none;
  align-items: start;
}
@media (min-width: 800px) {
  .post-item { grid-template-columns: 12rem minmax(0, 1fr); }
}
.post-item:last-child { border-bottom: 1px solid var(--line); }
.post-item h3 { margin: 0; transition: color 0.15s ease; }
.post-item:hover h3 { color: var(--accent); }
.post-item p { margin: 0.4rem 0 0; color: var(--ink-2); max-width: var(--measure); }

.featured-post {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  background: var(--paper-raised);
  text-decoration: none;
}
.featured-post h2 { margin: 0; max-width: 20ch; }

/* --- Prose (corps d'article) -------------------------------------------- */

.article-title {
  font-size: var(--step-4);
  font-variation-settings: 'opsz' 40;
  max-width: 20ch;
  margin-top: var(--space-3);
}

.prose { max-width: var(--measure); font-size: var(--step-0); line-height: 1.65; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 {
  font-size: var(--step-3);
  margin-top: 2.2em;
  margin-bottom: 0;
  font-variation-settings: 'opsz' 30;
}
.prose h3 { font-size: var(--step-2); margin-top: 1.8em; margin-bottom: 0; }
.prose h2 + *, .prose h3 + * { margin-top: 0.6em; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li + li { margin-top: 0.4em; }
/* Deux sortes de citation. L'exergue : une phrase à retenir, en grande serif italique.
   L'encart : tout le reste (définition, analogie, calcul), en corps de texte sur un fond
   discret, pour que les longs passages restent lisibles, surtout sur téléphone. */
.prose blockquote { margin: 1.6em 0; color: var(--ink); }
.prose blockquote.exergue {
  padding-left: var(--space-3);
  border-left: 2px solid var(--accent);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: var(--step-1);
  line-height: 1.4;
}
.prose blockquote.encart {
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-m);
  background: var(--paper-sunk);
  font-size: var(--step--1);
  line-height: 1.6;
  color: var(--ink-2);
}
.prose blockquote.encart > :first-child { margin-top: 0; }
.prose blockquote.encart > :last-child { margin-bottom: 0; }
.prose blockquote.encart p + p { margin-top: 0.7em; }
.prose blockquote.encart strong:first-child { color: var(--accent); }

/* Une citation peut désormais contenir des tableaux, des listes et du code.
   Le corps italique en grande serif convient à une phrase mise en exergue,
   pas à une table de comparaison : on y revient au corps de texte normal. */
.prose blockquote table,
.prose blockquote ul,
.prose blockquote ol,
.prose blockquote pre {
  font-family: var(--font-sans);
  font-style: normal;
  font-size: var(--step--1);
  line-height: 1.55;
}
.prose blockquote.encart :is(table, ul, ol) { margin-block: var(--space-2); }
.prose blockquote pre, .prose blockquote code { font-family: var(--font-mono); }
.prose blockquote table { margin-block: var(--space-3); }
.prose blockquote .table-wrap { background: transparent; }
.prose a { color: var(--accent); text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent); }
/* Tout bloc de code défile dans son cadre, où qu'il se trouve. La règle ne
   visait que .prose : un <pre> posé dans une carte hors prose faisait alors
   défiler la page entière sur téléphone. */
pre {
  overflow-x: auto;
  max-width: 100%;
}

.prose pre {
  background: var(--paper-sunk);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: var(--space-3);
  overflow-x: auto;
  font-size: var(--step--1);
  line-height: 1.55;
}
.prose :not(pre) > code {
  background: var(--paper-sunk);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0.1em 0.35em;
  /* Un identifiant long — `coût_inférence_sur_toute_la_durée_de_vie` — ne
     comporte aucun espace, et le navigateur ne coupe pas sur un tiret bas :
     sans cette règle, il fait défiler la page entière sur téléphone.
     `break-word` et non `anywhere` : ce dernier autorise la coupure au milieu
     d'un mot court dès que la colonne est étroite, et découpait « medium »
     en « mediu / m » dans un tableau. */
  overflow-wrap: break-word;
}
.prose img { border-radius: var(--radius-m); border: 1px solid var(--line); }
.prose hr { margin: 2.5em 0; }

/* --- Pied de page -------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: var(--space-6) var(--space-4);
  margin-top: var(--space-7);
}
/* Une page qui finit par une section a déjà sa respiration en bas : la marge du pied de page
   s'y ajoutait et laissait une bande vide. Après un panneau, son filet du bas suffit. */
main:has(> .section:last-child) + .site-footer { margin-top: 0; }
main:has(> .panel:last-child) + .site-footer { border-top: 0; }
.footer-grid { display: grid; gap: var(--space-5); }
@media (min-width: 800px) {
  .footer-grid { grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr)); }
}
.footer-tagline { margin-top: 0.75rem; max-width: 34ch; }
.footer-social { display: flex; gap: var(--space-2); margin: var(--space-3) 0 0; }
.footer-social__lien {
  display: inline-grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  color: var(--ink-2);
}
.footer-social__lien svg { width: 1.05rem; height: 1.05rem; }
.footer-social__lien:hover { color: var(--accent); border-color: var(--accent); }
.footer-maj { color: var(--ink-2); text-decoration: none; }
.footer-maj:hover { color: var(--ink); text-decoration: underline; }
.footer-col h4 {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: var(--space-2);
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.footer-col a { font-size: var(--step--1); text-decoration: none; color: var(--ink-2); }
.footer-col a:hover { color: var(--ink); text-decoration: underline; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-5);
  padding-top: var(--space-3);
  border-top: 1px solid var(--line);
  font-size: var(--step--2);
  color: var(--ink-3);
}

/* --- Motif « strates » --------------------------------------------------- */

.strata { width: 100%; height: auto; color: var(--accent); }
.strata__ice { fill: var(--frost); }
.strata__snow { fill: var(--paper-sunk); }

/* --- Utilitaires --------------------------------------------------------- */

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.center { text-align: center; margin-inline: auto; }
.center .lead { margin-inline: auto; }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
.no-underline { text-decoration: none; }

/* Apparition douce au défilement (désactivée si mouvement réduit). */
/* L'effet n'existe que si JavaScript a pu s'exécuter (voir theme.js) : sinon le
   contenu doit rester visible, sans dépendre de l'observateur d'intersection. */
@media (prefers-reduced-motion: no-preference) {
  [data-js='true'] .reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.3s ease, transform 0.3s ease;
  }
  [data-js='true'] .reveal[data-visible='true'] { opacity: 1; transform: none; }
  [data-js='true'] .reveal[data-instant='true'] { transition: none; }
}

@media print {
  .site-header, .site-footer, .btn-row, .nav-toggle { display: none !important; }
  body { background: #fff; color: #000; }
}


/* --- Manuel : sommaire des chapitres -------------------------------------- */

.container--large { width: min(100% - 2.5rem, 900px); margin-inline: auto; }

.chapitres { display: grid; gap: 0; }

.chap {
  display: grid;
  gap: 0.2rem 1.25rem;
  grid-template-columns: 2.5rem minmax(0, 1fr) 4rem;
  align-items: baseline;
  padding-block: var(--space-3);
  border-top: 1px solid var(--line);
  text-decoration: none;
  transition: background-color 0.15s ease;
}
.chap:last-child { border-bottom: 1px solid var(--line); }
.chap:hover { background: var(--paper-sunk); }
.chap:hover .chap__titre { color: var(--accent); }

.chap__num,
.chap__duree {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.06em;
  color: var(--ink-3);
}
.chap__duree { text-align: right; white-space: nowrap; }
.chap__corps { display: grid; gap: 0.2rem; }
.chap__titre {
  font-family: var(--font-serif);
  font-size: var(--step-2);
  line-height: 1.2;
  transition: color 0.15s ease;
}
.chap__desc { font-size: var(--step--1); color: var(--ink-2); max-width: var(--measure); }

@media (max-width: 640px) {
  .chap { grid-template-columns: 2.5rem minmax(0, 1fr); }
  .chap__duree { grid-column: 2; text-align: left; }
}

/* Les trois portes d'entrée */
.chemin { margin: var(--space-2) 0 0; padding-left: 1.1rem; font-size: var(--step--1); }
.chemin li { margin-bottom: 0.25rem; }
.chemin a { color: var(--accent); text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent); }

/* --- Manuel : page de chapitre -------------------------------------------- */

.chapitre__tete { margin-bottom: var(--space-5); }
.chapitre__tete .lead { max-width: var(--measure); }

.sommaire-local {
  margin-top: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--paper-sunk);
  max-width: var(--measure);
}
.sommaire-local__titre {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 0.6rem;
}
.sommaire-local ol {
  margin: 0;
  padding-left: 1.2rem;
  columns: 2;
  column-gap: var(--space-4);
  font-size: var(--step--1);
}
@media (max-width: 640px) { .sommaire-local ol { columns: 1; } }
.sommaire-local li { margin-bottom: 0.3rem; break-inside: avoid; }
.sommaire-local a { color: var(--ink-2); text-decoration: none; }
.sommaire-local a:hover { color: var(--accent); text-decoration: underline; }

/* Cibles tactiles.
   Au doigt, un lien de 18 px de haut est une loterie. Sur un pointeur grossier
   — donc sur téléphone — on donne à chaque entrée du sommaire la hauteur
   recommandée de 44 px, sans rien changer au rendu à la souris. */
/* Deux déclencheurs : l'écran étroit — le cas du téléphone, et le seul qui soit
   vérifiable automatiquement — et le pointeur grossier, qui rattrape les
   tablettes et les écrans tactiles larges. */
@media (max-width: 820px), (pointer: coarse) {
  .sommaire-local ol { padding-left: 1.1rem; }
  .sommaire-local li { margin-bottom: 0; }
  .sommaire-local a {
    display: block;
    padding: 0.62rem 0;
    line-height: 1.35;
  }
  .sommaire-local li + li a { border-top: 1px solid var(--line); }
  .btn--small { min-height: 44px; padding-inline: 1rem; }
}

/* Navigation d'un chapitre à l'autre */
.suite { display: grid; gap: var(--space-3); }
@media (min-width: 700px) { .suite { grid-template-columns: 1fr 1fr; } }

.suite__lien {
  display: grid;
  gap: 0.3rem;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  text-decoration: none;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.suite__lien:hover { border-color: var(--line-strong); background: var(--paper-raised); }
.suite__lien--suiv { text-align: right; }
.suite__sens {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.suite__titre { font-family: var(--font-serif); font-size: var(--step-1); line-height: 1.25; }

/* Le corps des chapitres est dense : on aère les tableaux et les titres. */
.prose h2 { padding-top: 0.4em; border-top: 1px solid var(--line); }
.prose h2:first-child { border-top: 0; padding-top: 0; }
.prose .table-wrap { margin-block: 1.4em; }
.prose table { min-width: 0; font-size: var(--step--1); }

/* --- Laboratoire : liste des programmes ----------------------------------- */

.phases { display: grid; gap: 0; }
.phase {
  display: grid;
  gap: 0.6rem var(--space-4);
  padding-block: var(--space-4);
  border-top: 1px solid var(--line);
  align-items: start;
}
.phase:last-child { border-bottom: 1px solid var(--line); }
@media (min-width: 760px) { .phase { grid-template-columns: 11rem minmax(0, 1fr); } }

.phase__marge { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.phase__duree {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  color: var(--accent);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 0.15rem 0.6rem;
  max-width: 100%;
}
.phase__corps h3 { margin: 0 0 0.5rem; }
.phase__corps > p { margin: 0 0 0.7rem; max-width: var(--measure); color: var(--ink-2); }
.phase__detail { font-size: var(--step--1); color: var(--ink-3) !important; }
.phase__concept { margin: 0 !important; }
.phase__concept a {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
}
.phase__concept a::before { content: '↳ '; }
.phase__concept a:hover { text-decoration: underline; }

/* --- Schémas dans les chapitres ------------------------------------------- */

.schema {
  margin: 2em 0;
  padding: var(--space-4) var(--space-3) var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--paper-raised);
}
.schema svg { width: 100%; height: auto; color: var(--ink); }
.schema figcaption {
  margin-top: var(--space-3);
  padding-top: var(--space-2);
  border-top: 1px solid var(--line);
  font-size: var(--step--1);
  color: var(--ink-3);
  text-align: center;
}
.prose .schema { max-width: none; }

/* --- Infobulles de vocabulaire -------------------------------------------- */

.terme {
  text-decoration: none;
  border-bottom: 1px dashed color-mix(in srgb, var(--accent) 55%, transparent);
  cursor: help;
  transition: background-color 0.15s ease;
}
.terme:hover,
.terme:focus-visible { background: var(--accent-tint); }

.bulle {
  position: absolute;
  z-index: 80;
  max-width: min(22rem, calc(100vw - 2rem));
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-m);
  background: var(--paper-raised);
  box-shadow: var(--shadow);
  font-family: var(--font-sans);
  font-size: var(--step--1);
  font-style: normal;
  line-height: 1.5;
  color: var(--ink);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.12s ease, transform 0.12s ease;
  pointer-events: none;
}
.bulle[data-visible='true'] { opacity: 1; transform: none; }
.bulle__terme {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.35rem;
}

/* --- Progression de lecture ------------------------------------------------ */

.progression {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 60;
  background: transparent;
  pointer-events: none;
}
.progression__part {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.1s linear;
}

.reprise {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: var(--space-4);
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--accent);
  border-radius: var(--radius-m);
  background: var(--accent-tint);
  font-size: var(--step--1);
}
.reprise .btn { padding: 0.45rem 0.9rem; }
.reprise__fermer {
  margin-left: auto;
  border: 0;
  background: none;
  font: inherit;
  font-size: 1.2rem;
  line-height: 1;
  color: var(--ink-3);
  cursor: pointer;
}
.reprise__fermer:hover { color: var(--ink); }

/* Jauge par chapitre, sur le sommaire */
.chap { position: relative; }
.chap__jauge {
  grid-column: 1 / -1;
  display: block;
  height: 3px;
  margin-top: 0.5rem;
  border-radius: 2px;
  background: var(--line);
  overflow: hidden;
}
.chap__jauge > span { display: block; height: 100%; background: var(--accent); }
.chap[data-lu='fini'] .chap__num::after {
  content: ' ✓';
  color: var(--accent);
}

/* --- Commandes à copier ---------------------------------------------------- */

.commande {
  background: var(--paper-sunk);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-s);
  padding: 0.7rem 0.9rem;
  margin: 0 0 var(--space-3);
  overflow-x: auto;
  font-size: var(--step--1);
  line-height: 1.6;
}
.phase__num {
  font-family: var(--font-mono);
  font-size: var(--step-2);
  line-height: 1;
  color: var(--line-strong);
}
.phase .check-list { margin-top: 0.5rem; }

/* --- Recherche dans le carnet --------------------------------------------- */

.hero--court { padding-block: clamp(2.5rem, 1.6rem + 4vw, 4.5rem) var(--space-4); }

.recherche { margin-top: var(--space-4); }
.recherche input {
  width: 100%;
  padding: 0.9rem 1.1rem;
  font: inherit;
  font-size: var(--step-1);
  color: var(--ink);
  background: var(--paper-raised);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-m);
}
.recherche input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.recherche__etat {
  margin: 0.6rem 0 0;
  font-size: var(--step--1);
  color: var(--ink-3);
  min-height: 1.4em;
}

.recherche__pistes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin: var(--space-3) 0 0;
  font-size: var(--step--1);
  color: var(--ink-3);
}
.piste {
  font: inherit;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
}
.piste:hover { border-color: var(--accent); color: var(--accent); }

/* --- Résultats de recherche (page et barre) -------------------------------- */

.resultats { margin-top: var(--space-5); display: grid; gap: 0; }
.res {
  display: block;
  padding: var(--space-3) 0.75rem;
  border-top: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  scroll-margin-block: 0.5rem;
}
.resultats .res:last-child { border-bottom: 1px solid var(--line); }
.res:hover, .res--actif { background: var(--paper-sunk); }
.res--actif { box-shadow: inset 3px 0 0 var(--accent); }
.res__type {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}
.res__titre {
  display: block;
  font-family: var(--font-serif);
  font-size: var(--step-1);
  line-height: 1.25;
  margin: 0.15rem 0 0.3rem;
}
.res__dev { font-family: var(--font-sans); font-size: var(--step--1); color: var(--ink-3); }
.res__texte { display: block; font-size: var(--step--1); color: var(--ink-2); max-width: var(--measure); }
.res__texte mark {
  background: var(--accent-tint);
  color: var(--ink);
  padding: 0 0.15em;
  border-radius: 3px;
}
.res__suite { display: block; margin-top: 0.35rem; font-size: var(--step--2); color: var(--accent); }
.res--def { background: var(--accent-tint); border-radius: var(--radius-m); border-top: 0; margin-bottom: 0.5rem; }
.res--def:hover, .res--def.res--actif { background: var(--accent-tint); box-shadow: inset 3px 0 0 var(--accent); }
.res--tous { text-align: center; }
.res--tous .res__titre { font-family: var(--font-sans); font-size: var(--step--1); color: var(--accent); margin: 0; }
.res--raccourci .res__titre { font-size: var(--step-0); margin-bottom: 0.1rem; }
.res__intro, .res__note {
  margin: var(--space-3) 0.75rem 0.4rem;
  font-size: var(--step--1);
  color: var(--ink-3);
}
.res__vide { padding: var(--space-3) 0.75rem; }
.res__vide p { margin: 0 0 0.5rem; }

/* --- Barre de recherche, ouverte depuis toutes les pages -------------------- */

.search-open {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 2.4rem;
  padding: 0 0.7rem;
  font: inherit;
  font-size: var(--step--1);
  color: var(--ink-2);
  background: var(--paper-raised);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  cursor: pointer;
}
.search-open:hover { color: var(--ink); border-color: var(--accent); }
.search-open svg { width: 18px; height: 18px; flex: none; }
.search-open__texte, .search-open__touche { display: none; }
@media (min-width: 900px) {
  .search-open { min-width: 11rem; }
  .search-open__texte { display: inline; }
  .search-open__touche {
    display: inline-block;
    margin-left: auto;
    padding: 0 0.4rem;
    font-family: var(--font-mono);
    font-size: var(--step--2);
    color: var(--ink-3);
    border: 1px solid var(--line);
    border-radius: 4px;
  }
}
/* Entre 960 et 1099 px, la recherche se réduit à la loupe. */
@media (min-width: 960px) and (max-width: 1099px) {
  .search-open { min-width: 0; width: 2.4rem; padding: 0; justify-content: center; }
  .search-open__texte, .search-open__touche { display: none; }
}
@media (max-width: 699px) {
  .search-open { width: 2.4rem; padding: 0; justify-content: center; border-color: var(--line-strong); }
}
/* Dès 400 px, le bouton redit son nom : la recherche doit se voir. */
@media (min-width: 400px) and (max-width: 699px) {
  .search-open { width: auto; padding: 0 0.7rem; }
  .search-open__texte { display: inline; }
}

/* Accueil : la recherche est la première chose proposée aux lecteurs pressés. */
.accueil__texte, .rapide { min-width: 0; }
.rapide { margin: var(--space-4) 0 var(--space-3); width: 100%; max-width: min(100%, 34rem); }
.rapide__champ {
  display: flex; align-items: center; gap: 0.7rem; width: 100%; min-width: 0;
  min-height: 3.2rem; padding: 0.5rem 0.9rem;
  font: inherit; font-size: var(--step-0); text-align: left;
  color: var(--ink-2); background: var(--paper-raised);
  border: 2px solid var(--accent); border-radius: var(--radius-pill);
  cursor: text; box-shadow: 0 1px 0 var(--line);
}
.rapide__champ:hover { color: var(--ink); }
.rapide__champ svg { width: 22px; height: 22px; flex: none; color: var(--accent); }
.rapide__texte { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; }
/* Si le texte ne tient pas (écran très étroit), il s'efface en douceur au lieu d'être coupé net. */
@supports (mask-image: linear-gradient(#000, #000)) or (-webkit-mask-image: linear-gradient(#000, #000)) {
  .rapide__texte { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 1.5rem), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 1.5rem), transparent); }
}
.rapide__touche {
  padding: 0 0.45rem; font-family: var(--font-mono); font-size: var(--step--1);
  color: var(--ink-3); border: 1px solid var(--line); border-radius: 4px;
}
@media (max-width: 699px) { .rapide__touche { display: none; } }
.rapide__sugg { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin: 0.7rem 0 0; font-size: var(--step--1); color: var(--ink-3); }
.rapide__puce {
  font: inherit; padding: 0.3rem 0.7rem; color: var(--ink-2);
  background: transparent; border: 1px solid var(--line-strong); border-radius: var(--radius-pill); cursor: pointer;
}
.rapide__puce:hover { color: var(--ink); border-color: var(--accent); }

.palette { position: fixed; inset: 0; z-index: 120; display: grid; align-items: start; justify-items: center; padding: clamp(0.5rem, 8vh, 6rem) 0.75rem 0.75rem; }
.palette[hidden] { display: none; }
.palette__fond { position: fixed; inset: 0; background: color-mix(in srgb, var(--ink) 45%, transparent); }
.palette__boite {
  position: relative;
  width: min(42rem, 100%);
  max-height: min(80vh, 40rem);
  display: flex;
  flex-direction: column;
  background: var(--paper-raised);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-m);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.palette__form { display: flex; align-items: center; gap: 0.6rem; padding: 0.4rem 0.8rem; border-bottom: 1px solid var(--line); }
.palette__loupe { display: grid; color: var(--ink-3); }
.palette__loupe svg { width: 20px; height: 20px; }
.palette__champ {
  flex: 1;
  min-width: 0;
  padding: 0.8rem 0;
  font: inherit;
  font-size: max(16px, var(--step-0));
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: none;
}
.palette__champ::-webkit-search-cancel-button { display: none; }
.palette__fermer {
  font: inherit;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  color: var(--ink-3);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.15rem 0.45rem;
  cursor: pointer;
}
.palette__corps { overflow-y: auto; overscroll-behavior: contain; padding-bottom: 0.4rem; }
.palette__pied {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 0;
  padding: 0.5rem 0.9rem;
  font-size: var(--step--2);
  color: var(--ink-3);
  border-top: 1px solid var(--line);
}
@media (max-width: 699px) { .palette__aide { display: none; } }
html.palette-ouverte { overflow: hidden; }

/* --- Compteur de progression ---------------------------------------------- */

.compteur {
  position: fixed;
  right: clamp(0.75rem, 2vw, 1.5rem);
  bottom: clamp(0.75rem, 2vw, 1.5rem);
  z-index: 55;
  display: flex;
  align-items: baseline;
  gap: 0.3rem;
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--paper-raised) 92%, transparent);
  box-shadow: var(--shadow);
  font-family: var(--font-mono);
  font-size: var(--step--2);
  color: var(--ink-3);
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.compteur[data-visible='true'] { opacity: 1; transform: none; }

/* Sur écran étroit, seul le chiffre : le mot « lu » prend de la place pour rien. */
@media (max-width: 640px) {
  .compteur { padding: 0.35rem 0.6rem; }
  .compteur__mot { display: none; }
  .compteur[data-fini='true'] .compteur__valeur::after { content: ' ✓'; }
}
.compteur__valeur { font-size: var(--step--1); color: var(--ink); font-variant-numeric: tabular-nums; }
.compteur[data-fini='true'] { border-color: var(--accent); }
.compteur[data-fini='true'] .compteur__valeur { color: var(--accent); }
.compteur[data-fini='true'] .compteur__mot::before { content: '✓ '; }

@media print { .compteur, .progression, .teinte { display: none !important; } }

/* Pourcentage par chapitre, sur le sommaire */
.chap__pct {
  display: block;
  margin-top: 0.25rem;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

/* --- Garde-fou anti-débordement -------------------------------------------- */

/* Un enfant de grille refuse par défaut de passer sous la largeur de son
   contenu (`min-width: auto`). Un bloc de code long fait alors déborder toute
   la page sur mobile. On l'autorise explicitement à rétrécir : les éléments
   larges (tableaux, blocs de code) défilent alors dans leur propre cadre. */
.split > *,
.grid > *,
.stack > *,
.phase__corps,
.chap__corps,
.chapitre { min-width: 0; }

pre, .commande { max-width: 100%; }

/* Sous-listes : on les distingue sans les enfoncer davantage. */
.prose li > ul,
.prose li > ol {
  margin-top: 0.4em;
  padding-left: 1em;
  font-size: 0.96em;
}
.prose li > ul li { margin-top: 0.25em; }

/* --- Calculateur de dimensionnement ---------------------------------------- */

.calc {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--paper-raised);
}
@media (min-width: 760px) { .calc { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .calc { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Étiquette, menu et aide sur trois rangées communes (subgrid) : une étiquette qui passe sur
   deux lignes ne décale plus le menu de sa colonne. */
.calc__champ { display: grid; gap: 0.35rem; min-width: 0; align-content: start; }
@supports (grid-template-rows: subgrid) {
  @media (min-width: 760px) { .calc__champ { grid-row: span 3; grid-template-rows: subgrid; row-gap: 0.35rem; } }
}
.calc__champ label { align-self: end; }
.calc__aide { margin: 0; font-size: var(--step--2); line-height: 1.4; color: var(--ink-3); }
.calc__champ label {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.calc__champ select {
  width: 100%;
  padding: 0.55rem 0.7rem;
  font: inherit;
  font-size: var(--step--1);
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-s);
}
.calc__presets {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 0.2rem;
}

.calc__resultat { margin-top: var(--space-4); }
.calc__deux { display: grid; gap: var(--space-3); }
@media (min-width: 760px) { .calc__deux { grid-template-columns: 1fr 1fr; } }

.calc__carte {
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--paper-raised);
  min-width: 0;
}
.calc__carte:last-child { border-color: var(--accent); }
.calc__etiquette {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.calc__gpu {
  font-family: var(--font-serif);
  font-size: var(--step-3);
  line-height: 1.1;
  margin: 0.3rem 0 var(--space-3);
}
.calc__detail {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.25rem 0.9rem;
  margin: 0 0 var(--space-3);
  font-size: var(--step--1);
}
.calc__detail dt { color: var(--ink-3); }
.calc__detail dd { margin: 0; text-align: right; }
.calc__pourquoi { font-size: var(--step--1); color: var(--ink-2); margin: 0 0 0.5rem; }
.calc__note { font-size: var(--step--2); color: var(--ink-3); margin: 0; }
.calc__impossible { font-size: var(--step--1); color: var(--ink-2); }
.calc__hors td { opacity: 0.45; }
.calc__deux--un { grid-template-columns: 1fr; }
.calc__deux--un .calc__carte { border-color: var(--accent); }
/* Sur une carte pleine largeur, la liste de définitions s'étirerait jusqu'aux
   deux bords : on la borne pour que l'étiquette et sa valeur restent liées. */
.calc__deux--un .calc__detail { max-width: 48rem; }

/* --- Soutien -------------------------------------------------------------- */
/* Discret par construction : un filet, pas un encart publicitaire. Il apparaît
   en fin de chapitre, quand le lecteur vient d'en tirer quelque chose. */
.soutien {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: var(--space-5);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-m);
  background: var(--paper-raised);
}
.soutien__texte { min-width: 0; flex: 1 1 20rem; }
.soutien__titre {
  margin: 0 0 0.2rem;
  font-family: var(--font-serif);
  font-size: var(--step-1);
  line-height: 1.25;
}
.soutien__note {
  margin: 0;
  font-size: var(--step--1);
  color: var(--ink-3);
  max-width: 52ch;
}
.soutien--large { margin-top: var(--space-4); padding: var(--space-4); }

.reprise__section { font-style: italic; }

/* Bouton « nu » : une action secondaire qui doit rester lisible sans concurrencer
   l'action principale posée juste à côté. */
.btn--nu {
  background: none;
  border-color: transparent;
  color: var(--ink-3);
}
.btn--nu:hover { color: var(--ink); border-color: var(--line-strong); }

/* Réinitialisation : en tête de chapitre, en pied de chapitre, et sur le
   sommaire pour l'ensemble du carnet. */
.reinit-haut { margin: var(--space-3) 0 0; }
.reinit-bas { margin: var(--space-5) 0 var(--space-3); }
.reinit-site { margin: var(--space-3) 0 var(--space-2); }

/* Une fois armé, le bouton annonce clairement qu'un second clic détruit. */
[data-arme] {
  border-color: var(--sun) !important;
  color: var(--sun) !important;
}
.btn:disabled {
  opacity: 0.55;
  cursor: default;
  transform: none;
}
@media (max-width: 560px) {
  .soutien .btn { width: 100%; justify-content: center; }
}

/* Niveau de confiance d'une constante d'architecture : « publiée » signifie
   lue dans le dépôt du modèle, « annoncée » signifie extrapolée. La distinction
   compte assez pour être visible dans le tableau comme dans le résultat. */
.calc__conf {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.3;
  padding: 0.15em 0.5em;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  background: color-mix(in srgb, var(--text) 7%, transparent);
}
.calc__conf--ok {
  color: color-mix(in srgb, var(--accent) 80%, var(--text));
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}
.calc__detail sup { font-size: 0.7em; }

/* Suivi éditorial : règles, journal des mises à jour, vérification d'un chapitre.
   Les couleurs viennent des variables du thème : le mode sombre suit sans rien de plus. */

.regles {
  margin: var(--space-3) 0 0;
  padding-left: 1.2rem;
  display: grid;
  gap: var(--space-2);
  max-width: var(--measure);
  color: var(--ink-2);
}
.regles strong { color: var(--ink); }

.journal { margin: var(--space-3) 0 0; max-width: var(--measure); }
.journal__totaux { display: flex; flex-wrap: wrap; gap: var(--space-1); margin: var(--space-3) 0 0; }
.journal__types { max-width: var(--measure); }
.journal__legende { display: grid; gap: var(--space-1); margin: var(--space-2) 0 0; }
.journal__legende div { display: grid; grid-template-columns: 7rem 1fr; gap: var(--space-2); align-items: baseline; }
.journal__legende dt { margin: 0; font-weight: 600; color: var(--ink); }
.journal__legende dd { margin: 0; color: var(--ink-2); }
@media (max-width: 30rem) {
  .journal__legende div { grid-template-columns: 1fr; gap: 0; }
  .maj-resume { gap: var(--space-1); }
}
.journal__aide { margin: var(--space-3) 0 0; font-size: var(--step--1); color: var(--ink-3); max-width: var(--measure); }
.journal__jour { border-top: 1px solid var(--line); }
.journal__jour:last-child { border-bottom: 1px solid var(--line); }
.journal__jour > summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--space-2);
  align-items: baseline;
  padding: var(--space-2) 0;
  cursor: pointer;
}
.journal__jour > summary { list-style: none; }
.journal__jour > summary::-webkit-details-marker { display: none; }
.journal__jour > summary::before { content: '▸'; color: var(--ink-3); transition: transform 0.15s; }
.journal__jour[open] > summary::before { transform: rotate(90deg); }
.journal__date { font-family: var(--font-mono); font-size: var(--step--1); letter-spacing: 0.04em; color: var(--ink); font-weight: 600; }
.journal__compte { font-size: var(--step--1); color: var(--ink-3); }
.journal__liste { list-style: none; margin: 0 0 var(--space-4); padding: 0; display: grid; gap: var(--space-3); }
.journal__entree { display: grid; gap: var(--space-1); }
.journal__entree h3 { margin: 0; font-size: var(--step-1); }
.journal__entree h3 .tag { vertical-align: 0.15em; margin-right: 0.25em; }
.journal__court { margin: 0; color: var(--ink-2); }
.tag--correction { background: var(--accent-tint); color: var(--accent); }
.tag--donnees { background: var(--frost); color: var(--ink); }
.tag--ajout { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.tag--site { background: var(--paper-sunk); color: var(--ink-2); }
.journal__details { font-size: var(--step--1); color: var(--ink-2); }
.journal__details summary { cursor: pointer; color: var(--ink-3); }
.journal__details p { margin: var(--space-1) 0 0; }
.journal__details ul { margin: var(--space-1) 0 0; padding-left: 1.2rem; }
.maj-resume { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: var(--space-3) 0 0; padding: 0; list-style: none; }
.maj-resume li { padding: var(--space-1) var(--space-2); border: 1px solid var(--line); border-radius: var(--radius-pill); font-size: var(--step--1); color: var(--ink-2); }

.verification {
  margin: var(--space-5) 0 var(--space-4);
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--paper-raised);
  font-size: var(--step--1);
}
.citer { margin-top: var(--space-4); padding: var(--space-3) var(--space-4); border: 1px solid var(--line); border-radius: var(--radius-m); font-size: var(--step--1); }
.citer p { margin: 0 0 var(--space-1); color: var(--ink-2); }
.verification__titre { margin: 0 0 var(--space-1); font-size: var(--step-0); }
.verification p { margin: 0 0 var(--space-1); color: var(--ink-2); }
.verification ul { margin: 0; padding-left: 1.2rem; color: var(--ink-2); }

/* Compteur de lecteurs en ligne (en-tête) : une pastille discrète qui ne montre que le nombre
   (la phrase complète est dans `title` et `aria-label`). Sans effet tant qu'elle est cachée. */
.presence {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
  white-space: nowrap;
}
.presence[hidden] { display: none; }
.presence__point {
  display: inline-block;
  width: 0.5em;
  height: 0.5em;
  margin-right: 0.4em;
  border-radius: 50%;
  background: var(--accent);
}
@media (prefers-reduced-motion: no-preference) {
  .presence__point { animation: presence-pouls 2.4s ease-in-out infinite; }
}
@keyframes presence-pouls {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* --- Mise en page « documentation » : chapitres ----------------------------
   Trois colonnes sur grand écran : chapitres du carnet, texte, « sur cette
   page ». Sous 1100 px, la colonne de gauche disparaît ; sous 1280 px, celle de
   droite aussi (le sommaire en tête de chapitre reste visible). */
.doc__grille {
  width: min(100% - 2.5rem, 81.25rem);
  margin-inline: auto;
  display: grid;
  gap: var(--space-5);
  grid-template-columns: minmax(0, 1fr);
}
.doc-nav, .doc-toc { display: none; }
.chapitre { min-width: 0; max-width: 51.25rem; margin-inline: auto; width: 100%; }

@media (min-width: 1100px) {
  .doc__grille { grid-template-columns: 15.625rem minmax(0, 1fr); }
  .doc-nav {
    display: block;
    position: sticky;
    top: 5.5rem;
    align-self: start;
    max-height: calc(100vh - 7rem);
    overflow-y: auto;
    padding-right: var(--space-2);
    border-right: 1px solid var(--line);
    font-size: var(--step--1);
  }
  .chapitre { margin-inline: 0; }
}
@media (min-width: 1280px) {
  .doc__grille { grid-template-columns: 15.625rem minmax(0, 1fr) 13.75rem; }
  .doc-toc {
    display: block;
    position: sticky;
    top: 5.5rem;
    align-self: start;
    max-height: calc(100vh - 7rem);
    overflow-y: auto;
    font-size: var(--step--1);
  }
  .doc .sommaire-local { display: none; }
}

.doc-nav__titre, .doc-toc__titre {
  margin: 0 0 var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.doc-nav__titre a { color: inherit; text-decoration: none; }
.doc-nav ol, .doc-toc ul { list-style: none; margin: 0; padding: 0; }
.doc-nav a, .doc-toc a {
  display: flex;
  gap: 0.6rem;
  padding: 0.38rem 0.6rem;
  border-radius: var(--radius-s);
  color: var(--ink-2);
  text-decoration: none;
  line-height: 1.35;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.doc-nav a:hover, .doc-toc a:hover { background: var(--paper-sunk); color: var(--ink); }
.doc-nav a[aria-current='page'] {
  background: var(--accent-tint);
  color: var(--accent);
  font-weight: 600;
}
.doc-nav__num { font-family: var(--font-mono); font-size: var(--step--2); color: var(--ink-3); padding-top: 0.12rem; }
.doc-nav a[aria-current='page'] .doc-nav__num { color: inherit; }
.doc-nav__liens { display: grid; gap: 0.1rem; margin: var(--space-3) 0 0; padding-top: var(--space-2); border-top: 1px solid var(--line); }
.doc-toc { border-left: 1px solid var(--line); padding-left: var(--space-2); }
.doc-toc a { padding: 0.3rem 0.5rem; border-radius: 0; }
.doc-toc a[aria-current='true'] { color: var(--accent); box-shadow: inset 2px 0 0 var(--accent); margin-left: calc(-1 * var(--space-2) - 1px); padding-left: calc(var(--space-2) + 0.5rem); }

.chapitre__tete .article-title { text-wrap: balance; }
.chapitre__tete .article-meta { margin-bottom: var(--space-2); }

/* --- Habillage : héros et en-tête --------------------------------------- */
.hero { position: relative; isolation: isolate; }
.hero::before {
  content: '';
  position: absolute;
  inset: -6rem 0 -4rem;
  z-index: -1;
  background: radial-gradient(55% 70% at 80% 10%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 70%);
  -webkit-mask-image: linear-gradient(#000 55%, transparent);
  mask-image: linear-gradient(#000 55%, transparent);
  pointer-events: none;
}
.hero__grille { display: grid; gap: var(--space-5); align-items: center; }
@media (min-width: 960px) { .hero__grille { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); } }
.hero__visuel { margin: 0; }
.hero__visuel figcaption { margin-top: var(--space-2); font-size: var(--step--2); color: var(--ink-3); max-width: 44ch; }
.suivant {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow), 0 24px 60px -30px color-mix(in srgb, var(--accent) 45%, transparent);
  overflow: hidden;
  text-align: left;
}
.suivant__barre {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--line);
  background: var(--paper-sunk);
  font-family: var(--font-mono);
  font-size: var(--step--2);
  color: var(--ink-3);
}
.suivant__barre i { width: 0.7rem; height: 0.7rem; border-radius: 50%; background: #ff5f57; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.14); }
.suivant__barre i:nth-child(2) { background: #febc2e; }
.suivant__barre i:nth-child(3) { background: #28c840; }
.suivant__barre span { margin-left: auto; letter-spacing: 0.04em; }
.suivant__corps { padding: var(--space-3) clamp(1rem, 0.6rem + 2vw, 1.6rem) clamp(1.1rem, 0.8rem + 1.5vw, 1.6rem); display: grid; }
.suivant__etape {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: var(--space-3) 0 0.5rem;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.03em;
  color: var(--ink-3);
}
.suivant__etape:first-child { margin-top: 0; }
.suivant__etape b {
  display: inline-grid;
  place-items: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  background: var(--accent-tint);
  color: var(--accent);
  font-weight: 600;
}
.suivant__phrase { margin: 0; font-family: var(--font-serif); font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem); line-height: 1.3; color: var(--ink); }
.suivant__phrase mark { background: none; color: var(--accent); box-shadow: inset 0 -0.14em 0 color-mix(in srgb, var(--accent) 35%, transparent); }
.suivant__phrase--fin { color: var(--ink-2); }
.suivant__phrase mark + .suivant__curseur { margin-left: 0.3em; }
.suivant__curseur { display: inline-block; width: 0.5em; height: 1em; margin-left: 0.08em; vertical-align: -0.12em; background: var(--accent); border-radius: 2px; animation: clignote 1.1s steps(2, start) infinite; }
@keyframes clignote { to { visibility: hidden; } }
.suivant__choix { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.suivant__choix li { display: grid; grid-template-columns: 4.6rem minmax(0, 1fr); align-items: center; gap: 0.75rem; font-family: var(--font-mono); font-size: var(--step--1); color: var(--ink-2); }
.suivant__piste { display: block; height: 0.8rem; border-radius: 999px; background: var(--paper-sunk); overflow: hidden; }
.suivant__piste span { display: block; height: 100%; width: var(--p); border-radius: 999px; background: color-mix(in srgb, var(--accent) 38%, var(--paper-raised)); transform-origin: left; animation: suivant-pousse 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.suivant__choix li:nth-child(2) .suivant__piste span { animation-delay: 0.08s; }
.suivant__choix li:nth-child(3) .suivant__piste span { animation-delay: 0.16s; }
.suivant__choix li:nth-child(4) .suivant__piste span { animation-delay: 0.24s; }
.suivant__mot { white-space: nowrap; }
.suivant__top { color: var(--ink); font-weight: 600; }
.suivant__top .suivant__piste span { background: var(--accent); }
@keyframes suivant-pousse { from { transform: scaleX(0); } }
@media (prefers-reduced-motion: reduce) { .suivant__curseur, .suivant__piste span { animation: none; } }
.hero__text { text-wrap: balance; letter-spacing: -0.02em; }
.card { box-shadow: 0 1px 0 rgb(255 255 255 / 40%) inset; }
.card--flat { box-shadow: none; } /* sans fond ni cadre : le liseré clair du haut ne ferait qu'un trait collé au titre */
.prose :is(h2, h3) { text-wrap: balance; scroll-margin-top: 5.5rem; }
.hero__texte { min-width: 0; }
.hero__note { display: block; }
.hero__note svg { display: inline-block; vertical-align: -0.15em; margin: 0 0.4rem 0 0; }

/* --- Bandeau de chapitre : fond sombre, arc lumineux, sommaire à points ----
   Le bandeau reste sombre dans les deux thèmes : c'est l'ouverture du chapitre,
   comme la couverture d'un livre. L'accent clair (#74c6b6) y passe 9 : 1. */
.chapitre__tete {
  --pan-fond: var(--paper-raised);
  --pan-texte: var(--ink);
  --pan-doux: var(--ink-2);
  --pan-accent: var(--accent);
  --arc-1: #3fa593;
  --arc-2: #0e5b54;
  border: 1px solid var(--line);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(1.5rem, 1rem + 2.5vw, 3rem);
  border-radius: var(--radius-l);
  background: var(--pan-fond);
  color: var(--pan-texte);
}
:root[data-theme='dark'] .chapitre__tete { --pan-fond: #14130f; --arc-1: #e8fff9; --arc-2: #74c6b6; }
.arc-c1 { stop-color: var(--arc-1); }
.arc-c2 { stop-color: var(--arc-2); }
.chapitre__arc { position: absolute; inset: auto 0 0 0; width: 100%; height: 8.5rem; z-index: -1; opacity: 0.95; }
.chapitre__tete .article-meta { color: var(--pan-doux); }
.chapitre__tete .article-title { color: var(--pan-texte); font-size: var(--step-4); margin-block: 0 var(--space-3); }
.chapitre__tete .lead { color: var(--pan-doux); }
.chapitre__tete a { color: var(--pan-accent); }

.chapitre__tete .sommaire-local {
  background: none;
  border: 0;
  border-radius: 0;
  padding: 0;
  margin-top: var(--space-5);
  max-width: none;
}
.chapitre__tete .sommaire-local__titre { color: var(--pan-doux); }
.chapitre__tete .sommaire-local ol { list-style: none; padding: 0; columns: 1; font-size: var(--step-0); }
.chapitre__tete .sommaire-local li { margin: 0; }
.chapitre__tete .sommaire-local a {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  padding: 0.4rem 0;
  color: var(--pan-texte);
  font-family: var(--font-serif);
}
.chapitre__tete .sommaire-local a:hover { color: var(--pan-accent); text-decoration: none; }
.sommaire-local__n { font-family: var(--font-mono); font-size: var(--step--1); color: var(--pan-doux); }
.sommaire-local__points { flex: 1; min-width: 1rem; border-bottom: 2px dotted color-mix(in srgb, var(--pan-doux) 55%, transparent); transform: translateY(-0.25em); }
.sommaire-local__t { text-align: right; max-width: 80%; }
.chapitre__tete .sommaire-local li + li a { border-top: 0; }
/* Le sommaire du bandeau remplace « Sur cette page » seulement en dessous de 1280 px. */
@media (min-width: 1280px) { .doc .sommaire-local { display: block; } }

/* --- Responsive : en-tête et sommaire de chapitre ------------------------- */
.site-nav a, .brand { white-space: nowrap; }
@media (max-width: 480px) {
  .chapitre__tete .sommaire-local a { display: grid; grid-template-columns: 2.4rem minmax(0, 1fr); gap: 0 0.4rem; }
  .sommaire-local__points { display: none; }
  .sommaire-local__t { text-align: left; max-width: none; }
}

/* Pages de référence (repères, glossaire) : pas de colonne de chapitres, un texte plus large
   pour les tableaux, un bandeau plus bas quand il n'a pas de sommaire. */
.doc--seule .doc__grille { width: min(100% - 2.5rem, 63.75rem); grid-template-columns: minmax(0, 1fr); }
.doc--seule .chapitre { max-width: none; margin-inline: auto; }
@media (min-width: 1280px) { .doc--seule .doc__grille { grid-template-columns: minmax(0, 1fr); } }
.chapitre__tete:not(:has(.sommaire-local)) { padding-bottom: clamp(5rem, 4rem + 3vw, 6.5rem); }
.chapitre__tete:not(:has(.sommaire-local)) .chapitre__arc { height: 6rem; }
.chapitre__arc { -webkit-mask-image: linear-gradient(transparent, #000 45%); mask-image: linear-gradient(transparent, #000 45%); }
.doc--seule .prose { max-width: none; }
.doc--seule .prose > :is(p, ul, ol, blockquote, h2, h3) { max-width: var(--measure); }

/* Schémas sur petit écran : on garde une taille de texte lisible, le schéma défile dans son cadre. */
.schema { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.schema figcaption { text-wrap: pretty; }
@media (max-width: 640px) {
  .schema { padding-inline: var(--space-2); }
  .schema svg { min-width: 700px; }
  .schema figcaption { text-align: left; font-size: var(--step--2); position: sticky; left: 0; }
}
/* Schéma étroit (viewBox ≈ 360) : tient sans défilement, même à 320 px, et reste centré en grand écran. */
.schema--etroit svg { display: block; max-width: 440px; margin-inline: auto; }
@media (max-width: 640px) { .schema--etroit svg { min-width: 0; } }
.schema--defile::before {
  content: '↔ Faire défiler le schéma';
  display: block;
  position: sticky;
  left: 0;
  margin-bottom: var(--space-1);
  font-family: var(--font-mono);
  font-size: var(--step--2);
  color: var(--ink-3);
}

/* Calculateur sur petit écran : libellé au-dessus de la valeur, titres de tableau visibles. */
@media (max-width: 560px) {
  .calc__detail { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .calc__detail dt { margin-top: 0.7rem; font-size: var(--step--2); letter-spacing: 0.04em; }
  .calc__detail dd { text-align: left; }
}
.table-wrap caption { position: sticky; left: 0; text-align: left; padding: 0.9rem 1rem 0.2rem; width: min(100%, 100vw - 3.5rem); font-size: var(--step--1); color: var(--ink-2); }

/* Bandeau de chapitre sombre dans les deux thèmes : les boutons « fantômes » y
   reprennent les couleurs du bandeau, sinon l'encre du thème clair y disparaît. */
.chapitre__tete .btn--ghost { color: var(--pan-texte); border-color: color-mix(in srgb, var(--pan-texte) 40%, transparent); background: transparent; }
.chapitre__tete .btn--ghost:hover:not(:disabled) { color: var(--pan-accent); border-color: var(--pan-accent); background: color-mix(in srgb, var(--pan-texte) 8%, transparent); }
.chapitre__tete .btn--ghost:disabled { color: var(--pan-doux); opacity: 0.8; }

/* --- Accueil : une ouverture centrée, un schéma, un arc ------------------- */
.accueil { position: relative; isolation: isolate; overflow: hidden; padding-block: clamp(2.5rem, 2rem + 3vw, 4.5rem) clamp(5rem, 4rem + 4vw, 7rem); text-align: center; --arc-1: #3fa593; --arc-2: #0e5b54; }
:root[data-theme='dark'] .accueil { --arc-1: #e8fff9; --arc-2: #74c6b6; }
.accueil .chapitre__arc { height: clamp(6rem, 13vw, 10rem); }
.accueil__texte { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; }
.accueil .hero__text { max-width: 16ch; font-size: var(--step-5, clamp(2.8rem, 2rem + 4vw, 5rem)); }
.accueil .lead { max-width: 40ch; margin-top: var(--space-3); }
.accueil .btn-row { justify-content: center; }
.accueil .hero__note { margin-top: var(--space-3); }
.accueil__scene { display: grid; justify-items: center; }
.accueil .hero__visuel { width: min(100%, 30rem); text-align: left; }
.accueil .hero__visuel figcaption { max-width: none; text-align: center; }
.titre-centre { text-align: center; display: grid; justify-items: center; }
/* Un titre de section et son contenu forment un bloc : 32 px entre les deux, pas 68
   (marge du titre plus `.mt-5`), qui laissaient un trou sous chaque titre de l'accueil. */
.titre-centre > :last-child { margin-bottom: 0; }
.titre-centre + .mt-5 { margin-top: var(--space-4); }
.titre-centre .lead { max-width: 52ch; }
.idee { max-width: 46rem; margin-inline: auto; text-align: center; display: grid; justify-items: center; gap: var(--space-3); }
.idee__texte { margin: 0; font-family: var(--font-serif); font-size: var(--step-3); line-height: 1.3; text-wrap: balance; color: var(--ink); }
.idee__texte strong { color: var(--accent); font-weight: 500; }
.panel .stat { text-align: center; }

/* Accueil, grand écran : le texte à gauche, le schéma à droite, tout au-dessus de la ligne de flottaison. */
.accueil__grille { display: grid; gap: var(--space-5); }
@media (min-width: 1040px) {
  .accueil { text-align: left; padding-block: clamp(2rem, 1.5rem + 2vw, 3.5rem) clamp(4.5rem, 3.5rem + 2.5vw, 6rem); }
  .accueil__grille { grid-template-columns: minmax(0, 1fr) minmax(0, 30rem); gap: var(--space-6); align-items: center; }
  .accueil__texte { justify-items: start; }
  .accueil .hero__text { max-width: 12ch; }
  .accueil .btn-row { justify-content: flex-start; }
  .accueil__scene { margin-top: 0; }
  .accueil .hero__visuel { width: 100%; }
}

/* Accueil : des questions concrètes, chacune mène à son chapitre. */
.questions { display: grid; gap: var(--space-2); }
@media (min-width: 720px) { .questions { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .questions { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.question {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.4rem var(--space-2);
  align-content: start;
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--paper-raised);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.question:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.question__tag { grid-column: 1 / -1; font-family: var(--font-mono); font-size: var(--step--2); letter-spacing: 0.05em; text-transform: uppercase; color: var(--accent); }
.question__q { font-family: var(--font-serif); font-size: var(--step-1); line-height: 1.25; text-wrap: balance; }
.question__fleche { align-self: end; color: var(--accent); font-size: var(--step-1); transition: transform 0.2s; }
.question:hover .question__fleche { transform: translateX(4px); }
@media (prefers-reduced-motion: reduce) { .question, .question__fleche { transition: none; } .question:hover { transform: none; } }

/* Arc plus net : un fil fin et une lueur discrète, sans grand halo diffus. */
.chapitre__arc { color: var(--arc-2); }
.accueil .chapitre__arc .arc-large { stroke-opacity: 0.06; }

/* Bandeau de chapitre : un motif net en pied, aux couleurs du site (remplace l'arc étiré). */
.chapitre__motif { display: block; width: 5.5rem; height: auto; margin-top: var(--space-4); fill: var(--arc-2); }


/* --- Recherche dans la page (Ctrl+F) ---------------------------------------- */
.trouver {
  position: fixed;
  top: 4.9rem;
  right: 1rem;
  z-index: 110;
  width: min(25rem, calc(100vw - 2rem));
  padding: 0.5rem;
  background: var(--paper-raised);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-m);
  box-shadow: var(--shadow);
}
.trouver[hidden] { display: none; }
.trouver__ligne { display: flex; align-items: center; gap: 0.3rem; }
.trouver__champ {
  flex: 1;
  min-width: 0;
  height: 2.2rem;
  padding: 0 0.6rem;
  font: inherit;
  font-size: var(--step--1);
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-s, 6px);
}
.trouver__champ:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.trouver__champ[aria-invalid='true'] { border-color: #b3261e; }
.trouver__compte { min-width: 3.6rem; text-align: center; font-family: var(--font-mono); font-size: var(--step--2); color: var(--ink-3); white-space: nowrap; }
.trouver__btn, .trouver__opt {
  display: inline-grid;
  place-items: center;
  height: 2.2rem;
  min-width: 2.2rem;
  padding: 0 0.4rem;
  font: inherit;
  font-size: var(--step--1);
  color: var(--ink-2);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
}
.trouver__btn:hover, .trouver__opt:hover { background: var(--paper-sunk); color: var(--ink); }
.trouver__options { display: flex; gap: 0.3rem; margin-top: 0.35rem; }
.trouver__opt { height: 1.9rem; font-family: var(--font-mono); font-size: var(--step--2); border-color: var(--line); }
.trouver__opt[aria-pressed='true'] { background: var(--accent); color: var(--accent-on); border-color: var(--accent); }
::highlight(trouve) { background-color: rgb(255 214 10 / 45%); color: inherit; }
::highlight(trouve-actif) { background-color: #ff8a00; color: #111; }
@media (max-width: 699px) { .trouver { top: 3.9rem; right: 0.5rem; left: 0.5rem; width: auto; } }
@media print { .trouver { display: none !important; } }

/* --- Schémas animés ---------------------------------------------------------
   Éléments d'animation invisibles par défaut ; ils n'existent qu'avec le
   mouvement autorisé. Les animations se mettent en pause hors de l'écran. */
.schema--anime .lueur, .schema--anime .pulse { opacity: 0; fill: var(--accent); }
.schema--anime .apparait, .schema--anime .trace, .schema--anime .flux, .schema--anime .croit, .schema--anime .convoi { opacity: 1; }
.schema--anime .croit { transform-box: fill-box; transform-origin: left center; }
.schema--anime .convoi { fill: var(--accent); }
@media (prefers-reduced-motion: no-preference) {
  .schema--anime:not(.en-vue) *,
  .selection-en-cours .schema--anime * { animation-play-state: paused !important; }
  .schema--anime .lueur { animation: schema-lueur 6s ease-in-out infinite; animation-delay: calc(var(--i) * 1.6s); }
  .schema--anime .flux { stroke-dashoffset: 0; animation: schema-flux 1.2s linear infinite; }
  .schema--anime .apparait { animation: schema-apparait 8s ease infinite; animation-delay: calc(var(--i) * 1.2s); animation-fill-mode: backwards; }
  .schema--anime .trace { stroke-dasharray: 1; animation: schema-trace 6s ease-in-out infinite; }
  .schema--anime .pulse { animation: schema-descend 5s ease-in-out infinite; }
  .schema--anime .flux--lent { animation-duration: 5s; }
  .schema--anime .trace { animation-delay: calc(var(--i, 0) * 1.4s); }
  /* Barre qui s'étire de zéro à sa longueur, une après l'autre. */
  .schema--anime .croit { animation: schema-croit 7s cubic-bezier(0.2, 0.7, 0.2, 1) infinite; animation-delay: calc(var(--i, 0) * 0.5s); animation-fill-mode: backwards; }
  /* Jeton qui suit un trajet : style="offset-path:path('M…')" ; --i décale les jetons. */
  .schema--anime .convoi { offset-rotate: 0deg; animation: schema-convoi 5s ease-in-out infinite; animation-delay: calc(var(--i, 0) * 1.1s); animation-fill-mode: backwards; }
}
/* Fin de lecture (app.js) : chaque élément se pose à la fin de son cycle. Ceux qui n'existent que
   pour le mouvement s'arrêtent invisibles ; ceux qui portent une information réapparaissent en fondu. */
@media (prefers-reduced-motion: no-preference) {
  .schema--anime :is(.flux, .lueur, .pulse).schema-fin { animation: none; }
  .schema--anime :is(.apparait, .trace, .croit, .convoi).schema-fin { animation: schema-pose 0.6s ease both; }
}
@keyframes schema-pose { from { opacity: 0; } }
.schema__lecture {
  display: flex;
  align-items: center;
  gap: 0.4em;
  margin: var(--space-2) auto 0;
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-3);
  font: inherit;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.schema__lecture:hover { color: var(--ink); border-color: var(--line-strong); }
/* `.schema .schema__lecture svg` : plus précis que `.schema svg` (largeur minimale des schémas sur mobile). */
.schema .schema__lecture svg { width: 0.95em; min-width: 0; max-width: none; height: 0.95em; margin: 0; flex: none; color: inherit; fill: currentColor; }
.schema .schema__lecture svg[fill='none'] { fill: none; }
@media (max-width: 640px) { .schema__lecture { margin-left: 0; } }
@media print { .schema__lecture { display: none; } }
@keyframes schema-croit { 0% { transform: scaleX(0); } 22%, 88% { transform: scaleX(1); } 100% { transform: scaleX(1); opacity: 0; } }
@keyframes schema-convoi { 0% { offset-distance: 0%; opacity: 0; } 8% { opacity: 1; } 92% { opacity: 1; } 100% { offset-distance: 100%; opacity: 0; } }
@keyframes schema-lueur { 0%, 40%, 100% { opacity: 0; } 12%, 24% { opacity: 0.28; } }
@keyframes schema-flux { to { stroke-dashoffset: -10; } }
@keyframes schema-apparait { 0%, 8% { opacity: 0; } 20%, 85% { opacity: 1; } 100% { opacity: 0; } }
@keyframes schema-trace { 0% { stroke-dashoffset: 1; } 70%, 90% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes schema-descend { 0% { transform: translateY(0); opacity: 0; } 8% { opacity: 1; } 92% { opacity: 1; } 100% { transform: translateY(400px); opacity: 0; } }

/* --- Très grands écrans ------------------------------------------------------
   Taille de base : celle du navigateur (16 px par défaut, et le réglage du lecteur est
   respecté). Elle ne grandit plus avec la fenêtre : la documentation de Claude garde ses
   16 px sur tous les écrans, et la page reste une colonne centrée. */

/* --- Le labo interactif -------------------------------------------------------
   Quatre outils qui tournent dans le navigateur (src/static/labo.js). */
.labo__outil {
  display: grid; gap: var(--space-2); min-width: 0;
  background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius-m);
  padding: clamp(1rem, 0.6rem + 1.6vw, 1.75rem);
}
.labo__label, .labo__reglage > label {
  font-size: var(--step--1); color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: baseline;
}
.labo__label { font-family: var(--font-mono); font-size: var(--step--2); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); margin: 0; }
.labo__reglage { display: grid; gap: 0.3rem; }
.labo__reglage--ligne { grid-auto-flow: row; }
.labo__reglage output { font-family: var(--font-mono); color: var(--accent); font-weight: 600; }
.labo__reglage input[type='range'] { width: 100%; accent-color: var(--accent); }
.labo__coche { display: inline-flex !important; align-items: center; gap: 0.5rem; cursor: pointer; }
.labo__coche input { accent-color: var(--accent); width: 1.1rem; height: 1.1rem; }
.labo__champ, .labo__grille input, .labo__grille select {
  width: 100%; font: inherit; font-size: var(--step-0); color: var(--ink); background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--radius-s); padding: 0.55rem 0.7rem;
}
.labo__champ { resize: vertical; }
.labo__champ:focus-visible, .labo__grille input:focus-visible, .labo__grille select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.labo__exemples { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.labo__puce {
  font: inherit; font-size: var(--step--1); color: var(--ink-2); background: var(--paper); cursor: pointer;
  border: 1px solid var(--line); border-radius: var(--radius-pill); padding: 0.3rem 0.8rem;
}
.labo__puce:hover { border-color: var(--accent); color: var(--ink); }
.labo__puce[aria-pressed='true'] { background: var(--accent); border-color: var(--accent); color: var(--accent-on); }
.labo__chiffre { margin: 0; font-family: var(--font-mono); font-size: var(--step--1); color: var(--ink-2); }
.labo__chiffre--accent { color: var(--accent); font-weight: 600; }
.labo__grille { display: grid; gap: var(--space-2); grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr)); }
.labo__grille label { display: grid; gap: 0.25rem; font-size: var(--step--1); color: var(--ink-2); }

.tokens { display: flex; flex-wrap: wrap; gap: 3px; padding: 0.8rem; min-height: 4rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-s); }
.tok { font-family: var(--font-mono); font-size: var(--step--1); line-height: 1.5; padding: 0.1rem 0.3rem; border-radius: 4px; white-space: pre; color: var(--ink); }
.tok--0 { background: color-mix(in srgb, var(--accent) 18%, transparent); }
.tok--1 { background: color-mix(in srgb, var(--ink) 9%, transparent); }
.tok--2 { background: color-mix(in srgb, var(--accent) 32%, transparent); }
.tok--3 { background: color-mix(in srgb, var(--ink) 15%, transparent); }
.tok--4 { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.tok--5 { background: color-mix(in srgb, var(--ink) 5%, transparent); }

.att { display: grid; gap: 3px; overflow-x: auto; padding-bottom: 2px; }
.att__col, .att__lig, .att__coin { font-size: var(--step--2); color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; align-self: center; }
.att__col { text-align: center; padding-inline: 2px; }
/* Sur téléphone, les colonnes font moins de 40 px : les mots s'y lisaient tronqués (« can… »).
   Ils passent à la verticale, lus de bas en haut, en entier. */
@media (max-width: 699px) {
  .att__col { writing-mode: vertical-rl; transform: rotate(180deg); text-align: left; padding: 0.3rem 0; justify-self: center; align-self: end; text-overflow: clip; }
}
.att__lig { text-align: right; padding-right: 0.4rem; color: var(--ink-2); }
.att__coin { font-style: italic; }
.att__cel {
  display: grid; place-items: center; min-height: 2.1rem; border-radius: 4px; cursor: pointer;
  font-family: var(--font-mono); font-size: var(--step--2); color: var(--ink);
  background: color-mix(in srgb, var(--accent) calc(var(--w, 0) * 100%), var(--paper));
}
.att__cel--masque { background: var(--paper-sunk); color: var(--ink-3); cursor: default; }
.att__cel--on { outline: 2px solid var(--accent); outline-offset: -2px; }

.tp { display: grid; gap: 0.45rem; }
.tp__ligne { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr) 4.6rem; gap: 0.6rem; align-items: center; font-size: var(--step--1); }
.tp__mot { font-family: var(--font-mono); }
.tp__piste { position: relative; height: 0.9rem; background: var(--paper-sunk); border-radius: 999px; overflow: hidden; }
.tp__ghost, .tp__barre { position: absolute; inset: 0 auto 0 0; border-radius: 999px; transition: width 0.25s ease; }
.tp__ghost { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.tp__barre { background: var(--accent); }
.tp__pct { font-family: var(--font-mono); font-size: var(--step--2); color: var(--ink-2); text-align: right; }
.tp__ligne--out .tp__mot, .tp__ligne--out .tp__pct { color: var(--ink-3); }
@media (prefers-reduced-motion: reduce) { .tp__ghost, .tp__barre { transition: none; } }

.cache__piste { position: relative; display: flex; height: 1.6rem; background: var(--paper-sunk); border-radius: var(--radius-s); overflow: visible; }
.cache__seg { height: 100%; transition: width 0.25s ease; }
.cache__seg:first-child { border-radius: var(--radius-s) 0 0 var(--radius-s); }
.cache__poids { background: color-mix(in srgb, var(--ink) 38%, var(--paper)); }
.cache__kv { background: var(--accent); }
.cache__cap { position: absolute; top: -0.35rem; bottom: -0.35rem; width: 2px; margin-left: -1px; background: var(--ink); }
.cache__legende { display: flex; flex-wrap: wrap; gap: var(--space-3); font-size: var(--step--2); color: var(--ink-2); }
.cache__legende i { display: inline-block; width: 0.8rem; height: 0.8rem; border-radius: 3px; margin-right: 0.35rem; vertical-align: -0.1rem; }
.cache__trait { background: var(--ink); width: 2px !important; border-radius: 0 !important; }
.cache__verdict { margin: 0; padding: 0.6rem 0.8rem; border-left: 3px solid; border-radius: 0 var(--radius-s) var(--radius-s) 0; font-size: var(--step--1); background: var(--paper); }
.cache__verdict--ok { border-color: var(--accent); }
.cache__verdict--non { border-color: #c0392b; }
.labo { scroll-margin-top: 5rem; }

/* --- Tableaux : cartes quand la place manque ---------------------------------
   Un tableau à plusieurs colonnes qui ne tient pas dans sa colonne ne défile plus : il se
   range en cartes, une par ligne, chaque valeur précédée du titre de sa colonne.
   Le script (app.js) pose .table-wrap--cartes quand il mesure un débordement ; sans script,
   le tableau défile comme avant. Seuil : 7,5 rem par colonne (--cols, posé au build). */
.table-wrap table[data-cartes] { min-width: calc(var(--cols, 2) * 7.5rem); }
.table-wrap table[data-cartes] thead th { white-space: normal; }
.table-wrap--cartes { overflow: visible; border: 0; background: none; }
.table-wrap--cartes table[data-cartes] { min-width: 0; display: block; }
.table-wrap--cartes caption { display: block; position: static; width: auto; padding: 0 0 var(--space-1); }
.table-wrap--cartes thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.table-wrap--cartes tbody { display: grid; gap: var(--space-2); }
.table-wrap--cartes tr { display: block; border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--paper-raised); overflow: hidden; }
.table-wrap--cartes tbody tr:hover { background: var(--paper-raised); }
.table-wrap--cartes td, .table-wrap--cartes th[scope='row'] {
  display: block; padding: 0.6rem 0.9rem; border-bottom: 1px solid var(--line); text-align: left !important;
}
.table-wrap--cartes tbody tr:last-child td { border-bottom: 1px solid var(--line); }
.table-wrap--cartes tr > :last-child { border-bottom: 0 !important; }
.table-wrap--cartes td::before {
  content: attr(data-label); font-family: var(--font-mono); font-size: var(--step--2);
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); display: block; margin-bottom: 0.15rem;
}
.table-wrap--cartes td:first-child { display: block; background: var(--paper-sunk); font-weight: 600; }
.table-wrap--cartes td:first-child::before { display: none; }

/* --- Page « Les coulisses » ------------------------------------------------- */
.cou-roles { display: grid; gap: var(--space-3); }
@media (min-width: 760px) { .cou-roles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.cou-garde { display: grid; gap: 0; border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--paper-raised); overflow: hidden; }
.cou-garde > div { padding: 0.95rem 1.2rem; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.cou-garde > div:last-child { border-bottom: 0; }
.cou-garde strong { color: var(--ink); }
@media (min-width: 1100px) {
  .cou-garde { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cou-garde > div:nth-child(odd) { border-right: 1px solid var(--line); }
  .cou-garde > div:nth-last-child(-n+2) { border-bottom: 0; }
}
.cou-badge {
  display: inline-block; font-family: var(--font-mono); font-size: var(--step--2); letter-spacing: 0.06em;
  text-transform: uppercase; padding: 0.1rem 0.5rem; border-radius: 999px; margin-right: 0.4rem; white-space: nowrap;
}
.cou-badge--ok { background: var(--accent-tint); color: var(--accent); }
.cou-badge--ecart { background: var(--paper-sunk); color: var(--ink-2); border: 1px solid var(--line); }

/* --- Titres de section et points numérotés des chapitres --------------------
   Le numéro (16.2) devient une pastille au-dessus du titre ; un filet accentué marque le
   début de chaque grande section ; les énumérations « 1. Titre. » deviennent des blocs. */
.prose h2 { position: relative; margin-top: 3em; padding-top: 1.6rem; }
.prose h2::before { content: ''; position: absolute; top: -1px; left: 0; width: 3.5rem; height: 3px; background: var(--accent); border-radius: 2px; }
.prose h2:first-child::before { display: none; }
.prose .h-num {
  display: block; font-family: var(--font-mono); font-size: var(--step--1); font-weight: 500;
  letter-spacing: 0.08em; color: var(--accent); margin-bottom: 0.35em; font-variation-settings: normal;
}
.prose h3 .h-num { display: inline; margin-right: 0.6em; font-size: var(--step-0); letter-spacing: 0.04em; }
.prose h3 { margin-top: 2.2em; }
.prose .point {
  margin-top: 1.9em; padding: 1.1rem 1.3rem; background: var(--paper-raised);
  border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--radius-m);
}
.prose .point__titre { display: flex; align-items: baseline; gap: 0.7rem; font-family: var(--font-serif); font-size: var(--step-1); font-weight: 600; line-height: 1.3; margin-bottom: 0.5rem; }
.prose .point__n {
  flex: none; display: inline-grid; place-items: center; min-width: 1.7rem; height: 1.7rem; border-radius: 999px;
  background: var(--accent); color: var(--paper); font-family: var(--font-mono); font-size: var(--step--1); font-weight: 500;
}
.prose .h-txt { display: block; }
.prose h3 .h-txt { display: inline; }

/* --- Page « La pipeline IA » ------------------------------------------------ */
.pip-etapes { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
@media (min-width: 900px) { .pip-etapes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pip-etape { display: flex; gap: 0.9rem; padding: 1rem 1.2rem; background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius-m); }
.pip-etape p { margin: 0.35rem 0 0; color: var(--ink-2); }
.pip-etape__n {
  flex: none; display: inline-grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 999px;
  background: var(--accent); color: var(--paper); font-family: var(--font-mono); font-size: var(--step--1);
}
.pip-plus { margin-top: var(--space-4); max-width: var(--measure); border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--paper-raised); padding: 0.8rem 1.2rem; }
.pip-plus summary { cursor: pointer; font-weight: 600; }
.pip-plus p { margin-top: 0.7rem; color: var(--ink-2); }
.pip-briques { display: grid; gap: var(--space-3); }
@media (min-width: 760px) { .pip-briques { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .pip-briques { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pip-brique h3 { margin-top: 0.6rem; }
.pip-brique p { color: var(--ink-2); }
.pip-brique__ici { padding-top: 0.6rem; border-top: 1px dashed var(--line); }

/* ---- Page « L'histoire » : liste de jalons datés ---- */
.hist { list-style: none; margin: 0; padding: 0 0 0 1.25rem; border-left: 2px solid var(--line); display: grid; gap: var(--space-4); }
.hist-etapes { list-style: none; }
.hist-etapes .hist { margin-top: var(--space-4); }
.hist-item { position: relative; }
.hist-item::before { content: ''; position: absolute; left: calc(-1.25rem - 6px); top: 0.45rem; width: 10px; height: 10px; border-radius: var(--radius-pill); background: var(--accent); box-shadow: 0 0 0 4px var(--paper); }
.hist-item h3 { margin: 0.1rem 0 0.4rem; }
.hist-item p { margin: 0; color: var(--ink-2); }
.hist-item .hist-date { color: var(--accent); font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.hist-item .hist-src { margin-top: 0.5rem; }
.hist-badge { display: inline-block; margin-left: 0.5rem; padding: 0.05rem 0.5rem; border-radius: var(--radius-pill); background: var(--accent); color: var(--paper); font-size: 0.6875rem; letter-spacing: 0.06em; vertical-align: 0.1em; }
.hist-item--cle::before { width: 14px; height: 14px; left: calc(-1.25rem - 8px); top: 0.35rem; }
.hist-item .hist-clair { margin-bottom: 0.5rem; padding: 0.5rem 0.75rem; border-left: 3px solid var(--accent); background: var(--paper-raised); color: var(--ink); }
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .hist-item { animation: hist-entre linear both; animation-timeline: view(); animation-range: entry 0% entry 45%; }
    @keyframes hist-entre { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
  }
}

/* ---- Le sommaire du carnet, en parties ---- */
.parties { display: grid; gap: var(--space-5); }
.partie__tete { margin-bottom: var(--space-2); }
.partie__tete h3 { margin: 0.1rem 0 0.35rem; }
.partie__tete p { margin: 0; }
.partie__aussi { margin: var(--space-2) 0 0; color: var(--ink-2); }
.partie { display: block; }

/* --- Page « Pourquoi ces écarts » -------------------------------------------- */
.ecart__corps { max-width: var(--measure-wide, 44rem); }
.ecart__corps .schema { margin: 0 0 var(--space-3); max-width: none; }
.ecart__ici {
  padding: var(--space-2) var(--space-3);
  border-left: 3px solid var(--accent);
  background: var(--accent-tint, var(--paper-sunk));
  border-radius: 0 var(--radius-s, 6px) var(--radius-s, 6px) 0;
}
.ecart { scroll-margin-top: 5rem; }
/* Un filet sépare les leviers : la section qui suit reprend donc sa respiration en haut,
   que `.section + .section` lui retire (sinon le titre colle au filet). */
.ecart + .ecart { border-top: 1px solid var(--line); padding-top: var(--space-7); }

.ecart__etapes { margin: 0; padding-left: 1.4em; display: grid; gap: var(--space-1); }

/* --- Détails repliables (labo) : ce qui n'est pas indispensable reste fermé ----- */
details.plus { margin-block: var(--space-2); border-top: 1px solid var(--line); padding-top: var(--space-2); }
/* Le titre est du texte courant (pas un flex) : dans un flex, chaque terme à infobulle devenait un
   bloc à part, la ligne ne se coupait plus et la page s'élargissait à 320 px. Le « + » est posé à
   gauche, centré sur la première ligne. */
details.plus > summary { cursor: pointer; font-size: var(--step--1); color: var(--ink-2); list-style: none; display: block; position: relative; padding-left: 1.85em; }
details.plus > summary::-webkit-details-marker { display: none; }
/* Le « + » du blog : deux traits ; à l'ouverture, le trait vertical se replie et il reste « − ». */
details.plus > summary::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.15em;
  top: calc(0.5lh - 0.65em);
  width: 1.3em;
  height: 1.3em;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background:
    linear-gradient(currentColor, currentColor) center / 0.6em 1.5px no-repeat,
    linear-gradient(currentColor, currentColor) center / 1.5px 0.6em no-repeat;
  transition: background-size 0.25s ease;
}
details.plus[open] > summary::before { background-size: 0.6em 1.5px, 1.5px 0; }
details.plus > summary:hover { color: var(--accent); }
details.plus > :not(summary) { margin-top: var(--space-2); }

.doc-nav__recherche {
  display: flex; align-items: center; gap: .5rem; width: 100%;
  margin: 0 0 .75rem; padding: .45rem .6rem;
  font: inherit; font-size: .85rem; color: var(--ink-3);
  background: var(--paper-raised); border: 1px solid var(--line); border-radius: 8px;
  cursor: pointer; text-align: left;
}
.doc-nav__recherche:hover { color: var(--ink); border-color: var(--accent); }
.doc-nav__recherche svg { width: 16px; height: 16px; flex: none; }

/* Un lien du menu a été suivi : le menu disparaît net, sans s'attarder sur l'ancienne page. */
.mobile-nav[data-net='true'], .nav-scrim[data-net='true'] { transition: none; }

/* Passage d'une page à l'autre : fondu très court, l'en-tête reste en place. Là où les
   transitions entre documents n'existent pas, rien ne change. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  .site-header { view-transition-name: site-header; }
  ::view-transition-group(root) { animation-duration: 0.14s; }
  ::view-transition-group(site-header) { animation-duration: 0s; }
}

/* Bascule clair/sombre : aucune transition CSS pendant la bascule. Le nouveau thème est ainsi
   complet dès la première image : rien ne traîne sur l'ancienne couleur, et la page n'est pas
   recalculée à chaque image du fondu. (C'est l'inverse de l'essai #123, qui AJOUTAIT des transitions.) */
html.theme-vt *, html.theme-vt *::before, html.theme-vt *::after { transition: none !important; }

/* Fondu de 0,3 s entre deux instantanés de la page (View Transitions). L'en-tête
   perd son nom de transition le temps de la bascule, pour fondre avec le reste. */
@media (prefers-reduced-motion: no-preference) {
  html.theme-vt .site-header { view-transition-name: none; }
  html.theme-vt::view-transition-group(root) { animation-duration: 0.3s; }
  html.theme-vt::view-transition-old(root),
  html.theme-vt::view-transition-new(root) { animation-duration: 0.3s; }
}
