/* Gardiens de l'ordinateur : feuille de style unique. Les couleurs et les polices sont des jetons définis dans :root. */

/* Polices hébergées avec le site (licence OFL, voir polices/LICENCES.txt) : aucune requête vers un tiers. */
@font-face { font-family: "Atkinson Hyperlegible"; src: url("polices/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("polices/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Playwrite FR Moderne"; src: url("polices/playwrite-fr-moderne-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

:root {
  /* Cahier d'écolier le jour, ardoise la nuit. Sommaire à gauche, page de cahier à droite. */
  --papier: #f6f4ea;
  --carte: #fffefa;
  --encre: #1e2a52;
  --encre-douce: #56618c;
  --ligne: #cbd7ef;
  --marge: #d5463c;
  --accent: #2747b0;
  --sur-accent: #ffffff;
  --bon: #1d7a4c;
  --soleil: #efb226;
  --chipeur: #6b4d96;
  --titre: "Playwrite FR Moderne", "Segoe Script", "Bradley Hand", cursive;
  --corps: "Atkinson Hyperlegible", Verdana, "Trebuchet MS", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --papier: #18221f;
    --carte: #22302c;
    --encre: #eef0e3;
    --encre-douce: #b3bfb1;
    --ligne: #34493f;
    --marge: #f08d82;
    --accent: #a3bcff;
    --sur-accent: #141d2e;
    --bon: #7fd8a4;
    --soleil: #f3cd63;
    --chipeur: #b9a0e8;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --papier: #18221f;
  --carte: #22302c;
  --encre: #eef0e3;
  --encre-douce: #b3bfb1;
  --ligne: #34493f;
  --marge: #f08d82;
  --accent: #a3bcff;
  --sur-accent: #141d2e;
  --bon: #7fd8a4;
  --soleil: #f3cd63;
  --chipeur: #b9a0e8;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--corps);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--encre);
  background-color: var(--papier);
  /* réglure du cahier : une ligne forte toutes les 32 px, trois fines entre deux */
  background-image:
    repeating-linear-gradient(0deg, transparent 0 31px, var(--ligne) 31px 32px),
    repeating-linear-gradient(0deg, transparent 0 7px, color-mix(in srgb, var(--ligne) 40%, transparent) 7px 8px),
    repeating-linear-gradient(90deg, transparent 0 31px, color-mix(in srgb, var(--ligne) 60%, transparent) 31px 32px);
}
h1, h2, h3, p, ol, ul, dl, dd, figure, fieldset { margin: 0; padding: 0; }
ol, ul { list-style: none; }
fieldset { border: 0; min-width: 0; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 3px solid var(--soleil); outline-offset: 3px; }

.page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 20px 72px;
  display: grid;
  grid-template-columns: 256px minmax(0, 1fr);
  gap: 28px 32px;
  align-items: start;
}

/* ---------- En-tête ---------- */
.entete {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 18px 40px;
  align-items: flex-end;
  justify-content: space-between;
  background: var(--papier);
  padding: 4px 0 12px;
}
.entete-titre { display: flex; gap: 18px; align-items: center; }
.entete-titre svg { flex: none; }
.entete h1 {
  font-family: var(--titre);
  font-weight: 400;
  font-size: clamp(1.6rem, 4.4vw, 2.3rem);
  line-height: 1.7;
  text-wrap: balance;
}
.entete .chapeau { max-width: 52ch; color: var(--encre-douce); }
.compteur-points { display: flex; flex-direction: column; gap: 6px; }
.compteur-points p { font-size: .9rem; font-weight: 700; color: var(--encre-douce); }
.points { display: flex; gap: 6px; }
.points li {
  width: 34px; height: 34px; border-radius: 50%;
  border: 2px dashed var(--encre-douce);
  display: grid; place-items: center;
  background: var(--carte);
}
.points li.gagne { border: 2px solid var(--encre); background: var(--soleil); }
.points li svg { width: 20px; height: 20px; }

/* ---------- Sommaire ---------- */
.sommaire { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; padding-right: 4px; display: flex; flex-direction: column; gap: 14px; }
.sommaire h2 { font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; color: var(--encre-douce); }
.etapes { display: flex; flex-direction: column; gap: 6px; }
.etape {
  width: 100%;
  display: grid; grid-template-columns: 30px 1fr 20px; gap: 10px; align-items: center;
  text-align: left;
  padding: 9px 10px;
  min-height: 48px;
  background: var(--carte);
  border: 2px solid var(--encre);
  border-radius: 10px;
  line-height: 1.25;
}
.etape .num {
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 700; font-variant-numeric: tabular-nums;
  background: var(--ligne);
}
.etape svg { width: 18px; height: 18px; }
.etape[aria-current="page"] { background: var(--accent); color: var(--sur-accent); border-color: var(--accent); }
.etape[aria-current="page"] .num { background: var(--sur-accent); color: var(--accent); }
.etape:disabled { border-style: dashed; color: var(--encre-douce); background: transparent; }
.etape.fait .num { background: var(--soleil); color: #1e2a52; }
.reglages { display: flex; flex-direction: column; gap: 10px; font-size: .92rem; padding-top: 6px; border-top: 2px solid var(--ligne); }
.reglages label { display: flex; gap: 8px; align-items: flex-start; }
.reglages input[type="checkbox"] { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--accent); flex: none; }
.lien { background: none; border: 0; padding: 0; text-align: left; text-decoration: underline; text-underline-offset: 3px; color: var(--encre-douce); }

/* ---------- Page de cahier (mission) ---------- */
.feuille {
  position: relative;
  background: var(--carte);
  border: 2px solid var(--encre);
  border-radius: 6px;
  box-shadow: 7px 7px 0 var(--ligne);
  padding: 30px 32px 36px 72px;
  display: flex; flex-direction: column; gap: 26px;
}
.feuille::before {
  content: ""; position: absolute; left: 48px; top: 0; bottom: 0; width: 2px;
  background: var(--marge);
}
.repere { font-size: .85rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--marge); }
.feuille h2 {
  font-family: var(--titre); font-weight: 400;
  font-size: clamp(1.45rem, 3.6vw, 1.95rem);
  line-height: 1.75;
  text-wrap: balance;
  margin-top: -18px;
}
.feuille h2:focus { outline: none; }
.feuille h3 { font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; color: var(--encre-douce); }
.histoire { display: flex; flex-direction: column; gap: 12px; max-width: 62ch; font-size: 1.125rem; }

.bouton {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 48px; padding: 10px 18px;
  border: 2px solid var(--encre); border-radius: 12px;
  background: var(--carte); font-weight: 700;
}
.bouton.plein { background: var(--accent); border-color: var(--accent); color: var(--sur-accent); }
.bouton:hover:not(:disabled) { box-shadow: 3px 3px 0 var(--ligne); }
.bouton svg { width: 20px; height: 20px; flex: none; }
.rang { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.scene-cadre { display: flex; flex-direction: column; gap: 12px; }
.scene {
  border: 2px solid var(--encre); border-radius: 14px;
  background: var(--papier);
  overflow-x: auto;
}
.scene svg { display: block; width: 100%; min-width: 520px; height: auto; }
.astuce-paysage { display: none; }
/* Téléphone tenu droit : le dessin entier tient dans la largeur, bord à bord ; en le tournant, on le voit en grand. */
@media (max-width: 560px) {
  .scene { margin: 0 -20px; border-radius: 0; border-left: 0; border-right: 0; }
  .scene svg { min-width: 0; }
}
@media (max-width: 560px) and (orientation: portrait) {
  .astuce-paysage { display: block; margin-top: -4px; }
}
.scene-cadre figcaption { max-width: 62ch; font-weight: 700; }

.mot { border-left: 6px solid var(--soleil); padding: 4px 0 4px 16px; display: flex; flex-direction: column; gap: 4px; max-width: 62ch; }
.mot dt { font-family: var(--titre); font-size: 1.25rem; line-height: 1.8; }

.jeu { display: flex; flex-direction: column; gap: 22px; }
.question { display: flex; flex-direction: column; gap: 10px; }
.question legend { font-weight: 700; font-size: 1.125rem; padding: 0; margin-bottom: 10px; max-width: 58ch; }
.bulle {
  display: block; margin-bottom: 10px; padding: 12px 16px; max-width: 46ch;
  background: var(--papier); border: 2px solid var(--encre); border-radius: 16px 16px 16px 4px;
  font-weight: 400;
}
.choix { display: flex; flex-direction: column; gap: 8px; }
.choix.cote { flex-direction: row; flex-wrap: wrap; }
.choix button {
  text-align: left; min-height: 48px; padding: 10px 16px;
  background: var(--carte); border: 2px solid var(--encre); border-radius: 12px;
}
.choix button:hover:not(:disabled) { background: var(--papier); }
.choix button.juste { background: var(--bon); border-color: var(--bon); color: var(--carte); font-weight: 700; }
.choix button.faux { border-style: dashed; color: var(--encre-douce); text-decoration: line-through; }
.retour { min-height: 1.6em; font-weight: 700; max-width: 58ch; }
.retour.ok { color: var(--bon); }
.retour.non { color: var(--marge); }

.reussite:empty { display: none; }
.reussite { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; padding-top: 6px; }
.tampon {
  width: 112px; height: 112px; flex: none; border-radius: 50%;
  border: 4px double var(--marge); color: var(--marge);
  display: grid; place-items: center; text-align: center;
  font-weight: 700; line-height: 1.15; text-transform: uppercase; letter-spacing: .04em; font-size: .9rem;
  transform: rotate(-9deg);
}
.tampon.neuf { animation: tamponne .5s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes tamponne { from { transform: rotate(-9deg) scale(2.2); opacity: 0; } to { transform: rotate(-9deg) scale(1); opacity: 1; } }

.grands { border: 2px solid var(--ligne); border-radius: 12px; padding: 12px 16px; max-width: 70ch; }
.grands summary { font-weight: 700; cursor: pointer; }
.grands ul { list-style: disc; padding-left: 22px; margin-top: 10px; display: flex; flex-direction: column; gap: 8px; font-size: 1rem; }
.grands a { color: var(--accent); }

/* ---------- Diplôme ---------- */
.diplome { align-items: flex-start; }
.diplome .cadre {
  width: 100%; border: 6px double var(--encre); border-radius: 4px; padding: 26px 28px;
  display: flex; flex-direction: column; gap: 16px;
}
.diplome label { font-weight: 700; display: flex; flex-direction: column; gap: 6px; max-width: 22rem; flex: 1 1 12rem; min-width: 0; }
.diplome input[type="text"] {
  width: 100%; min-height: 48px; padding: 8px 12px; background: var(--carte);
  border: 0; border-bottom: 3px solid var(--encre);
  font-family: var(--titre); font-size: 1.3rem;
}
.regles { list-style: decimal; padding-left: 26px; display: flex; flex-direction: column; gap: 6px; max-width: 58ch; }
.petit { font-size: .92rem; color: var(--encre-douce); }

/* ---------- Dessins ---------- */
.f-carte { fill: var(--carte); } .f-encre { fill: var(--encre); } .f-accent { fill: var(--accent); }
.f-bon { fill: var(--bon); } .f-soleil { fill: var(--soleil); } .f-marge { fill: var(--marge); }
.f-chipeur { fill: var(--chipeur); } .f-ligne { fill: var(--ligne); } .f-papier { fill: var(--papier); }
.f-brique { fill: color-mix(in srgb, var(--marge) 55%, var(--carte)); }
.s-encre { stroke: var(--encre); } .s-carte { stroke: var(--carte); } .s-soleil { stroke: var(--soleil); }
.s-ligne { stroke: var(--encre-douce); } .s-marge { stroke: var(--marge); }
.txt { fill: var(--encre); font-family: var(--corps); font-weight: 700; font-size: 19px; }
.txt.clair { fill: var(--sur-accent); }
.txt.petit-t { font-size: 16px; }
.txt.alerte { fill: var(--marge); font-size: 22px; }
.txt.vert { fill: var(--bon); font-size: 22px; }
.cadenas .anse { stroke: var(--encre); }
.cadenas .corps { fill: var(--accent); }
.scene svg * { transform-box: fill-box; }

@keyframes apparait { to { opacity: 1; } }
@keyframes pop { 0% { transform: scale(0); } 65% { transform: scale(1.25); } 100% { transform: scale(1); } }
@keyframes allume { to { fill: var(--soleil); } }

/* 1. La maison */
.s1 .piece { fill: var(--ligne); animation: allume .6s forwards; }
.s1 .p1 { animation-delay: .3s; } .s1 .p2 { animation-delay: .7s; } .s1 .p3 { animation-delay: 1.1s; }
.s1 .cadenas { transform: scale(0); transform-origin: center; animation: pop .5s forwards; }
.s1 .d1 { animation-delay: 1.8s; } .s1 .d2 { animation-delay: 2.2s; } .s1 .d3 { animation-delay: 2.6s; }
.s1 .voleur { animation: rode 4.6s ease-in-out forwards; }
@keyframes rode { 0% { transform: translateX(0); } 30%, 68% { transform: translateX(62px); } 100% { transform: translateX(-140px); } }

/* 2. La clé */
.s2 .cle-vol { opacity: 0; }
.s2.essaie .cle-vol { opacity: 1; animation: va-vient .42s ease-in-out infinite alternate; }
.s2.essaie[data-niveau="2"] .cle-vol { animation-duration: .2s; }
.s2.essaie[data-niveau="3"] .cle-vol { animation-duration: .1s; }
@keyframes va-vient { from { transform: translateX(0); } to { transform: translateX(165px); } }
.s2 .anse { transform-origin: 100% 100%; transition: transform .3s; }
.s2 .corps { transition: fill .3s; }
.s2.ouvert .cle-vol { opacity: 1; transform: translateX(165px); }
.s2.ouvert .anse { transform: rotate(24deg); }
.s2.ouvert .corps { fill: var(--marge); }
.s2.abandon .corps { fill: var(--bon); }
.s2 .voleur { transition: transform 1.2s ease-in; }
.s2.abandon .voleur { transform: translateX(-240px); }

/* 3. Le message déguisé */
.s3 .arrive { animation: glisse 1s ease-out both; }
@keyframes glisse { from { transform: translateX(-620px); } to { transform: translateX(0); } }
.s3 .masque { transform-origin: center; animation: tombe .8s 2.2s ease-in forwards; }
@keyframes tombe { to { transform: translate(-172px, 52px) rotate(-70deg); } }
.s3 .hamecon { opacity: 0; animation: apparait .5s 3s forwards; }

/* 4. Le cadeau piégé */
.s4 .couvercle { transform-origin: 0% 100%; animation: souleve .6s .5s ease-out forwards; }
@keyframes souleve { to { transform: translate(-26px, -44px) rotate(-26deg); } }
.s4 .bete { opacity: 0; animation: pille 4s 1.1s ease-in-out forwards; }
@keyframes pille {
  0% { transform: translate(0, 0); opacity: 0; } 8% { opacity: 1; }
  45%, 58% { transform: translate(var(--dx), -54px); opacity: 1; }
  100% { transform: translate(var(--fx), 78px); opacity: 1; }
}
.s4 .cle { animation: emporte 4s 1.1s ease-in-out forwards; }
@keyframes emporte { 0%, 58% { transform: translate(0, 0); } 100% { transform: translate(var(--kx), 98px); } }
.s4 .b2, .s4 .k2 { animation-delay: 1.25s; } .s4 .b3, .s4 .k3 { animation-delay: 1.4s; }
.s4 .constat { opacity: 0; animation: apparait .4s 5.5s forwards; }

/* 5. Les deux serrures */
.s5 .voleur { animation: tente 5.6s ease-in-out forwards; }
@keyframes tente { 0% { transform: translateX(0); } 22%, 70% { transform: translateX(118px); } 100% { transform: translateX(-170px); } }
.s5 .c1 .anse { transform-origin: 100% 100%; animation: ouvre .3s 1.5s forwards; }
@keyframes ouvre { to { transform: rotate(24deg); } }
.s5 .c1 .corps { animation: rougit .3s 1.5s forwards; }
@keyframes rougit { to { fill: var(--marge); } }
.s5 .c2 .corps { animation: verdit .4s 3.2s forwards; }
@keyframes verdit { to { fill: var(--bon); } }
.s5 .demande { opacity: 0; animation: apparait .3s 2.3s forwards; }
.s5 .code { animation: bat 1s 2.3s 3; transform-origin: center; }
@keyframes bat { 50% { transform: scale(1.18); } }

/* 6. La carte postale et l'enveloppe */
.s6 .carte { animation: voyage 3s .3s ease-in-out forwards; }
.s6 .enveloppe { animation: voyage 3s 4s ease-in-out forwards; }
@keyframes voyage { to { transform: translateX(404px); } }
.s6 .dit1 { opacity: 0; animation: apparait .3s 1.8s forwards; }
.s6 .dit2 { opacity: 0; animation: apparait .3s 5.5s forwards; }

/* 7. Les réparations */
.s7 .rustine { transform: translateY(-170px); animation: pose .5s cubic-bezier(.5, 0, .7, 1.3) forwards; }
.s7 .r1 { animation-delay: 1s; } .s7 .r2 { animation-delay: 1.3s; }
@keyframes pose { to { transform: translateY(0); } }
.s7 .intruse { transform-origin: center; animation: cogne 4.5s ease-in-out forwards; }
@keyframes cogne {
  0% { transform: translate(0, 0); } 45%, 52% { transform: translate(160px, 0); }
  70% { transform: translate(96px, -34px) rotate(150deg); }
  100% { transform: translate(72px, 6px) rotate(180deg); }
}
.s7 .constat { opacity: 0; animation: apparait .4s 2.6s forwards; }

/* 8. Les trois gestes */
.s8 .geste { transform-origin: center; transform: scale(.55); opacity: 0; animation: entre .5s forwards; }
.s8 .g1 { animation-delay: .2s; } .s8 .g2 { animation-delay: 1.2s; } .s8 .g3 { animation-delay: 2.2s; }
@keyframes entre { 60% { transform: scale(1.06); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }

/* ---------- Niveau 2 : jeux ---------- */
.niveaux { display: flex; flex-direction: column; gap: 10px; }
.niveaux h2:not(:first-child) { margin-top: 8px; }
.points { flex-wrap: wrap; }
.points li { width: 28px; height: 28px; }
.points li svg { width: 17px; height: 17px; }
.points li.saut { margin-left: 12px; }
.adr, .choix.mono button { font-family: ui-monospace, "DejaVu Sans Mono", "Courier New", monospace; letter-spacing: .03em; overflow-wrap: anywhere; }
.adr-barre {
  display: block; margin-top: 10px; padding: 8px 14px; font-weight: 400;
  background: var(--papier); border: 2px solid var(--encre); border-radius: 999px;
}
.affaire { max-width: 58ch; border-radius: 16px 16px 16px 4px; }
.choix.multi button { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: center; }
.choix.multi button::before { content: ""; width: 20px; height: 20px; border: 2px solid currentColor; border-radius: 5px; }
.choix.multi button[aria-pressed="true"] { background: var(--ligne); font-weight: 700; }
.choix.multi button[aria-pressed="true"]::before { background: var(--accent); border-color: var(--accent); box-shadow: inset 0 0 0 3px var(--carte); }
.choix.ordre button { display: grid; grid-template-columns: 32px 1fr; gap: 12px; align-items: center; }
.rangnum {
  width: 32px; height: 32px; border-radius: 50%; border: 2px dashed var(--encre-douce);
  display: grid; place-items: center; font-weight: 700; font-variant-numeric: tabular-nums;
}
.choix.ordre button.pris { background: var(--ligne); }
.choix.ordre button.pris .rangnum { border-style: solid; border-color: var(--encre); background: var(--soleil); color: #1e2a52; }
.question.gagne .choix.ordre button,
.question.gagne .choix.multi button[aria-pressed="true"] { background: var(--bon); border-color: var(--bon); color: var(--carte); font-weight: 700; }
.question.gagne .choix.multi button[aria-pressed="true"]::before { background: var(--carte); border-color: var(--carte); box-shadow: none; }

/* ---------- Niveau 2 : dessins ---------- */
.txt.mono { font-family: ui-monospace, "DejaVu Sans Mono", "Courier New", monospace; }

/* 9. L'adresse déguisée */
.s9 .loupe { animation: cherche 3s .4s ease-in-out both; }
@keyframes cherche { 0% { transform: translateX(-44px); } 22% { transform: translateX(44px); } 58% { transform: translateX(250px); } 80% { transform: translateX(336px); } 100% { transform: translateX(294px); } }
.s9 .intrus { animation: rougit .3s 3.4s forwards; }
.s9 .verdict { opacity: 0; animation: apparait .4s 3.8s forwards; }

/* 10. Les indices sur la photo */
.s10 .indice { transform: scale(0); transform-origin: center; animation: pop .5s forwards; }
.s10 .i1 { animation-delay: 1s; } .s10 .i2 { animation-delay: 1.9s; } .s10 .i3 { animation-delay: 2.8s; }

/* 11. Le masque du copain */
.s11 .avatar { transform-origin: center; animation: plie .35s 1.4s ease-in forwards; }
@keyframes plie { to { transform: scaleX(0); } }
.s11 .vrai { transform-origin: center; transform: scaleX(0); animation: deplie .35s 1.75s ease-out forwards; }
@keyframes deplie { to { transform: scaleX(1); } }
.s11 .secret { opacity: 0; animation: apparait .4s 2.7s forwards; }
.s11 .alarme { transform: scale(0); transform-origin: center; animation: pop .5s 3.4s forwards; }

/* 12. Le coffre de secours */
.s12 .cage { transform: translateY(-280px); animation: pose .5s 1s cubic-bezier(.5, 0, .7, 1.3) forwards; }
.s12 .cadenas .corps { fill: var(--marge); }
.s12 .dit-a { opacity: 0; animation: passe 2.9s 1.6s forwards; }
@keyframes passe { 0% { opacity: 0; } 10%, 88% { opacity: 1; } 100% { opacity: 0; } }
.s12 .dit-b { opacity: 0; animation: apparait .3s 4.6s forwards; }
.s12 .copie { animation: sort .7s 3.2s ease-out forwards; }
.s12 .c-b { animation-delay: 3.5s; }
@keyframes sort { to { transform: translateY(-86px); } }

/* 13. Les enveloppes emboîtées */
.s13 .colis { animation: relais 7.5s .4s ease-in-out forwards; }
@keyframes relais { 0% { transform: translateX(0); } 14%, 24% { transform: translateX(90px); } 38%, 48% { transform: translateX(210px); } 62%, 72% { transform: translateX(330px); } 90%, 100% { transform: translateX(424px); } }
.s13 .k1 { animation: pele1 7.5s .4s forwards; } .s13 .k2 { animation: pele2 7.5s .4s forwards; } .s13 .k3 { animation: pele3 7.5s .4s forwards; }
@keyframes pele1 { 0%, 17% { opacity: 1; } 23%, 100% { opacity: 0; } }
@keyframes pele2 { 0%, 41% { opacity: 1; } 47%, 100% { opacity: 0; } }
@keyframes pele3 { 0%, 65% { opacity: 1; } 71%, 100% { opacity: 0; } }
.s13 .note { opacity: 0; animation: apparait .4s forwards; }
.s13 .n1 { animation-delay: 1.8s; } .s13 .n2 { animation-delay: 3.6s; } .s13 .n3 { animation-delay: 5.4s; }

/* 14. La grande enquête */
.s14 .fiche { transform: scale(0); transform-origin: center; animation: pop .45s forwards; }
.s14 .fil { opacity: 0; animation: apparait .3s forwards; }

/* ---------- Reprise ---------- */
.code-ligne { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
#code-reprise { font-size: 1.15rem; font-weight: 700; letter-spacing: .12em; }
.reprise { display: flex; flex-direction: column; gap: 8px; }
.reprise summary { cursor: pointer; text-decoration: underline; text-underline-offset: 3px; color: var(--encre-douce); }
.reprise[open] { padding-bottom: 6px; }
.reprise label { display: block; font-weight: 700; margin-top: 8px; }
.reprise input {
  width: 9.5em; min-height: 48px; padding: 8px 12px; background: var(--carte);
  border: 2px solid var(--encre); border-radius: 12px; text-transform: uppercase; letter-spacing: .12em;
  font-family: ui-monospace, "DejaVu Sans Mono", "Courier New", monospace;
}
.reprise .rang { margin-top: 6px; }
.note-reprise { align-self: flex-start; padding: 8px 14px; background: var(--papier); border: 2px solid var(--bon); border-radius: 12px; font-weight: 700; }

/* ---------- Niveau 3 : faux écrans à inspecter ---------- */
.bouton[aria-pressed="true"] { background: var(--encre); border-color: var(--encre); color: var(--carte); }
.enquete { display: flex; flex-direction: column; gap: 18px; }
.faux { border: 2px solid var(--encre); border-radius: 14px; overflow: hidden; background: var(--carte); max-width: 620px; }
.faux-bandeau { padding: 6px 14px; background: var(--encre); color: var(--carte); font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.faux-corps { padding: 16px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.faux-corps p { width: 100%; }
.faux-ligne { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; width: 100%; }
.faux-ligne > span:first-child { color: var(--encre-douce); font-size: .9rem; font-weight: 700; }
.faux-note { color: var(--encre-douce); font-size: .9rem; font-weight: 700; }
.faux-adresse { display: flex; flex-wrap: wrap; gap: 2px 6px; align-items: center; width: 100%; padding: 4px 10px; background: var(--papier); border: 2px solid var(--encre-douce); border-radius: 22px; }
.faux-fenetre { width: 100%; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; padding: 14px; background: var(--papier); border: 3px solid var(--marge); border-radius: 12px; }
.faux-liste { width: 100%; display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.z {
  text-align: left; min-height: 40px; padding: 6px 9px; line-height: 1.35;
  background: none; color: var(--encre);
  border: 2px solid transparent; border-bottom: 2px dotted var(--encre-douce); border-radius: 8px;
}
.z:hover:not(:disabled) { border: 2px dashed var(--encre-douce); }
.z.champ { width: 100%; background: var(--carte); color: var(--encre-douce); border: 2px solid var(--encre-douce); }
.z.titre-faux { font-weight: 700; font-size: 1.15rem; }
.z.faux-bouton { padding: 8px 16px; background: var(--accent); color: var(--sur-accent); border: 2px solid var(--accent); font-weight: 700; }
.z.trouve { background: color-mix(in srgb, var(--marge) 14%, var(--carte)); color: var(--encre); border: 2px solid var(--marge); }
.z.trouve::after {
  content: attr(data-num); display: inline-grid; place-items: center; width: 22px; height: 22px; margin-left: 8px;
  border-radius: 50%; background: var(--marge); color: var(--carte); font: 700 .8rem/1 var(--corps); letter-spacing: 0;
}
.z.blanchi { background: none; color: var(--encre-douce); border: 2px solid var(--bon); }
.carnet { border-left: 6px solid var(--marge); padding: 4px 0 4px 16px; display: flex; flex-direction: column; gap: 8px; max-width: 62ch; }
.carnet ol { list-style: decimal; padding-left: 24px; display: flex; flex-direction: column; gap: 4px; }
.carnet ol:empty { display: none; }
#carnet-compte { font-weight: 700; font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
  .scene svg *, .tampon.neuf { animation-duration: .01s !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01s !important; }
}

.barre-menu { display: none; }
@media (max-width: 860px) {
  /* La mission d'abord : en-tête réduit, liste des missions et joueurs derrière le bouton « Voir mes missions ». */
  .barre-menu { display: block; }
  .barre-menu .bouton { width: 100%; justify-content: center; }
  html:not(.menu-ouvert) .sommaire, html:not(.menu-ouvert) .entete .chapeau,
  html:not(.menu-ouvert) .entete .joueurs, html:not(.menu-ouvert) .entete .points { display: none; }
  html:not(.menu-ouvert) .entete-titre { gap: 12px; }
  html:not(.menu-ouvert) .entete-titre svg { width: 38px; height: 53px; }
  html:not(.menu-ouvert) .entete h1 { font-size: 1.35rem; line-height: 1.4; }
  .page { grid-template-columns: minmax(0, 1fr); padding: 20px 16px 56px; }
  .sommaire { position: static; max-height: none; overflow: visible; padding-right: 0; }
  .etapes { flex-direction: row; overflow-x: auto; padding-bottom: 6px; }
  .etape { width: auto; flex: none; grid-template-columns: 30px auto 18px; }
  .feuille { padding: 22px 18px 28px; box-shadow: 5px 5px 0 var(--ligne); }
  .feuille::before { display: none; }
  .feuille h2, .texte h1 { margin-top: -14px; }
}

/* ---------- Joueurs ---------- */
.joueurs { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.joueurs > p { font-size: .9rem; font-weight: 700; color: var(--encre-douce); }
.joueur { min-height: 44px; padding: 8px 18px; background: var(--carte); border: 2px solid var(--encre); border-radius: 22px; font-weight: 700; }
.joueur[aria-pressed="true"] { background: var(--soleil); color: #1e2a52; }
.joueur.ajout { border-style: dashed; font-weight: 400; color: var(--encre-douce); }
#form-joueur { display: flex; flex-direction: column; gap: 6px; }
#form-joueur[hidden] { display: none; }
#form-joueur label, .tiroir label { font-weight: 700; }
.champ-texte { width: 12em; max-width: 100%; min-height: 48px; padding: 8px 12px; background: var(--carte); border: 2px solid var(--encre); border-radius: 12px; }
.tiroir { display: flex; flex-direction: column; gap: 8px; }
.tiroir summary { cursor: pointer; text-decoration: underline; text-underline-offset: 3px; color: var(--encre-douce); }
.tiroir label { display: block; margin-top: 8px; }
.tiroir .champ-texte { display: block; margin: 6px 0 10px; }
.lien:disabled { text-decoration: none; opacity: .55; }

/* ---------- Niveau 7 : la fausse alerte à compteur ---------- */
.fausse-alerte { max-width: 460px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; padding: 14px 16px; border: 3px solid var(--marge); border-radius: 12px; background: var(--papier); }
.fa-titre { font-weight: 700; letter-spacing: .08em; color: var(--marge); }
.fa-chrono { font-weight: 700; font-variant-numeric: tabular-nums; }
.fa-sec { display: inline-block; min-width: 1.4em; text-align: center; font-size: 1.3rem; color: var(--marge); }
.fausse-alerte.repart .fa-sec { animation: repart .6s; }
@keyframes repart { 0%, 100% { transform: scale(1); } 40% { transform: scale(1.5); } }
.fa-bouton { padding: 6px 14px; border-radius: 10px; background: var(--marge); color: var(--carte); font-weight: 700; }

/* ---------- Niveau 7 : la conversation ---------- */
.dialogue { display: flex; flex-direction: column; gap: 10px; padding: 14px; max-width: 620px; border: 2px solid var(--encre); border-radius: 14px; background: var(--papier); }
.bulle-lui, .bulle-moi { max-width: 85%; padding: 10px 14px; border: 2px solid var(--encre); line-height: 1.45; }
.bulle-lui { align-self: flex-start; background: var(--carte); border-radius: 16px 16px 16px 4px; }
.bulle-lui .qui { display: block; font-size: .8rem; font-weight: 700; letter-spacing: .04em; color: var(--chipeur); }
.bulle-moi { align-self: flex-end; background: var(--accent); border-color: var(--accent); color: var(--sur-accent); border-radius: 16px 16px 4px 16px; }
/* Un geste (« je ne réponds pas ») s'écrit à part : ce n'est pas un message envoyé. */
.geste-moi { align-self: flex-end; max-width: 85%; padding: 4px 6px; font-style: italic; font-weight: 700; color: var(--bon); }
.dialogue-choix:empty { display: none; }

/* ---------- Annonce du niveau suivant, et demande de la suite ---------- */
.annonce { max-width: 62ch; padding: 10px 14px; border-left: 6px solid var(--accent); background: var(--papier); font-weight: 700; }
.suite-courriel a { color: var(--accent); }

/* ---------- Niveaux 6 et 7 : dessins ---------- */
/* 32. Le cadenas ouvert */
.s32 .boite { animation: voyage32 6.5s ease-in-out forwards; }
@keyframes voyage32 {
  0%, 18% { transform: translateX(0); } 40% { transform: translateX(170px); }
  44% { transform: translateX(176px) rotate(5deg); } 48% { transform: translateX(164px) rotate(-5deg); } 52% { transform: translateX(176px) rotate(5deg); }
  56%, 62% { transform: translateX(170px) rotate(0deg); } 84%, 100% { transform: translateX(384px); }
}
.s32 .anse { transform-origin: 100% 100%; animation: anse32 6.5s forwards; }
@keyframes anse32 { 0%, 8% { transform: rotate(24deg); } 14%, 88% { transform: rotate(0deg); } 95%, 100% { transform: rotate(24deg); } }
.s32 .corps { animation: corps32 6.5s forwards; }
@keyframes corps32 { 0%, 88% { fill: var(--accent); } 95%, 100% { fill: var(--bon); } }
.s32 .voleur { animation: saute32 6.5s forwards; }
@keyframes saute32 { 0%, 40% { transform: translateY(0); } 45% { transform: translateY(-16px); } 50% { transform: translateY(0); } 55% { transform: translateY(-10px); } 60%, 100% { transform: translateY(0); } }
.s32 .dit { opacity: 0; animation: dit32 6.5s forwards; }
@keyframes dit32 { 0%, 44% { opacity: 0; } 48%, 64% { opacity: 1; } 68%, 100% { opacity: 0; } }
.s32 .cle-kiko { opacity: 0; animation: apparait .4s 5.4s forwards; }

/* 33. Les objets qui écoutent */
.s33 .lentille { animation: pirate33 5s forwards; }
@keyframes pirate33 { 0%, 30% { fill: var(--encre); } 36%, 58% { fill: var(--marge); } 64%, 100% { fill: var(--encre); } }
.s33 .cadenas { transform: scale(0); transform-origin: center; animation: pop .5s forwards; }
.s33 .c1 { animation-delay: 3s; } .s33 .c2 { animation-delay: 3.4s; } .s33 .c3 { animation-delay: 3.8s; }
.s33 .dit-a { opacity: 0; animation: passe33 5s forwards; }
@keyframes passe33 { 0%, 8% { opacity: 0; } 12%, 80% { opacity: 1; } 84%, 100% { opacity: 0; } }
.s33 .dit-b { opacity: 0; animation: apparait .3s 4.4s forwards; }

/* 34. Le faux compte à rebours */
.s34 .cri { transform-origin: left center; animation: cri34 5s forwards; }
@keyframes cri34 { 0%, 8% { opacity: 0; transform: scale(.8); } 12% { opacity: 1; transform: scale(1.1); } 18% { transform: scale(1); } 24% { transform: scale(1.1); } 30%, 62% { opacity: 1; transform: scale(1); } 70%, 100% { opacity: 0; } }
.s34 .emmele { opacity: 0; animation: emmele34 5s forwards; }
@keyframes emmele34 { 0%, 12% { opacity: 0; } 18%, 62% { opacity: 1; } 70%, 100% { opacity: 0; } }
.s34 .dit-kiko { opacity: 0; animation: apparait .4s 2.4s forwards; }
.s34 .eclaire { opacity: 0; animation: apparait .5s 3.5s forwards; }

/* 35. Le faux modérateur */
.s35 .m1, .s35 .m2, .s35 .m3 { opacity: 0; animation: apparait .4s forwards; }
.s35 .m1 { animation-delay: .4s; } .s35 .m2 { animation-delay: 1.6s; } .s35 .m3 { animation-delay: 2.8s; }
.s35 .stop { transform: scale(0); transform-origin: center; animation: pop .5s 3.4s forwards; }

/* 36. Ce n'est pas ta faute */
.s36 .dit-ami { opacity: 0; animation: apparait .4s 1.2s forwards; }
.s36 .coche { opacity: 0; animation: apparait .3s forwards; }
.s36 .c1 { animation-delay: 2s; } .s36 .c2 { animation-delay: 2.6s; } .s36 .c3 { animation-delay: 3.2s; }
.s36 .triste { animation: efface36 .3s 3.8s forwards; }
@keyframes efface36 { to { opacity: 0; } }
.s36 .sourire { opacity: 0; animation: apparait .3s 3.8s forwards; }

/* 37. Le mot secret de la famille */
.s37 .m1, .s37 .m2, .s37 .m3 { opacity: 0; animation: apparait .4s forwards; }
.s37 .m1 { animation-delay: .4s; } .s37 .m2 { animation-delay: 1.5s; } .s37 .m3 { animation-delay: 2.5s; }
.s37 .avatar { transform-origin: center; animation: plie .35s 3.2s ease-in forwards; }
.s37 .vrai { transform-origin: center; transform: scaleX(0); animation: deplie .35s 3.55s ease-out forwards; }
.s37 .alarme { transform: scale(0); transform-origin: center; animation: pop .5s 4s forwards; }

/* ---------- Pied de page ---------- */
.pied { grid-column: 1 / -1; padding-top: 16px; border-top: 2px solid var(--ligne); display: flex; flex-direction: column; gap: 4px; font-size: .92rem; color: var(--encre-douce); background: var(--papier); }
.liens-pied { display: flex; flex-wrap: wrap; gap: 4px 18px; padding: 4px 0; }
.liens-pied a { color: var(--encre); text-underline-offset: 3px; }
.liens-pied a[aria-current="page"] { font-weight: 700; text-decoration: none; }

/* ---------- Accessibilité ---------- */
/* Texte lu par les lecteurs d'écran, invisible à l'écran. */
.masque { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* Lien d'évitement : invisible tant qu'il n'a pas le focus du clavier. */
.evitement { position: absolute; left: 12px; top: -80px; z-index: 10; padding: 10px 16px; background: var(--accent); color: var(--sur-accent); border-radius: 12px; font-weight: 700; }
.evitement:focus { top: 12px; }
#contenu:focus { outline: none; }

/* ---------- Réglages de l'appareil ---------- */
.couleurs { display: flex; flex-direction: column; gap: 6px; }
.couleurs legend { font-weight: 700; margin-bottom: 6px; }
.segments { display: flex; flex-wrap: wrap; gap: 6px; }
.reglages .segments label { position: relative; align-items: center; gap: 0; }
.segments input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.segments span { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 12px; border: 2px solid var(--encre); border-radius: 20px; background: var(--carte); cursor: pointer; }
.segments input:checked + span { background: var(--encre); color: var(--carte); font-weight: 700; }
.segments input:focus-visible + span { outline: 3px solid var(--soleil); outline-offset: 2px; }
.installer { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.installer[hidden], .tiroir[hidden] { display: none; }
a.lien { color: var(--encre-douce); }

/* ---------- Bandeau de mise à jour ---------- */
.bandeau-maj {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 20;
  width: min(560px, calc(100% - 24px));
  display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between;
  padding: 12px 16px; background: var(--carte); border: 2px solid var(--encre); border-radius: 14px; box-shadow: 5px 5px 0 var(--ligne);
  font-weight: 700;
}
.bandeau-maj[hidden] { display: none; }

/* ---------- Bilan des joueurs ---------- */
/* position: relative garde les textes masqués du tableau dans la zone qui défile, sinon la page entière déborde. */
.tableau-defile { position: relative; overflow-x: auto; max-width: 100%; border: 2px solid var(--encre); border-radius: 12px; }
.bilan table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
.bilan th, .bilan td { padding: 10px 12px; text-align: left; border-bottom: 2px solid var(--ligne); vertical-align: middle; }
.bilan td, .bilan thead th { white-space: nowrap; }
.bilan tbody th { min-width: 9em; }
.bilan thead th { font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; color: var(--encre-douce); background: var(--papier); }
.bilan tbody tr:last-child > * { border-bottom: 0; }
.bilan tr.actif { background: color-mix(in srgb, var(--soleil) 22%, var(--carte)); }
.bilan td .bouton { min-height: 40px; padding: 6px 14px; }
.diplome-obtenu svg { width: 18px; height: 18px; vertical-align: -3px; }
.diplome-obtenu svg path { fill: var(--soleil); stroke: var(--encre); stroke-width: 1; }
.sauvegarde { display: flex; flex-direction: column; gap: 10px; max-width: 62ch; }
.sauvegarde label { font-weight: 700; }
.sauvegarde input[type="file"] { max-width: 100%; padding: 10px; border: 2px dashed var(--encre-douce); border-radius: 12px; background: var(--papier); }
.sauvegarde input[type="file"]::file-selector-button { font: inherit; font-weight: 700; margin-right: 12px; padding: 8px 14px; border: 2px solid var(--encre); border-radius: 10px; background: var(--carte); color: var(--encre); cursor: pointer; }
#apercu-import:empty { display: none; }
#apercu-import { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; border-left: 6px solid var(--accent); background: var(--papier); }

/* ---------- Pages d'information (guide, confidentialité, mentions légales, 404) ---------- */
.page-texte { grid-template-columns: minmax(0, 1fr); max-width: 860px; }
.entete-texte { padding: 4px 0; }
.vers-cours { display: inline-flex; gap: 12px; align-items: center; color: var(--encre); text-decoration: none; font-family: var(--titre); font-size: 1.35rem; line-height: 1.7; }
.vers-cours:hover span { text-decoration: underline; text-underline-offset: 4px; }
.texte h1 { font-family: var(--titre); font-weight: 400; font-size: clamp(1.45rem, 3.6vw, 1.95rem); line-height: 1.75; text-wrap: balance; margin-top: -18px; }
.texte section { display: flex; flex-direction: column; gap: 10px; max-width: 66ch; }
.texte h2 { font-size: 1.3rem; line-height: 1.7; margin-top: 0; }
.texte ul { list-style: disc; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.texte a:not(.bouton) { color: var(--accent); text-underline-offset: 3px; }
.encadre { padding: 12px 16px; border-left: 6px solid var(--bon); background: var(--papier); font-weight: 700; }
.a-completer { background: color-mix(in srgb, var(--marge) 22%, var(--carte)); color: var(--encre); padding: 0 4px; border-radius: 4px; font-weight: 700; }
.programme { display: flex; flex-direction: column; gap: 18px; }
.programme-niveau { display: flex; flex-direction: column; gap: 8px; }
.programme-niveau h3 { font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; color: var(--encre-douce); }
.programme-niveau ol { list-style: decimal; padding-left: 28px; display: flex; flex-direction: column; gap: 12px; }
.programme-niveau dl { display: grid; grid-template-columns: max-content 1fr; gap: 2px 12px; margin-top: 4px; font-size: .95rem; }
.programme-niveau dt { color: var(--encre-douce); font-weight: 700; }
a.bouton { color: inherit; text-decoration: none; }
a.bouton.plein { color: var(--sur-accent); }
@media (max-width: 560px) {
  .programme-niveau dl { grid-template-columns: 1fr; }
  .programme-niveau dd { margin-bottom: 4px; }
}

/* ---------- Impression du diplôme ---------- */
/* ---------- Niveaux 4 et 5 : dessins, jeux « décoder » et « relier », défi éclair ---------- */
.scene .ap { opacity: 0; animation: apparait .5s forwards; }
.scene .ap.saute { transform-origin: center; transform: scale(.55); animation-name: entre; }
.scene .d1 { animation-delay: .3s; } .scene .d2 { animation-delay: 1.1s; } .scene .d3 { animation-delay: 1.9s; }
.scene .d4 { animation-delay: 2.7s; } .scene .d5 { animation-delay: 3.5s; } .scene .d6 { animation-delay: 4.3s; }
.s26 .assaut { animation: assaut 2.4s .4s ease-in-out forwards; }
.s26 .cede { animation: cede .4s 1.3s forwards; }
@keyframes assaut { to { transform: translateX(244px); } }
@keyframes cede { to { opacity: .25; } }

.decodeur { display: flex; flex-direction: column; gap: 10px; }
.code-texte {
  font-family: ui-monospace, "DejaVu Sans Mono", "Courier New", monospace; font-size: 1.35rem; font-weight: 700; letter-spacing: .12em;
  padding: 14px 16px; border: 2px solid var(--encre); border-radius: 12px; background: var(--papier); overflow-wrap: anywhere;
}
.question.gagne .code-texte { background: var(--bon); border-color: var(--bon); color: var(--carte); }
.code-cle { font-weight: 700; color: var(--encre-douce); }
.paires { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
.paires .choix button[aria-pressed="true"] { background: var(--soleil); color: #1e2a52; font-weight: 700; }
.paires .choix button.lie { background: var(--bon); border-color: var(--bon); color: var(--carte); font-weight: 700; }
.paires .choix button.lie::before { content: attr(data-num) " · "; }
.etape small { font-weight: 400; color: var(--encre-douce); }
.etape .num svg { width: 14px; height: 14px; display: block; }
.defi .points { margin: 4px 0; }
.defi legend .bulle { display: block; margin-top: 10px; }

.aide { display: flex; flex-direction: column; gap: 6px; }
.indice { border-left: 6px solid var(--soleil); padding: 4px 0 4px 12px; max-width: 58ch; }
.mots-appris { font-size: .95rem; max-width: 62ch; }
.programme-niveau h3 .duree { text-transform: none; letter-spacing: 0; font-weight: 400; }

/* ---------- Mode classe : le cours projeté au tableau ---------- */
.reglages-joueur { display: flex; flex-direction: column; gap: 10px; }
.bandeau-classe { display: none; }
.classe .bandeau-classe {
  grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; justify-content: space-between;
  padding: 10px 16px; background: #efb226; color: #1e2a52; border: 2px solid #1e2a52; border-radius: 12px;
}
.classe .bandeau-classe .bouton { background: #fffefa; color: #1e2a52; border-color: #1e2a52; }
.classe .joueurs, .classe .reglages-joueur { display: none; }
/* Lisible du fond de la salle : tout le texte grandit, et la page prend la largeur de l'écran projeté. */
html.classe { font-size: 120%; }
.classe .page { max-width: 1500px; }
.debat { border-left: 6px solid var(--accent); padding: 4px 0 4px 16px; display: flex; flex-direction: column; gap: 6px; max-width: 62ch; }
.debat ul { list-style: disc; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; font-size: 1.125rem; }

/* ---------- Kit de l'enseignant ---------- */
.texte table { border-collapse: collapse; width: 100%; }
.texte th, .texte td { padding: 8px 12px; text-align: left; vertical-align: top; border-bottom: 2px solid var(--ligne); }
.texte thead th { font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; color: var(--encre-douce); background: var(--papier); }
.texte tbody tr:last-child > * { border-bottom: 0; }
.texte td:first-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
.texte ol.numerote { list-style: decimal; padding-left: 26px; display: flex; flex-direction: column; gap: 6px; }
.fiches { display: flex; flex-direction: column; gap: 18px; }
.fiches h3 { font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; color: var(--encre-douce); }
.fiche-mission { display: flex; flex-direction: column; gap: 4px; padding: 10px 0 10px 16px; border-left: 6px solid var(--ligne); break-inside: avoid; }
.fiche-mission h4 { margin: 0; font-size: 1.05rem; }
.fiche-mission dl { display: grid; grid-template-columns: max-content 1fr; gap: 2px 12px; font-size: .95rem; }
.fiche-mission dt { color: var(--encre-douce); font-weight: 700; }
.fiche-mission dd { margin: 0; }
.fiche-mission dd ul { gap: 2px; }
@media (max-width: 560px) {
  .fiche-mission dl { grid-template-columns: 1fr; }
  .fiche-mission dd { margin-bottom: 4px; }
}

@media print {
  /* Toujours les couleurs du jour à l'impression, même si l'appareil est en thème sombre. */
  :root:not(.a):not(.b) {
    --papier: #ffffff; --carte: #ffffff; --encre: #1e2a52; --encre-douce: #56618c; --ligne: #cbd7ef;
    --marge: #d5463c; --accent: #2747b0; --sur-accent: #ffffff; --bon: #1d7a4c; --soleil: #efb226; --chipeur: #6b4d96;
    color-scheme: light;
  }
  body { background: none; }
  .entete, .sommaire, .pied, .note-reprise, .diplome .rang .bouton, .diplome .petit, .bandeau-maj, .evitement, .bandeau-classe, .sans-impression, .diplome .annonce, .suite-courriel { display: none !important; }
  html.classe { font-size: 100%; }
  .texte section { max-width: none; }
  .tableau-defile { border: 0; overflow: visible; }
  .page { display: block; max-width: none; padding: 0; }
  .feuille { border: 0; box-shadow: none; padding: 0; }
  .feuille::before { display: none; }
  .diplome input[type="text"] { border-bottom-color: transparent; outline: none; }
}
@page { margin: 16mm; }

/* La réserve de dessins (symboles SVG) ne prend aucune place. */
.reserve { position: absolute; }
