/* Comptes de gmathen.fr : les écrans du compte et du suivi des classes. La feuille des maquettes validées le
   5 décembre 2026 (maquettes/maquettes.css), et en fin de fichier ce qu'il faut de plus aux écrans en service.
   L'identité du site et du kit des modules, pour qu'un élève venu d'un module se sente au même endroit :
   - clair : le jour du kit (el.css). Sombre : la salle du site (base.css), lumières éteintes.
   - Roboto Flex : titres étroits comme les pages du site, texte courant à largeur normale.
   - Un seul accent, l'orange #f09800, pour l'action principale et la progression. Jamais de texte orange sur fond clair.
   - Arrondis : 20 px un cadre, 10 px un petit élément, boutons en pilule. Le vide plutôt que les traits.
   - Animations de 150 à 250 ms, sans rebond, aucune pour qui demande moins de mouvement. Cibles de 44 px au moins.
   Mode : celui de l'appareil, ou data-mode="clair|sombre" sur <html>. */

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

/* ---------- les couleurs : le jour, puis la salle ---------- */
:root {
  --fond: #fdfdfc;        /* la page */
  --pan: #f2f1ec;         /* cartes des modules, retours, bandes du tableau */
  --pan-2: #e7e5de;       /* survol, pistes des jauges */
  --tuile: #ffffff;       /* champs */
  --encre: #2b2d38;
  --encre-2: #5c5f6b;     /* 6,2 pour 1 sur la page */
  --trait: rgba(43, 45, 56, .17);
  --champ: rgba(43, 45, 56, .6);
  --accent: #f09800;
  --accent-h: #ffab1f;
  --sur-accent: #1d1f28;
  --focus: #985800;       /* l'anneau du clavier, 5,5 pour 1 */
  --ecran: #262936;       /* les petits écrans des modules, comme les cartes de /cours/ */
  --voile: rgba(29, 31, 40, .42);
  --ombre: 0 18px 48px rgba(29, 31, 40, .18), 0 2px 6px rgba(29, 31, 40, .06);
  --g-fond: #ffffff; --g-bord: #747775; --g-texte: #1f1f1f;   /* le bouton Google, thème clair de sa charte */
  --arrondi: 20px;
  --arrondi-p: 10px;
  --gouttiere: max(40px, calc((100% - 1120px) / 2));
  --doux: cubic-bezier(.2, .8, .2, 1);
  --police: 'Roboto Flex', Roboto, system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-mode="clair"]) {
    --fond: #1d1f28; --pan: #252833; --pan-2: #323542; --tuile: #2d303c;
    --encre: #ece7da; --encre-2: #aaabb4; --trait: rgba(236, 231, 218, .2); --champ: rgba(236, 231, 218, .45);
    --focus: #f4ab3e; --ecran: #262936; --voile: rgba(8, 9, 14, .62);
    --ombre: 0 18px 48px rgba(0, 0, 0, .5), 0 2px 6px rgba(0, 0, 0, .3);
    --g-fond: #131314; --g-bord: #8e918f; --g-texte: #e3e3e3;
    color-scheme: dark;
  }
}
:root[data-mode="sombre"] {
  --fond: #1d1f28; --pan: #252833; --pan-2: #323542; --tuile: #2d303c;
  --encre: #ece7da; --encre-2: #aaabb4; --trait: rgba(236, 231, 218, .2); --champ: rgba(236, 231, 218, .45);
  --focus: #f4ab3e; --ecran: #262936; --voile: rgba(8, 9, 14, .62);
  --ombre: 0 18px 48px rgba(0, 0, 0, .5), 0 2px 6px rgba(0, 0, 0, .3);
  --g-fond: #131314; --g-bord: #8e918f; --g-texte: #e3e3e3;
  color-scheme: dark;
}

/* ---------- la page ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; background: var(--fond); }
body {
  margin: 0; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column;
  background: var(--fond); color: var(--encre); font-family: var(--police); font-size: 17px; line-height: 1.55;
  font-optical-sizing: auto;
}
main { flex: 1; }
h1, h2, h3 { margin: 0; color: var(--encre); font-weight: 670; font-stretch: 78%; line-height: 1.08; letter-spacing: -.01em; text-wrap: balance; }
p { margin: 0; }
p, li, dd { text-wrap: pretty; }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font-family: inherit; }
button, a, label, input, summary { touch-action: manipulation; }
:focus-visible { outline: 2.5px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
/* un titre qui reçoit le focus pour les lecteurs d'écran (tabindex -1) : ni bouton ni lien, pas de cadre */
[tabindex="-1"]:focus { outline: none; }
.nombres, table, .pc { font-variant-numeric: tabular-nums; }
.insecable { white-space: nowrap; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.evitement { position: absolute; left: 12px; top: -80px; z-index: 100; padding: 10px 18px; border-radius: 999px; background: var(--encre); color: var(--fond); font-weight: 650; text-decoration: none; }
.evitement:focus { top: 12px; }

/* ---------- l'en-tête : la marque du site à gauche, une action à droite ---------- */
.tete { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 28px; padding: 14px var(--gouttiere); min-height: 72px; }
.marque { display: inline-flex; align-items: center; min-height: 44px; font-weight: 680; font-stretch: 84%; font-size: 21px; letter-spacing: -.005em; white-space: nowrap; text-decoration: none; color: var(--encre); }
.tete-n { display: flex; gap: 4px; margin-left: 8px; }
.tete-n a { flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; white-space: nowrap; border-radius: 999px; font-size: 15.5px; font-weight: 600; color: var(--encre-2); text-decoration: none; transition: background-color .15s, color .15s; }
.tete-n a[aria-current] { background: var(--pan); color: var(--encre); }
.tete-d { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.retour-lien { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 4px; font-size: 15.5px; font-weight: 600; color: var(--encre-2); text-decoration: none; }
.retour-lien .ic { width: 18px; height: 18px; }
/* le bouton du mode, le même que dans les modules (kit : .el-mode) : la lune en clair, le soleil en sombre.
   Le choix vaut pour tout le site (clé gm-mode), sinon celui de l'appareil. */
.mode-b { flex: none; display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--encre); cursor: pointer; transition: background-color .15s, transform .1s; }
.mode-b:active { transform: scale(.94); }
/* « Se déconnecter » : une pilule, une icône seule sur téléphone (son nom reste lu par les lecteurs d'écran) */
.deco .ic { display: none; }
.mode-b .ic { width: 22px; height: 22px; }
.mode-soleil, :root[data-mode="sombre"] .mode-lune { display: none; }
:root[data-mode="sombre"] .mode-soleil { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-mode="clair"]) .mode-lune { display: none; }
  :root:not([data-mode="clair"]) .mode-soleil { display: block; }
}

/* ---------- les boutons : des pilules, une seule action principale (orange) par écran ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 24px;
  border: 0; border-radius: 999px; background: transparent; box-shadow: inset 0 0 0 1.5px var(--trait);
  color: var(--encre); font: 650 16px/1.2 var(--police); text-decoration: none; white-space: nowrap; cursor: pointer;
  user-select: none; -webkit-user-select: none; transition: background-color .15s, box-shadow .15s, color .15s, transform .1s;
}
.btn:active { transform: scale(.97); }
.btn .ic { width: 20px; height: 20px; }
.btn.prim { background: var(--accent); color: var(--sur-accent); box-shadow: none; }
.btn.grave { background: var(--encre); color: var(--fond); box-shadow: none; }
.btn.petit { min-height: 44px; padding: 0 18px; font-size: 15px; font-weight: 600; }
.btn.plein { width: 100%; }
.btn[aria-disabled="true"] { background: var(--pan-2); color: var(--encre-2); box-shadow: none; cursor: default; }
.btn[aria-disabled="true"]:active { transform: none; }
/* le bouton Google, d'après sa charte : son « G » en couleurs, « Continuer avec Google », thème clair ou sombre */
.btn-google {
  display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 52px; padding: 0 20px;
  border: 0; border-radius: 999px; background: var(--g-fond); box-shadow: inset 0 0 0 1px var(--g-bord); color: var(--g-texte);
  font: 500 16px/1.2 var(--police); font-stretch: 100%; text-decoration: none; cursor: pointer;
  user-select: none; -webkit-user-select: none; transition: background-color .15s, transform .1s;
}
.btn-google img { width: 20px; height: 20px; }
.btn-google:active { transform: scale(.98); }
.lien { color: var(--encre); font-weight: 600; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 80%, transparent); text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
.lien-doux { color: var(--encre-2); text-decoration: underline; text-decoration-color: var(--trait); text-underline-offset: 4px; }
.lien, .lien-doux { padding-block: 10px; margin-block: -10px; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { box-shadow: inset 0 0 0 1.5px var(--encre); }
  .btn.prim:hover { background: var(--accent-h); box-shadow: none; }
  .btn.grave:hover { background: color-mix(in srgb, var(--encre) 86%, var(--fond)); box-shadow: none; }
  .btn[aria-disabled="true"]:hover { box-shadow: none; }
  .btn-google:hover { background: color-mix(in srgb, var(--g-fond) 92%, var(--g-texte)); }
  .tete-n a:hover { color: var(--encre); background: var(--pan); }
  .mode-b:hover { background: var(--pan); }
  .retour-lien:hover, .lien-doux:hover { color: var(--encre); }
  .lien:hover { text-decoration-color: var(--accent); }
}

/* ---------- les écrans courts (connexion, création, codes) : une colonne étroite ---------- */
.etroite { width: 100%; max-width: 480px; margin: 0 auto; padding: clamp(16px, 6vh, 64px) 20px 48px; }
.titre { font-size: 44px; line-height: 1.02; font-weight: 700; font-stretch: 70%; letter-spacing: -.005em; }
.chapo { margin-top: 14px; font-size: 18px; line-height: 1.5; color: var(--encre-2); }
.chapo b, .chapo strong { color: var(--encre); font-weight: 600; }
.etroite .btn-google { margin-top: 32px; }
.ou { margin-top: 28px; font-size: 15.5px; color: var(--encre-2); }
.form { margin: 0; }
.champ { display: grid; gap: 8px; margin-top: 18px; }
.ou + .form .champ:first-child { margin-top: 12px; }
.champ > label, .champ .etiquette { font-size: 15.5px; font-weight: 600; }
.champ input {
  width: 100%; min-height: 52px; padding: 0 16px; border: 0; border-radius: var(--arrondi-p); background: var(--tuile);
  box-shadow: inset 0 0 0 1.5px var(--champ); color: var(--encre); font: inherit; font-size: 17px; transition: box-shadow .15s;
}
.champ input:focus { outline: none; box-shadow: inset 0 0 0 2.5px var(--focus); }
.champ .aide { font-size: 15px; line-height: 1.45; color: var(--encre-2); }
.mdp { position: relative; }
.mdp input { padding-right: 56px; }
.voir {
  position: absolute; top: 4px; right: 4px; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0;
  border-radius: 50%; background: transparent; color: var(--encre-2); cursor: pointer; transition: background-color .15s;
}
@media (hover: hover) and (pointer: fine) { .voir:hover { background: var(--pan); color: var(--encre); } }
.form > .btn { margin-top: 24px; }
/* un refus : l'encre et une icône, jamais de rouge (un seul accent), le curseur reste dans le champ */
.refus { display: flex; gap: 10px; align-items: flex-start; margin-top: 18px; padding: 14px 16px; border-radius: var(--arrondi-p); background: var(--pan); font-size: 15.5px; line-height: 1.45; }
.refus .ic { margin-top: 1px; }
.suite { display: grid; justify-items: start; gap: 0; margin-top: 18px; }
.suite p { display: flex; flex-wrap: wrap; align-items: center; column-gap: 6px; min-height: 44px; font-size: 16px; color: var(--encre-2); }
.calme { margin-top: 28px; font-size: 15.5px; color: var(--encre-2); }
.compte-actuel { margin-top: 22px; font-size: 15.5px; line-height: 1.5; color: var(--encre-2); }
.compte-actuel b { color: var(--encre); font-weight: 600; }
.signe { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 22px; border-radius: 50%; background: var(--pan); color: var(--encre); }
.signe .ic { width: 26px; height: 26px; }
.signe.fait { background: var(--accent); color: var(--sur-accent); }
.signe.fait .ic { stroke-width: 2.6; }

/* la clé d'accès : ce que l'appareil demande, puis le bouton qui ouvre sa fenêtre */
.explique { margin-top: 22px; font-size: 16.5px; line-height: 1.5; }
.appareils { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 12px; }
.appareils li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 14px; align-items: start; }
.appareils .ic { width: 24px; height: 24px; margin-top: 1px; color: var(--encre-2); }
.appareils p { font-size: 16px; line-height: 1.45; color: var(--encre-2); }
.appareils b { display: block; color: var(--encre); font-weight: 600; }
.appareils + .explique { margin-top: 18px; }
.btn.entree { margin-top: 28px; }
.refus + .btn.entree { margin-top: 18px; }
.form + .btn.entree-cle { margin-top: 12px; }

/* le mot de passe pendant la saisie : une jauge, ce qui manque, les trois façons d'être accepté */
.force { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 6px 14px; margin-top: 4px; }
.jauge { display: block; height: 6px; border-radius: 3px; background: var(--pan-2); overflow: hidden; }
.jauge > span { display: block; height: 100%; border-radius: 3px; background: var(--accent); transition: width .2s var(--doux); }
.force-t { font-size: 15px; font-weight: 600; white-space: nowrap; }
.regles-t { margin-top: 14px; font-size: 15px; color: var(--encre-2); }
.regles { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.regles li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; align-items: start; font-size: 15px; line-height: 1.4; color: var(--encre-2); }
.regles .r-n { white-space: nowrap; font-variant-numeric: tabular-nums; }
.regles li.proche { color: var(--encre); }
.regles li.proche .r-n { font-weight: 600; }
.r-i { display: grid; place-items: center; width: 20px; height: 20px; margin-top: 1px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--pan-2); }
.proche .r-i { box-shadow: inset 0 0 0 2px var(--accent); }
.ok .r-i { background: var(--accent); box-shadow: none; color: var(--sur-accent); }
.r-i .ic { width: 12px; height: 12px; stroke-width: 3.2; }
.regles li.ok { color: var(--encre); }
.regles-plus { margin-top: 10px; font-size: 15px; line-height: 1.45; color: var(--encre-2); }

/* le code de secours : un seul champ, caractères espacés */
.champ input.code-secours { font-size: 22px; letter-spacing: .12em; font-variant-numeric: tabular-nums; font-weight: 600; text-transform: uppercase; }

/* les codes de secours, montrés une fois */
.codes { margin-top: 24px; padding: 20px 22px; border-radius: var(--arrondi); background: var(--pan); }
.codes ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; }
.codes li { font: 600 19px/1.3 var(--police); letter-spacing: .06em; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* un code tient sur une ligne : le plus large (WMWM-MWMW, 140 px) entre dans une colonne sur deux dès 390 px de large,
   une seule colonne en dessous */
@media (max-width: 389px) { .codes ol { grid-template-columns: minmax(0, 1fr); } }
.codes-a { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

/* la case à cocher (« J'ai rangé mes codes », « Signer ce retour ») */
.case { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; align-items: start; margin-top: 22px; min-height: 44px; padding-top: 10px; font-size: 16px; line-height: 1.45; cursor: pointer; }
.case input { appearance: none; -webkit-appearance: none; width: 24px; height: 24px; margin: 0; border-radius: 7px; background: var(--tuile); box-shadow: inset 0 0 0 1.5px var(--champ); cursor: pointer; transition: background-color .15s, box-shadow .15s; }
.case input:checked { background: var(--encre) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fdfdfc' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 16px no-repeat; box-shadow: none; }
:root[data-mode="sombre"] .case input:checked { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231d1f28' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); }
@media (prefers-color-scheme: dark) { :root:not([data-mode="clair"]) .case input:checked { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231d1f28' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); } }

/* ---------- les écrans larges (Mon espace, les classes, les retours, Vos données) ---------- */
.large { width: 100%; padding: 28px var(--gouttiere) 72px; }
.large .titre { font-size: 56px; line-height: 1; font-stretch: 66%; }
.entete { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 24px; }
.qui { font-size: 17px; color: var(--encre-2); }
.qui b { color: var(--encre); font-weight: 600; }
.ariane { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-bottom: 10px; font-size: 15.5px; font-weight: 600; color: var(--encre-2); text-decoration: none; }
.ariane .ic { width: 18px; height: 18px; }
@media (hover: hover) and (pointer: fine) { .ariane:hover { color: var(--encre); } }
.bloc { margin-top: 60px; max-width: 1120px; }
.bloc-t { font-size: 27px; line-height: 1.1; font-weight: 650; font-stretch: 82%; scroll-margin-top: 24px; }
.bloc-i { margin-top: 8px; max-width: 64ch; font-size: 16px; color: var(--encre-2); }
.vide { margin-top: 12px; max-width: 60ch; font-size: 16.5px; color: var(--encre-2); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }

/* Mes modules : un petit écran par module, sa progression le long du bas, comme la barre des modules */
.mods { list-style: none; margin: 22px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(236px, 1fr)); gap: 16px; }
.mod { display: flex; flex-direction: column; padding: 10px 10px 16px; border-radius: var(--arrondi); background: var(--pan); }
.mod-ecran { position: relative; display: block; aspect-ratio: 16 / 10; border-radius: var(--arrondi-p); background: var(--ecran); overflow: hidden; }
.mod-ecran svg, .mod-ecran img { width: 100%; height: 100%; }
.mod-jauge { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(236, 231, 218, .16); }
.mod-jauge > span { display: block; height: 100%; border-radius: 0 3px 3px 0; background: var(--accent); }
.mod-n { padding: 14px 8px 0; font-size: 21px; line-height: 1.15; font-weight: 650; font-stretch: 86%; }
.mod-ou { padding: 4px 8px 0; font-size: 15px; line-height: 1.4; color: var(--encre-2); }
.mod-c { display: flex; flex-wrap: wrap; gap: 2px 16px; padding: 10px 8px 0; font-size: 15px; color: var(--encre-2); font-variant-numeric: tabular-nums; }
.mod-c b { color: var(--encre); font-weight: 650; }
.mod > :nth-last-child(2) { margin-bottom: 16px; }
.mod .btn { margin: auto 8px 0; align-self: flex-start; }

/* des lignes sans cadre : un titre, ce qu'il en est, une action à droite */
.rangs { list-style: none; margin: 14px 0 0; padding: 0; max-width: 780px; }
.rang { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px 24px; padding: 14px 0; }
.rang-t { font-size: 17px; font-weight: 600; }
.rang-d { margin-top: 2px; font-size: 15.5px; line-height: 1.45; color: var(--encre-2); overflow-wrap: anywhere; }
.rang-a { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.rang q { quotes: '«\00a0' '\00a0»'; }

/* ---------- les classes (vue de Guillaume) ---------- */
.classes { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 12px; max-width: 880px; }
.classe-l { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 24px; padding: 18px 22px; border-radius: var(--arrondi); background: var(--pan); }
.classe-l h2 { font-size: 24px; font-stretch: 82%; font-weight: 650; }
.classe-l h2 a { display: inline-flex; align-items: center; min-height: 44px; margin: -8px 0; text-decoration: none; }
.classe-l p { margin-top: 4px; font-size: 15.5px; color: var(--encre-2); }
.classe-l.archivee { background: transparent; box-shadow: inset 0 0 0 1.5px var(--trait); }
.creer { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-top: 26px; max-width: 880px; }
.creer .champ { flex: 1; min-width: 220px; margin-top: 0; }
.creer .refus { flex: 0 0 100%; margin-top: 0; }
.reste { margin-top: 40px; }
.reste summary { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 16px; font-weight: 600; color: var(--encre-2); cursor: pointer; list-style: none; }
.reste summary::-webkit-details-marker { display: none; }
.reste summary .ic { transition: transform .15s var(--doux); }
.reste[open] summary .ic { transform: rotate(90deg); }

/* une classe : un tableau, une ligne par élève, une colonne par module (des bandes, pas de traits) */
.tab-cadre { margin-top: 28px; overflow-x: auto; overscroll-behavior-x: contain; }
.tab { width: 100%; min-width: 760px; border-collapse: separate; border-spacing: 0; }
.tab th, .tab td { padding: 9px 16px; text-align: left; vertical-align: top; font-weight: 400; }
.tab thead th { padding-top: 0; padding-bottom: 6px; font-size: 15px; color: var(--encre-2); white-space: nowrap; }
.tri { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; margin: 0 -8px; padding: 0 8px; border: 0; border-radius: var(--arrondi-p); background: none; color: inherit; font: 600 15px var(--police); cursor: pointer; }
.tri .ic { width: 16px; height: 16px; opacity: 0; }
/* le tri se dit sur l'en-tête de colonne (aria-sort), le bouton suit */
[aria-sort] > .tri { color: var(--encre); }
[aria-sort] > .tri .ic { opacity: 1; }
@media (hover: hover) and (pointer: fine) { .tri:hover { background: var(--pan); color: var(--encre); } .tri:hover .ic { opacity: .5; } [aria-sort] > .tri:hover .ic { opacity: 1; } }
.tab tbody tr:nth-child(odd) > * { background: var(--pan); }
.tab tbody tr > :first-child { border-radius: var(--arrondi-p) 0 0 var(--arrondi-p); }
.tab tbody tr > :last-child { border-radius: 0 var(--arrondi-p) var(--arrondi-p) 0; }
.tab tbody th { width: 24%; }
.tab tbody th a { display: inline-flex; align-items: center; min-height: 44px; margin: -8px 0; font-size: 16.5px; font-weight: 600; color: var(--encre); text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .tab tbody th a:hover { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; } }
.tab tbody th small { display: block; font-size: 14px; color: var(--encre-2); }
.cel { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 2px 10px; }
.cel b { font-size: 16.5px; font-weight: 650; font-variant-numeric: tabular-nums; }
.mini { display: block; height: 4px; border-radius: 2px; background: var(--pan-2); overflow: hidden; max-width: 96px; }
.tab tbody tr:nth-child(even) .mini { background: var(--pan); }
.mini > i { display: block; height: 100%; border-radius: 2px; background: var(--accent); }
.cel small { grid-column: 1 / -1; font-size: 13.5px; color: var(--encre-2); font-variant-numeric: tabular-nums; }
.rien { font-size: 15px; color: var(--encre-2); }
.note-p { margin-top: 18px; max-width: 70ch; font-size: 15px; color: var(--encre-2); }
/* sur téléphone : une liste, une ligne par élève, ses modules en dessous */
.eleves { display: none; list-style: none; margin: 22px 0 0; padding: 0; }
.eleves > li { padding: 6px 14px 14px; border-radius: var(--arrondi-p); }
.eleves > li:nth-child(odd) { background: var(--pan); }
/* un nom trop long pour tenir à côté de « actif le … » : la date passe dessous */
.e-h { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 12px; }
.eleves .e-n { display: inline-flex; align-items: center; min-height: 44px; font-size: 17px; font-weight: 600; text-decoration: none; }
.eleves .e-d { font-size: 14px; color: var(--encre-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.eleves dl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 10px; margin: 2px 0 0; }
.eleves dl div { min-width: 0; }
.eleves dt { font-size: 13.5px; color: var(--encre-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eleves dd { margin: 2px 0 0; font-size: 15.5px; font-variant-numeric: tabular-nums; }
.eleves dd b { display: block; font-weight: 650; }
.eleves dd .mini { margin-top: 5px; }
.eleves dd.rien { font-size: 13.5px; line-height: 1.3; }
.e-rien { margin: 0; font-size: 14.5px; color: var(--encre-2); }
.eleves li:nth-child(even) .mini { background: var(--pan-2); }
.eleves li:nth-child(odd) .mini { background: var(--pan-2); }
/* « pas commencé » (67 px) tient dans une colonne sur quatre dès 360 px de large, l'écart resserré sous 375 px.
   Plus étroit, deux colonnes. */
@media (max-width: 374px) { .eleves dl { column-gap: 6px; } }
@media (max-width: 359px) { .eleves dl { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 10px; } }

/* un élève : chaque module, partie par partie, section par section */
.res { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 16px; color: var(--encre-2); font-variant-numeric: tabular-nums; }
.res b { color: var(--encre); font-weight: 650; }
.recommence { margin-top: 10px; font-size: 15.5px; color: var(--encre); }
.part { margin-top: 28px; max-width: 880px; }
.part-t { font-size: 18px; line-height: 1.25; font-weight: 650; font-stretch: 90%; }
.part-t span { margin-right: 8px; color: var(--encre-2); font-weight: 500; }
.secs { list-style: none; margin: 8px 0 0; padding: 0; }
.secs li { display: grid; grid-template-columns: 22px 2.8em minmax(0, 1fr) 112px 200px; align-items: start; gap: 2px 12px; padding: 9px 12px; border-radius: var(--arrondi-p); font-size: 15.5px; line-height: 1.4; }
.secs li:nth-child(odd) { background: var(--pan); }
.secs .n { color: var(--encre-2); font-weight: 600; font-variant-numeric: tabular-nums; }
.secs .s-e { color: var(--encre-2); font-variant-numeric: tabular-nums; }
.secs .s-e b { color: var(--encre); font-weight: 650; }
.anneau { width: 20px; height: 20px; margin-top: 0; }
.anneau circle { fill: none; stroke: var(--trait); stroke-width: 3; }
.anneau circle.f { stroke: var(--accent); stroke-linecap: round; transform: rotate(-90deg); transform-origin: 10px 10px; }
.anneau.fini circle { fill: var(--accent); stroke: var(--accent); }
.anneau.fini path { fill: none; stroke: var(--sur-accent); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.mod-d { margin-top: 26px; max-width: 880px; border-radius: var(--arrondi); }
.mod-d summary { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; min-height: 56px; padding: 10px 20px; border-radius: var(--arrondi); background: var(--pan); cursor: pointer; list-style: none; }
.mod-d summary::-webkit-details-marker { display: none; }
.mod-d summary h2 { font-size: 24px; font-stretch: 82%; font-weight: 650; }
.mod-d summary .res { margin-top: 0; }
.mod-d summary .ic { margin-left: auto; transition: transform .15s var(--doux); }
.mod-d[open] summary .ic { transform: rotate(90deg); }
.mod-d .part:first-of-type { margin-top: 18px; }
.mod-o h2 { font-size: 30px; font-stretch: 80%; }

/* le lien et le QR code à projeter : en grand, pour le fond de la salle. Le texte garde au moins sa largeur la plus
   étroite (le code sur une ligne), le QR code prend le reste, jusqu'à min(64vh, 40vw) : il ne passe jamais devant le
   texte, quelle que soit la fenêtre. Entrées fermées, sans QR code, le texte prend toute la largeur. Le titre ne compte
   pas dans cette largeur (contain) : projeter.js le rapetisse jusqu'à ce que ses mots tiennent et la page aussi. */
.projo { flex: 1; display: grid; grid-template-columns: minmax(min-content, 1fr) minmax(0, min(64vh, 40vw)); align-items: center; gap: 4vw; padding: 3vh var(--gouttiere) 6vh; }
.projo:has(> .projo-qr[hidden]) { grid-template-columns: minmax(0, 1fr); }
.projo h1 { font-size: clamp(44px, 6.4vw, 104px); line-height: .98; font-weight: 720; font-stretch: 66%; overflow-wrap: anywhere; contain: inline-size; }
.projo h1.entier { overflow-wrap: normal; } /* le temps d'une mesure : un mot trop long dépasse au lieu de se couper */
.projo-l { margin-top: 3vh; font-size: clamp(20px, 2vw, 32px); line-height: 1.35; color: var(--encre-2); }
.projo-l b { color: var(--encre); font-weight: 650; }
.projo-c { margin-top: 1.5vh; font-size: clamp(min(40px, 13vw), 5.4vw, 88px); line-height: 1; font-weight: 720; letter-spacing: .06em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.projo-qr { width: 100%; height: auto; border-radius: var(--arrondi); background: #fff; image-rendering: pixelated; }
.projo-ferme { margin-top: 3vh; font-size: clamp(18px, 1.6vw, 26px); color: var(--encre-2); }

/* les retours signés (vue de Guillaume) : un cadre par retour */
.retours { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 14px; max-width: 880px; }
.retour { padding: 20px 24px 22px; border-radius: var(--arrondi); background: var(--pan); }
.r-tete { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; }
.r-qui { font-size: 18px; font-weight: 650; }
.r-mail { font-size: 15.5px; color: var(--encre-2); overflow-wrap: anywhere; }
.r-quand { margin-left: auto; font-size: 15px; color: var(--encre-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.r-ou { margin-top: 6px; font-size: 15.5px; color: var(--encre-2); overflow-wrap: anywhere; }
.r-type { margin-top: 14px; font-size: 15px; font-weight: 650; }
.r-msg { margin-top: 4px; max-width: 68ch; font-size: 17px; line-height: 1.55; white-space: pre-line; overflow-wrap: anywhere; }
.retour .btn { margin-top: 16px; }

/* Vos données : une page de texte, comme les pages simples du site */
.texte { max-width: 70ch; }
.texte h2 { margin-top: 52px; font-size: 27px; line-height: 1.12; font-weight: 650; font-stretch: 82%; }
.texte h2 + p, .texte h2 + ul, .texte h2 + dl { margin-top: 12px; }
.texte p + p, .texte p + ul, .texte ul + p, .texte dl + p { margin-top: 12px; }
.texte ul { margin: 0; padding-left: 22px; }
.texte li + li { margin-top: 6px; }
.texte li::marker { color: var(--encre-2); }
.texte a { color: var(--encre); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 80%, transparent); text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
.durees { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: 10px 28px; margin: 0; }
.durees dt { font-weight: 600; }
.durees dd { margin: 0; color: var(--encre-2); }
.maj { margin-top: 52px; font-size: 15px; color: var(--encre-2); }

/* ---------- le pied : « Vos données » sur chaque écran du compte ---------- */
.pied { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 24px; padding: 20px var(--gouttiere) max(24px, env(safe-area-inset-bottom)); font-size: 15px; color: var(--encre-2); }
.pied a { display: inline-flex; align-items: center; min-height: 44px; color: var(--encre-2); text-decoration: underline; text-decoration-color: var(--trait); text-underline-offset: 4px; }
@media (hover: hover) and (pointer: fine) { .pied a:hover { color: var(--encre); } }

/* ---------- téléphone et tablette ---------- */
@media (max-width: 960px) { :root { --gouttiere: 32px; } }
@media (max-width: 760px) {
  .tab-cadre { display: none; }
  .eleves { display: block; }
  .secs li { grid-template-columns: 22px 2.8em minmax(0, 1fr); }
  .secs .s-e { grid-column: 3; }
  .projo { grid-template-columns: minmax(0, 1fr); }
  .projo-qr { width: min(80vw, 46vh); }
}
@media (max-width: 640px) {
  :root { --gouttiere: 20px; }
  .tete { min-height: 64px; padding-top: 10px; padding-bottom: 10px; column-gap: 12px; }
  .marque { font-size: 18px; }
  .retour-lien { font-size: 15px; padding: 0 2px; }
  .tete-d { gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
  .btn.deco { width: 44px; padding: 0; box-shadow: none; }
  .deco .ic { display: block; width: 22px; height: 22px; }
  .deco-t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .tete-n { order: 3; flex-basis: calc(100% + 20px); flex-wrap: wrap; gap: 2px; margin: 0 -10px; }
  .tete-n a { padding: 0 9px; font-size: 15px; }
  /* plus petits sous 292 et 314 px de large : « authentification », « d’information, » tiennent sur une ligne */
  .titre { font-size: min(38px, 13vw); }
  .large { padding-top: 16px; }
  .large .titre { font-size: min(44px, 14vw); }
  .bloc { margin-top: 48px; }
  .bloc-t { font-size: 25px; }
  .mods { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .mod { display: grid; grid-template-columns: 116px minmax(0, 1fr); column-gap: 14px; padding: 10px 10px 14px; }
  .mod-ecran { grid-row: 1 / span 3; align-self: start; }
  .mod-n { padding: 2px 0 0; font-size: 19px; }
  .mod-ou { padding: 2px 0 0; font-size: 14.5px; }
  .mod-c { padding: 6px 0 0; font-size: 14.5px; gap: 0 12px; }
  .mod > :nth-last-child(2) { margin-bottom: 0; }
  .mod .btn { grid-column: 1 / -1; margin: 14px 0 0; width: 100%; }
  .rang { grid-template-columns: minmax(0, 1fr); }
  .rang-a { justify-content: flex-start; }
  .classe-l { grid-template-columns: minmax(0, 1fr); padding: 16px 18px; }
  .codes ol { gap: 10px 18px; }
  .codes li { font-size: 17.5px; letter-spacing: .04em; }
  .r-quand { margin-left: 0; flex-basis: 100%; }
  .retour { padding: 18px 18px 20px; }
  .durees { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .durees dd { margin-bottom: 12px; }
  .creer .btn { width: 100%; }
}

/* ---------- les mouvements ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* petits ajustements d'écrans */
.texte .effets { margin-top: 22px; }
.etroite .btn-google.apres { margin-top: 14px; }
.mod-d summary, .mod-vide { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; min-height: 56px; padding: 10px 20px; border-radius: var(--arrondi); background: var(--pan); }
.mod-vide { background: transparent; box-shadow: inset 0 0 0 1.5px var(--trait); }
.mod-vide h2 { font-size: 24px; font-stretch: 82%; font-weight: 650; }
.mod-vide .res { margin-top: 0; }

/* ---------- les écrans en service (Tâche 12) ---------- */
/* ce qui agit dans la page (« Utiliser un code de secours », « Modifier ») : un bouton, habillé comme son voisin */
button.lien { padding-inline: 0; border: 0; background: none; font: inherit; font-weight: 600; line-height: inherit; cursor: pointer; }
/* une réponse qui n'est pas un refus (« Un nouvel e-mail vient de partir. ») : la forme du refus, sans alerte */
.statut { display: flex; gap: 10px; align-items: flex-start; margin-top: 18px; padding: 14px 16px; border-radius: var(--arrondi-p); background: var(--pan); font-size: 15.5px; line-height: 1.45; }
.statut .ic { margin-top: 1px; }
.etroite > .statut:first-child, .etroite > .refus:first-child { margin: 0 0 22px; }
.large > .refus:first-child, .large > .statut:first-child { margin: 0 0 22px; max-width: 780px; }
.rang .statut, .rang .refus { grid-column: 1 / -1; margin-top: 4px; max-width: 780px; }
/* un bouton dont la demande est en route */
.btn[aria-busy="true"], .btn-google[aria-busy="true"] { cursor: progress; opacity: .72; }
/* un nom ou une adresse sans endroit où couper (jusqu'à 100 signes pour une classe, 60 pour un prénom ou un nom, 254
   pour une adresse) se coupe n'importe où plutôt que de sortir de sa boîte et de faire défiler la page de côté */
.titre, .chapo, .calme, .bloc-i, .ariane, .classe-l h2, .eleves .e-n, .tab tbody th a, .effets li, .r-qui,
.rang-t, .qui b, .compte-actuel b, .statut span { overflow-wrap: anywhere; }
/* un bouton qui nomme quelqu'un (« Retirer … de la classe ») passe à la ligne plutôt que de sortir de l'écran */
.btn.long { white-space: normal; overflow-wrap: anywhere; text-align: center; text-wrap: balance; padding-block: 10px; line-height: 1.3; }
/* une ligne de Mon compte ou de Sécurité ouverte pour modifier : le formulaire sous la ligne */
.edition { grid-column: 1 / -1; max-width: 480px; }
.edition .champ:first-child { margin-top: 4px; }
.edition .actions { margin-top: 18px; }
.edition .refus { grid-column: auto; }
/* « Copiés », « Lien copié » : le bouton dit ce qu'il vient de faire */
.btn .ic-fait { display: none; }
.btn.fait .ic-fait { display: block; }
.btn.fait .ic-avant { display: none; }
/* les trois façons d'être accepté : la coche ne se montre que sur une façon remplie */
.regles li:not(.ok) .r-i .ic { display: none; }
/* les jauges partent vides : la page pose leur largeur */
.jauge > span, .mod-jauge > span, .mini > i { width: 0; }
