/* Ma Trading — les cours en ligne (panneau élève + onglet Cours de l'admin).
   Chargé APRÈS /style.css : n'ajoute que la section cours, la DA reste celle
   de l'app (dark + golden hour, Fraunces pour les titres, orange). Le HTML
   des contenus (mémo, fiche prof) est produit par le serveur (internal/cours)
   à partir des markdown du repo — ces classes sont son contrat. */

/* ---------- entête de section : titre Fraunces + filet « code couleur » --- */
.hero { margin: 6px 0 18px; }
.hero h2 {
  font-family: "Fraunces", Georgia, serif; font-weight: 500; color: var(--txt);
  font-size: 24px; letter-spacing: -.015em; margin: 0;
}
.hero h2 i { color: var(--orange); font-style: italic; } /* la signature « Ma » */
.hero .hsub { color: var(--muted); font-size: 13px; margin-top: 4px; }

/* le filet signature : rouge, bleu, bleu pointillé, noir — le code couleur
   des niveaux, celui que les élèves apprennent au cours 1 */
.code-strip { display: flex; align-items: center; gap: 7px; margin: 12px 0 0; }
.code-strip i { display: block; height: 3px; border-radius: 2px; }
.code-strip .r { width: 46px; background: var(--red); }
.code-strip .b { width: 30px; background: var(--blue); }
.code-strip .bd {
  width: 30px;
  background: repeating-linear-gradient(90deg, var(--blue) 0 5px, transparent 5px 9px);
}
.code-strip .k { width: 18px; background: #565b68; }

/* ---------- segmenté interne (Mémo / QCM…) — même langage que les onglets */
.ctabs { display: flex; gap: 4px; margin: 14px 0 18px; flex-wrap: wrap; }
.ctabs button {
  border: 1px solid transparent; background: none; cursor: pointer;
  color: var(--muted); font: inherit; font-size: 13px; font-weight: 600;
  padding: 7px 14px; border-radius: 999px;
  transition: color .15s var(--ease), border-color .15s var(--ease);
}
.ctabs button:hover { color: var(--txt); }
.ctabs button.active {
  color: var(--orange); border-color: var(--orange);
  background: rgba(243, 112, 33, .08);
}

/* ---------- le parcours : 24 marches reliées par un fil ---------- */
.plist { position: relative; }
.plist::before {
  content: ""; position: absolute; left: 29px; top: 10px; bottom: 10px;
  width: 2px; background: var(--line);
}
.mois-head {
  position: relative; z-index: 1;
  margin: 24px 0 12px; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
}
.mois-head:first-child { margin-top: 0; }
.mois-head b {
  font-family: "Fraunces", Georgia, serif; font-weight: 500; font-style: italic;
  color: var(--orange); font-size: 20px; letter-spacing: -.01em;
}
.mois-head span {
  font-size: 11.5px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted);
}
/* le numéro du mois en filigrane, énorme et juste esquissé */
.mois-head .ghost {
  margin-left: auto; font-family: "Fraunces", Georgia, serif; font-weight: 500;
  font-size: 46px; line-height: .8; user-select: none;
  color: transparent; -webkit-text-stroke: 1px rgba(243, 112, 33, .22);
}

.crow {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 3px 14px;
  align-items: center; padding: 10px 14px 10px 8px; margin-bottom: 10px;
  background: var(--bg3); border: 1px solid var(--line); border-radius: 12px;
  transition: transform .25s var(--ease), border-color .25s;
}
.crow:hover { transform: translateY(-1px); border-color: rgba(243, 112, 33, .45); }

/* la pastille de numéro : c'est elle qui porte l'état, comme un jalon */
.crow .cnum {
  grid-row: span 2; justify-self: center;
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: "Fraunces", Georgia, serif; font-weight: 500; font-size: 16px;
  color: var(--muted); font-variant-numeric: tabular-nums;
  background: var(--bg2); border: 1px solid var(--line);
}
.crow .ctitle { color: #fff; font-weight: 600; font-size: 14px; }
.crow .cmeta { grid-column: 2; color: var(--muted); font-size: 12px; display: flex; gap: 6px 8px; flex-wrap: wrap; align-items: center; }
.crow .cside { grid-row: span 2; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }

.crow.done .cnum { color: var(--blue); border-color: rgba(77, 144, 224, .55); background: rgba(77, 144, 224, .10); }
.crow.today {
  border-color: rgba(243, 112, 33, .55);
  background: linear-gradient(180deg, rgba(243, 112, 33, .07), var(--bg3) 70%);
  box-shadow: 0 0 24px rgba(243, 112, 33, .14);
}
.crow.today .cnum {
  color: var(--bg); background: var(--orange); border-color: var(--orange);
  font-weight: 600; box-shadow: 0 0 16px var(--glow);
}
.crow.locked { opacity: .5; }
.crow.locked .ctitle { color: var(--muted); font-weight: 500; }
.crow.locked .cnum { border-style: dashed; background: none; }
.crow.locked:hover { transform: none; border-color: var(--line); }

/* jauge des QCM rendus, sur chaque ligne côté admin */
.qbar {
  display: inline-block; width: 110px; height: 5px; border-radius: 3px;
  background: var(--bg2); border: 1px solid var(--line); overflow: hidden;
}
.qbar i { display: block; height: 100%; background: var(--blue); border-radius: 3px; }
.qbar.warn i { background: linear-gradient(90deg, var(--orange-soft), var(--orange)); }

/* scores des QCM passés : le sans-faute brille, les autres restent bleus */
.sc {
  display: inline-block; padding: 1px 9px; border-radius: 12px; font-size: 11px; font-weight: 700;
  background: rgba(77, 144, 224, .12); color: var(--blue); font-variant-numeric: tabular-nums;
}
.sc.top {
  background: rgba(243, 112, 33, .14); color: var(--orange);
  box-shadow: 0 0 10px rgba(243, 112, 33, .18);
}

/* ---------- l'entête élève : anneau de progression + repères ---------- */
.prog-card {
  display: flex; gap: 22px; align-items: center; flex-wrap: wrap;
  background:
    radial-gradient(420px 160px at 85% -30px, rgba(243, 112, 33, .13), transparent 70%),
    var(--bg3);
  border: 1px solid var(--line); border-radius: 16px;
  padding: 18px 22px; margin-bottom: 22px;
}
.prog-main { flex: 1; min-width: 220px; }
.prog-stats { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

/* l'anneau : 24 cours, le chemin parcouru en orange qui rayonne */
.ring { position: relative; width: 100px; height: 100px; flex-shrink: 0; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); filter: drop-shadow(0 0 10px rgba(243, 112, 33, .35)); }
.ring .track { fill: none; stroke: var(--bg2); stroke-width: 7; }
.ring .arc { fill: none; stroke: var(--orange); stroke-width: 7; stroke-linecap: round; }
.ring .txt {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center;
  font-family: "Fraunces", Georgia, serif; line-height: 1.1;
}
.ring .txt b { font-size: 23px; font-weight: 500; color: var(--txt); }
.ring .txt small { display: block; font: 600 10px/1.4 "Schibsted Grotesk", sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* pastille de repère (même langage que les .bstat de l'admin) */
.cstat {
  display: flex; align-items: baseline; gap: 7px; padding: 6px 12px;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 999px;
  font-size: 12.5px; color: var(--muted); white-space: nowrap;
}
.cstat b { color: #fff; font-size: 14px; font-variant-numeric: tabular-nums; }
.cstat.warn { border-color: rgba(243, 112, 33, .5); }
.cstat.warn b { color: var(--orange); }

/* ---------- lecture d'un cours ---------- */
/* La ligne de navigation d'un cours : le retour à la liste à gauche, le
   raccourci vers le graphique à droite. */
.cours-nav { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.cours-nav .back-link { margin-bottom: 0; }
/* `.cours-nav .cours-jouer` et non `.cours-jouer` seul : `.btn.primary` pose
   width:100% avec la même spécificité qu'une classe double — sans le
   descendant, le bouton s'étalait sur toute la largeur du panneau et criait
   plus fort que le cours lui-même. */
.cours-nav .cours-jouer {
  width: auto; margin: 0 0 0 auto; padding: 6px 12px;
  font-size: 12.5px; white-space: nowrap; box-shadow: none;
}
.cours-nav .cours-jouer:hover { transform: none; box-shadow: 0 8px 20px -10px var(--glow); }
@media (max-width: 640px) {
  .cours-nav .cours-jouer { margin-left: 0; white-space: normal; }
}
.back-link {
  background: none; border: none; padding: 0; font: inherit; font-size: 12.5px;
  color: var(--muted); cursor: pointer;
  text-decoration: underline dotted; text-underline-offset: 3px;
}
.back-link:hover { color: var(--orange); }

/* mode direct : la barre du prof pendant la visio — bloc en cours + chrono */
.direct-bar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 16px; margin-bottom: 20px; border-radius: 12px;
  background: rgba(243, 112, 33, .09); border: 1px solid rgba(243, 112, 33, .55);
  box-shadow: 0 6px 24px rgba(0, 0, 0, .35), 0 0 18px rgba(243, 112, 33, .10);
  backdrop-filter: blur(6px);
}
.direct-bar .rp-badge { font-size: 10.5px; }
.direct-bar .clock { font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; color: var(--txt); }
.direct-bar .bloc { color: var(--muted); font-size: 12.5px; }
.direct-bar .bloc b { color: var(--orange); }

/* les grandes parties de la fiche prof (PARTIE 1, 2, 3) */
.h-part { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 28px 0 16px; }
.h-part b {
  font-family: "Fraunces", Georgia, serif; font-weight: 500; font-style: italic;
  color: var(--orange); font-size: 18px; letter-spacing: -.01em;
}
.h-part span {
  font-size: 11.5px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted);
}
.tl > .h-part:first-child { margin-top: 0; }

/* blocs minutés de la fiche prof */
.tl { border-left: 2px solid var(--line); margin-left: 6px; padding-left: 20px; }
.tl-bloc { position: relative; padding-bottom: 24px; }
.tl-bloc::before {
  content: ""; position: absolute; left: -26px; top: 4px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--bg3); border: 2px solid var(--muted);
}
.tl-bloc.now {
  margin-left: -14px; padding: 14px 16px 8px; border-radius: 12px;
  background: rgba(243, 112, 33, .05); border: 1px solid rgba(243, 112, 33, .3);
}
.tl-bloc.now::before {
  left: -21px; top: 18px;
  background: var(--orange); border-color: var(--orange); box-shadow: 0 0 12px var(--glow);
}
.tl-when {
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); font-variant-numeric: tabular-nums;
}
.tl-bloc.now .tl-when { color: var(--orange); }
.tl-bloc h3 { font-family: "Fraunces", Georgia, serif; font-weight: 500; font-size: 17px; color: var(--txt); margin: 3px 0 8px; letter-spacing: -.01em; cursor: pointer; }
.tl-bloc p { color: #d8dbe4; font-size: 13.5px; margin-bottom: 10px; }
.tl-bloc .repere { color: var(--muted); font-size: 12.5px; font-style: italic; }

/* « À dire » : la voix du prof (fiche) ou de Ma (retour de copie) — en serif */
.adire {
  margin: 10px 0; padding: 11px 15px; border-radius: 8px;
  background: rgba(243, 112, 33, .07); border-left: 3px solid var(--orange);
  font-size: 14px; line-height: 1.65;
  font-family: "Fraunces", Georgia, serif; font-weight: 400;
}
.adire b { display: block; color: var(--orange); font-size: 11px; font-family: "Schibsted Grotesk", sans-serif; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 4px; }

/* 📌 fiche prof (encadré savoir) */
.fp-note {
  margin: 10px 0; padding: 10px 14px; border-radius: 8px;
  background: var(--bg3); border: 1px dashed var(--line);
  font-size: 13px; color: var(--muted);
}
.fp-note b { color: var(--txt); }
.fp-note ul { margin: 8px 0 2px 16px; }
.fp-note li { margin-bottom: 5px; line-height: 1.55; }

/* checklists à cocher en direct (réglages, devoirs, récap de fin de cours) */
.clist { list-style: none; margin: 8px 0 12px; padding: 0; display: grid; gap: 6px; }
.clist label {
  display: flex; gap: 10px; align-items: flex-start; cursor: pointer;
  padding: 8px 12px; border-radius: 8px; font-size: 13.5px; color: #d8dbe4;
  background: var(--bg3); border: 1px solid var(--line); margin: 0;
  transition: border-color .15s var(--ease);
}
.clist label:hover { border-color: rgba(243, 112, 33, .4); }
.clist input { width: auto; margin: 3px 0 0; accent-color: var(--orange); flex-shrink: 0; }
.clist input:checked + span { color: var(--muted); text-decoration: line-through; }

/* mémo élève et queue de fiche prof : tableaux et listes lisibles */
.memo table { width: 100%; border-collapse: collapse; margin: 10px 0 16px; font-size: 13px; }
.memo th { color: var(--muted); text-align: left; font-weight: 600; padding: 6px 8px; }
.memo td { padding: 7px 8px; border-top: 1px solid var(--line); color: #d8dbe4; }
.memo ul:not(.clist) { margin: 0 0 16px 18px; color: #d8dbe4; font-size: 13.5px; }
.memo ul:not(.clist) li { margin-bottom: 6px; }
.memo h3 { font-family: "Fraunces", Georgia, serif; font-weight: 500; font-size: 17px; color: var(--txt); margin: 20px 0 8px; }
.memo h3:first-child { margin-top: 0; }
.memo p { color: #d8dbe4; font-size: 13.5px; margin-bottom: 10px; }
.memo .repere { color: var(--muted); font-size: 12.5px; font-style: italic; }

/* ---------- QCM ---------- */
.qcm-q { margin-bottom: 20px; }
.qcm-q .qtxt { color: #fff; font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.qcm-q .qtxt .qn {
  display: inline-grid; place-items: center; min-width: 24px; height: 24px; margin-right: 8px;
  padding: 0 4px; border-radius: 12px;
  background: rgba(243, 112, 33, .12); border: 1px solid rgba(243, 112, 33, .4);
  color: var(--orange); font-size: 12px; font-variant-numeric: tabular-nums;
}
.qcm-q .radio-card { transition: border-color .15s var(--ease); }
.qcm-q .radio-card:hover { border-color: rgba(243, 112, 33, .45); }
.qcm-q textarea {
  width: 100%; min-height: 84px; padding: 10px 12px; resize: vertical; font: inherit;
  background: var(--bg3); border: 1px solid var(--line); border-radius: 8px;
  color: var(--txt); outline: none;
}
.qcm-q textarea:focus { border-color: var(--orange); }
.qcm-foot { display: flex; align-items: center; gap: 12px; margin-top: 20px; flex-wrap: wrap; }
.qcm-foot .left { color: var(--muted); font-size: 12.5px; flex: 1; min-width: 200px; }
.qcm-foot .btn.primary { width: auto; margin: 0; }

/* vue prof / copie corrigée : options marquées */
.radio-card.ok {
  border-color: rgba(243, 112, 33, .6);
  box-shadow: 0 0 0 1px rgba(243, 112, 33, .35), 0 0 12px rgba(243, 112, 33, .10);
}
.ok-tag { margin-left: auto; color: var(--orange); font-size: 11px; font-weight: 800; white-space: nowrap; }
.radio-card.mine-ok { border-color: rgba(77, 144, 224, .6); box-shadow: 0 0 0 1px rgba(77, 144, 224, .35); }
.radio-card.mine-ko { border-color: rgba(214, 72, 54, .6); box-shadow: 0 0 0 1px rgba(214, 72, 54, .35); }
.mine-tag { margin-left: auto; font-size: 11px; font-weight: 800; white-space: nowrap; }
.mine-tag.good { color: var(--blue); }
.mine-tag.bad { color: var(--red); }
.q-why {
  margin-top: 8px; padding: 8px 12px; border-radius: 8px; font-size: 12.5px;
  color: var(--muted); background: rgba(243, 112, 33, .06);
  border-left: 3px solid var(--orange);
}
.q-why b { color: var(--orange); }

/* résultat : le score en grand, dans la lumière */
.score-card {
  text-align: center; padding: 26px 20px; margin-bottom: 20px;
  background:
    radial-gradient(360px 170px at 50% -40px, rgba(243, 112, 33, .18), transparent 70%),
    var(--bg3);
  border: 1px solid rgba(243, 112, 33, .5); border-radius: 16px;
  box-shadow: 0 0 50px rgba(243, 112, 33, .13);
}
.score-card .big {
  font-family: "Fraunces", Georgia, serif; font-size: 48px; color: var(--orange); line-height: 1.05;
  text-shadow: 0 0 30px rgba(243, 112, 33, .45);
}
.score-card .big small { font-size: 24px; color: var(--muted); }
.score-card .lbl { color: var(--muted); font-size: 13px; margin-top: 8px; line-height: 1.6; }
.qrecap { display: flex; flex-direction: column; gap: 8px; }
.qline {
  display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; align-items: baseline;
  padding: 10px 13px; border-radius: 8px; font-size: 13px; color: #d8dbe4;
  background: var(--bg3); border: 1px solid var(--line); border-left: 3px solid rgba(77, 144, 224, .65);
}
.qline.ko { border-left-color: var(--red); background: rgba(214, 72, 54, .05); }
.qline.open { border-left-color: var(--orange); }
.qline .qn { color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 700; }
.qline .fix { display: block; margin-top: 4px; color: var(--muted); }
.qline .fix b { color: var(--orange); }

/* ---------- copies à corriger (admin) ---------- */
.copy-card { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; }
.copy-card.todo { border-color: rgba(243, 112, 33, .55); box-shadow: 0 0 18px rgba(243, 112, 33, .12); }
.copy-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.copy-head b { color: #fff; overflow-wrap: anywhere; }
.copy-head .meta { color: var(--muted); font-size: 12px; flex: 1; }
.copy-auto { color: var(--muted); font-size: 12.5px; margin: 6px 0 10px; }
.copy-auto b { color: var(--txt); }
.copy-q { font-size: 13px; color: #fff; font-weight: 600; margin-bottom: 6px; }
.copy-rep {
  padding: 10px 13px; border-radius: 8px; margin-bottom: 8px;
  background: var(--bg3); border: 1px solid var(--line);
  font-size: 13.5px; color: #d8dbe4; white-space: pre-wrap;
  font-family: "Fraunces", Georgia, serif; /* la voix de l'élève, en serif */
}
/* le corrigé sous les yeux du prof — jamais montré à l'élève */
.corr-hint {
  padding: 8px 12px; border-radius: 8px; margin-bottom: 10px;
  background: rgba(243, 112, 33, .07); border: 1px dashed rgba(243, 112, 33, .5);
  font-size: 12.5px; color: var(--muted);
}
.corr-hint b { color: var(--orange); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.copy-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.copy-actions .btn.primary { width: auto; margin: 0; }
/* le champ de réponse de Ma : sans fond posé il sortait en blanc navigateur
   au milieu de l'écran sombre (« vraiment dégueulasse », Anthony, 25/09) */
.copy-note {
  width: 100%; min-height: 54px; margin-bottom: 8px; padding: 8px 10px;
  resize: vertical; font: inherit; box-sizing: border-box;
  background: var(--bg3); color: var(--txt);
  border: 1px solid var(--line); border-radius: 8px; outline: none;
}
.copy-note:focus { border-color: var(--orange); }

/* alerte pédagogique : la question la plus ratée, les relances */
.qcm-alert {
  margin: 4px 0 16px; padding: 10px 14px; border-radius: 10px; font-size: 12.5px;
  color: var(--orange); background: rgba(243, 112, 33, .08);
  border: 1px solid rgba(243, 112, 33, .3);
}

/* bandeau « réservé au prof » */
.prof-banner {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 16px; padding: 9px 14px; border-radius: 10px; font-size: 12.5px;
  color: var(--orange); background: rgba(243, 112, 33, .08);
  border: 1px dashed rgba(243, 112, 33, .55);
}

/* corrigé : le tableau des réponses */
.corr-table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 10px 0 18px; }
.corr-table th {
  text-align: left; padding: 8px 10px; font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em; color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.corr-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); color: #d8dbe4; }
.corr-table td.rep { color: var(--orange); font-weight: 800; text-align: center; }

/* ---------- les moments interactifs, sur le vrai graphique ---------- */

/* le calque des animations de cours : sous les outils de dessin (z 5),
   au-dessus du chart — transparent aux clics sauf quand la règle est armée */
.cours-cv { position: absolute; inset: 0; z-index: 4; pointer-events: none; }

/* la légende du moment : le bandeau du cours, en grand — il doit se lire
   depuis le fond de la classe */
.cours-caption {
  /* posé SUR l'axe des heures, sans le recouvrir (~30 px de haut) : plus bas,
     le bandeau cachait les heures — « il ne faut pas le cacher » (Anthony,
     04/09, après l'essai au ras du bord) */
  position: absolute; left: 12px; right: 74px; bottom: 30px; z-index: 6;
  padding: 14px 20px; border-radius: 14px; pointer-events: none;
  background: rgba(8, 8, 10, .95); border: 1px solid rgba(243, 112, 33, .55);
  border-left: 5px solid var(--orange);
  backdrop-filter: blur(6px);
  /* un cran plus serré qu'avant (18px/1.55) : la plupart des textes tiennent
     alors sous les 4 lignes et se lisent d'un bloc, sans « voir plus »
     (Anthony, 21/09) */
  font-family: "Fraunces", Georgia, serif; font-size: 16.5px; line-height: 1.45; color: #fff;
  box-shadow: 0 14px 44px rgba(0, 0, 0, .65), 0 0 30px rgba(243, 112, 33, .18);
}
.cours-caption b {
  display: block; color: var(--orange); font-size: 12px;
  font-family: "Schibsted Grotesk", sans-serif; font-weight: 800;
  text-transform: uppercase; letter-spacing: .14em; margin-bottom: 5px;
}
.cours-caption.pop { animation: coursPop .3s var(--ease); }
@keyframes coursPop { from { transform: translateY(14px); opacity: 0; } }

/* le quiz du code couleur : sous le décompte (la gauche du haut appartient
   à l'étiquette symbole·TF de l'app, on se place en dessous) — en grand */
.cours-quiz {
  position: absolute; top: 48px; left: 8px; z-index: 7;
  padding: 14px 16px; border-radius: 14px;
  background: rgba(8, 8, 10, .96);
  border: 1px solid rgba(243, 112, 33, .7);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .6), 0 0 24px rgba(243, 112, 33, .16);
  animation: coursPop .25s var(--ease);
}
.cours-quiz p { font-size: 14.5px; color: #fff; margin: 0 0 10px; font-weight: 700; }
.cours-quiz .colors { display: flex; gap: 10px; }
.cours-quiz .colors button {
  width: 46px; height: 30px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .25);
  cursor: pointer; padding: 0; transition: transform .15s var(--ease);
}
.cours-quiz .colors button:hover { transform: translateY(-3px) scale(1.06); }
.cours-quiz .verdict { margin: 10px 0 0; font-size: 13.5px; font-weight: 700; min-height: 1em; }

/* le menu « 🎓 Mes acquis » : après chaque cours, l'élève choisit ce qu'il
   garde affiché sur son graphique — en haut à droite, sous l'axe des prix */
.cours-acquis { position: absolute; top: 8px; right: 74px; z-index: 8; }
.cours-acquis .chip-btn {
  padding: 6px 13px; border-radius: 999px; cursor: pointer;
  background: rgba(8, 8, 10, .92); border: 1px solid rgba(243, 112, 33, .55);
  color: var(--orange); font: 700 12.5px "Schibsted Grotesk", sans-serif;
  transition: transform .15s var(--ease), box-shadow .15s var(--ease);
}
.cours-acquis .chip-btn:hover { transform: translateY(-1px); box-shadow: 0 0 14px rgba(243, 112, 33, .25); }
.cours-acquis .menu {
  display: none; position: absolute; right: 0; top: 36px; min-width: 250px;
  padding: 12px 14px; border-radius: 12px;
  background: rgba(10, 10, 11, .97); border: 1px solid rgba(243, 112, 33, .5);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .6);
}
.cours-acquis.open .menu { display: block; animation: coursPop .2s var(--ease); }
.cours-acquis .menu p { font-size: 11.5px; color: var(--muted); margin: 0 0 8px; }
.cours-acquis .menu label {
  display: flex; align-items: center; gap: 9px; padding: 7px 6px;
  border-radius: 8px; font-size: 13.5px; color: var(--txt); cursor: pointer;
}
.cours-acquis .menu label:hover { background: rgba(243, 112, 33, .08); }
.cours-acquis .menu input { accent-color: var(--orange); width: auto; margin: 0; pointer-events: none; }

/* le rail des moments, côté admin (fiche prof en mode direct) */
.mo-rail { margin: 0 0 20px; }
.mo-rail .mo {
  width: 100%; text-align: left; cursor: pointer; margin-bottom: 8px;
  padding: 10px 12px; border-radius: 10px; font: inherit; color: var(--txt);
  background: var(--bg3); border: 1px solid var(--line); border-left: 3px solid var(--line);
  transition: border-color .15s var(--ease), transform .2s var(--ease);
}
.mo-rail .mo:hover { transform: translateY(-1px); border-color: rgba(243, 112, 33, .45); }
.mo-rail .mo.fired { border-left-color: var(--orange); background: rgba(243, 112, 33, .07); }
.mo-rail .mo .mt { font-weight: 700; font-size: 13px; }
.mo-rail .mo .md { color: var(--muted); font-size: 12px; margin-top: 3px; line-height: 1.5; }

@media (max-width: 700px) {
  .cours-caption { right: 10px; bottom: 30px; font-size: 12.5px; }
}

/* ---------- mobile ---------- */
@media (max-width: 700px) {
  .hero h2 { font-size: 21px; }
  .mois-head .ghost { font-size: 36px; }
  .plist::before { left: 25px; }
  .crow { grid-template-columns: 36px minmax(0, 1fr); padding-left: 6px; }
  .crow .cnum { width: 34px; height: 34px; font-size: 14px; }
  .crow .cside { grid-column: 2; grid-row: auto; justify-content: flex-start; margin-top: 6px; }
  .prog-card { gap: 16px; padding: 16px; }
  .ring { width: 82px; height: 82px; }
  .ring .txt b { font-size: 19px; }
  .tl-bloc.now { margin-left: 0; }
  .tl-bloc.now::before { left: -35px; }
  .qbar { width: 80px; }
  .qcm-foot { flex-direction: column; align-items: stretch; text-align: center; }
  .qcm-foot .btn.primary { width: 100%; }
}

/* ═══════ le direct : ce que le cours pose sur le graphique de l'élève ═══════ */

/* la voix du cours est plafonnée : sur un téléphone, elle ne doit jamais
   manger le graphique qu'elle commente (leçon de l'audit du mockup) */
.cours-caption { max-height: 38%; overflow-y: auto; }
.cours-caption .step {
  display: inline-block; margin-left: 10px; padding: 2px 9px; border-radius: 999px;
  background: rgba(243, 112, 33, .16); border: 1px solid rgba(243, 112, 33, .5);
  color: var(--orange); font: 800 11px "Schibsted Grotesk", sans-serif;
  vertical-align: middle;
}

/* le bandeau du direct : tant que l'élève n'a pas rejoint, son graphique
   lui appartient — on demande, on ne prend pas */
.cours-banner {
  position: absolute; left: 50%; transform: translateX(-50%); top: 8px; z-index: 9;
  display: flex; align-items: center; gap: 11px;
  padding: 8px 12px 8px 14px; border-radius: 999px;
  background: rgba(8, 8, 10, .96); border: 1px solid rgba(243, 112, 33, .6);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .55);
  font: 700 12.5px "Schibsted Grotesk", sans-serif; color: #fff;
  animation: coursPop .25s var(--ease);
}
.cours-banner .dot {
  width: 9px; height: 9px; border-radius: 50%; background: var(--orange);
  box-shadow: 0 0 0 0 rgba(243, 112, 33, .6); animation: coursPulse 1.8s infinite;
}
.cours-banner.joined .dot { background: #35c46a; animation: none; }
.cours-banner .act {
  padding: 5px 12px; border-radius: 999px; cursor: pointer;
  background: var(--orange); border: 0; color: #0a0a0b;
  font: 800 12px "Schibsted Grotesk", sans-serif;
}
.cours-banner.joined .act { background: none; border: 1px solid var(--line); color: var(--muted); }
/* la parenthèse de Ma, dite dans le bandeau (le graphique change de TF
   pendant que le fil d'Ariane reste sur la leçon) */
.cours-banner .paren { color: #ffb27d; white-space: nowrap; }
@keyframes coursPulse { 70% { box-shadow: 0 0 0 10px rgba(243, 112, 33, 0); } 100% { box-shadow: 0 0 0 0 rgba(243, 112, 33, 0); } }

/* ⌖ Recentrer sur le cours — le bouton « ma position » du GPS.
   Il n'existe que si l'élève s'est écarté du cadrage de Ma : posé en bas à
   droite du graphique, là où le pouce et la souris tombent, au-dessus de la
   voix du cours mais jamais sur l'échelle des prix. */
.cours-recentrer {
  /* en haut à droite, sous la barre d'outils : le bas appartient à la voix du
     cours (`.cours-caption`, hauteur variable) et on ne se pose JAMAIS sur
     elle. Le placeur d'étiquettes connaît ce bouton : rien ne vient dessous. */
  position: absolute; right: 74px; top: 8px; z-index: 9;
  padding: 9px 15px; border-radius: 999px; cursor: pointer;
  background: rgba(8, 8, 10, .94); border: 1px solid rgba(243, 112, 33, .75);
  color: #ffd7b8; font: 800 12.5px "Schibsted Grotesk", sans-serif;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .5);
  animation: coursPop .25s var(--ease);
}
.cours-recentrer:hover { background: var(--orange); color: #0a0a0b; }
/* Ma est passée à autre chose pendant qu'il explorait : le bouton appelle */
.cours-recentrer.appelle { animation: coursAppelle 1.6s infinite; }
@keyframes coursAppelle {
  0%, 100% { box-shadow: 0 10px 26px rgba(0, 0, 0, .5), 0 0 0 0 rgba(243, 112, 33, .55); }
  60% { box-shadow: 0 10px 26px rgba(0, 0, 0, .5), 0 0 0 12px rgba(243, 112, 33, 0); }
}
/* en rejeu, la pastille des acquis occupe déjà ce coin : on se range dessous */
body.en-rejeu .cours-recentrer { top: 46px; }
@media (max-width: 760px) {
  .cours-recentrer { right: 12px; top: 44px; padding: 8px 13px; font-size: 12px; }
  body.en-rejeu .cours-recentrer { top: 82px; }
}

/* les cartouches du cours : carte, checklist, quiz éclair — repliables */
.cours-box {
  position: absolute; top: 48px; left: 8px; z-index: 7; max-width: 400px;
  padding: 13px 15px; border-radius: 14px;
  background: rgba(8, 8, 10, .96); border: 1px solid rgba(243, 112, 33, .6);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .6);
  animation: coursPop .25s var(--ease);
  max-height: 46%; overflow-y: auto;
}
.cours-box + .cours-box { top: 50%; }
.cours-box h4 {
  display: flex; align-items: baseline; gap: 8px; margin: 0 0 9px;
  font: 800 14.5px "Schibsted Grotesk", sans-serif; color: var(--orange);
}
.cours-box h4 .fold {
  margin-left: auto; flex-shrink: 0; padding: 2px 8px; border-radius: 7px; cursor: pointer;
  background: none; border: 1px solid var(--line); color: var(--muted);
  font: 800 11px "Schibsted Grotesk", sans-serif;
}
.cours-box h4 .fold:hover { color: var(--orange); border-color: var(--orange); }
.cours-box.folded h4 { margin: 0; }
.cours-box.folded > *:not(h4) { display: none; }
.cours-box table { border-collapse: collapse; width: 100%; }
/* font-variant normal : la règle globale `td { tabular-nums }` (style.css)
   sert aux colonnes de chiffres du trading — ici c'est de la prose, et en
   Schibsted la virgule tabulaire prend une chasse de chiffre entier :
   « En 0 , 1 lot » (audit du 04/09) */
.cours-box td { padding: 5px 8px; font-size: 13.5px; color: #fff; border-top: 1px solid rgba(255, 255, 255, .08); vertical-align: top; font-variant-numeric: normal; }
.cours-box td.k { color: var(--muted); white-space: nowrap; padding-right: 14px; }
.cours-box .it { display: flex; gap: 9px; align-items: flex-start; padding: 6px 4px; font-size: 13.5px; color: #fff; border-radius: 8px; cursor: pointer; }
.cours-box .it:hover { background: rgba(243, 112, 33, .1); }
/* la case est décorative : c'est la ligne entière qui coche. Sans ça, viser
   la case de 13 px la coche ET la décoche dans le même clic. */
.cours-box .it input { accent-color: var(--orange); margin-top: 3px; width: auto; pointer-events: none; }
.cours-box .it input:checked + span { color: var(--muted); text-decoration: line-through; }
.cours-box .fx { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 9px; }
.cours-box .fx button {
  padding: 5px 11px; border-radius: 8px; cursor: pointer; color: #fff;
  background: none; border: 1px solid var(--line); font: inherit; font-size: 13px;
}
.cours-box .fx button:hover { border-color: var(--orange); color: var(--orange); }
.cours-box .fv { font-size: 13px; font-weight: 700; margin: 0; min-height: 1.1em; }
.cours-box.quiz { border-color: rgba(243, 112, 33, .8); }

/* rejouer un cours seul : le rail de l'élève, le même moteur que le direct */
.cours-rail {
  position: absolute; right: 74px; top: 44px; z-index: 9; width: 290px; max-height: 70%;
  display: flex; flex-direction: column;
  background: rgba(10, 10, 11, .97); border: 1px solid rgba(243, 112, 33, .5);
  border-radius: 14px; box-shadow: 0 14px 40px rgba(0, 0, 0, .6);
}
.cours-rail .head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.cours-rail .ttl { font: 800 12.5px "Schibsted Grotesk", sans-serif; color: var(--orange); }
.cours-rail select { flex: 1; min-width: 0; background: var(--bg3); color: var(--txt); border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; font: 600 12px "Schibsted Grotesk", sans-serif; }
.cours-rail .x { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 14px; }
.cours-rail .list { overflow-y: auto; padding: 8px; }
.cours-rail .mo {
  width: 100%; text-align: left; cursor: pointer; margin-bottom: 6px; padding: 9px 11px;
  border-radius: 10px; background: var(--bg3); border: 1px solid var(--line);
  border-left: 3px solid var(--line); color: var(--txt); font: inherit;
}
.cours-rail .mo.active { border-color: rgba(243, 112, 33, .6); border-left-color: var(--orange); background: rgba(243, 112, 33, .07); }
.cours-rail .mo .mt { font-weight: 700; font-size: 12.5px; }
.cours-rail .mo .md { color: var(--muted); font-size: 11.5px; margin-top: 3px; line-height: 1.45; }
.cours-acquis .chip-rejouer {
  width: 100%; margin-top: 8px; padding: 7px; border-radius: 9px; cursor: pointer;
  background: rgba(243, 112, 33, .12); border: 1px solid rgba(243, 112, 33, .45);
  color: var(--orange); font: 700 12.5px "Schibsted Grotesk", sans-serif;
}

@media (max-width: 900px) {
  .cours-caption { left: 8px; right: 8px; bottom: 8px; font-size: 14px; padding: 10px 13px; max-height: 34%; }
  .cours-box { left: 8px; right: 62px; max-width: none; max-height: 40%; }
  .cours-box + .cours-box { top: 54%; }
  .cours-rail { right: 8px; left: 8px; width: auto; }
  .cours-banner { left: 8px; right: 8px; transform: none; justify-content: space-between; }
}

/* ═══════ la régie de Ma (onglet Cours de l'admin, mode direct) ═══════ */

.regie { margin: 0 0 20px; }
.regie-bar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px;
  padding: 11px 14px; margin-bottom: 14px; border-radius: 12px;
  background: var(--bg3); border: 1px solid var(--line);
}
.regie-bar .st { font: 800 12px "Schibsted Grotesk", sans-serif; color: var(--muted); letter-spacing: .04em; }
.regie-bar .st.on { color: #ff5a4d; }
.regie-bar .spacer { flex: 1; }
.regie-bar .promos { display: flex; flex-wrap: wrap; gap: 6px 10px; }
.regie-bar .promos.lock { opacity: .55; pointer-events: none; }
.regie-bar .promo {
  display: flex; align-items: center; gap: 7px; padding: 6px 13px; border-radius: 999px;
  background: var(--bg2); border: 1px solid var(--line); cursor: pointer;
  font: 600 12.5px "Schibsted Grotesk", sans-serif; color: var(--muted);
}
.regie-bar .promo::before { content: '○'; font-size: 13px; line-height: 1; }
.regie-bar .promo:hover { border-color: rgba(243, 112, 33, .5); color: var(--txt); }
.regie-bar .promo.on {
  border-color: var(--orange); background: rgba(243, 112, 33, .14); color: var(--orange);
}
.regie-bar .promo.on::before { content: '●'; }
.regie-bar .pres { font-size: 12.5px; color: var(--muted); }
.regie-bar .proj {
  padding: 6px 12px; border-radius: 9px; text-decoration: none; font: 700 12.5px "Schibsted Grotesk", sans-serif;
  background: rgba(243, 112, 33, .12); border: 1px solid rgba(243, 112, 33, .45); color: var(--orange);
}
.regie-bar .proj:hover { background: rgba(243, 112, 33, .2); }
.regie-bar .btn.go { width: auto; margin: 0; padding: 7px 16px; }
.direct-bar .btn.bloc-next { width: auto; margin: 0; padding: 4px 12px; font-size: 12.5px; }

.mo-bloc {
  margin: 16px 0 8px; font: 800 11px "Schibsted Grotesk", sans-serif;
  text-transform: uppercase; letter-spacing: .12em; color: var(--muted);
}
.mo-rail .mo.dim { opacity: .42; }
.mo-rail .mo .tag-ecole {
  margin-left: 8px; padding: 1px 7px; border-radius: 999px; font-size: 10.5px; font-weight: 800;
  background: rgba(86, 156, 240, .14); border: 1px solid rgba(86, 156, 240, .45); color: #7fb4f2;
}
.mo-rail .mo.encore .mt::after { content: ' ↻ ré-appuie'; color: var(--orange); font-size: 11px; font-weight: 800; }
.mo-rail .mo .rep { margin-top: 5px; font-size: 11.5px; font-weight: 700; color: var(--muted); }
.mo-rail .mo .rep.ok { color: #35c46a; }
.mo-rail .mo .rep.moyen { color: #e9a13b; }
.mo-rail .mo .rep.ko { color: #e05646; }
.mo-rail .mo .rep[data-step]::before { content: attr(data-step) ' · '; color: var(--orange); }
.regie-outils { display: flex; gap: 10px; margin-top: 12px; }

/* ═══════ L'ÉCRAN DE PROJECTION ═══════
   Ma partage son écran en visio : elle partage CET onglet (/?projection=1),
   pas son admin — qui affiche les noms, les copies et les comptes des autres
   élèves. Le graphique, la voix du cours, rien d'autre, en plus gros. */
body.projection .side,
body.projection #drawbar,
body.projection #mobile-tabs,
body.projection #mm-pastille,
body.projection #mm,
body.projection #replay-bar,
body.projection .topbar .btn { display: none !important; }
body.projection .topbar { padding-top: 6px; padding-bottom: 6px; }
body.projection .cours-caption { font-size: 20px; left: 20px; right: 90px; bottom: 30px; }
body.projection .cours-box { font-size: 15px; max-width: 460px; }
body.projection .cours-banner, body.projection .cours-acquis, body.projection .cours-rail { display: none !important; }
body.projection .proj-tag {
  position: fixed; left: 14px; bottom: 12px; z-index: 40;
  padding: 5px 12px; border-radius: 999px; pointer-events: none;
  background: rgba(8, 8, 10, .8); border: 1px solid rgba(243, 112, 33, .4);
  color: var(--muted); font: 700 11.5px "Schibsted Grotesk", sans-serif;
}

/* ═══════ pendant le cours, l'écran appartient au cours ═══════ */

/* la voix : Ma est en train de la dire. Le texte s'affiche ENTIER tant qu'il
   tient en quatre lignes ; au-delà il se replie sur deux et se déplie d'un
   clic. C'est cours-live.js qui compte les lignes rendues et pose (ou non) la
   classe `repli` — aucun texte n'est réglé à la main. */
.cours-caption .dit { display: block; }
.cours-caption.repli .dit {
  display: -webkit-box; -webkit-box-orient: vertical;
  -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
}
.cours-caption .plus {
  /* le texte est un bloc (il se coupe à la ligne) : le bouton se pose dessous */
  display: inline-block; margin: 5px 10px 0 0; padding: 3px 11px; border-radius: 999px;
  background: rgba(243, 112, 33, .14); border: 1px solid rgba(243, 112, 33, .45);
  color: var(--orange); font: 700 11.5px "Schibsted Grotesk", sans-serif;
  cursor: pointer; vertical-align: middle; pointer-events: auto;
}
.cours-caption .plus:hover { background: rgba(243, 112, 33, .24); }
.cours-caption { pointer-events: none; } /* le texte ne vole pas les clics… */
.cours-caption .plus { pointer-events: auto; } /* …sauf ses boutons */

/* « Étape suivante » : sur un moment à plusieurs temps, l'élève avance
   lui-même — la régie recale tout le monde quand elle envoie une étape */
.cours-caption .avance {
  display: inline-block; margin-left: 10px; padding: 4px 13px; border-radius: 999px;
  background: var(--orange); border: 0; color: #0a0a0b;
  font: 800 12px "Schibsted Grotesk", sans-serif;
  cursor: pointer; vertical-align: middle; pointer-events: auto;
}
.cours-caption .avance:hover { filter: brightness(1.1); }

/* le panneau de trading se replie : le graphique prend toute la largeur.
   Masquer .side ne suffit pas — la grille garde sa colonne de 300 px et
   laisse une bande noire : c'est la grille qu'on change. */
body.en-cours .layout { grid-template-columns: 68px minmax(0, 1fr) 0; }
body.en-cours .side { display: none; }
body.en-cours.volet-ouvert .layout { grid-template-columns: 68px minmax(0, 1fr) 300px; }
body.en-cours.volet-ouvert .side { display: flex; }

/* La colonne du cours : les fiches du moment (cartes, checklists, quiz)
   prennent la PLACE du panneau de trading — pas le dessus du graphique.
   Elle n'existe que s'il y a une fiche à montrer (classe cours-fiche posée
   par cours-live.js), et s'efface si l'élève rappelle son compte (volet). */
.cours-side { display: none; }
/* … et le REJEU en solo vit dans la même colonne : le rail des moments et
   ses fiches n'ont rien à faire posés sur le graphique ni sur l'échelle des
   prix. En rejeu la colonne est toujours là (elle porte le rail). */
body.en-rejeu .side { display: none; }
body.en-cours.cours-fiche:not(.volet-ouvert) .layout,
body.en-rejeu:not(.volet-ouvert) .layout { grid-template-columns: 68px minmax(0, 1fr) 320px; }
body.en-cours.cours-fiche:not(.volet-ouvert) .cours-side,
body.en-rejeu:not(.volet-ouvert) .cours-side {
  display: flex; flex-direction: column; gap: 10px;
  grid-column: 3; grid-row: 1; min-height: 0;
  padding: 12px; overflow-y: auto;
  border-left: 1px solid var(--line); background: var(--bg2);
}
body.en-rejeu.volet-ouvert .layout { grid-template-columns: 68px minmax(0, 1fr) 300px; }
body.en-rejeu.volet-ouvert .side { display: flex; }
/* dans la colonne, un cartouche vit en flux : fini l'absolu posé sur le chart */
.cours-side .cours-box {
  position: static; max-width: none; max-height: none; flex: 0 0 auto;
}
/* Dans les 320 px de la colonne, le libellé en nowrap avalait la largeur et
   les valeurs tombaient en colonnes d'un mot (« Daily, / grand / cadre / … »,
   carte-méthode du cours 6 — audit élève du mois 1). Ici le libellé se plie
   et se borne : la valeur récupère 60 % de la rangée. */
.cours-side .cours-box td.k { white-space: normal; width: 40%; }
/* Pendant un cours EN DIRECT, la fiche du moment passe devant : un élève qui
   avait laissé son rail de rejeu ouvert retrouvait le cartouche poussé tout en
   bas de la colonne — invisible sans faire défiler, et sur téléphone il tombait
   à 1 200 px du haut. Ce que Ma montre maintenant prime sur ce qu il rejouait. */
body.en-cours .cours-side .cours-box { order: 1; }
body.en-cours .cours-side .cours-rail { order: 2; }

/* le rail du rejeu aussi : en tête de colonne, la liste défile pour elle-même */
.cours-side .cours-rail {
  position: static; width: auto; max-height: 46%; flex: 0 0 auto;
  border-radius: 12px;
}
@media (max-width: 900px) {
  /* En colonne unique, la fiche se pose SOUS le graphique — mais dans l'écran,
     pas dessous. Mesuré avant correction : sur 844 px de haut, le graphique en
     prenait 744 et la fiche commençait à 744, cachée par la barre d'onglets.
     L'élève ne la voyait jamais. Le graphique cède donc la moitié basse. */
  body.en-cours.cours-fiche:not(.volet-ouvert) #charts,
  body.en-rejeu:not(.volet-ouvert) #charts {
    flex: 0 0 auto; height: 58dvh; min-height: 0;
  }
  /* le panneau de bougies a sa propre hauteur sur téléphone (plein écran moins
     les barres) : il faut la lui reprendre, sinon il déborde sur la fiche */
  body.en-cours.cours-fiche:not(.volet-ouvert) .pane,
  body.en-rejeu:not(.volet-ouvert) .pane {
    height: 100%; min-height: 0;
  }
  body.en-cours.cours-fiche:not(.volet-ouvert) .cours-side,
  body.en-rejeu:not(.volet-ouvert) .cours-side {
    border-left: none; border-top: 2px solid var(--line);
    flex: 0 0 auto; max-height: 31dvh; min-height: 0;
    padding: 10px 12px 12px; overflow-y: auto;
  }
  /* repliée (le ▾ du cartouche), elle ne prend plus que son titre : le
     graphique récupère la place, sans que l'élève ait à quitter le cours */
  .cours-side .cours-box.folded { flex: 0 0 auto; }
  .cours-side .cours-rail { max-height: 46%; }
  /* la voix se serre un peu : sur un écran partagé avec la fiche, elle ne
     doit pas manger le peu de bougies qui reste */
  body.en-cours.cours-fiche .cours-caption,
  body.en-rejeu .cours-caption { max-height: 30%; }
}
body.en-cours #drawbar { opacity: .35; }
body.en-cours #drawbar:hover { opacity: 1; }
/* pendant un cours — en direct comme en rejeu — l'écran appartient au cours :
   la carte de mission du débutant se range, elle chevauchait la voix du bas */
body.en-cours #mission, body.en-rejeu #mission { display: none; }

.cours-volet {
  position: fixed; right: 14px; bottom: 14px; z-index: 30;
  padding: 8px 14px; border-radius: 999px; cursor: pointer;
  background: rgba(8, 8, 10, .94); border: 1px solid rgba(243, 112, 33, .5);
  color: var(--orange); font: 700 12px "Schibsted Grotesk", sans-serif;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .5);
}
.cours-volet:hover { background: rgba(243, 112, 33, .16); }
/* Sans colonne (moment sans fiche), la voix court jusqu'au bord droit du
   graphique et la pastille mordait son coin bas-droit (55 étapes sur 70,
   audit élève du mois 1) : la voix s'arrête avant le couloir de la pastille.
   Bureau seulement — sur téléphone la pastille vit déjà dans son couloir. */
@media (min-width: 901px) {
  body.en-cours:not(.cours-fiche) .cours-caption { right: 148px; }
}
@media (max-width: 900px) {
  .cours-volet { bottom: 76px; }
  /* écran partagé avec la fiche du moment : la pastille se range dans le
     couloir libre entre la fiche et les onglets, elle mordait le cartouche */
  body.en-cours.cours-fiche .cours-volet,
  body.en-rejeu .cours-volet { bottom: 54px; }
}

/* ═══════ le conducteur de la régie ═══════
   Un moment à la fois, deux gros boutons, et le miroir de ce que voient les
   élèves : Ma parle en visio, elle ne doit rien chercher. */
.regie .conducteur { margin: 14px 0 16px; opacity: 1; }
.regie .conducteur.pret { opacity: .55; }
.regie .pas-row { display: flex; align-items: stretch; gap: 12px; }
.regie .pas {
  flex: 0 0 auto; min-width: 130px; padding: 12px 18px; border-radius: 12px; cursor: pointer;
  background: var(--bg3); border: 1px solid var(--line); color: var(--txt);
  font: 800 14px "Schibsted Grotesk", sans-serif;
}
.regie .pas:hover:not(:disabled) { border-color: var(--orange); color: var(--orange); }
.regie .pas:disabled { opacity: .35; cursor: default; }
.regie .pas.next { background: rgba(243, 112, 33, .16); border-color: rgba(243, 112, 33, .55); color: var(--orange); }
.regie .pas.next:hover:not(:disabled) { background: rgba(243, 112, 33, .26); }
.regie .moment-courant {
  flex: 1; min-width: 0; padding: 12px 16px; border-radius: 12px;
  background: var(--bg2); border: 1px solid rgba(243, 112, 33, .35);
}
.regie .moment-courant .cptr {
  display: inline-block; margin-bottom: 4px; padding: 2px 9px; border-radius: 999px;
  background: rgba(243, 112, 33, .14); color: var(--orange);
  font: 800 11px "Schibsted Grotesk", sans-serif; font-variant-numeric: tabular-nums;
}
.regie .moment-courant .titre { font: 700 17px "Schibsted Grotesk", sans-serif; color: var(--txt); line-height: 1.25; }
.regie .moment-courant .dit { margin-top: 4px; font-size: 13px; color: var(--muted); line-height: 1.5; }
.regie .moment-courant .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.regie .moment-courant .tag {
  padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 700;
  background: var(--bg3); border: 1px solid var(--line); color: var(--muted);
}
.regie .moment-courant .tag.ecole { background: rgba(86, 156, 240, .14); border-color: rgba(86, 156, 240, .45); color: #7fb4f2; }
.regie .moment-courant .reponses { margin-top: 8px; font: 800 13px "Schibsted Grotesk", sans-serif; }
.regie .moment-courant .reponses.ok { color: #35c46a; }
.regie .moment-courant .reponses.moyen { color: #e9a13b; }
.regie .moment-courant .reponses.ko { color: #e05646; }
.regie .cond-outils { display: flex; gap: 10px; margin-top: 10px; }
.regie .pas.encore, .regie .pas.clean { min-width: 0; padding: 8px 14px; font-size: 12.5px; }
.regie .miroir-bloc { margin-top: 14px; }
.regie .miroir-bloc .lbl {
  margin: 0 0 6px; font: 800 11px "Schibsted Grotesk", sans-serif;
  text-transform: uppercase; letter-spacing: .12em; color: var(--muted);
}
.regie .miroir {
  width: 100%; height: 260px; border: 1px solid var(--line); border-radius: 12px;
  background: #0b0d12; display: block;
}
.regie .tous { margin-top: 6px; }
.regie .tous summary {
  cursor: pointer; padding: 9px 12px; border-radius: 10px; list-style: none;
  background: var(--bg3); border: 1px solid var(--line); color: var(--muted);
  font: 700 12.5px "Schibsted Grotesk", sans-serif;
}
.regie .tous summary::-webkit-details-marker { display: none; }
.regie .tous summary::before { content: '▸ '; color: var(--orange); }
.regie .tous[open] summary::before { content: '▾ '; }
.regie .tous summary:hover { color: var(--txt); border-color: rgba(243, 112, 33, .45); }
.regie .tous .mo-rail { margin-top: 10px; }
.regie-bar .btn.go.fin { background: none; border: 1px solid var(--line); color: var(--muted); }
@media (max-width: 760px) {
  .regie .pas-row { flex-wrap: wrap; }
  .regie .pas { flex: 1; min-width: 0; }
  .regie .moment-courant { order: -1; flex: 1 0 100%; }
}

/* l'onglet Cours ne pilote plus : il ouvre les deux fenêtres du direct */
.regie-bar .btn.ouvrir { width: auto; margin: 0; padding: 8px 16px; font-size: 12.5px; }

/* Mises en forme qui vivaient en attribut style= dans le HTML généré par
   internal/cours/parse.go. La CSP de l'app (style-src 'self') refuse le style
   en ligne : elles ne s'appliquaient ni dans le mémo de l'élève ni dans le
   prompteur de Ma. */
.adire-liste { margin: 8px 0 0 16px; }
.tl-when-espace { margin-top: 14px; }

/* ── LA VISIO : la caméra de Ma pendant le direct (visio.js) ──
   Une vignette flottante, déplaçable par sa barre de titre, réduisible en
   pastille. Elle n'existe que séance ouverte + « Rejoindre » + caméra
   partagée — jamais sur la projection. */
#visio-ma {
  position: fixed; right: 14px; bottom: 14px; width: 248px; z-index: 120;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 12px;
  overflow: hidden; box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
}
#visio-ma .vi-tete, #cams-moi .vi-tete {
  display: flex; align-items: center; justify-content: space-between;
  padding: 5px 9px; cursor: grab; user-select: none; touch-action: none;
  font-size: 12px; color: var(--txt); background: var(--bg3);
}
#visio-ma .vi-tete:active, #cams-moi .vi-tete:active { cursor: grabbing; }
#visio-ma .vi-plier, #cams-moi .vi-plier {
  background: none; border: none; color: var(--muted); cursor: pointer;
  font-size: 12px; padding: 0 2px; line-height: 1;
}
#visio-ma .vi-plier:hover, #cams-moi .vi-plier:hover { color: var(--txt); }
#visio-ma video, #cams-moi video { display: block; width: 100%; aspect-ratio: 4 / 3; background: #000; }
#visio-ma .vi-son {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: 10px;
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line);
  background: rgba(10, 10, 11, .85); color: var(--txt); cursor: pointer; font-size: 12.5px;
}
#visio-ma .vi-son:hover { border-color: var(--orange); }
#visio-ma .vi-etat, #cams-moi .vi-etat {
  position: absolute; inset: auto 0 0 0; padding: 4px 8px; font-size: 11.5px;
  color: var(--muted); background: rgba(10, 10, 11, .8); text-align: center;
}
/* réduite : il ne reste que la barre de titre — la vidéo continue en sourdine
   (l'élément vit toujours, le son n'est pas coupé par la réduction) */
#visio-ma.plie { width: 148px; }
#visio-ma.plie video { height: 0; }
#visio-ma.plie .vi-son, #visio-ma.plie .vi-etat { display: none; }
#visio-ma .vi-cacher, #cams-moi .vi-cacher {
  background: none; border: none; color: var(--muted); cursor: pointer;
  font-size: 12px; padding: 0 2px; line-height: 1; margin-left: 6px;
}
#visio-ma .vi-cacher:hover, #cams-moi .vi-cacher:hover { color: var(--txt); }
#visio-ma .vi-tete .vi-plier { margin-left: auto; }
/* la pastille : la caméra cachée se rappelle discrètement — même coin que la
   vignette, mais minuscule */
#visio-pastille {
  position: fixed; right: 14px; bottom: 14px; z-index: 120;
  width: 34px; height: 34px; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--line); background: var(--bg2); font-size: 15px;
  opacity: .65; padding: 0; line-height: 1;
}
#visio-pastille:hover { opacity: 1; border-color: var(--orange); }

/* ── LA CAMÉRA DE L'ÉLÈVE (cams.js) : vue par Ma seule, jamais enregistrée ──
   Le bouton vit au coin opposé de la visio de Ma ; la vignette est un simple
   miroir local (l'élève se cadre), déplaçable comme celle de la visio. */
#cams-btn {
  position: fixed; left: 14px; bottom: 14px; z-index: 120;
  width: 34px; height: 34px; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--line); background: var(--bg2); font-size: 15px;
  opacity: .65; padding: 0; line-height: 1;
}
#cams-btn:hover { opacity: 1; border-color: var(--orange); }
#cams-btn.on { opacity: 1; border-color: #e5484d; }
#cams-moi {
  position: fixed; left: 14px; bottom: 56px; width: 176px; z-index: 120;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 12px;
  overflow: hidden; box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
}
/* miroir : c'est soi qu'on cadre — Ma, elle, reçoit l'image à l'endroit */
#cams-moi video { transform: scaleX(-1); }

/* ---------- le brouillage du contenu servi ----------
   Le mémo, les questions et les retours arrivent ENCODÉS (homophones CJK,
   grec, cyrillique — internal/cours/brouille.go) : les fausses polices les
   redessinent en clair. keep-all : les idéogrammes autorisent la césure
   n'importe où, on la rend aux seuls espaces, comme un texte latin. */
.brouille { font-family: "Brouille Sans", "Schibsted Grotesk", system-ui, sans-serif; word-break: keep-all; }
/* les deux usages serif explicites de la vue détail (ils battent l'héritage) */
.brouille .memo h3 { font-family: "Brouille Serif", Georgia, serif; }
.brouille .qline { font-family: "Brouille Serif", Georgia, serif; }

/* La bande du mois 2 : on demande UNE fois à l'élève s'il garde ses
   explications à l'écran (audit œil-70ans, point 04). Une bande et non une
   fenêtre : elle ne barre pas la route de quelqu'un qui venait lire. */
.bande-allegement {
  margin: 0 0 16px; padding: 14px 16px; border-radius: 10px; text-align: left;
  background: rgba(243, 112, 33, .06); border: 1px solid rgba(243, 112, 33, .4);
}
.bande-allegement p { margin: 0 0 4px; color: var(--txt); font-size: 15px; line-height: 1.35; }
.bande-allegement small { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.bande-allegement div { display: flex; gap: 8px; margin-top: 11px; flex-wrap: wrap; }
.bande-allegement button { padding: 7px 14px; font-size: 13.5px; }

/* Les deux titres du menu « Mes acquis ». Ce bouton porte deux fonctions sans
   rapport (afficher des calques, rejouer un cours) : aucun nom ne décrivait
   les deux, ce sont les titres qui lèvent l'ambiguïté (point 11). */
.cours-acquis .menu-titre {
  margin: 10px 0 6px; font-size: 10.5px; letter-spacing: .09em; text-transform: uppercase;
  color: var(--muted); font-weight: 600;
}
.cours-acquis .menu > .menu-titre:first-child { margin-top: 0; }
.cours-acquis .menu .menu-sous { font-size: 11px; line-height: 1.45; margin: 0 0 7px; }

/* ── Le planning des séances (10/10, mockup/planning-brevo.html).
   Côté admin : la carte « Les séances en direct » de l'onglet Cours.
   Côté élève : la carte « Prochain cours » en tête du panneau Cours. ── */
.copy-card.planning .plan-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap; margin-bottom: 10px;
}
.copy-card.planning .plan-head .copy-q { margin: 0; }
.plan-seance {
  display: grid; grid-template-columns: 112px 1fr auto; gap: 4px 14px;
  align-items: center; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--bg2); margin: 0 0 8px;
}
.plan-seance.passee { opacity: .55; }
.plan-seance.auj { border-color: rgba(243, 112, 33, .55); background: rgba(243, 112, 33, .05); }
.plan-quand { display: flex; flex-direction: column; line-height: 1.3; }
.plan-quand .j { font-size: 12.5px; font-weight: 700; }
.plan-quand .h { color: var(--orange); font-weight: 800; font-size: 16px; font-variant-numeric: tabular-nums; }
.plan-quoi b { display: block; }
.plan-quoi .meta { display: block; margin-top: 2px; }
.plan-actions { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.plan-actions .btn.ok { border-color: rgba(53, 196, 106, .4); color: #7fd6a2; }
@media (max-width: 700px) {
  .plan-seance { grid-template-columns: 1fr; }
  .plan-actions { justify-content: flex-start; }
}

.prochain-cours {
  display: flex; align-items: center; gap: 14px; padding: 12px 15px;
  border: 1px solid rgba(243, 112, 33, .45); border-radius: 13px;
  background: linear-gradient(100deg, rgba(243, 112, 33, .10), rgba(243, 112, 33, .02) 60%);
  margin: 0 0 14px;
}
.prochain-cours .cal {
  display: flex; flex-direction: column; align-items: center; min-width: 52px;
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--bg);
}
.prochain-cours .cal .m {
  font-size: 9.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  background: var(--orange); color: var(--bg); width: 100%; text-align: center; padding: 2px 0;
}
.prochain-cours .cal .d { font: 600 20px "Fraunces", Georgia, serif; padding: 2px 0 4px; }
.prochain-cours .pc-txt b { display: block; font-size: 14px; }
.prochain-cours .pc-sous { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
