:root {
  --fond: #ffffff;
  --texte: #111111;
  --doux: #6b7280;
  --pale: #9ca3af;
  --trait: #e5e7eb;
  --survol: #f7f7f8;
  --accent: #2563eb;
  --ok: #15803d;
  --ok-fond: #f0fdf4;
  --ko: #b91c1c;
  --ko-fond: #fef2f2;
  --rayon: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--fond); color: var(--texte);
  font: 16px/1.5 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
main { max-width: 760px; margin: 0 auto; padding: 32px 16px 80px; }

/* ---------- haut de page */
.haut { display: flex; align-items: center; justify-content: space-between; min-height: 32px; margin-bottom: 40px; }
.retour { background: none; border: 0; padding: 4px 0; color: var(--doux); font-size: 15px; }
.retour:hover { color: var(--texte); }
.marque { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--pale); }

/* ---------- accueil */
.accueil h1 { font-size: clamp(30px, 6vw, 44px); font-weight: 700; letter-spacing: -.02em; margin: 8px 0 6px; }
.accueil .sous { color: var(--doux); margin: 0 0 36px; }
.niveaux { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.niveau {
  position: relative; text-align: left; background: var(--fond); border: 1px solid var(--trait); border-radius: var(--rayon);
  padding: 22px 18px; font-size: 20px; font-weight: 600; transition: border-color .15s, transform .15s;
}
.niveau:hover { border-color: var(--texte); transform: translateY(-1px); }
.niveau small { display: block; font-size: 13px; font-weight: 400; color: var(--doux); margin-top: 2px; }
.niveau .badge { position: absolute; top: 12px; right: 12px; }
.groupe-titre { font-size: 13px; color: var(--pale); text-transform: uppercase; letter-spacing: .08em; margin: 28px 0 10px; }

.accueil { padding-top: 8vh; }
.accueil { max-width: 240px; margin: 0 auto; text-align: center; min-height: calc(100vh - 112px); display: flex; flex-direction: column; justify-content: center; padding-top: 0; }
.je-suis { color: var(--texte); opacity: .35; font-size: 18px; margin: 0 0 16px; }
.liste-niveaux { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.je-suis { font-size: 16px; }
.liste-niveaux button {
  width: 100%; text-align: center; background: rgba(17, 17, 17, .04); border: 1px solid rgba(17, 17, 17, .06);
  border-radius: 12px; padding: 10px 16px; font-size: 18px; font-weight: 600; letter-spacing: -.01em;
  transition: background .15s, border-color .15s;
}
.liste-niveaux button:hover { background: rgba(17, 17, 17, .08); border-color: rgba(17, 17, 17, .12); }

/* ---------- badge Nouveau */
.badge {
  display: inline-flex; align-items: center; gap: 5px; background: var(--accent); color: #fff; border-radius: 99px;
  font-size: 11px; font-weight: 600; letter-spacing: .02em; padding: 2px 8px; line-height: 1.5; vertical-align: middle;
}
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #fff; }

/* ---------- chapitres */
.chapitres { display: grid; grid-template-columns: 1fr 2.2fr 1fr; align-items: center; gap: 16px; text-align: center; }
.chap-cote { font-size: 14px; color: var(--doux); }
.chap-cote .etiq { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 4px; }
.chap-cote .num { display: block; font-weight: 600; }
.chap-passe { color: var(--pale); opacity: .6; }
.chap-centre .etiq { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--doux); }
.chap-centre h1 { font-size: clamp(24px, 5vw, 36px); line-height: 1.15; letter-spacing: -.02em; margin: 8px 0 6px; }
.chap-centre .matiere { display: inline-block; margin-top: 8px; color: var(--accent); font-size: 13px; font-weight: 600; border: 1.5px solid var(--accent); border-radius: 99px; padding: 2px 12px; }
.chap-centre .matiere:empty { display: none; }
.chap-centre .numero { font-weight: 600; font-size: 15px; }

.test {
  margin: 36px auto 0; max-width: 420px; text-align: center; border: 1px solid var(--trait); border-radius: var(--rayon); padding: 16px;
}
.test .etiq { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--doux); }
.test .date { font-size: 20px; font-weight: 600; margin: 4px 0 2px; }
.test .reste { font-size: 14px; color: var(--doux); }
.test.proche .reste { color: var(--accent); font-weight: 500; }

/* ---------- je m'entraîne */
.entraine h2 { font-size: 22px; letter-spacing: -.01em; margin: 44px 0 16px; text-align: center; }
.entraine h2 .dans { color: var(--doux); font-weight: 500; }
.rubriques { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 640px) { .rubriques { grid-template-columns: 1fr; } }
.rubrique {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; width: 100%; text-align: left;
  background: var(--c3); border: 1px solid var(--c2); border-radius: var(--rayon); padding: 18px 16px 20px;
  transition: border-color .15s, transform .15s;
}
.rubrique:hover:not(:disabled) { border-color: var(--c); transform: translateY(-2px); }
.rubrique:disabled { cursor: default; opacity: .5; }
.rubrique .ic { width: 44px; height: 44px; border-radius: 12px; background: var(--c2); color: var(--c); display: grid; place-items: center; margin-bottom: 6px; }
.rubrique .ic svg { width: 22px; height: 22px; }
.rubrique .nom { font-weight: 700; font-size: 17px; line-height: 1.25; color: var(--c); }
.rubrique .det { font-size: 14px; color: var(--doux); }
.rubrique .badge { position: absolute; top: 14px; right: 14px; background: var(--c); }

/* ---------- modale de choix */
.modale { position: fixed; inset: 0; z-index: 10; display: grid; place-items: end center; }
@media (min-width: 640px) { .modale { place-items: center; } }
.modale[hidden] { display: none; }
.modale-fond { position: absolute; inset: 0; background: rgba(17, 17, 17, .35); }
.modale-boite {
  position: relative; background: var(--fond); width: min(560px, 100%); max-height: 90vh; overflow: auto;
  border-radius: 20px 20px 0 0; padding: 24px 20px 28px; box-shadow: 0 20px 60px rgba(0, 0, 0, .15);
}
@media (min-width: 640px) { .modale-boite { border-radius: 20px; padding: 28px; } }
.modale-boite h3 { margin: 0 0 4px; font-size: 20px; }
.modale-boite .sous { color: var(--doux); margin: 0 0 18px; font-size: 14px; }
.fermer { position: absolute; top: 14px; right: 14px; border: 0; background: var(--survol); width: 34px; height: 34px; border-radius: 50%; font-size: 18px; line-height: 1; }
.fiche { border-top: 1px solid var(--trait); padding-top: 16px; margin-top: 16px; }
.fiche:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.fiche-titre { font-weight: 600; margin-bottom: 10px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.fiche-score { font-size: 13px; color: var(--doux); font-weight: 400; }
.choix { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 420px) { .choix { grid-template-columns: 1fr; } }
.option {
  display: block; text-decoration: none; text-align: left; border: 1px solid var(--trait); border-radius: 12px; padding: 14px;
  background: var(--fond); transition: border-color .15s;
}
.option:hover { border-color: var(--texte); }
.option b { display: block; font-size: 16px; }
.option span { font-size: 13px; color: var(--doux); }
.option.principale { background: var(--texte); color: #fff; border-color: var(--texte); }
.option.principale span { color: #d1d5db; }
.lien-leger { display: inline-block; margin-top: 8px; font-size: 13px; color: var(--doux); }

/* ---------- jeu en ligne */
.jeu-tete { margin-bottom: 24px; }
.jeu-tete h1 { font-size: 22px; margin: 0 0 12px; letter-spacing: -.01em; }
.progres { height: 6px; background: var(--survol); border-radius: 99px; overflow: hidden; }
.progres div { height: 100%; background: var(--texte); border-radius: 99px; transition: width .3s; }
.progres-tx { display: flex; justify-content: space-between; font-size: 13px; color: var(--doux); margin-top: 6px; }
.carte { border: 1px solid var(--trait); border-radius: var(--rayon); padding: 22px 20px; animation: entre .25s ease; }
@keyframes entre { from { opacity: 0; transform: translateY(6px); } }
.carte .etiq { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--doux); margin-bottom: 8px; }
.carte .question { font-size: 19px; font-weight: 600; line-height: 1.35; margin: 0 0 18px; }
.intro-section h2 { font-size: 24px; margin: 6px 0 10px; letter-spacing: -.01em; }
.intro-section p { color: var(--doux); margin: 0; }
.doc { background: var(--survol); border-radius: 12px; padding: 14px 16px; margin-bottom: 16px; font-size: 15px; }
.doc p { margin: 0 0 8px; } .doc p:last-child { margin: 0; }
.doc img { max-width: 100%; border-radius: 10px; display: block; }
.doc blockquote { margin: 0; line-height: 1.6; }
.doc-duo { display: flex; gap: 14px; align-items: center; }
.doc-duo img { width: 120px; height: 120px; object-fit: cover; flex: 0 0 auto; }
@media (max-width: 480px) { .doc-duo { flex-direction: column; align-items: stretch; } .doc-duo img { width: 100%; height: 160px; } }
.savoir { border-left: 3px solid var(--texte); padding: 2px 0 2px 12px; margin: 0 0 16px; font-size: 14px; color: #374151; }
.savoir b { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--doux); }
.tab-scroll { overflow-x: auto; }
.tab { border-collapse: collapse; font-size: 14px; background: #fff; margin-top: 4px; }
.tab th, .tab td { border: 1px solid var(--trait); padding: 5px 9px; text-align: center; }
.tab th { font-weight: 600; background: #fafafa; }
.schema { width: 100%; height: auto; display: block; font-family: Inter, system-ui, sans-serif; }

.barres { display: flex; align-items: flex-end; gap: 18px; height: 170px; padding: 18px 8px 0 28px; position: relative; border-left: 1px solid #9ca3af; border-bottom: 1px solid #9ca3af; margin: 8px 0 30px; }
.barres-axe { position: absolute; left: -2px; top: 50%; transform: translate(-50%, -50%) rotate(-90deg); font-size: 11px; color: var(--doux); white-space: nowrap; transform-origin: center; margin-left: 4px; }
.barre { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; }
.barre-b { width: 60%; background: #111; border-radius: 6px 6px 0 0; }
.barre-v { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.barre-l { position: absolute; bottom: -24px; font-size: 12px; color: var(--doux); white-space: nowrap; }

/* choix */
.choix-qcm { display: grid; gap: 10px; }
.choix-qcm button {
  text-align: left; background: var(--fond); border: 1px solid var(--trait); border-radius: 12px; padding: 13px 14px;
  display: flex; gap: 12px; align-items: center; transition: border-color .15s, background .15s;
}
.choix-qcm button::before { content: ""; flex: 0 0 18px; height: 18px; border: 1.5px solid var(--pale); border-radius: 50%; }
.choix-qcm.multi button::before { border-radius: 5px; }
.choix-qcm button:hover:not(:disabled) { border-color: var(--texte); }
.choix-qcm button.sel { border-color: var(--texte); background: var(--survol); }
.choix-qcm button.sel::before { border-color: var(--texte); background: var(--texte); box-shadow: inset 0 0 0 3px #fff; }
.choix-qcm button.ok { border-color: var(--ok); background: var(--ok-fond); }
.choix-qcm button.ko { border-color: var(--ko); background: var(--ko-fond); }

/* trous et emplacements */
.texte-trous { font-size: 17px; line-height: 2.3; margin-bottom: 18px; }
.trou {
  display: inline-block; min-width: 92px; min-height: 32px; vertical-align: middle; border: 0; border-bottom: 2px solid var(--pale);
  background: var(--survol); border-radius: 8px 8px 2px 2px; padding: 2px 10px; margin: 0 2px; font-weight: 600; line-height: 1.6;
}
.trou.actif { border-bottom-color: var(--accent); background: #eff6ff; }
.trou.ok { border-bottom-color: var(--ok); background: var(--ok-fond); color: var(--ok); }
.trou.ko { border-bottom-color: var(--ko); background: var(--ko-fond); color: var(--ko); text-decoration: line-through; }
.correction { display: inline-block; color: var(--ok); font-weight: 600; margin-left: 4px; }
.banque { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 16px; border-top: 1px dashed var(--trait); }
.puce { border: 1px solid var(--trait); background: var(--fond); border-radius: 99px; padding: 7px 14px; font-weight: 500; transition: border-color .15s, opacity .15s; }
.puce:hover:not(:disabled) { border-color: var(--texte); }
.puce.utilisee { opacity: .25; }
.lignes-slots { display: grid; gap: 10px; margin-bottom: 18px; }
.ligne-slot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; border: 1px solid var(--trait); border-radius: 12px; padding: 10px 12px; }
.ligne-slot .trou { min-width: 150px; text-align: center; }

/* ordre */
.liste-ordre { list-style: none; margin: 0 0 4px; padding: 0; display: grid; gap: 8px; }
.liste-ordre li { display: flex; align-items: center; gap: 10px; border: 1px solid var(--trait); border-radius: 12px; padding: 10px 10px 10px 14px; background: var(--fond); transition: transform .15s; }
.liste-ordre li .n { flex: 0 0 26px; height: 26px; border-radius: 50%; background: var(--survol); display: grid; place-items: center; font-size: 13px; font-weight: 600; }
.liste-ordre li .t { flex: 1; }
.liste-ordre li .fl { display: flex; gap: 4px; }
.liste-ordre li .fl button { border: 1px solid var(--trait); background: var(--fond); width: 34px; height: 34px; border-radius: 8px; }
.liste-ordre li .fl button:hover:not(:disabled) { border-color: var(--texte); }
.liste-ordre li.ok { border-color: var(--ok); background: var(--ok-fond); }
.liste-ordre li.ko { border-color: var(--ko); background: var(--ko-fond); }

/* écrire, nombre */
textarea, .champ { width: 100%; font: inherit; border: 1px solid var(--trait); border-radius: 12px; padding: 12px 14px; background: var(--fond); }
textarea { min-height: 110px; resize: vertical; }
textarea:focus, .champ:focus { outline: 2px solid var(--texte); outline-offset: -1px; }
.ligne-nombre { display: flex; align-items: center; gap: 10px; }
.ligne-nombre .champ { max-width: 160px; font-size: 18px; }
.modele { margin-top: 14px; border: 1px solid var(--ok); background: var(--ok-fond); border-radius: 12px; padding: 12px 14px; }
.modele b { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--ok); margin-bottom: 4px; }
.auto-eval { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }

/* surligner */
.texte-surligne { font-size: 17px; line-height: 1.9; background: var(--survol); border-radius: 12px; padding: 14px 16px; margin-bottom: 4px; }
.mot { border: 0; background: none; padding: 1px 2px; border-radius: 5px; margin: 0; }
.mot:hover:not(:disabled) { background: #e5e7eb; }
.mot.sel { background: #fde68a; }
.mot.ok { background: #bbf7d0; }
.mot.ko { background: #fecaca; }
.mot.manque { box-shadow: inset 0 -3px 0 var(--ok); }

/* pied du jeu */
.retour-msg { margin-top: 16px; border-radius: 12px; padding: 12px 14px; font-weight: 500; }
.retour-msg.ok { background: var(--ok-fond); color: var(--ok); }
.retour-msg.ko { background: var(--ko-fond); color: var(--ko); }
.retour-msg.info { background: var(--survol); color: var(--doux); }
.actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.bouton { border: 1px solid var(--texte); background: var(--texte); color: #fff; border-radius: 99px; padding: 11px 22px; font-weight: 600; text-decoration: none; display: inline-block; }
.bouton:hover { opacity: .88; }
.bouton.second { background: var(--fond); color: var(--texte); }
.secoue { animation: secoue .3s; }
@keyframes secoue { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

.fin { text-align: center; padding: 40px 20px; }
.fin .gros { font-size: 56px; font-weight: 700; letter-spacing: -.03em; line-height: 1; }
.fin .gros small { font-size: 24px; color: var(--pale); }
.fin p { color: var(--doux); max-width: 420px; margin: 14px auto 24px; }
.fin .actions { justify-content: center; }

/* cahier */
.cahier { border: 1.5px solid var(--texte); border-radius: var(--rayon); padding: 18px; margin-bottom: 16px; }
.cahier-tete { display: flex; align-items: center; gap: 10px; font-size: 17px; }
.cahier-tete svg { width: 22px; height: 22px; flex: 0 0 auto; }
.cahier p { color: var(--doux); font-size: 14px; margin: 8px 0 12px; }
.liste-cahier { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 14px; }
.liste-cahier li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.liste-cahier .n { flex: 0 0 24px; height: 24px; border-radius: 50%; background: var(--survol); display: grid; place-items: center; font-weight: 600; font-size: 12px; }
.liste-cahier small { display: block; color: var(--pale); font-size: 12px; }
.intro-section .liste-cahier { margin: 16px 0; }
.pastille-cahier { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; background: var(--survol); border-radius: 10px; padding: 8px 12px; margin: 0 0 14px; }
.pastille-cahier svg { flex: 0 0 auto; }
.coche { display: flex; align-items: center; gap: 10px; font-weight: 600; margin-top: 8px; cursor: pointer; }
.coche input { width: 20px; height: 20px; accent-color: var(--texte); }
.bouton:disabled { opacity: .3; cursor: default; }

.vide { color: var(--doux); text-align: center; padding: 18px; border: 1px dashed var(--trait); border-radius: var(--rayon); }

@media (max-width: 560px) {
  .chapitres { grid-template-columns: 1fr 1fr; }
  .chap-centre { grid-column: 1 / -1; order: -1; }
  .chap-cote { border: 1px solid var(--trait); border-radius: 12px; padding: 10px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

.activites-faites { margin: 36px auto 0; max-width: 620px; border: 1px solid rgba(17, 17, 17, .08); background: rgba(17, 17, 17, .02); border-radius: var(--rayon); padding: 16px 18px 18px; }
.activites-titre { font-weight: 600; font-size: 15px; margin-bottom: 12px; }
.chap-cote .matiere { display: table; margin: 5px auto 0; color: var(--accent); font-size: 8px; font-weight: 600; letter-spacing: .02em; border: 1px solid var(--accent); border-radius: 99px; padding: 0 5px; line-height: 1.5; opacity: .45; }
.matiere.svt { color: #059669 !important; border-color: #059669 !important; }

/* ---------- fenêtre de choix : fond flouté, couleur de la rubrique */
.modale { place-items: center; padding: 16px; }
.modale-fond { background: rgba(255, 255, 255, .35); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.modale-boite { background: transparent; box-shadow: none; border-radius: 0; padding: 8px 0 0; width: min(520px, 100%); overflow: visible; }
.modale-boite h3 { color: var(--c); font-size: 24px; text-align: center; margin: 0 0 22px; }
.modale-boite .fermer { top: -6px; right: 0; background: rgba(255, 255, 255, .7); color: var(--c); }
.modale-boite .choix { align-items: start; }
.modale-boite .col-papier { display: flex; flex-direction: column; }
.modale-boite .option { min-height: 96px; display: flex; flex-direction: column; justify-content: center; text-align: center; border-radius: 16px; }
.modale-boite .option:not(.principale) { background: var(--c3); border: 1.5px solid var(--c2); color: var(--c); }
.modale-boite .option:not(.principale) span { color: var(--c); opacity: .75; }
.modale-boite .option:not(.principale):hover { border-color: var(--c); }
.modale-boite .option.principale { background: var(--c); border: 1.5px solid var(--c); color: #fff; }
.modale-boite .option.principale:hover { opacity: .9; }
.modale-boite .lien-leger { color: var(--c); text-align: center; margin-top: 10px; }

/* ---------- rappels discrets du style Kenney des activités en ligne :
   titres en Fredoka, ombres pleines courtes, boutons qui s'enfoncent. Le site reste blanc et sobre. */
.chap-centre h1, .entraine h2, .rubrique .nom, .modale-boite h3, .liste-niveaux button, .option b, .activites-titre, .badge {
  font-family: "Fredoka", Inter, system-ui, sans-serif; letter-spacing: 0;
}
.chap-centre h1 { font-weight: 600; }
.entraine h2 { font-weight: 600; }
.badge { font-weight: 600; box-shadow: 0 2px 0 rgba(17, 17, 17, .22); }

.liste-niveaux button { box-shadow: 0 3px 0 rgba(17, 17, 17, .07); transition: background .15s, border-color .15s, transform .08s, box-shadow .08s; }
.liste-niveaux button:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(17, 17, 17, .07); }

.rubrique { border-width: 1.5px; box-shadow: 0 4px 0 var(--c2); transition: border-color .15s, box-shadow .15s, transform .08s; }
.rubrique:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 6px 0 var(--c2); }
.rubrique:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--c2); }
.rubrique .ic { border: 2px solid var(--c); box-shadow: 0 2px 0 var(--c); background: #fff; }
.rubrique .nom { font-weight: 600; font-size: 18px; }

.liste-cahier .n { font-family: "Fredoka", Inter, sans-serif; background: #fff; border: 1.5px solid rgba(17, 17, 17, .18); box-shadow: 0 2px 0 rgba(17, 17, 17, .1); }

.modale-boite h3 { font-weight: 600; font-size: 26px; }
.modale-boite .option { transition: transform .08s, box-shadow .08s, border-color .15s; }
.modale-boite .option:not(.principale) { box-shadow: 0 4px 0 var(--c2); }
.modale-boite .option.principale { box-shadow: 0 4px 0 color-mix(in srgb, var(--c) 60%, #000); }
.modale-boite .option:hover { transform: translateY(-1px); }
.modale-boite .option:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--c2); }
.option b { font-weight: 600; font-size: 18px; }

/* ---------- niveau en travaux */
.travaux { text-align: center; padding: 6vh 0 0; }
.chantier { width: min(320px, 100%); height: auto; display: block; margin: 0 auto 18px; }
.travaux h1 { font-family: "Fredoka", Inter, sans-serif; font-weight: 600; font-size: 30px; margin: 0 0 6px; }
.travaux p { color: var(--doux); margin: 0; }

/* voyant « chapitre en cours » */
.voyant { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #22c55e; margin-right: 7px; vertical-align: 1px;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, .45); animation: voyant 2.4s ease-in-out infinite; }
@keyframes voyant {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34, 197, 94, .4); }
  50% { opacity: .45; box-shadow: 0 0 0 4px rgba(34, 197, 94, 0); }
}
@media (prefers-reduced-motion: reduce) { .voyant { animation: none; } }

/* ---------- activités cliquables / verrouillées */
.liste-activites li { display: block; }
.act-btn { display: flex; gap: 10px; align-items: flex-start; width: 100%; text-align: left; background: none; border: 1px solid transparent;
  border-radius: 10px; padding: 6px 8px; margin: -6px -8px; font-size: 14px; transition: background .15s, border-color .15s; }
.act-btn:not(:disabled):hover { background: #fff; border-color: rgba(17, 17, 17, .1); box-shadow: 0 2px 0 rgba(17, 17, 17, .06); }
.act-btn:not(:disabled):hover .t { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(17, 17, 17, .3); }
.act-btn.verrou { cursor: not-allowed; color: var(--pale); }
.act-btn.verrou .n { color: var(--pale); }

/* ---------- visionneuse de PDF */
.vision-barre { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: rgba(255, 255, 255, .9); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); padding: 10px 0; margin-top: -12px; }
.bascule { display: inline-flex; border: 1.5px solid var(--c); border-radius: 12px; overflow: hidden; box-shadow: 0 3px 0 color-mix(in srgb, var(--c) 25%, transparent); }
.bascule button { border: 0; background: #fff; color: var(--c); font-family: "Fredoka", Inter, sans-serif; font-weight: 600; font-size: 15px;
  padding: 8px 14px; transition: background .15s, color .15s; }
.bascule button + button { border-left: 1.5px solid var(--c); }
.bascule button[aria-pressed="true"] { background: var(--c); color: #fff; }
.bascule button:disabled { color: var(--pale); cursor: not-allowed; }
.imprimer { width: 44px; height: 44px; display: grid; place-items: center; border: 1.5px solid var(--trait); border-radius: 12px; background: #fff;
  box-shadow: 0 3px 0 rgba(17, 17, 17, .08); transition: transform .08s, box-shadow .08s, border-color .15s; }
.imprimer:hover { border-color: var(--texte); }
.imprimer:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(17, 17, 17, .08); }
.vision-titre { font-family: "Fredoka", Inter, sans-serif; font-weight: 600; font-size: 22px; margin: 14px 0 12px; }
.vision-pdf { display: block; width: 100%; height: calc(100vh - 170px); min-height: 480px; border: 1px solid var(--trait); border-radius: var(--rayon); background: #f7f7f8; }
.vision-lien { display: inline-block; margin-top: 10px; font-size: 13px; color: var(--doux); }
.vision { max-width: 980px; margin: 0 auto; }
main:has(.vision) { max-width: 1000px; }
@media (max-width: 560px) {
  .vision-barre { flex-wrap: wrap; }
  .bascule { order: 3; width: 100%; } .bascule button { flex: 1; font-size: 14px; padding: 8px 6px; }
}
.chap-centre .theme { font-size: 13px; color: var(--doux); margin-top: 10px; }
.chap-centre .theme + h1 { margin-top: 2px; }
.chap-cote .theme-cote { display: block; font-size: 11px; line-height: 1.3; margin-bottom: 4px; }

/* ---------- bouton de langue (un seul : FR → EN → AL) */
.barre-langue { max-width: 1000px; margin: 0 auto; padding: 12px 16px 0; display: flex; justify-content: flex-end; }
.langue { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--trait); background: #fff; border-radius: 99px;
  padding: 5px 12px 5px 9px; font-family: "Fredoka", Inter, sans-serif; font-weight: 600; font-size: 14px; color: var(--texte);
  box-shadow: 0 2px 0 rgba(17, 17, 17, .07); transition: border-color .15s, transform .08s, box-shadow .08s; }
.langue:hover { border-color: var(--texte); }
.langue:active { transform: translateY(2px); box-shadow: none; }
main { padding-top: 12px; }
body.jeu-k .barre-langue { max-width: 720px; }

/* ---------- nom du site sur l'accueil */
.nom-site { font-family: "Fredoka", Inter, sans-serif; font-weight: 700; font-size: 34px; line-height: 1.1; letter-spacing: -.01em;
  margin: 0 0 22px; white-space: nowrap; }
@media (max-width: 380px) { .nom-site { font-size: 28px; } }
/* titre de l'accueil : centré sur la page, plus haut, en gris */
.accueil { max-width: none; }
.accueil .je-suis, .accueil .liste-niveaux { max-width: 240px; margin-left: auto; margin-right: auto; }
.nom-site { color: #6b7280; text-align: center; margin: 0 0 11vh; white-space: normal; }
.accueil .je-suis, .accueil .liste-niveaux { width: 100%; }
.accueil .nom-site { margin: 0 0 11vh; color: #6b7280; font-size: 34px; }
.accueil .nom-site { color: var(--texte); font-size: 44px; margin: 0 0 6vh; }
@media (max-width: 420px) { .accueil .nom-site { font-size: 34px; } }

/* ---------- logo de l'établissement, en bas à gauche (masqué pendant les exercices en ligne) */
.logo-etab { position: fixed; left: 16px; bottom: 14px; width: 150px; height: auto; z-index: 2; pointer-events: none; }
body.jeu-k .logo-etab, body:has(.vision) .logo-etab { display: none; }
@media (max-width: 640px) { .logo-etab { position: static; display: block; width: 120px; margin: 24px auto 16px; } }
/* « my » en exposant, en gris, devant le nom du site */
.nom-site .my { color: #9ca3af; font-size: .42em; font-weight: 600; vertical-align: super; margin-right: 3px; position: relative; top: -.15em; }

/* ---------- en-tête : niveau et professeur à gauche, langue à droite sur la même ligne, en texte simple */
.barre-langue { max-width: 760px; height: 0; padding: 0 16px; position: relative; z-index: 3; }
.langue { position: absolute; right: 16px; top: 18px; border: 0; background: none; box-shadow: none; border-radius: 0; padding: 4px 0;
  font-family: Inter, system-ui, sans-serif; font-weight: 400; font-size: 13px; letter-spacing: .08em; color: var(--pale); }
.langue:hover { color: var(--texte); border: 0; }
.langue:active { transform: none; }
.haut { justify-content: flex-start; padding-right: 48px; }
body.jeu-k .barre-langue { max-width: 720px; }
body.jeu-k .langue { top: -2px; }
.barre-langue { margin: 0 auto; }
.langue { top: 14px; }
.langue { font-weight: 700; }
.langue { color: var(--texte); }
/* « space » en exposant, en gris, après le nom du site */
.nom-site .space { color: #9ca3af; font-size: .42em; font-weight: 600; vertical-align: super; margin-left: 3px; position: relative; top: -.15em; }

/* ---------- petit titre du site au centre de la ligne du haut (lien vers l'accueil) */
.haut { position: relative; }
.mini-titre { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); white-space: nowrap; text-decoration: none;
  font-family: "Fredoka", Inter, sans-serif; font-weight: 700; font-size: 16px; color: var(--texte); }
.mini-titre sup { color: #9ca3af; font-size: .55em; font-weight: 600; margin-left: 2px; }
.mini-titre:hover { opacity: .75; }
@media (max-width: 480px) { .mini-titre { font-size: 14px; } .haut .marque { font-size: 11px; } }
