/* ===========================================================================
   Notemora — the stylesheet.
   ===========================================================================

   Un parti pris, et il a changé une fois de plus : **un instrument, posé sur
   une table claire.**

   La version d'avant était noire — fond presque noir, accent vert électrique,
   un bleu réservé aux idées partagées. Elle disait « tableau de bord ». Celle-ci
   dit « cahier et magnétophone » : une page claire (#F9F9F7), des cartes
   blanches aux coins très ronds, une seule couleur d'action — l'encre — et un
   seul rouge, celui de la touche Record, de sa diode et du trait du logo. Rien
   d'autre n'est rouge, pour que le rouge ne veuille dire qu'une chose : ça
   enregistre. L'ocre ne sert qu'à deux avertissements (« audible mais juste »,
   fichier à 85 % de la limite). Les idées partagées et les réussites sont en
   encre, comme tout ce qui compte.

   Les variables gardent leurs **noms** d'avant (`--accent`, `--signal`,
   `--panneau`…) : les scripts et la page les lisent par leur nom, et un nom qui
   change casse plus loin qu'on ne regarde. Seules leurs valeurs ont changé.

   Deux polices, servies par nous : Fraunces pour ce qui se regarde (titres,
   noms des cours, chiffres, minuterie), Plus Jakarta Sans pour ce qui se lit et
   se clique. Elles viennent de `/static` et jamais d'un CDN — la politique de
   sécurité de la page l'interdit, et la page de confidentialité promet qu'aucun
   tiers ne regarde l'étudiant lire.

   La maquette d'origine : `site/maquettes/refonte-v2/` (SYSTEM.md et les cinq
   écrans). Les valeurs ci-dessous en sont la transcription.
   =========================================================================== */

/* Les deux fichiers sont « variables » : un seul par famille couvre toutes les
   graisses, soit 148 Ko en tout — deux fois l'ancien jeu, pour un titre qui a
   une voix. `swap` laisse le texte s'afficher dans la police du système pendant
   le chargement — jamais une page blanche. */
@font-face {
  font-family: "Fraunces";
  src: url("/static/polices/fraunces.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/static/polices/plus-jakarta-sans.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;

  /* La page, et ce qui s'en détache. Des gris chauds, jamais neutres : à côté
     de l'encre, un gris parfaitement neutre paraît bleu. */
  --fond:         #F9F9F7;
  --panneau:      #FFFFFF;
  --panneau-fort: #F6F6F4;
  --bord:         rgba(15,15,15,.06);
  --bord-fort:    rgba(15,15,15,.12);
  --bord-vif:     rgba(15,15,15,.20);
  --texte:        #141414;
  --gris:         #6B6B66;
  --gris-clair:   #6B6B66;
  --gris-fort:    #4A4A46;

  /* L'action : l'encre. Une seule couleur, jamais deux. */
  --accent:       #141414;
  --accent-vif:   #2E2E2E;
  --accent-pale:  #F0F0EE;
  --sur-accent:   #FFFFFF;
  --lueur:        rgba(20,20,20,.10);

  /* Le rouge : la touche Record, sa diode, le trait du logo — rien d'autre. */
  --rouge:        #C4462D;
  --rouge-sombre: #8E2F1C;
  --rouge-pale:   rgba(196,70,45,.10);

  /* L'ocre : « audible, mais juste » et le fichier à 85 % — rien d'autre. */
  --ocre:         #C98A2B;

  /* Le second signal — idées partagées, réussites — est de l'encre lui aussi. */
  --signal:       #141414;
  --signal-pale:  #F0F0EE;
  --err:          #8E2F1C;
  --err-pale:     #FBEDE9;

  /* Les voiles : le dock, une infobulle, le fond derrière une fiche ouverte. */
  --voile:        rgba(255,255,255,.78);
  --voile-fort:   rgba(255,255,255,.96);
  --voile-sombre: rgba(20,20,20,.22);

  --rayon:        16px;
  --rayon-sm:     16px;
  --rayon-md:     24px;
  --rayon-lg:     32px;
  --rayon-xs:     4px;

  /* Les trois ombres, et le liseré. */
  --relief:       inset 0 1px 0 rgba(255,255,255,.9);
  --ombre:        0 1px 2px rgba(15,15,15,.04), 0 14px 36px rgba(15,15,15,.07);
  --ombre-forte:  0 16px 38px rgba(15,15,15,.11), 0 2px 6px rgba(15,15,15,.05),
                  inset 0 1px 0 rgba(255,255,255,.85);
  --ombre-encre:  0 1px 2px rgba(0,0,0,.12), 0 6px 16px rgba(20,20,20,.10);
  --ombre-bord:   0 1px 2px rgba(15,15,15,.05);

  /* Ce qui se regarde, ce qui se lit, ce qui s'aligne. */
  --titre: "Fraunces", Georgia, serif;
  --sans:  "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono:  ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* La pile d'Apple, pour l'écran d'accueil.
     ·
     On ne **peut pas** livrer SF Pro : Apple ne la concède que pour
     l'interface d'applications sur ses plateformes, jamais pour un site web.
     L'embarquer serait une infraction de licence, et elle se voit — le
     fichier est servi en clair.
     ·
     Alors on la demande au système. Sur un Mac, un iPhone ou un iPad,
     `-apple-system` rend la **vraie** San Francisco, déjà installée et déjà
     licenciée pour cet usage : c'est exactement ce que fait apple.com. Ce
     n'est pas une approximation, c'est la police. Ailleurs — Windows,
     Android — on retombe sur la police d'interface du système, qui est son
     équivalent local. */
  --sf: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
        "Helvetica Neue", Inter, "Segoe UI", Roboto, system-ui, sans-serif;

  /* Le graphe et la forme d'onde lisent celles-ci (et retombent sur les noms
     d'avant si elles manquent). */
  --graphe-cours:        #141414;
  --graphe-notion:       #9A9A94;
  --graphe-pont:         #141414;
  --graphe-fond:         #FFFFFF;
  --graphe-texte:        #141414;
  --graphe-texte-pale:   #6B6B66;
  --graphe-trait:        rgba(20,20,20,.18);
  --graphe-trait-vif:    rgba(20,20,20,.55);
  --graphe-trait-eteint: rgba(20,20,20,.06);
  --onde:          #141414;
  --onde-dormante: #D4D4D0;
  --onde-quiet:    #C98A2B;
}

* { box-sizing: border-box; }

/* `hidden` doit gagner, toujours.
   Le navigateur ne lui donne qu'un `display: none` d'origine, que la moindre
   règle d'auteur écrase — `.jauge-etapes { display: flex }` suffit. L'élément
   reste alors à l'écran alors que le code le croit caché. */
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font: 15px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* L'ancienne nappe de lumière. L'élément reste dans la page — le HTML le pose
   — mais une page claire n'a rien à éclairer. Inerte et invisible. */
.halo { display: none; }

header, main, .pied, .voile { position: relative; z-index: 1; }
/* L'en-tête porte le dock : il doit passer au-dessus du contenu de la page,
   sinon le contexte d'empilement de `main` recouvre les onglets. */
/* Collant, comme avant la refonte : Déconnexion et Admin restent à portée
   quand la page défile. Le voile flou laisse voir ce qui passe dessous. */
/* Pas de flou ici : `backdrop-filter` ferait de l'en-tête le bloc conteneur du
   dock en `position: fixed` qu'il abrite, et le dock remonterait en haut. */
header {
  position: sticky; top: 0; z-index: 40;
  background: var(--fond); box-shadow: 0 1px 0 var(--bord);
}
header .wrap { padding-bottom: 12px; }

.wrap { max-width: 920px; margin: 0 auto; padding: 0 clamp(16px, 5vw, 48px); }
/* L'administration a besoin de plus large : son tableau porte huit colonnes. */
.wrap.large { max-width: 1300px; }

body.chargement > header,
body.chargement > main,
body.chargement > .pied { visibility: hidden; }

/* ---------------------------------------------------------------------------
   Le mouvement
   ---------------------------------------------------------------------------
   Peu, et toujours court : le contenu d'un onglet arrive (les sections
   basculent `hidden`, donc l'animation rejoue à chaque onglet), la pastille du
   dock se pose, les boutons se soulèvent au survol et se tassent au clic, une
   fiche glisse depuis la droite, une réponse monte sous la question. */
@keyframes nm-enter { from { opacity: 0; translate: 0 10px; } }
@keyframes nm-pill  { from { scale: .86; opacity: 0; } }
@keyframes nm-pop {
  0%   { scale: .7; translate: 0 4px; }
  60%  { scale: 1.08; translate: 0 -1px; }
  100% { scale: 1; translate: 0 0; }
}
@keyframes nm-rise  { from { opacity: 0; translate: 0 8px; } }
@keyframes glisser  { from { translate: 24px 0; opacity: 0; } }
@keyframes battre   { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes bat      { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }

main > section:not([hidden]) {
  animation: nm-enter .26s cubic-bezier(.2,.8,.2,1) both;
}

button, a[href] {
  transition: filter .12s, translate .16s cubic-bezier(.2,.8,.2,1),
              scale .16s cubic-bezier(.2,.8,.2,1), background .15s, color .15s,
              border-color .15s, box-shadow .15s;
}
/* Le soulèvement, sauf sur les touches du magnétophone (qui ont leur propre
   course), les onglets du dock (dont seule l'icône bouge) et les rangées de la
   bibliothèque (qui changent de fond, pas de place). */
button:not(:disabled):not(.rond):not(.dock button):not(.ligne):not(.palier):not([data-quiet]):hover { translate: 0 -1px; }
button:not(:disabled):not(.rond):not(.dock button):active { translate: 0 0; scale: .97; }
button:not(:disabled):hover, a[href]:hover { filter: brightness(.965); }
button:not(:disabled):active, a[href]:active { filter: brightness(.93); }

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--texte); outline-offset: 3px;
}
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline-offset: 2px; border-color: var(--texte);
}
/* Le champ date a un second arrêt de tabulation, l'icône du calendrier : on
   dessine l'anneau sur le champ entier dès que l'un des deux a le focus. */
input[type="date"]:focus-within { outline: 2px solid var(--texte); outline-offset: 2px; border-color: var(--texte); }
/* Le dock flotte en bas : ce qu'on fait défiler ou focaliser s'arrête au-dessus. */
html { scroll-padding-bottom: 140px; }
main :where(a, button, input, select, textarea, summary) { scroll-margin-bottom: 140px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0s !important;
    animation: none !important;
  }
  /* Ces deux-là partent d'un état invisible : sans animation, on les montre. */
  .fils path { stroke-dashoffset: 0; }
  .noeud { opacity: 1; }
}

/* ---------------------------------------------------------------------------
   L'en-tête
   --------------------------------------------------------------------------- */

header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  padding-top: 28px; padding-bottom: 0;
}

.marque {
  font-family: var(--titre); font-variation-settings: "SOFT" 100;
  display: flex; align-items: center; gap: 10px;
  font-size: 24px; font-weight: 500; letter-spacing: -.02em; line-height: 1.15;
  margin: 0;
}
.marque svg { flex: none; width: 26px; height: 26px; }
/* Le trait court du logo est la seule touche de rouge hors du magnétophone. */
.marque svg path:last-child { stroke: var(--rouge); }

/* Sortir, et la porte de l'administration : deux liens discrets, à droite. */
.coin-entete { display: flex; align-items: center; gap: 4px; }
/* La date : grise, 14, chiffres de largeur fixe pour qu'elle ne danse pas
   d'un jour à l'autre. Un peu d'air avant « Sign out », qui est un geste. */
.date-entete {
  font-size: 14px; font-weight: 500; color: var(--gris);
  font-variant-numeric: tabular-nums; margin-right: 8px; white-space: nowrap;
}
@media (max-width: 640px) { .date-entete { display: none; } }
.quitter {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px;
  background: none; border: 0; font: inherit; font-size: 14px; font-weight: 600;
  color: var(--gris); text-decoration: underline; text-underline-offset: 3px;
  cursor: pointer;
}
.quitter:hover { color: var(--texte); }
/* Le lien « Back to the app » des pages admin et confidentialité. */
header nav a.secondaire { text-decoration: none; }

/* ---------------------------------------------------------------------------
   Le dock — les onglets, flottants, en bas
   ---------------------------------------------------------------------------
   Une barre de verre fixée en bas et centrée, comme sur un téléphone, parce
   que c'est là qu'on l'ouvre. Chaque onglet est une colonne : l'icône, puis le
   mot. L'onglet masqué (Ask, sur le palier qui n'y a pas droit) ne prend pas
   de colonne. */
.dock {
  position: fixed; bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  left: 50%; translate: -50% 0; z-index: 40;
  width: min(660px, calc(100vw - 32px)); height: 78px; padding: 8px;
  border-radius: var(--rayon-lg);
  background: var(--voile);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 1px solid var(--bord);
  box-shadow: var(--ombre-forte);
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
  gap: 6px;
}
.dock button {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; min-width: 0; padding: 0 4px;
  border: 0; border-radius: var(--rayon-md); background: transparent;
  font: inherit; font-size: 13px; font-weight: 500; color: var(--gris);
  cursor: pointer;
}
.dock button svg {
  flex: none; width: 24px; height: 24px;
  transition: translate .18s cubic-bezier(.2,.8,.2,1), scale .18s cubic-bezier(.2,.8,.2,1);
}
.dock button span {
  max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dock button:hover { color: var(--texte); filter: none; }
.dock button:hover svg { translate: 0 -2px; }
.dock button:active svg { scale: .9; translate: 0 0; }
.dock button[aria-selected="true"] {
  background: var(--accent-pale); color: var(--texte); font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 1px 2px rgba(15,15,15,.06);
  animation: nm-pill .42s cubic-bezier(.2,.8,.2,1) .06s both;
}
.dock button[aria-selected="true"] svg {
  animation: nm-pop .5s cubic-bezier(.2,.8,.2,1) .1s both;
}
/* La lampe : tant qu'un enregistrement tourne, l'onglet Record dit le temps
   (« Record · 12:34 ») et porte un point rouge — depuis n'importe quel onglet.
   La classe est posée par app.js sur l'événement `notemora:micro`. */
.dock button.en-cours { color: var(--texte); font-variant-numeric: tabular-nums; }
.dock button.en-cours span::before {
  content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--rouge); margin: 0 5px 1px 0; vertical-align: middle;
}
/* Sept onglets sur 328 px : le mot descend à 10 px — la taille des mots d'une
   barre d'onglets de téléphone — et l'icône garde la sienne, c'est elle qu'on
   vise du pouce. Rien n'est coupé : « Account » en gras tient dans ses 46 px. */
@media (max-width: 420px) {
  .dock { gap: 0; padding: 6px 2px; }
  .dock button { font-size: 10px; letter-spacing: -.02em; gap: 3px; padding: 0; }
}

main.wrap { padding-top: 36px; padding-bottom: 48px; }

/* ---------------------------------------------------------------------------
   Titres et texte courant
   --------------------------------------------------------------------------- */

h2 {
  font-family: var(--titre); font-variation-settings: "SOFT" 100;
  font-size: 42px; line-height: 1.05; font-weight: 500; letter-spacing: -.02em;
  margin: 32px 0 8px;
}
section > h2:first-child { margin-top: 0; }
/* Sur l'écran d'enregistrement, c'est le bonjour qui fait le grand titre. */
#deposer > h2 { font-size: 30px; line-height: 1.15; }

.rubrique {
  font-family: var(--sans); font-size: 18px; line-height: 1.15; font-weight: 600;
  color: var(--texte); margin: 40px 0 12px; letter-spacing: 0; text-transform: none;
}
.sous-rubrique {
  font-size: 15px; font-weight: 600; color: var(--texte);
  margin: 24px 0 8px; padding-top: 16px; border-top: 1px solid var(--bord);
}

.chapeau { color: var(--gris); margin: 0 0 24px; font-size: 16px; line-height: 1.5; max-width: 62ch; }
.aide { color: var(--gris); font-size: 14px; margin: 8px 0 0; line-height: 1.5; max-width: 62ch; }
.aide strong { color: var(--texte); }
.facultatif { font-weight: 400; color: var(--gris); }
a { color: var(--texte); text-decoration-thickness: 1px; text-underline-offset: 3px; }

label {
  display: block; font-weight: 600; margin-bottom: 8px;
  font-size: 15px; line-height: 1.5;
}
/* Les étiquettes de champ, dans un formulaire : plus petites, en gris. */
form label, .parrain-lien label { font-size: 13px; color: var(--gris); }
/* Le numéro de l'étape : un simple préfixe gris, « 1 · ». */
label .num {
  color: var(--gris); font-size: 13px; font-weight: 600;
  margin-right: 8px; font-variant-numeric: tabular-nums;
}
label .num::after { content: " ·"; }

/* Une case à cocher et son texte. Le `label` ordinaire est un titre de champ ;
   ici le texte *est* le choix, donc il se lit comme une aide, à côté de sa
   case — et la rangée entière fait 44 px, parce qu'elle se clique. */
label.case {
  display: flex; align-items: flex-start; gap: 12px; cursor: pointer;
  min-height: 44px; margin: 8px 0 0; padding: 10px 0;
  font-weight: 400; font-size: 14px; line-height: 1.5; color: var(--gris);
}
label.case input {
  flex: none; width: 18px; height: 18px; margin: 2px 0 0;
  accent-color: var(--accent); cursor: pointer;
}
label.case:hover { color: var(--texte); }

/* Le bonjour de l'écran d'enregistrement : le grand titre de cet écran-là. */
.bonjour {
  font-family: var(--titre); font-variation-settings: "SOFT" 100;
  font-size: 42px; line-height: 1.05; font-weight: 500; letter-spacing: -.02em;
  margin: 0 0 24px;
}

/* ---------------------------------------------------------------------------
   Les cartes
   --------------------------------------------------------------------------- */

.carte {
  background: var(--panneau);
  border: 1px solid var(--bord);
  border-radius: var(--rayon-md);
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: var(--ombre);
}
.carte > label:first-child { margin-top: 0; }
.carte > .aide + form, .carte > .aide + .boutons-forfait { margin-top: 16px; }
.deux { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.deux > * { min-width: 0; }
@media (max-width: 560px) { .deux { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------------------
   Les champs
   --------------------------------------------------------------------------- */

input[type="text"], input[type="email"], input[type="password"], input[type="search"],
input[type="tel"], input[type="url"],
input[type="date"], input[type="number"], textarea, select {
  width: 100%; min-height: 48px; padding: 0 16px; font: inherit; font-size: 15px;
  background: var(--panneau-fort); color: var(--texte);
  border: 1px solid var(--bord-fort); border-radius: var(--rayon);
  transition: border-color .15s, box-shadow .15s;
}
textarea { padding: 12px 16px; resize: vertical; line-height: 1.5; }
select { cursor: pointer; }
input:focus, textarea:focus, select:focus { border-color: var(--texte); }
::placeholder { color: var(--gris); opacity: 1; }
input[readonly] { color: var(--gris-fort); }

/* Le carré de dépôt : une rangée tiretée, et pleine quand un fichier est là. */
.depot {
  display: flex; flex-direction: column; justify-content: center; gap: 2px;
  min-height: 60px; padding: 10px 16px; text-align: left; cursor: pointer;
  border: 1px dashed var(--bord-vif); border-radius: var(--rayon);
  transition: border-color .15s, background .15s;
}
.depot:hover, .depot.survol { background: var(--panneau-fort); border-color: var(--bord-vif); }
.depot.rempli { border-style: solid; border-color: var(--texte); background: var(--accent-pale); }
.depot strong { display: block; font-weight: 600; font-size: 15px; }
.depot .sous { display: block; color: var(--gris); font-size: 13px; }

/* ---------------------------------------------------------------------------
   Les boutons
   ---------------------------------------------------------------------------
   Rien de cliquable sous 44 px. Le principal est plat, en encre, 48 px ; 56 px
   pour « Send this lecture » et « Sign in ». Le secondaire est blanc, bordé. */

.principal {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 48px; padding: 0 22px; font: inherit;
  font-size: 15px; font-weight: 700; line-height: 1.2;
  background: var(--accent); color: var(--sur-accent);
  border: 0; border-radius: var(--rayon); cursor: pointer;
  box-shadow: var(--ombre-encre); text-decoration: none;
}
#traiter, #entrer { min-height: 56px; font-size: 18px; }
/* Un bouton désactivé ne doit pas appeler le clic. */
.principal:disabled {
  background: var(--accent-pale); color: var(--gris);
  box-shadow: none; cursor: default;
}
.principal.mince { width: auto; min-height: 44px; padding: 0 16px; font-size: 15px; }

/* Les deux issues d'un cours : l'envoyer, ou le garder pour plus tard.
   « Send » reste le geste principal et garde toute la largeur ; « Keep on
   hold » se range à côté, en 48. Sur un téléphone ils s'empilent — côte à
   côte, chacun ferait 160 px et le second passerait pour un bouton d'annuler
   la maquette les met l'un sous l'autre dès que la place manque. */
.envoi { display: flex; flex-wrap: wrap; gap: 12px; align-items: stretch; }
.envoi .principal { flex: 1 1 260px; }
.envoi .secondaire {
  flex: 0 1 auto; min-height: 56px; padding: 0 22px;
  font-size: 15px; font-weight: 600; white-space: nowrap;
}
.envoi .secondaire[hidden] { display: none; }
@media (max-width: 520px) {
  .envoi { flex-direction: column; }
  .envoi .secondaire { width: 100%; }
}

/* Le nom du cours : un champ plus haut que les autres, parce que c'est le
   seul qu'on relira dans la bibliothèque. 56 et 16 px, comme la maquette. */
input.grand { min-height: 56px; font-size: 16px; }
.manque { text-align: center; margin-top: 10px; }

.secondaire {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; font: inherit; font-size: 15px; font-weight: 600;
  background: var(--panneau); color: var(--texte);
  border: 1px solid var(--bord-fort); border-radius: var(--rayon); cursor: pointer;
  box-shadow: var(--ombre-bord); text-decoration: none; line-height: 1.2;
}
.secondaire.mince { min-height: 44px; padding: 0 16px; white-space: nowrap; }
.secondaire:disabled { color: var(--gris); cursor: default; }
.boutons { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

/* Un bouton qui n'est qu'un mot souligné. */
.lien-discret {
  display: block; width: 100%; min-height: 44px; margin-top: 8px; padding: 0 8px;
  font: inherit; font-size: 14px; font-weight: 600; color: var(--gris);
  text-decoration: underline; text-underline-offset: 3px;
  background: none; border: 0; cursor: pointer;
}
.lien-discret:hover { color: var(--texte); }

/* Les puces de choix : des pilules blanches ; la retenue est pleine, en encre. */
.segments { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.segment, .bascule-periode button {
  min-height: 44px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--bord-fort); background: var(--panneau);
  font: inherit; font-size: 15px; font-weight: 600; color: var(--texte);
  cursor: pointer; box-shadow: var(--ombre-bord);
}
.segment[aria-selected="true"], .bascule-periode button[aria-pressed="true"] {
  background: var(--accent); color: var(--sur-accent); border-color: var(--accent);
  box-shadow: var(--ombre-encre);
}
.segment:disabled { opacity: .5; cursor: default; }

/* === region: deposer === */
/* ---------------------------------------------------------------------------
   Ce qui a été rattrapé
   ---------------------------------------------------------------------------
   Le bandeau d'un enregistrement interrompu, en haut de l'écran de dépôt. Ce
   n'est pas une erreur, c'est une bonne nouvelle : on a gardé ce que la
   fermeture de la page aurait perdu. Donc le tireté de « ce qui attend », pas
   le rouge. */
.rattrapage {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px 24px;
  margin: 0 0 24px; padding: 16px 20px;
  background: var(--panneau); border: 1px dashed var(--bord-vif);
  border-radius: var(--rayon-md);
}
.rattrapage > div:first-child { flex: 1 1 16rem; min-width: 0; }
.rattrapage strong { display: block; font-size: 15px; font-weight: 600; }
.rattrapage p { margin: 2px 0 0; font-size: 14px; line-height: 1.5; color: var(--gris); }
.rattrapage-boutons { display: flex; gap: 8px; flex: none; }
@media (max-width: 560px) {
  .rattrapage-boutons { width: 100%; }
  .rattrapage-boutons button { flex: 1 1 0; width: auto; }
}

/* ---------------------------------------------------------------------------
   Le studio — l'enregistrement depuis la page
   ---------------------------------------------------------------------------
   Deux colonnes : à gauche le temps et le feu d'audibilité ; à droite l'onde et
   les touches. Sur un téléphone, l'une sous l'autre. */

.studio {
  border-radius: var(--rayon-lg); padding: 32px;
  box-shadow: var(--ombre), var(--relief);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  grid-template-areas: "horloge pupitre" "etat etat" "garder garder" "aide aide";
  gap: 16px 32px; align-items: stretch;
}
.studio > .horloge { grid-area: horloge; }
.studio > .pupitre { grid-area: pupitre; }
.studio > .etat { grid-area: etat; margin: 0; }
/* Garder, juste sous l'état : c'est la phrase « 12:22 recorded, ready to
   send » qui appelle le geste, et le bouton doit être dans le même regard. */
.studio > #garder-ici { grid-area: garder; justify-self: start; }
.studio > .aide { grid-area: aide; margin: 0; }
@media (max-width: 900px) {
  .studio {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "horloge" "pupitre" "etat" "garder" "aide";
    padding: 24px;
  }
  .studio > #garder-ici { justify-self: stretch; }
}

.horloge {
  min-width: 0; container-type: inline-size;
  display: flex; flex-direction: column; justify-content: center; gap: 16px;
}
.pupitre {
  min-width: 0;
  display: flex; flex-direction: column; justify-content: center; gap: 16px;
}

/* Le feu de l'audibilité : une pilule, et un point qui porte la couleur.
   `.feu` et non `.pastille` : ce nom-là est pris par les étiquettes des idées
   partagées, deux écrans plus loin. */
.audible {
  order: 2; align-self: flex-start;
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 36px; padding: 6px 14px; margin: 0; border-radius: 999px;
  background: var(--panneau-fort); border: 1px solid var(--bord-fort);
  font-size: 14px; line-height: 1.5; color: var(--texte);
}
.audible .feu {
  flex: none; width: 8px; height: 8px; border-radius: 50%;
  background: var(--onde-dormante);
}
/* Encre, ocre, rouge sombre — et le gris de « je mesure encore ». Jamais de
   verdict avant d'avoir de quoi le fonder. */
.audible.feu-bon     .feu { background: var(--texte); }
.audible.feu-moyen   .feu { background: var(--ocre); }
.audible.feu-mauvais .feu { background: var(--rouge-sombre); animation: battre 1.6s ease-in-out infinite; }
.audible.feu-mauvais      { color: var(--rouge-sombre); }

/* L'onde : des barres sur le blanc de la carte, sans cadre. */
#niveaux { display: block; width: 100%; height: 52px; }

/* La minuterie, en Fraunces « sec » et à chiffres tabulaires : elle doit tenir
   sa colonne jusqu'à 1:14:32, d'où la taille en largeur de conteneur. */
.cadran {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  margin: 0;
}
.minuterie {
  font-family: var(--titre); font-variation-settings: "SOFT" 0, "opsz" 144;
  font-size: clamp(44px, 12vw, 100px); font-size: clamp(40px, 21cqw, 100px); font-weight: 500;
  letter-spacing: -.02em; font-variant-numeric: tabular-nums;
  line-height: 1; color: var(--gris);
}
.minuterie.actif { color: var(--texte); }
.mesure { font-size: 13px; color: var(--gris); font-variant-numeric: tabular-nums; }
.mesure.serre { color: var(--gris-fort); font-weight: 600; }
.mesure.serre::before {
  content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 999px;
  background: var(--ocre); margin-right: 6px; vertical-align: 1px;
}

/* Le pupitre : un creux dans lequel les touches sont posées, comme sur un
   magnétophone. Une seule touche rouge — Record, puis Stop pendant que ça
   tourne : la page n'en montre jamais qu'une des deux, au même endroit. */
.transport {
  border-radius: var(--rayon-md); background: #EAEAE7;
  padding: 14px clamp(10px, 2.5vw, 16px) 26px;
  box-shadow: inset 4px 5px 11px rgba(15,15,15,.13), inset -3px -3px 8px rgba(255,255,255,.6);
  display: grid; grid-template-columns: 1.8fr 1fr; gap: clamp(6px, 2vw, 14px);
}
/* Sans la touche Pause (avant d'enregistrer, et après), la rouge prend tout. */
.transport:has(#suspendre[hidden]) { grid-template-columns: 1fr; }
#demarrer, #arreter { grid-column: 1; grid-row: 1; }
#suspendre { grid-column: 2; grid-row: 1; }

.rond {
  position: relative; min-width: 0; height: 86px;
  border: 0; border-radius: var(--rayon); cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: clamp(8px, 2.5vw, 12px);
  font: inherit; color: var(--texte);
  transition: translate .09s ease, box-shadow .09s ease, filter .12s;
}
.rond svg { flex: none; fill: currentColor; }
.rond span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rond:hover { filter: brightness(.985); }

/* La touche rouge, montée sur sa tranche. */
.rond.rec, .rond.stop {
  color: #FFFFFF;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(255,255,255,.38), rgba(255,255,255,0) 58%),
    linear-gradient(180deg, rgba(255,255,255,.08), rgba(0,0,0,.10)),
    var(--rouge);
  box-shadow:
    0 10px 0 color-mix(in srgb, var(--rouge) 64%, #000),
    0 18px 24px rgba(15,15,15,.12),
    inset 0 2px 0 rgba(255,255,255,.7),
    inset 0 -3px 8px rgba(0,0,0,.05);
}
.rond.rec span, .rond.stop span { font-size: clamp(15px, 4.5vw, 18px); font-weight: 700; letter-spacing: .01em; }
.rond.rec svg { width: 20px; height: 20px; }
.rond.stop svg { width: 18px; height: 18px; }
/* La diode, éteinte sur Record, allumée sur Stop. */
.rond.rec::after, .rond.stop::after {
  content: ""; position: absolute; top: 12px; right: 15px;
  width: 7px; height: 7px; border-radius: 999px;
  background: rgba(0,0,0,.22);
}
/* Enfoncée et verrouillée tant que ça enregistre — et au doigt sur Record. */
.rond.stop, .rond.rec:active {
  translate: 0 8px;
  box-shadow:
    0 2px 0 color-mix(in srgb, var(--rouge) 64%, #000),
    0 4px 8px rgba(15,15,15,.09),
    inset 0 3px 8px rgba(0,0,0,.14);
}
.rond.stop::after { background: #FFE3B8; box-shadow: 0 0 8px #FFD9A0; }

/* La touche grise : Pause, puis Resume, enfoncée tant qu'on est en pause. */
#suspendre {
  flex-direction: column; gap: 8px;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(255,255,255,.65), rgba(255,255,255,0) 60%),
    linear-gradient(180deg, #FFFFFF 0%, #EFEFEC 100%);
  box-shadow:
    0 10px 0 #D4D4D0, 0 18px 24px rgba(15,15,15,.12),
    inset 0 2px 0 rgba(255,255,255,.7), inset 0 -3px 8px rgba(0,0,0,.05);
}
#suspendre svg { width: 20px; height: 20px; }
#suspendre span { font-size: clamp(13px, 4vw, 15px); font-weight: 600; }
#suspendre:active, #suspendre.actif, #suspendre[aria-pressed="true"] {
  translate: 0 8px;
  box-shadow: 0 2px 0 #D4D4D0, 0 4px 8px rgba(15,15,15,.09), inset 0 3px 8px rgba(0,0,0,.14);
}

/* Recommencer : hors du pupitre, un mot souligné sous les touches. */
#reprendre-zero {
  height: auto; min-height: 44px; align-self: center; padding: 0 8px;
  background: none; box-shadow: none; color: var(--gris);
  font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px;
}
#reprendre-zero svg { width: 16px; height: 16px; fill: none; }
#reprendre-zero:hover { color: var(--texte); filter: none; }
/* === /region === */

/* ---------------------------------------------------------------------------
   Les messages
   --------------------------------------------------------------------------- */

.etat { min-height: 22px; margin: 12px 0 0; font-size: 14px; line-height: 1.5; color: var(--texte); }
.etat.err { color: var(--err); }
.etat.ok::before {
  content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--texte); margin: 0 8px 2px 0; vertical-align: middle;
}
.etat:empty::before { display: none; }
span.etat { display: inline-flex; align-items: center; min-height: 44px; margin: 0 0 0 12px; }
.studio .etat { text-align: left; }

/* Le journal du traitement : des lignes, un filet d'encre à gauche. */
.journal {
  margin-top: 16px; padding: 4px 0 4px 16px; border-left: 2px solid var(--texte);
  font-size: 14px; line-height: 1.7; color: var(--texte);
  white-space: pre-wrap; max-height: 16rem; overflow-y: auto;
}
.wrap.large .journal { font-family: var(--mono); font-size: 13px; }

/* Les bandeaux (forfait, confirmation d'adresse) : une rangée blanche, calme. */
.bandeau {
  background: var(--panneau); border: 1px solid var(--bord);
  border-radius: var(--rayon); padding: 10px 16px; margin: 0 0 24px;
  color: var(--texte); font-size: 14px; line-height: 1.5;
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px 16px; flex-wrap: wrap; box-shadow: var(--ombre-bord);
}
#texte-forfait, #texte-verification { flex: 1 1 16rem; }
.bandeau.serre { color: var(--err); border-color: var(--err); }
.bandeau.paye { font-weight: 600; }
.bandeau.a-confirmer { color: var(--texte); }

/* ---------------------------------------------------------------------------
   Les totaux
   ---------------------------------------------------------------------------
   Sur la bibliothèque : une seule ligne grise, « 12 Lectures · 3 Subjects ».
   Sur l'administration : des tuiles, parce qu'on y compare des chiffres. */
.totaux {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px;
  margin: -8px 0 16px; font-size: 14px; color: var(--gris); line-height: 1.5;
}
.total { display: inline-flex; align-items: baseline; gap: 5px; }
.total .k { order: 2; }
.total .v { order: 1; color: var(--texte); font-weight: 600; font-variant-numeric: tabular-nums; }
.total + .total::before { content: "·"; order: 0; margin-right: 4px; }

.wrap.large .totaux {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 12px; margin: 0 0 32px; font-size: 13px;
}
.wrap.large .total {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  background: var(--panneau); border: 1px solid var(--bord);
  border-radius: var(--rayon-md); padding: 16px 20px; box-shadow: var(--ombre);
}
.wrap.large .total::before { display: none; }
.wrap.large .total .k { font-weight: 600; color: var(--gris); }
.wrap.large .total .v {
  font-family: var(--titre); font-variation-settings: "SOFT" 100;
  font-size: 30px; font-weight: 500; line-height: 1.15; letter-spacing: -.02em;
}

/* === region: cours === */
/* La flèche qui ouvre les détails.
   Pleine largeur et posée comme une carte : ce n'est pas un lien discret, c'est
   la seconde moitié de l'écran, et il faut qu'on la voie sans la chercher. */
.deplier {
  display: flex; align-items: center; gap: 12px;
  width: 100%; min-height: 64px; padding: 12px 20px; margin-bottom: 16px;
  background: var(--panneau); border: 1px solid var(--bord-fort);
  border-radius: var(--rayon-md); box-shadow: var(--ombre-bord);
  font: inherit; font-size: 16px; font-weight: 600; color: var(--texte);
  text-align: left; cursor: pointer; transition: background .15s;
}
.deplier:hover { background: var(--panneau-fort); }
.deplier .chevron {
  width: 20px; height: 20px; flex: none; color: var(--gris-fort);
  transition: rotate .2s cubic-bezier(.2,.8,.2,1);
}
.deplier[aria-expanded="true"] .chevron { rotate: 180deg; }
.deplier-sous {
  margin-left: auto; font-size: 14px; font-weight: 400; color: var(--gris);
}
.deplier[aria-expanded="true"] .deplier-sous { display: none; }
@media (max-width: 600px) { .deplier-sous { display: none; } }

/* ---------------------------------------------------------------------------
   La matière
   ---------------------------------------------------------------------------
   Un aplat de couleur est un fichier ; une surface est un objet. Le grain est
   ce qui fait la différence entre les deux, et c'est à peu près tout ce qu'il
   faut : quatre centièmes d'opacité, posés une fois au-dessus de la page.

   En SVG dans une `data:` URI, donc sans requête et sans script — la politique
   de sécurité l'autorise au titre des images (`img-src 'self' data:`). Il ne
   prend aucun clic, et il ne bouge jamais : fixé à la fenêtre, il ne défile
   pas avec le contenu, et le papier reste sous la page comme du papier. */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 90;
  pointer-events: none; opacity: .042;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23g)'/%3E%3C/svg%3E");
}
@media print { body::after { display: none; } }

/* ---------------------------------------------------------------------------
   Les gestes
   ---------------------------------------------------------------------------
   L'encre monte dans le bouton par le bas au survol. Elle ne clignote pas,
   elle ne change pas de couleur d'un coup : elle entre. C'est le seul effet
   du site qui dure plus d'un quart de seconde, et il le mérite — c'est le
   geste qu'on vient faire. */
.principal, .secondaire {
  position: relative; overflow: hidden; isolation: isolate;
}
.principal::before, .secondaire::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  translate: 0 101%;
  transition: translate .42s cubic-bezier(.2,.9,.2,1);
}
.principal::before { background: var(--accent-vif); }
.secondaire::before { background: var(--accent-pale); }
.principal:not(:disabled):hover::before,
.principal:not(:disabled):focus-visible::before,
.secondaire:not(:disabled):hover::before,
.secondaire:not(:disabled):focus-visible::before { translate: 0 0; }
/* Un bouton éteint ne promet rien : pas de montée d'encre. */
.principal:disabled::before, .secondaire:disabled::before { display: none; }

/* ---------------------------------------------------------------------------
   L'arrivée d'un écran
   ---------------------------------------------------------------------------
   Changer d'onglet remplace un écran par un autre. Sans transition, les deux
   se superposent dans l'œil et on relit tout ; avec celle-ci, chaque bloc se
   pose à son tour et le regard suit l'ordre de lecture. Le décalage est de 45
   ms : assez pour qu'on le sente, trop peu pour qu'on l'attende.

   L'animation ne se rejoue pas à chaque rafraîchissement : elle est portée par
   les enfants directs de la section, qui ne sont pas reconstruits — c'est leur
   contenu qui change. Elle ne part qu'au moment où la section cesse d'être
   `hidden`. */
@keyframes se-pose {
  from { opacity: 0; translate: 0 10px; }
  to   { opacity: 1; translate: 0 0; }
}
main > section:not([hidden]) > * {
  animation: se-pose .46s cubic-bezier(.2,.8,.2,1) backwards;
}
main > section:not([hidden]) > *:nth-child(2) { animation-delay: .045s; }
main > section:not([hidden]) > *:nth-child(3) { animation-delay: .09s; }
main > section:not([hidden]) > *:nth-child(4) { animation-delay: .135s; }
main > section:not([hidden]) > *:nth-child(5) { animation-delay: .18s; }
main > section:not([hidden]) > *:nth-child(n+6) { animation-delay: .22s; }

@media (prefers-reduced-motion: reduce) {
  main > section:not([hidden]) > * { animation: none; }
  .principal::before, .secondaire::before { transition: none; }
}

/* ---------------------------------------------------------------------------
   L'accueil : le cerveau, et le voyage dedans
   ---------------------------------------------------------------------------
   Un visiteur qui arrive ne sait pas ce qu'est Notemora. Trois phrases ne le
   lui apprennent pas — personne ne lit une page d'accueil, on la fait défiler.
   Il traverse donc le produit : le cerveau en trois dimensions est derrière
   toute la page, et chaque coup de molette saute d'une idée à la suivante.
   À chaque arrivée, un objet du produit se pose à côté du nom de l'idée.

   Le formulaire, lui, est au terminus et n'a pas bougé d'une virgule : c'est
   lui qui marche, et le refaire pour le déplacer serait le casser pour rien.
   Le lien « Sign in » de la barre y descend directement, pour qui revient. */
.voile.entree {
  display: block; padding: 0; align-items: initial; justify-content: initial;
  background: var(--fond);
  transition: background-color .34s cubic-bezier(.4,0,.2,1),
              color .34s cubic-bezier(.4,0,.2,1);
  /* L'écran d'accueil passe entièrement à la police du système Apple.
     Redéfinir les deux variables ici suffit : tout ce qui est dans le voile
     suit, et l'application derrière garde les siennes. C'est aussi ce qui
     rend le changement réversible en deux lignes. */
  --titre: var(--sf);
  --sans: var(--sf);
}
/* La nuit : le papier devient encre le temps du voyage, et redevient papier
   au terminus, là où l'on signe. Portée par le voile et non par `body`, pour
   que l'application derrière ne s'assombrisse jamais. */
.voile.entree.nuit {
  --fond: var(--encre-nuit);
  --panneau: #16171B;
  --panneau-fort: #1C1D22;
  --texte: #EDECE6;
  --gris: #8A8B86;
  --gris-fort: #B6B5AF;
  --bord: rgba(237, 236, 230, .09);
  --bord-fort: rgba(237, 236, 230, .17);
  --bord-vif: rgba(237, 236, 230, .26);
  --accent: #EDECE6;
  --sur-accent: #0B0C0E;
  --accent-pale: rgba(237, 236, 230, .1);
  color: var(--texte);
}
:root { --encre-nuit: #0B0C0E; }

.cerveau-fond {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
}

.barre-accueil {
  position: fixed; z-index: 3;
  top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 18px max(20px, env(safe-area-inset-left, 0px));
}
.marque-accueil {
  display: flex; align-items: center; gap: 11px; margin: 0;
  font-family: var(--titre); font-variation-settings: "SOFT" 100;
  font-size: 18px; font-weight: 500; letter-spacing: -.01em; color: var(--texte);
}
.marque-accueil .sceau { width: 25px; height: 25px; flex: none; }
.vers-entree {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px;
  border: 1px solid var(--bord-fort); border-radius: 999px;
  color: var(--texte); text-decoration: none;
  font-size: 14px; font-weight: 600;
}
.vers-entree:hover { border-color: currentColor; }

.voile.entree .piste { position: relative; z-index: 1; }
.station {
  min-height: 92svh;
  display: flex; flex-direction: column; justify-content: center;
  padding-block: 14vh 10vh;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
.station .dedans { width: 100%; max-width: 820px; margin: 0 auto; }
.station-entree { padding-block: 10vh 12vh; }
.station-entree .accueil { grid-template-columns: 1fr; max-width: 560px; }

/* Le surtitre suit la même logique : les capitales très espacées sont une
   signature de serif éditorial, pas d'Apple, qui l'écrit en demi-gras à la
   taille du texte courant. */
.voile.entree .eyebrow {
  font-size: 14px; font-weight: 600; letter-spacing: -.01em;
  text-transform: none; color: var(--gris); margin: 0 0 14px;
}
.titre-station {
  font-family: var(--titre);
  /* Les réglages d'axes étaient ceux de Fraunces, qui est variable. San
     Francisco ne les connaît pas, et les laisser poserait un rendu au hasard
     selon le moteur. */
  font-variation-settings: normal;
  /* Et le poids change avec la police. Un serif à 300 est élégant ; un sans
     d'interface à 300 est anémique. Apple titre en demi-gras, serré. */
  font-weight: 600; letter-spacing: -.028em; line-height: 1.04;
  text-wrap: balance; margin: 0;
  font-size: clamp(40px, 7.6vw, 86px);
}
.voile.entree .une-ligne {
  font-size: clamp(16px, 1.9vw, 19px); max-width: 38ch;
  margin: 26px 0 0; color: var(--gris);
}
.voile.entree .cta {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; min-height: 58px;
  margin-top: 40px; padding: 0 34px;
  border: 1px solid var(--texte); border-radius: 999px;
  color: var(--texte); text-decoration: none;
  font-size: 16px; font-weight: 700;
  transition: color .4s cubic-bezier(.4,0,.2,1), translate .3s cubic-bezier(.2,.8,.2,1);
}
.voile.entree .cta::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--texte); translate: 0 101%;
  transition: translate .45s cubic-bezier(.2,.9,.2,1);
}
.voile.entree .cta:hover, .voile.entree .cta:focus-visible {
  color: var(--fond); translate: 0 -2px;
}
.voile.entree .cta:hover::before, .voile.entree .cta:focus-visible::before { translate: 0 0; }
.sous-cta { font-size: 13px; color: var(--gris); margin: 16px 0 0; }

/* Le bandeau des écoles.
   ·
   Bas et large : il se traverse, il ne s'arrête pas. Tout y est à la même
   taille et au même gris — c'est ce qui le fait lire comme une liste et non
   comme six publicités de tailles différentes. */
.bandeau-ecoles {
  position: relative; z-index: 1;
  padding-block: 7vh 9vh;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
  text-align: center;
}
.ecoles-quoi {
  margin: 0 0 22px; font-size: 13px; font-weight: 600;
  letter-spacing: -.01em; color: var(--gris-pale, var(--gris));
}
.ecoles {
  display: flex; flex-wrap: wrap; justify-content: center;
  align-items: center; gap: 14px 40px;
  margin: 0 auto; padding: 0; list-style: none; max-width: 900px;
}
.ecoles li {
  font-size: clamp(15px, 2.1vw, 19px); font-weight: 600;
  letter-spacing: -.015em; color: var(--gris);
  /* Un filet d'opacité plutôt qu'un gris plus clair : sur l'écran de nuit du
     cerveau comme sur le fond clair, le rapport reste le même. */
  opacity: .72;
}
@media (max-width: 560px) {
  .ecoles { gap: 10px 26px; }
}

/* Les objets du produit, posés à chaque arrivée. Un verre dépoli sur le
   cerveau : on voit à travers, donc on reste dedans. */
.voile.entree .objet {
  margin-top: 48px;
  border: 1px solid var(--bord-fort); border-radius: var(--rayon-md);
  background: color-mix(in srgb, var(--fond) 72%, transparent);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  box-shadow: 0 24px 60px -30px rgba(0, 0, 0, .5);
}

/* `.studio` appartient au magnétophone de l'application, plus bas dans cette
   feuille : une grille à deux colonnes. Lui reprendre son nom ici écrasait sa
   grille et posait son cadran derrière la touche Record. */
.magneto {
  display: flex; align-items: center; flex-wrap: wrap; gap: 18px 24px;
  padding: 22px 26px; max-width: 520px;
}
.rec-faux {
  position: relative; flex: none; display: grid; place-items: center;
  width: 62px; height: 62px; padding: 7px; border-radius: 50%;
  background: color-mix(in srgb, var(--texte) 9%, transparent);
  box-shadow: inset 0 2px 5px rgba(0,0,0,.45), inset 0 -1px 0 rgba(255,255,255,.07);
}
.rec-pastille {
  width: 100%; height: 100%; border-radius: 50%; display: block;
  background: radial-gradient(circle at 36% 28%, #E8694B 0%, #C4462D 42%, #8E2F1C 100%);
  box-shadow: 0 0 0 1px rgba(0,0,0,.35), 0 6px 14px -4px rgba(196,70,45,.9),
              inset 0 -2px 6px rgba(0,0,0,.35), inset 0 2px 4px rgba(255,255,255,.3);
}
.rec-halo {
  position: absolute; inset: 0; border-radius: 50%;
  border: 1.5px solid rgba(196,70,45,.55);
  animation: halo 2.6s cubic-bezier(.2,.6,.3,1) infinite;
}
@keyframes halo {
  0%   { transform: scale(1); opacity: .9; }
  70%, 100% { transform: scale(1.75); opacity: 0; }
}
.cadran-faux { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.horloge-faux {
  font-family: var(--titre); font-variation-settings: "SOFT" 0, "opsz" 144;
  font-size: 36px; line-height: 1; font-variant-numeric: tabular-nums;
}
.sous-cadran {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--gris);
}
.sous-cadran .braise {
  width: 7px; height: 7px; border-radius: 50%; background: #C4462D; flex: none;
  box-shadow: 0 0 7px rgba(196,70,45,.9);
  animation: bat-rec 1.7s ease-in-out infinite;
}
@keyframes bat-rec { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
/* Des barres qui gonflent toutes ensemble, ce n'est pas un son, c'est un
   métronome. Celle-ci défile, et elle est dessinée pour ça. */
.onde-faux { flex: 1 1 170px; min-width: 0; height: 46px; display: block; }

.fiche-faux { padding: 26px 30px; max-width: 500px; }
.fiche-faux h3 {
  font-family: var(--titre); font-variation-settings: "SOFT" 100;
  font-size: 24px; font-weight: 400; letter-spacing: -.025em;
  margin: 0 0 4px; line-height: 1.1;
}
.fiche-faux .m { font-size: 12.5px; color: var(--gris); margin: 0 0 18px; }
.fiche-faux ul { margin: 0; padding-left: 17px; font-size: 14.5px; color: var(--gris); }
.fiche-faux li { margin-bottom: 8px; }
.fiche-faux li b { color: var(--texte); font-weight: 600; }

.rangs { padding: 10px 26px 16px; max-width: 520px; }
.rangs .groupe {
  font-size: 11px; font-weight: 700; letter-spacing: .18em;
  text-transform: uppercase; color: var(--gris);
  padding: 16px 0 6px; border-bottom: 1px solid var(--bord); margin: 0;
}
.rang {
  display: flex; flex-direction: column; gap: 2px;
  padding: 13px 0; border-bottom: 1px solid var(--bord);
}
.rang:last-child { border-bottom: 0; }
.rang b {
  font-family: var(--titre); font-variation-settings: "SOFT" 100;
  font-size: 19px; font-weight: 400; letter-spacing: -.02em; line-height: 1.15;
}
.rang span {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--gris);
}
.rang em {
  font-style: normal; font-size: 11px; font-weight: 600;
  padding: 3px 9px; border: 1px dashed var(--bord-fort); border-radius: 999px;
}

.reponse-faux { padding: 26px 30px; max-width: 540px; }
.reponse-faux .q {
  font-family: var(--titre); font-variation-settings: "SOFT" 100;
  font-size: 23px; font-weight: 400; letter-spacing: -.025em;
  margin: 0 0 14px; line-height: 1.15;
}
.reponse-faux .a { font-size: 15px; color: var(--gris); margin: 0; }
.reponse-faux ol {
  margin: 20px 0 0; padding: 0 0 0 16px; list-style: none;
  border-left: 2px solid var(--texte);
}
.reponse-faux li { font-size: 13.5px; margin-bottom: 9px; }
.reponse-faux li span { color: var(--gris); }

.colle {
  display: flex; align-items: center; padding: 16px 20px; max-width: 520px;
  font-family: var(--mono); font-size: 13px; color: var(--gris);
}
.colle b { color: var(--texte); font-weight: 400; }
.assistants {
  display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 0; padding: 0;
  list-style: none;
}
.assistants li {
  display: flex; align-items: center; gap: 9px;
  min-height: 44px; padding: 0 16px;
  border: 1px solid var(--bord-fort); border-radius: 999px;
  font-size: 14px; font-weight: 600;
  transition: border-color .3s ease, translate .3s cubic-bezier(.2,.8,.2,1);
}
.assistants li:hover { border-color: currentColor; translate: 0 -2px; }
.assistants svg { width: 17px; height: 17px; flex: none; }

@media (max-width: 900px) {
  .station-entree .accueil { padding: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .voile.entree, .voile.entree .cta, .voile.entree .cta::before { transition: none; }
  .rec-halo, .sous-cadran .braise { animation: none; }
  .station { min-height: 0; padding-block: 56px; }
}

/* ---------------------------------------------------------------------------
   La bibliothèque
   --------------------------------------------------------------------------- */

/* Le titre et la recherche sur la même ligne : chercher est ce qu'on vient
   faire ici, et l'enterrer sous un titre de 42 px coûte un coup d'œil à chaque
   visite. En dessous de 600 px la recherche ne tient plus à côté du titre et
   passe dessous, sur toute la largeur. */
.entete-biblio {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 16px 24px; margin-bottom: 20px;
}
.entete-biblio h2 { margin: 0; }

/* La recherche : un champ de 48 px, la loupe dedans, un bouton pour vider. */
.chercher {
  display: flex; align-items: center; gap: 10px;
  flex: 1 1 280px; max-width: 420px;
  height: 48px; padding: 0 2px 0 14px;
  background: var(--panneau); border: 1px solid var(--bord-fort);
  border-radius: var(--rayon); box-shadow: var(--ombre-bord);
  transition: border-color .15s;
}
.chercher:focus-within { border-color: var(--texte); }
.chercher svg { width: 20px; height: 20px; color: var(--gris); flex: none; }
.chercher input {
  flex: 1; min-width: 0; min-height: 44px; padding: 0; margin: 0;
  background: none; border: 0; outline: none; box-shadow: none;
  font: inherit; font-size: 15px; color: var(--texte);
}
.chercher input:focus { border-color: transparent; }
.chercher input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.vider {
  flex: none; width: 44px; height: 44px; border-radius: var(--rayon);
  background: var(--accent-pale); border: 0; color: var(--texte);
  font: inherit; font-size: 14px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}

/* Les pastilles de filtre : une seule forme, 44 px de haut, et la matière
   choisie en encre pleine. Sans décompte — c'est la ligne de résultats qui
   répond, et seulement quand on a filtré. */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.chip {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
  background: var(--panneau); border: 1px solid var(--bord-fort);
  border-radius: 999px; box-shadow: var(--ombre-bord);
  font: inherit; font-size: 15px; font-weight: 600; color: var(--gris-fort);
  cursor: pointer; transition: background .15s, color .15s, border-color .15s;
}
.chip:hover { background: var(--panneau-fort); }
.chip[aria-pressed="true"] {
  background: var(--texte); border-color: var(--texte); color: var(--fond);
  box-shadow: var(--ombre-encre);
}

/* Le décompte après coup : une ligne grise, annoncée aux lecteurs d'écran. */
.resultats { margin: -8px 0 20px; font-size: 14px; color: var(--gris); }

/* Le titre d'une rubrique — « This week », « On hold », un mois. En Jakarta,
   pour laisser le Fraunces aux titres de cours. */
.rubrique {
  margin: 24px 0 4px;
  font-family: var(--sans); font-size: 15px; font-weight: 600; line-height: 1.5;
  color: var(--texte); letter-spacing: 0;
}
.rubrique:first-child { margin-top: 0; }

/* Une rangée par cours : le titre en Fraunces, une ligne grise dessous, un
   filet entre deux rangées. La rangée entière ouvre la fiche.

   Pas de carte, pas d'ombre, pas d'arrondi au repos : la fiche portait six
   choses, et parcourir six fiches voulait dire en lire trente-six. Une rangée
   est un titre, et une ligne qui ne lui dispute rien. */
.ligne {
  display: grid; grid-template-columns: minmax(0, 1fr);
  align-items: start; row-gap: 2px;
  width: calc(100% + 24px); margin: 0 -12px; min-height: 64px; padding: 10px 12px;
  text-align: left; position: relative;
  background: transparent; border: 0; border-radius: var(--rayon);
  font: inherit; color: var(--texte); cursor: pointer;
  transition: background .15s;
}
.ligne::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 1px;
  background: var(--bord);
}
.ligne:hover, .ligne:focus-visible { background: var(--panneau-fort); }
.ligne .titre {
  min-width: 0;
  font-family: var(--titre); font-variation-settings: "SOFT" 100;
  font-size: 24px; font-weight: 500; line-height: 1.15; letter-spacing: -.02em;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
/* « Microeconomics · Tue 13 Oct · 1 h 12 », et le repère des diapositives au
   bout. En rangée souple pour que le repère de 28 px soit centré sur un texte
   de 14, et qu'il passe à la ligne plutôt que de déborder. */
.ligne .meta-ligne, .hold-ligne .meta-ligne, .croisement .meta-ligne {
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px;
  min-width: 0; color: var(--gris); font-size: 14px; line-height: 1.5;
}
/* Le passage trouvé dans le texte d'une note : une citation, en chasse fixe. */
.ligne .extrait {
  min-width: 0; color: var(--gris); font-family: var(--mono); font-size: 13px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* « No slides yet » : ce qu'on peut ajouter, pas ce qui manque. Tireté, comme
   l'encadré qui porte la même proposition dans la fiche. */
.sans-diapos {
  display: inline-flex; align-items: center; height: 28px; padding: 0 10px;
  border: 1px dashed var(--bord-vif); border-radius: 999px;
  font-size: 13px; font-weight: 600; color: var(--gris-fort);
}
mark {
  background: none; color: var(--texte);
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 2px;
}

/* Un cours en train d'être écrit : une rangée tiretée, sans clic possible. */
.ligne.s-ecrit { cursor: default; border-radius: 0; }
.ligne.s-ecrit::before {
  content: ""; position: absolute; left: 12px; right: 12px; top: 0;
  border-top: 1px dashed var(--bord-vif);
}
.ligne.s-ecrit:hover { background: transparent; }
.ligne.s-ecrit .titre { color: var(--gris-fort); }
.ligne.s-ecrit .meta-ligne::before {
  content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--texte); flex: none;
  animation: bat 1.4s ease-in-out infinite;
}

/* ---------------------------------------------------------------------------
   Ce qui est gardé sans être envoyé, au pied de la bibliothèque
   --------------------------------------------------------------------------- */
/* Le même dessin que les rangées de la liste — c'est la même liste —, et trois
   actions en texte à droite. Pas de bouton plein : envoyer un enregistrement
   gardé n'est pas plus important que d'en ouvrir un. */
#nm-hold { margin-top: 24px; }
.hold-promesse { margin: 0 0 4px; font-size: 14px; color: var(--gris); }
.hold-ligne {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px;
  width: calc(100% + 24px); margin: 0 -12px; min-height: 64px; padding: 10px 12px;
  position: relative;
}
.hold-ligne::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 1px;
  background: var(--bord);
}
.hold-ligne .titre {
  flex: 1 1 220px; min-width: 0;
  font-family: var(--titre); font-variation-settings: "SOFT" 100;
  font-size: 24px; font-weight: 500; line-height: 1.15; letter-spacing: -.02em;
}
/* La méta passe sous le titre : les deux partagent la première colonne. */
.hold-ligne .meta-ligne { flex: 1 1 100%; order: 3; }
.hold-gestes {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px;
  margin-left: auto;
}
.hold-gestes .question { font-size: 14px; color: var(--gris-fort); }
/* Une action en texte : pas de soulignement au repos, 44 px de haut quand
   même. Le soulignement vient au survol, là où il dit quelque chose. */
[data-quiet] {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 0; background: none; border: 0;
  font: inherit; font-size: 15px; color: var(--gris-fort);
  cursor: pointer; text-decoration: none;
}
[data-quiet]:hover, [data-quiet]:focus-visible { text-decoration: underline; }
[data-quiet]:disabled { opacity: .5; cursor: default; text-decoration: none; }
[data-quiet] svg { width: 16px; height: 16px; flex: none; }
.hold-gestes .diapos.posees, .hold-gestes .envoyer { color: var(--texte); font-weight: 700; }
/* Dans une phrase, un mot sans marque est invisible : ces deux-là restent
   soulignés au repos. */
.hold-gestes .oui, .hold-gestes .non { text-decoration: underline; }

/* Les étiquettes d'une idée partagée : des matières, et le décompte en encre. */
.pastilles { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pastille {
  display: inline-flex; align-items: center; height: 28px; padding: 0 10px;
  border: 1px solid var(--bord-fort); border-radius: 999px;
  font-size: 13px; font-weight: 600; color: var(--gris-fort); background: var(--panneau);
}
.pastille.compte { border-color: transparent; background: var(--signal-pale); color: var(--signal); }

.vide {
  display: flex; flex-direction: column; align-items: flex-start; gap: 16px;
  color: var(--gris); text-align: left; padding: 32px; margin: 0;
  border: 1px dashed var(--bord-vif); border-radius: var(--rayon-md);
  font-size: 16px; line-height: 1.5;
}
.vide .vide-titre { color: var(--texte); }

/* ---------------------------------------------------------------------------
   Les superpositions : la fiche d'un cours, en volet depuis la droite
   --------------------------------------------------------------------------- */

.voile {
  position: fixed; inset: 0; z-index: 50;
  background: var(--voile-sombre);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  display: flex; justify-content: flex-end; align-items: stretch;
}

.panneau {
  background: var(--panneau); border: 1px solid var(--bord);
  border-radius: var(--rayon-lg); padding: 32px; position: relative;
  box-shadow: var(--ombre);
}
#voile-cours .panneau {
  width: min(720px, 100%); height: 100%; overflow-y: auto;
  margin-left: auto; border-radius: 0; border: 0; border-left: 1px solid var(--bord);
  padding: 24px 48px 56px; box-shadow: var(--ombre-forte);
  animation: glisser .3s cubic-bezier(.2,.8,.2,1) both;
}
@media (max-width: 760px) { #voile-cours .panneau { padding: 16px 16px 48px; } }

.fermer {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 16px; margin-bottom: 24px;
  background: var(--accent-pale); border: 0; border-radius: var(--rayon);
  color: var(--texte); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
.panneau h3 {
  font-family: var(--titre); font-variation-settings: "SOFT" 100;
  margin: 0 0 8px; font-size: 42px; line-height: 1.05; font-weight: 500; letter-spacing: -.02em;
  overflow-wrap: anywhere;
}
.panneau .meta { color: var(--gris); font-size: 14px; margin: 0 0 24px; font-variant-numeric: tabular-nums; }

/* Le résumé en tête : ce qu'on lit la veille d'un examen pour décider si on
   ouvre la fiche entière. En Fraunces, un cran plus grand que le texte. */
.resume-cours {
  margin: 0 0 24px; max-width: 62ch;
  font-family: var(--titre); font-variation-settings: "SOFT" 100;
  font-size: 19px; line-height: 1.5; font-weight: 400; color: var(--texte);
}

/* Les idées du cours, cliquables : des pilules. */
.idees { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.idees .idee {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
  background: var(--panneau); border: 1px solid var(--bord-fort); border-radius: 999px;
  font: inherit; font-size: 15px; font-weight: 600; color: var(--texte);
  cursor: pointer; box-shadow: var(--ombre-bord);
}
.idees .idee:hover { background: var(--panneau-fort); }
/* Combien de fois le professeur a dit cette notion : un indice, pas un verdict. */
.idee .combien-dit {
  margin-left: 8px; padding-left: 8px; border-left: 1px solid var(--bord-fort);
  font-size: 13px; font-weight: 500; color: var(--gris); font-variant-numeric: tabular-nums;
}

/* La chaîne de dépendance : ce sur quoi le cours s'appuie, et ce qui s'appuie
   sur lui. Un filet d'encre à gauche, comme les sources d'une réponse. */
.chaine {
  display: flex; flex-wrap: wrap; gap: 16px 40px;
  margin-bottom: 24px; padding: 4px 0 4px 16px; border-left: 2px solid var(--texte);
}
.brin { min-width: 12rem; flex: 1 1 14rem; }
.brin h4 { margin: 0 0 4px; font-size: 13px; font-weight: 600; color: var(--gris); }
.brin ul { margin: 0; padding: 0; list-style: none; }
.brin li { margin: 0; font-size: 15px; line-height: 1.5; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.vers-cours {
  min-height: 44px; display: inline-flex; align-items: center;
  background: none; border: 0; padding: 0; font: inherit; font-size: 15px; font-weight: 600;
  color: var(--texte); text-align: left; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px;
}
.vers-cours:hover { color: var(--gris-fort); }
/* Un prérequis nommé sans qu'on ait su le retrouver : lisible, pas cliquable. */
.mort { color: var(--gris); min-height: 44px; display: inline-flex; align-items: center; }
.quand { color: var(--gris); font-size: 13px; font-variant-numeric: tabular-nums; }

/* Les diapositives arrivées après le cours : une proposition, pas un reproche. */
.apres {
  display: flex; flex-direction: column; gap: 12px;
  margin-bottom: 24px; padding: 16px; border: 1px dashed var(--bord-vif); border-radius: var(--rayon-md);
}
.apres p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--texte); max-width: 62ch; }
.apres strong { color: var(--texte); font-weight: 600; }
.apres .depot { margin: 0; }
.apres-etat { font-size: 14px; }
.apres-etat.err { color: var(--err); }
.apres-etat.ok { font-weight: 600; }

/* La correction à la main, à la place de la fiche qu'on lisait : on corrige
   ce qu'on regarde, à l'endroit où l'on a vu la faute. */
.retoucher { display: flex; flex-direction: column; gap: 16px; margin: 0 0 24px; }
.retoucher-trois { display: flex; gap: 12px; flex-wrap: wrap; }
.retoucher-trois > label { flex: 1 1 11rem; }
.retoucher label { margin: 0; }
.retoucher label input, .retoucher label textarea { margin-top: 6px; }
/* La note est du Markdown : en chasse fixe, un tableau reste un tableau
   pendant qu'on le corrige. */
.retoucher textarea {
  font-family: var(--mono); font-size: 13px; line-height: 1.6;
  min-height: 14rem; resize: vertical;
}
.retoucher .boutons { align-items: center; margin-top: 0; }
.retoucher .etat { margin: 0; }

/* Le seul bouton de cette page qui détruit quelque chose. Gris tant qu'il
   n'est pas armé : un bouton rouge en permanence finit par ne plus se voir,
   et c'est au second clic qu'il doit arrêter la main. En `--err`, le rouge de
   texte — jamais le rouge de la touche Record. */
.secondaire.danger:hover { border-color: var(--err); color: var(--err); }
.secondaire.danger.arme {
  border-color: var(--err); color: var(--err); background: var(--err-pale);
}

.pied-cours {
  display: flex; align-items: center; justify-content: flex-start;
  gap: 12px 8px; flex-wrap: wrap;
  margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--bord);
}
.pied-cours .etat { margin-left: 4px; }
.raccourci { color: var(--gris); font-size: 13px; margin-left: auto; }
/* Sur un téléphone il n'y a pas de clavier. */
@media (max-width: 560px) { .raccourci { display: none; } }

/* La note rendue : c'est le produit, elle mérite de se lire. */
.note { font-size: 16px; line-height: 1.65; color: var(--texte); max-width: 62ch; }
.note p { margin: 0 0 14px; }
.note h2 {
  font-size: 24px; line-height: 1.15; margin: 32px 0 10px; letter-spacing: -.02em;
}
.note h3 {
  font-family: var(--titre); font-variation-settings: "SOFT" 100;
  font-size: 18px; line-height: 1.3; font-weight: 500; margin: 24px 0 6px; letter-spacing: -.01em;
}
/* Claude descend jusqu'au niveau 4 pour les sous-sections. */
.note h4 { font-size: 13px; font-weight: 600; color: var(--gris); margin: 18px 0 4px; }
.note ul, .note ol { padding-left: 22px; margin: 0 0 14px; }
.note ol { font-variant-numeric: tabular-nums; }
.note li { margin-bottom: 5px; }
.note strong { color: var(--texte); }

/* Les tableaux : un bilan, un compte de résultat — ce que les cours de gestion
   produisent le plus. Des filets, et des chiffres alignés. */
.note table {
  width: 100%; border-collapse: collapse; margin: 16px 0;
  font-size: 14px; font-variant-numeric: tabular-nums;
  display: block; overflow-x: auto;
}
.note thead th {
  text-align: left; font-size: 13px; font-weight: 600; color: var(--gris);
  padding: 8px 12px; border-bottom: 1px solid var(--bord-fort); white-space: nowrap;
}
.note tbody td { padding: 8px 12px; border-bottom: 1px solid var(--bord); vertical-align: top; }
.note tbody tr:last-child td { border-bottom: none; }
/* L'alignement demandé par la note elle-même (`|---:|`). */
.note th.dr, .note td.dr { text-align: right; }
.note th.ct, .note td.ct { text-align: center; }

.note blockquote {
  margin: 16px 0; padding: 2px 0 2px 16px;
  border-left: 2px solid var(--bord-vif); color: var(--gris-fort);
}
.note hr { border: none; border-top: 1px solid var(--bord); margin: 24px 0; }
.note a { color: var(--texte); }
.note code {
  background: var(--panneau-fort); border: 1px solid var(--bord);
  border-radius: var(--rayon-xs); padding: 1px 6px; font-size: .9em; font-family: var(--mono);
}
/* === /region === */

/* === region: cerveau === */
/* ---------------------------------------------------------------------------
   Le second cerveau
   --------------------------------------------------------------------------- */

.scene { position: relative; }
#graphe {
  display: block; width: 100%;
  height: clamp(360px, 56vh, 620px);
  background: var(--graphe-fond); border: 1px solid var(--bord);
  border-radius: var(--rayon-lg); box-shadow: var(--ombre);
  cursor: grab; touch-action: none;
}
#graphe.attrape { cursor: grabbing; }

/* La légende : une ligne discrète sous la toile, pas dessus. */
.legende {
  display: flex; gap: 16px; flex-wrap: wrap; align-items: center;
  margin: 12px 0 0; padding: 0 4px;
  font-size: 13px; color: var(--gris); line-height: 1.5;
}
.legende span { display: inline-flex; align-items: center; gap: 6px; }
.legende .pt { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.legende .pt.cours  { background: var(--graphe-cours); width: 10px; height: 10px; }
.legende .pt.notion { background: var(--graphe-notion); }
.legende .pt.pont   { background: var(--graphe-pont); box-shadow: 0 0 0 2px var(--panneau), 0 0 0 3px var(--graphe-pont); }

/* La ligne sous l'image : ce qu'on peut y faire à gauche, « Reset view » à
   droite. En texte, et hors de la toile : un bouton posé sur la carte cachait
   un bout de la carte, et se disputait l'attention avec elle. */
.sous-graphe {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 8px 24px; margin-top: 4px;
}
.sous-graphe .aide { margin: 0; flex: 1 1 280px; }

.infobulle {
  position: absolute; pointer-events: none; z-index: 3;
  background: var(--panneau); border: 1px solid var(--bord);
  border-radius: var(--rayon); padding: 8px 12px; max-width: 17rem;
  font-size: 14px; line-height: 1.45; color: var(--texte);
  box-shadow: var(--ombre-forte);
  transform: translate(-50%, -125%);
}
.infobulle .t { font-weight: 600; display: block; }
.infobulle .s { color: var(--gris); font-size: 13px; }

.vide-scene {
  position: absolute; left: 0; right: 0; top: 0; height: clamp(360px, 56vh, 620px);
  margin: 0; display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 32px; color: var(--gris); font-size: 16px;
}

/* Les idées partagées, en rangées : le nom, puis ses matières et son compte
   sur une ligne grise — le même dessin que les rangées de la bibliothèque.
   En pastilles, les matières pesaient autant que le nom de l'idée, qui est
   pourtant ce qu'on lit en premier. */
/* `.pont` était déjà pris : c'est la pastille de la légende du graphe. Une
   classe, une chose — sinon la pastille hérite d'un `min-height: 56px` et
   devient une olive. */
.croisement {
  display: flex; flex-direction: column; justify-content: center; gap: 2px;
  border-top: 1px solid var(--bord); padding: 12px 0; min-height: 56px;
}
.croisement:first-child { border-top: 0; }
.croisement .nom { font-size: 15px; font-weight: 600; min-width: 0; }
/* === /region === */

/* ---------------------------------------------------------------------------
   L'aperçu flouté : la révision, et « Ask » le temps d'être bon
   ---------------------------------------------------------------------------
   Le flou doit laisser passer la **forme** et retenir les mots : on reconnaît
   une pile de cartes, une matière, un chiffre — et on ne lit rien. 6 px sur du
   texte de 15 px est le point où les mots se défont en gardant leur rythme.
   Les cartes sous le flou sont faites des vraies notions du compte. */
.apercu {
  position: relative; overflow: hidden;
  height: 416px; border-radius: var(--rayon-md);
  border: 1px solid var(--bord); background: var(--panneau);
  box-shadow: var(--ombre);
}
.apercu-fond {
  position: absolute; inset: 0; padding: 24px;
  display: flex; flex-direction: column; gap: 12px;
  filter: blur(6px) saturate(.9);
  /* Rien ici ne se clique, ne se sélectionne et ne se lit à voix haute : ce
     sont des mots qu'on ne doit pas pouvoir récupérer. */
  pointer-events: none; user-select: none;
  /* Un peu agrandi : le flou éclaircit les bords, et sans ce débord on verrait
     la bordure floue du bloc au lieu d'un fond qui continue. */
  transform: scale(1.04);
}
/* Les cartes s'effacent vers le bas : la pile continue hors du cadre. */
.apercu-fond::after {
  content: ""; position: absolute; inset: auto 0 0; height: 160px;
  background: linear-gradient(transparent, var(--panneau));
}
.carte-revision {
  flex: none; padding: 16px 20px;
  border: 1px solid var(--bord); border-radius: var(--rayon);
  background: var(--panneau-fort);
}
.carte-revision .ou { display: block; font-size: 13px; font-weight: 600; color: var(--gris); }
.carte-revision h4 {
  margin: 4px 0; font-family: var(--titre); font-variation-settings: "SOFT" 100;
  font-size: 20px; line-height: 1.15; font-weight: 500; letter-spacing: -.02em;
}
.carte-revision p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--gris); }
.carte-revision .combien-dit {
  display: inline-block; margin-top: 8px; font-size: 13px; color: var(--gris);
  font-variant-numeric: tabular-nums;
}

/* La plaque, elle, est nette : une carte blanche posée au milieu du flou, la
   seule chose à lire. */
.apercu-plaque {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%;
  width: min(26rem, calc(100% - 48px));
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  text-align: center; padding: 28px 24px;
  background: var(--panneau); border: 1px solid var(--bord);
  border-radius: var(--rayon-md); box-shadow: var(--ombre-forte);
}
.apercu-plaque p { margin: 0; max-width: 24rem; font-size: 15px; line-height: 1.5; color: var(--gris); }
/* « Coming soon » : un jeton d'encre, sans capitales. */
.bientot {
  display: inline-flex; align-items: center; height: 28px; padding: 0 12px;
  border-radius: 999px; background: var(--texte); color: var(--sur-accent);
  font-size: 13px; font-weight: 600;
}

/* === region: demander === */
/* ---------------------------------------------------------------------------
   Demander à ses cours
   ---------------------------------------------------------------------------
   Pas une messagerie : une page de notes citées. La boîte d'abord, puis le
   fil, le plus récent en haut. La question est un titre, la réponse du texte,
   et les cours utilisés une liste de notes en bas, le long d'un filet d'encre.
   Les valeurs sont celles de la maquette Ask.dc.html. */

/* La carte de la conversation (et celle du palier, à sa place). */
.conversation {
  display: flex; flex-direction: column; gap: 16px;
  padding: 32px; margin: 0 0 24px;
  background: var(--panneau); border: 1px solid var(--bord);
  border-radius: var(--rayon-lg); box-shadow: var(--ombre);
}
#demander-palier { align-items: flex-start; gap: 12px; }
.palier-titre {
  margin: 0; font-family: var(--titre); font-variation-settings: "SOFT" 100;
  font-size: 24px; line-height: 1.15; font-weight: 500; letter-spacing: -.02em;
}
.palier-texte { margin: 0; font-size: 16px; line-height: 1.5; color: var(--gris); max-width: 62ch; }
/* Un principal qui ne prend que sa place : « Compare plans », « Record a lecture ». */
.conversation .principal.large { width: auto; min-height: 48px; padding: 0 24px; margin-top: 4px; }

/* La rangée du haut : la boîte, et « New conversation » à sa droite. */
.demande-rangee {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end;
  gap: 8px 16px;
}
/* La barre de question : un champ dans un cadre de 56 px, le bouton dedans. */
.demande {
  flex: 1 1 320px; min-width: 0;
  display: flex; align-items: center; gap: 8px;
  height: 56px; padding: 3px 3px 3px 20px; margin: 0;
  background: var(--panneau); border: 1px solid var(--bord-fort); border-radius: var(--rayon);
  box-shadow: inset 2px 2px 6px rgba(15,15,15,.08);
}
.demande input, .demande input[type="text"] {
  flex: 1; min-width: 0; min-height: 46px; height: 46px; padding: 0; margin: 0;
  border: 0; background: transparent; box-shadow: none; font-size: 16px; color: var(--texte);
}
.demande input:focus { border-color: transparent; }
/* L'anneau de focus est porté par la barre entière (`:focus-within`), pas par
   le champ sans bord qu'elle contient : deux anneaux l'un dans l'autre. */
.demande input:focus-visible { outline: none; }
.demande:focus-within { border-color: var(--texte); }
.demande .principal {
  width: auto; flex: none; height: 48px; min-height: 48px; min-width: 104px;
  padding: 0 20px; font-size: 15px;
}
/* Éteint, il reste de l'encre à .6 : un bouton gris dans une barre blanche
   ressemble à un champ de plus. */
.demande .principal:disabled {
  background: var(--accent); color: var(--sur-accent); box-shadow: var(--ombre-encre);
  opacity: .6;
}
.nouvelle-discussion {
  flex: none; min-height: 44px; padding: 0 4px;
  background: none; border: 0; font: inherit; font-size: 14px; font-weight: 600;
  color: var(--gris); text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.nouvelle-discussion:hover { color: var(--texte); }

/* « Try one: » et les quatre questions en pilules. */
.essais { display: flex; flex-direction: column; gap: 8px; }
.essais-titre { font-size: 13px; font-weight: 600; color: var(--gris); }
.essais-liste { display: flex; flex-wrap: wrap; gap: 8px; }
.essai {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px; max-width: 100%; padding: 8px 14px 8px 18px;
  border-radius: 999px; border: 1px solid var(--bord-fort); background: var(--panneau);
  font: inherit; font-size: 15px; line-height: 1.3; font-weight: 600; color: var(--texte);
  text-align: left; cursor: pointer; box-shadow: var(--ombre-bord);
}
.essai > span { min-width: 0; }
.essai svg { flex: none; color: var(--gris); transition: translate .18s cubic-bezier(.2,.8,.2,1); }
.essai:hover svg { translate: 2px -2px; }

/* Sans cours : la boîte est fermée et dit pourquoi. */
.demander-vide {
  display: flex; flex-direction: column; align-items: flex-start; gap: 12px;
  max-width: 62ch; padding-top: 8px;
}
.vide-titre {
  margin: 0; font-family: var(--titre); font-variation-settings: "SOFT" 100;
  font-size: 24px; line-height: 1.15; font-weight: 500; letter-spacing: -.02em;
}
.vide-texte { margin: 0; font-size: 16px; line-height: 1.5; color: var(--gris); }

/* Le fil : les échanges, séparés d'un filet et de 32 px, le dernier en haut. */
.fil { display: flex; flex-direction: column; gap: 32px; margin: 0; }
.fil.pleine { margin-top: 8px; }
.echange {
  display: flex; flex-direction: column; gap: 16px;
  padding-top: 32px; border-top: 1px solid var(--bord);
}
.echange[data-echange="new"] { animation: demander-arrivee .32s cubic-bezier(.2,.8,.2,1) both; }
.tour-texte { margin: 0; white-space: pre-wrap; line-height: 1.6; }

/* La question de l'étudiant : un titre, sans bulle. */
.tour.mien .tour-texte {
  font-family: var(--titre); font-variation-settings: "SOFT" 100;
  font-size: 26px; line-height: 1.2; font-weight: 500; letter-spacing: -.02em;
  color: var(--texte);
}

/* « Reading your lectures… » : les cours cités s'allument un à un, et le trait
   avance en attendant, puis finit sa course quand la réponse est là. */
.lecture { display: flex; flex-direction: column; gap: 12px; max-width: 62ch; }
.lecture-mot { margin: 0; font-size: 15px; line-height: 1.5; color: var(--gris); }
.lecture-cours { display: flex; flex-wrap: wrap; gap: 8px; }
.lecture-cours:empty { display: none; }
.lecture-tag {
  display: inline-flex; align-items: center; gap: 8px; height: 28px;
  padding: 0 12px 0 10px; border-radius: 999px;
  border: 1px solid var(--texte); background: var(--accent-pale); color: var(--texte);
  max-width: 100%; font-size: 13px; font-weight: 600; white-space: nowrap;
  animation: demander-allume .3s cubic-bezier(.2,.8,.2,1) both;
}
/* Un titre plus long que l'écran se coupe en points de suspension plutôt que
   de sortir de la carte. */
.lecture-tag > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.lecture-point {
  display: block; width: 6px; height: 6px; border-radius: 999px;
  border: 1px solid currentColor; background: var(--texte);
  animation: demander-point .3s cubic-bezier(.2,.8,.2,1) both; animation-delay: inherit;
}
.lecture-piste { height: 2px; border-radius: 4px; background: rgba(15,15,15,.08); overflow: hidden; }
.lecture-trait {
  height: 2px; background: var(--texte); transform-origin: left center;
  scale: .7 1; animation: demander-trait 1.2s linear both;
  transition: scale .4s cubic-bezier(.2,.8,.2,1);
}
.lecture-trait.pleine { scale: 1 1; animation: none; }

/* La réponse qui arrive, quelques mots à la fois, un curseur au bout. */
.diffusion { display: flex; flex-direction: column; gap: 12px; max-width: 62ch; }
.diffusion p { margin: 0; font-size: 16px; line-height: 1.65; }
.curseur {
  display: inline-block; width: 2px; height: 1em; margin-left: 3px;
  vertical-align: -.15em; background: var(--texte);
  animation: demander-curseur 1s steps(1) infinite;
}

/* La réponse : du texte, à la largeur d'une colonne de lecture. */
.tour.sien { max-width: 62ch; }
.tour-mis-en-forme {
  white-space: normal; font-size: 16px; line-height: 1.65;
}
.tour-mis-en-forme > :first-child { margin-top: 0; }
.tour-mis-en-forme > :last-child { margin-bottom: 0; }
.tour-mis-en-forme p { margin: 0 0 12px; }
.tour-mis-en-forme h2 { font-size: 20px; margin: 20px 0 6px; }
.tour-mis-en-forme h3 { font-size: 17px; margin: 16px 0 4px; }
.tour-mis-en-forme hr { margin: 16px 0; }
.tour-mis-en-forme table { font-size: 14px; margin: 12px 0; }

/* Les cours d'où vient la réponse : des notes de bas de page, un filet d'encre.
   Elles glissent en place une fois le texte entier, 60 ms l'une après l'autre. */
.sources { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.sources-titre { font-size: 13px; font-weight: 600; color: var(--gris); }
.sources ol {
  margin: 0; padding: 0 0 0 14px; list-style: none;
  border-left: 2px solid var(--texte); display: flex; flex-direction: column;
}
.sources li { display: flex; }
.sources li[data-src="in"] { animation: demander-glisse .3s cubic-bezier(.2,.8,.2,1) both; }
.source {
  display: inline-flex; flex-wrap: wrap; align-items: baseline; align-content: center;
  gap: 0 8px; min-height: 44px; padding: 0;
  background: none; border: 0; font: inherit; color: var(--texte);
  text-align: left; cursor: pointer;
}
.source-titre { font-size: 15px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.source-quand { font-size: 13px; color: var(--gris); }
.source:hover .source-titre { color: var(--gris-fort); }

/* L'échange qui a échoué : un « ! » et la phrase, sous la question. */
.echec { display: flex; align-items: flex-start; gap: 12px; max-width: 62ch; }
.echec svg { flex: none; margin-top: 2px; color: var(--texte); }
.echec p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--texte); }

/* La limite, dite une fois, dans un cadre tireté. */
.limite {
  display: flex; flex-direction: column; gap: 8px;
  border: 1.5px dashed var(--bord-vif); border-radius: var(--rayon-md);
  padding: 24px; margin-top: 0; max-width: 62ch;
}
.limite .rubrique { margin: 0; font-size: 15px; line-height: 1.5; }
.limite .aide { color: var(--texte); font-size: 15px; margin: 0; }

/* Le mouvement de l'écran : l'échange descend de 8 px en arrivant, les cours
   passent du gris à l'encre, le trait s'étire, le curseur bat, les sources
   glissent de la gauche. La règle `prefers-reduced-motion` de la feuille
   coupe tout ; les états de fin sont écrits dans les règles, donc sans
   animation on voit les cours allumés et le trait plein. */
@keyframes demander-arrivee { from { opacity: 0; translate: 0 -8px; } }
@keyframes demander-allume {
  from { color: var(--gris); border-color: var(--bord-fort); background-color: var(--panneau); }
}
@keyframes demander-point { from { background-color: transparent; } }
@keyframes demander-trait { from { scale: 0 1; } }
@keyframes demander-curseur { 50% { opacity: 0; } }
@keyframes demander-glisse { from { opacity: 0; translate: -6px 0; } }

@media (max-width: 560px) {
  .conversation { padding: 20px; border-radius: var(--rayon-md); }
  .demande { height: auto; flex-wrap: wrap; padding: 3px; }
  .demande input, .demande input[type="text"] { padding: 0 16px; }
  .demande .principal { width: 100%; }
  .tour.mien .tour-texte { font-size: 22px; }
  .limite { padding: 20px; }
}

/* Visible pour un lecteur d'écran, pas à l'œil. */
.sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
/* === /region === */

/* === region: compte === */
/* ---------------------------------------------------------------------------
   Le compte
   --------------------------------------------------------------------------- */

.salutation {
  font-family: var(--titre); font-variation-settings: "SOFT" 100;
  font-size: 42px; line-height: 1.05; font-weight: 500; letter-spacing: -.02em;
  margin: 0 0 8px;
}
.briefing { color: var(--gris); font-size: 16px; line-height: 1.5; margin: 0 0 8px; max-width: 62ch; }
.attention {
  color: var(--texte); font-size: 15px; line-height: 1.5; margin: 0 0 8px; max-width: 62ch;
  background: var(--rouge-pale); border-radius: var(--rayon); padding: 10px 16px;
}

/* Ce qui reste, en gros, et la règle graduée dessous. */
.heures-titre {
  margin: 0; font-family: var(--titre); font-variation-settings: "SOFT" 0;
  font-size: 42px; font-weight: 500; line-height: 1.05; letter-spacing: -.025em;
  font-variant-numeric: tabular-nums;
}
.heures-titre.basse { color: var(--err); }
.heures-sous { margin: 6px 0 16px; font-size: 13px; color: var(--gris); }

/* Cent traits pour cent heures, sur un filet. Les traits consommés en encre,
   ceux qui restent pâles ; un trait haut tous les dix, pour compter. */
.regle {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 1px; height: 20px; margin: 0 0 16px;
  border-bottom: 1px solid var(--bord-fort);
}
.regle .trait {
  flex: 1 1 0; min-width: 1px; max-width: 2px;
  height: 8px; background: var(--bord-fort);
}
.regle .trait.haut { height: 14px; }
.regle .trait.fait { background: var(--texte); }

.boutons-forfait { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.boutons-forfait a.secondaire { text-decoration: none; }

.forfaits { margin: 24px 0 16px; }
.bascule-periode { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }

/* Les paliers : des rangées, séparées par des filets. L'heure décide, pas
   l'euro, donc les heures sont en grand. */
.paliers { display: flex; flex-direction: column; }
.palier {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "nom heures" "detail prix";
  align-items: baseline; column-gap: 16px; row-gap: 2px;
  width: 100%; min-height: 64px; padding: 12px 0; text-align: left;
  background: none; border: 0; border-top: 1px solid var(--bord);
  font: inherit; color: var(--texte); cursor: pointer; border-radius: 0;
}
.palier:hover { background: var(--panneau-fort); }
.palier.actif, .palier[aria-pressed="true"] { box-shadow: inset 2px 0 0 var(--texte); padding-left: 12px; font-weight: 700; }
.palier-nom { grid-area: nom; font-size: 15px; font-weight: 600; }
.palier-heures {
  grid-area: heures; justify-self: end;
  font-family: var(--titre); font-variation-settings: "SOFT" 100;
  font-size: 24px; line-height: 1.15; font-weight: 500; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.palier-prix { grid-area: prix; justify-self: end; font-size: 15px; font-variant-numeric: tabular-nums; }
.palier-detail { grid-area: detail; font-size: 13px; color: var(--gris); }

/* La promotion de lancement. Le tarif normal reste écrit, barré : un prix
   d'appel seul ne dit pas ce qu'on économise. */
.palier-prix s {
  color: var(--gris); font-weight: 400; margin-right: 6px;
  text-decoration-thickness: 1px;
}
.palier.en-promo .palier-prix { font-weight: 700; }
/* Le bandeau, au-dessus des paliers : une rangée blanche, calme, qui dit une
   date — une échéance qu'on peut noter fait agir. */
.promo {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px;
  margin: 0 0 16px; padding: 10px 16px;
  background: var(--panneau); border: 1px solid var(--bord);
  border-radius: var(--rayon); box-shadow: var(--ombre-bord);
  font-size: 14px; line-height: 1.5; color: var(--texte);
}
.promo-marque {
  flex: none; display: inline-flex; align-items: center; height: 28px; padding: 0 10px;
  border-radius: 999px; background: var(--texte); color: var(--sur-accent);
  font-size: 12px; font-weight: 600;
}

/* Le parrainage : un seul chiffre, très grand — celui des abonnés. */
.parrainage {
  display: flex; align-items: center; gap: 24px 40px; flex-wrap: wrap;
  background: var(--panneau); border: 1px solid var(--bord);
  border-radius: var(--rayon-md); padding: 24px; margin-bottom: 16px;
  box-shadow: var(--ombre);
}
.compteur { display: flex; align-items: baseline; gap: 12px; flex: none; }
.enorme {
  font-family: var(--titre); font-variation-settings: "SOFT" 0, "opsz" 144;
  font-size: 42px; line-height: 1.05; font-weight: 500; letter-spacing: -.02em;
  color: var(--texte); font-variant-numeric: tabular-nums;
}
/* `.legende` existait déjà pour celle du graphe : un nom pour une chose. */
.compteur .legende-parrain { color: var(--gris); font-size: 14px; max-width: 9rem; line-height: 1.35; }
.parrain-lien { flex: 1 1 18rem; min-width: 0; }
.parrain-lien .rangee { display: flex; gap: 8px; }
.parrain-lien input { flex: 1; min-width: 0; font-family: var(--mono); font-size: 13px; }
.parrain-lien .aide { margin-top: 8px; }
@media (max-width: 560px) { .compteur .legende-parrain { max-width: none; } }

/* Le programme partenaire. Trois chiffres côte à côte — en colonne sur un
   téléphone, où un partenaire regarde ce qu'il a amené — puis les paliers en
   rangées séparées d'un filet, et le message prêt à envoyer. */
.chiffres-partenaire {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 16px; margin: 16px 0 8px;
}
@media (max-width: 520px) { .chiffres-partenaire { grid-template-columns: 1fr; gap: 12px; } }
.chiffre-partenaire { display: flex; flex-direction: column; gap: 2px; }
.chiffre-partenaire .enorme { line-height: 1.05; }
.chiffre-partenaire .k { font-size: 13px; font-weight: 600; color: var(--gris); }
.chiffre-partenaire .aide { margin: 0; font-size: 13px; }
.paliers-partenaire { display: flex; flex-direction: column; margin: 8px 0 16px; }
.palier-partenaire {
  display: flex; align-items: center; gap: 12px;
  min-height: 48px; margin: 0; padding: 8px 0; border-top: 1px solid var(--bord);
  font-size: 14px; line-height: 1.5; color: var(--gris);
}
.palier-partenaire:first-child { border-top: 0; }
.palier-partenaire .jeton {
  flex: none; min-width: 40px; justify-content: center; font-variant-numeric: tabular-nums;
}
/* Un palier atteint se lit sans qu'on compare les nombres. */
.palier-partenaire.fait { color: var(--texte); font-weight: 600; }
.partenaire .aide { margin-bottom: 16px; }
.partenaire label { display: block; margin-top: 8px; }
.partenaire textarea { margin-top: 8px; color: var(--texte); font-size: 14px; }
#copier-texte-partenaire { margin-top: 12px; }

/* Le formulaire de candidature, sur la page publique des partenaires. Une
   aide suivie du champ suivant : sans cette marge, on la lit comme son
   intitulé. */
#formulaire-partenaire > label { margin-top: 16px; }
#formulaire-partenaire .aide { margin-bottom: 16px; }
#formulaire-partenaire .principal { margin-top: 24px; }

.ligne-email { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; margin: 0 0 12px; font-size: 15px; overflow-wrap: anywhere; }
.etiquette {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--gris);
}
/* Confirmée : en encre, avec un point devant. */
.etiquette.ok { color: var(--texte); }
.etiquette.ok::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--texte); }

#formulaire-compte .deux { margin-bottom: 12px; }
#formulaire-compte .secondaire.mince { margin-top: 4px; }
/* === /region === */

/* === region: claude === */
/* ---------------------------------------------------------------------------
   L'onglet Connect — brancher une IA
   --------------------------------------------------------------------------- */

/* La phrase à coller : un bloc de chasse fixe, le bouton Copier à côté. */
.essaie {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px;
  background: var(--panneau-fort); border: 1px solid var(--bord);
  border-radius: var(--rayon); padding: 8px 8px 8px 16px; margin-top: 8px;
}
.essaie code {
  flex: 1 1 240px; font-family: var(--mono); font-size: 14px; line-height: 1.5;
  color: var(--texte); white-space: pre-wrap; background: none; padding: 4px 0;
  min-width: 0; overflow-wrap: anywhere;
}
.essaie .principal, .essaie .secondaire { flex: none; min-width: 104px; }
.essaie:not(:has(button)):has(> code:empty) { display: none; }
.aide.reussi { color: var(--texte); }
/* Le refus d'un paiement, écrit sous les paliers plutôt que dans le bandeau
   du haut — c'est là qu'on vient de cliquer. */
.aide.refus { color: var(--err); font-weight: 600; }

#url-connecteur, #url-lecture { font-family: var(--mono); font-size: 13px; }
.etiquette-petite { display: block; font-size: 13px; font-weight: 600; color: var(--gris); margin: 16px 0 8px; }

/* Les chemins longs, repliés : des rubriques séparées par des filets. */
.repli { border-top: 1px solid var(--bord); padding: 0; margin: 0; }
.repli:last-of-type { border-bottom: 1px solid var(--bord); }
.repli > summary {
  display: flex; align-items: center; gap: 12px;
  min-height: 56px; padding: 8px 0; cursor: pointer; list-style: none;
  font-size: 15px; font-weight: 600; color: var(--texte);
}
.repli > summary::-webkit-details-marker { display: none; }
/* Un chevron dessiné, pas un glyphe. */
.repli > summary::before {
  content: ""; flex: none; width: 8px; height: 8px; margin: 0 4px 0 2px;
  border-right: 2px solid var(--texte); border-bottom: 2px solid var(--texte);
  transform: rotate(-45deg); transition: transform .2s;
}
.repli[open] > summary::before { transform: rotate(45deg); }
.repli > *:not(summary) { margin-left: 26px; }
.repli > input { width: calc(100% - 26px); }
@media (max-width: 560px) {
  .repli > *:not(summary) { margin-left: 0; }
  .repli > input { width: 100%; }
}
.repli > *:last-child { margin-bottom: 20px; }
.repli > .aide:first-of-type { margin-top: 0; }

.rangee-export { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 12px 0 4px; }
.rangee-export select { width: auto; flex: 1 1 11rem; min-width: 0; }

/* La liste numérotée des étapes. */
.etapes { list-style: none; counter-reset: etape; padding: 0; margin: 0; }
.etapes li {
  counter-increment: etape; position: relative;
  padding-left: 28px; margin-bottom: 10px; font-size: 14px; line-height: 1.5;
}
.etapes li::before {
  content: counter(etape) ".";
  position: absolute; left: 0; top: 0; font-weight: 600; color: var(--gris);
  font-variant-numeric: tabular-nums;
}
/* La même liste, sans les numéros. « Ce que tu reçois » n'est pas une suite
   d'étapes : un point d'encre, dessiné. */
.etapes.sans-ordre li::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  top: .55em; left: 4px; background: var(--texte);
}
/* Les pages publiques (about, alternatives, partners, lecture-notes) : des
   rubriques et des paragraphes à la suite, directement dans `main`. C'est du
   texte à lire, un cran au-dessus de l'aide d'un formulaire. */
main.wrap > .aide, main.wrap > .etapes li { font-size: 15px; }
main.wrap > .aide { margin-top: 12px; }
main.wrap > .etapes { margin-top: 12px; }
main.wrap > .etapes li { margin-bottom: 12px; }
ul.aide { padding-left: 20px; }
ul.aide li { margin-bottom: 6px; }

/* Les réglages (administration) et les cookies (confidentialité). */
.outils { list-style: none; padding: 0; margin: 0; }
.outils li { padding: 10px 0; border-bottom: 1px solid var(--bord); line-height: 1.5; font-size: 14px; }
.outils li:last-child { border-bottom: 0; }
.outils code {
  display: inline-block; background: var(--panneau-fort); color: var(--texte);
  border-radius: var(--rayon-xs); padding: 1px 8px; margin-right: 8px;
  font-family: var(--mono); font-size: 13px; text-indent: 0;
}
/* Deux colonnes sans découper la phrase : un retrait suspendu. La pastille
   occupe la première colonne, le texte continue à droite et y reste. */
@media (min-width: 620px) {
  .outils li { padding-left: 13rem; text-indent: -13rem; }
  .outils code { width: calc(13rem - 12px); margin-right: 12px; vertical-align: baseline; }
}
/* === /region === */

/* ---------------------------------------------------------------------------
   La matière, en pastilles
   ---------------------------------------------------------------------------
   Une seule spécification de pastille, celle de la maquette : 44 de haut,
   15/600, blanche, filet .12 ; choisie, elle passe à l'encre. Le monogramme
   la rend reconnaissable sans la lire — on cherche « Micro » par sa forme
   plus que par son mot. */
/* Le mot « Subject » : un libellé qui n'est pas un `<label>`, parce qu'il
   nomme un groupe de boutons et non un champ. Même dessin que les autres. */
.libelle {
  display: block; margin-bottom: 8px;
  font-size: 15px; font-weight: 600; color: var(--texte);
}
.matieres { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
.pastille-matiere {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 14px;
  border-radius: var(--rayon); border: 1px solid var(--bord-fort);
  background: var(--panneau); color: var(--texte);
  font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
  box-shadow: var(--ombre-bord);
}
.pastille-matiere .mono {
  flex: none; width: 22px; height: 22px; border-radius: 6px;
  border: 1px solid var(--bord-vif);
  font-family: var(--titre); font-size: 12px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.pastille-matiere[aria-pressed="true"] {
  background: var(--texte); color: var(--sur-accent);
  border-color: var(--texte); box-shadow: var(--ombre-encre);
}
.pastille-matiere[aria-pressed="true"] .mono { border-color: rgba(255,255,255,.35); }
/* La croix de la pastille choisie : 44 au doigt, mais dessinée petite. */
.pastille-matiere .croix {
  flex: none; display: flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; margin-right: -4px;
}
.pastille-matiere .croix svg { width: 14px; height: 14px; }
/* « New » : un plus, puis le mot. Même hauteur que les autres, filet tireté
   pour dire que c'est une case à remplir et non une matière. */
.pastille-matiere.neuve {
  border-style: dashed; border-color: var(--bord-vif); box-shadow: none;
  font-weight: 600; color: var(--gris-fort);
}
.pastille-matiere.neuve svg { width: 16px; height: 16px; }
.matiere-neuve { display: flex; gap: 8px; margin: 8px 0 4px; }
.matiere-neuve[hidden] { display: none; }
.matiere-neuve input { flex: 1 1 auto; min-width: 0; }
.matiere-neuve .secondaire { flex: none; min-height: 48px; }

/* ---------------------------------------------------------------------------
   Le fil des trois temps : Record · Details · Send
   ---------------------------------------------------------------------------
   Centré au-dessus de l'écran, comme la maquette. Les pastilles se remplissent
   d'encre à mesure ; celle de l'étape en cours porte un halo pour qu'on la
   distingue d'une étape franchie sans compter les points. */
.fil-temps {
  list-style: none; margin: 0 0 20px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  gap: 0; flex-wrap: nowrap;
}
.fil-temps li {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 500; color: var(--gris);
  min-width: 0;
}
/* Le trait entre deux temps. Sur l'élément et non entre eux : un pseudo
   `::after` sur le dernier laisserait un trait qui ne mène nulle part. */
.fil-temps li + li::before {
  content: ""; flex: 0 1 44px; width: 44px; height: 1px; min-width: 10px;
  background: var(--bord-fort); margin: 0 10px;
}
.fil-temps .point {
  flex: none; width: 9px; height: 9px; border-radius: 999px;
  border: 1.5px solid var(--bord-vif); background: transparent;
  transition: background-color .22s ease, border-color .22s ease, box-shadow .22s ease;
}
/* Les mots ne se coupent jamais : il y en a trois, ils sont courts, et
   « De… » ne veut rien dire. C'est le trait qui cède quand la place manque. */
.fil-temps .mot { flex: none; white-space: nowrap; }
/* Franchi : la pastille est pleine, le mot reprend de l'encre. */
.fil-temps li.fait .point { background: var(--texte); border-color: var(--texte); }
.fil-temps li.fait { color: var(--gris-fort); }
/* En cours : pleine aussi, et cerclée — c'est le seul endroit où l'œil doit
   s'arrêter. */
.fil-temps li[aria-current="step"] { color: var(--texte); font-weight: 700; }
.fil-temps li[aria-current="step"] .point {
  background: var(--texte); border-color: var(--texte);
  box-shadow: 0 0 0 4px var(--accent-pale);
}
@media (max-width: 420px) {
  .fil-temps li + li::before { flex-basis: 16px; margin: 0 6px; }
  .fil-temps li { font-size: 12px; }
}

/* === region: attente === */
/* ---------------------------------------------------------------------------
   Les enregistrements gardés en attente — la pastille, le volet, les fiches
   ---------------------------------------------------------------------------
   Après les écrans, pour l'emporter sur leurs règles à spécificité égale
   (`.ligne`, `.carte`). */

/* La pastille se pose à gauche du dock, et se centre sur lui : le dock fait
   78 de haut, la pastille 62, d'où les 8 px de plus que les 24 du dock. */
.attente {
  position: fixed; z-index: 41;
  bottom: calc(32px + env(safe-area-inset-bottom, 0px));
  right: calc(50% + min(660px, 100vw - 32px) / 2 + 14px);
}
.attente[hidden] { display: none; }

/* Tiretée, et blanche opaque. Le tireté dit « posé là, pas fini » — c'est le
   même trait que la zone de dépôt d'un fichier. Opaque et non voilée comme le
   dock : elle passe devant le contenu, qui défile sous elle. */
.attente-pastille {
  height: 62px; padding: 0 12px 0 18px;
  border-radius: 999px; border: 1.5px dashed var(--bord-vif);
  background: var(--panneau);
  display: flex; align-items: center; gap: 10px;
  font: inherit; font-size: 15px; font-weight: 600; color: var(--texte);
  cursor: pointer; box-shadow: var(--ombre-forte);
  transition: transform .28s cubic-bezier(.2,.8,.2,1), filter .12s;
}
.attente-pastille svg { flex: none; width: 20px; height: 20px; }
/* Le compte, jamais en rouge. Un cours mis de côté n'est pas une alerte : il
   attend parce que l'étudiant l'a voulu. */
.attente-compte {
  min-width: 28px; height: 28px; padding: 0 9px; box-sizing: border-box;
  border-radius: 999px; background: var(--accent-pale); color: var(--texte);
  font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums;
  display: flex; align-items: center; justify-content: center;
}
/* Le sursaut quand un cours vient d'être mis de côté : l'écran a changé
   ailleurs, et c'est ici que la chose a atterri. */
.attente-pastille.saute { transform: scale(1.06); }

/* Le volet s'aligne sur le bord **gauche** de la pastille, jamais sur le
   droit. Aligné à droite, il part vers la gauche de l'écran : la pastille se
   tient déjà à 344 px du milieu, et 380 px de volet de plus le font sortir de
   la fenêtre sous 1480 px de large — c'est-à-dire sur presque tous les
   portables. Aligné à gauche, il reste dans l'écran dès 1040 px, et en dessous
   la règle du bas prend le relais. */
.attente-volet {
  position: absolute; left: 0; right: auto; bottom: 74px;
  width: min(380px, calc(100vw - 32px));
  max-height: calc(100vh - 150px); overflow-y: auto;
  box-sizing: border-box; padding: 16px;
  border-radius: var(--rayon-md);
  background: var(--panneau); border: 1px solid var(--bord);
  box-shadow: var(--ombre-forte);
  display: flex; flex-direction: column; gap: 12px;
}
.attente-volet[hidden] { display: none; }
.attente-fermer {
  position: absolute; top: 16px; right: 16px;
  width: 44px; height: 44px; border: 0; border-radius: var(--rayon-sm);
  background: var(--accent-pale); color: var(--texte); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.attente-titre {
  display: flex; align-items: center; gap: 10px;
  min-height: 44px; padding-right: 56px;
  font-size: 15px; font-weight: 600;
}
.attente-titre .combien { font-size: 13px; font-weight: 400; color: var(--gris); }
.attente-promesse { margin: 0; font-size: 15px; line-height: 1.5; }

.attente-fiche {
  display: flex; flex-direction: column; gap: 8px;
  padding: 6px 16px 12px; border-radius: var(--rayon-sm);
  background: var(--panneau-fort); border: 1px solid var(--bord);
}
.attente-fiche .ouvrir {
  min-height: 44px; width: 100%; padding: 0; border: 0; background: none;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  text-align: left; font: inherit; font-size: 15px; font-weight: 600;
  color: var(--texte); cursor: pointer;
}
.attente-fiche .ouvrir .nom {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.attente-fiche .ouvrir svg { flex: none; width: 16px; height: 16px; color: var(--gris); }
.attente-fiche .meta { margin-top: -8px; font-size: 13px; color: var(--gris); }
.attente-gestes { display: flex; flex-wrap: wrap; gap: 8px; }
.attente-gestes button {
  flex: 1 1 auto; min-height: 44px; padding: 0 14px;
  border-radius: var(--rayon-sm); font: inherit; font-size: 15px;
  cursor: pointer; display: inline-flex; align-items: center;
  justify-content: center; gap: 8px;
}
.attente-gestes .diapos {
  border: 1px dashed var(--bord-vif); background: transparent;
  color: var(--texte); font-weight: 600;
}
.attente-gestes .diapos.posees {
  border-style: solid; border-color: var(--texte); background: var(--accent-pale);
}
.attente-gestes .diapos svg { flex: none; width: 16px; height: 16px; }
.attente-gestes .envoyer {
  border: 0; background: var(--texte); color: var(--sur-accent);
  font-weight: 700; box-shadow: var(--ombre-encre);
}
.attente-gestes button[disabled] { opacity: .55; cursor: default; }
/* La ligne du bas : « Discard », et sa confirmation en deux temps au même
   endroit. Une fenêtre modale pour jeter un cours de dix minutes serait plus
   lourde que le geste. */
.attente-jeter {
  display: flex; align-items: center; flex-wrap: wrap; gap: 0 12px;
  min-height: 44px;
}
.attente-jeter button {
  min-height: 44px; padding: 0 4px; border: 0; background: none;
  font: inherit; font-size: 14px; font-weight: 600;
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.attente-jeter .demander { margin-left: -4px; color: var(--gris); }
.attente-jeter .oui { color: var(--texte); }
.attente-jeter .non { color: var(--texte); font-weight: 700; }
.attente-jeter .question { font-size: 14px; color: var(--texte); }

/* Sous 1040 px la pastille passe au-dessus du dock, centrée : à côté de lui
   elle sortirait de l'écran.
   Le seuil se calcule, il ne se choisit pas : le dock fait 660 de large et
   reste centré, donc il laisse (100vw − 660) / 2 de chaque côté. La pastille
   en demande 160, plus 14 d'écart — elle ne tient plus en dessous de
   660 + 2 × 174 = 1008 px. La maquette disait 920 parce que son dock n'avait
   que cinq onglets et 560 px ; le nôtre en a sept. */
@media (max-width: 1040px) {
  /* Centrée par une rangée pleine largeur, **jamais par `translate`**.
     Une transformation sur cet élément en fait le bloc conteneur de ses
     descendants en `position: fixed` : le volet se calait alors sur la
     pastille au lieu de la fenêtre, et ses `left: 16px; right: 16px` lui
     donnaient 124 px de large au lieu de toute la largeur.
     La rangée ne doit rien intercepter : elle couvre l'écran sur toute sa
     largeur, et la page se clique au travers. */
  .attente {
    right: auto; left: 0; width: 100%; translate: none;
    display: flex; justify-content: center;
    bottom: calc(112px + env(safe-area-inset-bottom, 0px));
    pointer-events: none;
  }
  .attente-pastille, .attente-volet { pointer-events: auto; }
  /* La pastille monte jusqu'à 174 px du bas (112 + 62), plus haut que les
     140 px que le pied réserve au dock : tant qu'elle est là, le pied
     s'allonge d'autant, sinon elle couvre ses derniers liens. */
  body:has(.attente:not([hidden])) .pied {
    padding-bottom: calc(190px + env(safe-area-inset-bottom, 0px));
  }
  .attente-volet {
    position: fixed; left: 16px; right: 16px; width: auto;
    bottom: 186px; max-height: calc(100vh - 202px);
  }
}
/* Le toast descend avec elle : en haut de l'écran il ne couvre ni le volet ni
   la pastille, qui viennent de monter. */
@media (max-width: 1040px) {
  #toast { left: 16px; right: 16px; top: 16px; bottom: auto; }
}
/* === /region === */

/* === region: toast === */
/* ---------------------------------------------------------------------------
   La bulle qui passe (#toast)
   ---------------------------------------------------------------------------
   Au-dessus du dock et à droite, jamais dans le coin de la pastille : les
   deux se recouvriraient au moment précis où l'une annonce ce que l'autre
   vient de perdre. */
#toast {
  position: fixed; right: 16px; bottom: 112px; z-index: 42;
  max-width: calc(100vw - 32px); box-sizing: border-box;
  padding: 12px 16px; border-radius: var(--rayon-sm);
  background: var(--panneau); border: 1px solid var(--bord);
  color: var(--texte); font-size: 15px; line-height: 1.5; font-weight: 500;
  white-space: normal; box-shadow: 0 8px 24px rgba(15,15,15,.12);
  opacity: 1; transition: opacity .2s ease;
}
#toast[hidden] { display: none; }
/* === /region === */

/* ---------------------------------------------------------------------------
   L'écran d'entrée — la première chose que voit un inconnu
   ---------------------------------------------------------------------------
   Deux moitiés : ce qu'on vend, et comment entrer. Sur un téléphone, le
   formulaire passe devant. */

/* Le voile défile sur lui-même : il est fixé à la fenêtre, et c'est en lui
   que la piste des stations se déroule. `accueil.js` lit donc son `scrollTop`
   et non celui de la page.

   Et le document se verrouille pendant ce temps. Sans ça la page portait deux
   barres de défilement côte à côte — celle du voile et celle de
   l'application, restée dans le flux derrière — et la molette partait dans la
   mauvaise. Le voile ne bougeait pas, la caméra du cerveau restait plantée, et
   le voyage paraissait mort alors qu'il n'avait jamais commencé. */
body.accueil-ouvert { overflow: hidden; }
.voile.entree {
  overflow-y: auto; overflow-x: hidden;
  -webkit-backdrop-filter: none; backdrop-filter: none;
  scroll-behavior: smooth;
}
.accueil {
  display: grid; grid-template-columns: 1.05fr .95fr;
  gap: clamp(32px, 5vw, 80px); align-items: center;
  width: 100%; max-width: 1180px; margin: 0 auto;
  padding: clamp(16px, 4vw, 48px);
}
@media (max-width: 900px) {
  .accueil { grid-template-columns: 1fr; gap: 40px; align-items: start; padding: 0; }
  .accueil .bienvenue { order: -1; }
  .demo-cerveau { display: none; }
}

.argument { min-width: 0; }
.argument .marque { margin-bottom: clamp(24px, 5vh, 48px); }

.sur-titre { font-size: 13px; font-weight: 600; color: var(--gris); margin: 0 0 16px; }
.titre-accueil {
  font-family: var(--titre); font-variation-settings: "SOFT" 100;
  font-size: clamp(34px, 5.4vw, 50px); line-height: 1.05; font-weight: 500;
  letter-spacing: -.02em; margin: 0 0 24px;
}
/* Pas de fichier italique : l'accent se fait au trait, en Fraunces « sec ». */
.titre-accueil em { font-style: normal; font-variation-settings: "SOFT" 0; }

.promesses { list-style: none; padding: 0; margin: 0 0 32px; }
.promesses li {
  color: var(--gris-fort); font-size: 16px; line-height: 1.6;
  padding: 4px 0 4px 20px; position: relative;
}
.promesses li::before {
  content: ""; position: absolute; left: 0; top: 1em;
  width: 6px; height: 6px; border-radius: 50%; background: var(--texte);
}

/* La démonstration : trois cours, une notion partagée. */
.demo-cerveau {
  border: 1px solid var(--bord); border-radius: var(--rayon-md);
  background: var(--panneau); padding: 20px 24px 16px;
  box-shadow: var(--ombre);
}
.demo-entete {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 13px; font-weight: 600; color: var(--gris); margin-bottom: 8px;
}
.demo-note { font-weight: 500; }

.toile { position: relative; height: 190px; }
.fils { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.fils path {
  fill: none; stroke: var(--texte); stroke-opacity: .25; stroke-width: 1.5;
  stroke-dasharray: 160; stroke-dashoffset: 0;
  animation: tracer 1.1s ease-out both;
}
.fils path:nth-child(2) { animation-delay: .18s; }
.fils path:nth-child(3) { animation-delay: .36s; stroke-opacity: .6; }
@keyframes tracer { from { stroke-dashoffset: 160; } }

.noeud {
  position: absolute; border-radius: var(--rayon);
  border: 1px solid var(--bord-fort); background: var(--panneau);
  padding: 8px 12px; line-height: 1.25; box-shadow: var(--ombre-bord);
  animation: poser .5s ease-out both;
}
.noeud strong { display: block; font-size: 14px; font-weight: 600; }
.noeud span { font-size: 12px; color: var(--gris); }
@keyframes poser { from { opacity: 0; translate: 0 6px; } }

.noeud.n1 { left: 0; top: 8px; animation-delay: .05s; }
.noeud.n2 { right: 0; top: 8px; animation-delay: .15s; }
.noeud.n3 { left: 50%; top: 78px; transform: translateX(-50%); animation-delay: .5s; border-color: var(--texte); }
.noeud.n4 { left: 50%; bottom: 0; transform: translateX(-50%); animation-delay: .3s; }
/* L'idée partagée : un point d'encre devant son nom. */
.noeud.idee strong::before {
  content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--texte); margin-right: 6px; vertical-align: 1px;
}

.demo-pied {
  margin: 12px 0 0; font-size: 13px; color: var(--gris);
  border-top: 1px solid var(--bord); padding-top: 12px;
}

/* La carte d'entrée. */
.accueil .bienvenue {
  max-width: 27rem; width: 100%; justify-self: end; text-align: left;
  border-radius: var(--rayon-lg); padding: 32px;
}
@media (max-width: 900px) { .accueil .bienvenue { justify-self: stretch; max-width: none; } }
@media (max-width: 420px) { .accueil .bienvenue { padding: 24px 20px; } }
.bienvenue h3 {
  font-family: var(--titre); font-variation-settings: "SOFT" 100;
  margin: 0 0 8px; font-size: 30px; line-height: 1.15; font-weight: 500; letter-spacing: -.02em;
}
.bienvenue form { margin: 0; }
.bienvenue .accroche { color: var(--gris); margin: 0 0 24px; font-size: 16px; line-height: 1.5; }
.bienvenue label { margin-top: 16px; }
.bienvenue label:first-of-type { margin-top: 0; }
.bienvenue .principal { margin-top: 24px; }
/* Les deux onglets du panneau d'entrée : se connecter, ou créer un compte.
   Une piste de la couleur des champs, et la retenue pleine, en encre — le même
   dessin que les puces de choix, pour qu'on sache d'un coup d'œil lequel des
   deux on est en train de faire. */
.bascule-mode {
  display: flex; gap: 4px; margin: 0 0 24px; padding: 4px;
  background: var(--panneau-fort); border: 1px solid var(--bord); border-radius: 999px;
}
.bascule-mode button {
  flex: 1 1 0; min-width: 0; min-height: 44px; padding: 0 8px;
  border: 0; border-radius: 999px; background: transparent;
  font: inherit; font-size: 14px; font-weight: 600; color: var(--gris); cursor: pointer;
  white-space: nowrap;
}
.bascule-mode button:hover { color: var(--texte); }
.bascule-mode button[aria-pressed="true"] {
  background: var(--accent); color: var(--sur-accent); box-shadow: var(--ombre-encre);
}
.bienvenue label.case { margin-top: 8px; }

/* Le lien « mot de passe oublié », sous le formulaire. Discret : ce n'est pas
   une invitation, c'est une sortie de secours. */
.oubli { margin: 8px 0 0; text-align: center; font-size: 14px; }
.oubli a, .rassurance a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px;
  color: var(--gris); font-weight: 600;
}
.oubli a:hover, .rassurance a:hover { color: var(--texte); }

.rassurance { margin: 8px 0 0; text-align: center; font-size: 14px; color: var(--gris); }
/* Le lien reçu par email : la page du nouveau mot de passe, servie seule et
   sans l'application autour. Deux champs, resserrés. */
.renaitre { max-width: 25rem; margin-top: 24px; }
.renaitre label { margin-top: 16px; }
.renaitre label:first-of-type { margin-top: 0; }
.renaitre .aide, .renaitre .etat { margin-top: 12px; }
.renaitre .principal { margin-top: 24px; }

/* L'invitation d'un parrain. */
.invitation {
  background: var(--accent-pale); border: 1px solid var(--bord);
  border-radius: var(--rayon); padding: 10px 16px;
  margin: 0 0 16px; font-size: 14px; font-weight: 600; color: var(--texte);
}

/* Les quatre barres de l'inscription : celles qu'on a franchies en encre. */
.jauge-etapes { display: flex; gap: 6px; margin-bottom: 24px; }
.jauge-etapes span { height: 4px; flex: 1; border-radius: 2px; background: var(--bord-fort); transition: background .3s ease; }
.jauge-etapes span.faite { background: var(--texte); }

.etape { animation: nm-rise .28s ease-out both; }

/* ---------------------------------------------------------------------------
   La visite guidée
   ---------------------------------------------------------------------------
   Un voile percé plutôt qu'une fenêtre par-dessus : le trou est fait d'une
   ombre portée démesurée, et un anneau d'encre désigne l'élément. */
.visite { position: fixed; inset: 0; z-index: 70; pointer-events: none; }

.voile-troue { position: absolute; inset: 0; background: var(--voile-sombre); pointer-events: auto; }
.halo-cible {
  position: fixed; border-radius: var(--rayon-md);
  box-shadow: 0 0 0 9999px var(--voile-sombre), 0 0 0 2px var(--texte);
  pointer-events: none;
  transition: top .3s cubic-bezier(.2,.8,.2,1), left .3s cubic-bezier(.2,.8,.2,1),
              width .3s cubic-bezier(.2,.8,.2,1), height .3s cubic-bezier(.2,.8,.2,1);
}
/* Quand un trou est ouvert, le voile uni ferait double épaisseur. */
.visite:has(.halo-cible:not([hidden])) .voile-troue { background: none; }

.bulle {
  position: fixed; z-index: 2; pointer-events: auto;
  width: min(26rem, calc(100vw - 32px));
  background: var(--panneau); border: 1px solid var(--bord);
  border-radius: var(--rayon-md); padding: 24px;
  box-shadow: var(--ombre-forte);
  transition: top .3s cubic-bezier(.2,.8,.2,1), left .3s cubic-bezier(.2,.8,.2,1);
}
.bulle.au-centre {
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: min(30rem, calc(100vw - 32px)); text-align: center;
}
.bulle h3 {
  font-family: var(--titre); font-variation-settings: "SOFT" 100;
  margin: 0 0 8px; font-size: 24px; line-height: 1.15; font-weight: 500; letter-spacing: -.02em;
}
.bulle p { margin: 0; color: var(--gris-fort); font-size: 15px; line-height: 1.5; }

.jauge { height: 2px; background: var(--bord-fort); margin: 0 0 16px; overflow: hidden; }
.jauge span { display: block; height: 100%; width: 0; background: var(--texte); transition: width .4s cubic-bezier(.2,.8,.2,1); }

.pied-visite { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; }
.bulle.au-centre .pied-visite { justify-content: center; }
.points { display: flex; gap: 6px; }
.point { width: 6px; height: 6px; border-radius: 50%; background: var(--bord-vif); transition: background .25s, width .25s; }
.point.ici, .point.faite { background: var(--texte); }
.point.ici { width: 18px; border-radius: 3px; }
.pied-visite .secondaire[hidden] { visibility: hidden; display: inline-flex !important; }

/* ---------------------------------------------------------------------------
   Les cookies
   ---------------------------------------------------------------------------
   Un encart en bas, au-dessus du dock, pas une fenêtre qui recouvre la page.
   Le site marche entièrement sans rien accepter. */
.cookies {
  position: fixed; left: 50%; bottom: calc(118px + env(safe-area-inset-bottom, 0px));
  translate: -50% 0; z-index: 60;
  width: min(44rem, calc(100% - 32px));
  display: flex; align-items: center; gap: 12px 24px; flex-wrap: wrap;
  background: var(--panneau); border: 1px solid var(--bord);
  border-radius: var(--rayon-md); padding: 16px 20px;
  box-shadow: var(--ombre-forte);
  animation: nm-rise .35s cubic-bezier(.2,.8,.2,1) both;
}
.cookies p { margin: 0; flex: 1 1 20rem; font-size: 15px; line-height: 1.5; color: var(--texte); }
.cookies a {
  color: var(--texte); font-weight: 600;
  display: inline-block; padding: 12px 0; margin: -12px 0;
}
.cookies .boutons { margin: 0; flex: none; }
@media (max-width: 480px) {
  .cookies { padding: 14px 16px; gap: 10px; }
  .cookies p { font-size: 14px; }
  .cookies .boutons { display: flex; width: 100%; }
  .cookies .boutons button { flex: 1 1 0; }
}

/* ---------------------------------------------------------------------------
   L'administration
   --------------------------------------------------------------------------- */

.etiquette-admin {
  font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: 0;
  background: var(--accent-pale); color: var(--texte);
  border-radius: var(--rayon-xs); padding: 2px 8px; vertical-align: .25em;
}

.grille {
  width: 100%; border-collapse: collapse;
  background: var(--panneau); border: 1px solid var(--bord);
  border-radius: var(--rayon-md); overflow: hidden; box-shadow: var(--ombre);
}
.grille th {
  text-align: left; padding: 12px 16px;
  font-size: 13px; font-weight: 600; color: var(--gris);
  border-bottom: 1px solid var(--bord-fort); white-space: nowrap;
}
.grille td { padding: 12px 16px; border-bottom: 1px solid var(--bord); font-size: 14px; vertical-align: middle; }
.grille tr:last-child td { border-bottom: 0; }
.grille tr:hover td { background: var(--panneau-fort); }
/* Les nombres en chiffres de largeur fixe : sinon les colonnes d'argent dansent. */
.grille .n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.grille .titre { display: block; font-weight: 600; }
.grille .sous { display: block; color: var(--gris); font-size: 13px; }
.grille tr.eteint td { opacity: .45; }

.jeton {
  display: inline-flex; align-items: center; height: 28px; padding: 0 10px;
  font-size: 13px; font-weight: 600; white-space: nowrap; vertical-align: middle;
  border-radius: 999px; border: 1px solid var(--bord-fort); color: var(--gris-fort);
}
.jeton.actif  { background: var(--accent-pale); color: var(--texte); border-color: transparent; }
.jeton.expire { background: var(--err-pale); color: var(--err); border-color: transparent; }
.jeton.aucun  { color: var(--gris); }
/* Un compte arrivé cette semaine : une pastille d'encre. */
.jeton.nouveau {
  background: var(--texte); color: var(--sur-accent); border-color: transparent;
  font-size: 12px; height: 24px; padding: 0 8px;
}
/* Un filet à gauche sur toute la ligne. */
.grille tr.neuf td:first-child { box-shadow: inset 2px 0 0 var(--texte); }

/* Les actions, sur une seule ligne : la table défile déjà quand elle déborde. */
.grille td.actions { white-space: nowrap; }
/* « 0/3 » : zéro cours obtenu sur trois enregistrements envoyés. Le second
   chiffre est en retrait pour qu'on lise d'abord le premier. */
.grille .n .rate { color: var(--err); font-size: .78em; font-weight: 400; }
/* La phrase de présentation d'un candidat : bornée, c'est un champ libre. */
.grille td.presentation {
  max-width: 28ch; font-size: 13px; color: var(--gris);
  white-space: normal; overflow-wrap: anywhere;
  max-height: 5.2rem; overflow: auto;
}
.puce-admin {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; min-width: 44px; padding: 0 12px; margin-right: 4px; white-space: nowrap;
  background: var(--panneau); border: 1px solid var(--bord-fort);
  border-radius: var(--rayon); color: var(--texte);
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; box-shadow: var(--ombre-bord);
}
.puce-admin:last-child { margin-right: 0; }
.puce-admin.danger:hover { border-color: var(--err); color: var(--err); }
.puce-admin.signal { border-color: var(--texte); }

#table-comptes { overflow-x: auto; border-radius: var(--rayon-md); }
.grille { min-width: 52rem; }

/* L'entonnoir : où les comptes s'arrêtent. */
.entonnoir { display: grid; gap: 4px; margin-bottom: 32px; }
.marche {
  display: grid; grid-template-columns: 13rem 3rem 1fr 7rem;
  align-items: center; gap: 16px;
  background: var(--panneau); border: 1px solid var(--bord);
  border-radius: var(--rayon); padding: 10px 16px;
}
.marche .k { color: var(--gris); font-size: 14px; }
.marche .v { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.marche .barre { height: 2px; background: var(--bord-fort); overflow: hidden; }
.marche .barre span { display: block; height: 100%; background: var(--texte); }
/* Ce qui se perd à cette marche : le chiffre qu'on vient chercher. */
.marche .perdu { color: var(--err); font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 720px) {
  .marche { grid-template-columns: 1fr auto; }
  .marche .barre, .marche .perdu { grid-column: 1 / -1; text-align: left; }
}

.etapes-compte { white-space: nowrap; }
.jalon {
  display: inline-block; width: 9px; height: 9px; border-radius: 50%;
  margin-right: 4px; background: var(--panneau-fort); border: 1px solid var(--bord-vif);
}
.jalon.fait { background: var(--texte); border-color: var(--texte); }
.lien-parrain { font-family: var(--mono); font-size: 13px; color: var(--gris); word-break: break-all; }

/* ---------------------------------------------------------------------------
   Le pied de page
   ---------------------------------------------------------------------------
   Le bas de page porte la place du dock : 140 px, pour qu'il ne couvre jamais
   ni le dernier bouton ni cette phrase. */
.pied { border-top: 1px solid var(--bord); padding: 24px 0 calc(140px + env(safe-area-inset-bottom, 0px)); }
.pied p { margin: 0; color: var(--gris); font-size: 13px; line-height: 1.5; max-width: 62ch; }
/* Les pages publiques, reliées entre elles : c'est par ces liens qu'un moteur
   passe de l'une à l'autre. */
.liens-pied { display: flex; flex-wrap: wrap; gap: 0 16px; margin-top: 8px; }
.liens-pied a {
  display: inline-flex; align-items: center; min-height: 44px;
  color: var(--gris); font-size: 13px; font-weight: 600;
}
.liens-pied a:hover { color: var(--texte); }

/* Un tableau de comparaison, sur les pages publiques : des filets, et la
   première colonne en encre. Sur un téléphone, chaque rangée devient un bloc. */
.tableau { width: 100%; border-collapse: collapse; margin: 12px 0 0; font-size: 14px; line-height: 1.5; }
.tableau th, .tableau td {
  text-align: left; vertical-align: top; padding: 10px 16px 10px 0;
  border-bottom: 1px solid var(--bord); color: var(--gris);
}
.tableau th { font-size: 13px; font-weight: 600; }
.tableau td:first-child { color: var(--texte); font-weight: 600; }
@media (max-width: 560px) {
  .tableau, .tableau tbody, .tableau tr, .tableau td { display: block; }
  .tableau thead { display: none; }
  .tableau tr { padding: 10px 0; border-bottom: 1px solid var(--bord); }
  .tableau td { border: 0; padding: 2px 0; }
}

/* ---------------------------------------------------------------------------
   À l'impression : la page de confidentialité, une fiche. Rien de ce qui
   flotte, et l'en-tête redevient un simple bloc.
   --------------------------------------------------------------------------- */
@media print {
  .dock, .cookies, .visite, #voile-cours, .halo { display: none !important; }
  header { position: static; background: none; backdrop-filter: none; }
  main { padding-bottom: 0; }
}
