/* salle.css — sis-app-salle, v1 (10/10/2026) — direction « le registre de réception » (maquette du 09/10).
   Une copie Seyès pour l'élève, un registre ligné à marge rouge pour l'enseignant, des tampons qui disent
   d'où vient chaque rendu : REÇU (l'élève), SAISI PAR L'ENSEIGNANT (reçu autrement), EN RETARD.
   Encre = bleu UTTOP. Polices servies d'ici (OFL) : Atkinson Hyperlegible pour lire, Instrument Serif pour
   les titres. Aucune ressource distante. Thème clair. */
@import url('fonts/fonts.css');

:root {
  --encre: #005078; --encre-fonce: #003a58; --encre-douce: #dcebf2;
  --stylo: #2a4fb0; --marge: #d9584f;
  --saisi: #4b4fc0; --saisi-doux: #e6e6fb;
  --retard: #b42318; --retard-doux: #fde3df;
  --ok: #0b6a55; --ok-doux: #d8f1e7;
  --attente: #7a5a00; --attente-doux: #fff1b8;
  --jaune: #F5D836;
  --bureau: #e7e0cf; --papier: #fbf8f0; --surface: #fffdf8; --surface-2: #f1ebdc;
  --trait: #ddd3bf; --contour: #1d2c36;
  --texte: #14232d; --texte-2: #43515b; --texte-3: #636e76;
  --seyes-fin: rgba(0, 80, 120, .055); --seyes-fort: rgba(0, 80, 120, .13);
  --ombre: rgba(0, 58, 88, .18);
  --police: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  --titre: "Instrument Serif", Georgia, "Times New Roman", serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --rayon: 12px;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' seed='7'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -3 0 0 0 2.35'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --bruit: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='b'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.7' numOctaves='3' seed='3'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .3 0 0 0 0 .2 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23b)'/%3E%3C/svg%3E");
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--police); color: var(--texte); background: var(--bureau) var(--bruit); min-height: 100vh; line-height: 1.45; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--jaune); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.petit { font-size: .82rem; color: var(--texte-3); }
code { font-family: var(--mono); font-size: .9em; }
a { color: var(--encre); }

/* ── Boutons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: .5rem .85rem; min-height: 40px; text-decoration: none; color: var(--texte);
  background: var(--surface); border: 1.5px solid var(--contour); border-radius: 10px;
  font-weight: 700; font-size: .9rem; line-height: 1.15; text-align: center;
  box-shadow: 2px 2px 0 var(--ombre); transition: transform .08s, box-shadow .08s, background .15s;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--ombre); }
.btn:active { transform: translate(1px, 1px); box-shadow: 0 0 0 var(--ombre); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-encre { background: var(--encre); border-color: var(--encre-fonce); color: #fff; }
.btn-encre:hover { background: var(--encre-fonce); }
.btn-leger { background: transparent; box-shadow: none; border-color: var(--trait); font-weight: 600; }
.btn-leger:hover { background: var(--surface); box-shadow: none; transform: none; border-color: var(--contour); }
.btn-ok { background: var(--ok-doux); border-color: var(--ok); color: var(--ok); }
.btn-saisi { background: var(--saisi-doux); border-color: var(--saisi); color: var(--saisi); }
.btn-danger { background: var(--retard-doux); border-color: var(--retard); color: var(--retard); }
.btn-petit { min-height: 32px; padding: .3rem .6rem; font-size: .8rem; box-shadow: 1.5px 1.5px 0 var(--ombre); }
.large { width: 100%; min-height: 52px; font-size: 1rem; }
.lien-discret { background: none; border: 0; padding: 6px 0; color: var(--texte-3); text-decoration: underline; text-underline-offset: 3px; font-size: .84rem; }

.champ { display: grid; gap: 4px; font-size: .82rem; font-weight: 700; color: var(--texte-2); }
.champ input, .champ select, .champ textarea {
  font: 400 1rem var(--police); padding: .62rem .75rem; color: var(--texte); width: 100%;
  background: var(--surface); border: 1.5px solid var(--contour); border-radius: 10px;
}
.champ textarea { resize: vertical; font-size: .95rem; }
.carte { background: var(--surface); border: 1.5px solid var(--contour); border-radius: var(--rayon); padding: 14px; box-shadow: 3px 3px 0 var(--ombre); }
.sur-titre { margin: 0; font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--encre); }
.rangee { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pile-v { display: grid; gap: 10px; }

/* ── Les tampons ─────────────────────────────────────────────────────────── */
.tampon {
  --c: var(--encre); display: inline-grid; justify-items: center; gap: 3px; padding: 12px 20px 10px; color: var(--c);
  border: 3.5px solid var(--c); border-radius: 8px; outline: 1.5px solid var(--c); outline-offset: -9px;
  font: 700 1.5rem/1 var(--mono); letter-spacing: .2em; text-transform: uppercase; transform: rotate(-7deg);
  -webkit-mask-image: var(--grain); mask-image: var(--grain);
}
.tampon small { font: 700 .66rem/1.25 var(--mono); letter-spacing: .06em; text-transform: none; text-align: center; max-width: 240px; }
.tampon--saisi { --c: var(--saisi); font-size: 1rem; letter-spacing: .12em; }
.tampon--retard { --c: var(--retard); }
.tampon.coup { animation: coup .55s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes coup { 0% { opacity: 0; transform: scale(2.1) rotate(-16deg); } 55% { opacity: 1; transform: scale(.94) rotate(-6deg); } 100% { transform: scale(1) rotate(-7deg); } }
.mini {
  display: inline-block; padding: 1px 7px; border: 2px solid currentColor; border-radius: 4px;
  font: 700 .66rem/1.5 var(--mono); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap;
  transform: rotate(-2.5deg); -webkit-mask-image: var(--grain); mask-image: var(--grain);
}
.mini--recu { color: var(--encre); } .mini--saisi { color: var(--saisi); } .mini--retard { color: var(--retard); }
.mini--attente { color: var(--attente); } .mini--ok { color: var(--ok); } .mini--import { color: var(--texte-2); }
.ticket { font: 700 .74rem/1 var(--mono); letter-spacing: .16em; padding: 6px 10px 5px; border: 2px solid currentColor; border-radius: 4px; -webkit-mask-image: var(--grain); mask-image: var(--grain); }
.ticket--ouverte { color: var(--ok); } .ticket--fermee { color: var(--retard); }
.badge { font: 700 .66rem var(--mono); letter-spacing: .04em; padding: 2px 7px; border-radius: 999px; white-space: nowrap; }
.badge--liste { background: var(--ok-doux); color: var(--ok); } .badge--hors { background: var(--attente-doux); color: var(--attente); }
.badge--neutre { background: var(--surface-2); color: var(--texte-2); }

/* ═══ L'ÉLÈVE : une copie Seyès ═══════════════════════════════════════════ */
body.eleve {
  background-color: var(--papier);
  background-image:
    linear-gradient(to right, transparent 21px, rgba(217, 88, 79, .45) 21px 22.5px, transparent 22.5px),
    repeating-linear-gradient(to bottom, transparent 0 31px, var(--seyes-fort) 31px 32px),
    repeating-linear-gradient(to bottom, transparent 0 7px, var(--seyes-fin) 7px 8px);
}
.copie { max-width: 540px; margin: 0 auto; padding: 0 18px 60px 34px; min-height: 100vh; }
.tete { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 18px 0 10px; border-bottom: 1.5px solid var(--encre); }
.tete-cours { font-size: .8rem; color: var(--texte-2); line-height: 1.25; }
.tete-cours b { color: var(--encre); }
.tete-cours span { display: block; font-size: .72rem; color: var(--texte-3); }
.puce-moi { display: grid; text-align: right; padding: 4px 10px; border: 1.5px solid var(--encre); border-radius: 999px; background: var(--surface); font-weight: 700; font-size: .84rem; line-height: 1.1; }
.puce-moi small { font: 500 .6rem var(--mono); color: var(--texte-3); }
.corps { display: grid; gap: 14px; padding-top: 22px; }
.corps.centre { text-align: center; justify-items: center; padding-top: 60px; }
.corps p { margin: 0; }
.h-copie { margin: 0; font: 400 2.3rem/1.02 var(--titre); letter-spacing: -.01em; }
.h-copie em { color: var(--encre); }
.compte-sis { font-size: .84rem; color: var(--texte-2); border-left: 3px solid var(--encre); padding: 4px 0 4px 10px; }
.compte-sis strong { color: var(--encre); }
.sablier { display: flex; gap: 10px; margin-bottom: 8px; }
.sablier span { width: 14px; height: 14px; border-radius: 50%; background: var(--encre); animation: respire 1.2s infinite ease-in-out; }
.sablier span:nth-child(2) { animation-delay: .2s; } .sablier span:nth-child(3) { animation-delay: .4s; }
@keyframes respire { 0%, 100% { opacity: .2; transform: scale(.8); } 50% { opacity: 1; transform: scale(1); } }
.fiche-mini { font: 600 .85rem var(--mono); padding: 6px 12px; border: 1.5px dashed var(--trait); border-radius: 8px; background: var(--surface); }
.polaroid { justify-self: center; width: 240px; padding: 14px 14px 10px; background: #fff; box-shadow: 4px 6px 0 var(--ombre); border: 1px solid var(--trait); transform: rotate(-2.2deg); text-align: center; margin: 0; }
.polaroid svg { width: 100%; height: auto; display: block; }
.polaroid figcaption { margin-top: 8px; font: italic 1.15rem/1.1 var(--titre); color: var(--encre); }
.choix { display: grid; text-align: left; gap: 2px; padding: 14px 16px; background: var(--surface); border: 1.5px solid var(--contour); border-radius: var(--rayon); box-shadow: 3px 3px 0 var(--ombre); }
.choix b { font-size: 1.05rem; } .choix span { font-size: .84rem; color: var(--texte-2); }
.choix:hover { background: var(--encre-douce); }
.code-geant { display: inline-block; font: 700 2.3rem/1 var(--mono); letter-spacing: .18em; color: var(--encre); padding: 10px 14px 8px 20px; border: 2px dashed var(--encre); border-radius: 12px; background: var(--surface); }
.saisie-code { font: 700 1.8rem var(--mono) !important; letter-spacing: .3em; text-transform: uppercase; text-align: center;
  width: 100%; min-width: 0; box-sizing: border-box; }
/* Un champ garde sinon sa largeur naturelle (20 caractères) et pousse la colonne hors de l'écran du téléphone (12/10). */
.copie input, .copie textarea, .copie select { max-width: 100%; }
.corps > *, .pile-v > *, .carte > * { min-width: 0; }
.membres { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.membres li { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; background: var(--surface); border: 1.5px solid var(--trait); border-radius: 10px; font-weight: 700; }
.membres li small { font-weight: 500; color: var(--texte-3); }
.membres li.vide { font-weight: 500; color: var(--texte-3); border-style: dashed; background: transparent; }
.statut { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .9rem; padding: 6px 10px; border-radius: 8px; justify-self: start; }
.statut--attente { background: var(--attente-doux); color: var(--attente); }
.statut--ok { background: var(--ok-doux); color: var(--ok); }
.statut--ferme { background: var(--retard-doux); color: var(--retard); }
.echeance { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: baseline; padding: 12px 14px; border: 1.5px solid var(--contour); border-radius: var(--rayon); background: var(--surface); }
.echeance span { grid-row: span 2; font: 700 .7rem var(--police); letter-spacing: .12em; text-transform: uppercase; color: var(--texte-3); }
.echeance b { font: 400 1.35rem/1.1 var(--titre); }
.echeance small { color: var(--ok); font-weight: 700; font-size: .8rem; }
.echeance.fermee { border-color: var(--retard); } .echeance.fermee small { color: var(--retard); }
.versions { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.versions li { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; padding: 8px 10px; background: var(--surface); border: 1px solid var(--trait); border-radius: 10px; font-size: .84rem; }
.versions li.foi { border-color: var(--encre); box-shadow: inset 3px 0 0 var(--encre); }
.versions li small { display: block; color: var(--texte-3); }
.versions button { all: unset; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; color: var(--encre); font-weight: 700; }
.travail { display: grid; gap: 6px; text-align: left; padding: 14px 16px; background: var(--surface); border: 1.5px solid var(--contour); border-radius: var(--rayon); box-shadow: 3px 3px 0 var(--ombre); }
.travail b { font-size: 1.02rem; } .travail small { color: var(--texte-3); }
.planche { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.vignette { margin: 0; display: grid; gap: 6px; }
.vignette .cadre { position: relative; aspect-ratio: 1 / 1.08; display: grid; place-items: center; background: rgba(20, 35, 45, .06); border-radius: 10px; overflow: hidden; }
.vignette img { max-width: 92%; max-height: 92%; box-shadow: 0 1px 2px rgba(0,0,0,.2), 2px 3px 0 rgba(0,0,0,.06); transition: transform .3s cubic-bezier(.3,1.4,.5,1); background: #fff; }
.vignette .num { position: absolute; top: 6px; left: 8px; font: 700 .72rem var(--mono); background: var(--surface); border: 1px solid var(--trait); border-radius: 6px; padding: 1px 6px; }
.outils { display: flex; justify-content: space-between; gap: 4px; }
.outils button { flex: 1; min-height: 38px; border: 1.5px solid var(--trait); background: var(--surface); border-radius: 8px; font-weight: 700; }
.outils button:disabled { opacity: .35; }
.page-plus { aspect-ratio: 1 / 1.08; border: 2px dashed var(--encre); border-radius: 10px; background: transparent; color: var(--encre); font: 400 2.4rem/1 var(--titre); display: grid; place-content: center; gap: 2px; }
.page-plus span { font: 700 .78rem var(--police); }
.pied-fixe { position: sticky; bottom: 0; padding: 12px 0 18px; background: linear-gradient(to bottom, transparent, var(--papier) 30%); }
.barre-envoi { height: 12px; border-radius: 6px; background: var(--encre-douce); overflow: hidden; border: 1px solid var(--encre); }
.barre-envoi i { display: block; height: 100%; width: 0; background: var(--encre); transition: width .2s; }
.recu-zone { display: grid; place-items: center; padding: 18px 0 6px; }
.meta { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 0; font-size: .88rem; }
.meta dt { color: var(--texte-3); } .meta dd { margin: 0; font-weight: 700; }
.appareils { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.appareils li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 12px; background: var(--surface); border: 1.5px solid var(--trait); border-radius: 10px; }
.appareils li b { display: block; font-size: .92rem; } .appareils li small { color: var(--texte-3); font-size: .78rem; }

/* ═══ L'ENSEIGNANT : le pupitre ═══════════════════════════════════════════ */
.bandeau { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 22px; border-bottom: 1.5px solid var(--contour); background: var(--papier); position: sticky; top: 0; z-index: 20; }
.marque { display: flex; align-items: center; gap: 10px; }
.sceau { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border: 2.5px solid var(--encre); border-radius: 50%; outline: 1.5px solid var(--encre); outline-offset: -6px; color: var(--encre); font: italic 1.3rem/1 var(--titre); transform: rotate(-9deg); -webkit-mask-image: var(--grain); mask-image: var(--grain); }
.marque h1 { margin: 0; font: 400 1.6rem/1 var(--titre); }
.bandeau select { font: 600 .9rem var(--police); padding: .45rem .6rem; border: 1.5px solid var(--contour); border-radius: 10px; background: var(--surface); max-width: 420px; }
.bandeau .espace { flex: 1; }
.page { padding: 20px 22px 60px; display: grid; gap: 18px; }
.pupitre { background: var(--surface); border: 1.5px solid var(--contour); border-radius: 18px; box-shadow: 6px 6px 0 var(--ombre); overflow: hidden; }
.pp-tete { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; padding: 20px 24px 16px; background: var(--papier); border-bottom: 1.5px solid var(--contour); }
.pp-titre { margin: 4px 0 6px; font: 400 2.2rem/1.02 var(--titre); letter-spacing: -.01em; }
.pp-titre em { color: var(--encre); }
.pp-etat { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--texte-2); font-size: .88rem; }
.pp-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.code-seance { font: 700 1rem var(--mono); letter-spacing: .14em; padding: 2px 8px; border: 1.5px dashed var(--encre); border-radius: 6px; color: var(--encre); }
.compteurs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border-bottom: 1.5px solid var(--contour); }
.compteurs div { padding: 10px 14px; border-right: 1px solid var(--trait); font-size: .78rem; color: var(--texte-2); }
.compteurs div:last-child { border-right: 0; }
.compteurs b { display: block; font: 400 1.8rem/1 var(--titre); color: var(--texte); }
.compteurs .c-attente b { color: var(--attente); } .compteurs .c-saisi b { color: var(--saisi); } .compteurs .c-rien b { color: var(--retard); }
.pp-grille { display: grid; grid-template-columns: minmax(280px, .9fr) minmax(0, 1.7fr); }
.pp-col { padding: 16px 20px 22px; display: grid; gap: 12px; align-content: start; min-width: 0; }
.pp-col + .pp-col { border-left: 1.5px solid var(--contour); }
.pp-col h3 { margin: 6px 0 0; font: 400 1.4rem/1.1 var(--titre); display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.nb { font: 700 .75rem var(--mono); color: var(--texte-3); border: 1px solid var(--trait); border-radius: 999px; padding: 1px 8px; }
.vide-note { margin: 0; color: var(--texte-3); font-size: .86rem; font-style: italic; }
.attendant { padding: 10px 12px; border: 1.5px solid var(--trait); border-radius: 10px; background: var(--papier); display: grid; gap: 8px; }
.attendant.nouveau { animation: flash 1.6s ease-out; }
@keyframes flash { 0% { background: var(--jaune); border-color: var(--contour); } 100% { background: var(--papier); } }
.attendant-tete { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.attendant-tete b { font-size: .95rem; }
.attendant small { color: var(--texte-3); font-size: .78rem; }
.attendant select { font: 500 .82rem var(--police); padding: .35rem .5rem; border: 1.5px solid var(--trait); border-radius: 8px; background: var(--surface); max-width: 100%; }
.present { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; padding: 8px 4px; border-bottom: 1px dotted var(--trait); }
.present > b { font-size: .9rem; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.present button.nom { all: unset; cursor: pointer; font-weight: 700; text-decoration: underline dotted; text-underline-offset: 3px; }
.appareils-puces { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px; }
.puce-app { font: 600 .68rem var(--mono); padding: 2px 7px; border-radius: 999px; border: 1px solid var(--trait); background: var(--surface); color: var(--texte-2); }
.puce-app.actif { border-color: var(--ok); color: var(--ok); }
.puce-app.attente { border-color: var(--attente); color: var(--attente); background: var(--attente-doux); }
.puce-app.aucun { border-style: dashed; color: var(--texte-3); }
.etiquette { font-size: .76rem; padding: 3px 8px; border-radius: 999px; background: var(--surface-2); color: var(--texte-2); border: 0; }
button.etiquette:hover { background: var(--encre-douce); }
.journal { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; font-size: .78rem; max-height: 300px; overflow: auto; }
.journal li { display: grid; grid-template-columns: 46px 1fr; gap: 8px; padding: 4px 0; border-bottom: 1px dotted var(--trait); color: var(--texte-2); }
.journal li time { font: 600 .72rem var(--mono); color: var(--texte-3); padding-top: 1px; }
.collecte { border: 1.5px solid var(--contour); border-radius: 14px; background: var(--papier); overflow: hidden; }
.collecte-tete { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; align-items: flex-start; padding: 12px 14px; border-bottom: 1.5px solid var(--contour); background: var(--surface); }
.collecte-tete h4 { margin: 0; font: 400 1.5rem/1.05 var(--titre); }
.collecte-tete p { margin: 2px 0 0; font-size: .82rem; color: var(--texte-2); }
.collecte-corps { padding: 10px 14px 14px; display: grid; gap: 10px; }
.registre { position: relative; border-top: 1.5px solid var(--trait); }
.registre::before { content: ""; position: absolute; top: 0; bottom: 0; left: 62px; width: 1.5px; background: rgba(217, 88, 79, .55); }
.ligne { position: relative; display: grid; grid-template-columns: 62px minmax(0, 1.1fr) minmax(0, 1.5fr); grid-template-areas: "id membres etat" "id actions actions"; gap: 6px 14px; padding: 12px 0; border-bottom: 1px solid var(--trait); }
.ligne.nouveau { animation: flash 1.6s ease-out; }
.ligne-id { grid-area: id; padding: 2px 10px 0 4px; font: 700 .95rem var(--mono); color: var(--encre); }
.ligne-id small { display: block; font: 500 .64rem var(--mono); color: var(--texte-3); margin-top: 2px; }
.ligne-membres { grid-area: membres; font-weight: 700; display: grid; gap: 2px; align-content: start; font-size: .92rem; }
.ligne-membres span { font-weight: 400; font-size: .78rem; color: var(--texte-3); }
.ligne-etat { grid-area: etat; display: grid; gap: 4px; align-content: start; justify-items: start; font-size: .8rem; color: var(--texte-2); }
.ligne-actions { grid-area: actions; display: flex; flex-wrap: wrap; gap: 6px; }
.ligne--attente { background: linear-gradient(to right, transparent 62px, rgba(245, 216, 54, .16) 62px); }
.ligne--ouvert { opacity: .8; }
.historique { grid-column: 2 / -1; list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 6px; }
.historique li { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: start; font-size: .8rem; padding: 8px 10px; border: 1px solid var(--trait); border-radius: 8px; background: var(--surface); }
.historique li.retire { opacity: .5; text-decoration: line-through; }
.historique li small { display: block; color: var(--texte-3); }
.edt { display: grid; gap: 8px; }
.edt-ligne { display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1.5px solid var(--trait); border-radius: 10px; background: var(--surface); }
.edt-ligne time { font: 700 .82rem var(--mono); color: var(--encre); }
.edt-ligne small { display: block; color: var(--texte-3); }
.edt-ligne.maintenant { border-color: var(--encre); box-shadow: inset 4px 0 0 var(--encre); }
.jour { margin: 8px 0 0; font: 700 .72rem var(--police); letter-spacing: .1em; text-transform: uppercase; color: var(--texte-3); }

/* ── Calques : modale, tiroir, projection ────────────────────────────────── */
.voile { position: fixed; inset: 0; z-index: 40; background: rgba(18, 30, 40, .45); backdrop-filter: blur(2px); display: grid; place-items: start center; overflow-y: auto; padding: 5vh 16px; }
.modale { position: relative; width: min(620px, 100%); background: var(--papier); border: 1.5px solid var(--contour); border-radius: 16px; box-shadow: 8px 8px 0 rgba(0, 30, 45, .3); padding: 22px 24px 20px 46px; display: grid; gap: 14px; background-image: linear-gradient(to right, transparent 28px, rgba(217, 88, 79, .5) 28px 29.5px, transparent 29.5px); animation: monte .25s ease-out; }
.modale h2 { margin: 0; font: 400 1.9rem/1.05 var(--titre); }
.modale h2 em { color: var(--saisi); }
.modale p { margin: 0; }
.modale fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 6px; }
.modale legend { font-size: .82rem; font-weight: 700; color: var(--texte-2); margin-bottom: 4px; }
.puces { display: flex; flex-wrap: wrap; gap: 6px; }
.puce { padding: 6px 11px; border: 1.5px solid var(--trait); border-radius: 999px; background: var(--surface); font-weight: 700; font-size: .84rem; }
.puce.actif { border-color: var(--saisi); background: var(--saisi-doux); color: var(--saisi); }
.deux { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.zone-depot { display: grid; place-items: center; min-height: 74px; padding: 12px; text-align: center; border: 2px dashed var(--saisi); border-radius: 12px; background: var(--surface); color: var(--saisi); font-weight: 700; cursor: pointer; }
.zone-depot.pleine { border-style: solid; background: var(--saisi-doux); }
.apercu-saisi { display: grid; justify-items: center; gap: 8px; padding: 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--trait); }
.modale-pied { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.cases { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 4px 12px; max-height: 240px; overflow: auto; padding: 4px; border: 1px solid var(--trait); border-radius: 10px; background: var(--surface); }
.cases label { display: flex; gap: 6px; align-items: center; font-size: .86rem; }
@keyframes monte { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.tiroir { position: fixed; top: 0; right: 0; bottom: 0; z-index: 41; width: min(520px, 100%); overflow-y: auto; background: var(--papier); border-left: 1.5px solid var(--contour); box-shadow: -8px 0 0 rgba(0, 30, 45, .18); padding: 22px 24px 30px; display: grid; gap: 16px; align-content: start; animation: glisse .25s ease-out; }
@keyframes glisse { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.tiroir h2 { margin: 0; font: 400 2rem/1 var(--titre); }
.tiroir h3 { margin: 6px 0 0; font: 700 .74rem var(--police); letter-spacing: .12em; text-transform: uppercase; color: var(--encre); }
.reglage { display: grid; gap: 6px; padding-bottom: 14px; border-bottom: 1px solid var(--trait); }
.reglage h4 { margin: 0; font-size: .95rem; }
.reglage .qui { margin: 0; font-size: .78rem; color: var(--texte-3); }
.segments { display: grid; gap: 6px; }
.segments button { display: grid; text-align: left; gap: 1px; padding: 8px 12px; border: 1.5px solid var(--trait); border-radius: 10px; background: var(--surface); }
.segments button b { font-size: .88rem; } .segments button small { font-size: .75rem; color: var(--texte-3); }
.segments button.actif { border-color: var(--encre); background: var(--encre-douce); box-shadow: inset 4px 0 0 var(--encre); }
.segments--ligne { grid-template-columns: repeat(3, 1fr); }
.projection { position: fixed; inset: 0; z-index: 50; background: var(--papier) var(--bruit); display: grid; place-content: center; justify-items: center; gap: 2vh; text-align: center; cursor: zoom-out; padding: 3vh 16px; }
.projection .qr { width: min(58vh, 82vw); background: #fff; padding: 8px; border: 1.5px solid var(--contour); box-shadow: 8px 8px 0 var(--ombre); }
.projection .qr svg { display: block; width: 100%; height: auto; }
.pj-cours { margin: 0; font: italic clamp(1.2rem, 3.4vh, 2.2rem)/1.1 var(--titre); color: var(--encre); }
.pj-url { margin: 0; font: 700 clamp(1.6rem, 5.4vh, 3.8rem)/1 var(--mono); }
.pj-code { margin: 0; font-size: clamp(1rem, 2.8vh, 1.8rem); color: var(--texte-2); }
.pj-code b { font-family: var(--mono); letter-spacing: .16em; color: var(--texte); }
.pj-compteurs { display: flex; gap: 28px; flex-wrap: wrap; justify-content: center; font-size: clamp(.9rem, 2.2vh, 1.3rem); color: var(--texte-2); }
.pj-compteurs b { font: 400 clamp(1.6rem, 4.6vh, 3rem)/1 var(--titre); color: var(--texte); display: block; }
.qr-carte { justify-self: center; width: 220px; background: #fff; padding: 8px; border: 1px solid var(--trait); }
.qr-carte svg { display: block; width: 100%; height: auto; }

#toast { position: fixed; left: 50%; bottom: 22px; z-index: 60; transform: translate(-50%, 30px); opacity: 0; max-width: min(560px, calc(100% - 32px)); padding: 10px 16px; border-radius: 10px; background: var(--texte); color: #fff; font-size: .9rem; font-weight: 600; pointer-events: none; transition: transform .25s, opacity .25s; box-shadow: 4px 4px 0 rgba(0, 0, 0, .2); }
#toast.vu { transform: translate(-50%, 0); opacity: 1; }
#toast.erreur { background: var(--retard); }
.apparait { animation: monte .35s ease-out both; }

@media (max-width: 1250px) {
  .pp-grille { grid-template-columns: 1fr; }
  .pp-col + .pp-col { border-left: 0; border-top: 1.5px solid var(--contour); }
  .pp-col--collectes { order: -1; }
  .compteurs { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 560px) {
  .bandeau { padding: 10px 14px; }
  .page { padding: 14px 10px 40px; }
  .pp-tete { padding: 16px 14px; }
  .pp-col { padding: 14px; }
  .compteurs { grid-template-columns: repeat(2, 1fr); }
  .ligne { grid-template-columns: 54px minmax(0, 1fr); grid-template-areas: "id membres" "id etat" "id actions"; }
  .registre::before { left: 54px; }
  .deux { grid-template-columns: 1fr; }
  .modale { padding: 18px 16px 16px 36px; }
  .edt-ligne { grid-template-columns: 1fr; }
  .copie { padding: 0 14px 50px 30px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ── Le panneau « Retour » (11/10, repris du Makerspace ← SAGIP v2 ← carnet Tango) ────────── */
.ameliorer-poignee {
  position: fixed; right: 0; top: 46%; z-index: 45; writing-mode: vertical-rl; transform: rotate(180deg);
  background: var(--jaune); color: #2b2400; border: 1.5px solid var(--contour); border-left: 0; border-radius: 0 10px 10px 0;
  padding: .8rem .35rem; cursor: pointer; font: 700 .74rem var(--mono); letter-spacing: .08em; text-transform: uppercase;
}
.ameliorer-tiroir {
  position: fixed; right: 0; top: 0; bottom: 0; width: min(380px, 100vw); z-index: 70; background: var(--papier);
  border-left: 1.5px solid var(--contour); padding: 16px; overflow: auto; box-shadow: -6px 0 0 rgba(0, 30, 45, .18);
  display: grid; gap: 10px; align-content: start;
}
.ameliorer-tete { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ameliorer-tiroir h2 { margin: 0; font: 400 1.6rem/1.05 var(--titre); }
.ameliorer-tiroir p { margin: 0; }
.ameliorer-tiroir textarea { width: 100%; border: 1.5px solid var(--contour); border-radius: 10px; padding: .55rem; background: var(--surface); font: inherit; resize: vertical; }
.ameliorer-natures { display: flex; flex-wrap: wrap; gap: 5px; }
.ameliorer-natures .choisi { background: var(--texte); border-color: var(--texte); color: var(--papier); }
.ameliorer-cible { display: flex; gap: 6px; align-items: center; justify-content: space-between; background: var(--surface-2); border-radius: 8px; padding: .35rem .5rem; font-size: .85rem; }
.ameliorer-anonyme { display: flex; gap: 6px; align-items: center; font-size: .86rem; }
.ameliorer-bandeau {
  position: fixed; left: 50%; top: .6rem; transform: translateX(-50%); z-index: 90; background: var(--texte); color: var(--papier);
  padding: .5rem .85rem; border-radius: 12px; display: flex; gap: .7rem; align-items: center;
}
.ameliorer-survol { outline: 3px dashed var(--marge) !important; outline-offset: 2px; }
.ameliorer-ancien { border-top: 1px dashed var(--trait); padding-top: 6px; margin-top: 6px; }
.ameliorer-ancien p { white-space: pre-wrap; }
/* au pupitre : la liste des retours reçus */
.retour-recu { border-top: 1px dashed var(--trait); padding: 8px 0; display: grid; gap: 4px; }
.retour-recu p { margin: 0; white-space: pre-wrap; }
.retour-recu.fait { opacity: .6; }
.retour-recu.ecarte { opacity: .4; text-decoration: line-through; }
@media print { .ameliorer-poignee { display: none !important; } }
/* l'accueil du pupitre : filtrer par année scolaire et par cours (11/10) */
.filtres { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filtres select { font: inherit; padding: .35rem .5rem; border: 1.5px solid var(--contour); border-radius: 10px; background: var(--surface); }
.filtres .puce small { font: 500 .66rem var(--mono); color: var(--texte-3); }
.filtres .puce.actif small { color: inherit; opacity: .8; }
/* le calque « Membres » : une ligne par personne (11/10) */
.cases.cases--lignes { grid-template-columns: 1fr; max-height: 320px; }
.cases--lignes > .rangee { justify-content: space-between; border-bottom: 1px dashed var(--trait); padding: 3px 0; }
.cases--lignes > .rangee:last-child, .cases--lignes > label:last-child { border-bottom: 0; }
.cases--lignes > label { border-bottom: 1px dashed var(--trait); padding: 3px 0; }
.cases--lignes small.petit { margin-left: auto; }
@media (max-width: 600px) { .ameliorer-poignee { top: auto; bottom: 96px; padding: .6rem .3rem; } }

/* ── Les éléments d'un espace ou d'une séance : documents, liens, textes, questions (11/10) ─────── */
.elements { margin-bottom: 4px; }
.elements-liste { display: grid; gap: 0; }
.element { display: grid; grid-template-columns: 30px 1fr; gap: 10px; padding: 10px 0; border-top: 1px dashed var(--trait); }
.element:first-child { border-top: 0; }
.element-icone { font-size: 1.3rem; line-height: 1.6; text-align: center; }
.element-corps { display: grid; gap: 5px; min-width: 0; }
.element-corps > small { color: var(--texte-3); font-size: .78rem; overflow-wrap: anywhere; }
.element--masque { opacity: .62; }
.element--masque .element-corps > b::after { content: "  · masqué"; font: 600 .7rem var(--mono); color: var(--attente); }
.segments--mini { display: flex; flex-wrap: wrap; gap: 4px; }
.segments--mini button { padding: 2px 9px; font-size: .74rem; font-weight: 700; border-radius: 999px; }
/* la synthèse d'une question : des barres, ou des textes — jamais un nom */
.barres { display: grid; gap: 6px; width: 100%; }
.barre { display: grid; grid-template-columns: minmax(8rem, 1.2fr) 2fr 2.5rem; gap: 10px; align-items: center; }
.barre-t { font-weight: 700; }
.barre-v { height: 1.1rem; border-radius: 6px; background: linear-gradient(to right, var(--encre) var(--p), var(--surface-2) var(--p)); border: 1px solid var(--trait); }
.barre.juste .barre-v { background: linear-gradient(to right, var(--ok) var(--p), var(--surface-2) var(--p)); }
.barre.juste .barre-t { color: var(--ok); }
.barre b { font-family: var(--mono); text-align: right; }
.synthese-textes { display: grid; gap: 6px; padding: 0; margin: 0; list-style: none; max-height: 50vh; overflow: auto; }
.synthese-textes li { background: var(--surface); border: 1px solid var(--trait); border-radius: 10px; padding: 6px 10px; white-space: pre-wrap; }
.pj-question { width: min(1100px, 92vw); font-size: clamp(1rem, 2.8vh, 1.8rem); text-align: left; }
.pj-question .barre { grid-template-columns: minmax(10rem, 1.2fr) 2fr 3rem; }
.pj-question .barre-v { height: 2.4vh; }
/* côté élève */
.doc { display: grid; grid-template-columns: 28px 1fr; gap: 8px; align-items: start; padding: 10px 12px; border: 1.5px solid var(--contour); border-radius: 12px; background: var(--surface); text-align: left; color: var(--texte); text-decoration: none; width: 100%; font: inherit; }
.doc small { display: block; color: var(--texte-3); font-size: .78rem; }
.doc-texte { white-space: pre-wrap; margin: 6px 0 0; font-size: .92rem; }
.question { display: grid; gap: 8px; padding: 12px; border: 1.5px solid var(--encre); border-radius: 12px; background: var(--surface); }
.question > b { font-size: 1.02rem; }
.question label { display: flex; gap: 8px; align-items: center; padding: 6px 8px; border: 1px solid var(--trait); border-radius: 8px; background: var(--papier); }
.question textarea { width: 100%; font: inherit; border: 1.5px solid var(--contour); border-radius: 10px; padding: .5rem; }

/* ── Le projet (24/10) : la fiche, l'étape, le fil — des deux côtés ───────────────────────── */
.etape { display: inline-block; padding: 2px 9px; border-radius: 999px; background: var(--encre-douce); color: var(--encre-fonce); font: 700 .74rem var(--police); border: 1px solid var(--encre); white-space: nowrap; }
.fiche { border-color: var(--encre); }
.fiche .doc-texte { margin: 0; }
.fiche details summary, .autres summary, .fil details summary, .questions-projet summary { cursor: pointer; font-size: .84rem; font-weight: 700; color: var(--encre); }
.fiche .versions li { grid-template-columns: auto minmax(0, 1fr); align-items: start; }
.fil { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.fil li { display: grid; gap: 4px; padding: 8px 10px; border: 1px solid var(--trait); border-radius: 10px; background: var(--surface); min-width: 0; }
.fil li > time { font: 600 .72rem var(--mono); color: var(--texte-3); }
.fil li > div { min-width: 0; }
.fil .doc-texte { margin: 2px 0 0; overflow-wrap: anywhere; }
.fil li.fil-prof { border-color: var(--saisi); box-shadow: inset 3px 0 0 var(--saisi); }
.fil li.fil-fiche { background: transparent; border-style: dashed; color: var(--texte-2); font-size: .84rem; }
.fil li.fil-question { border-color: var(--encre); }
.fil li.fil-question > .question { border: 0; padding: 0; background: transparent; }
.fil .mini, .fil .btn { justify-self: start; }
.travail--projet { border-color: var(--encre); box-shadow: 3px 3px 0 var(--ombre), inset 4px 0 0 var(--encre); }
.travail--projet .sur-titre { font-size: .66rem; }
.autres { display: grid; gap: 8px; }
.autres .doc { border-color: var(--trait); }
/* au pupitre */
.projet .collecte-tete { background: linear-gradient(to right, var(--encre-douce), var(--surface) 40%); }
.ligne-membres button.nom { all: unset; cursor: pointer; font-weight: 700; text-decoration: underline dotted; text-underline-offset: 3px; overflow-wrap: anywhere; }
.ligne-etat .extrait { font-size: .8rem; color: var(--texte-2); overflow-wrap: anywhere; }
.questions-projet { border-top: 1px dashed var(--trait); padding-top: 6px; }
.modale .fil li { grid-template-columns: 92px minmax(0, 1fr); }
.modale .fil li > time { padding-top: 2px; }
.segments--quatre { grid-template-columns: repeat(4, 1fr); }
/* les fichiers attendus d'un travail (24/10) : une puce par extension */
.puces-types { gap: 4px; }
.puces-types .puce { padding: 3px 9px; font: 700 .76rem var(--mono); }
.pj-projets { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 90vw), 1fr)); gap: 2.2vh 2vw; width: min(1500px, 94vw); text-align: left; }
.pj-projet { display: grid; gap: 1vh; padding: 2vh 1.4vw; background: var(--surface); border: 1.5px solid var(--contour); border-radius: 14px; box-shadow: 5px 5px 0 var(--ombre); }
.pj-projet .pj-g { font: 700 clamp(.9rem, 2.2vh, 1.4rem) var(--mono); color: var(--encre); }
.pj-projet h3 { margin: 0; font: 400 clamp(1.3rem, 3.6vh, 2.4rem)/1.05 var(--titre); }
.pj-projet .barre-v { height: 1.4vh; }
.pj-projet small { font-size: clamp(.85rem, 2vh, 1.2rem); color: var(--texte-2); }
@media (max-width: 560px) {
  .modale .fil li { grid-template-columns: 1fr; }
  .segments--quatre { grid-template-columns: 1fr 1fr; }
}

/* ── L'examen (7/11/2026) : la page de l'élève (examen.js), le suivi et la correction au pupitre (pupitre-examen.js) ── */
.travail--examen { border-color: var(--saisi); box-shadow: 3px 3px 0 var(--ombre), inset 4px 0 0 var(--saisi); }
.copie.copie--examen { max-width: 860px; }
.exa { gap: 16px; }
.exa-barre { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 0 -10px; padding: 8px 10px; background: var(--papier); border-bottom: 1.5px solid var(--encre); }
.exa-temps { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--encre); }
.exa-temps--fin { color: var(--retard); }
.exa-enregistre { flex: 1; font-size: .84rem; color: var(--ok); }
.exa-enregistre--ko { color: var(--retard); font-weight: 700; }
.exa-consignes { margin: 0; padding-left: 1.2em; display: grid; gap: 4px; }
.exa-partie { display: grid; gap: 12px; padding-top: 8px; }
.exa-partie > h3 { margin: 0; font: 400 1.5rem/1.1 var(--titre); color: var(--encre); border-bottom: 1px solid var(--trait); }
.exa-partie > p { margin: 0; }
.exa-question { display: grid; gap: 8px; padding: 12px; border: 1.5px solid var(--contour); border-radius: var(--rayon); background: var(--surface); min-width: 0; }
.exa-q-tete { display: flex; justify-content: space-between; gap: 8px; }
.exa-points { font-size: .8rem; color: var(--texte-3); }
.exa-enonce { margin: 0; }
.exa-code { margin: 0; padding: 8px 10px; overflow-x: auto; background: #f4f1e8; border: 1px solid var(--trait); border-radius: 8px; font: .8rem/1.45 var(--mono); max-width: 100%; }
.exa-code code { counter-reset: l; display: block; font-size: 1em; }
.exa-l { counter-increment: l; }
.exa-l::before { content: counter(l); display: inline-block; min-width: 2.2em; margin-right: .8em; text-align: right; color: var(--texte-3); user-select: none; -webkit-user-select: none; }
.exa-question textarea, .exa-tableau textarea, .exa-crc textarea { width: 100%; font: inherit; border: 1.5px solid var(--contour); border-radius: 10px; padding: .5rem; background: #fff; }
.exa-saisie-code { font-family: var(--mono) !important; font-size: .86rem !important; tab-size: 2; white-space: pre; overflow-x: auto; }
.exa-case { width: 7.5em; max-width: 100%; font: inherit; font-family: var(--mono); padding: .4rem .5rem; border: 1.5px solid var(--contour); border-radius: 8px; background: #fff; }
.exa-question > .exa-case { width: min(100%, 32em); }   /* 9/11 au soir : une case seule reçoit une ligne de code */
.exa-cases { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; }
.exa-etiquette { font-weight: 700; align-self: center; }
.exa-cellule { display: grid; gap: 2px; justify-items: start; }
.exa-cellule > span { font-weight: 700; color: var(--encre); }
.exa-tableau { display: grid; gap: 10px; }
.exa-ligne { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; border: 1px solid var(--trait); border-radius: 10px; padding: 8px; margin: 0; }
.exa-ligne legend { font-weight: 700; padding: 0 4px; }
.exa-ligne label, .exa-crc label { display: grid; gap: 2px; font-size: .84rem; }
.exa-crc { display: grid; gap: 8px; padding: 10px; border: 1.5px dashed var(--encre); border-radius: 10px; }
.exa-rendre { display: grid; gap: 10px; padding: 14px 0; }
.exa-fige { margin: 0; padding: 12px 14px; border-radius: 10px; background: var(--ok-doux); color: var(--ok); font-weight: 700; }
.exa-annexe { position: fixed; inset: 0; z-index: 60; display: grid; grid-template-rows: auto auto 1fr; gap: 8px; padding: 12px 14px; background: var(--papier); }
.exa-annexe-tete { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.exa-annexe .exa-code { overflow: auto; }
.exa input[readonly], .exa textarea[readonly] { background: var(--surface-2); color: var(--texte-2); }

.modale:has(.exa-corr-tete), .modale:has(.exa-table) { width: min(1100px, 100%); }
.exa-table-defile { overflow-x: auto; }
.exa-table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.exa-table th, .exa-table td { padding: 5px 8px; border-bottom: 1px solid var(--trait); text-align: left; vertical-align: top; }
.exa-table th { font-size: .74rem; color: var(--texte-2); }
.exa-table tr.exa-alerte td:nth-child(4), .exa-table tr.exa-alerte td:nth-child(5) { color: var(--retard); font-weight: 700; }
.exa-table--notes td, .exa-table--notes th { text-align: center; padding: 4px 5px; }
.exa-table--notes td:first-child { text-align: left; white-space: nowrap; }
.exa-a-corriger { background: var(--attente-doux); color: var(--attente); font-weight: 700; }
.exa-corr-tete { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.exa-corr-reste { flex: 1; text-align: right; font-weight: 700; color: var(--attente); }
.exa-corr-nav { display: flex; gap: 6px; align-items: center; }
.exa-corr-nav select { flex: 1; min-width: 0; font: inherit; padding: .35rem; border: 1.5px solid var(--contour); border-radius: 8px; }
.exa-corr-sujet { display: grid; gap: 8px; padding: 10px 12px; border-left: 3px solid var(--encre); background: var(--surface); }
.exa-corr-sujet summary { cursor: pointer; font-weight: 700; color: var(--encre); }
.exa-corr-copies { display: grid; gap: 10px; }
.exa-corr-copie { display: grid; gap: 6px; padding: 10px 12px; border: 1.5px solid var(--attente); border-radius: 10px; background: var(--surface); }
.exa-corr-copie.exa-note-faite { border-color: var(--trait); }
.exa-corr-qui { display: flex; gap: 10px; align-items: baseline; }
.exa-alerte-txt { color: var(--retard); }
.exa-corr-note { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.exa-pts { width: 5.5em; font: inherit; padding: .3rem .4rem; border: 1.5px solid var(--contour); border-radius: 8px; }
.exa-mot { flex: 1; min-width: 12em; font: inherit; padding: .3rem .5rem; border: 1px solid var(--trait); border-radius: 8px; }
.exa-lu { margin: 0; white-space: pre-wrap; word-break: break-word; font: inherit; }
.exa-lu--code { font: .82rem/1.4 var(--mono); white-space: pre; overflow-x: auto; background: #f4f1e8; padding: 6px 8px; border-radius: 6px; }
.exa-cases--lu b { font-family: var(--mono); }
.exa-tableau--lu .exa-ligne { grid-template-columns: 2em repeat(auto-fit, minmax(200px, 1fr)); }
@media (max-width: 560px) {
  .exa-barre { margin: 0 -6px; }
  .exa-code { font-size: .74rem; }
  .exa-ligne { grid-template-columns: 1fr; }
}

/* ── L'examen, le 7/11 au soir : le code coloré, les replis, l'annexe à côté, les QCM, la reprise ─────────────── */
.tk-com { color: #6b7a84; font-style: italic; } .tk-str { color: #0b6a55; } .tk-num { color: #b5531a; }
.tk-mot { color: #7a2f8f; font-weight: 700; } .tk-this { color: #b42318; } .tk-cls { color: #1d5fa8; font-weight: 700; } .tk-prive { color: #a03a7a; }
.exa-pli { border: 1px solid var(--trait); border-radius: 8px; background: #f4f1e8; }
.exa-pli > summary { cursor: pointer; padding: 4px 10px; font-size: .82rem; font-weight: 700; color: var(--encre); }
.exa-pli > .exa-code { border: 0; border-top: 1px solid var(--trait); border-radius: 0 0 8px 8px; }
.exa-lien { all: unset; cursor: pointer; border-bottom: 1.5px dotted var(--encre); }
.exa-lien code { color: var(--encre); }
.exa-lien:hover, .exa-lien:focus-visible { background: var(--encre-douce); border-radius: 3px; }
.exa-l--vise { background: #fff1b8; box-shadow: -4px 0 0 #e0b400; }
.exa-annexe { position: fixed; inset: 0; z-index: 60; display: grid; grid-template-rows: auto auto 1fr; gap: 6px; padding: 10px 12px; background: var(--papier); }
.exa-annexe-tete { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.exa-annexe-tete > b { flex: 1; min-width: 10em; }
.exa-annexe-vise { font: .8rem var(--mono); color: var(--attente); }
.exa-annexe-corps { overflow: auto; display: grid; gap: 6px; align-content: start; grid-auto-rows: max-content; }
/* 9/11 au soir (Cédrick) : sans grid-auto-rows, une annexe plus haute que l'écran tassait chaque bloc à deux lignes. */
.exa-annexe-corps > .exa-code { margin: 0; }
@media (min-width: 1100px) {
  .exa-annexe { left: auto; width: min(46vw, 760px); border-left: 1.5px solid var(--encre); box-shadow: -6px 0 18px rgba(0, 30, 45, .12); }
  body.annexe-ouverte .copie.copie--examen { margin-left: 2vw; margin-right: calc(min(46vw, 760px) + 2vw); }
}
.exa-choix { display: grid; gap: 6px; }
.exa-choix label { display: flex; gap: 8px; align-items: flex-start; padding: 7px 9px; border: 1px solid var(--trait); border-radius: 8px; background: #fff; cursor: pointer; }
.exa-choix label input { margin-top: 3px; flex: none; }
.exa-choix label:has(input:checked) { border-color: var(--encre); background: var(--encre-douce); }
.exa-choix code { white-space: pre-wrap; word-break: break-word; }
.exa-reprendre { justify-self: start; }
.exa-choix--lu { display: grid; gap: 3px; font-size: .9rem; }
.exa-choix--lu .coche { font-family: var(--mono); }
.exa-choix--lu .juste { color: var(--ok); font-weight: 700; }

/* ── L'examen, le 9/11 : la partie sur leur code (la ligne ►, la question de chacun au pupitre) ─────────────── */
.exa-l--marque { background: #fdeccc; }
.exa-l--marque::before { content: '► ' counter(l); color: #b5531a; font-weight: 700; }
.exa-corr-sienne { border-left: 3px solid var(--saisi); padding: 4px 10px; background: var(--saisi-doux); border-radius: 0 8px 8px 0; }
.exa-corr-sienne > summary { cursor: pointer; font-weight: 700; color: var(--saisi); }
/* Un code replié ne pousse pas sa carte hors de l'écran (vu à 375 px, 9/11) : le repli et ses enfants tiennent dans la colonne. */
.exa-question > *, .exa-partie > *, .exa-pli, .exa-pli > * { min-width: 0; max-width: 100%; }
.exa-pli { overflow: hidden; }
