/* learn.is42.fr — système is42 : module 42, échelle φ, un seul pigment.
   La carte se pigmente à mesure que l'on apprend : gris = à voir, outremer = appliquée. */

:root {
  --papier: #EEEBE4;
  --encre: #151512;
  --outremer: #1A22C4;

  --fond: var(--papier);
  --texte: var(--encre);
  --pigment: var(--outremer);
  --doux: color-mix(in srgb, var(--texte) 64%, var(--fond));   /* 5,1:1 sur papier, 6,8:1 en sombre (WCAG AA) */
  --filet: color-mix(in srgb, var(--texte) 16%, var(--fond));
  --voile: color-mix(in srgb, var(--fond) 88%, transparent);

  --s1: 6px; --s2: 10px; --s3: 16px; --s4: 26px; --s5: 42px;
  --s6: 68px; --s7: 110px; --s8: 178px; --s9: 288px;
  --t1: 100ms; --t2: 162ms; --t3: 262ms; --t4: 424ms;
  --ease: cubic-bezier(.2, .7, .2, 1);

  --sans: "Archivo", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;

  --st-a-voir: transparent;
  --st-vue: color-mix(in srgb, var(--pigment) 22%, var(--fond));
  --st-comprise: color-mix(in srgb, var(--pigment) 46%, var(--fond));
  --st-expliquee: color-mix(in srgb, var(--pigment) 72%, var(--fond));
  --st-appliquee: var(--pigment);
}
@media (prefers-color-scheme: dark) {
  :root {
    --fond: #151512;
    --texte: #EEEBE4;
    --pigment: #737BFF;   /* 5,2:1 sur le fond sombre (WCAG AA) */
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font: 400 16px/1.62 var(--sans);
  font-feature-settings: "ss01", "tnum" 0;
}
a { color: inherit; }
button { font: inherit; color: inherit; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.cote {
  font: 500 11px/1.4 var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--doux);
  margin: 0;
}
:focus-visible { outline: 2px solid var(--pigment); outline-offset: 2px; }

/* ----------------------------------------------------------- barre */
.barre {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: var(--s5);
  height: var(--s6);
  padding: 0 var(--s5);
  background: var(--fond);
  border-bottom: 1px solid var(--filet);
}
.marque { display: flex; align-items: center; gap: var(--s2); text-decoration: none; }
.marque span { font: 800 26px/1 var(--sans); font-stretch: 112%; letter-spacing: -.02em; }
/* Le logo est Ascii en version plate (ascii.css) : 42 unités = 26 px. Au repos, exactement le logo ; au survol et au
   focus, il ouvre les yeux (.ascii-eveil). À l'ouverture de learn (learn.js, une fois par visite), le logo, sans
   visage, tourne d'une branche : 60°, il retombe sur lui-même. */
.marque .ascii-plat { width: var(--s4); height: var(--s4); }
.ouverture .barre .marque .ascii-plat { animation: tourner var(--t4) var(--ease) both; }
@keyframes tourner { from { transform: rotate(-60deg); } }
/* D'une page à l'autre : un fondu court ; la barre reste en place. */
@view-transition { navigation: auto; }
.barre { view-transition-name: barre; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 162ms; }
.barre nav { display: flex; gap: var(--s4); }
.barre nav a { font: 500 14px/1 var(--sans); text-decoration: none; color: var(--doux); transition: color var(--t2) var(--ease); }
.barre nav a:hover, .barre nav a[aria-current] { color: var(--texte); }
.barre nav .p4 { display: none; }                     /* toujours dans « Plus » */
.barre nav .plus {
  display: block; flex: none; padding: 5px var(--s2); border: 1px solid var(--filet); border-radius: 0; background: none;
  font: 500 12px/1 var(--mono); letter-spacing: .04em; color: var(--texte); cursor: pointer;
}
.barre nav .plus[aria-expanded="true"] { border-color: var(--pigment); color: var(--pigment); }
.barre nav { align-items: center; }
.cotes { margin: 0 0 0 auto; display: flex; gap: var(--s4); font: 500 11px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--doux); }

/* ----------------------------------------------------------- pastilles de statut */
.pastille {
  display: inline-block; flex: none;
  transition: background-color var(--t2) var(--ease), border-color var(--t2) var(--ease);
  width: var(--t, 10px); height: var(--t, 10px);
  border: 1px solid color-mix(in srgb, var(--texte) 40%, var(--fond));
  vertical-align: -1px;
}
.s-a-voir { --st: var(--st-a-voir); }
.s-vue { --st: var(--st-vue); }
.s-comprise { --st: var(--st-comprise); }
.s-expliquee { --st: var(--st-expliquee); }
.s-appliquee { --st: var(--st-appliquee); }
.pastille.s-vue, .pastille.s-comprise, .pastille.s-expliquee, .pastille.s-appliquee { background: var(--st); border-color: var(--st); }

/* ----------------------------------------------------------- la carte */
.atlas {
  position: relative;
  height: calc(100svh - var(--s6));
  min-height: 560px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  grid-template-columns: minmax(0, 1fr);
  border-bottom: 1px solid var(--filet);
}
.outils {
  display: flex; align-items: center; gap: var(--s3);
  padding: var(--s3) var(--s5);
  border-bottom: 1px solid var(--filet);
}
.chercher input {
  width: var(--s9); height: var(--s5);
  padding: 0 var(--s3);
  border: 1px solid var(--filet); border-radius: 0;
  background: transparent; color: var(--texte);
  font: 400 14px/1 var(--sans);
}
.chercher input:focus { outline: none; border-color: var(--texte); }
.puces { display: flex; gap: var(--s1); overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
.puces button, .zoom button, .vue button {
  flex: none;
  height: var(--s4);
  padding: 0 var(--s2);
  border: 1px solid var(--filet); border-radius: 0;
  background: transparent;
  font: 500 12px/1 var(--sans);
  cursor: pointer;
  transition: background var(--t1) var(--ease), border-color var(--t1) var(--ease);
}
.puces button span { font: 500 10px/1 var(--mono); color: var(--doux); margin-right: var(--s1); }
.puces button:hover, .zoom button:hover, .vue button:hover { border-color: var(--texte); }
.puces button[aria-pressed="true"] { background: var(--texte); color: var(--fond); border-color: var(--texte); }
.puces button[aria-pressed="true"] span { color: inherit; opacity: .6; }
.zoom { display: flex; }
.vue { display: flex; }
.zoom[hidden], .scene[hidden] { display: none; }
.vue button[aria-pressed="true"] { border-color: var(--texte); color: var(--texte); }
/* La carte en liste (téléphone, ou au choix) : les notions par domaine, avec les mêmes filtres et la même recherche. */
.liste-carte { padding: var(--s4) var(--s4) var(--s5); }
/* Recherche par titre dans le panneau « Plus » (learn.js). */
.plus-recherche { grid-column: 1 / -1; padding: var(--s2) 0; }
.plus-recherche input { width: 100%; height: var(--s5); padding: 0 var(--s3); border: 1px solid var(--filet); border-radius: 0; background: var(--fond); color: var(--texte); font: 400 16px/1 var(--sans); }
.plus-recherche input:focus { outline: 2px solid var(--pigment); outline-offset: -1px; }
.plus-resultats { list-style: none; margin: var(--s2) 0 0; padding: 0; }
.plus-resultats:empty { display: none; }
.plus-resultats a { display: block; padding: var(--s1) 0; }
/* Rien ne répond : Ascii plat (learn.js), les yeux fermés, devant le mot. */
.plus-resultats .vide { display: flex; align-items: center; gap: var(--s2); padding: var(--s1) 0; }
.plus-resultats .vide .ascii-plat { width: var(--s4); height: var(--s4); }
.liste-carte section + section { margin-top: var(--s4); }
.liste-carte li { break-inside: avoid; }
@media (min-width: 760px) { .liste-carte .liste-notions { columns: 2; column-gap: var(--s5); } }
.zoom button { width: var(--s5); padding: 0; font-family: var(--mono); }
.zoom button + button { border-left: 0; }

.scene {
  overflow: auto;
  cursor: grab;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--filet) transparent;
}
.scene.glisse { cursor: grabbing; user-select: none; }
.scene:focus { outline: none; }
.scene svg { display: block; }
/* L'état vide de la carte (carte.js) : filtres ou recherche qui ne gardent aucune notion. Il prend la place de la
   carte, dont le dessin, tout estompé, ne dit plus rien (caché le temps du vide, sa position gardée), ou de la liste,
   vide : Ascii cherche, n'a aucune idée, puis attend, debout sur un filet sous les outils qui l'ont vidée, aligné sur
   eux, sa ligne à côté de lui sur le même sol (quitte à passer à la ligne sur un téléphone) ; comme sur /recherche/.
   Les rangées de l'atlas sont écrites pour qu'il partage celle de la carte. */
.atlas > .outils { grid-row: 1; }
.atlas > .scene, .atlas > .liste-carte, .atlas > .carte-vide { grid-row: 2; grid-column: 1; }
.atlas > .legende { grid-row: 3; }
.atlas:has(> .carte-vide:not([hidden])) > .scene { visibility: hidden; }
.carte-vide { align-self: start; max-width: calc(2 * var(--s9) + var(--s8)); margin: var(--s4) var(--s5) 0; border-bottom: 1px solid var(--filet); }
.carte-vide > .ascii { flex-wrap: nowrap; margin-bottom: calc(-1 * var(--ascii-sol)); }
@media (max-width: 760px) { .carte-vide { margin-inline: var(--s3); } }

.plan .colonne-tete { font: 500 11px/1 var(--mono); letter-spacing: .06em; fill: var(--doux); text-transform: uppercase; }
.plan .colonne-trait { stroke: var(--filet); stroke-width: 1; }

.plan .l {
  fill: none;
  stroke: var(--texte);
  stroke-opacity: .16;
  stroke-width: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  transition: stroke-opacity var(--t2) var(--ease), opacity var(--t2) var(--ease);
}
.plan .n { cursor: pointer; transition: opacity var(--t2) var(--ease); }
.plan .n text { font: 500 12px/1 var(--sans); fill: var(--texte); }
.plan .n .pig, .voisinage .pig {
  fill: var(--st);
  stroke: color-mix(in srgb, var(--texte) 45%, var(--fond));
  stroke-width: 1;
}
.plan .n:not(.s-a-voir) .pig, .voisinage :not(.s-a-voir) > .pig { stroke: var(--st); }
.plan .n .zone { fill: transparent; }
.plan .n .ecrit { fill: var(--texte); opacity: .5; }

/* Arrivée : la carte se construit colonne par colonne, dans l'ordre où l'on apprend */
@keyframes apparaitre { from { opacity: 0; transform: translateX(-10px); } }
@keyframes tracer { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.plan.arrivee .n > * { animation: apparaitre var(--t3) var(--ease) both; animation-delay: calc(var(--d) * var(--t1)); }
.plan.arrivee .l { animation: tracer var(--t4) var(--ease) both; animation-delay: calc(var(--d) * var(--t1) + var(--t2)); }

/* Focus : la lignée s'allume, le reste s'efface */
.plan.focus .n:not(.on) { opacity: .13; }
.plan.focus .l:not(.on) { opacity: .05; }
.plan .l.on { stroke-opacity: .9; stroke-width: 1.5; }
.plan .l.amont { stroke: var(--pigment); stroke-opacity: 1; }
.plan .n.soi text { font-weight: 800; }
.plan .n.soi .pig { stroke: var(--pigment); stroke-width: 2; }
.plan .n.amont text { fill: var(--pigment); }
.plan .l.onde { animation: tracer var(--t3) var(--ease) both; animation-delay: calc(var(--k) * var(--t1)); }
/* En amont, l'onde remonte vers les fondamentaux : le trait se dessine de droite à gauche */
@keyframes remonter { from { stroke-dashoffset: -1; } to { stroke-dashoffset: 0; } }
.plan .l.amont.onde { animation-name: remonter; }

.plan.filtre .n.hors { opacity: .1; }
.plan.filtre .l.hors { opacity: .04; }
.plan.recherche .n:not(.trouve) { opacity: .13; }
.plan.recherche .l { opacity: .05; }
.plan .n.trouve text { fill: var(--pigment); font-weight: 700; }

.legende {
  display: flex; justify-content: space-between; align-items: center; gap: var(--s4);
  padding: var(--s2) var(--s5);
  border-top: 1px solid var(--filet);
  font: 500 11px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--doux);
}
/* Marge négative et retrait égaux : la liste défile sans rogner le cadre des boutons (voir plus bas). */
.legende ul { display: flex; gap: var(--s3); list-style: none; margin: calc(-1 * var(--s1)); padding: var(--s1); overflow-x: auto; scrollbar-width: none; }
.legende li { flex: none; }
.legende li { display: flex; align-items: center; gap: var(--s1); }
.legende .pastille { --t: 10px !important; }
/* Chaque statut est un filtre : le cadre n'apparaît qu'au survol et une fois choisi ; le texte ne bouge pas. */
.legende button {
  display: flex; align-items: center; gap: var(--s1);
  margin: calc(-1 * var(--s1)); padding: var(--s1);
  border: 1px solid transparent; border-radius: 0; background: none;
  color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer;
}
.legende button b { font-weight: 500; color: var(--texte); font-variant-numeric: tabular-nums; }
.legende button:hover { border-color: var(--filet); }
.legende button[aria-pressed="true"] { border-color: var(--texte); color: var(--texte); }
.legende button:focus-visible { outline: 2px solid var(--pigment); outline-offset: -2px; }
.legende .trait-ecrit { display: block; width: 16px; height: 2px; background: var(--texte); opacity: .5; }
.sens { display: flex; align-items: center; gap: var(--s2); margin: 0; }
.sens i { display: block; width: var(--s7); height: 1px; background: var(--doux); position: relative; }
.sens i::after { content: ""; position: absolute; right: 0; top: -3px; border: 3.5px solid transparent; border-left: 6px solid var(--doux); border-right: 0; }

/* ----------------------------------------------------------- panneau */
.panneau {
  position: absolute; z-index: 5;
  top: calc(var(--s5) + 2 * var(--s3) + 1px); right: 0; bottom: 38px;
  width: calc(var(--s9) + var(--s6) + var(--s3));
  overflow-y: auto;
  padding: var(--s4);
  background: var(--fond);
  border-left: 1px solid var(--texte);
  animation: entrer var(--t3) var(--ease);
}
@keyframes entrer { from { transform: translateX(var(--s4)); opacity: 0; } }
.panneau h3 { margin: var(--s1) 0 0; font: 800 26px/1.1 var(--sans); font-stretch: 108%; letter-spacing: -.01em; }
.panneau .en { margin: var(--s2) 0 var(--s3); font: 400 12px/1.5 var(--mono); color: var(--doux); }
.panneau .fermer {
  position: absolute; top: var(--s3); right: var(--s3);
  width: var(--s4); height: var(--s4);
  border: 0; background: none; cursor: pointer; font: 400 20px/1 var(--sans);
}
.panneau .ligne { display: flex; align-items: center; gap: var(--s2); margin: 0 0 var(--s1); font-size: 14px; }
.panneau h4 { margin: var(--s4) 0 var(--s2); }
.panneau ol, .panneau ul { list-style: none; margin: 0; padding: 0; }
.panneau li button {
  display: flex; align-items: center; gap: var(--s2);
  width: 100%; padding: 3px 0;
  border: 0; background: none; text-align: left; cursor: pointer;
  font: 400 14px/1.4 var(--sans);
}
.panneau li button:hover { color: var(--pigment); }
.panneau .prof { margin-top: var(--s2); }
.panneau .ouvrir {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: var(--s4);
  height: var(--s5); padding: 0 var(--s3);
  background: var(--texte); color: var(--fond);
  font: 600 14px/1 var(--sans); text-decoration: none;
  transition: background var(--t2) var(--ease);
}
.panneau .ouvrir:hover { background: var(--pigment); color: var(--papier); }
.panneau .jauge { display: flex; gap: 3px; margin-top: var(--s1); }
.panneau .jauge i { width: var(--s4); height: 4px; background: var(--filet); }
.panneau .jauge i.on { background: var(--texte); }

/* ----------------------------------------------------------- blocs de l'accueil */
.bloc { padding: var(--s7) var(--s5); border-bottom: 1px solid var(--filet); }
.bloc > header, .duo header { max-width: calc(2 * var(--s9) + var(--s8)); margin-bottom: var(--s5); }
.bloc h2 { margin: var(--s2) 0; font: 800 42px/1.05 var(--sans); font-stretch: 112%; letter-spacing: -.02em; overflow-wrap: break-word; hyphens: auto; }
.chapeau { margin: 0; color: var(--doux); max-width: 60ch; }
/* Ascii seul dans une page (construire.py) : la 404 (288 px) et hors ligne (110 px). Il se pose sous le titre, le corps
   (42 unités de son cadre) sur le bord gauche du texte, et ce qui suit commence à 26 px de son sol. Sa ligne reste à
   côté de lui (hors ligne, sur deux lignes au besoin) ; celle de la 404, faute de place à côté de 288 px, passe dessous
   sur téléphone, au bord du texte. */
#ascii-introuvable, #ascii-hors-ligne { margin-bottom: calc(var(--s4) - var(--ascii-sol)); }
:is(#ascii-introuvable, #ascii-hors-ligne) > .ascii-scene { margin-left: calc(var(--ascii-taille) * (42 - var(--ascii-cadre)) / (2 * var(--ascii-cadre))); }
#ascii-hors-ligne { flex-wrap: nowrap; }

.domaines { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--texte); }
.domaines li {
  display: grid;
  grid-template-columns: var(--s5) var(--s9) 1fr repeat(3, var(--s7));
  align-items: center; gap: var(--s3);
  padding: var(--s3) 0;
  border-bottom: 1px solid var(--filet);
}
.domaines .num { font: 500 12px/1 var(--mono); color: var(--doux); }
.dom-titre a { font: 700 18px/1.2 var(--sans); text-decoration: none; }
.dom-titre a:hover { color: var(--pigment); }
.dom-titre small { display: block; margin-top: 2px; font: 400 12px/1.3 var(--mono); color: var(--doux); }
.cases { display: flex; flex-wrap: wrap; gap: 4px; }
.cases a { display: block; line-height: 0; transition: transform var(--t1) var(--ease); }
.cases a:hover { transform: translateY(-2px); }
.chiffre { font: 700 20px/1 var(--sans); font-variant-numeric: tabular-nums; text-align: right; }
.chiffre small { display: block; margin-top: 4px; font: 500 10px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--doux); }

.duo { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s6); }
.pretes { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--texte); columns: 2; column-gap: var(--s4); }
.pretes li { break-inside: avoid; border-bottom: 1px solid var(--filet); }
.pretes a { display: flex; align-items: baseline; gap: var(--s2); padding: var(--s2) 0; text-decoration: none; }
.pretes a:hover span { color: var(--pigment); }
.pretes small { margin-left: auto; font: 400 11px/1 var(--mono); color: var(--doux); text-align: right; }

/* ----------------------------------------------------------- cartes de colle */
.colle { display: grid; gap: var(--s2); }
.carte {
  border: 1px solid var(--filet);
  transition: border-color var(--t2) var(--ease);
}
details.carte[open] { border-color: var(--texte); }
.carte summary {
  display: block; list-style: none; cursor: pointer;
  padding: var(--s3) var(--s4);
  font-weight: 600;
}
.carte summary::-webkit-details-marker { display: none; }
.carte summary .cote, .carte .reponse .cote { display: block; margin-bottom: var(--s1); }
.carte summary:hover { color: var(--pigment); }
.carte .reponse {
  padding: var(--s3) var(--s4);
  border-top: 1px solid var(--filet);
  background: color-mix(in srgb, var(--pigment) 7%, var(--fond));
  animation: devoiler var(--t3) var(--ease);
}
@keyframes devoiler { from { opacity: 0; transform: translateY(-6px); } }
.carte .source { display: block; margin-top: var(--s2); font: 400 12px/1.4 var(--mono); color: var(--doux); }
.carte .source a { text-decoration: none; border-bottom: 1px solid var(--filet); }

/* ----------------------------------------------------------- fiche */
.fiche { padding: 0 var(--s5) var(--s7); }
.tete-fiche { padding: var(--s6) 0 var(--s5); border-bottom: 1px solid var(--texte); }
.fil { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s4); }
.fil a { text-decoration: none; color: var(--texte); }
.fil a:hover { color: var(--pigment); }
.tete-fiche h1 {
  margin: var(--s4) 0 var(--s3);
  font: 800 clamp(42px, 7vw, 110px)/.95 var(--sans);
  font-stretch: 116%;
  letter-spacing: -.035em;
  max-width: 14ch;
  text-wrap: balance;
  overflow-wrap: break-word;
  hyphens: auto;
}
.en { display: flex; flex-wrap: wrap; gap: var(--s2); margin: 0; font: 400 14px/1.5 var(--mono); color: var(--doux); }
.en .cote { color: var(--texte); }
.statuts { display: flex; flex-wrap: wrap; gap: var(--s4); list-style: none; margin: var(--s4) 0 0; padding: 0; font: 500 11px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--doux); }
.statuts li { display: flex; align-items: center; gap: var(--s1); }
.statuts li.actif { color: var(--texte); }
.statuts li.actif .pastille { outline: 2px solid var(--texte); outline-offset: 2px; }
/* La place d'Ascii (commun.js, data-ascii-zone) : la marge du bas de l'en-tête (42 px, celle d'avant : au repos,
   l'en-tête ne change pas), sur son filet. Ascii n'y paraît que le temps de sa réaction au statut choisi, au bout du
   sélecteur, debout sur le filet, sa ligne à sa gauche, sur le même sol, sous les statuts. commun.js (placer) choisit
   sa taille et sa place (right) : la réaction (178 px) au plus près, là où rien de l'en-tête ne descend jusqu'à lui ;
   la version plate (26 px) sinon. */
.tete-fiche:has(> .statut-ascii) { padding-bottom: 0; }
.statut-ascii { position: relative; height: var(--s5); }
.statut-ascii > .ascii {
  position: absolute; right: 0; bottom: calc(-1 * var(--ascii-sol));
  flex-direction: row-reverse; flex-wrap: nowrap; column-gap: var(--s3);
  opacity: 0; transition: opacity var(--t3) var(--ease);
}
.statut-ascii.est-la > .ascii { opacity: 1; }
.statut-ascii > .ascii[hidden] { display: none; }
/* En plat, sa ligne serrée contre lui ; sur un petit téléphone, où la plus longue (« Une de moins dans le troisième
   cercle. ») passe sur deux lignes (est-serree, commun.js), plus dense, pour tenir dans la marge sans la faire grandir. */
.statut-ascii > .ascii--plat { column-gap: var(--s1); }
.statut-ascii > .ascii--plat .ascii-ligne { padding-inline: var(--s1); }
.statut-ascii > .ascii.est-serree .ascii-ligne { padding-block: 2px; line-height: 1.25; }
/* La version plate, qui n'a ni bras ni saut, rend le tour en l'air d'« appliquée » par six pas de 60°. */
.statut-ascii > .ascii[data-joue="niveau"] .ascii-corps { animation: ascii-pas calc(var(--ascii-pas) / 3) var(--ease) 6; transform-origin: 21px 21px; transform-box: view-box; }

.vois { padding: var(--s5) 0; border-bottom: 1px solid var(--filet); }
.voisinage { display: block; width: 100%; max-width: 1012px; height: auto; }
.voisinage .l { fill: none; stroke: var(--texte); stroke-opacity: .35; }
.voisinage .n text, .voisinage .soi text { font: 500 13px/1 var(--sans); fill: var(--texte); }
.voisinage a:hover text { fill: var(--pigment); }
.voisinage .tete { font: 500 11px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; fill: var(--doux); }
.voisinage .soi .cadre { fill: var(--fond); stroke: var(--texte); stroke-width: 1.5; }
.voisinage .soi text { font-weight: 800; font-size: 14px; }
.voisinage-liste { display: none; }
.proches { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s2) var(--s3); margin: var(--s3) 0 0; }
.proches a { text-decoration: none; border-bottom: 1px solid var(--filet); }
.proches a:hover { color: var(--pigment); border-color: var(--pigment); }

.colonnes { display: grid; grid-template-columns: minmax(0, calc(16 * var(--s5))) var(--s9); gap: var(--s6); justify-content: space-between; }
.cours { padding-top: var(--s5); }
.sec { padding: var(--s4) 0 var(--s5); border-bottom: 1px solid var(--filet); }
.sec h2 { display: flex; align-items: baseline; gap: var(--s3); margin: 0 0 var(--s3); font: 700 26px/1.2 var(--sans); font-stretch: 106%; letter-spacing: -.01em; }
.sec.vide h2 { color: var(--doux); }
.sec p, .sec li { max-width: 68ch; }
.sec ul, .sec ol { padding-left: var(--s4); }
.sec h3 { margin: var(--s5) 0 var(--s2); font: 700 18px/1.3 var(--sans); }
.sec h3:first-of-type { margin-top: var(--s2); }
.sec blockquote { margin: var(--s3) 0; padding: var(--s2) var(--s3); border-left: 3px solid var(--pigment); background: color-mix(in srgb, var(--pigment) 5%, var(--fond)); }
.sec blockquote p { margin: 0; }
.sec li { margin-bottom: var(--s1); }
.sec li::marker { color: var(--doux); }
.sec a { text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--pigment) 50%, var(--fond)); }
.sec a:hover { color: var(--pigment); }
.sec table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin: var(--s3) 0; font-size: 14px; font-variant-numeric: tabular-nums; }
.sec th, .sec td { padding: var(--s1) var(--s3) var(--s1) 0; border-bottom: 1px solid var(--filet); text-align: left; }
.sec th { font: 500 11px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--doux); border-bottom-color: var(--texte); }
.sec .katex-display { overflow-x: auto; overflow-y: hidden; padding: var(--s2) 0; margin: var(--s3) 0; }
.a-ecrire {
  margin: 0; padding: var(--s3);
  border: 1px dashed var(--filet);
  font: 400 13px/1.5 var(--mono); color: var(--doux);
}
.brouillon {
  display: flex; gap: var(--s3); align-items: baseline;
  margin: 0 0 var(--s3); padding: var(--s3);
  border-left: 3px solid var(--pigment);
  background: color-mix(in srgb, var(--pigment) 6%, var(--fond));
  font-size: 14px;
}
.brouillon .cote { color: var(--pigment); white-space: nowrap; }

.rail { padding-top: var(--s5); }
.chemin { list-style: none; margin: var(--s3) 0 0; padding: 0 0 0 var(--s3); border-left: 1px solid var(--filet); }
.chemin > li { margin-bottom: var(--s3); }
.chemin ul { list-style: none; margin: var(--s1) 0 0; padding: 0; }
.chemin a, .voisinage-liste a { display: flex; align-items: center; gap: var(--s2); padding: 2px 0; font-size: 14px; text-decoration: none; }
.chemin a:hover, .voisinage-liste a:hover { color: var(--pigment); }
.vide { color: var(--doux); font-size: 14px; }
.actions { display: grid; gap: var(--s1); margin: 0 0 var(--s5); }
.actions a {
  display: flex; align-items: center; height: var(--s5); padding: 0 var(--s3);
  border: 1px solid var(--texte); text-decoration: none; font: 600 14px/1 var(--sans);
  transition: background var(--t2) var(--ease), color var(--t2) var(--ease);
}
.actions a:first-child { background: var(--texte); color: var(--fond); }
.actions a:hover { background: var(--pigment); border-color: var(--pigment); color: var(--papier); }

.suite { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); margin-top: var(--s6); }
.suite a { display: block; padding: var(--s4) 0; border-top: 1px solid var(--texte); text-decoration: none; font: 700 20px/1.2 var(--sans); }
.suite a .cote { display: block; margin-bottom: var(--s1); }
.suite a:hover { color: var(--pigment); }
.suite .suiv { text-align: right; }


/* ----------------------------------------------------------- listes : articles, entretiens */
.articles { list-style: none; margin: 0; padding: 0 1px 1px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--s9), 1fr)); }
.articles li { border: 1px solid var(--filet); margin: 0 -1px -1px 0; }
.articles a { display: flex; flex-direction: column; gap: var(--s2); height: 100%; padding: var(--s4); text-decoration: none; transition: background var(--t2) var(--ease); }
.articles a:hover { background: color-mix(in srgb, var(--pigment) 5%, var(--fond)); }
.articles a:hover h3 { color: var(--pigment); }
.articles h3 { margin: 0; font: 800 22px/1.15 var(--sans); font-stretch: 108%; letter-spacing: -.01em; }
.articles p { margin: 0; color: var(--doux); font-size: 15px; }

/* ----------------------------------------------------------- article */
.titre-article { max-width: 18ch !important; font-size: clamp(36px, 5.2vw, 78px) !important; overflow-wrap: break-word; hyphens: auto; }
.lead { max-width: 62ch; margin: var(--s3) 0 0; font-size: 19px; line-height: 1.55; color: var(--doux); }
.prose { max-width: calc(16 * var(--s5)); }
.prose h2 { margin: var(--s6) 0 var(--s3); font: 800 28px/1.15 var(--sans); font-stretch: 106%; letter-spacing: -.01em; }
.prose h3 { margin: var(--s5) 0 var(--s2); font: 700 20px/1.2 var(--sans); }
.prose p, .prose li { max-width: 68ch; }
.prose ul, .prose ol { padding-left: var(--s4); }
.prose li { margin-bottom: var(--s1); }
.prose li::marker { color: var(--doux); }
.prose a { text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--pigment) 50%, var(--fond)); }
.prose a:hover { color: var(--pigment); }
.prose table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin: var(--s4) 0; font-size: 14px; font-variant-numeric: tabular-nums; }
.prose th, .prose td { padding: var(--s1) var(--s3) var(--s1) 0; border-bottom: 1px solid var(--filet); text-align: left; vertical-align: top; }
.prose th { font: 500 11px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--doux); border-bottom-color: var(--texte); }
.prose .katex-display { overflow-x: auto; overflow-y: hidden; padding: var(--s2) 0; }
.prose em { color: var(--doux); }
.prose > p:first-of-type { font-size: 18px; }
.liste-notions { list-style: none; margin: var(--s2) 0 0; padding: 0; }
.liste-notions a { display: flex; align-items: center; gap: var(--s2); padding: 3px 0; font-size: 14px; text-decoration: none; }
.liste-notions a:hover { color: var(--pigment); }
.liste-notions small { margin-left: auto; font: 400 11px/1 var(--mono); color: var(--doux); }
.rail-lien { margin: var(--s3) 0 0; }
.rail-lien .cote { display: block; margin-bottom: var(--s1); }
.rail-lien a { font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--filet); }
.rail-lien a:hover { color: var(--pigment); }
.rail-lien ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s1); font-size: 14px; }

/* ----------------------------------------------------------- parcours */
.parcours { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--texte); }
.semaine { border-bottom: 1px solid var(--filet); padding: var(--s4) 0; scroll-margin-top: calc(var(--s6) + var(--s4)); }
.semaine.courante { background: color-mix(in srgb, var(--pigment) 6%, var(--fond)); box-shadow: -16px 0 0 color-mix(in srgb, var(--pigment) 6%, var(--fond)), 16px 0 0 color-mix(in srgb, var(--pigment) 6%, var(--fond)); }
.semaine.courante .sem-num { color: var(--pigment); }
.semaine .cote b { color: var(--pigment); font-weight: 500; }
.sem-tete { display: grid; grid-template-columns: var(--s6) 1fr auto; gap: var(--s3); align-items: center; }
.sem-num { font: 800 42px/1 var(--sans); font-stretch: 112%; letter-spacing: -.03em; color: color-mix(in srgb, var(--texte) 30%, var(--fond)); }
.sem-tete h3 { margin: 4px 0 0; font: 700 20px/1.25 var(--sans); }
.sem-cases { display: flex; gap: 4px; }
.sem-corps { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, var(--s9)); gap: var(--s5); margin: var(--s3) 0 0 calc(var(--s6) + var(--s3)); }
.sem-liens li { overflow-wrap: anywhere; }
@media (max-width: 1100px) { .sem-corps { grid-template-columns: minmax(0, 1fr); gap: var(--s3); } }
.sem-corps .liste-notions { columns: 2; column-gap: var(--s4); margin: 0; }
.sem-corps .liste-notions li { break-inside: avoid; }
.sem-liens { list-style: none; margin: var(--s1) 0 var(--s3); padding: 0; display: grid; gap: var(--s1); font-size: 15px; }
.sem-liens a { font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--filet); }
.sem-liens a:hover { color: var(--pigment); }
.sem-exos li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px var(--s2); }
.sem-exos span { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.sem-exos a.num { font: 500 12px/1 var(--mono); padding: 3px 5px; border: 1px solid var(--filet); min-width: 22px; text-align: center; }
.sem-exos a.num:hover { border-color: var(--pigment); }
.sem-livres li { color: var(--texte); }
.sem-livres .cote { margin-left: 2px; }
/* Ascii, la semaine terminée (parcours.js) : à gauche de la notion suivante, qu'il montre, les pieds sur le bas du
   lien ; à la fin du parcours, seul, avec sa ligne. */
.sem-suite { display: flex; align-items: flex-end; gap: var(--s3); margin-top: var(--s4); }
.sem-suite > .ascii { flex: 0 1 auto; flex-wrap: nowrap; margin-bottom: calc(-1 * var(--ascii-sol)); }
.sem-suite p { margin: 0; min-width: 0; }
.sem-suite .cote { display: block; margin-bottom: 4px; }
.sem-suite a { font: 700 20px/1.25 var(--sans); text-decoration: none; border-bottom: 2px solid currentColor; overflow-wrap: break-word; }
.sem-suite a:hover { color: var(--pigment); }

/* ----------------------------------------------------------- veille */
.compteurs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--filet); border: 1px solid var(--filet); margin-bottom: var(--s6); }
.compteurs p { margin: 0; padding: var(--s4); background: var(--fond); }
.compteurs b { display: block; font: 800 42px/1 var(--sans); font-stretch: 112%; font-variant-numeric: tabular-nums; }
.compteurs span { font: 500 11px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--doux); }
.veille-bloc { padding: var(--s4) 0 var(--s5); border-top: 1px solid var(--texte); }
.veille-bloc h3 { margin: 0 0 var(--s3); font: 800 22px/1.2 var(--sans); font-stretch: 106%; }
.veille-bloc details { border-bottom: 1px solid var(--filet); }
.veille-bloc details > summary { cursor: pointer; padding: var(--s2) 0; list-style: none; display: flex; gap: var(--s2); align-items: baseline; font-weight: 600; }
.veille-bloc details > summary::-webkit-details-marker { display: none; }
.veille-bloc details > summary:hover { color: var(--pigment); }
.veille-bloc details .liste-notions, .veille-bloc > .liste-notions { columns: 3; column-gap: var(--s4); padding-bottom: var(--s3); }
.veille-bloc .liste-notions li { break-inside: avoid; }
.props { list-style: none; margin: 0; padding: 0; }
.prop .badge { font: 500 10px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; padding: 4px 6px; border: 1px solid var(--texte); flex: none; }
.prop.st-a-valider .badge { background: var(--pigment); border-color: var(--pigment); color: var(--papier); }
.prop.st-rejetee { opacity: .55; }
.prop .prose { padding: var(--s2) 0 var(--s4); }
.alertes { margin: 0; padding-left: var(--s4); color: var(--pigment); }

@media (max-width: 760px) {
  .sem-tete { grid-template-columns: var(--s5) 1fr; }
  .sem-cases { grid-column: 2; }
  .sem-corps { grid-template-columns: 1fr; margin-left: 0; gap: var(--s3); }
  .sem-corps .liste-notions, .veille-bloc details .liste-notions, .veille-bloc > .liste-notions { columns: 1; }
  .compteurs { grid-template-columns: 1fr 1fr; }
  .lead { font-size: 17px; }
}


/* ----------------------------------------------------------- programme CFA */
.niveaux { display: flex; flex: none; }
.niveaux button { height: var(--s4); padding: 0 var(--s2); border: 1px solid var(--filet); border-radius: 0; background: transparent; font: 500 11px/1 var(--mono); letter-spacing: .04em; cursor: pointer; }
.niveaux button + button { border-left: 0; }
.niveaux button:hover { border-color: var(--texte); }
.niveaux button[aria-pressed="true"] { background: var(--pigment); border-color: var(--pigment); color: var(--papier); }
.avertissement { max-width: 72ch; margin: 0 0 var(--s6); padding: var(--s3); border: 1px dashed var(--filet); font: 400 12px/1.6 var(--mono); color: var(--doux); }
.niveau { margin-bottom: var(--s6); border-top: 1px solid var(--texte); }
.niveau-tete { display: flex; align-items: center; gap: var(--s4); padding: var(--s4) 0; }
.niveau-num { font: 800 68px/1 var(--sans); font-stretch: 116%; letter-spacing: -.03em; color: var(--pigment); min-width: var(--s7); }
.niveau-tete h3 { margin: 4px 0 0; font: 700 24px/1.2 var(--sans); }
.theme { border-bottom: 1px solid var(--filet); }
.theme > summary { display: grid; grid-template-columns: var(--s9) 1fr var(--s7) var(--s7); gap: var(--s3); align-items: center; padding: var(--s3) 0; cursor: pointer; list-style: none; }
.theme > summary::-webkit-details-marker { display: none; }
.theme > summary:hover .theme-nom { color: var(--pigment); }
.theme-nom { font: 700 17px/1.25 var(--sans); }
.theme-nom small { display: block; margin-top: 2px; font: 400 11px/1.3 var(--mono); color: var(--doux); }
.theme .cases { display: flex; flex-wrap: wrap; gap: 3px; }
.theme .liste-notions { columns: 3; column-gap: var(--s4); padding: 0 0 var(--s3); }
.theme .liste-notions li { break-inside: avoid; }
@media (max-width: 760px) {
  .niveaux { order: 2; }
  .theme > summary { grid-template-columns: 1fr var(--s6); }
  .theme .cases, .theme .chiffre:last-child { display: none; }
  .theme .liste-notions { columns: 1; }
  .niveau-num { font-size: 42px; min-width: var(--s6); }
}


/* ----------------------------------------------------------- exercices */
.exercices h3 { margin: var(--s6) 0 var(--s2); padding-top: var(--s4); border-top: 1px solid var(--filet); font: 700 20px/1.25 var(--sans); }
.exercices h3:first-of-type { margin-top: var(--s4); }
.corrige { margin: var(--s3) 0 0; border: 1px solid var(--filet); }
.corrige > summary { cursor: pointer; list-style: none; padding: var(--s2) var(--s3); font: 500 11px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--pigment); }
.corrige > summary::-webkit-details-marker { display: none; }
.corrige > summary::before { content: "+ "; }
.corrige[open] > summary::before { content: "− "; }
.corrige[open] { border-color: var(--pigment); }
.corrige-corps { padding: 0 var(--s3) var(--s2); background: color-mix(in srgb, var(--pigment) 5%, var(--fond)); border-top: 1px solid var(--filet); animation: devoiler var(--t3) var(--ease); }


/* ----------------------------------------------------------- colle */
.colle-outils { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); margin-bottom: var(--s4); }
.colle-outils select { height: var(--s5); padding: 0 var(--s3); border: 1px solid var(--filet); border-radius: 0; background: var(--fond); color: var(--texte); font: 500 14px/1 var(--sans); }
.colle-outils .cote { margin-left: auto; }
.colle-grille { display: grid; grid-template-columns: minmax(0, 1fr) var(--s9); gap: var(--s6); align-items: start; }
.colle-carte { min-height: var(--s9); padding: var(--s5); border: 1px solid var(--texte); }
.colle-q { margin: var(--s3) 0 var(--s4); font: 700 24px/1.35 var(--sans); max-width: 40ch; }
.colle-r { padding: var(--s3) var(--s4); margin-bottom: var(--s4); background: color-mix(in srgb, var(--pigment) 6%, var(--fond)); border-left: 3px solid var(--pigment); animation: devoiler var(--t3) var(--ease); }
.colle-r .source { display: inline-block; margin-top: var(--s2); font: 400 12px/1.4 var(--mono); color: var(--doux); text-decoration: none; }
.colle-actions { display: flex; flex-wrap: wrap; gap: var(--s2); }
.colle-actions button { height: var(--s5); padding: 0 var(--s4); border: 1px solid var(--texte); border-radius: 0; background: transparent; font: 600 14px/1 var(--sans); cursor: pointer; transition: background var(--t1) var(--ease), color var(--t1) var(--ease); }
.colle-actions .retourner, .colle-actions .su { background: var(--texte); color: var(--fond); }
.colle-actions .su:hover, .colle-actions .retourner:hover { background: var(--pigment); border-color: var(--pigment); color: var(--papier); }
.colle-actions .rate:hover { border-color: var(--pigment); color: var(--pigment); }
.colle-actions kbd { margin-left: var(--s1); font: 400 10px/1 var(--mono); opacity: .6; }
.colle-fin { padding: var(--s5); border: 1px dashed var(--filet); }
.colle-fin h3 { margin: var(--s2) 0; font: 700 22px/1.2 var(--sans); }
/* Ascii dans la fin de file (colle.js) : endormi à la taille d'un état (110 px) quand la file est vide dès l'ouverture,
   à celle d'une réaction (178 px) quand une séance vient d'être menée au bout (bravo, puis endormi). À gauche du texte,
   la ligne de base de sa dernière ligne posée sur son sol : le bas de marge d'Ascii est à ses pieds (--ascii-sol), celui
   du texte à sa ligne de base (interligne 1,62, la base à 0,52 em du bas) ; dessous quand la place manque. */
.colle-fin:has(> .ascii) { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s4); }
.colle-fin-texte { flex: 1 1 24ch; min-width: 0; }
.colle-fin > .ascii { margin-bottom: calc(-1 * var(--ascii-sol)); }
.colle-fin > .ascii + .colle-fin-texte > :last-child { margin-bottom: -.52em; }
.colle-boites { list-style: none; margin: var(--s2) 0 var(--s3); padding: 0; display: grid; gap: var(--s1); }
.colle-boites li { display: grid; grid-template-columns: var(--s6) 1fr; grid-template-rows: auto 3px; column-gap: var(--s2); font-size: 14px; }
.colle-boites b { font: 700 18px/1 var(--sans); font-variant-numeric: tabular-nums; }
.colle-boites i { grid-column: 1 / -1; display: block; height: 3px; background: linear-gradient(to right, var(--pigment) var(--p), var(--filet) var(--p)); }
.lien-discret { border: 0; background: none; padding: 0; font: 400 12px/1 var(--mono); color: var(--doux); text-decoration: underline; cursor: pointer; }
@media (max-width: 760px) {
  .colle-grille { grid-template-columns: 1fr; }
  .colle-carte { padding: var(--s4) var(--s3); }
  .colle-q { font-size: 19px; }
  .colle-outils .cote { margin-left: 0; flex-basis: 100%; }
}

/* ----------------------------------------------------------- petits écrans */
@media (max-width: 1100px) {
  .cotes { display: none; }
  .domaines li { grid-template-columns: var(--s4) 1fr repeat(3, var(--s6)); }
  .domaines .cases { grid-column: 2 / -1; grid-row: 2; }
  .colonnes { grid-template-columns: minmax(0, 1fr); }
  .rail { border-top: 1px solid var(--filet); }
}
@media (max-width: 760px) {
  .barre { gap: var(--s3); padding: 0 var(--s3); height: var(--s5); }

  .marque span { display: none; }
  .atlas { height: calc(100svh - var(--s5)); }
  .outils { flex-wrap: wrap; padding: var(--s2) var(--s3); gap: var(--s2); }
  .chercher, .chercher input { width: 100%; }
  .puces { order: 3; flex-basis: 100%; }
  .zoom { display: none; }
  .legende { padding: var(--s1) var(--s3); }
  .legende .sens { display: none; }
  .legende ul { gap: var(--s3); flex-wrap: wrap; }
  .panneau { top: auto; left: 0; right: 0; bottom: 0; width: auto; max-height: 62%; border-left: 0; border-top: 1px solid var(--texte); padding: var(--s3); }
  .bloc { padding: var(--s6) var(--s3); }
  .bloc h2 { font-size: 32px; }
  .duo { grid-template-columns: 1fr; gap: var(--s6); }
  .pretes { columns: 1; }
  .domaines li { grid-template-columns: var(--s4) 1fr var(--s6); }
  .domaines .chiffre:nth-of-type(n+2) { display: none; }
  .fiche { padding: 0 var(--s3) var(--s6); }
  .tete-fiche { padding-top: var(--s5); }
  .voisinage { display: none; }
  .voisinage-liste { display: grid; gap: var(--s4); }
  .voisinage-liste ul { list-style: none; margin: var(--s1) 0 0; padding: 0; }
  .sec h2 { font-size: 22px; }
  .suite { grid-template-columns: 1fr; }
  .suite .suiv { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; transition-duration: 1ms !important; }
  @view-transition { navigation: none; }
}

/* ----------------------------------------------------------- serveur learn-app : atelier, dépôt, messages */
.barre nav .sortir { flex: none; padding: 0; border: 0; background: none; font: 500 14px/1 var(--sans); color: var(--doux); cursor: pointer; }
.barre nav .sortir:hover { color: var(--pigment); }
.statuts.editable li { cursor: pointer; transition: color var(--t2) var(--ease); }
.statuts.editable li:hover { color: var(--pigment); }
.atelier textarea {
  display: block; width: 100%; max-width: 68ch; min-height: calc(3 * var(--s5)); padding: var(--s3);
  border: 1px solid var(--texte); border-radius: 0; background: transparent; color: inherit;
  font: 400 16px/1.62 var(--sans); resize: vertical;
}
.atelier textarea:focus { outline: 2px solid var(--pigment); outline-offset: 2px; }
.atelier-texte p { margin: 0 0 var(--s2); }
/* Code en ligne (formules de tableur, noms de fonctions) : coupable n'importe où plutôt que de déborder sur téléphone. */
main :not(pre) > code { overflow-wrap: anywhere; }
.auj-pannes { border-left: 2px solid var(--texte); padding-left: var(--s3); }
.auj-pannes pre { white-space: pre-wrap; overflow-wrap: anywhere; font: 12px/1.5 var(--mono); margin: var(--s2) 0 0; }
.atelier-attente { border-left: 2px solid var(--pigment); padding-left: var(--s3); margin-bottom: var(--s4); }
.atelier-outils { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); margin: var(--s3) 0 0; }
/* Une section vide d'Ethan (atelier.js) : Ascii plat (26 px, sans moteur) attend à côté du bouton « Écrire », les yeux
   ouverts (il cligne), sans rien dire, centré sur la ligne du bouton. */
.atelier-outils > .ascii--plat { align-self: center; }
.atelier-outils button {
  height: var(--s5); padding: 0 var(--s4); border: 1px solid var(--texte); border-radius: 0; background: transparent;
  font: 600 14px/1 var(--sans); cursor: pointer; transition: background var(--t1) var(--ease), color var(--t1) var(--ease);
}
.atelier-outils .ecrire, .atelier-outils .enregistrer { background: var(--texte); color: var(--fond); }
.atelier-outils .ecrire:hover, .atelier-outils .enregistrer:hover { background: var(--pigment); border-color: var(--pigment); color: var(--papier); }
.atelier-outils button[disabled] { opacity: .5; cursor: progress; }
.atelier-outils kbd { margin-left: var(--s1); font: 400 10px/1 var(--mono); opacity: .6; }
.atelier-outils input[type=checkbox] { accent-color: var(--pigment); }
.atelier-outils label { display: flex; align-items: center; gap: var(--s1); font: 400 13px/1.4 var(--mono); color: var(--doux); }
.cours .sec { transition: filter var(--t3) var(--ease), opacity var(--t3) var(--ease); }
.cours.masque .sec:not([data-section]), .cours.masque .brouillon { filter: blur(7px); opacity: .5; pointer-events: none; user-select: none; }
.signal {
  position: fixed; left: var(--s3); bottom: var(--s3); z-index: 50; max-width: min(92vw, 466px); margin: 0;
  padding: var(--s2) var(--s3); background: var(--texte); color: var(--fond); font: 500 13px/1.4 var(--mono);
  transform: translateY(calc(100% + var(--s4))); transition: transform var(--t3) var(--ease);
}
.signal.visible { transform: none; }
.signal.erreur { background: var(--pigment); color: var(--papier); }
.depot { max-width: calc(2 * var(--s9) + var(--s8)); padding: var(--s5) var(--s4); border: 1px dashed var(--doux); text-align: center; transition: border-color var(--t2) var(--ease), background var(--t2) var(--ease); }
.depot.survol { border-color: var(--pigment); background: color-mix(in srgb, var(--pigment) 6%, var(--fond)); }
.depot p { margin: 0 0 var(--s2); }
.depot .choisir { color: var(--pigment); text-decoration: underline; cursor: pointer; }
.depot .choisir input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.envois, .attente ul { list-style: none; margin: var(--s4) 0 0; padding: 0; max-width: calc(2 * var(--s9) + var(--s8)); }
.envois li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s1) var(--s3); padding: var(--s2) 0; border-bottom: 1px solid var(--filet); font-size: 14px; }
.envois li span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.envois progress { grid-column: 1 / -1; width: 100%; height: 3px; appearance: none; border: 0; background: var(--filet); accent-color: var(--pigment); }
.envois progress::-webkit-progress-bar { background: var(--filet); }
.envois progress::-webkit-progress-value { background: var(--pigment); }
.envois progress::-moz-progress-bar { background: var(--pigment); }
.envois li.ok .cote { color: var(--pigment); }
.envois li.erreur .cote { color: var(--pigment); font-weight: 700; }
.attente { margin-top: var(--s5); }
.attente li { padding: var(--s1) 0; font-size: 14px; border-bottom: 1px solid var(--filet); }
.recu { margin-top: var(--s5); max-width: 100%; overflow-x: auto; }
.recu table { border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.recu th, .recu td { padding: var(--s1) var(--s4) var(--s1) 0; border-bottom: 1px solid var(--filet); text-align: left; }
.recu th { font: 500 11px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--doux); border-bottom-color: var(--texte); }
.recu .petit { font-size: 14px; color: var(--doux); max-width: 68ch; }

/* ----------------------------------------------------------- bibliothèque : lectures et guide */
.lectures { margin: 0 0 var(--s4); padding: var(--s3) var(--s4); border: 1px solid var(--texte); }
.lectures ol { margin: var(--s2) 0 0; padding-left: var(--s4); }
.lectures li { margin-bottom: var(--s2); font-size: 15px; }
.lectures li p { margin: 0; max-width: 68ch; }
.lectures li .cote { margin-left: var(--s2); }
.lectures .pourquoi, .guide .pourquoi { color: var(--doux); font-size: 14px; }
.guide { margin-top: var(--s6); }
.livre { margin-top: var(--s5); padding-top: var(--s4); border-top: 1px solid var(--texte); }
.livre h3 { margin: var(--s1) 0 0; font: 800 26px/1.15 var(--sans); font-stretch: 108%; max-width: 40ch; }
.livre .auteur { margin: var(--s1) 0 0; color: var(--doux); }
.livre .chapeau { max-width: 68ch; }
.chapitres { list-style: none; margin: var(--s4) 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--s9)), 1fr)); gap: var(--s3) var(--s4); }
.chapitres li { padding: var(--s2) 0; border-top: 1px solid var(--filet); }
.chapitres li p { margin: 0 0 var(--s1); }
.chapitres li .cote { display: block; margin-bottom: 2px; }
.chapitres .fiches { display: flex; flex-wrap: wrap; gap: 2px var(--s2); font-size: 13px; }
.chapitres .fiches a { text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--pigment) 50%, var(--fond)); }
.chapitres .fiches a:hover { color: var(--pigment); }

/* ----------------------------------------------------------- labos interactifs */
.sec-labo h2 .cote { color: var(--pigment); }
.labo { margin-top: var(--s3); border-top: 1px solid var(--texte); padding-top: var(--s3); }
.labo:not(.pret) { min-height: calc(6 * var(--s5)); }
.labo-commandes { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: var(--s3) var(--s4); }
.labo-curseur { display: grid; gap: 2px; align-content: start; cursor: pointer; }
.labo-curseur-tete { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s2); min-height: 32px; }
.labo-valeur { font: 600 15px/1.2 var(--sans); font-variant-numeric: tabular-nums; white-space: nowrap; }
.labo-curseur input { width: 100%; margin: 0; accent-color: var(--pigment); height: 28px; }
.labo-aide { font-size: 12px; color: var(--doux); }
.labo-choix { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1); margin: 0; padding: 0; border: 0; }
.labo-choix legend { float: left; width: 100%; margin-bottom: 2px; padding: 0; }
.labo-choix.large { grid-column: 1 / -1; }
.labo-choix button, .labo-scenarios button {
  padding: 5px var(--s2); border: 1px solid var(--filet); border-radius: 0; background: none;
  font: 500 12px/1.3 var(--mono); cursor: pointer; transition: border-color var(--t2) var(--ease), color var(--t2) var(--ease);
}
.labo-choix button[aria-pressed="true"] { border-color: var(--pigment); color: var(--pigment); }
.labo-choix button:hover, .labo-scenarios button:hover { border-color: var(--texte); }
.labo-scenarios { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1); }
.labo-scenarios .cote { margin-right: var(--s1); }
.labo-scene { display: grid; gap: var(--s3); margin-top: var(--s4); }
.labo-graphe { margin: 0; min-width: 0; }
.labo-graphe figcaption { margin-bottom: var(--s1); }
.labo-graphe svg { display: block; max-width: 100%; height: auto; overflow: visible; }
.labo-graphe .grille { stroke: var(--filet); stroke-width: 1; }
.labo-graphe .axe { stroke: var(--texte); stroke-width: 1; }
.labo-graphe .zero { stroke: var(--doux); stroke-width: 1; stroke-dasharray: 2 3; }
.labo-graphe .grad, .labo-graphe .legende-axe { font: 400 11px/1 var(--mono); fill: var(--doux); }
.labo-graphe .legende-axe { letter-spacing: .04em; }
.labo-graphe .courbe { fill: none; stroke: var(--pigment); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.labo-graphe .courbe.secondaire { stroke: var(--texte); stroke-width: 1.4; }
.labo-graphe .courbe.discrete { stroke: var(--doux); stroke-width: 1.2; }
.labo-graphe .courbe.pointille { stroke-dasharray: 5 4; }
.labo-graphe .courbe.fine { stroke-width: 1; opacity: .55; }
.labo-graphe .zone { fill: color-mix(in srgb, var(--pigment) 14%, transparent); stroke: none; }
.labo-graphe .zone.perte { fill: color-mix(in srgb, var(--texte) 12%, transparent); }
.labo-graphe .point { fill: var(--fond); stroke: var(--pigment); stroke-width: 2; }
.labo-graphe .point.plein { fill: var(--pigment); }
.labo-graphe .point.secondaire { stroke: var(--texte); }
.labo-graphe .point.nuage { fill: color-mix(in srgb, var(--pigment) 45%, var(--fond)); stroke: none; }
.labo-graphe .barre-labo.tierce { fill: color-mix(in srgb, var(--pigment) 40%, var(--fond)); }
.labo-graphe .repere { stroke: var(--texte); stroke-width: 1; stroke-dasharray: 3 3; }
.labo-graphe .repere.pigment { stroke: var(--pigment); }
.labo-graphe .etiquette { font: 500 11px/1 var(--mono); fill: var(--texte); paint-order: stroke; stroke: var(--fond); stroke-width: 3px; stroke-linejoin: round; }
.labo-graphe .etiquette.pigment { fill: var(--pigment); }
.labo-graphe .barre-labo { fill: var(--pigment); }
.labo-graphe .barre-labo.secondaire { fill: color-mix(in srgb, var(--texte) 55%, var(--fond)); }
.labo-graphe .barre-labo.negatif { fill: color-mix(in srgb, var(--texte) 30%, var(--fond)); }

/* ----------------------------------------------------------- entraînement : exercices tirés au hasard */
.sec-entrainement h2 .cote { color: var(--pigment); }
.entrainement { margin-top: var(--s3); border-top: 1px solid var(--texte); padding-top: var(--s3); }
.ent-outils { display: flex; flex-wrap: wrap; gap: var(--s3) var(--s4); align-items: end; margin-bottom: var(--s3); }
.ent-filtre { display: grid; gap: 4px; flex: 1 1 14rem; min-width: 0; max-width: 26rem; }
.ent-filtre select { font: 500 13px/1.3 var(--mono); padding: 5px var(--s2); border: 1px solid var(--filet); background: var(--fond); color: var(--texte); border-radius: 0; width: 100%; min-width: 0; }
.ent-carte { border: 1px solid var(--filet); padding: var(--s3) var(--s4); }
.ent-quoi { margin: 0; }
.ent-titre { margin: 4px 0 var(--s2); font: 700 18px/1.3 var(--sans); }
.ent-enonce { margin: 0 0 var(--s3); max-width: 68ch; }
.ent-options { list-style: none; margin: 0 0 var(--s3); padding: 0; display: grid; gap: var(--s1); max-width: 42ch; }
.ent-options button { display: flex; gap: var(--s2); align-items: baseline; width: 100%; text-align: left; padding: var(--s1) var(--s2); border: 1px solid var(--filet); background: none; font: 500 16px/1.4 var(--sans); font-variant-numeric: tabular-nums; color: var(--texte); cursor: pointer; border-radius: 0; }
.ent-options button:hover { border-color: var(--texte); }
.ent-options button.choisi { border-color: var(--pigment); box-shadow: inset 3px 0 0 var(--pigment); }
.ent-options button.juste { border-color: var(--texte); box-shadow: inset 3px 0 0 var(--texte); font-weight: 700; }
.ent-lettre { font: 500 12px/1.4 var(--mono); color: var(--doux); }
.ent-libre { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; margin: 0 0 var(--s3); }
.ent-options[hidden], .ent-libre[hidden], .ent-confiance[hidden] { display: none; }
.ent-libre input { font: 500 16px/1.3 var(--mono); padding: 6px var(--s2); border: 1px solid var(--texte); background: var(--fond); color: var(--texte); width: 12ch; border-radius: 0; }
.ent-libre button, .ent-suivant { padding: 6px var(--s3); border: 1px solid var(--texte); background: none; font: 500 13px/1.3 var(--mono); color: var(--texte); cursor: pointer; border-radius: 0; }
.ent-libre button:hover, .ent-suivant:hover { border-color: var(--pigment); color: var(--pigment); }
.ent-unite { font: 500 14px var(--mono); color: var(--doux); }
.ent-verdict { margin: 0 0 var(--s2); min-height: 1.4em; font-weight: 600; max-width: 68ch; }
.ent-verdict.juste { color: var(--pigment); }
/* Répondre (entrainement.js) : les choix, le verdict, puis Ascii, à la taille d'une réaction (178 px). Sa scène n'est
   montrée qu'une fois la réponse donnée (.repondu) : avant, il ne prend aucune place, et sa ligne vide reste une région
   vivante. Carte étroite (téléphone, fiche) : sous le verdict, qui garde toute la largeur, le corps aligné sur le bord
   du texte, sa ligne à côté de lui sur son sol, ou dessous quand la place manque. Carte large (52 rem, soit 68ch + 42 +
   178) : à droite des choix et du verdict, dans la place que la carte laisse libre, les pieds sur la ligne de base du
   verdict. Dans les deux cas, rien de ce qui est déjà là ne bouge quand il paraît. */
.ent-carte { container: ent-carte / inline-size; }
.ent-repondre { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "choix" "verdict" "ascii"; }
.ent-choix { grid-area: choix; min-width: 0; align-self: start; }
.ent-repondre > .ent-verdict { grid-area: verdict; }
.ent-repondre > .ascii { grid-area: ascii; }
.ent-repondre:not(.repondu) > .ascii > .ascii-scene { display: none; }
.ent-repondre > .ascii > .ascii-scene { margin-left: calc(var(--ascii-taille) * (42 - var(--ascii-cadre)) / (2 * var(--ascii-cadre))); }
.ent-repondre > .ascii .ascii-ligne { max-width: 30ch; }
@container ent-carte (min-width: 52rem) {
  .ent-repondre { grid-template-columns: minmax(0, 68ch) auto; grid-template-areas: "choix ascii" "verdict ascii"; column-gap: var(--s5); }
  .ent-repondre > :is(.ascii, .ent-verdict) { align-self: end; }
  .ent-repondre > .ascii { margin: 0 0 calc(var(--s2) + .48em - var(--ascii-sol)); }
  .ent-repondre > .ascii > .ascii-scene { margin-left: 0; }
  .ent-repondre > .ascii .ascii-ligne { max-width: 26ch; }
}
.ent-corrige .ent-chapitre { list-style: none; }
/* Fin d'une série d'exercices (exercices.js) : Ascii plat (26 px) devant « Série terminée », sur la ligne de la cote. */
.exo-fin { margin: var(--s5) 0 0; }
.exo-fin > .ascii { margin-right: var(--s2); }
.ent-passer { margin: 0 0 var(--s2); padding: 0; border: 0; background: none; font: 500 12px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--doux); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.ent-passer[hidden], .ent-corrige[hidden] { display: none; }
.ent-corrige summary { cursor: pointer; font: 500 12px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--doux); }
.ent-corrige ol { margin: var(--s2) 0 0; padding-left: var(--s4); display: grid; gap: var(--s1); font-size: 15px; max-width: 68ch; overflow-wrap: anywhere; }
.ent-corrige .ent-reponse { list-style: none; }
.ent-pied { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s3); align-items: center; justify-content: space-between; margin-top: var(--s3); }
.ent-lien { display: grid; gap: 4px; margin: 0 0 var(--s5); padding: var(--s3) var(--s4); border: 1px solid var(--texte); text-decoration: none; color: var(--texte); }
.ent-lien strong { font: 700 18px/1.3 var(--sans); }
.ent-lien:hover { border-color: var(--pigment); }
.ent-lien:hover strong { color: var(--pigment); }
.labo-lectures { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: var(--s3) var(--s4); margin: var(--s4) 0 0; }
.labo-lectures dt { margin: 0; }
.labo-lectures dd { margin: 2px 0 0; font: 600 18px/1.2 var(--sans); font-variant-numeric: tabular-nums; }
.labo-lectures dd.principal { font: 800 26px/1.1 var(--sans); font-stretch: 106%; color: var(--pigment); }
.labo-lectures dd.hausse { color: var(--pigment); }
.labo-lectures dd.baisse { color: var(--texte); }
.labo-lectures dd.alerte { color: var(--pigment); font-style: italic; }
.labo-pied .labo-note { margin: var(--s3) 0 0; font-size: 14px; color: var(--doux); max-width: 68ch; }
.labo-defis { margin-top: var(--s4); padding: var(--s3) 0 0; border-top: 1px solid var(--filet); }
.labo-defis h3 { margin: 0 0 var(--s2); }
/* Tous les défis réussis : Ascii plat (ascii.css, 26 px) endormi au bout du titre, sur sa ligne. */
.labo-defis h3 .ascii { margin-left: var(--s2); vertical-align: -9px; }
.labo-defis h3 .ascii[hidden] { display: none; }
.labo-defis ol { list-style: none; margin: 0; padding: 0; counter-reset: defi; display: grid; gap: var(--s2); }
.labo-defis li { counter-increment: defi; position: relative; padding-left: var(--s5); font-size: 15px; max-width: 68ch; }
.labo-defis li::before {
  content: counter(defi); position: absolute; left: 0; top: 1px; width: 22px; height: 22px; display: grid; place-items: center;
  border: 1px solid var(--texte); font: 500 11px/1 var(--mono); transition: background var(--t3) var(--ease), color var(--t3) var(--ease), border-color var(--t3) var(--ease);
}
.labo-defis li.reussi::before { content: "✓"; background: var(--pigment); border-color: var(--pigment); color: var(--fond); }
.labo-defis li.reussi .labo-defi-texte { color: var(--doux); }
.labo-defis li.vient::before { animation: defi-vient var(--t4) var(--ease); }
@keyframes defi-vient { 0% { transform: scale(.6); } 60% { transform: scale(1.25); } 100% { transform: scale(1); } }
.labo-indice { display: inline; margin-left: var(--s2); }
.labo-indice summary { display: inline; cursor: pointer; font: 500 11px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--pigment); list-style: none; }
.labo-indice summary::-webkit-details-marker { display: none; }
.labo-indice p { margin: var(--s1) 0 0; font-size: 14px; color: var(--doux); }
.labo-tableau { margin: 0; min-width: 0; }
.labo-tableau figcaption { margin-bottom: var(--s1); }
.labo-tableau table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; font: 400 13px/1.3 var(--mono); font-variant-numeric: tabular-nums; }
.labo-tableau th, .labo-tableau td { padding: 5px var(--s2); border-bottom: 1px solid var(--filet); text-align: right; white-space: nowrap; }
.labo-tableau thead th { font-weight: 500; font-size: 11px; color: var(--doux); border-bottom-color: var(--texte); }
.labo-tableau tbody th { font-weight: 500; font-size: 11px; color: var(--doux); text-align: left; }
.labo-tableau td.actif { background: var(--pigment); color: var(--fond); font-weight: 500; }
.liste-labos { list-style: none; margin: var(--s5) 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--s9)), 1fr)); gap: var(--s4); }
.liste-labos li { padding-top: var(--s2); border-top: 1px solid var(--texte); }
.liste-labos a { text-decoration: none; }
.liste-labos h3 { margin: var(--s1) 0; font: 700 20px/1.2 var(--sans); }
.liste-labos p { margin: 0; font-size: 14px; color: var(--doux); }
.liste-labos p.cote { margin-top: var(--s1); font-size: 11px; }
.liste-labos .progres { margin-top: var(--s1); font: 500 11px/1.4 var(--mono); color: var(--pigment); }

/* ----------------------------------------------------------- barre : liens par priorité, menu « Plus »
   p1 toujours visibles ; p2 dès 520 px ; p3 seulement quand toute la barre tient (seuil mesuré par
   tests/mise_en_page.py) ; p4 jamais dans la barre, toujours dans « Plus ». Les cotes de droite ne s'affichent
   que sur les très grands écrans. */
.barre nav a, .barre nav .sortir { flex: none; white-space: nowrap; }
@media (max-width: 1700px) { .cotes { display: none; } }
@media (max-width: 1240px) {
  .barre nav { gap: var(--s3); min-width: 0; flex: 1; justify-content: flex-end; align-items: center; }
  .barre nav .p3 { display: none; }
}
@media (max-width: 519px) { .barre nav .p2 { display: none; } }
/* Connexion, Sortir, Rappels (app iPhone) : dans « Plus » tant que la barre ne les tient pas. */
@media (max-width: 1300px) { .barre nav .sortir { display: none; } }
@media (max-width: 374px) { .barre nav a.p1[href="/marche/"] { display: none; } }

/* ----------------------------------------------------------- recherche */
.chercher-tout { margin: var(--s5) 0 var(--s2); max-width: calc(2 * var(--s9) + var(--s8)); }
.chercher-tout input {
  width: 100%; padding: var(--s3); border: 1px solid var(--texte); border-radius: 0; background: transparent; color: inherit;
  font: 500 20px/1.2 var(--sans); -webkit-appearance: none; appearance: none;
}
.chercher-tout input:focus { outline: 2px solid var(--pigment); outline-offset: 2px; }
.resultats { list-style: none; margin: var(--s3) 0 0; padding: 0; max-width: calc(2 * var(--s9) + var(--s8)); }
.resultats li { padding: var(--s3) 0; border-top: 1px solid var(--filet); }
.resultats a { text-decoration: none; display: block; }
.resultats a:hover strong { color: var(--pigment); }
.resultats strong { display: block; margin-top: 2px; font: 700 19px/1.25 var(--sans); }
.resultats .en { display: block; margin-top: 2px; font: 400 12px/1.4 var(--mono); color: var(--doux); }
.resultats p { margin: var(--s1) 0 0; font-size: 14px; color: var(--doux); max-width: 72ch; }
.resultats mark { background: color-mix(in srgb, var(--pigment) 22%, transparent); color: inherit; padding: 0 1px; }
/* Rien ne répond (recherche.js) : Ascii cherche, n'a aucune idée, puis attend, debout sur le filet où commencerait le
   premier résultat. Il ne dit rien : la ligne d'état, au-dessus, le dit déjà. */
.recherche-vide { max-width: calc(2 * var(--s9) + var(--s8)); margin-top: var(--s3); border-bottom: 1px solid var(--filet); }
.recherche-vide > .ascii { margin-bottom: calc(-1 * var(--ascii-sol)); }

/* ----------------------------------------------------------- colle ciblée, exercices faits, outils des labos */
.colle-bandeau { margin: 0 0 var(--s3); padding: var(--s2) var(--s3); border-left: 3px solid var(--pigment); font-size: 15px; }
.labo-outils { display: flex; flex-wrap: wrap; gap: var(--s1); margin-top: var(--s3); }
.labo-outils button { padding: 5px var(--s2); border: 1px solid var(--filet); border-radius: 0; background: none; font: 500 12px/1.3 var(--mono); cursor: pointer; }
.labo-outils button:hover { border-color: var(--texte); }
.rail .progres-labo { font: 500 11px/1 var(--mono); color: var(--pigment); }
.exo-suivi { display: flex; gap: var(--s1); margin: var(--s2) 0 var(--s4); }
.exo-suivi button { padding: 4px var(--s2); border: 1px solid var(--filet); border-radius: 0; background: none; font: 500 12px/1.3 var(--mono); cursor: pointer; }
.exo-suivi button:hover { border-color: var(--texte); }
.exo-suivi button[data-etat="fait"][aria-pressed="true"] { background: var(--pigment); border-color: var(--pigment); color: var(--fond); }
.exo-suivi button[data-etat="revoir"][aria-pressed="true"] { border-color: var(--pigment); color: var(--pigment); }
.exercices h3.exo-fait::after { content: " ✓"; color: var(--pigment); }
.exercices h3.exo-revoir::after { content: " · à revoir"; font: 500 11px/1 var(--mono); color: var(--pigment); }
.progres-exercices { margin: var(--s1) 0 0; font: 500 11px/1.4 var(--mono); color: var(--pigment); }

/* ----------------------------------------------------------- accueil : à la une */
.une-bloc { padding-top: var(--s4); padding-bottom: 0; }
.une { display: grid; gap: 4px; padding: var(--s3) var(--s4); border: 1px solid var(--pigment); box-shadow: inset 4px 0 0 var(--pigment); text-decoration: none; color: var(--texte); }
.une + .une { margin-top: var(--s2); }
.une .cote { color: var(--pigment); }
.une strong { font: 700 20px/1.25 var(--sans); }
.une span:last-child { max-width: 80ch; color: var(--doux); font-size: 15px; }
.une:hover strong { color: var(--pigment); }

/* ----------------------------------------------------------- page Marché */
.marche-maj { margin: var(--s3) 0 var(--s4); }
.marche-maj.alerte { color: var(--pigment); }
/* Ascii (marche.js) : son logo tourne devant « Chargement… » pendant la première lecture ; quand le relevé n'a aucune
   série, il dort (110 px), le corps sur le bord du texte, la ligne d'état posée sur son sol (une panne : rien). */
.marche-maj .ascii--plat { margin: calc(-1 * var(--s1)) var(--s2) calc(-1 * var(--s1)) 0; }
.marche-sans { display: flex; align-items: flex-end; gap: 0 var(--s3); margin: var(--s3) 0 var(--s4); }
.marche-sans .ascii { flex: none; margin-left: calc(var(--ascii-taille) * (42 - var(--ascii-cadre)) / (2 * var(--ascii-cadre))); }
.marche-sans .marche-maj { flex: 0 1 auto; margin: 0 0 calc(var(--s7) * .08); }   /* le sol d'un hôte de 110 px (cadre 50) */
.tuiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr)); gap: 1px; background: var(--filet); border: 1px solid var(--filet); margin-bottom: var(--s5); }
.tuile { display: grid; gap: 4px; padding: var(--s3); background: var(--fond); min-width: 0; }
.tuile strong { font: 700 24px/1.15 var(--sans); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tuile-pied { font: 500 11px/1.4 var(--mono); color: var(--doux); }
.tuile.ancienne strong, tr.ancienne td { color: var(--doux); }
.marche-bloc h2 .cote { color: var(--pigment); }
.marche-chapeau { color: var(--doux); font-size: 14px; }
.marche .marche-table { display: block; max-width: 100%; overflow-x: auto; }
.marche-table th, .marche-table td { white-space: nowrap; }
.marche-table tbody th { font: 500 15px/1.35 var(--sans); text-transform: none; letter-spacing: 0; color: var(--texte); border-bottom-color: var(--filet); }
.marche-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.marche-table td.unite, .marche-table td.quand, .marche-table td.lecture { color: var(--doux); font-size: 13px; }
.marche-table td.quand a { border-bottom: 0; color: var(--doux); }
.marche-table td.var.hausse { color: var(--texte); }
.marche-table td.var.baisse { color: var(--pigment); }
.marche-table tr.derive th { font-style: italic; }
.marche-courbes { margin: 0; }
.marche-courbes svg { display: block; max-width: 100%; height: auto; }
.marche-courbes .grille { stroke: var(--filet); stroke-width: 1; }
.marche-courbes .grad { font: 500 11px var(--mono); fill: var(--doux); }
.marche-courbes .courbe { fill: none; stroke-width: 2; }
.marche-courbes .courbe.trace { stroke-dasharray: 1; animation: tracer var(--t4) var(--ease) both; }   /* premier affichage */
.marche-courbes .point { stroke: none; }
.c-fr { stroke: var(--pigment); fill: var(--pigment); background: var(--pigment); }
.c-de { stroke: var(--texte); fill: var(--texte); background: var(--texte); }
.c-it { stroke: color-mix(in srgb, var(--pigment) 45%, var(--fond)); fill: color-mix(in srgb, var(--pigment) 45%, var(--fond)); background: color-mix(in srgb, var(--pigment) 45%, var(--fond)); }
.c-us { stroke: var(--doux); fill: var(--doux); background: var(--doux); }
.c-aaa { stroke: var(--texte); fill: var(--texte); background: var(--texte); stroke-dasharray: 4 3; }
.marche-courbes .courbe.c-aaa { stroke-width: 1.4; }
.legende-courbes { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s4); margin-top: var(--s2); font: 500 12px/1.4 var(--mono); color: var(--doux); }
.legende-courbes i { display: inline-block; width: 18px; height: 3px; margin-right: 6px; vertical-align: middle; }
.marche-contexte h2 { margin-top: var(--s5); }
@media (max-width: 760px) { .tuile strong { font-size: 20px; } .tuiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.legende-courbes i.c-aaa { background: none; height: 0; border-top: 2px dashed var(--texte); }

/* ===========================================================
   Corrections de mise en page (audit visuel du 14/10/2026)
   =========================================================== */

/* titres : pas de césure automatique, lignes équilibrées */
.bloc h2 { hyphens: manual; text-wrap: balance; }
.sec h2 { flex-wrap: wrap; row-gap: 2px; }
.sec h2 .cote { flex: none; white-space: nowrap; }
.sec > h2:first-child, .prose > h2:first-child { margin-top: 0; }
.sec th, .sec td { vertical-align: top; }
.sec td.num, .sec th.num, .prose td.num, .prose th.num { text-align: right; font-variant-numeric: tabular-nums; }
.sec blockquote { max-width: 68ch; }
.prose p, .sec p, .prose li, .sec li { line-height: 1.65; }
body .katex { font-size: 1.05em; }
body .katex-display > .katex { font-size: 1.15em; }
@media (max-width: 600px) { body .katex-display > .katex { font-size: 1.05em; } }

/* ce qui défile horizontalement le montre : ombres aux bords tant qu'il reste du contenu */
.sec table, .prose table, .sec .katex-display, .prose .katex-display, .marche-defile {
  background:
    linear-gradient(to right, var(--fond) 30%, transparent) left center / 28px 100% no-repeat local,
    linear-gradient(to left, var(--fond) 30%, transparent) right center / 28px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, color-mix(in srgb, var(--texte) 28%, transparent), transparent) left center / 12px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, color-mix(in srgb, var(--texte) 28%, transparent), transparent) right center / 12px 100% no-repeat scroll;
}

/* barre : le menu « Plus » ouvre un panneau sous la barre, la barre elle-même ne bouge pas */
.panneau-plus {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 25;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: 0 var(--s4);
  max-height: calc(100svh - var(--s6)); overflow-y: auto;
  padding: var(--s2) var(--s5) var(--s3);
  background: var(--fond); border-bottom: 1px solid var(--texte);
  box-shadow: 0 18px 30px -14px color-mix(in srgb, var(--texte) 40%, transparent);
}
.panneau-plus a, .panneau-plus button {
  display: block; padding: var(--s2) 0; border: 0; border-bottom: 1px solid var(--filet); border-radius: 0; background: none;
  font: 500 16px/1.25 var(--sans); color: var(--texte); text-align: left; text-decoration: none; cursor: pointer;
}
.panneau-plus a:hover, .panneau-plus button:hover, .panneau-plus a[aria-current] { color: var(--pigment); }
@media (max-width: 760px) { .panneau-plus { grid-template-columns: 1fr 1fr; padding: var(--s1) var(--s3) var(--s3); } }

/* accueil : outils, colle du jour, légende, domaines */
.duo { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
.puces { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); }
@media (max-width: 1100px) {
  .outils { flex-wrap: wrap; }
  .puces { order: 3; flex: 1 1 100%; }
  .duo { grid-template-columns: minmax(0, 1fr); gap: var(--s6); }
  .legende .sens { display: none; }
  .legende ul { flex-wrap: wrap; overflow: visible; row-gap: var(--s3); }
  .domaines li { grid-template-columns: var(--s4) minmax(0, 1fr) repeat(3, var(--s7)); }
}
@media (max-width: 760px) {
  .domaines li { grid-template-columns: var(--s4) minmax(0, 1fr) var(--s7); }
  .domaines .chiffre { display: none; }
  .domaines .cases + .chiffre { display: block; }
}

/* fiches : voisinage en liste dès qu'il serait trop réduit, rail qui suit la lecture */
.voisinage .vide { font: 400 13px/1 var(--sans); fill: var(--doux); font-style: italic; }
@media (max-width: 1100px) {
  .voisinage { display: none; }
  .voisinage-liste { display: grid; gap: var(--s4); }
  .voisinage-liste ul { list-style: none; margin: var(--s1) 0 0; padding: 0; }
  .rail { border-top: 0; }
  .prose { max-width: none; }
}
@media (min-width: 1101px) {
  .colonnes > .rail { align-self: start; }
  .colonnes > .rail.suit { position: sticky; top: calc(var(--s6) + var(--s3)); }
}
.en { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s2); }
.proches { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s3); align-items: baseline; }
.proches .liens { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s3); }
.liste-notions small { flex: none; white-space: nowrap; padding-left: var(--s2); }
@media (max-width: 760px) { .brouillon { flex-direction: column; gap: var(--s1); } }
.liste-labos a .cote { display: block; line-height: 1.4; }
.prose.exercices > p:first-of-type { font-size: inherit; }

/* listes en grille : des cartes ouvertes, filet en tête, comme les labos ; une dernière rangée
   incomplète reste naturelle (ni case vide encadrée, ni carte étirée) */
.articles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--s9)), 1fr)); gap: var(--s5) var(--s4); padding: 0; border: 0; }
.articles li { margin: 0; border: 0; border-top: 1px solid var(--texte); box-shadow: none; }
.articles a { padding: var(--s3) 0 0; }
.articles a:hover { background: none; }

/* colle et entraînement : mêmes contrôles */
.colle-outils select, .ent-filtre select { height: 34px; padding: 0 var(--s2); border: 1px solid var(--filet); border-radius: 0; background: var(--fond); color: var(--texte); font: 500 14px/1 var(--sans); }
.colle-outils .niveaux button { height: 34px; }

/* parcours */
.sem-exos li { display: block; }
.sem-exos li > a:first-child { margin-right: var(--s2); }
.sem-exos span { display: inline-flex; flex-wrap: wrap; gap: 4px; vertical-align: baseline; }
@media (max-width: 760px) {
  .sem-tete { grid-template-columns: var(--s6) minmax(0, 1fr); }
  .sem-num { font-size: 32px; }
}

/* veille : badge, date, titre alignés ; titres des propositions à leur rang */
.veille-bloc details > summary:has(> .badge) { display: grid; grid-template-columns: 5.5rem 12.5rem minmax(0, 1fr); gap: var(--s2) var(--s3); align-items: baseline; }
.veille-bloc details > summary:has(> .badge) .cote { white-space: nowrap; }
.prop .prose h2 { margin: var(--s4) 0 var(--s2); font: 700 18px/1.3 var(--sans); font-stretch: 100%; }
.prop .prose h3 { margin: var(--s3) 0 var(--s1); font: 700 16px/1.3 var(--sans); }
@media (max-width: 760px) {
  .veille-bloc details > summary:has(> .badge) { grid-template-columns: 5.5rem minmax(0, 1fr); }
  .veille-bloc details > summary:has(> .badge) strong { grid-column: 1 / -1; }
}

/* page Marché : tableaux lisibles sur téléphone, calendrier empilé */
.marche-defile { max-width: 100%; overflow-x: auto; }
.marche .marche-table { display: table; width: 100%; max-width: 100%; overflow: visible; }
.marche-table tbody th { white-space: normal; min-width: 8.5em; }
.marche-table tbody th small { display: none; }
.marche-contexte td:first-child { white-space: nowrap; }
@media (max-width: 760px) {
  .marche-table .col-releve, .marche-table td.quand, .marche-table .col-lecture, .marche-table td.lecture { display: none; }
  .marche-table tbody th small { display: block; margin-top: 2px; font: 400 11px/1.35 var(--mono); color: var(--doux); white-space: normal; }
  .marche-contexte table, .marche-contexte thead, .marche-contexte tbody, .marche-contexte tr, .marche-contexte td { display: block; background: none; }
  .marche-contexte thead { display: none; }
  .marche-contexte tr { padding: var(--s2) 0; border-bottom: 1px solid var(--filet); }
  .marche-contexte td { border: 0; padding: 2px 0; white-space: normal; }
  .marche-contexte td:first-child { font: 500 12px/1.4 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--pigment); }
  .marche-contexte td:nth-child(2) { font-weight: 600; }
  .marche-contexte td:nth-child(3) { color: var(--doux); font-size: 14px; }
  /* Un tableau de chiffres (cellules .num) garde ses colonnes et leurs dates : seul le calendrier s'empile. */
  .marche-contexte table:has(.num) { display: block; overflow-x: auto; }
  .marche-contexte table:has(.num) thead { display: table-header-group; }
  .marche-contexte table:has(.num) tbody { display: table-row-group; }
  .marche-contexte table:has(.num) tr { display: table-row; padding: 0; border-bottom: 0; }
  .marche-contexte table:has(.num) :is(th, td) { display: table-cell; padding: var(--s1) var(--s2); border-bottom: 1px solid var(--filet); }
  .marche-contexte table:has(.num) :is(th, td):first-child { padding-left: 0; font: inherit; letter-spacing: normal; text-transform: none; color: inherit; white-space: normal; }
  .marche-contexte table:has(.num) td:nth-child(n) { font-weight: inherit; color: inherit; font-size: inherit; }
}
@media (max-width: 600px) { .marche-table .col-5, .marche-table .col-30 { display: none; } }
@media (max-width: 440px) { .marche-table .col-2 { display: none; } }

/* deuxième passe (contre-vérification du 14/10/2026) */
/* tableaux : ligne de total */
.sec tr.total td, .prose tr.total td { font-weight: 700; border-top: 1px solid var(--texte); }
/* accueil : nom de la notion sur sa ligne, domaine dessous ; compteur des domaines à sa largeur */
.pretes a { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: var(--s2); align-items: baseline; }
.pretes small { grid-column: 2; margin: 2px 0 0; text-align: left; }
@media (max-width: 760px) { .domaines li { grid-template-columns: var(--s4) minmax(0, 1fr) auto; } }
/* accueil : la colle du jour accompagne la longue liste des notions prêtes */
@media (min-width: 1101px) { .duo > #colle { position: sticky; top: calc(var(--s6) + var(--s3)); align-self: start; } }
/* fiches : le brouillon va au même bord que l'en-tête et les intertitres */
.cours > .brouillon { max-width: none; }
/* parcours : notions sur une colonne, labos, exercices et lectures ont la place */
@media (min-width: 1101px) {
  .sem-corps { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
  .sem-corps .liste-notions { columns: 1; }
}
/* labos : les titres d'une même rangée alignés, même si un surtitre passe sur deux lignes */
/* le lien reste une vraie boîte (atteignable au clavier) : il porte lui-même les deux premières rangées */
@supports (grid-template-rows: subgrid) {
  .liste-labos li { display: grid; grid-row: span 5; grid-template-rows: subgrid; row-gap: 0; align-content: start; }
  .liste-labos li > a { display: grid; grid-row: span 2; grid-template-rows: subgrid; row-gap: 0; }
  .liste-labos li > a > *, .liste-labos li > :not(a) { align-self: start; }
}
/* menu « Plus » : la page s'efface sous le panneau */
html.plus-ouvert main, html.plus-ouvert footer { opacity: .18; transition: opacity var(--t2) var(--ease); }
/* entraînement : les bascules à la hauteur des listes, la légende à la même distance que les libellés */
.ent-outils .labo-choix button { height: 34px; }
.ent-outils .labo-choix { row-gap: 2px; }
/* Marché : sur téléphone, les en-têtes reviennent à la ligne et les pays prennent moins de place */
@media (max-width: 440px) {
  .marche-table thead th { white-space: normal; vertical-align: bottom; }
  .marche-table tbody th { min-width: 6em; }
}
/* titres des cartes : lignes équilibrées, pas de mot seul sur la dernière ligne */
.articles h3, .liste-labos h3, .pretes span { text-wrap: balance; }
/* édition invitée : une ligne discrète en tête de l'accueil */
.invite-note { margin: 0; padding-top: var(--s3); padding-bottom: var(--s3); border-bottom: 1px solid var(--filet); }

/* progression : statuts choisis dans la page (commun.js), sans serveur */
.statuts[role="radiogroup"] li { cursor: pointer; }
.statuts[role="radiogroup"] li:focus-visible { outline: 2px solid var(--texte); outline-offset: 4px; }
.statuts.compact { gap: var(--s2); margin: var(--s2) 0 0; }
.statuts.compact li span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.liste-notions li.avec-statut { display: flex; align-items: center; gap: var(--s2); }
.liste-notions li.avec-statut > a { flex: 1 1 auto; min-width: 0; }
button.cycle { display: inline-grid; place-items: center; flex: none; width: var(--s4); height: var(--s4); margin: 0; padding: 0; border: 0; background: none; cursor: pointer; }
button.cycle:hover .pastille { outline: 1px solid var(--texte); outline-offset: 2px; }
button.cycle:focus-visible { outline: 2px solid var(--texte); outline-offset: 1px; }
.marquer-vu, .fin-lecture button { margin: var(--s2) 0 0; padding: 0; border: 0; background: none; font: 500 11px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--doux); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.marquer-vu:hover, .fin-lecture button:hover { color: var(--texte); }
.fin-lecture { margin: var(--s5) 0 0; }
.fin-lecture button { font-size: 12px; color: var(--texte); }
.fin-lecture button[hidden] { display: none; }
.panneau .statuts { margin: var(--s2) 0 var(--s3); gap: var(--s2) var(--s4); }

/* Aujourd'hui : une colonne de blocs, un seul accent (l'action suivante) */
.aujourdhui { max-width: calc(16 * var(--s5)); }
.auj-date { margin: 0 0 var(--s4); }
.auj-bloc { padding: var(--s4) 0; border-top: 1px solid var(--filet); }
.auj-bloc:first-of-type { border-top: 1px solid var(--texte); }
.auj-bloc > .cote:first-child { margin: 0 0 var(--s2); }
.auj-chiffre { margin: 0; font: 400 26px/1.2 var(--sans); }
.auj-chiffre strong { font: 800 42px/1 var(--sans); font-stretch: 112%; margin-right: var(--s1); }
.auj-detail { margin: var(--s1) 0 0; color: var(--doux); max-width: 68ch; }
.auj-action { display: inline-block; margin-top: var(--s3); font-weight: 700; text-decoration: none; border-bottom: 2px solid currentColor; }
.auj-action.pig { color: var(--pigment); }
.auj-notion { margin: 0; font: 800 26px/1.2 var(--sans); font-stretch: 112%; }
.auj-notion a { text-decoration: none; }
.auj-notion a:hover { color: var(--pigment); }
.auj-statut .statuts { margin-top: var(--s3); }
.auj-semaine-titre { margin: var(--s4) 0 0; }
.auj-semaine { columns: 2; column-gap: var(--s4); }
.auj-semaine li { break-inside: avoid; }
.auj-pratique { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.auj-pratique li { display: grid; grid-template-columns: var(--s7) minmax(0, 1fr); align-items: baseline; gap: var(--s2); }
.auj-marche { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s3); margin: 0 0 var(--s2); }
.auj-marche div { margin: 0; }
.auj-marche dd { margin: 2px 0 0; font: 700 18px/1.3 var(--sans); font-variant-numeric: tabular-nums; }
.auj-fin { padding: var(--s2) var(--s3); border: 1px solid var(--texte); background: none; font: 600 16px/1 var(--sans); color: var(--texte); cursor: pointer; border-radius: 0; }
.auj-fin:hover { background: var(--texte); color: var(--fond); }
.auj-resume { padding-top: var(--s3); padding-bottom: var(--s3); border-bottom: 1px solid var(--filet); margin: 0; }
.auj-resume a { text-decoration: none; display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s1) var(--s2); font-weight: 600; }
.auj-resume a:hover { color: var(--pigment); }
/* La notion suivante, sur la carte (aujourdhui.js) : Ascii, plat, la marque d'un astérisque dans la ligne. À l'arrivée,
   il ouvre les yeux et les tourne vers elle (montre-d, montre-g : en plat, le regard seul), puis redevient le logo.
   Ses marges négatives gardent la hauteur de la ligne. */
.auj-resume .ascii { margin: -5px var(--s1); }
.auj-resume .ascii-yeux { transition: transform var(--t3) var(--ease); }
.auj-resume [data-joue="montre-d"] .ascii-yeux { transform: translateX(3px); }
.auj-resume [data-joue="montre-g"] .ascii-yeux { transform: translateX(-3px); }
/* Ascii (ascii.css, aujourdhui.js, tableau.js). Sous la date du brief (ou du tableau), debout sur le filet qui ouvre
   la page : ses pieds sur le bord haut du premier bloc, le bas de sa scène (--ascii-sol) descend dans la marge ; sa
   ligne reste à côté de lui, sur le même sol, quitte à passer sur trois lignes à 320 px. Le palier du tableau (178 px)
   ne lui laisserait pas 100 px sous 360 px : elle passe dessous, posée sur le filet. Dans « Journée faite », il dort à
   gauche du texte, les pieds sur le bas de sa dernière ligne ; après le bravo d'une journée réussie (178 px), sous
   360 px, le texte passe dessous. */
.aujourdhui > .ascii, .tableau > .ascii { flex-wrap: nowrap; margin-bottom: calc(-1 * var(--ascii-sol)); }
@media (max-width: 359px) { .tableau > .ascii { flex-wrap: wrap; } }
.auj-repos { display: flex; align-items: flex-end; gap: var(--s3); margin-bottom: var(--s3); }
.auj-repos > .ascii { flex: 0 1 auto; margin-bottom: calc(-1 * var(--ascii-sol)); }
@media (max-width: 359.98px) { .auj-repos:has(> .ascii--reaction) { flex-wrap: wrap; } }
.colle-boites li.attente b, .colle-boites li.attente span { color: var(--doux); }
@media (max-width: 760px) {
  .auj-semaine { columns: 1; }
  .auj-marche { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* colle FSRS : quatre notes, chacune avec le délai qu'elle donnerait ; « Bien » est la réponse attendue */
.colle-actions .note { display: inline-flex; align-items: baseline; gap: var(--s1); }
.colle-actions .note small { font: 500 11px/1 var(--mono); color: var(--doux); }
.colle-actions .note:hover { border-color: var(--pigment); color: var(--pigment); }
.colle-actions .note[data-note="3"] { background: var(--texte); color: var(--fond); }
.colle-actions .note[data-note="3"] small { color: inherit; opacity: .7; }
.colle-actions .note[data-note="3"]:hover { background: var(--pigment); border-color: var(--pigment); color: var(--papier); }
.colle-actions .note[hidden] { display: none; }
@media (max-width: 519px) { .colle-actions .note { flex: 1 1 calc(50% - var(--s2)); justify-content: center; padding: 0 var(--s2); } }

/* ----------------------------------------------------------- tableau de bord (/tableau/)
   Mesuré en pigment plein, déclaré en repère fin ; l'épaisseur du trait d'une matière est son poids à l'examen. */
.tableau { max-width: calc(16 * var(--s5)); }
.tab-tete { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s4) var(--s3); margin: 0; }
.tab-tete div { margin: 0; }
.tab-tete dd { margin: 0; }
.tab-tete strong { display: block; margin-top: var(--s1); font: 800 42px/1 var(--sans); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tab-tete div:first-child strong { color: var(--pigment); }
.tab-aide { margin-top: var(--s1) !important; font-size: 14px; color: var(--doux); }
.tab-themes { list-style: none; margin: 0; padding: 0; }
.tab-themes li {
  display: grid; grid-template-columns: minmax(0, 1fr) var(--s7) var(--s8);
  align-items: baseline; gap: var(--s1) var(--s3); padding: var(--s3) 0 var(--s2); border-bottom: 1px solid var(--filet);
}
.tab-themes .tab-piste { grid-row: 2; grid-column: 1 / -1; margin: var(--s1) 0; }
.tab-themes .tab-chiffres { grid-row: 1; grid-column: 3; text-align: right; }
.tab-theme { font-weight: 700; }
.tab-theme small, .tab-chiffres small { display: block; margin-top: 2px; font: 400 11px/1.3 var(--mono); color: var(--doux); }
.tab-poids { font: 500 14px/1 var(--mono); font-variant-numeric: tabular-nums; color: var(--doux); }
.tab-piste { position: relative; display: block; height: var(--w); background: var(--filet); }
.tab-mesure { position: absolute; inset: 0 auto 0 0; width: var(--p); background: var(--pigment); }
.tab-declare { position: absolute; top: -4px; bottom: -4px; left: var(--p); width: 2px; margin-left: -1px; background: var(--texte); }
.tab-chiffres b { font: 700 16px/1 var(--sans); font-variant-numeric: tabular-nums; }
.tab-legende { margin: var(--s2) 0 0; font: 400 11px/1.4 var(--mono); color: var(--doux); }
.tab-legende i { display: inline-block; vertical-align: middle; margin: 0 4px 0 var(--s1); }
.tab-legende i:first-child { margin-left: 0; }
.tab-mesure-l { width: var(--s3); height: var(--s2); background: var(--pigment); }
.tab-declare-l { width: 2px; height: var(--s3); background: var(--texte); }
.tab-activite { display: grid; grid-template-rows: repeat(7, var(--s2)); grid-auto-flow: column; grid-auto-columns: var(--s2); gap: 3px; margin-top: var(--s3); }
.tab-activite i { display: block; background: var(--filet); }
.tab-activite .a1 { background: color-mix(in srgb, var(--pigment) 35%, var(--fond)); }
.tab-activite .a2 { background: color-mix(in srgb, var(--pigment) 65%, var(--fond)); }
.tab-activite .a3 { background: var(--pigment); }
.tab-activite .afutur { background: none; outline: 1px solid var(--filet); outline-offset: -1px; }
.tab-prevision { list-style: none; margin: var(--s3) 0 0; padding: 0; display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 3px; align-items: end; height: calc(var(--s7) + var(--s5)); }
.tab-prevision li { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-end; height: 100%; text-align: center; }
.tab-prevision b { font: 500 11px/1 var(--mono); font-variant-numeric: tabular-nums; margin-bottom: 4px; }
.tab-prevision i { display: block; height: max(1px, var(--h)); background: var(--pigment); }
.tab-prevision li:first-child i { background: var(--texte); }
.tab-prevision small { margin-top: 4px; font: 400 11px/1 var(--mono); color: var(--doux); }
.tab-sous { margin: var(--s3) 0 var(--s2); font: 700 16px/1.3 var(--sans); }
.tab-methode p { max-width: 68ch; color: var(--doux); }
@media (max-width: 754px) {
  .tab-tete { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tab-themes li { grid-template-columns: minmax(0, 1fr) auto; }
  .tab-themes .tab-chiffres { grid-row: 3; grid-column: 1 / -1; text-align: left; }
}

/* ----------------------------------------------------------- entraînement : chrono, confiance, signalement */
.ent-carte { position: relative; }
.ent-chrono { position: absolute; top: var(--s3); right: var(--s4); font-variant-numeric: tabular-nums; }
.ent-chrono.depasse { color: var(--pigment); }
.ent-confiance { margin: 0 0 var(--s2); }
.ent-confiance legend { font-size: 11px; }
.ent-confiance button[disabled] { opacity: .55; cursor: default; }
.ent-signaler { padding: 0; border: 0; background: none; font: 500 11px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--doux); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.ent-signaler[aria-disabled="true"], .ex-signaler[aria-disabled="true"] { text-decoration: none; cursor: default; }
.ent-vers-examen { margin: var(--s3) 0 0; }
.ent-vers-examen a { font-weight: 700; text-decoration: none; border-bottom: 2px solid currentColor; }
.ent-vers-examen a:hover { color: var(--pigment); }

/* ----------------------------------------------------------- examen (/examen/) */
.examen { max-width: calc(16 * var(--s5)); }
.ex-formats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); border-top: 1px solid var(--texte); padding-top: var(--s3); }
.ex-formats h3 { margin: var(--s1) 0; font: 800 26px/1.15 var(--sans); font-stretch: 112%; }
.ex-formats p { margin: 0 0 var(--s2); }
.ex-format.bloque h3, .ex-format.bloque > p:not(.auj-detail) { color: var(--doux); }
.ex-commencer, .ex-reprendre, .ex-abandon, .ex-barre button, .ex-nav button { padding: var(--s1) var(--s3); border: 1px solid var(--texte); background: none; font: 600 14px/1.2 var(--sans); color: var(--texte); cursor: pointer; border-radius: 0; }
.ex-commencer { margin-top: var(--s2); }
.ex-commencer:hover, .ex-barre button:hover, .ex-nav button:hover:not([disabled]) { background: var(--texte); color: var(--fond); }
.ex-nav button[disabled] { opacity: .4; cursor: default; }
.ex-reprise { padding: var(--s2) var(--s3); border: 1px solid var(--pigment); margin: 0 0 var(--s4); }
.ex-passes { list-style: none; margin: var(--s2) 0 0; padding: 0; }
.ex-passes li { display: grid; grid-template-columns: var(--s7) minmax(0, 1fr) var(--s7) auto; gap: var(--s2); align-items: baseline; padding: var(--s1) 0; border-bottom: 1px solid var(--filet); font-variant-numeric: tabular-nums; }
.ex-barre { position: sticky; top: var(--s6); z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); padding: var(--s2) 0; background: var(--fond); border-bottom: 1px solid var(--texte); }
.ex-horloge { font: 700 26px/1 var(--mono); font-variant-numeric: tabular-nums; }
.ex-horloge.presse { color: var(--pigment); }
.ex-rythme { margin-right: auto; }
.ex-grille { list-style: none; margin: var(--s3) 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--s5), 1fr)); gap: 4px; }
.ex-grille[hidden] { display: none; }
.ex-grille button { position: relative; width: 100%; height: var(--s5); border: 1px solid var(--filet); background: none; font: 500 13px/1 var(--mono); color: var(--texte); cursor: pointer; border-radius: 0; }
.ex-grille button.repondue { box-shadow: inset 0 -5px 0 var(--texte); font-weight: 700; }
.ex-grille button.drapeau::after { content: ""; position: absolute; top: 0; right: 0; width: var(--s2); height: var(--s2); background: var(--pigment); }
.ex-grille button[aria-current] { border-color: var(--texte); outline: 2px solid var(--texte); outline-offset: -3px; }
.ex-question { margin-top: var(--s4); }
.ex-question .ent-options, .ex-options-revue { max-width: 68ch; }
.ex-question .ent-enonce { max-width: 68ch; }
.ex-confiance { margin: 0 0 var(--s3); }
.ex-nav { display: flex; flex-wrap: wrap; gap: var(--s2); justify-content: space-between; border-top: 1px solid var(--filet); padding-top: var(--s3); }
.ex-drapeau[aria-pressed="true"] { border-color: var(--pigment); color: var(--pigment); }
.ex-themes, .ex-conf, .ex-erreurs, .ex-revue { list-style: none; margin: 0; padding: 0; }
.ex-themes li { display: grid; grid-template-columns: minmax(0, 16em) minmax(0, 1fr) var(--s7); gap: var(--s3); align-items: center; padding: var(--s1) 0; border-bottom: 1px solid var(--filet); }
.ex-themes .tab-piste { height: var(--s2); }
.ex-themes .tab-chiffres { text-align: right; }
.ex-conf li { display: grid; grid-template-columns: minmax(0, 12em) minmax(0, 1fr) var(--s7); gap: var(--s3); padding: var(--s1) 0; border-bottom: 1px solid var(--filet); font-variant-numeric: tabular-nums; }
.ex-conf strong { text-align: right; }
.ex-erreurs li { padding: var(--s1) 0; border-bottom: 1px solid var(--filet); max-width: 68ch; }
.ex-revue-item { border-bottom: 1px solid var(--filet); scroll-margin-top: calc(var(--s6) + var(--s3)); }
.ex-aide { margin: var(--s3) 0 0; }
.ex-score:focus { outline: none; }
/* Ascii au bilan (examen.js), à la taille d'une réaction. Sur un téléphone, après le paragraphe du repère, le corps
   aligné sur le bord du texte : le score reste en tête du bilan. Dès 520 px, à droite du bilan, debout sur la ligne de
   base de son dernier paragraphe (le repère : interligne 1,62, la base à 0,52 em du bas). */
.ex-score > .ascii { margin-top: var(--s3); }
.ex-score > .ascii > .ascii-scene { margin-left: calc(var(--ascii-taille) * (42 - var(--ascii-cadre)) / (2 * var(--ascii-cadre))); }
@media (min-width: 520px) {
  .ex-score:has(> .ascii) { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--s4); }
  .ex-score:has(> .ascii) > * { grid-column: 1 / -1; }
  .ex-score:has(> .ascii) > :is(.cote, h2, .auj-chiffre, .auj-detail:not(.suggestion-statut)) { grid-column: 1; }
  .ex-score > .ascii { grid-column: 2; grid-row: 1 / span 4; align-self: end; margin: 0 0 calc(.52em - var(--ascii-sol)); }
  .ex-score > .ascii > .ascii-scene { margin-left: 0; }
}
.tab-calibration .tab-poids { white-space: nowrap; }
html:has(.ex-barre) { scroll-padding-top: calc(var(--s6) + var(--s7)); }
.ex-revue-item summary { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s3); align-items: baseline; padding: var(--s2) 0; cursor: pointer; list-style: none; }
.ex-revue-item summary::-webkit-details-marker { display: none; }
.ex-num { font: 700 16px/1 var(--mono); min-width: 3ch; }
.ex-verdict { font-weight: 700; }
.ex-revue-item.juste .ex-verdict { color: var(--pigment); }
.ex-options-revue li > span { display: flex; gap: var(--s2); align-items: baseline; padding: var(--s1) var(--s2); border: 1px solid var(--filet); }
.ex-options-revue .juste { border-color: var(--texte); box-shadow: inset 3px 0 0 var(--texte); font-weight: 700; }
.ex-options-revue .choisi-faux { border-color: var(--pigment); box-shadow: inset 3px 0 0 var(--pigment); }
.ex-piege { max-width: 68ch; }
.ex-corrige { max-width: 68ch; padding-left: var(--s3); border-left: 2px solid var(--filet); }
.ex-corrige p { margin: 0 0 var(--s1); }
.ex-liens { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s3); align-items: baseline; padding-bottom: var(--s3); }
.ex-signaler { padding: 0; border: 0; background: none; font: 500 11px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--doux); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.tab-copier { padding: var(--s1) var(--s3); border: 1px solid var(--texte); background: none; font: 600 14px/1.2 var(--sans); color: var(--texte); cursor: pointer; border-radius: 0; }

/* la barre d'examen se colle sous l'en-tête, qui ne fait plus que 42 px sur mobile (seuil de .barre) */
@media (max-width: 760px) {
  .ex-barre { top: var(--s5); }
  html:has(.ex-barre) { scroll-padding-top: calc(var(--s5) + var(--s7)); }
  .ex-revue-item { scroll-margin-top: calc(var(--s5) + var(--s2)); }
}

/* ----------------------------------------------------------- oral (/oral/) */
.oral { max-width: calc(16 * var(--s5)); }
.oral-horloge { margin: var(--s3) 0; font: 700 68px/1 var(--mono); font-variant-numeric: tabular-nums; }
.oral-horloge.depasse { color: var(--pigment); }
/* Ascii à droite de l'horloge (oral.js), à la taille d'une réaction (la version plate au repos), l'horloge posée sur
   son sol : la base des chiffres (interligne 1, à 0,12 em du bas) à hauteur de ses pieds. L'horloge garde la largeur
   de « +0:15 » : le dépassement ne le fait pas bouger. Sous 21 rem, il passe sous l'horloge, toujours. */
.oral [data-zone="pitch"] { container: oral-pitch / inline-size; }
.oral-scene { --ascii-taille: var(--s8); --ascii-cadre: 54; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0 var(--s4); margin: var(--s3) 0; }
.oral-scene > .ascii { --ascii-taille: inherit; --ascii-cadre: inherit; }
.oral-scene > .ascii > .ascii-scene { margin-left: calc(var(--ascii-taille) * (42 - var(--ascii-cadre)) / (2 * var(--ascii-cadre))); }
.oral-scene .oral-horloge { min-width: 5ch; margin: 0 0 calc(var(--ascii-taille) * (var(--ascii-cadre) - 42) / (2 * var(--ascii-cadre)) - .12em); }
@container oral-pitch (max-width: 20.99rem) { .oral-scene > .ascii { flex-basis: 100%; } }
.oral-boutons { display: flex; flex-wrap: wrap; gap: var(--s2); }
.oral-boutons button:not(.auj-fin) { padding: var(--s2) var(--s3); border: 1px solid var(--filet); background: none; font: 500 16px/1 var(--sans); color: var(--texte); cursor: pointer; border-radius: 0; }
.oral-grille { display: grid; gap: var(--s2); margin-top: var(--s3); }
.oral-grille[hidden] { display: none; }
.oral-grille legend { font-weight: 600; }
.oral-grille .auj-fin { justify-self: start; margin-top: var(--s2); }
.oral-brief { display: grid; gap: var(--s3); margin: var(--s3) 0 var(--s2); }
.oral-brief label { display: grid; gap: var(--s1); }
.oral-brief textarea { width: 100%; max-width: 68ch; padding: var(--s1) var(--s2); border: 1px solid var(--texte); background: var(--fond); color: var(--texte); font: 400 16px/1.5 var(--sans); border-radius: 0; resize: vertical; }
.oral-brief small { font: 400 11px/1.3 var(--mono); color: var(--pigment); min-height: 1em; }
.oral-briefs details { border-bottom: 1px solid var(--filet); padding: var(--s1) 0; }
.oral-briefs summary { cursor: pointer; font-weight: 600; }
@media (max-width: 754px) {
  .ex-formats { grid-template-columns: minmax(0, 1fr); }
  .ex-themes li { grid-template-columns: minmax(0, 1fr) var(--s7); }
  .ex-themes .tab-piste { grid-column: 1 / -1; grid-row: 2; }
  .ex-conf li { grid-template-columns: minmax(0, 1fr) auto; }
  .ex-conf li > span:nth-child(2) { grid-column: 1 / -1; grid-row: 2; color: var(--doux); }
  .ex-passes li { grid-template-columns: var(--s7) minmax(0, 1fr) auto; }
  .ex-passes li > :last-child { display: none; }
  .ex-nav { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ex-nav .ex-drapeau { grid-column: 1 / -1; }
  .ex-nav [data-prec] { justify-self: start; }
  .ex-nav [data-suiv] { justify-self: end; }
  .oral-horloge { font-size: 42px; }
  .ent-chrono { position: static; display: block; text-align: right; }
}

/* ----------------------------------------------------------- page Planning : site/planning.css (liée par cette seule page) */

/* Aujourd'hui : les cours du jour et le prochain examen (aujourdhui.js) */
.auj-examen strong { color: var(--pigment); }
.auj-coursliste { list-style: none; margin: var(--s2) 0 0; padding: 0; display: grid; gap: var(--s1); }
.auj-coursliste li { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: var(--s2); align-items: baseline; }
.auj-coursliste li.passe { color: var(--doux); }
.auj-coursliste li.encours strong { color: var(--pigment); }
.auj-cours .alerte { color: var(--pigment); text-transform: none; letter-spacing: 0; }
@media (max-width: 760px) { .auj-coursliste li { grid-template-columns: 5.5rem minmax(0, 1fr); } }

/* ----------------------------------------------------------- marché : recoupement (écart signalé) */
.marche-table td.alerte { color: var(--pigment); font-weight: 700; }

/* ----------------------------------------------------------- marché : courbe de 60 jours dans chaque tuile */
.tuile-courbe { position: relative; height: var(--s4); margin: 2px 0; }
.tuile-courbe svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.tuile-courbe polyline { fill: none; stroke: var(--doux); stroke-width: 1.5; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.tuile-courbe i { position: absolute; right: 0; width: 5px; height: 5px; margin: -2.5px -2.5px 0 0; background: var(--texte); }

/* ----------------------------------------------------------- application : hors ligne, installation */
html.hors-ligne body::after {
  content: "Hors ligne · pages gardées sur ce téléphone"; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  padding: var(--s1) var(--s3); background: var(--texte); color: var(--fond);
  font: 500 11px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; text-align: center;
}
.auj-installer { padding: var(--s1) var(--s3); border: 1px solid var(--texte); background: none; font: 600 14px/1.2 var(--sans); color: var(--texte); cursor: pointer; border-radius: 0; }
.auj-installer:hover { background: var(--texte); color: var(--fond); }

/* ----------------------------------------------------------- courbes : la courbe française d'il y a un mois, en pointillé */
.marche-courbes .courbe.c-fr-mois { stroke: var(--pigment); stroke-width: 1.5; stroke-dasharray: 1 3.5; stroke-linecap: round; }
.marche-courbes .point.c-fr-mois { fill: none; stroke: var(--pigment); stroke-width: 1; }
.legende-courbes i.c-fr-mois { background: none; border-top: 2px dotted var(--pigment); height: 0; }

/* ----------------------------------------------------------- entrée : /connexion/, /bienvenue/, /acces/, /confidentialite/ (publiques)
   Une seule colonne de 288 + 178 = 466 px, centrée. L'astérisque est le seul pigment de l'écran (le focus et le survol
   d'un bouton le reprennent le temps d'un geste). Tout se mesure sur l'échelle : 6 · 10 · 16 · 26 · 42 · 68 · 110. */
.entree { min-height: 100svh; display: grid; grid-template-rows: 1fr auto; }
.entree main { width: min(100%, calc(var(--s9) + var(--s8) + 2 * var(--s3))); margin: 0 auto; padding: var(--s6) var(--s3) var(--s5); align-self: center; }
.entree-tete { margin-bottom: var(--s5); }
/* Le logo de l'en-tête est Ascii (ascii.css, mascotte.js) : au repos, exactement le logo, qui arrive en tournant d'une
   branche (60°, il retombe sur lui-même) ; puis le script de la page le fait réagir (connexion : salut ; invitation :
   réveil et salut ; accès refusé : non). Sa scène carrée (178 px) laisse de la place aux gestes : le corps, 42 unités
   de son cadre, est posé sur le bord gauche de la colonne, et le mot « learn » à la même distance de son sol que
   de l'ancien logo. La confidentialité garde le logo plat, qui n'ouvre les yeux qu'au survol.
   L'arrivée, une fois : la scène paraît, la version plate y tourne sur son centre. Pas sur son corps, que le chargement
   (envoi) et le survol (ascii.css) animent aussi, et dont chaque fin la relancerait ; ni l'opacité de la version plate,
   que le moteur fond (une animation y couperait le fondu). */
.entree-tete .ascii { flex-wrap: nowrap; margin-bottom: calc(-1 * var(--ascii-sol)); }
@media (max-width: 359.98px) { .entree-tete .ascii { flex-wrap: wrap; } }   /* la ligne, trop serrée à côté : dessous */
.entree-tete .ascii-scene { margin-left: calc(var(--ascii-taille) * (42 - var(--ascii-cadre)) / (2 * var(--ascii-cadre))); }
.entree-tete :is(.ascii-scene, .entree-logo) { animation: entree-paraitre 1618ms var(--ease); }
.entree-tete :is(.ascii-scene, .entree-logo) > .ascii-plat { transform-origin: center; animation: entree-tourner 1618ms var(--ease); }
.entree-logo { display: block; width: var(--s6); height: var(--s6); }
.entree-logo .ascii-plat { width: 100%; height: 100%; }
@keyframes entree-tourner { from { transform: rotate(-60deg); } }
@keyframes entree-paraitre { from { opacity: 0; } }
.entree h1:not(.entree-titre), .entree-marque { margin: var(--s4) 0 var(--s2); font: 800 68px/.95 var(--sans); font-stretch: 116%; letter-spacing: -.035em; }
.entree-titre { margin: 0 0 var(--s3); font: 700 26px/1.25 var(--sans); letter-spacing: -.01em; text-wrap: balance; }
.entree-texte { margin: 0 0 var(--s4); }
.entree-etat { margin: 0 0 var(--s4); padding: var(--s1) 0 var(--s1) var(--s3); border-left: 2px solid var(--texte); font-weight: 500; }
.entree-form { display: grid; gap: var(--s1); }
.entree-form[hidden], .entree-etat[hidden], .entree-chemin[hidden], .entree-autre[hidden] { display: none; }
.entree-form > label:not(:first-of-type) { margin-top: var(--s3); }
.entree input {
  width: 100%; min-width: 0; height: var(--s5); padding: 0 var(--s3);
  border: 1px solid var(--doux); border-radius: 0; background: transparent; color: var(--texte);
  font: 400 16px/1 var(--sans);
  transition: border-color var(--t1) var(--ease);
}
.entree input[type="password"], .entree #code-champ { font-family: var(--mono); letter-spacing: .08em; }
.entree input:hover { border-color: var(--texte); }
.entree input:focus { outline: 2px solid var(--pigment); outline-offset: -1px; border-color: var(--texte); }
.entree input[aria-invalid="true"] { border-color: var(--texte); box-shadow: inset 0 0 0 1px var(--texte); }
.entree input:-webkit-autofill { -webkit-box-shadow: 0 0 0 var(--s5) var(--fond) inset; -webkit-text-fill-color: var(--texte); }
.entree-bouton {
  display: flex; align-items: center; justify-content: center;
  height: var(--s5); margin-top: var(--s4); padding: 0 var(--s4);
  border: 0; border-radius: 0; background: var(--texte); color: var(--fond);
  font: 600 16px/1 var(--sans); text-decoration: none; cursor: pointer;
  transition: background var(--t2) var(--ease), color var(--t2) var(--ease);
}
.entree-bouton:hover { background: var(--pigment); color: var(--papier); }
.entree-bouton:disabled { opacity: .5; cursor: progress; }
.entree-erreur { min-height: var(--s4); margin: var(--s1) 0 0; font: 500 14px/1.5 var(--sans); }
.entree-erreur:empty { min-height: 0; }
.entree-code { margin-top: var(--s5); padding-top: var(--s4); border-top: 1px solid var(--filet); }
.entree-lien {
  padding: 0; border: 0; background: none; text-align: left; cursor: pointer;
  font: 500 14px/1.6 var(--sans); color: var(--doux);
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px;
  transition: color var(--t1) var(--ease);
}
.entree-lien:hover, .entree-lien[aria-expanded="true"] { color: var(--texte); }
.entree-code .entree-form { margin-top: var(--s4); }
.entree-ligne { display: flex; }
.entree-ligne input { flex: 1; border-right: 0; }
.entree-ligne .entree-bouton { margin-top: 0; }
.entree-identite { display: flex; align-items: baseline; gap: var(--s2); margin: 0 0 var(--s3); }
.entree-identite dd { margin: 0; font: 500 16px/1 var(--mono); overflow-wrap: anywhere; }
.entree-regle { margin-top: var(--s1); }
.entree-chemin { margin: 0 0 var(--s3); font: 400 16px/1.4 var(--mono); overflow-wrap: anywhere; }
.entree-suite { margin: var(--s5) 0 0; }
.entree-suite .entree-bouton { margin: 0; }
.entree-autre { margin: var(--s3) 0 0; }
.entree-pied { padding: var(--s4) var(--s3); text-align: center; }
.entree-pied a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--filet); }
.entree-pied a:hover { color: var(--texte); }
@media (prefers-reduced-motion: reduce) { .entree-tete :is(.ascii-scene, .entree-logo), .entree-tete :is(.ascii-scene, .entree-logo) > .ascii-plat { animation: none; } }
/* Politique de confidentialité (/confidentialite/, publique) : un texte juridique qu'on lit en entier. La colonne passe à
   2 × 288 = 576 px (s9 + s8 + s7), environ 70 signes par ligne. La page part du haut ; chaque article est séparé par un
   filet et porte son numéro en cote au-dessus du titre. Les registres (identité, finalités, durées, cookies) sont des
   listes de définitions : l'étiquette en cote dans une colonne de 178 px, le texte à droite ; l'une sous l'autre sur
   téléphone. La fiche de tête est tenue entre deux filets d'encre, le seul trait plein de la page. */
.entree-doc main { align-self: start; width: min(100%, calc(2 * var(--s9) + 2 * var(--s3))); }
.entree-doc section { margin-top: var(--s5); padding-top: var(--s4); border-top: 1px solid var(--filet); }
.entree-doc h2[id] { scroll-margin-top: var(--s5); }
.entree-doc h2 { margin: 0 0 var(--s3); font: 700 18px/1.3 var(--sans); }
.entree-doc h2 .cote { display: block; margin-bottom: var(--s1); }
.entree-doc h3 { margin: var(--s4) 0 var(--s2); font: 600 16px/1.35 var(--sans); }
.entree-doc h2 + h3 { margin-top: 0; }
.doc-fiche, .registre { margin: 0 0 var(--s3); }
.doc-fiche { margin-bottom: 0; border-top: 1px solid var(--texte); border-bottom: 1px solid var(--texte); }
.doc-fiche > div, .registre > div {
  display: grid; grid-template-columns: var(--s8) minmax(0, 1fr); gap: var(--s3); align-items: baseline;
  padding: var(--s2) 0; border-top: 1px solid var(--filet);
}
.doc-fiche > div:first-child, .registre > div:first-child { border-top: 0; }
.registre { border-bottom: 1px solid var(--filet); }
.entree-doc section > .registre:last-child { margin-bottom: 0; border-bottom: 0; }
.doc-fiche dt, .registre dt { font: 500 11px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--doux); }
.registre dt code { font: inherit; text-transform: none; letter-spacing: 0; color: var(--texte); }
.doc-fiche dd, .registre dd { margin: 0; }
.doc-sommaire { margin-top: var(--s5); }
.doc-sommaire .cote { margin-bottom: var(--s2); }
.doc-sommaire ol { margin: 0; padding-left: var(--s4); columns: 2; column-gap: var(--s4); }
.doc-sommaire li { margin-bottom: var(--s1); break-inside: avoid; }
.doc-sommaire li::marker { font: 500 12px var(--mono); color: var(--doux); }
.doc-sommaire a { text-decoration: none; border-bottom: 1px solid var(--filet); }
.doc-sommaire a:hover { color: var(--pigment); border-color: currentColor; }
@media (max-width: 560px) {
  .doc-fiche > div, .registre > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .doc-sommaire ol { columns: 1; }
}
.entree-doc section p { margin: 0 0 var(--s3); }
.entree-doc section ul { margin: 0 0 var(--s3); padding-left: var(--s3); }
.entree-doc section li { margin-bottom: var(--s2); }
.entree-doc section li::marker { color: var(--doux); }
.entree-doc strong { font-weight: 600; }
.entree-doc code { font: 400 14px/1 var(--mono); }
.entree-doc section a { text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--pigment) 50%, var(--fond)); overflow-wrap: anywhere; }
.entree-doc section a:hover { color: var(--pigment); }
.entree-doc .entree-autre { margin-top: var(--s5); }

/* ----------------------------------------------------------- pied de page : le copyright, sur toutes les pages */
.pied { padding: var(--s5) var(--s5) var(--s6); border-top: 1px solid var(--filet); }
.pied p { margin: 0; font: 500 11px/1.6 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--doux); }
.pied span { color: var(--texte); }
.pied a { color: inherit; text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--pigment) 50%, var(--fond)); }
.pied a:hover { color: var(--pigment); }
@media (max-width: 760px) { .pied { padding: var(--s4) var(--s4) var(--s5); } }

/* ----------------------------------------------------------- dans l'app iPhone (ios/, classe app-native posée par
   l'app avant tout script) : l'app a sa barre d'onglets, son titre et son retour ; la barre et le pied du site
   disparaissent, et ce qui collait sous la barre colle en haut de l'écran. Ailleurs, la classe n'existe pas. */
.app-native .barre, .app-native .pied { display: none; }
.app-native .ex-barre { top: 0; }
html.app-native:has(.ex-barre) { scroll-padding-top: var(--s7); }
.app-native .ex-revue-item { scroll-margin-top: var(--s2); }
.app-native .semaine { scroll-margin-top: var(--s4); }
.app-native .colonnes > .rail.suit, .app-native .duo > #colle { top: var(--s3); }
.app-native .planning { --sous-barre: 0px; }
