/* Veille robotique, nogues.app/robotique
   Charte de nogues.app : papier gris bleuté, encre, bleu d'accent, Bricolage Grotesque et Literata.
   L'élément fort de la page est l'échelle de maturité, dessinée comme une cote de dessin technique. */

@font-face { font-family: "Bricolage Grotesque"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/bricolage-grotesque-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Bricolage Grotesque"; font-weight: 600; font-style: normal; font-display: swap; src: url("fonts/bricolage-grotesque-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Bricolage Grotesque"; font-weight: 800; font-style: normal; font-display: swap; src: url("fonts/bricolage-grotesque-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "Literata"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/literata-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Literata"; font-weight: 400; font-style: italic; font-display: swap; src: url("fonts/literata-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Literata"; font-weight: 600; font-style: normal; font-display: swap; src: url("fonts/literata-latin-600-normal.woff2") format("woff2"); }

:root {
  --paper: #EEF1F3;
  --ink: #18202B;
  --muted: #586474;
  --rule: #C7CFD8;
  --accent: #2346D8;
  --accent-soft: #DDE4FB;
  --card: #F8FAFB;
  /* Échelle de maturité : du plus clair (recherche) au plus franc (déployé) */
  --m1: #DDE4FB; --m2: #B4C2F4; --m3: #7E95EA; --m4: #4D69E0; --m5: #2346D8;
  /* Épure d'ouverture : trait des pièces, trait fin des axes */
  --trait: #9DAAB8; --trait-fin: #C3CCD6;
  --display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --text: "Literata", Georgia, "Times New Roman", serif;
  --measure: 66ch;
  --gutter: clamp(1rem, 4vw, 3rem);
  color-scheme: light;
}
/* Mode sombre : réglage de l'appareil par défaut, ou choix fait avec la bascule du menu (attribut data-theme, mémorisé) */
:root[data-theme="dark"] {
  --paper: #12161C;
  --ink: #E6EAEF;
  --muted: #9AA6B4;
  --rule: #2C3440;
  --accent: #8EA6FF;
  --accent-soft: #1E2847;
  --card: #181D25;
  --m1: #232C45; --m2: #34477F; --m3: #4F67BE; --m4: #6F88E6; --m5: #8EA6FF;
  --trait: #4D5A6B; --trait-fin: #313B48;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #12161C;
    --ink: #E6EAEF;
    --muted: #9AA6B4;
    --rule: #2C3440;
    --accent: #8EA6FF;
    --accent-soft: #1E2847;
    --card: #181D25;
    --m1: #232C45; --m2: #34477F; --m3: #4F67BE; --m4: #6F88E6; --m5: #8EA6FF;
    --trait: #4D5A6B; --trait-fin: #313B48;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -0.015em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.evitement { position: absolute; left: 1rem; top: -4rem; z-index: 10; padding: 0.5rem 0.9rem; background: var(--ink); color: var(--paper); font-family: var(--display); border-radius: 4px; }
.evitement:focus { top: 1rem; }

.wrap { max-width: 72rem; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
/* Filet aligné sur le texte, pas sur la marge (repris de nogues.app) */
.ruled { background-image: linear-gradient(var(--rule), var(--rule)); background-size: calc(100% - 2 * var(--gutter)) 1px; background-position: center top; background-repeat: no-repeat; }
main > section { padding-top: clamp(2.25rem, 5vw, 3.75rem); padding-bottom: clamp(2.25rem, 5vw, 3.75rem); }

/* En-tête */
.top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-top: 1.25rem; padding-bottom: 1.25rem; font-family: var(--display); }
.marque { display: flex; align-items: center; gap: 0.6rem; }
.maison { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--muted); text-decoration: none; font-size: 0.95rem; }
.maison:hover { color: var(--ink); }
.logo { width: 1.7rem; height: 1.7rem; flex: none; }
.logo .i { stroke: var(--ink); }
.logo .ac { stroke: var(--accent); }
.wm { font-weight: 800; letter-spacing: -0.03em; }
.wm span { color: var(--accent); }
.barre { color: var(--rule); font-size: 1.3rem; font-weight: 400; }
.titre-site { color: var(--ink); text-decoration: none; font-weight: 800; font-size: 1.2rem; letter-spacing: -0.03em; }
.top nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; font-size: 0.95rem; }
.top nav a { color: var(--muted); text-decoration: none; padding: 0.15rem 0; border-bottom: 2px solid transparent; }
.top nav a:hover { color: var(--ink); }
.top nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.menu { display: flex; align-items: center; gap: 1.25rem; }
/* Bascule clair / sombre : affichée seulement si JavaScript est actif ; l'icône montre le mode proposé */
.theme { display: inline-grid; place-items: center; flex: none; width: 2.1rem; height: 2.1rem; padding: 0; border: 1px solid var(--rule); border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.theme:hover { color: var(--ink); border-color: var(--muted); }
.theme[hidden] { display: none; }
.theme svg { width: 1.05rem; height: 1.05rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.theme .ic-soleil, .theme.sombre .ic-lune { display: none; }
.theme.sombre .ic-soleil { display: block; }

/* Ouverture de l'édition */
.ouverture { padding-top: clamp(1.75rem, 5vw, 3.5rem); }
.numero { margin: 0 0 0.6rem; font-family: var(--display); font-size: 0.95rem; color: var(--muted); }
.titre-edition {
  margin: 0;
  max-width: 18ch;
  font-weight: 800;
  font-size: clamp(2.35rem, 6.4vw, 4.6rem);
  line-height: 1;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.promesse { max-width: 54ch; margin: 1.1rem 0 0; color: var(--muted); font-size: 1.05rem; }
.titre-essentiel { margin: clamp(2rem, 4vw, 2.75rem) 0 0.75rem; font-size: 1rem; font-weight: 600; letter-spacing: 0; color: var(--muted); }
.essentiel { list-style: none; margin: 0; padding: 0; max-width: 62ch; display: grid; gap: 0.9rem; }
.essentiel li {
  position: relative;
  padding-left: 1.4rem;
  font-size: clamp(1.15rem, 2.1vw, 1.38rem);
  line-height: 1.45;
}
.essentiel li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 0.6rem; height: 2px; background: var(--accent); }
.ouverture.court .promesse { max-width: 60ch; }

/* Épures d'ouverture : un robot se construit comme un dessin technique, une seule fois au chargement.
   Bras robotisé (éditions), robot mobile (Éditions), main robotisée (Glossaire), robot delta (Méthode).
   Lignes de construction et cadres en pointillés (bleu), tracé des pièces, articulations, axes et cote,
   puis un dernier mouvement propre à chaque robot. SVG en ligne générés par outils/chantier.py.
   En arrière-plan : position absolue, derrière le texte, sans aucun effet sur la mise en page.
   Sans animation, seul le dessin final s'affiche. */
.ouverture { position: relative; }
.ouverture > :not(.chantier) { position: relative; z-index: 1; }
.chantier { position: absolute; z-index: 0; top: 0.4rem; right: var(--gutter); width: min(8.5rem, 34%); height: auto; opacity: 0.45; pointer-events: none; overflow: visible; }
.chantier path, .chantier circle { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.chantier .plein { fill: var(--paper); }
.ch-g path { stroke: var(--accent); stroke-width: 0.8; stroke-dasharray: 1; opacity: 0; animation: ch-guide 4.6s cubic-bezier(.3, .6, .2, 1) var(--d) both; }
.ch-f path { stroke: var(--accent); stroke-width: 1; stroke-dasharray: 5 5; opacity: 0; animation: ch-cadre 3.4s ease var(--d) both; }
.ch-t path { stroke: var(--trait); stroke-width: 2.2; stroke-dasharray: 1; animation: ch-tracer 0.9s cubic-bezier(.3, .6, .2, 1) var(--d) both; }
.ch-mors .mg { transform: translateX(3px); animation: ch-tracer 0.9s cubic-bezier(.3, .6, .2, 1) var(--d) both, ch-serrer 0.5s ease-in-out 4.3s both; }
.ch-mors .md { transform: translateX(-3px); animation: ch-tracer 0.9s cubic-bezier(.3, .6, .2, 1) var(--d) both, ch-serrer 0.5s ease-in-out 4.3s both; }
.ch-j > g, .ch-j .boulon { transform-box: fill-box; transform-origin: center; animation: ch-poser 0.45s cubic-bezier(.3, .6, .2, 1.4) var(--d) both; }
.ch-j .plein { stroke: var(--trait); stroke-width: 2.2; }
.ch-j .axe { fill: var(--accent); opacity: 0.55; }
.ch-j .boulon { fill: var(--trait); }
.ch-e { stroke: var(--trait-fin); stroke-width: 1; stroke-dasharray: 3 7; animation: ch-apparaitre 1.2s ease 3s both; }
.ch-a path { stroke: var(--trait-fin); stroke-width: 0.9; stroke-dasharray: 14 5 3 5; animation: ch-apparaitre 1s ease 3.2s both; }
.ch-c { stroke: var(--accent); stroke-width: 1.5; opacity: 0.5; stroke-dasharray: 1; animation: ch-tracer 0.8s ease-out 3.5s both; }
/* Derniers mouvements : les roues tournent et le lidar balaie ; les doigts s'écartent et les capteurs s'allument ; le colis arrive sous la ventouse */
.ch-roue { transform-box: fill-box; transform-origin: center; animation: ch-tourner 1.8s cubic-bezier(.45, 0, .2, 1) 3.8s both; }
.ch-ondes path { stroke: var(--accent); stroke-width: 1.4; opacity: 0.45; transform-box: view-box; transform-origin: var(--o); animation: ch-onde 1.2s ease-out var(--d) both; }
.ch-ecart { transform-box: view-box; transform-origin: var(--o); transform: rotate(var(--r)); animation: ch-ecarter 0.8s ease-in-out 4s both; }
.chantier .capteur { fill: var(--accent); stroke: none; transform-box: fill-box; transform-origin: center; animation: ch-poser 0.45s cubic-bezier(.3, .6, .2, 1.4) var(--d) both; }
.ch-anneau { stroke: var(--accent); stroke-width: 1.2; opacity: 0; transform-box: fill-box; transform-origin: center; animation: ch-anneau 1.3s ease-out var(--d) both; }
.ch-colis path { stroke: var(--trait); stroke-width: 2.2; }
.ch-colis { animation: ch-glisser 1.1s cubic-bezier(.3, .6, .2, 1) 3.7s both; }
@keyframes ch-guide { 0% { stroke-dashoffset: 1; opacity: 0.45; } 22% { stroke-dashoffset: 0; opacity: 0.45; } 75% { stroke-dashoffset: 0; opacity: 0.45; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes ch-cadre { 0% { opacity: 0; } 15% { opacity: 0.5; } 65% { opacity: 0.5; } 100% { opacity: 0; } }
@keyframes ch-tracer { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes ch-serrer { from { transform: translateX(0); } }
@keyframes ch-poser { from { transform: scale(0); } }
@keyframes ch-apparaitre { from { opacity: 0; } }
@keyframes ch-tourner { from { transform: rotate(-270deg); } }
@keyframes ch-onde { 0% { opacity: 0; transform: scale(0.5); } 45% { opacity: 0.9; } 100% { opacity: 0.45; transform: scale(1); } }
@keyframes ch-ecarter { from { transform: rotate(0deg); } }
@keyframes ch-anneau { 0% { opacity: 0; transform: scale(0.4); } 10% { opacity: 0.9; } 100% { opacity: 0; transform: scale(1.8); } }
@keyframes ch-glisser { from { transform: translateX(-120px); opacity: 0; } 20% { opacity: 1; } }

/* Échelle de maturité : une cote de dessin technique */
.echelle .tete { max-width: var(--measure); }
.echelle h2, .rubrique h2, .bloc h2, .index-signaux h2, .errata h2, .precedentes h2, .prose h2 { margin: 0 0 0.5rem; font-weight: 600; font-size: clamp(1.35rem, 2.6vw, 1.8rem); }
.echelle .tete p { margin: 0; color: var(--muted); }
.cote {
  --axe: 0.75rem;
  position: relative;
  list-style: none;
  margin: 2.25rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0 1.25rem;
}
/* La ligne de cote, terminée par une flèche : la maturité progresse vers la droite */
.cote::before {
  content: "";
  position: absolute;
  left: 0; right: 0.4rem; top: var(--axe);
  height: 2px;
  background: var(--ink);
  transform-origin: left center;
  animation: tracer 1.1s cubic-bezier(.3, .6, .2, 1) 0.15s both;
}
.cote::after {
  content: "";
  position: absolute;
  right: 0; top: calc(var(--axe) - 0.38rem);
  border-style: solid;
  border-width: 0.44rem 0 0.44rem 0.7rem;
  border-color: transparent transparent transparent var(--ink);
  animation: apparaitre 0.3s ease 1.1s both;
}
.station { position: relative; padding-top: calc(var(--axe) + 1.35rem); min-width: 0; }
.station .point {
  position: absolute;
  left: 0; top: calc(var(--axe) - 0.6rem);
  width: 1.3rem; height: 1.3rem;
  border-radius: 50%;
  background: var(--mc);
  border: 2px solid var(--ink);
  animation: poser 0.35s cubic-bezier(.3, .6, .2, 1) calc(0.45s + var(--i) * 0.14s) both;
}
.station.m1 { --mc: var(--m1); } .station.m2 { --mc: var(--m2); } .station.m3 { --mc: var(--m3); } .station.m4 { --mc: var(--m4); } .station.m5 { --mc: var(--m5); }
.station .nom { margin: 0; font-family: var(--display); font-weight: 600; font-size: 1.08rem; line-height: 1.2; }
.station .def { margin: 0.25rem 0 0.85rem; font-family: var(--display); font-size: 0.86rem; line-height: 1.35; color: var(--muted); }
.pastilles { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 0.45rem; }
.pastille {
  display: inline-block;
  max-width: 100%;
  padding: 0.3rem 0.7rem;
  font-family: var(--display); font-size: 0.9rem; line-height: 1.3;
  color: var(--ink); text-decoration: none;
  background: var(--card);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--mc);
  border-radius: 4px;
}
.pastille:hover { border-color: var(--accent); border-left-color: var(--mc); }
.vide { margin: 0; font-family: var(--display); font-size: 0.86rem; color: var(--muted); }
@keyframes tracer { from { transform: scaleX(0); } }
@keyframes poser { from { transform: scale(0); } }
@keyframes apparaitre { from { opacity: 0; } }

/* Rubriques et cartes */
.rubriques { display: grid; gap: 2.5rem 1.5rem; }
.question { margin: 0 0 1.25rem; color: var(--muted); font-size: 0.98rem; }
.compte { display: inline-block; margin-left: 0.35rem; padding: 0 0.5rem; font-family: var(--display); font-size: 0.8rem; color: var(--ink); background: var(--accent-soft); border-radius: 999px; white-space: nowrap; }
.cartes { display: grid; gap: 1rem; align-content: start; }
.signal {
  display: flex; flex-direction: column; gap: 0.7rem;
  padding: 1.15rem 1.2rem 1rem;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 6px;
  scroll-margin-top: 1.25rem;
}
.signal:target { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.signal h3 { margin: 0; font-weight: 600; font-size: 1.18rem; line-height: 1.25; }
.signal p { margin: 0; }
.fait { font-size: 1rem; line-height: 1.55; }
.portee { padding-left: 0.8rem; border-left: 3px solid var(--accent-soft); font-style: italic; font-size: 0.98rem; line-height: 1.5; }
.pied-carte { margin-top: auto; padding-top: 0.6rem; border-top: 1px solid var(--rule); display: grid; gap: 0.35rem; }
.maturite { display: flex; align-items: center; gap: 0.55rem; font-family: var(--display); font-size: 0.88rem; }
.maturite a { color: var(--ink); font-weight: 600; text-decoration: none; }
.maturite a:hover { text-decoration: underline; }
.jauge { display: inline-grid; grid-template-columns: repeat(5, 0.85rem); gap: 3px; flex: none; }
.jauge i { display: block; height: 0.42rem; border-radius: 1px; background: var(--rule); }
.jauge i.on { background: var(--accent); }
.meta, .sources { font-family: var(--display); font-size: 0.83rem; line-height: 1.45; color: var(--muted); }
.meta { display: flex; flex-wrap: wrap; gap: 0.15rem 0.9rem; }
.vide.rubrique-vide { padding: 1rem; border: 1px dashed var(--rule); border-radius: 6px; }

/* Repères : chiffre, cas d'usage, agenda, mot */
.reperes { display: grid; gap: 2.75rem 3.5rem; }
.bloc p { margin: 0 0 0.75rem; }
.bloc .sources { margin-top: 0.5rem; }
.valeur { margin: 0.3rem 0 0.2rem !important; font-family: var(--display); font-weight: 800; font-size: clamp(3.6rem, 10vw, 6.4rem); line-height: 0.9; letter-spacing: -0.045em; color: var(--accent); }
.libelle { font-family: var(--display); font-weight: 600; font-size: 1.15rem; }
.cas h3 { margin: 0.25rem 0 0.9rem; font-size: 1.2rem; font-weight: 600; }
.cas dl { margin: 0; display: grid; grid-template-columns: 9.5rem 1fr; gap: 0.55rem 1rem; }
.cas dt { font-family: var(--display); font-size: 0.88rem; color: var(--muted); padding-top: 0.15rem; }
.cas dd { margin: 0; font-size: 0.98rem; line-height: 1.5; }
.agenda ul { list-style: none; margin: 0.4rem 0 0; padding: 0; display: grid; gap: 1rem; }
.agenda li { display: grid; grid-template-columns: 7.5rem 1fr; gap: 1rem; }
.agenda .quand { margin: 0; font-family: var(--display); font-weight: 600; font-size: 0.95rem; padding-top: 0.1rem; }
.agenda .quoi { margin: 0; font-family: var(--display); font-weight: 600; }
.agenda .pourquoi { margin: 0.15rem 0 0; color: var(--muted); font-size: 0.96rem; line-height: 1.5; }
.mot .terme { margin: 0.3rem 0 0.6rem; }
.mot dfn { font-style: normal; font-family: var(--display); font-weight: 800; font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -0.03em; line-height: 1.1; }
.suite { font-family: var(--display); font-size: 0.95rem; }

/* Corrections, éditions précédentes */
.errata ul, .precedentes ul { margin: 0.75rem 0 0; padding-left: 1.2rem; max-width: var(--measure); }
.errata li, .precedentes li { margin-bottom: 0.5rem; }
.precedentes li span { display: block; color: var(--muted); font-size: 0.96rem; }

/* Page des éditions */
.liste-editions > ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2rem; }
.edition h3 { margin: 0; font-size: 1.4rem; font-weight: 600; }
.edition h3 a { color: var(--ink); text-decoration: none; }
.edition h3 a:hover { color: var(--accent); }
.edition .meta { margin: 0.25rem 0 0.6rem; }
.edition ul { margin: 0; padding-left: 1.2rem; max-width: var(--measure); }
.edition li { margin-bottom: 0.35rem; }
.filtres { display: grid; gap: 0.6rem; margin: 1rem 0 0.5rem; }
.filtres[hidden] { display: none; }
.filtres [role="group"] { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
.filtres .lib { min-width: 5.5rem; font-family: var(--display); font-size: 0.88rem; color: var(--muted); }
.filtres button {
  padding: 0.3rem 0.8rem;
  font: inherit; font-family: var(--display); font-size: 0.88rem; color: var(--ink);
  background: transparent; border: 1px solid var(--rule); border-radius: 999px; cursor: pointer;
}
.filtres button:hover { border-color: var(--accent); }
.filtres button[aria-pressed="true"] { background: var(--card); border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.resultat { margin: 0.75rem 0; font-family: var(--display); font-size: 0.9rem; color: var(--muted); }
.lignes { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.ligne { display: grid; grid-template-columns: minmax(0, 1fr) 10rem 11.5rem 6rem 8.5rem; gap: 0.35rem 1rem; align-items: center; padding: 0.8rem 0; border-bottom: 1px solid var(--rule); font-family: var(--display); font-size: 0.88rem; color: var(--muted); }
.ligne[hidden] { display: none; }
.ligne > a { font-size: 1rem; font-weight: 600; color: var(--ink); text-decoration: none; line-height: 1.3; }
.ligne > a:hover { color: var(--accent); }
.ligne .maturite { color: var(--ink); white-space: nowrap; }

/* Glossaire et méthode */
.glossaire dl { margin: 0; display: grid; gap: 1.75rem; max-width: var(--measure); }
.entree { scroll-margin-top: 1.25rem; }
.entree:target dt { color: var(--accent); }
.entree dt { font-family: var(--display); font-weight: 800; font-size: 1.5rem; letter-spacing: -0.025em; }
.entree dd { margin: 0.35rem 0 0; }
.entree dd p { margin: 0 0 0.4rem; }
.origine { font-family: var(--display); font-size: 0.88rem; color: var(--muted); }
.prose > * { max-width: var(--measure); }
.prose h2 { margin-top: 2.25rem; scroll-margin-top: 1.25rem; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose ul { margin: 0 0 1rem; }

/* Rapports d'étonnement : texte long, tableaux comparatifs défilables sur petit écran, renvois vers les sources */
.rapport h3 { margin: 1.75rem 0 0.5rem; font-size: 1.15rem; font-weight: 600; letter-spacing: -0.01em; }
.rapport ol { margin: 0 0 1rem; padding-left: 1.4rem; }
.rapport ol.sources { font-family: var(--display); font-size: 0.86rem; line-height: 1.5; color: var(--muted); }
.rapport ol.sources li { margin-bottom: 0.4rem; scroll-margin-top: 1.25rem; }
.rapport ol.sources li:target { color: var(--ink); background: var(--accent-soft); }
.renvoi { font-family: var(--display); font-size: 0.8em; text-decoration: none; white-space: nowrap; }
.prose > .tableau { max-width: none; }
.tableau { overflow-x: auto; margin: 1.25rem 0 1.75rem; border-top: 2px solid var(--ink); }
.tableau:focus-visible { outline-offset: 4px; }
.tableau table { width: 100%; min-width: 44rem; border-collapse: collapse; font-family: var(--display); font-size: 0.86rem; line-height: 1.4; }
.tableau th, .tableau td { padding: 0.6rem 0.9rem 0.6rem 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--rule); }
.tableau thead th { font-weight: 600; color: var(--muted); white-space: nowrap; }
.tableau tbody th { font-weight: 600; }

/* Lien vers le rapport d'étonnement depuis l'édition concernée */
.coulisses h2 { margin: 0 0 0.5rem; font-weight: 600; font-size: clamp(1.35rem, 2.6vw, 1.8rem); }
.coulisses p { margin: 0; max-width: var(--measure); }
.niveaux { list-style: none; margin: 1rem 0 1.25rem; padding: 0; display: grid; gap: 0.6rem; }
.niveaux li { display: grid; grid-template-columns: 14rem 1fr; gap: 1rem; align-items: baseline; }
.niveaux .nom { display: inline-flex; align-items: center; gap: 0.55rem; font-family: var(--display); font-weight: 600; }

/* Pied de page */
.pied { padding-top: 1.5rem; padding-bottom: 2rem; font-family: var(--display); font-size: 0.86rem; line-height: 1.5; color: var(--muted); }
.pied p { margin: 0 0 0.75rem; max-width: 70ch; }
.pied .liens { display: flex; flex-wrap: wrap; gap: 0.35rem 1.25rem; }

/* Mise en page selon la largeur */
@media (min-width: 700px) {
  /* Dès la tablette, le texte de l'ouverture laisse la droite libre : l'épure s'y loge sans le recouvrir */
  .chantier { top: 0.75rem; width: min(22rem, 38%); opacity: 1; }
  .ouverture:not(.court) .ouverture-titre { max-width: 58%; }
  .ouverture:not(.court) .titre-edition { max-width: 14ch; font-size: clamp(2.6rem, 4.8vw, 4.3rem); }
  .ouverture:not(.court) .titre-essentiel { margin-top: 2.25rem; }
  /* Pages Éditions, Glossaire et Méthode : en-tête plus court, épure plus petite */
  .ouverture.court .chantier { top: 0.5rem; width: min(16rem, 26%); }
  .ouverture.epure .titre-edition { max-width: min(18ch, 64%); }
  .ouverture.epure .promesse { max-width: min(60ch, 64%); }
}
@media (min-width: 1080px) {
  .rubriques { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  /* Sur grand écran, l'essentiel passe en trois colonnes : l'échelle remonte dans le premier écran */
  .ouverture:not(.court) .essentiel { max-width: none; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 2.5rem; }
  .ouverture:not(.court) .essentiel li { font-size: 1.14rem; }
}
@media (min-width: 700px) and (max-width: 1079px) {
  .cartes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
  .reperes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .ligne { grid-template-columns: 1fr; padding: 0.9rem 0; }
}
@media (max-width: 760px) {
  .top { position: relative; flex-direction: column; align-items: flex-start; gap: 0.6rem; }
  .theme { position: absolute; top: 1.05rem; right: var(--gutter); }
  /* L'échelle devient verticale : la cote descend */
  .cote { grid-template-columns: 1fr; gap: 1.6rem; margin-top: 1.75rem; }
  .cote::before { left: var(--axe); right: auto; top: 0.6rem; bottom: 0.4rem; width: 2px; height: auto; transform-origin: center top; animation-name: tracer-v; }
  .cote::after { right: auto; top: auto; bottom: 0; left: calc(var(--axe) - 0.38rem); border-width: 0.7rem 0.44rem 0 0.44rem; border-color: var(--ink) transparent transparent transparent; }
  .station { padding-top: 0; padding-left: 2.6rem; }
  .station .point { left: calc(var(--axe) - 0.6rem); top: 0.05rem; }
  .station .def { margin-bottom: 0.6rem; }
  .pastilles { flex-direction: row; flex-wrap: wrap; }
  .cas dl { grid-template-columns: 1fr; gap: 0.15rem; }
  .cas dd { margin-bottom: 0.55rem; }
  .agenda li { grid-template-columns: 1fr; gap: 0.15rem; }
  .niveaux li { grid-template-columns: 1fr; gap: 0.1rem; }
}
@keyframes tracer-v { from { transform: scaleY(0); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cote::before, .cote::after, .station .point { animation: none; }
  .chantier, .chantier * { animation: none !important; }
}
@media print {
  .top nav, .theme, .pied .liens, .evitement, .chantier { display: none; }
  .tableau { overflow: visible; }
  .tableau table { min-width: 0; }
  .signal { break-inside: avoid; }
}
