/* L'atelier : cours en visio (/direct), cours depuis un PowerPoint (/powerpoint), Max prof (/prof).
   Jetons seulement. Une même grammaire pour les trois : en-tête, bande « comment ça marche »,
   carte de réglage en étapes numérotées, puis le rendu sur une « page » de cours. */

.atelier { display: flex; flex-direction: column; gap: var(--s-8); }
.atelier > .sty-callout { margin: 0; }
.atelier-surtitre { margin: 0 0 var(--s-2); font-size: var(--t-ia-surtitre); letter-spacing: 0.1em; text-transform: uppercase; font-weight: 600; color: var(--c-accent-text); }
.atelier-tete { display: flex; align-items: center; gap: var(--s-6); }
.atelier-tete .vue-titre { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s-3); margin: 0; }
.atelier-tete .vue-sous { max-width: 40rem; }
.atelier-tete__visage { width: calc(var(--s-16) + var(--s-8)); height: calc(var(--s-16) + var(--s-8)); flex: none; }
.atelier-pro { display: inline-flex; align-items: center; padding: var(--s-1) var(--s-3); border-radius: var(--r-pill);
  font: var(--t-micro); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }

/* La bande « comment ça marche » : trois temps reliés par un filet. */
.atelier-etapes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4); position: relative; }
.atelier-etape { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-4); border-radius: var(--r-lg); background: var(--c-sunken); }
.atelier-etape__ic { flex: none; display: inline-grid; place-items: center; width: var(--s-10); height: var(--s-10); border-radius: var(--r-md); background: var(--c-accent-soft); color: var(--c-accent-text); }
.atelier-etape > div { display: flex; flex-direction: column; gap: var(--s-1); min-width: 0; }
.atelier-etape b { display: flex; align-items: baseline; gap: var(--s-2); font: var(--t-ui); font-weight: 600; color: var(--c-ink); }
.atelier-etape__n { font: var(--t-micro); font-weight: 700; color: var(--c-ink-3); font-variant-numeric: tabular-nums; }
.atelier-etape small { font: var(--t-small); color: var(--c-ink-2); }

/* La carte de réglage : de l'air, des étapes numérotées, l'action en bas. */
.atelier-carte { padding: var(--s-8); display: flex; flex-direction: column; gap: var(--s-6); }
.atelier-form { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-6); }
.atelier-form > li { display: grid; grid-template-columns: var(--s-8) minmax(0, 1fr); gap: var(--s-4); position: relative; }
.atelier-form > li:not(:last-child)::before { content: ""; position: absolute; left: calc(var(--s-4) - var(--size-filet-epais) / 2); top: calc(var(--s-8) + var(--s-2)); bottom: calc(-1 * var(--s-6) + var(--s-2)); width: var(--size-filet-epais); background: var(--c-line); }
.atelier-form__n { display: inline-grid; place-items: center; width: var(--s-8); height: var(--s-8); border-radius: var(--r-pill); border: var(--size-filet-epais) solid var(--c-line-strong); font: var(--t-small); font-weight: 700; color: var(--c-ink-2); background: var(--c-card); }
.atelier-form__champs { display: flex; flex-direction: column; gap: var(--s-4); min-width: 0; padding-top: var(--s-1); }
.atelier-sous-label { margin: 0; font: var(--t-small); font-weight: 600; color: var(--c-ink-2); }
.atelier-astuce { display: flex; gap: var(--s-2); align-items: flex-start; margin: 0; padding: var(--s-3) var(--s-4); border-radius: var(--r-md); background: var(--c-sunken); font: var(--t-small); color: var(--c-ink-2); }
.atelier-astuce .sty-icon { flex: none; margin-top: 0.15em; color: var(--c-accent-text); }
.atelier-astuce b { color: var(--c-ink); font-weight: 600; }
.atelier-seg { display: flex; width: 100%; }
.atelier-seg button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2); }
.atelier-pied { margin: calc(-1 * var(--s-3)) 0 0; min-height: 1lh; font: var(--t-small); color: var(--c-ink-3); text-align: center; }
.atelier-garanties { list-style: none; margin: 0; padding: var(--s-4) 0 0; border-top: var(--size-filet-epais) solid var(--c-line); display: flex; flex-direction: column; gap: var(--s-2); }
.atelier-garanties li { display: flex; gap: var(--s-2); align-items: flex-start; font: var(--t-small); color: var(--c-ink-3); }
.atelier-garanties .sty-icon { flex: none; margin-top: 0.15em; }

/* Deux options côte à côte (Standard / Approfondie). */
.atelier-choix { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); }
.atelier-choix__o { display: flex; flex-direction: column; gap: var(--s-1); padding: var(--s-4); text-align: left; border-radius: var(--r-lg); border: var(--size-filet-epais) solid var(--c-line); background: var(--c-card); color: var(--c-ink); font: inherit; cursor: pointer; transition: border-color var(--d-press) ease, background var(--d-press) ease; }
.atelier-choix__o b { font: var(--t-ui); font-weight: 600; }
.atelier-choix__o small { font: var(--t-small); color: var(--c-ink-2); }
.atelier-choix__o:hover { border-color: var(--c-line-strong); }
.atelier-choix__o[aria-checked="true"] { border-color: var(--c-accent); background: var(--c-accent-wash); }
.atelier-choix__o:focus-visible { outline: var(--size-filet-epais) solid var(--c-accent); outline-offset: var(--size-filet-epais); }

/* La zone de dépôt du PowerPoint. */
.atelier-depot { display: flex; flex-direction: column; align-items: center; gap: var(--s-2); padding: var(--s-10) var(--s-6); border-radius: var(--r-xl);
  border: var(--size-filet-epais) dashed var(--c-line-strong); background: var(--c-sunken); color: var(--c-ink); font: inherit; text-align: center; cursor: pointer;
  transition: border-color var(--d-press) ease, background var(--d-press) ease, transform var(--d-press) ease; }
.atelier-depot b { font: var(--t-card-title); }
.atelier-depot small { font: var(--t-small); color: var(--c-ink-3); }
.atelier-depot__ic { display: inline-grid; place-items: center; width: var(--s-12); height: var(--s-12); border-radius: var(--r-lg); background: var(--c-accent-soft); color: var(--c-accent-text); margin-bottom: var(--s-1); }
.atelier-depot:not(:disabled):hover, .atelier-depot--survol { border-color: var(--c-accent); background: var(--c-accent-wash); }
.atelier-depot--survol { transform: scale(1.01); }
.atelier-depot--lecture { opacity: 0.7; cursor: progress; }
.atelier-depot:disabled { cursor: not-allowed; opacity: 0.6; }
.atelier-depot:focus-visible { outline: var(--size-filet-epais) solid var(--c-accent); outline-offset: var(--size-filet-epais); }

/* La « page » de cours : même papier que l'éditeur, une barre d'état en haut. */
.atelier-page { border-radius: var(--r-xl); background: var(--c-editor, var(--c-card)); box-shadow: var(--shadow-default); border: var(--size-filet) solid var(--c-line); overflow: hidden; }
.atelier-page__barre { display: flex; align-items: center; gap: var(--s-2); padding: var(--s-3) var(--s-6); border-bottom: var(--size-filet) solid var(--c-line); font: var(--t-small); color: var(--c-ink-2); }
.atelier-page__barre b { color: var(--c-ink); font-weight: 600; }
.atelier-page__chrono { font-variant-numeric: tabular-nums; color: var(--c-ink-3); }
.atelier-page__cours { margin-left: auto; display: inline-flex; align-items: center; gap: var(--s-1); color: var(--c-ink-3); }
.atelier-page__corps { padding: var(--s-8) var(--s-8) var(--s-10); }
.atelier-page__suite { color: var(--c-ink-2) !important; }
.atelier-curseur { display: inline-block; width: var(--size-filet-epais); height: 1em; margin-left: var(--s-1); vertical-align: text-bottom; background: var(--c-accent); animation: atelier-clignote 1.1s steps(1) infinite; }
@keyframes atelier-clignote { 50% { opacity: 0; } }
.atelier-legende { margin: var(--s-3) 0 0; font: var(--t-small); color: var(--c-ink-3); }

/* ---------- Cours en visio ---------- */
.direct__grille { display: grid; grid-template-columns: minmax(22rem, 26rem) minmax(0, 1fr); gap: var(--s-8); align-items: start; }
.direct__pilote { gap: var(--s-5); }
.direct__point--vivant { animation: direct-pouls 1.6s ease-in-out infinite; }
.direct__pilote { position: sticky; top: var(--s-6); }
.direct__aide { margin-top: var(--s-2); }
.direct__aide b { color: var(--c-ink); font-weight: 600; }
.direct__accord { display: flex; gap: var(--s-3); align-items: flex-start; font: var(--t-small); color: var(--c-ink-2); cursor: pointer; }
.direct__accord .sty-switch { flex: none; }
.direct__go { align-self: stretch; justify-content: center; }
.direct__apercu { display: flex; flex-direction: column; position: sticky; top: var(--s-6); }

.direct__statut { display: flex; align-items: center; gap: var(--s-2); margin: 0; font: var(--t-ui); font-weight: 600; color: var(--c-ink); }
.direct__point { width: var(--s-2); height: var(--s-2); border-radius: var(--r-pill); background: var(--c-rec); }
.direct--seance:not(.direct--pause) .direct__point { animation: direct-pouls 1.6s ease-in-out infinite; }
@keyframes direct-pouls { 50% { opacity: 0.35; } }
.direct__chrono { margin-left: auto; font: var(--t-mono); color: var(--c-ink-2); font-variant-numeric: tabular-nums; }
.direct__cours { display: flex; align-items: center; gap: var(--s-2); margin: 0; font: var(--t-small); color: var(--c-ink-2); }
.direct__niveau { height: var(--s-1); border-radius: var(--r-pill); background: var(--c-sunken); overflow: hidden; }
.direct__niveau i { display: block; height: 100%; background: var(--c-accent); transform-origin: left center; transform: scaleX(0.02); }
.direct__commandes { display: flex; gap: var(--s-2); flex-wrap: wrap; }
.direct__commandes > * { flex: 1 1 auto; justify-content: center; }
.direct__commandes--fin { flex-direction: column; }
.direct-etat__ligne { margin: 0; font: var(--t-small); color: var(--c-ink-3); }
.direct-etat { display: flex; flex-direction: column; gap: var(--s-3); }
.direct-ecoute summary { cursor: pointer; font: var(--t-small); font-weight: 600; color: var(--c-ink-2); }
.direct-ecoute [data-ecoute] { margin-top: var(--s-2); max-height: 16rem; overflow: auto; display: flex; flex-direction: column; gap: var(--s-2); }
.direct-ecoute p { margin: 0; font: var(--t-small); color: var(--c-ink-3); }
.direct-ecoute__h { margin-right: var(--s-2); font: var(--t-micro); color: var(--c-ink-3); font-variant-numeric: tabular-nums; }

.direct__page { min-width: 0; padding: var(--s-8) var(--s-10); border-radius: var(--r-xl); background: var(--c-editor, var(--c-card)); box-shadow: var(--shadow-default); min-height: 70vh; }
.direct__titre-chapitre { width: 100%; margin: 0 0 var(--s-6); padding: 0; border: 0; background: transparent; font: var(--t-title); color: var(--c-ink); }
.direct__titre-chapitre:focus-visible { outline: none; box-shadow: 0 var(--size-filet-epais) 0 var(--c-accent); }
.direct-notes { max-width: var(--size-read); }
.direct-notes p { font: var(--t-read); color: var(--c-ink); margin: 0 0 var(--s-4); }
.direct-notes ul { margin: 0 0 var(--s-4); padding-left: var(--s-6); font: var(--t-read); color: var(--c-ink); }
.direct-notes__titre { font: var(--t-heading); color: var(--c-ink); margin: var(--s-8) 0 var(--s-3); }
.direct-notes__sous { font: var(--t-card-title); color: var(--c-ink); margin: var(--s-6) 0 var(--s-2); }
.direct-objet { margin: var(--s-4) 0 var(--s-6); padding: var(--s-4); border-radius: var(--r-lg); border: var(--size-filet) solid var(--c-line); background: var(--c-sunken); }
.direct-objet figcaption { display: flex; align-items: center; gap: var(--s-2); margin-bottom: var(--s-3); font: var(--t-small); font-weight: 600; color: var(--c-accent-text); }
.direct-notes__point { font: var(--t-ui); font-weight: 700; color: var(--c-ink-2); margin: var(--s-5) 0 var(--s-2); }
.direct__annonce summary { cursor: pointer; font: var(--t-ui); font-weight: 500; color: var(--c-ink); }
.direct__annonce[open] summary { margin-bottom: var(--s-2); }
.direct__annonce .meta { display: block; margin-top: var(--s-2); }
.direct-notes > :first-child { margin-top: 0; }
.direct-notes__def strong { color: var(--c-accent-text); }
.direct-notes__important { margin: 0 0 var(--s-4); }
.direct-notes__important p { margin-bottom: var(--s-2); }
.direct-question { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-3) var(--s-4); border-radius: var(--r-lg); background: var(--c-accent-wash); color: var(--c-accent-text); }
.direct-question > div { flex: 1; display: flex; flex-direction: column; gap: var(--s-1); font: var(--t-small); }
.direct-question b { font-weight: 600; }
.direct-question span { color: var(--c-ink-2); }
.direct-notes__vide { display: flex; flex-direction: column; align-items: center; gap: var(--s-3); padding: var(--s-16) var(--s-6); text-align: center; color: var(--c-ink-3); }
.direct-notes__vide p { font: var(--t-body); color: var(--c-ink-3); margin: 0; }
.direct-notes__attente { display: inline-flex; gap: var(--s-1); padding: var(--s-2) 0; margin: 0; }
.direct-notes__attente span { width: var(--s-2); height: var(--s-2); border-radius: var(--r-pill); background: var(--c-ink-3); animation: atelier-points 1.2s ease-in-out infinite; }
.direct-notes__attente span:nth-child(2) { animation-delay: 0.15s; }
.direct-notes__attente span:nth-child(3) { animation-delay: 0.3s; }
@keyframes atelier-points { 0%, 100% { opacity: 0.25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(calc(-1 * var(--s-1))); } }

/* ---------- PowerPoint ---------- */
.pptx__actions { display: flex; gap: var(--s-3); flex-wrap: wrap; }
.pptx__ranges { display: flex; flex-direction: column; gap: var(--s-2); margin-top: var(--s-2); }
.pptx__grille { display: grid; grid-template-columns: minmax(16rem, 20rem) minmax(0, 1fr); gap: var(--s-8); align-items: start; }
.pptx__parties { position: sticky; top: var(--s-6); }
.pptx__parties ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-3); }
.pptx-partie { display: flex; gap: var(--s-3); align-items: flex-start; }
.pptx-partie > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--s-1); }
.pptx-partie b { font: var(--t-small); font-weight: 600; color: var(--c-ink); overflow-wrap: anywhere; }
.pptx-partie small { font: var(--t-micro); color: var(--c-ink-3); }
.pptx-partie__err { color: var(--c-err-strong) !important; }
.pptx-partie__n { flex: none; display: inline-grid; place-items: center; width: var(--s-6); height: var(--s-6); border-radius: var(--r-pill); background: var(--c-sunken); font: var(--t-micro); font-weight: 700; color: var(--c-ink-2); }
.pptx-partie--fait .pptx-partie__n { background: var(--c-ok-soft); color: var(--c-ok-strong); }
.pptx-partie--cours .pptx-partie__n { background: var(--c-accent-soft); color: var(--c-accent-text); animation: direct-pouls 1.6s ease-in-out infinite; }
.pptx-partie--echec .pptx-partie__n { background: var(--c-err-soft); color: var(--c-err-strong); }
.pptx__rendu { min-width: 0; padding: var(--s-8) var(--s-10); border-radius: var(--r-xl); background: var(--c-editor, var(--c-card)); box-shadow: var(--shadow-default); }
.pptx__rendu blockquote { margin: var(--s-4) 0; padding: var(--s-3) var(--s-4); border-left: var(--s-1) solid var(--c-warn); border-radius: var(--r-sm); background: var(--c-warn-soft); }
.pptx__rendu blockquote p:first-child { font: var(--t-small); color: var(--c-warn-strong); margin-bottom: var(--s-2); }
.pptx__rendu sup { font: var(--t-micro); color: var(--c-accent-text); }

/* ---------- Max prof (Atlas, 12/11/2026) ----------
   L'accueil : le cours, le mode, l'examen. La séance : le plan du cours à gauche (repères de carte à six formes,
   toujours avec leur mot, reliés par un sentier), la leçon au centre en Alegreya, les gestes en bas.
   Le violet du logo ne sert qu'à « tu es ici » : le repère de la notion en cours, le curseur du sentier,
   le filet de 2 px sous la notion en cours. Tout le reste est en encre, ardoise, ocre, vert de gris et terre. */
.prof__champs { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }
.prof__champs > .sty-field { min-width: 0; }
.prof-accueil__tete .vue-titre { font-family: var(--font-titre); font-weight: var(--fw-titre); letter-spacing: var(--tr-affiche); }
.prof-accueil__tete .atelier-surtitre { color: var(--c-ocre); letter-spacing: var(--tr-capitales); }
.prof__modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); }
.prof-mode { display: flex; gap: var(--s-3); align-items: flex-start; min-width: 0; padding: var(--s-4); text-align: left; border: 0; border-radius: var(--r-m); background: var(--c-surface); box-shadow: inset 0 0 0 var(--w-trait) var(--c-line-strong); color: var(--c-ink); font: inherit; cursor: pointer; transition: box-shadow var(--d-survol) var(--ease-survol), background-color var(--d-survol) var(--ease-survol), transform var(--d-press) var(--ease-out); }
.prof-mode:active { transform: scale(var(--scale-press)); }
.prof-mode__ic { flex: none; display: inline-grid; place-items: center; width: var(--s-10); height: var(--s-10); border-radius: var(--r-btn); background: var(--c-sunken); color: var(--c-ink-2); transition: background-color var(--d-survol) var(--ease-survol), color var(--d-survol) var(--ease-survol); }
.prof-mode__tx { display: flex; flex-direction: column; gap: var(--s-1); min-width: 0; }
.prof-mode b { font-family: var(--font-titre); font-size: var(--t-l); font-weight: var(--fw-titre); line-height: var(--lh-titre); overflow-wrap: anywhere; }
.prof-mode small { font-size: var(--t-s); line-height: var(--lh-ui); color: var(--c-ink-2); }
@media (hover: hover) and (pointer: fine) { .prof-mode:hover { box-shadow: inset 0 0 0 var(--w-trait) var(--c-control); } }
.prof-mode[aria-checked="true"] { background: var(--c-ardoise-soft); box-shadow: inset 0 0 0 var(--w-trait-fort) var(--c-ardoise); }
.prof-mode[aria-checked="true"] .prof-mode__ic { background: var(--c-ardoise); color: var(--c-on-ardoise); }

.prof__examen { display: grid; grid-template-columns: minmax(0, var(--size-col-s)) minmax(0, 1fr); gap: var(--s-4); }
.prof-apercu { display: flex; flex-direction: column; gap: var(--s-2); padding: var(--s-3) var(--s-4); border-radius: var(--r-m); background: var(--c-surface-2); box-shadow: inset 0 0 0 var(--w-trait) var(--c-line); }
.prof-apercu p { margin: 0; font-size: var(--t-s); line-height: var(--lh-ui); color: var(--c-ink-2); }
.prof-apercu p b { color: var(--c-ink); font-weight: var(--fw-fort); }
.prof-apercu .sty-btn { align-self: flex-start; }
.prof-lecture { display: flex; flex-direction: column; gap: var(--s-3); padding: var(--s-4); border-radius: var(--r-m); background: var(--c-ocre-soft); }
.prof-lecture p { margin: 0; font-size: var(--t-s); line-height: var(--lh-ui); color: var(--c-ink); }
.prof-lecture .sty-progress__fill { background: var(--c-ocre-fill); }

/* La séance : tout tient dans la hauteur de l'écran ; seuls le plan et la leçon défilent.
   Fond plein : on lit ici pendant des heures, aucune texture sous le texte. */
.prof--seance { display: flex; flex-direction: column; width: 100%; height: 100dvh; padding: var(--s-5) var(--s-8) var(--s-4); gap: var(--s-4); background: var(--c-page); }
:root[data-ile="bas"] .prof--seance { height: calc(100dvh - var(--size-dock-espace) - env(safe-area-inset-bottom, 0px)); }

/* L'en-tête : le cours (Alegreya) et son mode ; à droite, « Ton chemin dans ce cours » et les outils. */
.prof__tete { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, var(--size-tete-prof)); align-items: end; gap: var(--s-3) var(--s-8); padding-bottom: var(--s-4); border-bottom: var(--w-trait) solid var(--c-line); }
.prof__qui { display: flex; align-items: center; gap: var(--s-3); min-width: 0; }
.prof__quitter { flex: none; }
.prof__visage { width: var(--s-12); height: var(--s-12); flex: none; }
.prof__titres { display: grid; justify-items: start; gap: var(--s-0); min-width: 0; }
.prof__mode { display: inline-flex; align-items: center; gap: var(--s-1); max-width: 100%; min-height: var(--size-cible); margin: calc((var(--size-cible) - var(--lh-ui) * var(--t-s)) / -2) 0 0 calc(var(--s-2) * -1); padding: 0 var(--s-2); border: 0; border-radius: var(--r-s); background: transparent; font: inherit; font-size: var(--t-s); font-weight: var(--fw-fort); letter-spacing: var(--tr-capitales); text-transform: uppercase; color: var(--c-ocre); cursor: pointer; transition: background-color var(--d-survol) var(--ease-survol), transform var(--d-press) var(--ease-out); }
.prof__mode > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prof__mode:active { transform: scale(var(--scale-press)); }
@media (hover: hover) and (pointer: fine) { .prof__mode:hover { background: var(--c-ocre-soft); } }
.prof__titre { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-1) var(--s-3); margin: 0; min-width: 0; font-family: var(--font-titre); font-size: var(--t-2xl); font-weight: var(--fw-titre); line-height: var(--lh-titre); letter-spacing: var(--tr-titre); color: var(--c-ink); }
.prof__titre > span:first-child { min-width: 0; overflow-wrap: anywhere; hyphens: auto; }
.prof__droite { display: grid; gap: var(--s-2); min-width: 0; }
.prof-sentier .sentier__entete > span { color: var(--c-ink-2); }
.prof-sentier .sentier__pied { margin: 0; font-variant-numeric: lining-nums tabular-nums; }
.prof__outils { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--s-2); }
.prof__plan-compte { margin-left: var(--s-1); color: var(--c-ink-2); font-variant-numeric: lining-nums tabular-nums; }
.prof__bascule { display: inline-flex; align-items: center; gap: var(--s-2); min-height: var(--size-cible); font-size: var(--t-s); color: var(--c-ink-2); cursor: pointer; }
.prof__voir-plan { display: none; }

.prof__corps { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, var(--size-plan)) minmax(0, 1fr); gap: var(--s-8); }

/* Le plan : une colonne de repères reliés par le sentier du cours. */
.prof__plan { display: flex; flex-direction: column; min-height: 0; }
.prof__plan-tete { padding: 0 0 var(--s-3); }
.prof__plan-tete h2 { margin: 0; font-size: var(--t-xs); font-weight: var(--fw-fort); letter-spacing: var(--tr-capitales); text-transform: uppercase; color: var(--c-ink-2); }
.plan { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding: 0 var(--s-2) var(--s-6) 0; display: grid; align-content: start; gap: var(--s-5); }
.plan__partie h3 { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-2); margin: 0 0 var(--s-2); font-family: var(--font-titre); font-size: var(--t-m); font-weight: var(--fw-titre); line-height: var(--lh-titre); color: var(--c-ink-2); }
.plan__partie h3 span { min-width: 0; overflow-wrap: anywhere; }
.plan__partie h3 small { flex: none; font-family: var(--font-texte); font-size: var(--t-xs); color: var(--c-ink-2); font-variant-numeric: lining-nums tabular-nums; }
.plan__liste { margin: 0; padding: 0; list-style: none; }
.plan__item, .plan__sous { position: relative; min-width: 0; }
/* L'intitulé d'une sous-partie : le sentier le traverse (pointillé, ou ocre si la notion d'avant est abordée). */
.plan__sous { padding: var(--s-2) 0 var(--s-2) calc(var(--s-1) + var(--size-repere) + var(--s-3)); font-size: var(--t-xs); font-weight: var(--fw-fort); line-height: var(--lh-ui); letter-spacing: var(--tr-capitales); text-transform: uppercase; color: var(--c-ink-2); overflow-wrap: anywhere; }
.plan__sous:first-child { padding-top: 0; }
.plan__sous:not(:first-child)::before { content: ""; position: absolute; left: calc(var(--s-1) + var(--size-repere) / 2 - var(--w-trait-fort) / 2); top: 0; bottom: 0; width: var(--w-trait-fort); background-image: linear-gradient(var(--c-line-strong) 50%, transparent 50%); background-size: var(--w-trait-fort) var(--s-1); }
.plan__item--parcourue + .plan__sous::before { background: var(--c-ocre-fill); }
/* Le tronçon vers la notion suivante : pointillé à parcourir, trait ocre une fois parcouru (scaleY, jamais height). */
.plan__item::before, .plan__trace { position: absolute; left: calc(var(--s-1) + var(--size-repere) / 2 - var(--w-trait-fort) / 2); top: calc(var(--s-2) + var(--size-repere)); bottom: calc(var(--s-2) * -1); width: var(--w-trait-fort); pointer-events: none; }
.plan__item::before { content: ""; background-image: linear-gradient(var(--c-line-strong) 50%, transparent 50%); background-size: var(--w-trait-fort) var(--s-1); }
.plan__trace { background: var(--c-ocre-fill); transform-origin: top center; transform: scaleY(0); transition: transform var(--d-chemin) var(--ease-in-out); }
.plan__item--parcourue .plan__trace { transform: scaleY(1); }
.plan__item:last-child::before, .plan__item:last-child .plan__trace { display: none; }
.plan__notion { position: relative; display: grid; grid-template-columns: var(--size-repere) minmax(0, 1fr); align-items: start; gap: var(--s-3); width: 100%; min-height: var(--size-cible); padding: var(--s-2) var(--s-2) var(--s-2) var(--s-1); border: 0; border-radius: var(--r-s); background: transparent; color: var(--c-ink); font: inherit; text-align: left; cursor: pointer; transition: background-color var(--d-survol) var(--ease-survol), transform var(--d-press) var(--ease-out); }
.plan__notion:active { transform: scale(var(--scale-press)); }
@media (hover: hover) and (pointer: fine) { .plan__notion:hover { background: var(--c-surface-2); } }
.plan__notion:focus-visible { outline-offset: calc(var(--o-focus) * -1); }
.plan__repere { background: var(--c-page); border-radius: var(--r-rond); }
.plan__texte { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s-1) var(--s-2); min-width: 0; }
.plan__nom { min-width: 0; flex: 1 1 var(--size-col-xs); overflow-wrap: anywhere; font-size: var(--t-s); line-height: var(--lh-ui); }
.plan__texte .etat { padding: 0 var(--s-2); }
/* Tu es ici : le nom en gras, souligné d'un filet violet de 2 px ; le repère est cerclé de violet. */
.plan__item--ici .plan__nom { font-weight: var(--fw-fort); text-decoration: underline; text-decoration-color: var(--c-marque-vif); text-decoration-thickness: var(--w-trait-fort); text-underline-offset: var(--decal-souligne); }
.plan__item--ici .plan__repere { box-shadow: 0 0 0 var(--w-trait-fort) var(--c-page), 0 0 0 calc(var(--w-trait-fort) * 2) var(--c-marque-vif); }
/* Un repère qui change d'état se pose (scale 0,96 → 1 et fondu), au rythme du chemin. */
.plan__item--change .plan__repere { animation: plan-pose var(--d-menu) var(--ease-out) both; animation-delay: calc(var(--delai, 0ms) * var(--d-pas)); }
@keyframes plan-pose { from { opacity: 0; transform: scale(var(--scale-entree)); } }
.prof__plan--feuille { gap: var(--s-4); }
.prof__plan--feuille .plan { overflow: visible; padding: 0; }
.prof-sentier--feuille { padding-bottom: var(--s-3); border-bottom: var(--w-trait) solid var(--c-line); }

/* La leçon */
.prof__lecon { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.prof__ou { display: grid; gap: var(--s-1); padding-bottom: var(--s-3); border-bottom: var(--w-trait) solid var(--c-line); max-width: var(--mesure); }
.prof-ou__sur { margin: 0; font-size: var(--t-xs); font-weight: var(--fw-fort); letter-spacing: var(--tr-capitales); text-transform: uppercase; color: var(--c-ocre); font-variant-numeric: lining-nums tabular-nums; }
.prof-ou__titre { margin: 0; font-family: var(--font-titre); font-size: var(--t-2xl); font-weight: var(--fw-titre); line-height: var(--lh-serre); letter-spacing: var(--tr-titre); color: var(--c-ink); overflow-wrap: anywhere; hyphens: auto; text-wrap: balance; }
.prof-ou__titre:focus { outline: none; }
.prof-ou__chemin { margin: 0; font-size: var(--t-s); color: var(--c-ink-2); overflow-wrap: anywhere; }
.prof__fil { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: var(--s-6); padding: var(--s-6) var(--s-2) var(--s-6) 0; }
.prof__pied { display: flex; flex-direction: column; gap: var(--s-3); padding-top: var(--s-3); border-top: var(--w-trait) solid var(--c-line); background: var(--c-page); }
.prof__note { margin: 0; font-size: var(--t-s); color: var(--c-ocre); }
.prof__gestes { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.prof__geste { flex: none; }
.prof__geste .sty-icon { margin-left: var(--s-1); }
.prof__saisie { display: flex; gap: var(--s-3); align-items: flex-end; }
.prof__saisie textarea { flex: 1; min-width: 0; resize: vertical; min-height: 0; max-height: 40dvh; }
.prof__boutons { display: flex; gap: var(--s-2); align-items: center; }
@media (max-width: 767px) { .prof__saisie { flex-wrap: wrap; } .prof__saisie textarea { flex-basis: 100%; } .prof__boutons { flex: 1; justify-content: flex-end; } }
.prof__micro { display: inline-grid; place-items: center; width: var(--size-cible); height: var(--size-cible); border: 0; border-radius: var(--r-rond); background: var(--c-surface); box-shadow: inset 0 0 0 var(--w-trait) var(--c-line-strong); color: var(--c-ink); cursor: pointer; transition: transform var(--d-press) var(--ease-out); }
.prof__micro:active:not(:disabled) { transform: scale(var(--scale-press)); }
.prof__micro--actif { background: var(--c-terre); box-shadow: none; color: var(--c-surface); animation: direct-pouls var(--d-respire) var(--ease-in-out) infinite; }
.prof__micro:disabled { opacity: 0.5; cursor: not-allowed; }
/* Joindre un document en pleine séance : pastille à côté du micro ; tout le pied accepte le dépôt. */
.prof__joindre { display: inline-flex; align-items: center; gap: var(--s-2); min-height: var(--size-cible); padding: 0 var(--s-4); border: 0; border-radius: var(--r-pill); background: var(--c-surface); box-shadow: inset 0 0 0 var(--w-trait) var(--c-line-strong); color: var(--c-ink); font: var(--t-body); font-weight: var(--fw-fort); cursor: pointer; transition: transform var(--d-press) var(--ease-out); }
.prof__joindre:active:not(:disabled) { transform: scale(var(--scale-press)); }
.prof__joindre:disabled { opacity: 0.5; cursor: progress; }
.prof__joindre:focus-visible { outline: var(--size-filet-epais) solid var(--c-accent); outline-offset: var(--size-filet-epais); }
@media (max-width: 767px) { .prof__joindre { width: var(--size-cible); padding: 0; justify-content: center; } .prof__joindre span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; } }
.prof__pied[data-survol] .prof__saisie textarea { box-shadow: inset 0 0 0 var(--size-filet-epais) var(--c-accent); background: var(--c-accent-wash); }

/* Le sujet du devoir (étape 3 de Max prof en mode « Aide aux devoirs »). */
.prof-devoir { display: flex; flex-direction: column; gap: var(--s-4); }
.prof-doc__depot { width: 100%; padding: var(--s-8) var(--s-6); font: inherit; color: inherit; cursor: pointer; transition: border-color var(--d-survol) var(--ease-out), background-color var(--d-survol) var(--ease-out), transform var(--d-press) var(--ease-out); }
.prof-doc__depot:active { transform: scale(var(--scale-press)); }
.prof-devoir[data-survol] .prof-doc__depot { border-color: var(--c-accent); background: var(--c-accent-wash); transform: scale(1.01); }
.prof-doc { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-4); border-radius: var(--r-lg); background: var(--c-surface-2); box-shadow: inset 0 0 0 var(--w-trait) var(--c-line); }
.prof-doc > .sty-icon { flex: none; color: var(--c-accent-text); }
.prof-doc > div { display: flex; flex-direction: column; gap: var(--s-1); min-width: 0; flex: 1; }
.prof-doc b { font: var(--t-card-title); overflow-wrap: anywhere; }
.prof-doc span { font: var(--t-small); color: var(--c-ink-2); }
.prof-doc--lecture > .sty-icon { animation: direct-pouls var(--d-respire) var(--ease-in-out) infinite; }
@media (prefers-reduced-motion: reduce) { .prof-doc--lecture > .sty-icon { animation: none; } }
:root[data-mouvement-reduit] .prof-doc--lecture > .sty-icon { animation: none; }
.prof__erreur { margin: 0; }
.prof-vide { margin: auto 0; display: flex; flex-direction: column; align-items: center; gap: var(--s-3); text-align: center; padding: var(--s-10) var(--s-4); }
.prof-vide__borne { width: var(--size-borne-s); height: auto; }
.prof-vide__titre { margin: 0; font-family: var(--font-titre); font-size: var(--t-xl); font-weight: var(--fw-titre); line-height: var(--lh-titre); }
.prof-vide p { max-width: calc(var(--mesure) * 0.7); margin: 0; font-size: var(--t-m); line-height: var(--lh-ui); color: var(--c-ink-2); }

/* La leçon : un texte de cours, pas une suite de bulles. Alegreya, largeur de lecture. */
.lecon { position: relative; width: 100%; max-width: var(--mesure); padding-right: var(--s-10); font-family: var(--font-titre); font-size: var(--t-lecture); line-height: var(--lh-lecture); color: var(--c-ink); }
.lecon > :first-child { margin-top: 0; }
.lecon p { margin: 0 0 var(--s-4); overflow-wrap: break-word; hyphens: auto; }
.lecon p:last-child { margin-bottom: 0; }
.lecon strong { font-weight: var(--fw-fort); }
.lecon__entre { animation: lecon-entre var(--d-entree-support) var(--ease-out) both; animation-delay: calc(var(--delai, 0ms) * var(--d-pas)); }
@keyframes lecon-entre { from { opacity: 0; transform: translateY(var(--rise-support)); } }
.lecon__titre { margin: var(--s-6) 0 var(--s-3); font-family: var(--font-titre); font-size: var(--t-xl); font-weight: var(--fw-titre); line-height: var(--lh-titre); color: var(--c-ink); }
.lecon__etiq { display: block; margin-bottom: var(--s-1); font-family: var(--font-texte); font-size: var(--t-xs); font-weight: var(--fw-fort); line-height: var(--lh-ui); letter-spacing: var(--tr-capitales); text-transform: uppercase; color: var(--c-ocre); }
.lecon__def, .lecon__ex, .lecon__attention, .lecon__indice, .lecon__retenir, .lecon__question, .lecon__schema, .lecon__tableau, .lecon__chrono { margin: var(--s-5) 0; }
.lecon__def { padding-left: var(--s-4); border-left: var(--w-chemin) solid var(--c-ocre-fill); }
.lecon__ex { padding: var(--s-4) var(--s-5); border-radius: var(--r-m); background: var(--c-surface); box-shadow: var(--sh-1); }
.lecon__ex .lecon__etiq { color: var(--c-ink-2); }
.lecon__ex--contre { background: transparent; box-shadow: inset 0 0 0 var(--w-trait) var(--c-line-strong); }
.lecon__attention { padding-left: var(--s-4); border-left: var(--w-chemin) solid var(--c-terre); }
.lecon__attention .lecon__etiq { color: var(--c-terre); }
.lecon__indice { padding: var(--s-3) var(--s-5); border-radius: var(--r-m); background: var(--c-ardoise-soft); }
.lecon__indice .lecon__etiq { color: var(--c-ardoise-text); }
.lecon__liste { margin: 0 0 var(--s-4); padding-left: var(--s-6); }
.lecon__liste li, .lecon__retenir li { margin: var(--s-1) 0; }
.lecon__retenir { padding: var(--s-4) var(--s-5); border-radius: var(--r-m); background: var(--c-ocre-soft); color: var(--c-ink); }
.lecon__retenir p, .lecon__retenir li { font-size: var(--t-l); line-height: var(--lh-titre); }
.lecon__retenir ul { margin: 0; padding-left: var(--s-5); }
.lecon__question { display: grid; gap: var(--s-2); padding: var(--s-5); border-radius: var(--r-m); background: var(--c-surface); box-shadow: var(--sh-1); }
.lecon__question .lecon__etiq { margin: 0; }
.lecon__question p { font-size: var(--t-l); line-height: var(--lh-titre); }
.lecon figcaption { margin-bottom: var(--s-2); font-family: var(--font-titre); font-size: var(--t-m); font-weight: var(--fw-titre); color: var(--c-ink); }
.lecon__schema ol { list-style: none; counter-reset: etape; display: flex; flex-direction: column; gap: var(--s-2); margin: 0; padding: 0; }
.lecon__schema li { counter-increment: etape; position: relative; display: grid; grid-template-columns: var(--size-repere-l) minmax(0, 1fr); gap: var(--s-3); align-items: start; padding: var(--s-3) var(--s-4); border-radius: var(--r-m); background: var(--c-surface); box-shadow: var(--sh-1); font-family: var(--font-texte); font-size: var(--t-m); line-height: var(--lh-ui); }
.lecon__schema li::before { content: counter(etape); display: inline-grid; place-items: center; width: var(--size-repere-l); height: var(--size-repere-l); border-radius: var(--r-rond); box-shadow: inset 0 0 0 var(--w-trait-fort) var(--c-ocre-fill); color: var(--c-ocre); font-weight: var(--fw-fort); font-size: var(--t-s); }
.lecon__schema li + li::after { content: ''; position: absolute; left: calc(var(--s-4) + var(--size-repere-l) / 2 - var(--w-trait-fort) / 2); top: calc(var(--s-2) * -1); width: var(--w-trait-fort); height: var(--s-2); background: var(--c-ocre-fill); }
.lecon__defile { overflow-x: auto; overscroll-behavior-x: contain; border-radius: var(--r-m); background: var(--c-surface); box-shadow: var(--sh-1); }
.lecon__defile .tableau-objet { font-family: var(--font-texte); font-size: var(--t-s); line-height: var(--lh-ui); min-width: calc(var(--size-col-l) + var(--size-col-xs)); }
.lecon__frise { list-style: none; margin: 0; padding: var(--s-4); display: grid; border-radius: var(--r-m); background: var(--c-surface); box-shadow: var(--sh-1); }
.lecon__frise li { position: relative; display: grid; grid-template-columns: var(--size-point-frise) minmax(0, 1fr); gap: var(--s-3); padding-bottom: var(--s-4); font-family: var(--font-texte); }
.lecon__frise li::before { content: ""; position: absolute; left: calc(var(--size-point-frise) / 2 - var(--w-trait)); top: calc(var(--s-1) + var(--size-point-frise)); bottom: 0; width: var(--w-trait-fort); background: var(--c-line-strong); }
.lecon__frise li:last-child { padding-bottom: 0; }
.lecon__frise li:last-child::before { display: none; }
.lecon__frise-point { width: var(--size-point-frise); height: var(--size-point-frise); margin-top: var(--s-1); border-radius: var(--r-rond); background: var(--c-surface); box-shadow: inset 0 0 0 var(--w-trait-fort) var(--c-ocre-fill); }
.lecon__frise b { display: block; font-family: var(--font-titre); font-size: var(--t-l); font-weight: var(--fw-titre); line-height: var(--lh-titre); font-variant-numeric: lining-nums tabular-nums; }
.lecon__frise span { font-size: var(--t-s); line-height: var(--lh-ui); color: var(--c-ink-2); overflow-wrap: anywhere; }
/* Ce qui sort du cours : à part, avec son mot. « À vérifier » porte le repère losange ocre. */
.lecon__hors { margin: var(--s-5) 0; padding-left: var(--s-4); border-left: var(--w-chemin) solid var(--c-ardoise-soft); }
.lecon__hors > .lecon__etiq { color: var(--c-ardoise-text); }
.lecon__hors--verifier { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s-3); padding: var(--s-4); border-left: 0; border-radius: var(--r-m); background: var(--c-surface); box-shadow: inset 0 0 0 var(--w-trait) var(--c-ocre-fill); }
.lecon__hors--verifier .lecon__etiq { color: var(--c-ocre); }
.lecon__hors-repere { margin-top: var(--s-0); }
.lecon__hors :is(.lecon__def, .lecon__ex, .lecon__attention, .lecon__indice) { margin: 0; }
.lecon__coupe { font-family: var(--font-texte); font-size: var(--t-s); color: var(--c-ocre); }
.lecon__lire { position: absolute; top: calc(var(--s-1) * -1); right: 0; display: inline-grid; place-items: center; width: var(--size-cible); height: var(--size-cible); border: 0; border-radius: var(--r-rond); background: transparent; color: var(--c-ink-2); cursor: pointer; transition: background-color var(--d-survol) var(--ease-survol), color var(--d-survol) var(--ease-survol); }
@media (hover: hover) and (pointer: fine) { .lecon__lire:hover { background: var(--c-surface-2); color: var(--c-ink); } }
.lecon--attente { display: grid; gap: var(--s-3); padding: var(--s-4) var(--s-5); border-radius: var(--r-m); background: var(--c-surface); box-shadow: var(--sh-1); font-family: var(--font-texte); }
.lecon--attente__mot { display: flex; align-items: center; gap: var(--s-3); margin: 0; font-size: var(--t-s); color: var(--c-ink-2); }
.lecon--attente__squelette { display: grid; gap: var(--s-2); }
.lecon--attente__squelette span:nth-child(2) { width: 80%; }
.lecon--attente__squelette span:nth-child(3) { width: 60%; }
.lecon-repere { display: grid; gap: var(--s-1); max-width: var(--mesure); padding-top: var(--s-4); border-top: var(--w-trait) solid var(--c-line); }
.lecon-repere:first-child { border-top: 0; padding-top: 0; }
.lecon-repere span { font-size: var(--t-xs); font-weight: var(--fw-fort); letter-spacing: var(--tr-capitales); text-transform: uppercase; color: var(--c-ink-2); overflow-wrap: anywhere; }
.lecon-repere b { font-family: var(--font-titre); font-size: var(--t-xl); font-weight: var(--fw-titre); line-height: var(--lh-titre); color: var(--c-ink); overflow-wrap: anywhere; }
/* Ta réponse : posée sur la feuille, à gauche, comme une copie. */
.lecon-eleve { max-width: var(--mesure); padding: var(--s-3) var(--s-4); border-radius: var(--r-s); background: var(--c-surface-2); box-shadow: inset 0 0 0 var(--w-trait) var(--c-line); font-size: var(--t-m); line-height: var(--lh-ui); color: var(--c-ink); overflow-wrap: anywhere; }
.lecon-eleve small { display: block; margin-bottom: var(--s-1); font-size: var(--t-xs); color: var(--c-ink-2); }
.lecon-eleve p { margin: 0 0 var(--s-2); }
.lecon-eleve p:last-child { margin-bottom: 0; }
/* Le verdict : ocre (incomplet), vert de gris (juste), terre (à reprendre). Toujours un mot et un repère. */
.lecon-eval { display: grid; gap: var(--s-2); margin: 0 0 var(--s-5); padding: var(--s-4); border-radius: var(--r-m); background: var(--c-ocre-soft); font-family: var(--font-texte); font-size: var(--t-m); line-height: var(--lh-ui); color: var(--c-ink); }
.lecon-eval__verdict { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); margin: 0; color: var(--c-ocre); font-weight: var(--fw-fort); }
.lecon-eval__verdict > span { font-family: var(--font-titre); font-size: var(--t-l); }
.lecon-eval__verdict small { font-size: var(--t-s); font-weight: var(--fw-moyen); color: var(--c-ink-2); }
.lecon-eval--juste { background: var(--c-vert-soft); }
.lecon-eval--juste .lecon-eval__verdict { color: var(--c-vert); }
.lecon-eval--faux { background: var(--c-terre-soft); }
.lecon-eval--faux .lecon-eval__verdict { color: var(--c-terre); }
.lecon-eval__bloc b { font-size: var(--t-s); }
.lecon-eval__bloc ul { margin: var(--s-1) 0 0; padding-left: var(--s-5); }

/* Le bilan */
.prof-bilan { display: flex; flex-direction: column; gap: var(--s-3); font-size: var(--t-m); line-height: var(--lh-ui); color: var(--c-ink); }
.prof-bilan h3 { margin: var(--s-4) 0 0; font-family: var(--font-titre); font-size: var(--t-l); font-weight: var(--fw-titre); color: var(--c-ink); }
.prof-bilan p, .prof-bilan ul { margin: 0; }
.prof-bilan ul { padding-left: var(--s-5); }
.prof-bilan__niveau { font-family: var(--font-titre); font-size: var(--t-xl); line-height: var(--lh-titre); }
.prof-bilan__chiffres { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-3); }
.prof-bilan__chiffres div { display: flex; flex-direction: column; gap: var(--s-1); padding: var(--s-3) var(--s-4); border-radius: var(--r-m); background: var(--c-surface-2); box-shadow: inset 0 0 0 var(--w-trait) var(--c-line); min-width: 0; }
.prof-bilan__chiffres b { font-family: var(--font-titre); font-size: var(--t-2xl); line-height: var(--lh-serre); font-variant-numeric: lining-nums tabular-nums; }
.prof-bilan__chiffres span { font-size: var(--t-xs); color: var(--c-ink-2); }
.prof-bilan__parties { font-size: var(--t-s); }

/* Fenêtres plus étroites : le plan s'ouvre en feuille, la leçon prend toute la largeur, les gestes défilent. */
@media (max-width: 1099px) {
  .prof__corps { grid-template-columns: minmax(0, 1fr); }
  .prof__corps > .prof__plan { display: none; }
  .prof__voir-plan { display: inline-flex; }
}
/* Téléphone : la séance défile comme une page (l'en-tête part avec le texte), les gestes et la réponse restent
   collés en bas, au-dessus de la barre de navigation (Atlas : .actions-prof). */
@media (max-width: 767px) {
  .prof--seance, :root[data-ile="bas"] .prof--seance { height: auto; min-height: 0; padding: var(--s-3) var(--s-4) 0; gap: var(--s-3); }
  .prof__corps, .prof__lecon { display: block; }
  .prof__fil { overflow: visible; padding: var(--s-5) 0 var(--s-6); }
  .prof__pied { position: sticky; bottom: 0; z-index: var(--z-barre); margin: 0 calc(var(--s-4) * -1); padding: var(--s-3) var(--s-4); }
  /* Le pied descend sous la barre de navigation : son fond la prolonge, aucun texte ne passe entre les deux. */
  :root[data-ile="bas"] .prof__pied { margin-bottom: calc((var(--size-dock-espace) + env(safe-area-inset-bottom, 0px)) * -1); padding-bottom: calc(var(--s-3) + var(--size-dock-espace) + env(safe-area-inset-bottom, 0px)); }
  .prof__tete { grid-template-columns: minmax(0, 1fr); gap: var(--s-3); padding-bottom: var(--s-3); }
  .prof__visage { width: var(--s-10); height: var(--s-10); }
  .prof__titre { font-size: var(--t-xl); }
  .prof__outils { justify-content: flex-start; }
  .prof-sentier .sentier__pied { display: none; }
  .prof__mot-long, .prof__bascule > span:last-child { display: none; }
  .prof__bascule { min-width: var(--size-cible); justify-content: center; }
  .prof__ou { gap: 0; }
  .prof-ou__titre { font-size: var(--t-xl); }
  .prof__fil { padding-right: 0; }
  .lecon { padding-right: 0; padding-top: var(--s-10); }
  .lecon__lire { top: 0; }
  .prof__gestes { flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; margin: 0 calc(var(--s-4) * -1); padding: 0 var(--s-4); scrollbar-width: none; }
  .prof__gestes::-webkit-scrollbar { display: none; }
  .prof__examen { grid-template-columns: minmax(0, 1fr); }
  .prof__modes { grid-template-columns: minmax(0, 1fr); }
  .prof-bilan__chiffres { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Animations réduites (réglage ou système) : le chemin se pose d'un coup, la leçon apparaît en fondu, sans se déplacer
   (jetons --d-chemin, --rise-*, --scale-* et --d-pas, section Atlas de studyos-tokens.css). */
:root[data-mouvement-reduit] :is(.prof-mode, .prof__mode, .plan__notion, .prof__micro):active { transform: none; }
@media (prefers-reduced-motion: reduce) { :is(.prof-mode, .prof__mode, .plan__notion, .prof__micro):active { transform: none; } }


/* ---------- Réorganiser un cours ---------- */
.reorg-grille { display: grid; grid-template-columns: minmax(15rem, 19rem) minmax(0, 1fr); gap: var(--s-8); align-items: start; }
.reorg-pilote { position: sticky; top: var(--s-6); max-height: calc(100dvh - var(--s-12)); overflow-y: auto; }
/* Dans un panneau à hauteur limitée, rien ne doit s'écraser (le bouton principal disparaissait). */
.reorg-pilote > * { flex-shrink: 0; }
.reorg-barre { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; margin: calc(-1 * var(--s-6)) calc(-1 * var(--s-6)) var(--s-2); padding: var(--s-3) var(--s-6);
  border-bottom: var(--size-filet) solid var(--c-line); border-radius: var(--r-xl) var(--r-xl) 0 0; background: var(--c-editor, var(--c-card)); }
.reorg-barre p { flex: 1; min-width: 12rem; margin: 0; font: var(--t-small); color: var(--c-ink-2); }
.reorg-attente { display: flex; align-items: center; gap: var(--s-3); margin: 0; font: var(--t-small); color: var(--c-ink-2); }
.reorg-sommaire { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-1); }
.reorg-sommaire a { display: block; padding: var(--s-1) var(--s-2); border-radius: var(--r-sm); color: var(--c-ink); text-decoration: none; font: var(--t-small); }
.reorg-sommaire a:hover { background: var(--c-sunken); }
.reorg-sommaire__n1 a { font-weight: 700; }
.reorg-sommaire__n2 a { padding-left: var(--s-5); }
.reorg-sommaire__n3 a { padding-left: var(--s-8); color: var(--c-ink-2); }
.reorg-texte { min-width: 0; display: flex; flex-direction: column; gap: var(--s-2); padding: var(--s-6); border-radius: var(--r-xl); background: var(--c-editor, var(--c-card)); border: var(--size-filet) solid var(--c-line); }
.reorg-titre { display: grid; grid-template-columns: 9rem minmax(0, 1fr) auto; gap: var(--s-2); align-items: center; margin: var(--s-4) 0 var(--s-1); padding: var(--s-2); border-radius: var(--r-md); background: var(--c-accent-wash); border-left: var(--s-1) solid var(--c-accent); }
.reorg-titre--n2 { margin-left: var(--s-6); }
.reorg-titre--n3 { margin-left: var(--s-12); border-left-color: var(--c-line-strong); background: var(--c-sunken); }
.reorg-titre__texte { font-weight: 600; }
.reorg-titre--n1 .reorg-titre__texte { font-size: 1.05em; }
.reorg-titre__actions { display: inline-flex; gap: 0; }
.reorg-titre__actions .sty-icon-btn { width: var(--s-8); height: var(--s-8); min-width: 0; min-height: 0; }
.reorg-bloc { position: relative; padding: var(--s-1) var(--s-2) var(--s-1) var(--s-3); border-radius: var(--r-sm); }
.reorg-bloc:hover, .reorg-bloc:focus-within { padding-right: calc(var(--s-16) + var(--s-8)); }
.reorg-bloc p { margin: 0; font: var(--t-small); color: var(--c-ink-2); }
.reorg-bloc:hover { background: var(--c-sunken); }
.reorg-bloc--imp p { color: var(--c-ink); }
.reorg-bloc--imp p { background: var(--c-surligne, transparent); }
.reorg-bloc--h1 p, .reorg-bloc--h2 p, .reorg-bloc--h3 p { color: var(--c-ink-3); font-style: italic; }
.reorg-bloc--li p { padding-left: var(--s-3); }
.reorg-bloc__etiquette { display: inline-block; margin-right: var(--s-2); padding: 0 var(--s-2); border-radius: var(--r-pill); background: var(--c-tile); font: var(--t-micro); font-style: normal; color: var(--c-ink-3); }
.reorg-bloc__plus { position: absolute; right: var(--s-1); top: var(--s-1); display: inline-flex; align-items: center; gap: var(--s-1); padding: var(--s-1) var(--s-2); border: var(--size-filet) solid var(--c-line); border-radius: var(--r-pill); background: var(--c-card); color: var(--c-accent-text); font: var(--t-micro); font-weight: 600; cursor: pointer; opacity: 0; transition: opacity var(--d-press) ease; white-space: nowrap; }
.reorg-bloc:hover .reorg-bloc__plus, .reorg-bloc__plus:focus-visible { opacity: 1; }
.reorg-progression { max-width: 40rem; }
.pptx__parties-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-3); }
.reorg-controles { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-2); }
.reorg-controles li { display: flex; gap: var(--s-2); align-items: flex-start; padding: var(--s-3); border-radius: var(--r-md); font: var(--t-small); }
.reorg-controles .sty-icon { flex: none; margin-top: 0.15em; }
.reorg-controles--ok { background: var(--c-ok-soft); color: var(--c-ok-strong); }
.reorg-controles--attention { background: var(--c-warn-soft); color: var(--c-warn-strong); }
.reorg-termes summary { cursor: pointer; font: var(--t-small); font-weight: 600; color: var(--c-ink); }
.reorg-termes ul { margin: var(--s-2) 0; padding-left: var(--s-5); font: var(--t-small); color: var(--c-ink-2); display: flex; flex-direction: column; gap: var(--s-1); }
.reorg-termes s { color: var(--c-ink-3); }
.reorg-page { min-width: 0; }
.reorg-resultat { outline: none; min-height: 60vh; }
.reorg-resultat:focus-visible { box-shadow: inset 0 0 0 var(--size-filet-epais) var(--c-accent); }
@media (max-width: 1023px) {
  .reorg-grille { grid-template-columns: minmax(0, 1fr); }
  .reorg-pilote { position: static; max-height: none; }
}
@media (max-width: 640px) {
  .reorg-titre { grid-template-columns: minmax(0, 1fr); }
  .reorg-titre--n2, .reorg-titre--n3 { margin-left: 0; }
  .reorg-texte { padding: var(--s-4); }
  .reorg-bloc__plus { position: static; transform: none; opacity: 1; margin-bottom: var(--s-1); }
}

@media (max-width: 1023px) {
  .direct__apercu { position: static; }
  .direct__grille, .pptx__grille { grid-template-columns: minmax(0, 1fr); }
  .direct__pilote, .pptx__parties { position: static; }
  .direct__page, .pptx__rendu { padding: var(--s-6); }
}
@media (max-width: 640px) {
  .atelier-etapes, .atelier-choix { grid-template-columns: minmax(0, 1fr); }
  .atelier-carte { padding: var(--s-5); }
  .atelier-tete { gap: var(--s-4); }
  .atelier-tete--visage { flex-direction: column; align-items: flex-start; }
  .atelier-tete__visage { width: var(--s-16); height: var(--s-16); }
  .atelier { gap: var(--s-6); }
  .atelier-form > li { grid-template-columns: minmax(0, 1fr); }
  .atelier-form > li::before, .atelier-form__n { display: none; }
  .atelier-form > li + li { padding-top: var(--s-5); border-top: var(--size-filet) solid var(--c-line); }
  .prof-mode { padding: var(--s-3); }
  .atelier-page__corps { padding: var(--s-5); }
  .atelier-page__cours { display: none; }
  .prof__champs, .prof__modes { grid-template-columns: minmax(0, 1fr); }
}
:root[data-mouvement-reduit] :is(.direct__point, .pptx-partie__n, .prof__micro--actif, .direct-notes__attente span, .atelier-curseur) { animation: none !important; }
@media (prefers-reduced-motion: reduce) { :is(.direct__point, .pptx-partie__n, .prof__micro--actif, .direct-notes__attente span, .atelier-curseur) { animation: none !important; } }
