:root{
  --bg:#f4f6f8;--surface:#fff;--text:#1f2933;--muted:#667085;--line:#d9e0e7;
  --primary:#234b72;--primary2:#183754;--danger:#b42318;--success:#067647;
  --radius:16px;--shadow:0 8px 24px rgba(16,24,40,.06);
  /* V0.18.11.27 — tons neutres des panneaux. Valeurs reprises a l'identique
     des littéraux qu'elles remplacent : les thèmes clairs ne bougent pas. */
  --tone-soft:#f8fafc;--tone-panel:#eef2f6;--tone-chip:#e9eef4;
  /* V0.18.11.27 — la couleur du texte qui accompagne le fond accent. Elle est
     declaree ICI, a cote du fond, et non dans une regle de theme a part : une
     variante qui se donne son propre fond (.delete-button, .drag-handle...) se
     donne aussi sa propre couleur, et doit pouvoir gagner par simple
     specificite. C'est ce qui manquait en V0.18.11.26. */
  --on-primary:#fff;
  /* V0.18.11.27 — le survol, DERIVE du theme au lieu d'etre ecrit en dur.
     Les feuilles contenaient huit gris bleutes differents pour dire la meme
     chose : « un peu plus marque que le panneau ». Ecrits en clair, ils
     rendaient le survol LUMINEUX en mode nuit, sous un texte reste clair : le
     libelle disparaissait sous le curseur. Un defaut qu'aucun balayage de page
     ne peut voir, puisqu'il faut survoler pour le produire.
     Exprime ainsi, le survol se recalcule dans chaque theme.
     V0.18.11.65 — mais PAS dans le papier : une variable qui en cite d'autres
     est resolue la ou elle est declaree (ici, sur la racine, avec les couleurs
     du theme), puis heritee telle quelle. Redeclarer --primary et --surface
     sur le papier ne la change pas : il faut la redeclarer elle-meme, ce que
     fait desormais la palette du papier (themes.css).
     Hors du papier, elle ne vaut que pour un element dont le REPOS suit lui
     aussi les jetons : sous un fond de repos ecrit en dur, le survol s'ecrit en
     dur. (Dans le papier, les jetons valent la palette claire dans tous les
     themes : le survol y est juste sous un repos clair ecrit en dur.) */
  --tone-hover:color-mix(in srgb,var(--primary) 9%,var(--surface))
}
*{box-sizing:border-box}
body{margin:0;font-family:Inter,system-ui,-apple-system,"Segoe UI",sans-serif;background:var(--bg);color:var(--text)}
a{color:inherit;text-decoration:none}
.topbar{min-height:64px;background:var(--surface);border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:12px 24px;position:sticky;top:0;}
.topbar nav{display:flex;gap:18px;font-size:.95rem;flex-wrap:wrap;justify-content:flex-end}
.container{max-width:1180px;margin:0 auto;padding:32px 20px 56px}
.footer{text-align:center;color:var(--muted);padding:18px;font-size:.85rem}
.card,.auth-card{display:block;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);padding:22px;margin-bottom:18px}
.auth-card{max-width:420px;margin:8vh auto}
.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:18px}
.stat{font-size:1.8rem;font-weight:800;display:block;margin-bottom:4px}
.hero{display:flex;align-items:flex-start;justify-content:space-between;gap:20px}
/* V0.18.12.107 — un titre sans espace (un nom de fichier : « terminale_specialite_loi_binomiale….apcourse », page « Vérifier l'import ») ne peut se couper nulle part : l'élément flex qui le porte refusait de rétrécir (min-width:auto) et la page dépassait de l'écran sur un téléphone. */
h1,h2,h3{overflow-wrap:anywhere}
.eyebrow{font-size:.8rem;text-transform:uppercase;letter-spacing:.08em;color:var(--primary);font-weight:800}
h1{margin:.15em 0 .35em;font-size:clamp(1.8rem,4vw,2.6rem)}
h2{margin-top:0}h3{margin:0}
.muted,.meta{color:var(--muted)}.meta{font-size:.9rem}
label{display:block;font-weight:650;margin:14px 0 6px}
input,select,textarea{width:100%;padding:11px 12px;border:1px solid var(--line);border-radius:10px;background:var(--surface);font:inherit;margin-top:6px}
textarea{resize:vertical}
button,.button{display:inline-block;border:0;border-radius:10px;background:var(--primary);color:var(--on-primary);padding:11px 16px;font-weight:750;cursor:pointer;margin-top:14px}
/* V0.18.12.106 — « display » l'emportait sur l'attribut hidden : TOUT bouton écrit « hidden » (« Arrêter la file », « Analyser et insérer dans un cours », « Demander au navigateur de protéger… », « ⌨ Clavier mathématique »…) restait affiché, quoi que dise le script qui le montre ou le cache. */
button[hidden],.button[hidden]{display:none!important}
/* V0.18.12.107 — un mot trop long pour la ligne (un nom de fichier « terminale_specialite_loi_binomiale….apcourse », une adresse comme « index.php?page=admin&section=maintenance&sans_reference=1 ») ne peut se couper nulle part : sur un téléphone il dépassait de l'écran. 
   « break-word » le coupe SEULEMENT quand il ne tient pas, sans changer la largeur d'un tableau ni d'un bloc (« anywhere » le ferait) ; les titres (« anywhere » : leur largeur minimale devient celle d'une lettre, ce qui laisse rétrécir l'élément d'une rangée « .hero » qui les porte) se coupent n'importe où. */
body{overflow-wrap:break-word}
button:hover,.button:hover{background:var(--primary2)}
button:disabled{opacity:.45;cursor:not-allowed}
.button.secondary{background:var(--tone-chip);color:var(--primary);margin-top:0}
.inline-form{display:flex;gap:10px;align-items:flex-end}
.inline-form input{flex:1}.inline-form button{margin-top:6px}
.flash{padding:12px 14px;border-radius:10px;margin-bottom:16px}.flash.error{background:color-mix(in srgb,var(--danger) 9%,var(--surface));color:var(--danger)}.flash.success{background:color-mix(in srgb,var(--success) 9%,var(--surface));color:var(--success)}
ul{padding-left:20px}
.two-columns{display:grid;grid-template-columns:minmax(0,2fr) minmax(260px,1fr);gap:22px;align-items:start}
.sticky-card{position:sticky;top:88px}
.badge{display:inline-flex;background:var(--tone-chip);color:var(--primary);border-radius:999px;padding:5px 9px;font-size:.78rem;font-weight:800}
.session-number{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:var(--tone-chip);color:var(--primary);font-weight:800;flex:0 0 auto}
.assignment-row,.dashboard-row,.progress-row{display:flex;justify-content:space-between;align-items:center;gap:14px;border-top:1px solid var(--line);padding:12px 0}
.assignment-row:first-of-type,.dashboard-row:first-of-type{border-top:0}
.assignment-row form{margin:0}.small-button{margin:0;padding:8px 10px;font-size:.85rem}
.status{font-size:.8rem;font-weight:800;border-radius:999px;padding:5px 8px}.status.done{background:color-mix(in srgb,var(--success) 9%,var(--surface));color:var(--success)}
.backlink{color:var(--primary);font-weight:700}
.progress-header,.section-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:16px}
.section-heading a{color:var(--primary);font-weight:700}
.progress-row{align-items:center}.progress-actions{display:flex;gap:8px;align-items:center}.progress-actions select{margin:0;min-width:125px}
.editor-layout{grid-template-columns:minmax(0,2.1fr) minmax(280px,.9fr);align-items:start}
.lesson-block{background:var(--surface);border:1px solid var(--line);border-left:5px solid #7b8da0;border-radius:14px;padding:16px;margin-bottom:14px;box-shadow:var(--shadow)}
.block-head{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:10px}
.block-type{font-weight:800;color:var(--primary);margin-right:8px}
.visibility{font-size:.78rem;color:var(--muted)}
.block-tools{display:flex;gap:5px}.block-tools form{margin:0}
.icon-button{margin:0;padding:6px 9px;background:var(--tone-chip);color:var(--primary)}
.icon-button:hover{background:var(--tone-hover)}
.block-edit-row{display:flex;gap:10px;align-items:center;margin-top:8px;flex-wrap:wrap}
/* V0.18.12.94 — la largeur d'un bloc : une pastille « ½ », « ⅓ », « ⅔ » dans l'en-tête du bloc, dans l'éditeur */
.block-width-pill{display:inline-block;margin-left:6px;padding:0 8px;border:1px solid var(--line);border-radius:999px;font-size:.82rem;font-weight:800;line-height:1.5;color:var(--primary);background:var(--surface)}
.block-edit-row select{margin:0;flex:1}
.lesson-block textarea{margin-top:0}
.lesson-block>form{margin:0}
.delete-button{background:transparent;color:var(--danger);padding:5px 0;margin-top:8px}
.delete-button:hover{background:transparent;text-decoration:underline}
.block-learning_objective{border-left-color:#3567a8}
.block-definition{border-left-color:#7a4ea3}
.block-document{border-left-color:#8a6d1f}
.block-question{border-left-color:#277e78}
.block-activity,.block-exercise{border-left-color:#a85a2f}
.block-summary,.block-written_trace{border-left-color:#3a7b52}
.block-teacher_note,.block-correction{border-left-color:#b42318}
.block-homework{border-left-color:#5d5fef}
@media(max-width:800px){
  .topbar{padding:10px 14px;align-items:flex-start;gap:10px}.topbar nav{gap:10px;font-size:.83rem}
  .two-columns,.editor-layout{grid-template-columns:1fr}.sticky-card{position:static}
  .progress-row{align-items:flex-start;flex-direction:column}.progress-actions{width:100%}.progress-actions select{flex:1}
}
@media(max-width:520px){.hero{display:block}.hero .button{margin-top:10px}
  .block-edit-row{flex-direction:column;align-items:stretch}
}


.edit-row{display:grid;grid-template-columns:1fr auto auto;gap:8px;align-items:center;border-top:1px solid var(--line);padding:10px 0}
.class-edit-row{grid-template-columns:1fr 1fr auto auto}
.edit-row input,.edit-row select{margin:0}
.delete-small{margin:0;padding:8px 10px;background:transparent;color:var(--danger);border:1px solid #f0b9b4}
.delete-small:hover{background:color-mix(in srgb,var(--danger) 9%,var(--surface))}
.chapter-edit-form{max-width:760px;margin-top:12px}
.title-input{font-size:1.5rem;font-weight:800}
.session-edit-card{display:grid;gap:12px;align-items:center}
.session-edit-form{grid-template-columns:minmax(220px,1fr) 100px auto auto auto;}
.session-edit-form input{margin:0}
.small-link{color:var(--primary);font-weight:700;white-space:nowrap}
.block-type-select{margin:0 0 8px}
@media(max-width:800px){
  .edit-row,.class-edit-row{grid-template-columns:1fr}
  .session-edit-form{grid-template-columns:1fr}
}


.preview-actions{display:flex;gap:10px;flex-wrap:wrap;margin:0 0 22px}
.preview-topbar{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:18px}
.preview-switch{display:inline-flex;border:1px solid var(--line);border-radius:10px;overflow:hidden;background:var(--surface)}
.preview-switch a{padding:8px 12px;color:var(--muted);font-weight:700}
.preview-switch a.active{background:var(--primary);color:var(--on-primary)}
/* V0.18.12.154 (D5-01) — contrôle avant projection : prêt (jeton --success) ou points à voir (jetons d'avertissement du thème). */
.pre-projection-check{margin:0 0 18px;padding:10px 14px;border:1px solid var(--line);border-radius:10px;background:var(--tone-soft)}
.pre-projection-check summary{cursor:pointer;font-weight:700;color:var(--success)}
.pre-projection-check.has-alertes{border-color:color-mix(in srgb,var(--theme-warning-text,#8a6200) 45%,var(--line));background:var(--theme-warning-bg,#fff2c9)}
.pre-projection-check.has-alertes summary{color:var(--theme-warning-text,#8a6200)}
.pre-projection-check-liste{list-style:none;margin:10px 0 0;padding:0;display:grid;gap:8px}
.pre-projection-check-liste li{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:10px;padding:8px 0;border-top:1px solid var(--line)}
.pre-projection-check-actions{display:flex;gap:8px;flex-wrap:wrap}
.pre-projection-check-actions form{display:inline-block;margin:0}
.pre-projection-check-actions .button,.pre-projection-check-actions button{margin:0}
.course-document{max-width:900px;margin:0 auto;background:#fff;border:1px solid var(--line);box-shadow:var(--shadow);padding:42px 48px;border-radius:8px}
.course-document-header{border-bottom:2px solid var(--primary);padding-bottom:18px;margin-bottom:28px}
.course-document-header h1{font-size:2rem;margin:.25em 0}
.document-kicker{font-weight:700;color:var(--muted);margin:10px 0 0}
.document-version{font-size:.85rem;color:var(--muted);margin-bottom:0}
/* V0.18.12.42 — imprimer un extrait : 🖨 sur chaque titre de l'aperçu, choix d'une plage, ligne « Extrait — … ». */
.preview-print-part{margin-left:.45em;font-size:.7em;text-decoration:none;opacity:.5;vertical-align:middle;transition:opacity .15s;-webkit-user-select:none;user-select:none}
.course-heading:hover .preview-print-part,.preview-print-part:focus-visible{opacity:1}
@media (hover:none){.preview-print-part{opacity:.8}}
@media (pointer:coarse){.preview-print-part{display:inline-block;min-width:36px;min-height:36px;line-height:36px;text-align:center;margin-block:-10px}}
body.projection-mode .preview-print-part,body.print-range-mode .preview-print-part{display:none!important}
body.print-range-mode .course-document [data-preview-block-id],body.print-range-mode .course-document [data-preview-block-id]+.course-heading-body{cursor:pointer}
/* Une vidéo intégrée ne reçoit plus les clics le temps du choix : ils vont au bloc (et elle ne démarre pas). */
body.print-range-mode .course-document iframe{pointer-events:none}
body.print-range-mode .course-document [data-preview-block-id]:focus-visible{outline:3px dashed var(--primary,#234b72);outline-offset:3px}
/* Le bandeau prend la place de la boîte « Fin de séance » et de la note de reprise (la règle tablette
   de course-preview-tablet.css impose visibility:visible !important : spécificité supérieure). */
body[data-page="chapter_preview"].print-range-mode .teaching-marker-widget[data-teaching-marker-widget],
body.print-range-mode .rappel-reprise{visibility:hidden!important}
body.print-range-mode .teaching-stop-preview-indicator{display:none!important}
/* Plus spécifique que .rendered-block, les fonds par type et le repère de fin de séance ; la teinte
   passe par background-image pour garder le fond propre du bloc. */
body.print-range-mode .course-document .print-range-selected{outline:2px solid var(--primary,#234b72);outline-offset:3px;background-image:linear-gradient(color-mix(in srgb,var(--primary,#234b72) 9%,transparent),color-mix(in srgb,var(--primary,#234b72) 9%,transparent))}
body.print-range-mode .course-document .print-range-start,body.print-range-mode .course-document .print-range-end{outline-width:3px}
.print-range-banner{position:fixed;left:16px;right:16px;bottom:calc(16px + env(safe-area-inset-bottom,0px));margin:0 auto;width:fit-content;max-width:760px;box-sizing:border-box;z-index:2650;display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:10px 14px;border-radius:10px;background:var(--surface,#fff);color:var(--text,#1f2933);border:1px solid var(--line,#d9e0e7);box-shadow:0 6px 24px rgba(0,0,0,.18)}
.print-range-message{flex:1 1 260px}
.print-extract-label{font-weight:700;margin:.2rem 0 .1rem}
.print-extract-label p,.print-extract-label div{display:inline;margin:0}
.print-extract-label p+p::before,.print-extract-label div+div::before{content:" "}
.print-extract-note{max-width:210mm;margin:0 auto 10px;padding:8px 12px;border-radius:8px;background:var(--tone-soft,#f8fafc);border:1px solid var(--line,#d9e0e7);font-size:.9rem}
.print-extract-note a{margin-left:.5em}
.rendered-session{margin:0 0 42px}
.rendered-session>h2{border-bottom:1px solid var(--line);padding-bottom:8px;margin-bottom:18px}
.rendered-block-label{font-size:.78rem;text-transform:uppercase;letter-spacing:.04em;font-weight:800;color:var(--primary);}
.rendered-block-content{line-height:1.55}
.rendered-definition{border-left-color:#7a4ea3}
.rendered-question{border-left-color:#277e78}
.rendered-activity,.rendered-exercise{border-left-color:#a85a2f}
.rendered-summary,.rendered-written_trace{border-left-color:#3a7b52}
.rendered-teacher_note,.rendered-correction{border-left-color:#b42318}
.rendered-homework{border-left-color:#5d5fef}
.teacher-only{background:#fff6f5}
.format-toolbar{gap:5px;margin:8px 0 6px}
.format-toolbar button{margin:0;width:34px;height:30px;padding:0;background:var(--tone-panel);color:var(--text);border:1px solid var(--line)}
.format-toolbar button:hover{background:var(--tone-hover)}
.format-help{font-size:.78rem;color:var(--muted);margin:4px 0 0}
@media(max-width:700px){
  .course-document{padding:24px 20px}
  .preview-topbar{align-items:flex-start;flex-direction:column}
}
@media print{
  body{background:#fff}
  .topbar,.footer,.no-print,.flash{display:none!important}
  .container{max-width:none;padding:0}
  .course-document{max-width:none;border:0;box-shadow:none;padding:0;border-radius:0}
}


.hidden{display:none!important}
.checkbox-label{display:flex;gap:8px;align-items:center;font-weight:600}
.checkbox-label input{width:auto;margin:0}
.table-editor{border:1px solid var(--line);border-radius:10px;padding:10px;margin-top:8px;overflow:auto}
.table-editor-row{margin-bottom:6px;}
.table-editor-row input{margin:0}
.table-editor-actions{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px}
.course-table{width:100%;border-collapse:collapse;margin:8px 0}
.course-table th,.course-table td{border:1px solid #aeb8c2;padding:8px 10px;vertical-align:top;text-align:left}
.course-table th{background:var(--tone-panel);font-weight:800}
.table-scroll{overflow-x:auto}
.definition-term{font-weight:800;margin-bottom:6px}
.definition-text{line-height:1.55}
.rendered-definition .definition-term::after{content:" :"}
.rendered-text{background:transparent;border-left:0;padding:0}
.course-toc{border:1px solid var(--line);background:#fafbfc;border-radius:8px;padding:18px 20px;margin:0 0 30px}
.course-toc h2{margin:0 0 12px}
.course-toc a{display:block;padding:4px 0;color:var(--text)}
.course-toc a:hover{text-decoration:underline}
.course-toc .toc-level-2{padding-left:22px}
.course-toc .toc-level-3{padding-left:44px}
.course-heading{scroll-margin-top:90px;color:var(--text)}
.heading-level-1{font-size:1.55rem;margin:34px 0 16px;border-bottom:2px solid var(--primary);padding-bottom:7px}
.heading-level-2{font-size:1.28rem;margin:26px 0 12px}
.heading-level-3{font-size:1.08rem;margin:20px 0 10px}
.heading-number{color:var(--primary);margin-right:6px}
.session-title{margin-top:36px}
.lesson-block.block-heading_1,.lesson-block.block-heading_2,.lesson-block.block-heading_3{border-left-color:var(--primary)}
.lesson-block.block-text{border-left-color:#aab4bf}
@media print{
  .course-toc a{color:#000;text-decoration:none}
  .table-scroll{overflow:visible}
}


/* V0.4.2 — éditeur pleine largeur */
.editor-layout{
  display:flex;
  flex-direction:column;
  gap:22px;
}
.editor-layout .add-block-panel{
  order:-1;
  width:100%;
  position:static;
  margin-bottom:0;
}
.editor-layout .block-list{
  width:100%;
}
.add-block-panel form{
  width:100%;
}
.add-block-panel textarea{
  min-height:140px;
}
.add-block-panel .block-editor-definition{
  display:grid;
  grid-template-columns:minmax(220px,.7fr) minmax(320px,1.3fr);
  gap:16px;
}
.add-block-panel .block-editor-definition label{
  margin-top:0;
}
.add-block-panel .block-editor-table{
  width:100%;
}
.table-editor{
  width:100%;
  overflow-x:auto;
}
.table-editor-row{
  display:flex;
  gap:8px;
  width:100%;
  min-width:max-content;
}
.table-editor-row input{
  flex:1 1 180px;
  min-width:180px;
}
.table-editor-actions{
  position:sticky;
  left:0;
  background:var(--surface);
  padding-top:8px;
}
@media(max-width:800px){
  .add-block-panel .block-editor-definition{
    grid-template-columns:1fr;
  }
  .table-editor-row input{
    min-width:150px;
  }
}


/* V0.5.0 — structure pédagogique réelle */
.rendered-official_objectives,
.rendered-prerequisites,
.rendered-problem_statement,
.rendered-sequence_objectives,
.rendered-session_objective{
  border-left-color:#3567a8;
}
.rendered-dossier,
.rendered-document,
.rendered-activity{
  border-left-color:#6d7884;
}
.rendered-key_point .rendered-block-label{
  color:#b42318;
}
.rendered-chapter_summary,
.rendered-summary{
  border-left-color:#56834f;
}
.rendered-vocabulary{
  border-left-color:#6f7f8d;
}
.question-text{
  font-weight:700;
  margin-bottom:8px;
}
.answer-lines{
  margin-top:12px;
}
.answer-line{
  height:22px;
  border-bottom:1px dotted #aeb8c2;
}
.block-editor-question{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:12px;
}
.block-editor-question label{
  margin-top:0;
}
.chapter-structure-card{
  margin-top:4px;
}
.chapter-structure-row{
  justify-content:space-between;
  gap:16px;
  padding:12px 0;
  border-top:1px solid var(--line);
}
.chapter-structure-row:first-of-type{
  border-top:0;
}
.chapter-add-details{
  margin-top:14px;
  border-top:1px solid var(--line);
  padding-top:14px;
}
.chapter-add-details summary{
  cursor:pointer;
  color:var(--primary);
  font-weight:800;
}
.chapter-block-form{
  margin-top:14px;
}


/* V0.5.1 — édition et réordonnancement de la structure du chapitre */
.chapter-structure-row{
  display:grid;
  grid-template-columns:34px minmax(0,1fr);
  align-items:start;
}
.chapter-structure-content{
  min-width:0;
}
.chapter-structure-summary{
  display:flex;
  justify-content:space-between;
  gap:20px;
  align-items:flex-start;
}
.chapter-structure-actions{
  display:flex;
  gap:8px;
  align-items:center;
  flex:0 0 auto;
}
.chapter-structure-actions form{
  margin:0;
}
.drag-handle{
  width:28px;
  min-width:28px;
  height:38px;
  padding:0;
  margin:0;
  border:0;
  background:transparent;
  color:var(--muted);
  cursor:grab;
  font-size:1.15rem;
  letter-spacing:-3px;
}
/* V0.18.10.75 — touch-action:none appliqué uniquement aux appareils à pointeur
   tactile principal (pointer:coarse) : sur certains PC (pointeur souris/pavé
   tactile fin passant par le même pipeline gestuel que le tactile), cette
   propriété empêchait Chrome de déclencher le glisser-déposer HTML5 natif à
   la souris — régression constatée après V0.18.10.71. */
@media (pointer: coarse) {
  .drag-handle{
    touch-action:none;
    user-select:none;
  }
}
.drag-handle:hover{
  background:transparent;
  color:var(--primary);
}
.draggable-structure-row.dragging{
  opacity:.45;
}
.draggable-structure-row.drag-over{
  border-top:3px solid var(--primary);
}
.chapter-block-edit-form{
  margin-top:14px;
  padding:14px;
  background:var(--tone-soft);
  border:1px solid var(--line);
  border-radius:10px;
}
.chapter-block-edit-form label:first-of-type{
  margin-top:0;
}
.chapter-edit-buttons{
  display:flex;
  gap:8px;
  align-items:center;
  margin-top:12px;
}
.chapter-edit-buttons .button{
  margin:0;
  padding:8px 10px;
  font-size:.85rem;
}
.reorder-status{
  min-height:22px;
  margin-top:6px;
  color:var(--primary);
}
@media(max-width:700px){
  .chapter-structure-summary{
    flex-direction:column;
  }
  .chapter-structure-actions{
    width:100%;
  }
}


.wysiwyg-toolbar{position:sticky;display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:46px;padding:6px max(20px,calc((100vw - 1180px)/2 + 20px));background:color-mix(in srgb,var(--surface) 96%,transparent);backdrop-filter:blur(8px);border-bottom:1px solid var(--line);color:var(--muted)}
.wysiwyg-toolbar .toolbar-controls{display:flex;align-items:center;gap:6px;opacity:.35;pointer-events:none}
.wysiwyg-toolbar.active .toolbar-controls{opacity:1;pointer-events:auto}
.wysiwyg-toolbar button{margin:0;width:34px;height:32px;padding:0;background:var(--tone-panel);color:var(--text);border:1px solid var(--line)}
.wysiwyg-toolbar label{display:flex;align-items:center;gap:5px;margin:0;font-size:.8rem}
.wysiwyg-toolbar input[type="color"]{width:34px;height:30px;padding:2px;margin:0}
.wysiwyg-toolbar select{width:auto;min-width:62px;margin:0;padding:6px 8px}
.toolbar-status{font-size:.82rem;white-space:nowrap}
.rich-editor{min-height:92px;width:100%;padding:11px 12px;border:1px solid var(--line);border-radius:10px;background:var(--surface);line-height:1.5;overflow-wrap:anywhere}
.rich-editor:focus{outline:2px solid rgba(35,75,114,.18);border-color:var(--primary)}
.rich-editor-single{min-height:44px}.rich-editor-large{min-height:160px}
/* V0.18.12.35 — listes à puces : même retrait dans l'éditeur et dans le cours (aperçu, rétroprojection, impression). */
.rich-editor :is(ul,ol),.rendered-block-content :is(ul,ol),.course-heading-body :is(ul,ol){margin:.35em 0;padding-left:1.5em}
.rich-editor li,.rendered-block-content li,.course-heading-body li{margin:.15em 0}
.rich-table-cell{min-height:42px;min-width:180px;flex:1 1 180px;border-radius:7px}
.format-toolbar{display:none!important}
.lesson-drag-handle,.session-drag-handle{cursor:grab}
.draggable-session-row.dragging,.draggable-lesson-block.dragging{opacity:.45}
/* V0.18.12.103 — 920 px et non 800 : le choix « Alignement » ajoute 164 px aux commandes ; entre 801 et ~900 px (tablette en portrait) la barre débordait de l'écran. */
@media(max-width:920px){.wysiwyg-toolbar{overflow-x:auto;justify-content:flex-start;padding:6px 12px}.toolbar-status{display:none}.wysiwyg-toolbar .toolbar-controls{min-width:max-content}}

/* V0.6.5 — état actif des commandes WYSIWYG */
.wysiwyg-toolbar button.is-active{
  background:var(--primary);
  color:var(--on-primary);
  border-color:var(--primary);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.15);
}
.wysiwyg-toolbar button[aria-pressed="true"]{
  transform:translateY(1px);
}


/* V0.7.0 — mode Faire cours */
.resume-card{
  border-left:4px solid var(--primary);
}


/* V0.7.1 — édition des titres de chapitre longs */
.chapter-title-editor{
  width:100%;
  min-height:88px;
  height:auto;
  resize:vertical;
  overflow-wrap:anywhere;
  white-space:pre-wrap;
  line-height:1.2;
  padding:16px 18px;
}
@media(max-width:700px){
  .chapter-title-editor{
    min-height:96px;
  }
}

.quick-blocks{display:flex;flex-wrap:wrap;gap:7px;align-items:center;margin-bottom:14px}
.quick-block{width:auto;height:auto;padding:7px 10px;background:var(--tone-panel);color:var(--primary);border:1px solid var(--line);font-size:.82rem}
.quick-block:hover{background:var(--tone-hover)}
.course-separator{border:0;border-top:2px solid var(--line);margin:20px 0}
.course-separator-label{display:flex;align-items:center;gap:12px;margin:20px 0;color:var(--muted);font-weight:700}
.course-separator-label::before,.course-separator-label::after{content:"";height:1px;background:var(--line);flex:1}
/* V0.18.12.189 — le bloc « Séparateur » est une ligne : la section qui la porte n'ajoute ni marge ni rembourrage (ceux de la ligne suffisent) ; à l'impression, elle ne reste pas seule en bas d'une page. */
.rendered-block.rendered-separator{margin:0;padding:0;border:0;background:transparent}   /* .rendered-block (plus bas dans la feuille) a la même spécificité : la double classe l'emporte */
.rendered-block.rendered-separator .rendered-block-content{margin:0}
.print-course-document .rendered-separator{break-inside:avoid-page;page-break-inside:avoid;break-after:avoid-page;page-break-after:avoid}
.import-item{display:grid;grid-template-columns:30px 95px 250px minmax(0,1fr);gap:12px;align-items:start;padding:14px 0;border-top:1px solid var(--line)}
.import-item:first-child{border-top:0}.import-item-drag{padding-top:30px;cursor:grab;color:var(--muted);font-weight:800}.import-item.dragging{opacity:.4}
.import-check{margin-top:28px;display:flex;align-items:center;gap:6px}.import-check input{width:auto;margin:0}
@media(max-width:850px){.import-item{grid-template-columns:28px 1fr}.import-item-drag{grid-row:1/span 3}.import-check{margin-top:0}.import-item label:not(.import-check){grid-column:2}}


/* V0.8.1 — état extraction PDF côté navigateur */
.import-status{
  min-height:24px;
  margin:10px 0 12px;
  font-size:.9rem;
  font-weight:600;
}
.import-status.working{
  color:var(--primary);
}
.import-status.success{
  color:var(--success);
}
.import-status.warning{
  color:var(--theme-warning-text,#9a6700);
}
#import-submit-button:disabled{
  opacity:.55;
}


/* V0.8.2 consolidée — médias et destination */
.import-media-preview{
  width:min(100%,460px);
  object-position:left top;
}
.course-media{
  margin:18px auto;
}
.course-media img{
  display:block;
  max-width:100%;
  max-height:720px;
  object-fit:contain;
  margin:auto;
  border-radius:6px;
}
.course-media figcaption{
  display:flex;
  flex-direction:column;
  gap:3px;
  margin-top:7px;
  font-size:.88rem;
  color:var(--muted);
}
.media-caption{
  color:var(--text);
}
.destination-choice{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
  margin-bottom:18px;
}
.destination-option{
  display:flex;
  align-items:flex-start;
  gap:10px;
  padding:14px;
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--surface);
  cursor:pointer;
}
.destination-option.active{
  border-color:var(--primary);
  box-shadow:0 0 0 2px rgba(35,75,114,.10);
  /* V0.18.12.319.4 — le fond de l'option choisie vient des jetons du thème : le « #f7fafc » écrit en dur restait CLAIR en thème sombre, sous un titre clair (« Créer un nouveau chapitre » presque illisible) */
  background:color-mix(in srgb,var(--primary) 6%,var(--surface));
}
.destination-option input{
  width:auto;
  margin:3px 0 0;
}
.destination-option span{
  display:flex;
  flex-direction:column;
  gap:3px;
}
.destination-option small{
  color:var(--muted);
  line-height:1.3;
}
/* V0.18.12.245 — l'emplacement des blocs dans la séance (proposé par un assistant) : des radios dans leur ligne, jamais à la largeur d'un champ de texte */
.destination-placement{
  margin:14px 0 0;
  padding:10px 14px;
  border:1px solid var(--line);
  border-radius:10px;
}
.destination-placement legend{
  padding:0 6px;
  font-weight:700;
}
.destination-placement label{
  display:flex;
  align-items:baseline;
  gap:8px;
  width:auto;
  margin:6px 0;
  font-weight:400;
}
.destination-placement input{
  width:auto;
  margin:0;
}
.destination-placement p{
  margin:6px 0 0;
}
.destination-panel{
  margin:14px 0 18px;
  padding:16px;
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--tone-soft);
}
@media(max-width:700px){
  .destination-choice{grid-template-columns:1fr}
}


/* V0.9.0 — Import IA OpenAI */
.ai-settings-card{
  max-width:820px;
}
.ai-import-notice{
  margin:10px 0 14px;
  padding:10px 12px;
  background:color-mix(in srgb,var(--primary) 10%,var(--surface));
  border:1px solid #d5e5f2;
  border-radius:9px;
  color:var(--primary);
  font-size:.9rem;
}
.import-ai-content{
  display:grid;
  gap:9px;
}
.import-ai-meta{
  display:flex;
  flex-wrap:wrap;
  gap:8px 12px;
  color:var(--muted);
  font-size:.8rem;
}
.confidence{
  display:inline-block;
  margin-top:6px;
  padding:3px 7px;
  border-radius:999px;
  font-size:.76rem;
  font-weight:700;
}
.confidence-high{
  background:#dff6e7;
  color:#20743a;
}
.confidence-medium{
  background:#fff1c7;
  color:#8b6200;
}
.confidence-low{
  background:#fde5e2;
  color:#a83227;
}
.rendered-block-title{
  margin:4px 0 8px;
  font-size:1.05rem;
  font-weight:800;
  color:var(--text);
}
@media(max-width:850px){
  .ai-import-item{
    grid-template-columns:28px 1fr;
  }
  .ai-import-item .import-ai-content{
    grid-column:2;
  }
}


/* V0.9.1 — import IA asynchrone */
.ai-submit-overlay{
  position:fixed;
  inset:0;
  z-index:9999;
  display:none;
  align-items:center;
  justify-content:center;
  padding:20px;
  background:rgba(245,247,250,.78);
  backdrop-filter:blur(4px);
}
.ai-submit-overlay.visible{
  display:flex;
}
.ai-submit-overlay-card{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:10px;
  width:min(430px,100%);
  padding:28px;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:16px;
  box-shadow:0 16px 48px rgba(31,41,51,.16);
  text-align:center;
}
.ai-submit-overlay-card span{
  color:var(--muted);
  font-size:.9rem;
}
.ai-wait-card{
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
  gap:8px;
  max-width:760px;
  margin:auto;
  padding:38px;
}
.ai-spinner{
  width:42px;
  height:42px;
  border:4px solid #dce6ef;
  border-top-color:var(--primary);
  border-radius:50%;
  animation:ai-spin .85s linear infinite;
}
@keyframes ai-spin{
  to{transform:rotate(360deg)}
}
.ai-wait-card .button-row{
  margin-top:12px;
}
/* V0.18.12.173 — reprendre une analyse en échec : l'étape qui a échoué est relancée, ou sautée (réparation, découpage en séances). */
.import-reprise{
  width:100%;
  margin-top:14px;
  padding:14px 16px;
  border:1px solid var(--line);
  border-radius:10px;
  text-align:left;
}
.import-reprise h3{margin:0 0 6px}
.import-reprise .button-row{justify-content:flex-start;flex-wrap:wrap}
.import-reprise form{margin:0}


/* V0.9.2 — historique des imports */
.import-history-list{
  display:flex;
  flex-direction:column;
}
.import-history-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:14px 0;
  border-top:1px solid var(--line);
}
.import-history-row:first-child{
  border-top:0;
}
.import-history-main{
  min-width:0;
  flex:1;
}
.import-history-title-row{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:8px;
}
.import-history-title-row strong{
  overflow-wrap:anywhere;
}
.import-history-meta{
  display:flex;
  flex-wrap:wrap;
  gap:6px 12px;
  margin-top:5px;
  color:var(--muted);
  font-size:.82rem;
}
.import-history-actions{
  display:flex;
  align-items:center;
  gap:8px;
  flex-shrink:0;
}
.import-history-actions form{
  margin:0;
}
.import-status-badge{
  display:inline-flex;
  align-items:center;
  padding:3px 8px;
  border-radius:999px;
  font-size:.75rem;
  font-weight:800;
}
.import-status-badge.processing{
  background:#e8f1fb;
  color:#235d91;
}
.import-status-badge.review{
  background:#fff2c9;
  color:#8a6200;
}
.import-status-badge.done{
  background:#def5e6;
  color:#21743a;
}
.import-status-badge.failed{
  background:#fde5e2;
  color:#a83227;
}
.import-status-badge.warning{
  background:#fff0dd;
  color:#995b00;
}
.import-history-error{
  margin-top:6px;
  color:var(--danger);
  font-size:.82rem;
}
@media(max-width:760px){
  .import-history-row{
    align-items:flex-start;
    flex-direction:column;
  }
  .import-history-actions{
    width:100%;
  }
}


/* V0.9.3 — séances IA et crops pilotés par bbox */
.import-session-heading{
  display:flex;
  align-items:baseline;
  gap:10px;
  margin:22px 0 4px;
  padding:10px 12px;
  border-left:4px solid var(--primary);
  background:#f3f7fb;
  border-radius:0 8px 8px 0;
}
.import-session-heading span{
  color:var(--muted);
  font-size:.78rem;
  text-transform:uppercase;
  letter-spacing:.05em;
  font-weight:800;
}
.import-session-heading strong{
  font-size:1rem;
}
.ai-crop-box{
  margin:4px 0 8px;
  padding:10px;
  border:1px solid var(--line);
  border-radius:10px;
  background:#fbfcfd;
}
.ai-crop-placeholder{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:120px;
  color:var(--muted);
  font-size:.88rem;
  border:1px dashed var(--line);
  border-radius:8px;
}
.crop-warning{
  color:var(--danger);
  font-weight:700;
}

/* V0.9.5 — contexte pédagogique d'import */
.import-context-grid{
  display:grid;
  grid-template-columns:minmax(260px,1.4fr) 1fr 1fr;
  gap:12px;
  margin-top:14px;
}
.input-with-unit{
  display:flex;
  align-items:center;
  gap:8px;
}
.input-with-unit input{flex:1}
.input-with-unit span{color:var(--muted);font-weight:700}
@media(max-width:850px){
  .import-context-grid{grid-template-columns:1fr}
}


/* V0.9.6 — rendu robuste des blocs importés */
.rendered-block-content:empty{
  display:none;
}
.rendered-block-title{
  line-height:1.35;
}
.rendered-text .rendered-block-title{
  margin-bottom:6px;
}




/* V0.9.8 — préparation contrôlée des visuels */
.import-visual-prep-card{
  border-left:4px solid var(--primary);
}
.import-visual-prep-card button[disabled],
#commit-import-button[disabled]{
  opacity:.55;
  cursor:not-allowed;
}
.import-media-preview{
  display:block;
  max-width:100%;
  max-height:520px;
  object-fit:contain;
  margin:0 auto 10px;
  border-radius:8px;
  border:1px solid var(--line);
  background:var(--surface);
}


/* V0.9.9 — stabilité de la page chapitre */
.two-columns > section,
.two-columns > aside{
  min-width:0;
}

.session-edit-card{
  min-width:0;
  grid-template-columns:34px 40px minmax(0,1fr);
}

.session-edit-card > .meta{
  grid-column:3;
}

.session-edit-form{
  min-width:0;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
}

.session-edit-form input[name="title"]{
  flex:1 1 280px;
  min-width:180px;
}

.session-edit-form input[name="planned_duration_minutes"]{
  flex:0 0 92px;
  width:92px;
}

.session-edit-form .small-button,
.session-edit-form .small-link,
.session-edit-form .delete-small{
  flex:0 0 auto;
}

.sticky-card{
  min-width:0;
  overflow:hidden;
}

.assignment-row{
  min-width:0;
}

.assignment-row > span{
  min-width:0;
  overflow-wrap:anywhere;
}

@media(max-width:800px){
  .session-edit-card{
    grid-template-columns:30px 36px minmax(0,1fr);
  }

  .session-edit-form{
    grid-column:3;
  }

  .session-edit-card > .meta{
    grid-column:3;
  }
}


/* V0.10.0 — niveau pédagogique des chapitres */
.chapter-badges{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:7px;
}

.level-badge{
  background:#edf4fb;
  color:#315d86;
}

/* V0.18.11.28 — meme defaut de cascade que la pastille « A relire » : en 0,1,0,
   cette regle perdait contre « body[data-theme=...] .badge » (0,2,1), si bien
   qu'un chapitre sans niveau — qui sort pourtant du regroupement par programme —
   ne se signalait que dans le theme clair. Corriger « A relire » sans corriger
   celle-ci aurait cree une hierarchie visuelle fausse : le probleme mineur
   visible, le probleme structurel invisible. Meme motif de specificite, famille
   d'avertissement puisqu'il s'agit d'une information manquante, pas d'un rappel
   de relecture. */
.chapter-badges .badge.level-badge.level-missing{
  background:var(--theme-warning-bg,#fff2c9);
  color:var(--theme-warning-text,#8a6200);
  border-color:var(--theme-warning-border,#ecd49d);
}

/* V0.18.10.89 — chapitre issu d'une conversion IA, pas encore relu.

   V0.18.11.28 — la teinte passe au rouge de l'application, et surtout elle est
   desormais DERIVEE du theme. Mesure avant correction : la pastille n'etait
   distincte de ses voisines QUE dans le theme clair. En nuit comme en petrole,
   « body[data-theme=...] .badge » (specificite 0,2,1) ecrasait cette regle
   (0,1,0) : la pastille s'affichait exactement comme « Seconde » ou « SES »,
   c'est-a-dire qu'elle ne signalait plus rien du tout.

   TROIS classes, soit 0,3,0, et ce n'est pas decoratif : a nombre de classes
   superieur la regle l'emporte QUEL QUE SOIT L'ORDRE des feuilles. Une regle en
   0,2,1 posee en fin de themes.css aurait gagne elle aussi — mais seulement tant
   qu'elle y reste la derniere. Le prochain « body[data-theme=...] .badge » ajoute
   plus bas, c'est-a-dire le geste le plus banal dans une feuille de theme, la
   desarmerait en silence. On ne remplace pas une dependance a l'ordre par une
   autre. La contrepartie est que la regle exige le conteneur .chapter-badges,
   present sur les deux rendus (chapters.php:155 et chapter.php:460).

   Fond et texte sont tous deux des variables : le couple ne peut pas se rompre.
   Le texte n'est pas --danger pur mais tire a 85 % vers --text : le rouge de
   petrole (#b84a4a) est clair par nature et donnait 4,42, sous le seuil. Le
   melange l'assombrit en clair et l'eclaircit en nuit — il gagne donc dans les
   deux sens sans exception par theme. Mesures : 6,67 en clair, 5,61 en nuit,
   5,33 en petrole.

   Ce qui signale sans dependre de la couleur, c'est le MOT « A relire » :
   l'anneau interieur ne vaut que 1,6 de contraste contre le fond de la pastille
   et ne saurait tenir lieu de second signal. */
.chapter-badges .badge.chapter-review-badge{
  background:color-mix(in srgb,var(--danger) 9%,var(--surface));
  color:color-mix(in srgb,var(--danger) 85%,var(--text));
  /* Le theme petrole borde TOUS les badges avec une valeur ecrite en dur.
     Sans cette ligne, un liseret bleu-gris subsistait autour de la pastille
     rouge — mesure : rgb(183,208,210), identique a celui des pastilles
     voisines. La ou aucune bordure n'existe (clair, nuit), la declaration ne
     produit rien et la geometrie reste celle des voisines. */
  border-color:color-mix(in srgb,var(--danger) 34%,transparent);
  box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--danger) 34%,transparent);
}
/* V0.18.11.28 — UN ETAT, UNE COULEUR. La pastille « A relire » passe au rouge ;
   cet encadre explique le MEME etat, sept lignes plus bas sur le meme ecran, et
   restait ambre. Deux couleurs pour une seule notion se lisent comme deux
   notions. Il rejoint donc la pastille, en plus pale puisqu'il porte un
   paragraphe et non deux mots. */
.chapter-review-notice{
  margin:10px 0 0;
  padding:12px 14px;
  border:1px solid color-mix(in srgb,var(--danger) 30%,transparent);
  border-radius:11px;
  background:color-mix(in srgb,var(--danger) 6%,var(--surface));color:var(--text);
}
.chapter-review-notice p{margin:0 0 10px;font-size:.9rem;line-height:1.5}
.chapter-review-notice form{margin:0}
.chapter-review-notice button{margin:0}

/* V0.18.10.90 — statut de relecture quand le chapitre est déjà relu : discret,
   puisqu'il ne réclame aucune action. */
.chapter-review-status{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:10px;
  margin:10px 0 0;
  color:var(--muted);
  font-size:.85rem;
}
.chapter-review-status form{margin:0}
.chapter-review-status button{margin:0}

/* V0.10.1 — validation et recadrage manuel */
.visual-review-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}.visual-review-actions button{margin:0}
.visual-status-badge{display:inline-flex;padding:3px 8px;border-radius:999px;font-size:.76rem;font-weight:800}
.visual-status-pending{background:#fff2c9;color:#8a6200}.visual-status-validated{background:#def5e6;color:#21743a}.visual-status-ignored{background:#edf0f3;color:#667085}
.crop-modal{position:fixed;inset:0;z-index:10000;display:flex;align-items:center;justify-content:center;padding:24px}.crop-modal.hidden{display:none!important}
.crop-modal-backdrop{position:absolute;inset:0;background:rgba(16,24,40,.65);backdrop-filter:blur(3px)}
/* V0.18.12.123 — sur téléphone, 100vh est la hauteur AVEC la barre d'adresse rentrée : barre affichée, la fenêtre dépassait de la zone visible (haut ET bas) et ses boutons passaient dessous.
   100dvh suit la zone visible ; max-height:100% borne la fenêtre au conteneur fixe (inset:0 moins sa marge), qui EST la zone visible (même règle que la bibliothèque de composants, V0.18.12.121.1). */
.crop-modal-dialog{position:relative;z-index:1;width:min(1120px,100%);max-height:calc(100vh - 48px);max-height:calc(100dvh - 48px);max-height:100%;overflow:auto;background:var(--surface);border-radius:16px;padding:22px;box-shadow:0 24px 70px rgba(16,24,40,.25)}
.crop-modal-header,.crop-modal-footer{display:flex;justify-content:space-between;gap:16px;align-items:flex-start}.crop-modal-footer{align-items:center;margin-top:16px}
.crop-stage-wrap{overflow:auto;max-height:70vh;padding:10px;border:1px solid var(--line);border-radius:12px;background:var(--tone-panel)}.crop-stage{position:relative;margin:auto;user-select:none;touch-action:none}.crop-stage canvas{display:block;max-width:none}
.crop-selection{position:absolute;border:3px solid #1976d2;background:rgba(25,118,210,.12);cursor:move;touch-action:none;box-shadow:0 0 0 9999px rgba(0,0,0,.18)}
.crop-handle{position:absolute;width:16px;height:16px;border-radius:50%;background:#1976d2;border:2px solid #fff}.crop-handle.nw{left:-9px;top:-9px;cursor:nwse-resize}.crop-handle.ne{right:-9px;top:-9px;cursor:nesw-resize}.crop-handle.sw{left:-9px;bottom:-9px;cursor:nesw-resize}.crop-handle.se{right:-9px;bottom:-9px;cursor:nwse-resize}
body.crop-modal-open{overflow:hidden}@media(max-width:700px){.crop-modal{padding:8px}.crop-modal-dialog{padding:14px}.crop-modal-header,.crop-modal-footer{flex-direction:column}}


/* V0.10.3 — hiérarchie visuelle des blocs de cours */
.rendered-block{
  margin:0 0 18px;
  padding:10px 0;
  border-left:0;
  background:transparent;
  border-radius:0;
}

.rendered-block-label{
  margin-bottom:6px;
}

/* V0.18.12.94 — BLOCS CÔTE À CÔTE (aperçu, rétroprojection). Une rangée = « .block-row » (conteneur de requête) > « .block-row-grid » (six colonnes) ; un bloc seul sur sa ligne
   n'a pas de conteneur. La rangée s'EMPILE d'elle-même quand elle est trop étroite pour des colonnes lisibles (téléphone, tablette debout, rétroprojection très agrandie) :
   c'est la largeur de la rangée qui décide, pas celle de l'écran. Sans requêtes de conteneur (navigateur ancien), les blocs restent empilés. */
.block-row{container-type:inline-size;margin:0}
.block-row-grid{display:block}
.block-row-grid>.rendered-block{margin-bottom:18px;min-width:0}
.block-row-grid>.session-boundary-drop{display:none}
@container (min-width:640px){
  .block-row-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));column-gap:24px;align-items:start;margin-bottom:18px}
  .block-row-grid>.rendered-block{margin-bottom:0}
  .block-row-grid>.block-width-half{grid-column:span 3}
  .block-row-grid>.block-width-third{grid-column:span 2}
  .block-row-grid>.block-width-twothirds{grid-column:span 4}
}
/* En rétroprojection, un texte très agrandi (crans 145 % et 175 % de projection-ui.js) n'a plus de place dans une colonne : la rangée s'empile, même large.
   « body.projection-mode » est INDISPENSABLE : projection-ui.js pose --projection-font-scale (relue dans le navigateur) sur html et body à chaque chargement d'un aperçu, même hors projection ;
   sans lui, avoir utilisé une fois le cran 145 % empilerait les rangées de l'aperçu normal. Les marges sont celles d'un bloc seul (18 px sous chaque bloc, aucune sous la grille). */
@container style(--projection-font-scale:1.45) or style(--projection-font-scale:1.75){
  body.projection-mode .block-row-grid{display:block;margin-bottom:0}
  body.projection-mode .block-row-grid>.rendered-block{margin-bottom:18px}
}
/* V0.18.12.95 — IMPRESSION. La page d'impression (« .print-course-document », à l'écran comme sur papier) range TOUJOURS en colonnes : le papier a une largeur fixe, et la requête de
   conteneur (640 px) aurait empilé une feuille aux marges larges. Pas de conteneur de requête ici. Une rangée ne se coupe pas entre deux pages (une rangée plus haute qu'une page est
   coupée comme le navigateur le décide). Un bloc qui porte un saut de page n'est jamais rangé (course_layout_print_width_v01295) : il reste en pleine largeur, sans rangée. */
.print-course-document .block-row{container-type:normal}
.print-course-document .block-row-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));column-gap:6mm;align-items:start;margin-bottom:18px}
.print-course-document .block-row-grid>.rendered-block{margin-bottom:0}
.print-course-document .block-row-grid>.block-width-half{grid-column:span 3}
.print-course-document .block-row-grid>.block-width-third{grid-column:span 2}
.print-course-document .block-row-grid>.block-width-twothirds{grid-column:span 4}
/* La garde de print-rows.js : une colonne qui déborde (tableau ou formule trop large : sur le papier il n'y a pas de barre de défilement, le contenu recouvrirait le voisin) fait EMPILER la
   rangée ; une rangée plus haute qu'une page peut se couper. Sur un petit écran (aperçu de l'impression sur téléphone), toutes les rangées sont empilées. */
.print-course-document .block-row.block-row--empilee .block-row-grid{display:block;margin-bottom:0}
.print-course-document .block-row.block-row--empilee .block-row-grid>.rendered-block{margin-bottom:18px}
@media screen and (max-width:700px){
  .print-course-document .block-row-grid{display:block;margin-bottom:0}
  .print-course-document .block-row-grid>.rendered-block{margin-bottom:18px}
}
@media print{
  .print-course-document .block-row{break-inside:avoid-page;page-break-inside:avoid}
  .print-course-document .block-row.block-row--empilee,.print-course-document .block-row.block-row--haute{break-inside:auto;page-break-inside:auto}
}

.rendered-question{
  padding:10px 0 14px;
}

.rendered-question .rendered-block-label{
  color:#277e78;
}


.rendered-document,
.rendered-image,
.rendered-graph{
  padding:10px 0 16px;
  border-bottom:1px solid #e6ebf0;
}

.rendered-definition,
.rendered-key_point,
.rendered-learning_objective{
  padding:13px 16px;
  border-left:4px solid #7a4ea3;
  background:#fbf9fd;
  border-radius:4px 8px 8px 4px;
}

.rendered-key_point{
  border-left-color:#315d86;
  background:#f3f7fb;
}

.rendered-learning_objective{
  border-left-color:#3567a8;
}

.rendered-summary,
.rendered-chapter_summary,
.rendered-written_trace{
  padding:18px 20px;
  border:1px solid #86b89a;
  background:#edf8f0;
  border-radius:10px;
}

.rendered-summary .rendered-block-label,
.rendered-chapter_summary .rendered-block-label,
.rendered-written_trace .rendered-block-label{
  color:#2f6c45;
}

.question-teacher-answer{
  display:none;
  margin-top:12px;
  padding:10px 12px;
  background:#fff2ef;
  border-radius:7px;
  color:#7d2a22;
}



/* V0.18.10.63 — la correction d'une question s'affiche par-dessus ses lignes vides
   de réponse plutôt qu'en dessous (aperçu élève et rétroprojection). Empilement par
   grille CSS plutôt que position:absolute (V0.18.10.63 initiale) : une correction plus
   haute que la zone de lignes doit agrandir la cellule commune pour repousser le bouton
   « Afficher/Masquer la correction » qui suit, au lieu de le chevaucher. En vue
   enseignant, les lignes n'existent pas (display:none ci-dessus) : la correction
   occupe seule la cellule, comportement inchangé. */
.question-response-area{
  display:grid;
  align-items:start;
}
.question-response-area .answer-lines,
.question-response-area .question-teacher-answer{
  grid-column:1;
  grid-row:1;
}
.question-response-area .correction-toggle{
  grid-column:1;
  grid-row:2;
}
.question-response-area .question-teacher-answer{
  margin-top:0;
  box-shadow:0 2px 10px rgba(125,42,34,.16);
}
.course-view-teacher .question-response-area .question-teacher-answer{
  box-shadow:none;
}

.import-analysis-summary-head{
  display:flex;
  justify-content:space-between;
  gap:16px;
  align-items:flex-start;
}

.import-analysis-stats{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:10px;
  margin-top:14px;
}

.import-analysis-stats>div{
  border:1px solid var(--line);
  border-radius:10px;
  padding:12px;
  text-align:center;
}

.import-analysis-stats strong{
  display:block;
  font-size:1.4rem;
  color:var(--primary);
}

.import-analysis-stats span{
  color:var(--muted);
  font-size:.82rem;
}

.warning-text{
  color:var(--theme-warning-text,#8a6200);
  font-weight:700;
}

.danger-button{
  background:#b42318;
  color:#fff;
}

.add-visual-settings{
  display:grid;
  grid-template-columns:120px 180px minmax(220px,1fr) minmax(220px,1fr) auto;
  gap:10px;
  align-items:end;
  margin:14px 0;
}

@media(max-width:900px){
  .import-analysis-stats{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .add-visual-settings{
    grid-template-columns:1fr 1fr;
  }
}


/* V0.10.4 — objectifs d'apprentissage */
.rendered-learning_objective{
  padding:16px 18px;
  border:1px solid #9fc2e8;
  border-left:0;
  background:#edf5fd;
  border-radius:10px;
}

.rendered-learning_objective .rendered-block-label{
  color:#2f5f91;
}

/* V0.10.4 — outils flottants des aperçus */
.preview-floating-tools{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  width:min(1180px,calc(100% - 24px));
  margin:10px auto 12px;
  padding:7px 9px;
  border:1px solid rgba(213,221,230,.9);
  border-radius:12px;
  background:rgba(247,249,251,.94);
  box-shadow:0 8px 24px rgba(22,45,68,.10);
  backdrop-filter:blur(8px);
}

.preview-floating-tools .preview-switch{
  margin-left:auto;
}

.top-floating-button{
  border:0;
  border-radius:9px;
  padding:9px 12px;
  background:var(--tone-chip);
  color:var(--primary);
  font-weight:800;
  cursor:pointer;
  white-space:nowrap;
}

.top-floating-button:hover{
  background:var(--tone-hover);
}

@media(max-width:760px){
  .preview-floating-tools{
    width:calc(100% - 16px);
    margin:8px auto 10px;
    flex-wrap:wrap;
  }

  .preview-floating-tools .backlink{
    width:100%;
  }

  .preview-floating-tools .preview-switch{
    margin-left:0;
  }
}


/* V0.10.5 — objectifs d’apprentissage officiels */
.rendered-official_objectives{
  padding:16px 18px;
  border:1px solid #9fc2e8;
  background:#edf5fd;
  border-radius:10px;
}

.rendered-official_objectives .rendered-block-label{
  color:#2f5f91;
}


/* V0.10.7 — tableaux importés par IA */
.import-table-preview{
  overflow-x:auto;
  margin:8px 0;
  border:1px solid var(--line);
  border-radius:10px;
  background:var(--surface);
}

.import-table-preview .course-table{
  margin:0;
  min-width:100%;
}

.legacy-table-description{
  padding:12px 14px;
  border:1px dashed #c7d2df;
  border-radius:8px;
  background:#fafbfd;
}


/* V0.10.8 — mise en activité : documents, dossiers, activités et exercices */
.rendered-document,
.rendered-dossier,
.rendered-activity,
.rendered-exercise{
  padding:16px 18px;
  margin:0 0 18px;
  border:1px solid #dfe4ea;
  border-radius:10px;
  background:#f5f6f7;
}

.rendered-document,
.rendered-dossier{
  border-bottom:1px solid #dfe4ea;
}

.rendered-document .rendered-block-label,
.rendered-dossier .rendered-block-label,
.rendered-activity .rendered-block-label,
.rendered-exercise .rendered-block-label{
  color:#234b72;
}

.rendered-document .rendered-block-content,
.rendered-dossier .rendered-block-content,
.rendered-activity .rendered-block-content,
.rendered-exercise .rendered-block-content{
  color:inherit;
}

/* Les ressources visuelles restent sobres mais s'intègrent mieux dans un bloc document. */
.rendered-document .rendered-image,
.rendered-document .rendered-graph,
.rendered-dossier .rendered-image,
.rendered-dossier .rendered-graph{
  margin-top:12px;
}

/* V0.11.0 — textes à trous et provenance IA */
.block-fill_blank{border-left-color:#7a5aa6}
.rendered-fill_blank{border-left-color:#7a5aa6;background:#fbf8ff}
.fill-blank-text{line-height:1.65}
.fill-blank-word-bank{margin-top:12px;padding:10px 12px;border:1px dashed #9d8ab8;border-radius:8px;background:var(--surface)}
.fill-blank-teacher-correction{display:none;margin-top:12px;padding:10px 12px;background:#fff2ef;border-radius:7px;color:#7d2a22}
.ai-origin-badge{display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;flex-shrink:0;min-width:26px;padding:2px 7px;margin-right:5px;border-radius:999px;background:#6d4bc3;color:#fff;font-size:.72rem;font-weight:800;letter-spacing:.04em;vertical-align:middle}
.block-editor-fill-blank{display:grid;gap:12px}
.rendered-summary .fill-blank-word-bank{background:color-mix(in srgb,var(--surface) 72%,transparent);border-color:#86b89a}


/* V0.12.0 — navigation rationalisée, EDT et rétroprojection */
.configuration-tools-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.main-nav{align-items:center}
.nav-dropdown summary{list-style:none;cursor:pointer;font-weight:800;color:var(--primary);min-width:34px;height:34px;display:grid;place-items:center;border-radius:9px;background:var(--tone-panel);border:1px solid var(--line);user-select:none}
.nav-dropdown summary::-webkit-details-marker{display:none}
.nav-dropdown[open] summary{background:var(--primary);color:var(--on-primary)}
.nav-dropdown-menu{position:absolute;top:42px;left:0;z-index:60;min-width:210px;padding:7px;background:var(--surface);border:1px solid var(--line);border-radius:11px;box-shadow:0 14px 36px rgba(16,24,40,.16);display:flex;flex-direction:column;gap:2px}
.nav-dropdown-menu a{padding:9px 10px;border-radius:7px;white-space:nowrap}
.nav-dropdown-menu a:hover{background:var(--tone-panel)}

.timetable-add-form{display:grid;grid-template-columns:140px 120px 120px 130px minmax(220px,1fr) minmax(120px,.55fr) auto;gap:10px;align-items:end}
.timetable-add-form label{margin:0}
.timetable-add-form button{margin:0 0 1px}
.timetable-week{display:grid;grid-template-columns:1fr;gap:14px}
.timetable-day-card{margin-bottom:0}
.timetable-slot-edit{display:grid;grid-template-columns:120px 105px 105px 100px minmax(200px,1fr) minmax(100px,.55fr) auto auto;gap:8px;align-items:center;border-top:1px solid var(--line);padding:10px 0}
.timetable-slot-edit:first-of-type{border-top:0}
.timetable-slot-edit input,.timetable-slot-edit select,.timetable-slot-edit button{margin:0}

.status.now{background:#d9ecff;color:#205c91}

.projection-button{margin:0}
.projection-toolbar{display:none}
/* V0.18.10.82 — width:100% : le format large des blocs question (obtenu via la
   grille .question-response-area en V0.18.10.64) devient le format commun a tous
   les boutons « Afficher la correction », y compris hors de cette grille
   (texte a trous, synthese). */
.correction-toggle{display:none;margin:10px 0 0;padding:7px 10px;width:100%;font-size:.82rem;background:var(--tone-panel);color:var(--primary);border:1px solid var(--line)}
.correction-toggle:hover{background:var(--tone-hover)}

body.projection-mode{background:var(--surface);overflow-x:hidden}
body.projection-mode .topbar,
body.projection-mode .wysiwyg-toolbar,
body.projection-mode .preview-floating-tools,
body.projection-mode .footer{display:none!important}
body.projection-mode .container{max-width:none;padding:14px 20px 70px}
body.projection-mode .course-document{max-width:1200px;border:0;box-shadow:none;padding:30px 44px;border-radius:0}
body.projection-mode .projection-toolbar{position:fixed;z-index:120;right:16px;top:14px;display:flex;gap:8px;align-items:center;padding:8px;background:color-mix(in srgb,var(--surface) 94%,transparent);backdrop-filter:blur(8px);border:1px solid var(--line);border-radius:12px;box-shadow:0 8px 24px rgba(16,24,40,.12)}
body.projection-mode .projection-toolbar[aria-hidden="true"]{display:flex}
body.projection-mode .projection-toolbar button{margin:0;padding:8px 11px;font-size:.82rem}
body.projection-mode .course-document-header{padding-right:210px}
body.projection-mode .course-view-student .rendered-question:has(.question-teacher-answer) .correction-toggle,
body.projection-mode .course-view-student .rendered-fill_blank:has(.fill-blank-teacher-correction) .correction-toggle,
body.projection-mode .course-view-student .rendered-summary:has(.fill-blank-teacher-correction) .correction-toggle{display:inline-block}
body.projection-mode .course-view-student .question-teacher-answer.is-revealed,
body.projection-mode .course-view-student .fill-blank-teacher-correction.is-revealed{display:block}
body.projection-mode .course-view-teacher .answer-lines{display:none}

.resume-target{animation:resume-highlight 2.4s ease-out}
@keyframes resume-highlight{0%{box-shadow:0 0 0 5px rgba(35,75,114,.18);background:color-mix(in srgb,var(--primary) 10%,var(--surface))}100%{box-shadow:none}}

@media(max-width:900px){
  .configuration-tools-grid{grid-template-columns:1fr}
  .timetable-add-form,.timetable-slot-edit{grid-template-columns:1fr 1fr}
  .timetable-add-form label:nth-of-type(4),.timetable-add-form label:nth-of-type(5),.timetable-add-form button,
  .timetable-slot-edit select[name="class_group_id"],.timetable-slot-edit input[name="room"],.timetable-slot-edit button{grid-column:span 2}
}
@media(max-width:700px){
  .topbar{align-items:center}.main-nav{gap:6px!important}.main-nav>a{font-size:.8rem}
  body.projection-mode .container{padding:8px 10px 64px}
  body.projection-mode .course-document{padding:20px 14px}
  body.projection-mode .course-document-header{padding-right:0;padding-top:58px}
  body.projection-mode .projection-toolbar{left:10px;right:10px;top:8px;justify-content:flex-end}
}

/* V0.12.0 corrigée — alternance semaines A/B */
.week-reference-form{display:flex;gap:12px;align-items:flex-end;flex-wrap:wrap}
.week-reference-form label{margin:0;min-width:260px;flex:1}
.week-reference-form button{margin:0 0 1px}
.week-badge{display:inline-flex;align-items:center;border-radius:999px;font-weight:800;background:var(--tone-panel);color:var(--primary)}
.week-badge{padding:6px 10px;font-size:.82rem}
.flash.warning{background:#fff6d8;color:#805d00}


/* V0.12.1 — finitions navigation, aperçus et liens */
.topbar{overflow:visible}
.main-nav{position:relative;overflow:visible}
.nav-dropdown{position:relative;flex:0 0 auto}
.nav-dropdown-menu{max-width:min(280px,calc(100vw - 24px));overflow:hidden}
.nav-dropdown-menu-right{left:auto!important;right:0!important}
.nav-dropdown-menu a{overflow:hidden;text-overflow:ellipsis}
.course-link{color:#175cd3;text-decoration:underline;text-underline-offset:2px;overflow-wrap:anywhere}
.course-link:hover{color:#0b4db3}

@media(max-width:700px){
  .topbar{overflow:visible;padding-left:12px;padding-right:12px}
  .main-nav{width:100%;justify-content:flex-end;overflow:visible}
  .nav-dropdown-menu{position:fixed;top:64px;left:auto!important;right:10px!important;width:min(300px,calc(100vw - 20px));max-width:none}
  .nav-dropdown-menu a{white-space:normal}
}


/* V0.12.2 — chapitre complet depuis Aujourd'hui + limites prévues de séance */
.rendered-session.planned-session{
  position:relative;
}
.planned-session{
  border-radius:8px;
}


/* V0.13.10 — correction du débordement des menus + / ⚙ */
.main-nav .nav-dropdown-menu{
  left:auto!important;
  right:0!important;
  box-sizing:border-box;
  width:max-content;
  min-width:210px;
  max-width:min(320px,calc(100vw - 24px));
}


/* V0.18.3.8 — navigation globale réellement responsive sur téléphone. */
/* V0.18.10.36 — limitee a l'ecran (screen) : sans cela, une page imprimee dont la largeur
   calculee passe sous 760px declenche ces regles (display:...!important) qui, ayant une
   specificite superieure a ".topbar{display:none!important}" du bloc @media print, faisaient
   reapparaitre la barre de navigation a l'impression. */
@media screen and (max-width:760px){
  body:not([data-page="chapter_preview"]) .topbar{
    display:grid !important;
    grid-template-columns:1fr !important;
    align-items:center !important;
    gap:8px !important;
    width:100% !important;
    min-width:0 !important;
    box-sizing:border-box;
    padding:8px 10px !important;
    overflow:visible !important;
  }

  body:not([data-page="chapter_preview"]) .topbar > .brand{
    width:max-content;
    max-width:100%;
    min-width:0;
    margin:0 !important;
  }

  /* V0.18.12.149.1 — repere a QUATRE colonnes (sept boutons depuis la recherche Ctrl+K :
     Aujourd'hui, pense-bête, recherche, Ressources, Suivi, Paramètres, Aide = 4 + 3,
     exactement deux lignes pleines, sans case vide ni ligne solitaire). Avant la V.149,
     six boutons tenaient sur trois colonnes (3 + 3) ; les deux lignes pleines d'alors
     dépendaient d'un repère à TROIS colonnes avec les boutons 4 et 5 épinglés par
     position (:nth-child) — un repère devenu faux dès qu'un bouton s'intercale avant eux,
     comme la recherche ici. Le repère à quatre colonnes n'a plus besoin d'épingler
     personne : l'auto-placement de la grille remplit 1-4 puis 5-7 tout seul, et reste
     juste pour un futur huitième bouton (4 + 4) sans RIEN changer ici. */
  body:not([data-page="chapter_preview"]) .topbar > .main-nav{
    display:grid !important;
    /* V0.18.12.161.1 — SIX colonnes : les rubriques en prennent deux, les icônes (pense-bête, recherche) une seule (demande du concepteur : réduire ces deux boutons, qui prenaient chacun
       autant de place qu'une rubrique). Première ligne 2 + 1 + 1 + 2, seconde 2 + 2 + 2 : toujours deux lignes pleines, sans case vide, et les libellés (« Paramètres » et sa pastille)
       disposent de près de 100 px au lieu de 71. Toujours aucun bouton épinglé par position : seul le nombre de colonnes occupées change selon le type de bouton. */
    grid-template-columns:repeat(6,minmax(0,1fr)) !important;
    align-items:stretch !important;
    justify-content:stretch !important;
    gap:5px !important;
    width:100% !important;
    min-width:0 !important;
    margin:0 !important;
    overflow:visible !important;
  }

  body:not([data-page="chapter_preview"]) .main-nav > a,
  body:not([data-page="chapter_preview"]) .main-nav > details{
    width:100% !important;
    min-width:0 !important;
    max-width:100% !important;
    margin:0 !important;
    grid-column:span 2 !important;
  }

  /* les deux icônes de la barre (pense-bête, recherche) : une seule des six colonnes */
  body:not([data-page="chapter_preview"]) .main-nav > .nav-note-button{
    grid-column:span 1 !important;
  }

  body:not([data-page="chapter_preview"]) .main-nav > a,
  body:not([data-page="chapter_preview"]) .main-nav > details > summary{
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    width:100% !important;
    min-width:0 !important;
    min-height:40px;
    box-sizing:border-box;
    padding:7px 3px !important;
    font-size:.7rem !important;
    line-height:1.15 !important;
    text-align:center;
    white-space:nowrap !important;
  }

  body:not([data-page="chapter_preview"]) .main-nav .nav-dropdown-menu{
    position:fixed !important;
    right:10px !important;
    left:10px !important;
    width:auto !important;
    min-width:0 !important;
    max-width:none !important;
    max-height:min(70vh,560px);
    overflow:auto !important;
  }
}

/* V0.18.12.110 — TÉLÉPHONE : le logo rejoint la ligne des boutons. Avant, la barre (collée en haut de l'écran) faisait 159 px : une ligne pour le seul logo, puis deux lignes de
   trois boutons. Maintenant le logo est À GAUCHE des deux lignes de boutons (« Aujourd'hui » est sur sa ligne, juste après lui) : 103 px, soit 56 px de page en plus en permanence.
   Le nom « Cumpari » à côté du logo ne s'affiche plus sous 520 px (il ne reste de place que pour trois boutons par ligne) ; la page des cours en aperçu (chapter_preview) a sa propre barre. */
@media screen and (max-width:760px){
  body:not([data-page="chapter_preview"]) .topbar{
    grid-template-columns:auto minmax(0,1fr) !important;
    column-gap:8px !important;
    row-gap:0 !important;
  }

  body:not([data-page="chapter_preview"]) .topbar > .brand{
    align-self:start;
  }

  /* le menu déroulant s'ouvre SOUS la barre (qui fait maintenant 103 px), pas par-dessus ses boutons */
  body:not([data-page="chapter_preview"]) .main-nav .nav-dropdown-menu{
    top:104px;
  }
}

@media screen and (max-width:520px){
  /* V0.18.12.340.2 — la ligne « ENSEIGNANTS » suit le mot : masquée avec lui (et l'icône reste). */
  body:not([data-page="chapter_preview"]) .topbar > .brand .brand-sub,
  body:not([data-page="chapter_preview"]) .topbar > .brand .brand-label{
    display:none !important;
  }
}

/* Évite qu'une ligne trop longue force le panneau hors écran. */
.main-nav .nav-dropdown-menu a{
  display:block;
  min-width:0;
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
}

/* Sur écrans étroits, le panneau est attaché au viewport et reste entièrement visible. */
@media(max-width:760px){
  .topbar{
    padding-left:12px;
    padding-right:12px;
  }

  .main-nav .nav-dropdown-menu{
    position:fixed;
    top:64px;
    right:10px!important;
    left:auto!important;
    width:min(300px,calc(100vw - 20px));
    min-width:0;
    max-width:none;
  }

  .main-nav .nav-dropdown-menu a{
    white-space:normal;
  }
}


/* V0.13.12 — bandeau de séance distinctif et sticky */
.course-document{
  --session-sticky-top:92px;
}

.rendered-session .session-title{
  position:sticky;
  top:var(--session-sticky-top);
  z-index:55;
  margin:34px 0 22px;
  padding:13px 18px;
  border:1px solid #234b72;
  border-radius:10px;
  background:#234b72;
  color:#fff;
  box-shadow:0 5px 16px rgba(22,45,68,.16);
  line-height:1.25;
  scroll-margin-top:calc(var(--session-sticky-top) + 14px);
}

/* Le premier bandeau ne doit pas être collé artificiellement au document. */
.rendered-session:first-of-type .session-title{
  margin-top:24px;
}

/* Lorsque le bandeau devient sticky, il reste lisible devant le contenu. */
.rendered-session .session-title::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:-7px;
  height:7px;
  pointer-events:none;
  background:linear-gradient(to bottom,rgba(22,45,68,.10),transparent);
  border-radius:0 0 10px 10px;
}

/* Projection : même repère de séance, plus sobre et sans outils au-dessus. */
body.projection-mode .course-document{
  --session-sticky-top:10px;
}

body.projection-mode .rendered-session .session-title{
  z-index:80;
}

/* Impression/PDF : le titre reste un bandeau mais ne colle pas à la page. */
@media print{
  .rendered-session .session-title{
    position:static!important;
    top:auto!important;
    box-shadow:none;
    break-after:avoid;
  }
}

/* Mobile : le bandeau reste compact et tient sous la barre d’aperçu repliée. */
@media(max-width:760px){
  .course-document{
    --session-sticky-top:126px;
  }

  .rendered-session .session-title{
    padding:11px 13px;
    font-size:1.1rem;
    border-radius:8px;
  }

  body.projection-mode .course-document{
    --session-sticky-top:8px;
  }
}


/* V0.13.13 — bouton Top en rétroprojection */
.projection-top-button{
  display:none;
}

body.projection-mode .projection-top-button{
  position:fixed;
  right:22px;
  bottom:22px;
  z-index:120;
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:9px 13px;
  border:1px solid rgba(255,255,255,.35);
  border-radius:999px;
  background:#234b72;
  color:#fff;
  font:inherit;
  font-size:.84rem;
  font-weight:800;
  line-height:1;
  box-shadow:0 8px 22px rgba(22,45,68,.24);
  cursor:pointer;
  opacity:.92;
}

body.projection-mode .projection-top-button:hover,
body.projection-mode .projection-top-button:focus{
  opacity:1;
  transform:translateY(-1px);
  outline:none;
}

@media(max-width:760px){
  body.projection-mode .projection-top-button{
    right:12px;
    bottom:12px;
    padding:8px 11px;
  }
}

@media print{
  .projection-top-button{display:none!important}
}


/* V0.13.15 — validation IA des titres après redécoupage */
.session-title-review-page{
  max-width:980px;
  margin:32px auto 60px;
}
.session-title-review-card{
  padding:30px;
}
.session-title-review-heading{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:24px;
  margin-bottom:24px;
}
.session-title-review-heading h1{
  margin:4px 0 8px;
}
.session-title-review-heading p{
  margin:0;
  max-width:720px;
  color:var(--muted);
}
.session-title-review-list{
  display:grid;
  gap:18px;
}
.session-title-review-item{
  padding:20px;
  border:1px solid #cbd9e5;
  border-radius:12px;
  background:color-mix(in srgb,var(--primary) 6%,var(--surface));
}
.session-title-review-number{
  display:inline-block;
  margin-bottom:12px;
  padding:5px 10px;
  border-radius:999px;
  background:#234b72;
  color:#fff;
  font-weight:800;
}
.session-title-review-item input[type="text"]{
  width:100%;
  margin-top:6px;
  font-size:1.05rem;
  font-weight:700;
}
.session-title-current{
  margin-top:9px;
  color:var(--muted);
  font-size:.88rem;
}
.session-title-ai-reason{
  margin-top:10px;
  padding:10px 12px;
  border-left:3px solid #8bb4d8;
  background:color-mix(in srgb,var(--primary) 10%,var(--surface));
  font-size:.9rem;
}
.session-title-keep-current{
  display:flex;
  align-items:center;
  gap:8px;
  margin-top:12px;
  font-size:.9rem;
}
.session-title-review-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:24px;
}
@media(max-width:760px){
  .session-title-review-card{padding:18px}
  .session-title-review-heading{display:block}
}


/* V0.13.16 — confirmation + attente bloquante pendant l'analyse IA */
.session-boundary-processing-overlay{
  position:fixed;
  inset:0;
  z-index:99999;
  display:none;
  align-items:center;
  justify-content:center;
  padding:24px;
  background:rgba(246,249,252,.94);
  backdrop-filter:blur(3px);
}

body.session-boundary-processing .session-boundary-processing-overlay{
  display:flex;
}

.session-boundary-processing-card{
  width:min(520px,calc(100vw - 32px));
  padding:28px;
  border:1px solid #c8d7e4;
  border-radius:16px;
  background:var(--surface);
  box-shadow:0 18px 48px rgba(22,45,68,.18);
  text-align:center;
}

.session-boundary-processing-spinner{
  width:42px;
  height:42px;
  margin:0 auto 18px;
  border:4px solid #dbe8f3;
  border-top-color:#234b72;
  border-radius:50%;
  animation:session-boundary-spin .8s linear infinite;
}

.session-boundary-processing-card h2{
  margin:0 0 8px;
}

.session-boundary-processing-card p{
  margin:0;
  color:var(--muted);
}

.session-boundary-processing-note{
  display:block;
  margin-top:12px;
  font-size:.82rem;
  color:var(--muted);
}

.session-boundary-cancel-form{
  margin-top:18px;
  padding-top:18px;
  border-top:1px solid #dde5ec;
}

@keyframes session-boundary-spin{
  to{transform:rotate(360deg)}
}

@media print{
  .session-boundary-processing-overlay{display:none!important}
}


/* V0.13.19 — simplification : le bandeau de séance devient le point d’action unique */

.session-title.session-title-menu-host{
  position:sticky;
  top:var(--session-sticky-top);
  z-index:60;
  margin:34px 0 22px;
  padding:0;
  border:1px solid #234b72;
  border-radius:10px;
  background:#234b72;
  color:#fff;
  box-shadow:0 5px 16px rgba(22,45,68,.16);
  line-height:1.25;
  overflow:visible;
}

.session-title.session-title-menu-host::after{
  display:none;
}

.session-title-main{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:13px 18px;
  border:0;
  border-radius:10px;
  background:transparent;
  color:inherit;
  font:inherit;
  line-height:inherit;
  text-align:left;
  cursor:pointer;
}

.session-title-main:hover,
.session-title-main:focus{
  background:color-mix(in srgb,var(--surface) 07%,transparent);
  outline:none;
}

.session-title-menu-icon{
  flex:0 0 auto;
  font-size:1.1rem;
  opacity:.75;
}

.session-title-menu{
  position:absolute;
  top:calc(100% + 8px);
  right:0;
  width:min(320px,calc(100vw - 32px));
  padding:8px;
  border:1px solid #cbd9e5;
  border-radius:12px;
  background:var(--surface);
  color:var(--text);
  box-shadow:0 14px 34px rgba(22,45,68,.18);
  z-index:100;
}

/* V0.18.11.67 — le z-index:100 du menu ne vaut qu'A L'INTERIEUR de son bandeau : collant et
   dote d'un z-index (60), le bandeau forme un contexte d'empilement, et le menu y est enferme.
   Le bandeau de la seance suivante, au meme niveau 60 mais plus loin dans la page, passait
   donc PAR-DESSUS le menu d'une seance courte : « Renommer » etait dessine sous lui et ne
   recevait pas le clic : il ouvrait le menu de la seance suivante. Le bandeau dont le menu
   est ouvert passe devant ses voisins, et devant le widget des marqueurs fixe en bas (135),
   qui couvrait sur telephone « Enregistrer » / « Annuler » d'un renommage pres du bas ; il
   reste sous la barre du haut (200). :has() suit l'etat reel du menu ([hidden]), quel que
   soit le code qui l'ouvre ; l'apercu en depend deja (placement des limites de seance). La
   projection masque ces menus. */
body:not(.projection-mode) .session-title.session-title-menu-host:has(> .session-title-menu:not([hidden])){
  z-index:136;
}

/* V0.18.11.5 — le sélecteur nommait « session-title-menu-delete-form », le gabarit
   écrit « session-menu-delete-form » : le bouton de suppression de séance ne recevait
   AUCUN de ces styles et tranchait avec les autres entrées du menu. */
.session-title-menu > a,
.session-title-menu > button,
.session-menu-delete-form > button,
.session-menu-add-form > button{
  width:100%;
  display:block;
  padding:10px 11px;
  border:0;
  border-radius:8px;
  background:transparent;
  color:#203244;
  font:inherit;
  font-size:.9rem;
  font-weight:700;
  text-align:left;
  text-decoration:none;
  cursor:pointer;
}

.session-title-menu > a:hover,
.session-title-menu > button:hover,
.session-menu-delete-form > button:hover,
.session-menu-add-form > button:hover{
  background:var(--tone-hover);
}

.session-menu-delete-form,
.session-menu-add-form{
  margin:0;
}

.session-menu-delete-form .danger-text{
  color:var(--danger);
}

.session-menu-rename-form{
  margin-top:8px;
  padding:10px;
  border-top:1px solid #dde5ec;
}

.session-menu-rename-form label{
  display:block;
  font-size:.8rem;
  font-weight:800;
}

.session-menu-rename-form input[type="text"]{
  width:100%;
  margin-top:5px;
}

.session-menu-rename-actions{
  display:flex;
  gap:8px;
  margin-top:8px;
}

.button.small{
  padding:7px 10px;
  font-size:.8rem;
}

body.projection-mode .session-title-menu-icon{
  display:none;
}

body.projection-mode .session-title-main{
  cursor:default;
  pointer-events:none;
}

body.projection-mode .session-title-menu{
  display:none!important;
}

/* En mode déplacement, seuls les emplacements possibles apparaissent. */

body:has(.boundary-edit-help.direct.active) .boundary-place-form{
  display:block;
}

@media print{
  .session-title-main{
    padding:13px 18px;
  }

  .session-title-menu,
  .session-title-menu-icon{
    display:none!important;
  }
}


/* V0.13.20 — restauration de la typographie des bandeaux de séance */
.session-title.session-title-menu-host{
  font-size:1.5em;
  font-weight:700;
}

.session-title-main{
  font-size:inherit;
  font-weight:inherit;
}

@media(max-width:760px){
  .session-title.session-title-menu-host{
    font-size:1.1rem;
  }
}



/* V0.13.22 — correction réelle du centrage vertical du bandeau */
.session-title-main{
  margin:0;
  padding-top:9px;
  padding-bottom:9px;
}


/* V0.14.0 — consolidation du découpage des séances */
.session-boundary-drop{
  display:none!important;
}

.boundary-place-form{
  position:relative;
  display:block;
  margin:9px 0;
  padding:6px 0 0;
  border-top:2px solid #b8cee2;
}

.boundary-place-button{
  margin:-18px 0 0 14px;
  padding:4px 9px;
  border-radius:999px;
  background:var(--surface);
  color:var(--primary);
  border:1px solid #9ebbd4;
  font-size:.72rem;
  font-weight:800;
  cursor:pointer;
}

.boundary-place-button:hover,
.boundary-place-button:focus{
  background:var(--primary);
  color:var(--on-primary);
  outline:none;
}

.session-title-menu-host{
  scroll-margin-top:170px;
}

@media print{
  .boundary-place-form,
  .boundary-cancel-placement{
    display:none!important;
  }
}


/* V0.14.1 — questions : suppression du faux trait de réponse final */
.rendered-question{
  border-bottom:0;
  padding-bottom:14px;
}


/* V0.14.2 — transition pédagogique importée fidèlement */
.rendered-transition{
  margin:22px 0;
  padding:14px 16px;
  border-left:4px solid #537fa5;
  border-radius:0 8px 8px 0;
  background:#f3f7fa;
}

.rendered-transition .block-title{
  margin-bottom:6px;
  color:#234b72;
  font-weight:800;
}


/* V0.14.3 — tableaux avec corrections cellule par cellule */
.course-view-student .table-teacher-value{
  display:none;
}

.course-view-student .table-teacher-cell{
  min-width:64px;
}


.course-view-teacher .table-teacher-value{
  color:#b42318;
  font-weight:600;
}

.import-teacher-cell{
  color:#b42318!important;
  background:#fff4f2!important;
}

.import-coverage-line{
  margin-top:14px;
  padding:10px 12px;
  border-radius:8px;
  background:#f4f7fa;
  font-size:.9rem;
}

.coverage-warning{
  margin-top:12px;
  padding:12px 14px;
  border:1px solid #e4b4ac;
  border-radius:8px;
  background:#fff3f1;
  color:#7f2d26;
}

.coverage-warning p{
  margin:5px 0 0;
}

.coverage-ok{
  margin-top:12px;
  color:var(--success);
  font-weight:700;
}

.coverage-ack{
  display:flex;
  align-items:flex-start;
  gap:9px;
  margin:16px 0 8px;
  padding:12px 14px;
  border:1px solid #e4b4ac;
  border-radius:8px;
  background:#fff8f6;
}

.coverage-ack input{
  margin-top:3px;
}


/* V0.14.4 — lisibilité du brouillon d’import */












/* V0.14.5 — correction réelle de la grille du brouillon d’import */
.ai-import-item{
  grid-template-columns:30px 110px minmax(240px,290px) minmax(320px,1fr);
  gap:12px 14px;
  align-items:start;
}

/* Ligne 1 : poignée | Importer | Type | Visibilité */
.ai-import-item .import-item-drag{
  grid-column:1;
  grid-row:1;
}

.ai-import-item .import-check{
  grid-column:2;
  grid-row:1;
}

.ai-import-item .import-select-cell{
  grid-column:3;
  grid-row:1;
}

.ai-import-item .import-visibility-cell{
  grid-column:4;
  grid-row:1;
}

/* Ligne 2 et suivantes : tout le contenu exploitable en pleine largeur */
.ai-import-item .import-ai-content{
  grid-column:2 / -1;
  grid-row:2;
  min-width:0;
  width:100%;
}

.ai-import-item .import-ai-content > label{
  width:100%;
  min-width:0;
}

.ai-import-item .import-ai-content input[type="text"],
.ai-import-item .import-ai-content textarea,
.ai-import-item .import-ai-content select{
  width:100%;
  max-width:none;
  box-sizing:border-box;
}

.ai-import-item .import-ai-content textarea{
  min-height:130px;
  resize:vertical;
}

/* Annule les essais de grille V0.14.4 qui ne correspondaient pas au DOM réel. */

@media(max-width:900px){
  .ai-import-item{
    grid-template-columns:28px 1fr;
  }

  .ai-import-item .import-item-drag{
    grid-column:1;
    grid-row:1 / span 4;
  }

  .ai-import-item .import-check,
  .ai-import-item .import-select-cell,
  .ai-import-item .import-visibility-cell,
  .ai-import-item .import-ai-content{
    grid-column:2;
  }

  .ai-import-item .import-check{grid-row:1}
  .ai-import-item .import-select-cell{grid-row:2}
  .ai-import-item .import-visibility-cell{grid-row:3}
  .ai-import-item .import-ai-content{grid-row:4}
}

/* V0.18.12.174.2 — relecture d'un import sur TÉLÉPHONE. La règle « .import-item label:not(.import-check){grid-column:2} » (grille EXTÉRIEURE : poignée | contenu) s'appliquait aussi aux
   étiquettes de la grille INTÉRIEURE du contenu : celle-ci passait à deux colonnes (la vignette dans la première, 112 px, tout le reste écrasé dans la seconde, 150 px) — boutons à l'étroit,
   champs « Titre propre » et « Source » en colonnes d'une lettre. Tout ce que contient le contenu reprend toute la largeur ; et l'aperçu d'un schéma (grille, SVG) ne dicte plus sa largeur
   naturelle, ce qui élargissait toute la page au-delà de l'écran. */
@media(max-width:900px){
  .ai-import-item .import-ai-content > *{grid-column:1 / -1;min-width:0}
  .ai-import-item .import-ai-content > label:not(.import-check){grid-column:1 / -1}
}
.ap-schema-conversion,.ap-schema-conversion-apercu,.ap-schema-conversion .node-diagram-block,.ap-schema-conversion .node-diagram-scroll{min-width:0}


/* V0.14.6 — éditeur de blocs simplifié */
.block-context-host{
  position:relative;
  margin-left:auto;
}

.block-context-menu{
  position:absolute;
  top:calc(100% + 6px);
  right:0;
  z-index:80;
  width:240px;
  padding:6px;
  border:1px solid var(--line);
  border-radius:10px;
  background:var(--surface);
  box-shadow:var(--shadow);
}

.block-context-menu button{
  display:block;
  width:100%;
  margin:0;
  padding:9px 10px;
  border:0;
  border-radius:7px;
  background:transparent;
  color:var(--text);
  text-align:left;
  font:inherit;
  font-weight:700;
  cursor:pointer;
}

/* V0.18.11.67 — repos transparent sous var(--text) : le survol suit le theme. Ecrit #eef4f8,
   « Modifier ce bloc », « Dupliquer »… devenaient invisibles au survol en mode nuit (1,06). */
.block-context-menu button:hover{
  background:var(--tone-hover);
}

.insert-block-status{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:12px;
  padding:10px 12px;
  border:1px solid #9ebbd4;
  border-radius:9px;
  background:color-mix(in srgb,var(--primary) 9%,var(--surface));
  color:var(--primary);
  font-weight:700;
}

.block-editor-media{
  display:grid;
  gap:12px;
}

.media-paste-zone{
  display:flex;
  min-height:150px;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:7px;
  padding:18px;
  border:2px dashed #9ebbd4;
  border-radius:12px;
  /* V0.18.11.86 — couleurs du thème (la zone restait claire en thème sombre). */
  background:var(--surface-soft,#f7fafc);
  color:var(--muted,#516579);
  text-align:center;
  cursor:pointer;
}

.media-paste-zone:focus{
  /* V0.18.12.43 — couleurs du thème : en thème Nuit, #234b72 sur fond sombre rendait le focus presque
     invisible, alors que « cliquez dans cette zone » est la condition du collage. */
  outline:3px solid var(--theme-focus,rgba(35,75,114,.14));
  border-color:var(--primary,#234b72);
}

.media-paste-zone strong{
  color:var(--primary);
}

.media-paste-zone img{
  display:block;
  max-width:100%;
  max-height:420px;
  margin-top:10px;
  border-radius:8px;
}

.media-paste-zone.has-media{
  border-style:solid;
  background:var(--surface);
}



/* V0.14.7 — parcours d'édition simplifié */
.session-editor-toolbar{
  position:sticky;
  display:flex;
  align-items:center;
  gap:10px;
  margin:0 0 18px;
  padding:10px 12px;
  border:1px solid var(--line);
  border-radius:12px;
  background:color-mix(in srgb,var(--surface) 96%,transparent);
  box-shadow:var(--shadow);
  backdrop-filter:blur(8px);
}

.session-editor-toolbar-title{
  display:flex;
  flex-direction:column;
  min-width:0;
  margin-right:auto;
}

.session-editor-toolbar-title strong{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.session-editor-toolbar-title .badge{
  align-self:flex-start;
  margin-bottom:3px;
}

.session-editor-switcher{
  display:flex;
  align-items:center;
  gap:7px;
  margin:0;
}

.session-editor-switcher span{
  color:var(--muted);
  font-size:.78rem;
  font-weight:800;
}

.session-editor-switcher select{
  min-width:220px;
  max-width:340px;
  margin:0;
}

.session-editor-hero{
  margin-top:0;
}

.preview-edit-course-button{
  white-space:nowrap;
}

.lesson-block{
  scroll-margin-top:125px;
}

@media(max-width:900px){
  .session-editor-toolbar{
    flex-wrap:wrap;
  }

  .session-editor-toolbar-title{
    order:-1;
    width:100%;
  }

  .session-editor-switcher{
    width:100%;
  }

  .session-editor-switcher select{
    width:100%;
    max-width:none;
  }
}


/* V0.14.9 — traçabilité de l'import IA */
.import-trace{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
  margin-top:7px;
}

.import-trace span{
  display:inline-flex;
  align-items:center;
  gap:4px;
  padding:4px 8px;
  border:1px solid #d6e0e8;
  border-radius:999px;
  background:#f7f9fb;
  color:#5b6b79;
  font-size:.76rem;
}

.import-trace strong{
  color:var(--text);
}

/* V0.18.12.338.3 — le CHAPITRE (matière, classes) d'une proposition d'assistant, en tête de l'écran « Reprendre » (même ligne que sous le titre d'une carte de « Propositions à valider ») ; couleurs : jetons seulement. */
.import-contexte{
  display:block;
  margin:6px 0 0;
  font-size:.95rem;
  color:var(--text);
  overflow-wrap:anywhere;
}


/* V0.14.11 — pipeline d'import multipasse */
.import-pipeline-summary{
  border-color:#aac4da;
}

.import-pipeline-counts{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:12px 0;
}

.import-pipeline-counts span{
  padding:7px 10px;
  border:1px solid #d9e3eb;
  border-radius:8px;
  background:#f7fafc;
  color:#526475;
  font-size:.88rem;
}

.ai-wait-card h2{
  margin-bottom:8px;
}


/* V0.14.12 — lecture allégée et synthèses à trous */
.block-context-form{margin:0}
.block-context-menu .block-context-form button{
  display:block;width:100%;margin:0;padding:9px 10px;border:0;border-radius:7px;
  background:transparent;color:var(--text);text-align:left;font:inherit;font-weight:700;cursor:pointer
}
.block-context-menu .block-context-form button:hover{background:var(--tone-hover)}  /* V0.18.11.67, idem */


.ai-current-status{margin-bottom:18px}
/* V0.18.12.31 — case « Choisir automatiquement le modèle selon la tâche » à côté de son libellé
   (input{width:100%} l'étirait sur toute la ligne, au-dessus du texte). */
.ai-auto-model-toggle{display:flex;align-items:center;gap:10px}
.ai-auto-model-toggle input[type="checkbox"]{width:auto;flex:0 0 auto;margin:0}
.ai-auto-model-details{margin:4px 0 12px}
.ai-auto-model-details ul{margin:6px 0 8px;padding-left:20px}
.ai-current-status-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}
.ai-current-status-grid>div{
  display:flex;flex-direction:column;align-items:flex-start;gap:6px;padding:14px;
  border:1px solid var(--line);border-radius:10px;background:var(--tone-soft)
}
.ai-current-status-grid strong{font-size:1.12rem}
.ai-current-status-grid .button{margin-top:6px}

@media(max-width:800px){
  .ai-current-status-grid{grid-template-columns:1fr}
}

/* V0.18.12.85 — plusieurs fournisseurs d'IA : cartes des fournisseurs et tableau « Un modèle par fonction ». */
.ai-provider-card,.ai-routes-card{margin-top:18px}
.ai-settings-card h2,.ai-routes-card h2{margin:0 0 10px}
.ai-settings-card .status-chip{display:inline-block;margin-left:8px;padding:2px 9px;border-radius:999px;font-size:.78rem;font-weight:700;vertical-align:middle;border:1px solid var(--line);background:var(--surface-2,var(--tone-soft));color:var(--muted)}
.ai-settings-card .status-chip.ok{color:var(--success,#146c53);border-color:currentColor}
.ai-models-refresh{margin-top:10px;display:flex;flex-wrap:wrap;align-items:center;gap:10px}
.ai-routes-card{max-width:980px}
.ai-routes-table{width:100%;border-collapse:collapse}
.ai-routes-table th,.ai-routes-table td{padding:7px 8px;border-bottom:1px solid var(--line);text-align:left;vertical-align:middle}
.ai-routes-table th{font-size:.82rem;color:var(--muted);font-weight:700}
.ai-routes-table select,.ai-routes-table input[type="text"]{width:100%;min-width:0;margin:0}
.ai-routes-table td.meta{color:var(--muted);font-size:.9rem}
.ai-routes-card .button-row{margin-top:12px}
/* V0.18.12.86 — fonctions rangées par thème ; fonctions qui restent chez OpenAI ; champ du « Autre modèle… ». */
.ai-routes-table{table-layout:fixed}
.ai-routes-table thead th:nth-child(1){width:34%}
.ai-routes-table thead th:nth-child(2){width:23%}
.ai-routes-table thead th:nth-child(3){width:43%}
.ai-routes-table .ai-theme-titre th{padding:16px 8px 6px;font-size:1rem;color:var(--text);border-bottom:2px solid var(--primary)}
.ai-routes-table .ai-theme-titre .meta{margin-left:8px;font-weight:600;font-size:.82rem;color:var(--muted)}
.ai-routes-table .ai-fixe{display:block}
.ai-routes-table .ai-raison{display:block;margin-top:2px;font-size:.82rem}
.ai-routes-table input[data-ia-libre]{margin-top:6px}
.ai-routes-table input[data-ia-libre][hidden]{display:none}
.ai-provider-card .button-row{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.ai-provider-card .button-row button,.ai-models-refresh button{margin-top:0}
.ai-provider-card button.danger-text{color:var(--danger)}
@media(max-width:700px){
  .ai-routes-table thead{display:none}
  .ai-routes-table,.ai-routes-table tbody,.ai-routes-table tr,.ai-routes-table td{display:block;width:100%}
  .ai-routes-table tr{padding:10px 0;border-bottom:1px solid var(--line)}
  .ai-routes-table td{border:0;padding:3px 0}
  .ai-routes-table td:first-child{font-weight:700}
  .ai-routes-table select,.ai-routes-table input[type="text"]{min-width:0}
  .ai-routes-table th{display:block;width:100%}
  .ai-routes-table td[data-label]::before{content:attr(data-label);display:block;margin-bottom:2px;font-size:.78rem;font-weight:700;color:var(--muted)}
  .ai-routes-table .ai-theme-titre th{padding:18px 0 6px}
  .ai-routes-table .ai-theme-titre{padding:0}
}


/* V0.14.13 — éditeur de questions lisible */
.block-editor-question{
  padding:2px 0;
}

.question-editor-main,
.question-editor-correction{
  display:block;
}

.question-editor-main .rich-editor{
  min-height:86px;
}

.question-editor-lines{
  max-width:320px;
}

.question-editor-lines input{
  margin-top:6px;
}

.question-editor-correction{
  padding:12px;
  border:1px solid #edc5c1;
  border-radius:10px;
  background:#fff8f7;
}

.question-editor-correction > span{
  display:flex;
  align-items:center;
  gap:7px;
  margin-bottom:7px;
  font-weight:800;
  color:var(--danger);
}

.question-editor-correction .rich-editor{
  min-height:120px;
  background:var(--surface);
}

@media(min-width:1100px){
  .question-editor-main .rich-editor{
    min-height:100px;
  }
}


/* V0.14.14 — coexistence des deux barres sticky en mode édition */

.wysiwyg-toolbar{
  z-index:190;
}

.session-editor-toolbar{
  z-index:180;
}

/* Le bouton Tx est un peu plus large que G/I/S. */
.wysiwyg-toolbar button[data-command="clear"]{
  width:40px;
  font-size:.78rem;
  font-weight:800;
}

@media(max-width:800px){
  .wysiwyg-toolbar{
    top:74px;
    z-index:190;
  }

  .session-editor-toolbar{
    top:128px;
  }
}


/* V0.14.15 — barre d'aperçu sticky restaurée */
:root{
  --app-topbar-height:64px;
}

.preview-floating-tools{
  position:sticky;
  top:calc(var(--app-topbar-height) + 10px);
  z-index:185;
}

/* La barre d'aperçu reste au-dessus du contenu du cours,
   mais sous la navigation principale. */
.topbar{
  z-index:200;
}

/* L'éditeur conserve ses propres barres sous la navigation principale. */
.wysiwyg-toolbar{
  top:var(--app-topbar-height);
}

.session-editor-toolbar{
  top:calc(var(--app-topbar-height) + 54px);
}

@media(max-width:760px){
  .preview-floating-tools{
    top:calc(var(--app-topbar-height) + 8px);
  }
}


/* V0.14.16 — outils d'aperçu intégrés au bandeau principal */
.topbar.preview-tools-docked{
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  align-items:center;
  column-gap:18px;
  row-gap:8px;
  min-height:64px;
  padding-top:8px;
  padding-bottom:8px;
}

.topbar.preview-tools-docked > .brand{
  grid-column:1;
  white-space:nowrap;
}

.topbar.preview-tools-docked > .preview-floating-tools.preview-tools-docked{
  grid-column:2;
  position:static;
  top:auto;
  z-index:auto;
  width:auto;
  max-width:none;
  margin:0;
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
  backdrop-filter:none;
  justify-content:center;
  min-width:0;
}

.topbar.preview-tools-docked > .preview-floating-tools .preview-switch{
  margin-left:0;
}

.topbar.preview-tools-docked > .main-nav{
  grid-column:3;
  white-space:nowrap;
}

/* Une seule hauteur sticky à gérer : celle du bandeau principal. */
body.preview-tools-in-topbar .course-document{
  --session-sticky-top:calc(var(--app-topbar-height) + 8px);
}

body.preview-tools-in-topbar .rendered-session .session-title{
  scroll-margin-top:calc(var(--app-topbar-height) + 18px);
}

/* Sur une largeur intermédiaire, les outils passent simplement sur
   une seconde ligne DU MÊME bandeau blanc. Ils restent donc sticky
   avec Application Prof et la navigation. */
@media(max-width:1250px){
  .topbar.preview-tools-docked{
    grid-template-columns:auto minmax(0,1fr);
  }

  .topbar.preview-tools-docked > .brand{
    grid-column:1;
    grid-row:1;
  }

  .topbar.preview-tools-docked > .main-nav{
    grid-column:2;
    grid-row:1;
  }

  .topbar.preview-tools-docked > .preview-floating-tools.preview-tools-docked{
    grid-column:1 / -1;
    grid-row:2;
    width:100%;
    justify-content:center;
    flex-wrap:wrap;
  }
}

@media(max-width:760px){

  .topbar.preview-tools-docked > .preview-floating-tools .backlink{
    width:auto;
  }

  .topbar.preview-tools-docked > .preview-floating-tools .preview-switch{
    margin-left:0;
  }
}


/* V0.14.17 — affichage uniforme des sources */
.course-block-source{
  margin-top:12px;
  padding-top:8px;
  border-top:1px solid #d9e2e8;
  color:#5c6976;
  font-size:.86rem;
  line-height:1.45;
}

.course-block-source strong{
  color:#405365;
}

.block-source-field,
.import-source-field{
  margin-top:12px;
}

.block-source-field textarea,
.import-source-field textarea{
  width:100%;
}


/* V0.14.19 — largeurs de rétroprojection */
body.projection-mode.projection-width-narrow .course-document{
  width:min(100%,900px);
  max-width:900px;
  margin-left:auto;
  margin-right:auto;
}

body.projection-mode.projection-width-standard .course-document{
  width:min(100%,1200px);
  max-width:1200px;
  margin-left:auto;
  margin-right:auto;
}

body.projection-mode.projection-width-full .container{
  padding-left:12px;
  padding-right:12px;
}

body.projection-mode.projection-width-full .course-document{
  width:100%;
  max-width:none;
  margin-left:0;
  margin-right:0;
  box-sizing:border-box;
}

.projection-width-control{
  display:flex;
  align-items:center;
  gap:4px;
}

.projection-width-label{
  margin:0 3px 0 1px;
  color:var(--muted);
  font-size:.76rem;
  font-weight:800;
}

body.projection-mode .projection-width-control button{
  padding:7px 9px;
  background:#f3f6f9;
  color:#314b63;
  border-color:#d5dfe7;
}

body.projection-mode .projection-width-control button.active,
body.projection-mode .projection-width-control button[aria-pressed="true"]{
  background:#234b72;
  color:#fff;
  border-color:#234b72;
}

.projection-toolbar-separator{
  width:1px;
  height:26px;
  background:var(--line);
  margin:0 2px;
}

@media(max-width:900px){
  body.projection-mode .projection-toolbar{
    flex-wrap:wrap;
  }

  .projection-width-control{
    flex:1 1 auto;
  }
}

@media(max-width:700px){
  .projection-width-label{
    display:none;
  }

  body.projection-mode .projection-width-control button{
    padding:7px 8px;
    font-size:.75rem;
  }

  .projection-toolbar-separator{
    display:none;
  }
}


/* V0.14.21 — "Afficher les corrections" inclut les tableaux */
body.projection-mode.projection-show-all-corrections
.course-view-student .table-teacher-placeholder{
  display:none;
}

body.projection-mode.projection-show-all-corrections
.course-view-student .table-teacher-value{
  display:inline;
  color:#b42318;
  font-weight:600;
}

/* Le masquage global revient explicitement à l'état élève. */
body.projection-mode:not(.projection-show-all-corrections)
.course-view-student .table-teacher-value{
  display:none;
}

body.projection-mode:not(.projection-show-all-corrections)
.course-view-student .table-teacher-placeholder{
  display:inline;
}


/* V0.14.22 — correction individuelle sous les tableaux incomplets */
/* V0.18.10.82 — meme format que .correction-toggle (largeur et habillage) pour
   que tous les boutons « Afficher la correction » soient identiques d'un type de
   bloc a l'autre. L'etat « correction affichee » plus bas reste distinct. */
.table-correction-toggle{
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  margin-top:10px;
  padding:7px 10px;
  border:1px solid var(--line);
  border-radius:8px;
  background:var(--tone-panel);
  color:var(--primary);
  font-size:.82rem;
  font-weight:800;
  cursor:pointer;
}

.table-correction-toggle:hover{
  background:var(--tone-hover);
}


.course-view-student
.rendered-table_block.table-correction-revealed
.table-teacher-placeholder{
  display:none;
}

.course-view-student
.rendered-table_block.table-correction-revealed
.table-teacher-value{
  display:inline;
  color:#b42318;
  font-weight:600;
}

.course-view-student
.rendered-table_block.table-correction-revealed
.table-correction-toggle{
  background:#234b72;
  color:#fff;
  border-color:#234b72;
}


/* V0.14.24 — barre d'aperçu compacte sur mobile */
@media(max-width:760px){
  .topbar.preview-tools-docked{
    row-gap:4px !important;
    padding-top:6px !important;
    padding-bottom:6px !important;
  }

  .topbar.preview-tools-docked
  > .preview-floating-tools.preview-tools-docked{
    display:flex !important;
    flex-direction:row !important;
    flex-wrap:nowrap !important;
    align-items:center !important;
    justify-content:flex-start !important;
    gap:5px !important;

    width:100% !important;
    margin:0 !important;
    padding:2px 0 !important;

    overflow-x:auto;
    overflow-y:hidden;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:none;
  }

  .topbar.preview-tools-docked
  > .preview-floating-tools.preview-tools-docked::-webkit-scrollbar{
    display:none;
  }

  .topbar.preview-tools-docked
  > .preview-floating-tools.preview-tools-docked > *{
    flex:0 0 auto !important;
    width:auto !important;
    max-width:none !important;
    margin:0 !important;
  }

  .topbar.preview-tools-docked
  .preview-floating-tools .backlink,
  .topbar.preview-tools-docked
  .preview-floating-tools .button,
  .topbar.preview-tools-docked
  .preview-floating-tools button{
    min-height:36px !important;
    padding:6px 9px !important;
    border-radius:8px !important;
    font-size:.82rem !important;
    line-height:1.15 !important;
    white-space:nowrap !important;
  }

  .topbar.preview-tools-docked
  .preview-floating-tools .preview-switch{
    display:flex !important;
    flex:0 0 auto !important;
    width:auto !important;
    min-width:0 !important;
    margin:0 !important;
  }

  .topbar.preview-tools-docked
  .preview-floating-tools .preview-switch button{
    min-width:0 !important;
    min-height:36px !important;
    padding:6px 9px !important;
    font-size:.82rem !important;
  }

  /* Le bouton Top n'a pas besoin d'une grande largeur sur téléphone. */
  .topbar.preview-tools-docked
  .preview-floating-tools > :last-child{
    min-width:38px !important;
  }
}



/* V0.14.26 — impression / PDF A4 */
.print-preview-page{
  background:#e9eef3;
  color:var(--text);
}

.print-preview-toolbar{
  position:sticky;
  top:0;
  z-index:500;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  flex-wrap:wrap;
  padding:12px 16px;
  background:#fff;
  border-bottom:1px solid #d7e0e7;
  box-shadow:0 3px 15px rgba(30,50,70,.08);
}

.print-preview-toolbar .preview-switch{
  margin:0;
}

/* V0.18.12.167 — le bouton « Imprimer » avait la marge haute des boutons (14 px) : à côté d'un autre bouton de la barre (« Diffuser aux élèves »), il paraissait plus bas. */
.print-preview-toolbar button{
  margin-top:0;
  margin-bottom:0;
}

.print-preview-note{
  max-width:210mm;
  margin:14px auto 0;
  padding:10px 14px;
  border:1px solid #cfdbe5;
  border-radius:8px;
  background:color-mix(in srgb,var(--primary) 6%,var(--surface));
  color:#536475;
  font-size:.86rem;
  line-height:1.45;
}

.print-preview-shell{
  width:100%;
  padding:20px 0 40px;
}

.print-course-document{
  width:210mm;
  max-width:calc(100vw - 32px);
  min-height:297mm;
  margin:0 auto;
  padding:18mm 14mm;
  box-sizing:border-box;
  background:#fff;
  border:1px solid #d5dde4;
  box-shadow:0 12px 36px rgba(30,50,70,.12);
}

.print-course-document .session-title{
  position:static!important;
  top:auto!important;
}

.print-course-document .session-title-main{
  cursor:default;
  pointer-events:none;
}

@media(max-width:800px){
  .print-course-document{
    width:100%;
    max-width:100%;
    min-height:0;
    padding:24px 18px;
    border-left:0;
    border-right:0;
  }

  .print-preview-shell{
    padding-top:8px;
  }
}

@media print{
  html,
  body.print-preview-page{
    margin:0!important;
    padding:0!important;
    background:#fff!important;
  }

  body.print-preview-page{
    font-family:Arial,Helvetica,sans-serif;
    font-size:10.5pt;
    line-height:1.42;
    -webkit-print-color-adjust:exact;
    print-color-adjust:exact;
  }

  .print-preview-page .no-print{
    display:none!important;
  }

  .print-preview-shell{
    width:auto!important;
    margin:0!important;
    padding:0!important;
  }

  .print-course-document{
    width:auto!important;
    max-width:none!important;
    min-height:0!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    border-radius:0!important;
    box-shadow:none!important;
    background:#fff!important;
  }

  .print-course-document .course-document-header{
    margin-bottom:8mm;
    padding-bottom:4mm;
  }

  .print-course-document .course-document-header h1{
    font-size:20pt;
    line-height:1.15;
  }

  .print-course-document .badge{
    font-size:8.5pt;
  }

  .print-course-document .document-version{
    margin-bottom:0;
  }

  /* Un titre ne doit pas rester seul en bas de page. */
  .print-course-document h1,
  .print-course-document h2,
  .print-course-document h3,
  .print-course-document h4,
  .print-course-document .course-heading,
  .print-course-document .session-title,
  .print-course-document .rendered-block-label,
  .print-course-document .rendered-block-title{
    break-after:avoid-page;
    page-break-after:avoid;
  }

  .print-course-document .session-title{
    margin-top:8mm;
    margin-bottom:5mm;
    box-shadow:none!important;
  }

  .print-course-document .session-title-main{
    padding:3.2mm 4.2mm;
    font-size:14pt;
    line-height:1.2;
  }

  /* Blocs qui doivent rester entiers autant que possible. */
  .print-course-document .rendered-question,
  .print-course-document .rendered-definition,
  .print-course-document .rendered-learning_objective,
  .print-course-document .rendered-session_objective,
  .print-course-document .rendered-sequence_objectives,
  .print-course-document .rendered-official_objectives,
  .print-course-document .rendered-summary,
  .print-course-document .rendered-key_point,
  .print-course-document .rendered-chapter_summary,
  .print-course-document .rendered-written_trace,
  .print-course-document .rendered-image,
  .print-course-document .rendered-graph,
  .print-course-document .course-media,
  .print-course-document figure,
  .print-course-document .print-keep-together{
    break-inside:avoid-page;
    page-break-inside:avoid;
  }

  /* Les documents longs peuvent se poursuivre sur la page suivante. */
  .print-course-document .rendered-document,
  .print-course-document .rendered-dossier,
  .print-course-document .rendered-text{
    break-inside:auto;
    page-break-inside:auto;
  }

  .print-course-document p,
  .print-course-document li{
    orphans:3;
    widows:3;
  }

  /* Les graphiques/images sont réduits plutôt que coupés. */
  .print-course-document .course-media{
    margin:4mm auto;
  }

  .print-course-document .course-media img,
  .print-course-document .rendered-image img,
  .print-course-document .rendered-graph img{
    display:block;
    max-width:100%!important;
    max-height:215mm!important;
    width:auto;
    height:auto;
    margin-left:auto;
    margin-right:auto;
    object-fit:contain;
    break-inside:avoid-page;
    page-break-inside:avoid;
  }

  /* Un tableau peut passer sur plusieurs pages, mais jamais au milieu d'une ligne. */
  .print-course-document .rendered-table_block,
  .print-course-document .table-scroll,
  .print-course-document .course-table{
    break-inside:auto;
    page-break-inside:auto;
  }

  .print-course-document .table-scroll{
    overflow:visible!important;
  }

  .print-course-document .course-table{
    width:100%!important;
    font-size:9.2pt;
    margin:3mm 0;
  }

  .print-course-document .course-table thead{
    display:table-header-group;
  }

  .print-course-document .course-table tbody{
    display:table-row-group;
  }

  .print-course-document .course-table tr{
    break-inside:avoid-page;
    page-break-inside:avoid;
  }

  .print-course-document .course-table th,
  .print-course-document .course-table td{
    padding:2mm 2.4mm;
  }

  .print-course-document .table-correction-toggle,
  .print-course-document .correction-toggle{
    display:none!important;
  }

  .print-course-document .course-block-source{
    break-before:avoid-page;
    page-break-before:avoid;
  }

  .print-course-document .course-toc{
    break-inside:auto;
    page-break-inside:auto;
  }

  .print-course-document .course-toc h2{
    break-after:avoid-page;
  }

  .print-course-document .print-page-break-before{
    break-before:page!important;
    page-break-before:always!important;
  }

  .print-course-document .print-page-break-after{
    break-after:page!important;
    page-break-after:always!important;
  }

  /* Évite les gros effets web peu utiles sur papier. */
  .print-course-document .rendered-block{
    box-shadow:none!important;
  }

  .print-course-document a{
    color:inherit!important;
    text-decoration:none!important;
  }
}


/* V0.14.27 — repère temporaire après passage Aperçu -> Édition */
.lesson-block.edit-focus-target{
  outline:3px solid rgba(35,75,114,.28);
  outline-offset:3px;
  box-shadow:
    0 0 0 6px rgba(35,75,114,.06),
    var(--shadow);
  transition:outline-color .35s ease,box-shadow .35s ease;
}


/* V0.14.32 — retour Aperçu ↔ Édition au même bloc */
.course-document [id^="block-"]{
  scroll-margin-top:calc(var(--app-topbar-height, 72px) + 88px);
}

@media(max-width:760px){
  .course-document [id^="block-"]{
    scroll-margin-top:calc(var(--app-topbar-height, 72px) + 62px);
  }
}


/* V0.14.33 — titre explicite des blocs lorsqu'il est utilisé */
.block-title-editor-field{
  margin-top:10px;
  margin-bottom:10px;
}

.block-title-editor-field input{
  margin-top:5px;
}

/* V0.14.43 — corrections individuelles cohérentes en vue Élève */
.course-view-student
.rendered-question:has(.question-teacher-answer)
.correction-toggle,
.course-view-student
.rendered-fill_blank:has(.fill-blank-teacher-correction)
.correction-toggle,
.course-view-student
.rendered-summary:has(.fill-blank-teacher-correction)
.correction-toggle{
  display:inline-block;
}

.course-view-student .question-teacher-answer.is-revealed,
.course-view-student .fill-blank-teacher-correction.is-revealed{
  display:block;
}


/* V0.14.44 — marqueur de fin de séance et corrections globales robustes */
.teaching-marker-widget{
  position:fixed;
  right:18px;
  bottom:20px;
  z-index:135;
  width:min(390px,calc(100vw - 24px));
  padding:9px;
  border:1px solid #cbd9e5;
  border-radius:14px;
  background:color-mix(in srgb,var(--surface) 96%,transparent);
  box-shadow:0 12px 34px rgba(22,45,68,.20);
  backdrop-filter:blur(8px);
}
.teaching-marker-main{display:flex;align-items:center;gap:7px}
.teaching-marker-main button{margin:0;white-space:nowrap}
.teaching-marker-save{flex:1;background:#234b72;color:#fff;font-weight:800}
.teaching-marker-return{background:#eef3f7;color:#234b72;border:1px solid #cbd9e5;font-weight:750}
.teaching-marker-menu-toggle{width:38px;padding-left:0;padding-right:0;background:#eef3f7;color:#234b72;border:1px solid #cbd9e5;font-weight:900}
/* V0.18.11.67 — ces trois boutons ecrivent leur repos en dur et n'avaient pas de survol : ils
   prenaient celui de tous les boutons, var(--primary2), qui suit le theme. « Fin de seance ici »
   (blanc) passait sous le sarcelle clair de la nuit (2,06) ; « Derniere fin » et « ⋯ » (bleu
   marine) sous le bleu nuit du Classique (1,35) et le petrole fonce (1,13). Survol en dur, comme
   le repos. */
.teaching-marker-save:hover{background:#183754}
.teaching-marker-return:hover,.teaching-marker-menu-toggle:hover{background:#e1ebf2}
/* V0.18.11.27 — ces deux regles ne posent pas de fond : elles s'appuient sur le
   panneau qui les entoure, devenu sombre. Leur couleur doit donc suivre le theme. */
.teaching-marker-status{display:flex;gap:8px;align-items:center;justify-content:space-between;margin-top:7px;padding:0 3px;color:var(--muted);font-size:.76rem}
.teaching-marker-status strong{color:var(--text);max-width:45%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.teaching-marker-menu{position:absolute;right:8px;bottom:calc(100% + 7px);width:min(340px,calc(100vw - 32px));padding:9px;border:1px solid #cbd9e5;border-radius:12px;background:var(--surface);box-shadow:0 12px 34px rgba(22,45,68,.20)}
.teaching-marker-menu>button{width:100%;margin:0 0 6px;text-align:left;background:#f7f9fb;color:#234b72;border:1px solid #d9e2ea}
.teaching-marker-menu>button.danger-text{color:#b42318}
/* V0.18.12.259 — la ligne d'ÉTAT « ✔ Chapitre terminé le … » du menu ⋯ (même vert que la pastille de la Progression) */
.teaching-marker-chapter-line{margin:0 0 6px;padding:7px 9px;border-radius:8px;background:#d1fadf;color:#067647;font-size:.84rem;font-weight:800;line-height:1.35}
.teaching-marker-chapter-line[hidden]{display:none}
.teaching-marker-history{display:grid;gap:4px;margin-top:7px;padding-top:8px;border-top:1px solid #e4e9ee}
.teaching-marker-history>strong{font-size:.78rem;color:#475467}
.teaching-marker-history-row{display:flex;flex-direction:column;gap:1px;padding:6px 7px;border-radius:7px;color:var(--primary);text-decoration:none;background:var(--tone-soft)}
/* V0.18.11.65 — le repos suit le theme depuis la V0.18.11.27 (--tone-soft, --primary) : le survol
   aussi. Laisse a #edf3f7, il s'allumait en mode nuit sous le texte sarcelle (2,3 de contraste).
   La seconde ligne suit aussi, par --muted (#667085 en Classique, inchange) : restee en dur,
   elle tombait a 2,8 sur ce survol sombre. */
.teaching-marker-history-row:hover{background:var(--tone-hover)}
.teaching-marker-history-row small{color:var(--muted)}
.teaching-marker-history-row.is-deleted{opacity:.55;text-decoration:line-through}
.teaching-marker-widget.is-busy{opacity:.78}
.teaching-marker-widget.has-error{border-color:#d92d20}
.teaching-end-marker-target{position:relative;outline:3px solid rgba(208,139,24,.45);outline-offset:4px}
.teaching-end-marker-target::before{content:'📍 fin de séance';position:absolute;right:8px;top:-17px;z-index:6;padding:3px 7px;border-radius:999px;background:#fff4d6;color:#8a5a00;border:1px solid #e3bd68;font-size:.72rem;font-weight:800;line-height:1.2}
body.projection-mode .teaching-marker-widget{right:20px;bottom:68px;z-index:140}
body.projection-mode .teaching-marker-status{display:none}
body.projection-mode .teaching-marker-widget{width:auto;max-width:min(390px,calc(100vw - 24px))}
body.projection-mode .teaching-marker-save{font-size:.88rem}

/* V0.18.10.57 — reprises depuis assets/css/marker-history.css (jamais chargee sur ces pages) :
   la note facultative de fin de seance et le lien vers l'historique complet etaient donc
   invisibles (element present dans le DOM mais sans mise en forme, position:static). */
.teaching-marker-note-panel{position:fixed;right:18px;bottom:92px;z-index:990;width:min(390px,calc(100vw - 24px));box-sizing:border-box;padding:12px;border:1px solid #cbd9e5;border-radius:14px;background:color-mix(in srgb,var(--surface) 98%,transparent);box-shadow:0 14px 38px rgba(22,45,68,.24);backdrop-filter:blur(8px)}
.teaching-marker-note-panel[hidden]{display:none!important}
.teaching-marker-note-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:9px}
.teaching-marker-note-head strong{color:#234b72}
.teaching-marker-note-head button{flex:0 0 auto;width:32px;height:32px;margin:0;padding:0;display:grid;place-items:center;background:#f5f7f9;color:#475467;border:1px solid #d9e2ea}
.teaching-marker-note-panel label{margin:0}
.teaching-marker-note-panel label>span{display:block;margin-bottom:6px;color:var(--muted);font-size:.82rem;font-weight:700}
.teaching-marker-note-panel label small{font-weight:500;color:#667085}
.teaching-marker-note-panel textarea{width:100%;min-height:76px;resize:vertical;margin:0;box-sizing:border-box}
.teaching-marker-note-actions{display:flex;justify-content:flex-end;gap:7px;margin-top:8px}
.teaching-marker-note-actions button{margin:0}
/* V0.18.12.28 — la classe et l'endroit enregistrés, et « ↶ Annuler ce point » sur sa propre ligne,
   au-dessus des deux boutons de la note (à trois sur 390 px, les libellés passaient sur deux lignes).
   V0.18.12.29 (demande du concepteur) — « Pas de note » et « Enregistrer la note » se partagent la ligne
   en deux moitiés, sur la même largeur que « Annuler ce point ». */
.teaching-marker-note-where{margin:-4px 0 9px;color:var(--text);font-size:.82rem;font-weight:700;overflow-wrap:anywhere}
.teaching-marker-note-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
.teaching-marker-note-actions .teaching-marker-undo{grid-column:1/-1}
.teaching-marker-note-status{display:block;min-height:1.1em;margin-top:6px;color:var(--muted);font-size:.75rem}
/* V0.18.12.78.1 — une phrase à lire (ligne « Chapitre terminé » du Journal ajoutée ou retirée, ou une erreur) : plus grande et à la couleur du texte. */
.teaching-marker-note-status:not(:empty){font-size:.84rem;line-height:1.4;color:var(--text);overflow-wrap:anywhere}
body.projection-mode .teaching-marker-note-panel{bottom:calc(var(--presentation-projection-bottom,66px) + 14px);z-index:995}
.teaching-marker-history-full-link,.presentation-history-full-link{display:block;margin-top:7px;padding:7px 8px;border-radius:7px;color:#234b72;background:#eef4f8;text-decoration:none;font-size:.78rem;font-weight:800}
/* V0.18.11.65 — repos ecrit en dur (pastille claire, texte bleu marine, dans tous les themes) : le
   survol aussi, comme avant la V0.18.11.27. Avec --tone-hover, il devenait sombre en mode nuit
   sous le texte bleu marine (1,5 de contraste). */
.teaching-marker-history-full-link:hover,.presentation-history-full-link:hover{background:#e1ebf2}

/* Le bouton global pilote explicitement tous les formats de correction. */
body.projection-mode.projection-show-all-corrections .course-view-student .question-teacher-answer,
body.projection-mode.projection-show-all-corrections .course-view-student .fill-blank-teacher-correction{
  display:block!important;
}
body.projection-mode:not(.projection-show-all-corrections) .course-view-student .question-teacher-answer,
body.projection-mode:not(.projection-show-all-corrections) .course-view-student .fill-blank-teacher-correction{
  display:none;
}
body.projection-mode.projection-show-all-corrections .course-view-student .rendered-table_block .table-teacher-placeholder,
body.projection-mode .course-view-student .rendered-table_block.table-correction-revealed .table-teacher-placeholder{
  display:none!important;
}
body.projection-mode.projection-show-all-corrections .course-view-student .rendered-table_block .table-teacher-value,
body.projection-mode .course-view-student .rendered-table_block.table-correction-revealed .table-teacher-value{
  display:inline!important;
  color:#b42318;
  font-weight:600;
}
body.projection-mode:not(.projection-show-all-corrections) .course-view-student .rendered-table_block:not(.table-correction-revealed) .table-teacher-value{
  display:none!important;
}
body.projection-mode:not(.projection-show-all-corrections) .course-view-student .rendered-table_block:not(.table-correction-revealed) .table-teacher-placeholder{
  display:inline!important;
}

@media(max-width:760px){
  .teaching-marker-widget{right:8px;bottom:8px;width:calc(100vw - 16px)}
  .teaching-marker-status{font-size:.7rem}
  .teaching-marker-main{gap:5px}
  .teaching-marker-main button{padding:8px 9px;font-size:.78rem}
  body.projection-mode .teaching-marker-widget{right:8px;bottom:58px}
}
@media print{.teaching-marker-widget{display:none!important}}

/* V0.14.45 — correctif rétroprojection : corrections des questions */
body.projection-mode .course-view-student .rendered-question .question-teacher-answer.is-revealed,
body.projection-mode.projection-show-all-corrections .course-view-student .rendered-question .question-teacher-answer{
  display:block!important;
}
body.projection-mode:not(.projection-show-all-corrections)
.course-view-student .rendered-question .question-teacher-answer:not(.is-revealed){
  display:none!important;
}


/* Application Prof V0.14.47 — interface de pilotage des aperçus / rétroprojection */

:root{
  --presentation-projection-top:46px;
  --presentation-projection-bottom:66px;
  --projection-font-scale:1;
}

/* Le petit retour en haut devient un contrôle indépendant et discret. */
body.presentation-ui-v01447 .top-floating-button,
body.presentation-ui-v01447 .projection-top-button{
  display:none!important;
}

.presentation-top-button{
  position:fixed;
  right:14px;
  bottom:14px;
  z-index:980;
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  margin:0;
  padding:0;
  border:1px solid var(--line);
  border-radius:9px;
  background:color-mix(in srgb,var(--surface) 94%,transparent);
  /* V0.18.11.27 — le fond suit le theme depuis cette version : la couleur du
     texte doit suivre avec, sinon le chevron reste bleu nuit sur bleu nuit. */
  color:var(--primary);
  box-shadow:0 6px 18px rgba(22,45,68,.14);
  backdrop-filter:blur(8px);
  font-size:1rem;
  font-weight:900;
  line-height:1;
  opacity:.86;
}
.presentation-top-button:hover,
.presentation-top-button:focus{
  background:var(--surface);
  opacity:1;
  outline:2px solid rgba(35,75,114,.18);
}

/* Aperçu normal : barre principale plus lisible, actions mieux regroupées. */
body.presentation-ui-v01447:not(.projection-mode) .topbar.preview-tools-docked{
  border-bottom-color:#cbd7e2;
  box-shadow:0 3px 14px rgba(22,45,68,.06);
}
body.presentation-ui-v01447:not(.projection-mode)
.topbar.preview-tools-docked > .preview-floating-tools.preview-tools-docked{
  gap:7px;
  justify-content:flex-start;
  overflow-x:auto;
  scrollbar-width:thin;
}
body.presentation-ui-v01447:not(.projection-mode)
.topbar.preview-tools-docked > .preview-floating-tools .boundary-edit-help{
  display:none;
}
body.presentation-ui-v01447:not(.projection-mode)
.topbar.preview-tools-docked > .preview-floating-tools .button,
body.presentation-ui-v01447:not(.projection-mode)
.topbar.preview-tools-docked > .preview-floating-tools button,
body.presentation-ui-v01447:not(.projection-mode)
.topbar.preview-tools-docked > .preview-floating-tools .backlink{
  white-space:nowrap;
}
body.presentation-ui-v01447:not(.projection-mode)
.topbar.preview-tools-docked > .preview-floating-tools .projection-button{
  background:#234b72;
  color:#fff;
}

/* La nouvelle rétroprojection ne laisse que deux vraies barres fixes. */
.presentation-projection-context,
.presentation-projection-bar,
.presentation-projection-menu,
.presentation-projection-toast{
  display:none;
}

body.projection-mode.presentation-ui-v01447{
  --session-sticky-top:calc(var(--presentation-projection-top) + 8px);
}

body.projection-mode.presentation-ui-v01447 .projection-toolbar,
body.projection-mode.presentation-ui-v01447 .teaching-marker-widget{
  display:none!important;
}

body.projection-mode.presentation-ui-v01447 .container{
  max-width:none!important;
  padding-bottom:calc(var(--presentation-projection-bottom) + 24px)!important;
}
body.projection-mode.presentation-ui-v01447 .course-document{
  padding-top:20px!important;
  padding-bottom:30px!important;
  font-size:calc(1rem * var(--projection-font-scale));
}
body.projection-mode.presentation-ui-v01447 .course-document-header{
  padding-right:0!important;
  padding-top:0!important;
}

/* Le titre de séance reste dans le document, mais n'ajoute plus une troisième barre sticky. */
body.projection-mode.presentation-ui-v01447 .rendered-session .session-title{
  position:relative!important;
  top:auto!important;
  z-index:1!important;
}

.presentation-projection-context{
  position:fixed;
  top:0;
  left:0;
  right:0;
  z-index:960;
  min-height:var(--presentation-projection-top);
  padding:7px 18px;
  align-items:center;
  gap:12px;
  border-bottom:1px solid rgba(203,215,226,.95);
  background:color-mix(in srgb,var(--surface) 96%,transparent);
  box-shadow:0 4px 14px rgba(22,45,68,.08);
  backdrop-filter:blur(10px);
}
.presentation-context-class{
  flex:0 0 auto;
  max-width:24vw;
  padding:4px 8px;
  border-radius:999px;
  background:#e8f0f7;
  color:#234b72;
  font-size:.8rem;
  font-weight:850;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.presentation-context-session{
  min-width:0;
  flex:1;
  color:var(--text);
  font-size:.92rem;
  font-weight:800;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.presentation-context-view{
  flex:0 0 auto;
  color:var(--muted);
  font-size:.76rem;
  font-weight:750;
  white-space:nowrap;
}

.presentation-projection-bar{
  position:fixed;
  left:0;
  right:0;
  bottom:0;
  z-index:970;
  min-height:var(--presentation-projection-bottom);
  padding:8px 14px max(8px,env(safe-area-inset-bottom));
  align-items:center;
  justify-content:center;
  gap:8px;
  border-top:1px solid rgba(195,208,220,.96);
  background:rgba(248,250,252,.97);
  box-shadow:0 -7px 22px rgba(22,45,68,.12);
  backdrop-filter:blur(10px);
  overflow-x:auto;
  scrollbar-width:none;
}
.presentation-projection-bar::-webkit-scrollbar{display:none}
body.projection-mode.presentation-ui-v01447 .presentation-projection-bar{
  display:flex;
}
.presentation-projection-bar button{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  min-height:42px;
  margin:0;
  padding:9px 13px;
  border:1px solid #cbd7e2;
  border-radius:10px;
  background:var(--surface);
  color:var(--primary);
  font-size:.88rem;
  font-weight:800;
  line-height:1.1;
  white-space:nowrap;
}
.presentation-projection-bar button:hover,
.presentation-projection-bar button:focus{
  background:#eef4f8;
  outline:none;
}
.presentation-projection-bar .presentation-control-primary{
  border-color:#234b72;
  background:#234b72;
  color:#fff;
}
.presentation-projection-bar .presentation-control-primary:hover,
.presentation-projection-bar .presentation-control-primary:focus{
  background:#183754;
}
.presentation-projection-bar .presentation-control-marker{
  border-color:#b7791f;
  background:#fff4d6;
  color:#7a4d00;
  font-weight:900;
}
.presentation-projection-bar button:disabled{
  opacity:.42;
  cursor:not-allowed;
}

.presentation-font-controls{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  gap:3px;
  padding:3px;
  border:1px solid #cbd7e2;
  border-radius:11px;
  background:var(--surface);
}
.presentation-projection-bar .presentation-font-controls button{
  min-width:39px;
  min-height:36px;
  padding:6px 9px;
  border:0;
  border-radius:8px;
  background:transparent;
}
.presentation-font-value{
  min-width:48px;
  text-align:center;
  color:var(--muted);
  font-size:.76rem;
  font-weight:850;
  user-select:none;
}

.presentation-projection-menu{
  position:fixed;
  right:14px;
  bottom:calc(var(--presentation-projection-bottom) + 10px);
  z-index:985;
  width:min(370px,calc(100vw - 28px));
  max-height:calc(100vh - var(--presentation-projection-top) - var(--presentation-projection-bottom) - 30px);
  overflow:auto;
  padding:12px;
  border:1px solid #cbd7e2;
  border-radius:14px;
  background:var(--surface);
  box-shadow:0 16px 38px rgba(22,45,68,.20);
}
body.projection-mode.presentation-ui-v01447 .presentation-projection-menu.is-open{
  display:block;
}
.presentation-menu-section + .presentation-menu-section{
  margin-top:12px;
  padding-top:11px;
  border-top:1px solid #e4eaf0;
}
.presentation-menu-title{
  display:block;
  margin-bottom:7px;
  color:var(--muted);
  font-size:.74rem;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.04em;
}
.presentation-menu-buttons{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}
.presentation-projection-menu button,
.presentation-projection-menu a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin:0;
  padding:8px 10px;
  border:1px solid #d6e0e8;
  border-radius:9px;
  background:#f7f9fb;
  color:#234b72;
  font:inherit;
  font-size:.82rem;
  font-weight:780;
  text-decoration:none;
  cursor:pointer;
}
.presentation-projection-menu button.is-active{
  background:#234b72;
  border-color:#234b72;
  color:#fff;
}
/* V0.18.11.67 — le bouton a un fond clair ecrit en dur (#f7f9fb) : son rouge aussi. Le rouge
   de la nuit (#e07a76), fait pour un fond sombre, n'y donnait que 2,76. */
.presentation-projection-menu button.danger-text{
  color:#b42318;
}
.presentation-menu-history{
  display:grid;
  gap:5px;
}
.presentation-menu-history a{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:2px;
}
/* V0.18.11.67 — la ligne a le fond clair ecrit en dur des boutons du menu (#f7f9fb) : son gris
   aussi. var(--muted) donnait #9cabb8 en mode nuit, 2,23 de contraste (seconde ligne des
   marqueurs de l'« Historique recent » de la retroprojection). */
.presentation-menu-history small{
  color:#667085;
  font-weight:600;
}
.presentation-menu-empty{
  color:var(--muted);
  font-size:.8rem;
}

.presentation-projection-toast{
  position:fixed;
  left:50%;
  bottom:calc(var(--presentation-projection-bottom) + 14px);
  z-index:990;
  transform:translateX(-50%);
  max-width:min(520px,calc(100vw - 32px));
  padding:9px 13px;
  border:1px solid #c9d9e6;
  border-radius:999px;
  background:var(--surface);
  color:var(--primary);
  box-shadow:0 8px 26px rgba(22,45,68,.16);
  font-size:.84rem;
  font-weight:800;
  text-align:center;
}
body.projection-mode.presentation-ui-v01447 .presentation-projection-toast.is-visible{
  display:block;
}
.presentation-projection-toast.is-error{
  border-color:#f0b8b4;
  color:var(--danger);
}

body.projection-mode.presentation-ui-v01447 .presentation-top-button{
  right:14px;
  bottom:calc(var(--presentation-projection-bottom) + 12px);
  z-index:975;
}

/* Zoom pédagogique : seul le contenu du cours grandit. */
body.projection-mode.presentation-ui-v01447 .course-document p,
body.projection-mode.presentation-ui-v01447 .course-document li,
body.projection-mode.presentation-ui-v01447 .course-document blockquote,
body.projection-mode.presentation-ui-v01447 .course-document .rendered-question > :not(.correction-toggle),
body.projection-mode.presentation-ui-v01447 .course-document .question-teacher-answer,
body.projection-mode.presentation-ui-v01447 .course-document .fill-blank-teacher-correction{
  line-height:1.55;
}
body.projection-mode.presentation-ui-v01447 .course-document-header h1{
  font-size:calc(2rem * var(--projection-font-scale));
}
body.projection-mode.presentation-ui-v01447 .course-document h2{
  font-size:calc(1.5rem * var(--projection-font-scale));
}
body.projection-mode.presentation-ui-v01447 .course-document h3{
  font-size:calc(1.2rem * var(--projection-font-scale));
}
/* V0.18.12.27 — le titre de sous-sous-partie (« 1. », heading_3, rendu en h4) et le libellé des blocs
   (« Graphique / schéma (image) », « Définition »…) restaient à leur taille quand on agrandit : à 175 %,
   « 1. Première étape » (17 px) passait sous le texte (28 px) et sous le titre du bloc (29 px) qu'il
   chapeaute. Mêmes tailles de base qu'à l'écran (.heading-level-3, .rendered-block-label). */
body.projection-mode.presentation-ui-v01447 .course-document .heading-level-3{
  font-size:calc(1.08rem * var(--projection-font-scale));
}
body.projection-mode.presentation-ui-v01447 .course-document .rendered-block-label{
  font-size:calc(.78rem * var(--projection-font-scale));
}
/* Même oubli pour la légende d'une image et la ligne « Source » d'un document (.course-media
   figcaption, .course-block-source) : 14 px quel que soit le cran. */
body.projection-mode.presentation-ui-v01447 .course-document .course-media figcaption{
  font-size:calc(.88rem * var(--projection-font-scale));
}
body.projection-mode.presentation-ui-v01447 .course-document .course-block-source{
  font-size:calc(.86rem * var(--projection-font-scale));
}
/* Et pour le code (en-tête et texte), l'adresse d'un lien externe, le lien d'une vidéo, « Voir les
   données » d'un graphique et la liste des relations d'un schéma. Restent fixes, par nature : les
   textes dessinés dans les graphiques et schémas (ils suivent la largeur du dessin), l'icône d'un
   lien (dans sa pastille de 34 px) et les tailles choisies dans l'éditeur de texte (en px). */
body.projection-mode.presentation-ui-v01447 .course-document .course-code-head{
  font-size:calc(.82rem * var(--projection-font-scale));
}
body.projection-mode.presentation-ui-v01447 .course-document .course-code-block pre{
  font-size:calc(.92rem * var(--projection-font-scale));
}
body.projection-mode.presentation-ui-v01447 .course-document .course-external-link-url{
  font-size:calc(.82rem * var(--projection-font-scale));
}
body.projection-mode.presentation-ui-v01447 .course-document .course-video-link{
  font-size:calc(.92rem * var(--projection-font-scale));
}
body.projection-mode.presentation-ui-v01447 .course-document .course-genially-launch strong{
  font-size:calc(1.05rem * var(--projection-font-scale));
}
body.projection-mode.presentation-ui-v01447 .course-document .course-genially-launch small,
body.projection-mode.presentation-ui-v01447 .course-document .course-genially-link{
  font-size:calc(.92rem * var(--projection-font-scale));
}
body.projection-mode.presentation-ui-v01447 .course-document .course-cartes-nom{
  font-size:calc(1.05rem * var(--projection-font-scale));
}
body.projection-mode.presentation-ui-v01447 .course-document .course-cartes-nombre,
body.projection-mode.presentation-ui-v01447 .course-document .course-cartes-lien,
body.projection-mode.presentation-ui-v01447 .course-document .course-cartes-indispo{
  font-size:calc(.92rem * var(--projection-font-scale));
}
body.projection-mode.presentation-ui-v01447 .course-document .data-chart-data{
  font-size:calc(.9rem * var(--projection-font-scale));
}
body.projection-mode.presentation-ui-v01447 .course-document .node-diagram-relations{
  font-size:calc(.9rem * var(--projection-font-scale));
}
body.projection-mode.presentation-ui-v01447 .course-document .session-title,
body.projection-mode.presentation-ui-v01447 .course-document .session-title-main{
  font-size:calc(1.05rem * var(--projection-font-scale));
}
/* V0.18.11.26 — les TITRES DE BLOCS suivaient A+ / A− ... mais pas du tout :
   mesure a l'echelle 1,3 sur un cours reel, le contenu passait de 16 a 20,8 px
   et le titre du bloc restait a 16,8. Un titre plus petit que son propre texte
   au fond de la classe, c'est l'inverse de ce que la commande promet.
   Meme taille de base que .session-title (1.05rem), donc meme mise a l'echelle. */
body.projection-mode.presentation-ui-v01447 .course-document .rendered-block-title,
body.projection-mode.presentation-ui-v01447 .course-document .block-title{
  font-size:calc(1.05rem * var(--projection-font-scale));
}
body.projection-mode.presentation-ui-v01447 .course-document .course-table th,
body.projection-mode.presentation-ui-v01447 .course-document .course-table td{
  font-size:calc(.96rem * var(--projection-font-scale));
  line-height:1.42;
  white-space:normal!important;
  overflow-wrap:anywhere;
}
body.projection-mode.presentation-ui-v01447 .course-document .course-table{
  max-width:100%;
}
body.projection-mode.presentation-ui-v01447 .course-document .table-scroll{
  max-width:100%;
  overflow-x:auto;
}

/* Les commandes pédagogiques individuelles restent discrètes : le contenu domine. */
body.projection-mode.presentation-ui-v01447 .correction-toggle,
body.projection-mode.presentation-ui-v01447 .table-correction-toggle{
  border-radius:8px!important;
  box-shadow:none!important;
}

@media(max-width:1050px){
  .presentation-projection-bar{justify-content:flex-start}
  .presentation-control-label-long{display:none}
  .presentation-context-class{max-width:30vw}
}

@media(max-width:760px){
  :root{
    --presentation-projection-top:42px;
    --presentation-projection-bottom:60px;
  }
  .presentation-projection-context{padding:6px 10px;gap:8px}
  .presentation-context-class{max-width:34vw;font-size:.72rem}
  .presentation-context-session{font-size:.8rem}
  .presentation-context-view{display:none}
  .presentation-projection-bar{padding-left:8px;padding-right:8px;gap:5px}
  .presentation-projection-bar button{min-height:38px;padding:7px 9px;font-size:.78rem}
  .presentation-font-controls{gap:1px}
  .presentation-projection-bar .presentation-font-controls button{min-width:34px;padding:5px 7px}
  .presentation-font-value{min-width:42px;font-size:.7rem}
  .presentation-control-label{display:none}
  .presentation-projection-menu{right:8px;width:calc(100vw - 16px)}
  .presentation-top-button{right:8px;bottom:8px;width:32px;height:32px}
  body.projection-mode.presentation-ui-v01447 .presentation-top-button{right:8px}
  body.projection-mode.presentation-ui-v01447 .container{padding-left:8px!important;padding-right:8px!important}
  body.projection-mode.presentation-ui-v01447 .course-document{padding-left:10px!important;padding-right:10px!important}
}

@media print{
  .presentation-top-button,
  .presentation-projection-context,
  .presentation-projection-bar,
  .presentation-projection-menu,
  .presentation-projection-toast{display:none!important}
}


/* Application Prof V0.14.48 — choix rapide du contexte de fin de séance. */
.marker-context-chooser{
  display:none;
  position:fixed;
  inset:0;
  z-index:320;
  background:rgba(15,23,42,.28);
  align-items:flex-end;
  justify-content:center;
  padding:18px;
}
.marker-context-chooser.is-open{display:flex}
.marker-context-chooser-card{
  width:min(520px,calc(100vw - 28px));
  max-height:min(70vh,520px);
  overflow:auto;
  background:var(--surface);
  border:1px solid #cbd5e1;
  border-radius:16px;
  box-shadow:0 22px 60px rgba(15,23,42,.25);
  padding:14px;
}
.marker-context-chooser-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
  color:var(--text);
}
.marker-context-chooser-head>button{
  width:36px;
  height:36px;
  padding:0;
  border-radius:10px;
  background:var(--tone-soft);
  color:var(--text);
  border:1px solid #cbd5e1;
  font-size:1.25rem;
}
.marker-context-chooser-options{display:grid;gap:8px}
.marker-context-chooser-options button{
  width:100%;
  margin:0;
  padding:12px 14px;
  text-align:left;
  background:var(--tone-soft);
  color:var(--primary);
  border:1px solid #cbd9e5;
  border-radius:10px;
  font-weight:800;
}
.marker-context-chooser-options button:hover,
.marker-context-chooser-options button:focus-visible{
  background:var(--tone-hover);
  border-color:#7aa4c8;
}
body.projection-mode .marker-context-chooser{
  padding-bottom:calc(var(--presentation-projection-bottom,64px) + 18px);
}
@media (min-width:700px){
  .marker-context-chooser{align-items:center}
  body.projection-mode .marker-context-chooser{padding-bottom:18px}
}
@media print{.marker-context-chooser{display:none!important}}


/* Application Prof V0.14.49 — finitions visuelles de la rétroprojection. */

/* Teinte discrète et translucide : le contenu reste visuellement prioritaire. */
body.projection-mode.presentation-ui-v01447 .presentation-projection-context{
  background:rgba(231,240,248,.88);
  border-bottom-color:rgba(98,136,170,.28);
  box-shadow:0 4px 16px rgba(35,75,114,.08);
}
body.projection-mode.presentation-ui-v01447 .presentation-projection-bar{
  background:rgba(238,245,250,.91);
  border-top-color:rgba(98,136,170,.30);
  box-shadow:0 -7px 22px rgba(35,75,114,.10);
}
body.projection-mode.presentation-ui-v01447 .presentation-projection-bar button,
body.projection-mode.presentation-ui-v01447 .presentation-font-controls{
  background:color-mix(in srgb,var(--surface) 84%,transparent);
}
body.projection-mode.presentation-ui-v01447 .presentation-projection-bar .presentation-control-primary{
  background:#234b72;
}
body.projection-mode.presentation-ui-v01447 .presentation-projection-bar .presentation-control-marker{
  background:rgba(255,244,214,.92);
}

/* Les boutons de correction individuels deviennent secondaires en rétroprojection. */
body.projection-mode.presentation-ui-v01447 .correction-toggle,
body.projection-mode.presentation-ui-v01447 .table-correction-toggle{
  padding:4px 7px!important;
  border-color:rgba(54,88,115,.18)!important;
  background:rgba(245,247,249,.58)!important;
  color:rgba(54,88,115,.82)!important;
  font-size:.70rem!important;
  font-weight:700!important;
  opacity:.72;
  transition:opacity .15s ease,background .15s ease,border-color .15s ease;
}
body.projection-mode.presentation-ui-v01447 .correction-toggle:hover,
body.projection-mode.presentation-ui-v01447 .correction-toggle:focus-visible,
body.projection-mode.presentation-ui-v01447 .table-correction-toggle:hover,
body.projection-mode.presentation-ui-v01447 .table-correction-toggle:focus-visible{
  opacity:1;
  background:rgba(238,244,248,.94)!important;
  border-color:rgba(54,88,115,.34)!important;
}

/* Aperçu normal : alléger l'information secondaire du marqueur une fois la classe connue. */
body.presentation-ui-v01447:not(.projection-mode)
[data-teaching-marker-widget][data-marker-context-missing="0"] .teaching-marker-status span{
  font-size:.68rem;
  opacity:.62;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width:190px;
}

/* En aperçu normal seulement, le petit ↑ se place au-dessus du widget de fin de séance.
   La hauteur réelle est fournie par le JS ; aucun changement en rétroprojection. */
body.presentation-ui-v01447:not(.projection-mode).presentation-has-normal-marker
.presentation-top-button{
  bottom:calc(18px + var(--presentation-normal-marker-height,0px) + 10px);
}
/* V0.18.12.29 (demande du concepteur) — au-dessus de la boîte, le ↑ repoussait la note de reprise plus
   haut, séparée de la boîte. Il se place désormais à GAUCHE de la boîte, au ras de son bas, quand la
   place le permet (projection-ui.js mesure la boîte, y compris sur tablette où elle est placée par
   VisualViewport) ; sinon il reste au-dessus. La note de reprise revient juste au-dessus de la boîte. */
body.presentation-ui-v01447:not(.projection-mode).presentation-has-normal-marker.presentation-top-beside-marker
.presentation-top-button{
  right:var(--presentation-top-right,14px);
  bottom:var(--presentation-top-bottom,14px);
}
/* À gauche de la boîte, il tomberait sur la carte « Fin de séance — pour quelle classe ? » (centrée en
   bas, sous lui dans l'empilement) : masqué tant qu'elle est ouverte, comme la note de reprise. */
body:has(.marker-context-chooser.is-open) .presentation-top-button{visibility:hidden}


/* V0.14.50 — mise en page des images et graphiques
   L'alignement s'applique à l'ensemble titre + média + légende/source.
   Les anciens blocs sans réglage sont rendus à gauche, largeur moyenne. */

.media-layout-controls{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  margin-top:4px;
}

.rendered-image.media-layout,
.rendered-graph.media-layout{
  --course-media-width:min(100%,680px);
}

.rendered-image.media-width-small,
.rendered-graph.media-width-small{
  --course-media-width:min(100%,420px);
}

.rendered-image.media-width-medium,
.rendered-graph.media-width-medium{
  --course-media-width:min(100%,680px);
}

.rendered-image.media-width-large,
.rendered-graph.media-width-large{
  --course-media-width:min(100%,980px);
}

.rendered-image.media-width-full,
.rendered-graph.media-width-full{
  --course-media-width:100%;
}

.rendered-image.media-layout .rendered-block-title,
.rendered-graph.media-layout .rendered-block-title,
.rendered-image.media-layout .course-block-source,
.rendered-graph.media-layout .course-block-source{
  width:var(--course-media-width);
  max-width:100%;
  box-sizing:border-box;
}

.rendered-image.media-align-left .rendered-block-title,
.rendered-graph.media-align-left .rendered-block-title,
.rendered-image.media-align-left .course-block-source,
.rendered-graph.media-align-left .course-block-source{
  margin-left:0;
  margin-right:auto;
  text-align:left;
}

.rendered-image.media-align-center .rendered-block-title,
.rendered-graph.media-align-center .rendered-block-title,
.rendered-image.media-align-center .course-block-source,
.rendered-graph.media-align-center .course-block-source{
  margin-left:auto;
  margin-right:auto;
  text-align:center;
}

.rendered-image.media-align-right .rendered-block-title,
.rendered-graph.media-align-right .rendered-block-title,
.rendered-image.media-align-right .course-block-source,
.rendered-graph.media-align-right .course-block-source{
  margin-left:auto;
  margin-right:0;
  text-align:right;
}

.course-media.media-width-small{
  width:min(100%,420px);
}

.course-media.media-width-medium{
  width:min(100%,680px);
}

.course-media.media-width-large{
  width:min(100%,980px);
}

.course-media.media-width-full{
  width:100%;
}

.course-media.media-align-left{
  margin-left:0;
  margin-right:auto;
  text-align:left;
}

.course-media.media-align-center{
  margin-left:auto;
  margin-right:auto;
  text-align:center;
}

.course-media.media-align-right{
  margin-left:auto;
  margin-right:0;
  text-align:right;
}

.course-media.media-align-left img{
  margin-left:0;
  margin-right:auto;
}

.course-media.media-align-center img{
  margin-left:auto;
  margin-right:auto;
}

.course-media.media-align-right img{
  margin-left:auto;
  margin-right:0;
}

.course-media figcaption,
.course-media .media-caption{
  text-align:inherit;
}

@media(max-width:700px){
  .media-layout-controls{
    grid-template-columns:1fr;
  }
}


/* Application Prof V0.14.51 — progression simple, automatique et lisible. */
.progress-hero{margin-bottom:18px}
.progress-hero .muted{max-width:860px;line-height:1.55}
.progress-class-list{display:grid;gap:16px}
.progress-class-card{padding:0;overflow:visible}
.progress-class-card>summary{list-style:none;cursor:pointer;padding:20px 22px}
.progress-class-card>summary::-webkit-details-marker{display:none}
.progress-class-card>summary::after{content:'▾';float:right;margin-top:-4px;color:var(--muted);font-size:1.1rem;transition:transform .15s ease}
.progress-class-card[open]>summary::after{transform:rotate(180deg)}
.progress-class-summary-main{display:block;padding-right:28px}
.progress-class-heading{display:flex;justify-content:space-between;gap:18px;align-items:center;margin-bottom:15px}
.progress-class-heading>span:first-child{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.progress-class-name{font-size:1.2rem;color:var(--text)}
.progress-gap{display:inline-flex;align-items:center;justify-content:center;border-radius:999px;padding:7px 11px;font-size:.82rem;font-weight:800;white-space:nowrap}
.progress-gap-on_track{background:#d1fadf;color:#067647}
.progress-gap-ahead{background:#e8f1fb;color:#234b72}
.progress-gap-late{background:#fff0d5;color:#9a5b00}
.progress-gap-empty{background:var(--tone-soft);color:var(--muted)}
.progress-timeline{display:grid;gap:8px;margin:4px 0 7px}
.progress-track-row{display:grid;grid-template-columns:72px minmax(0,1fr) 46px;gap:10px;align-items:center}
.progress-track-label{font-size:.78rem;font-weight:800;color:var(--muted)}
.progress-track{height:10px;display:block;position:relative;overflow:hidden;border-radius:999px;background:#edf1f5;border:1px solid rgba(35,75,114,.10)}
.progress-track-fill{display:block;height:100%;border-radius:inherit;transition:width .25s ease}
.progress-track-fill-plan{background:rgba(35,75,114,.62)}
.progress-track-fill-actual{background:rgba(6,118,71,.74)}
.progress-track-value{font-size:.76rem;font-weight:800;color:var(--muted);text-align:right}
/* V0.18.10.83 — date de fin prévisionnelle par classe */
.progress-forecast{
  display:flex;
  align-items:baseline;
  flex-wrap:wrap;
  gap:4px 8px;
  margin:8px 56px 0 82px;
  font-size:.82rem;
}
.progress-forecast-label{font-weight:800;color:var(--primary)}
.progress-forecast-detail{color:var(--muted)}
.progress-forecast-complete .progress-forecast-label{color:#146c53}
.progress-forecast-beyond_year .progress-forecast-label{color:#b42318}
.progress-forecast-no_timetable .progress-forecast-label{color:var(--muted);font-weight:700}
.progress-chapter-strip{display:flex;gap:2px;margin:7px 56px 0 82px;min-height:22px}
.progress-chapter-segment{display:flex;min-width:20px;align-items:center;justify-content:center;border-top:2px solid rgba(35,75,114,.22);padding-top:3px;overflow:hidden}
.progress-chapter-segment small{font-size:.68rem;font-weight:800;color:var(--muted);white-space:nowrap}
.progress-class-meta{display:block;margin-top:8px;font-size:.79rem;color:var(--muted)}
.progress-class-detail{border-top:1px solid var(--line);padding:18px 22px 22px;background:rgba(244,246,248,.45);border-radius:0 0 var(--radius) var(--radius)}
.progress-chapter-detail{background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:16px 18px;margin-top:12px}
.progress-chapter-detail:first-child{margin-top:0}
.progress-chapter-heading{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;margin-bottom:8px}
.progress-chapter-heading h2{font-size:1.05rem;margin:.15em 0 0}
.progress-session-list{display:grid}
.progress-session-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px;align-items:center;border-top:1px solid var(--line);padding:12px 0}
.progress-session-row:first-child{border-top:0}
.progress-session-info{display:flex;align-items:center;gap:7px;flex-wrap:wrap;min-width:0}
.progress-session-info strong{min-width:220px}
.progress-status-badge{display:inline-flex;border-radius:999px;padding:4px 8px;font-size:.72rem;font-weight:800}
.progress-status-planned{background:#eef1f4;color:#5f6b76}
.progress-status-partial{background:#e8f1fb;color:#234b72}
.progress-status-done{background:#d1fadf;color:#067647}
.progress-status-postponed{background:#fff0d5;color:#9a5b00}
.progress-session-actions{display:flex;gap:8px;align-items:center}
.progress-status-form{margin:0}
.progress-status-form select{margin:0;min-width:122px;padding:8px 32px 8px 10px;font-size:.86rem}
.progress-session-more{position:relative}
.progress-session-more>summary{list-style:none;width:36px;height:36px;border:1px solid var(--line);border-radius:9px;display:grid;place-items:center;cursor:pointer;background:var(--surface);color:var(--primary);font-weight:900}
.progress-session-more>summary::-webkit-details-marker{display:none}
.progress-session-menu{position:absolute;right:0;top:42px;z-index:20;width:min(330px,80vw);background:var(--surface);border:1px solid var(--line);border-radius:10px;box-shadow:var(--shadow);padding:8px}
.progress-session-menu form{margin:0}
.progress-session-menu button{width:100%;margin:0;background:var(--surface);color:var(--primary);text-align:left;padding:10px 11px;border-radius:8px}
.progress-session-menu button:hover{background:#edf3f8}
.progress-status-form.is-saving{opacity:.55;pointer-events:none}
@media(max-width:800px){
  .progress-class-heading{align-items:flex-start;flex-direction:column;gap:8px}
  .progress-track-row{grid-template-columns:62px minmax(0,1fr) 38px;gap:7px}
  .progress-forecast{margin-left:69px;margin-right:45px}
  .progress-chapter-strip{margin-left:69px;margin-right:45px}
  .progress-session-row{grid-template-columns:1fr;gap:8px}
  .progress-session-actions{justify-content:flex-end}
  .progress-session-info strong{min-width:0;width:100%}
}
@media(max-width:520px){
  .progress-class-card>summary{padding:16px}
  .progress-class-detail{padding:14px}
  .progress-track-row{grid-template-columns:1fr 38px}
  .progress-track-label{grid-column:1 / -1;margin-bottom:-4px}
  .progress-forecast{margin:8px 40px 0 0}
  .progress-chapter-strip{margin:7px 40px 0 0}
  .progress-class-meta{line-height:1.45}
  .progress-session-actions{justify-content:stretch}
  .progress-status-form{flex:1}
  .progress-status-form select{width:100%}
}


/* V0.14.53 — titres structurants : intitulé distinct du texte placé dessous. */
.block-heading-body-label {
    display: block;
    margin: 0 0 .45rem;
    font-weight: 700;
}

.course-heading-body {
    margin: 0 0 1.15rem;
    line-height: 1.58;
    font-size: 1rem;
    font-weight: 400;
}

.course-heading-body > :first-child {
    margin-top: 0;
}

.course-heading-body > :last-child {
    margin-bottom: 0;
}

body.projection-mode .course-heading-body {
    font-size: inherit;
}

@media print {
    .course-heading-body {
        break-inside: avoid;
        margin-bottom: 3.5mm;
    }
}


/* Application Prof V0.14.54 — aperçu enseignant : corrections visibles par défaut. */

/* En version enseignant, les zones de réponse élève ne sont pas utiles. */
.course-view-teacher .answer-lines{
  display:none!important;
}

/* Les corrections enseignant sont visibles directement par défaut. */
.course-view-teacher .question-teacher-answer,
.course-view-teacher .fill-blank-teacher-correction{
  display:block;
}

/* Les boutons individuels n'ont pas de raison d'être lorsque la correction est déjà visible. */
.course-view-teacher .correction-toggle,
.course-view-teacher .table-correction-toggle{
  display:none!important;
}

/* Les cellules de correction des tableaux restent directement lisibles en version enseignant. */
.course-view-teacher .table-teacher-placeholder{
  display:none!important;
}
.course-view-teacher .table-teacher-value{
  display:inline!important;
}

/* Mobile : garde la barre d'aperçu compacte et facile à faire défiler horizontalement. */
@media(max-width:760px){
  body:not(.projection-mode) .topbar.preview-tools-docked
  > .preview-floating-tools.preview-tools-docked{
    scroll-snap-type:x proximity;
    overscroll-behavior-x:contain;
  }
  body:not(.projection-mode) .topbar.preview-tools-docked
  > .preview-floating-tools.preview-tools-docked > *{
    scroll-snap-align:start;
  }
}


/* V0.18.12.219 — l'ordre annuel des chapitres (poignée, statut, ligne glissée) vit dans assets/css/course-list.css : la liste est regroupée par le serveur. */


.lesson-clock{margin-left:auto;display:flex;align-items:center;white-space:nowrap;font-variant-numeric:tabular-nums;font-size:.95rem}.lesson-clock span{opacity:.72}.lesson-progress-rail{position:fixed;right:10px;top:22vh;height:56vh;z-index:850;display:flex;flex-direction:column;align-items:center;gap:.35rem;pointer-events:none}.lesson-progress-track{position:relative;width:6px;flex:1;border-radius:999px;background:var(--line)}.lesson-progress-fill{position:absolute;left:0;top:0;width:100%;height:var(--lesson-progress,0%);border-radius:inherit;background:currentColor;opacity:.55}.lesson-progress-dot{position:absolute;left:50%;top:var(--lesson-progress,0%);width:14px;height:14px;border-radius:50%;background:currentColor;transform:translate(-50%,-50%)}.lesson-progress-goal{position:absolute;left:50%;bottom:0;width:16px;height:3px;background:currentColor;transform:translateX(-50%)}.lesson-progress-label{font-size:.68rem;writing-mode:vertical-rl;transform:rotate(180deg);opacity:.65}.session-expired-banner{position:fixed;left:50%;bottom:18px;transform:translateX(-50%);z-index:5000;background:var(--theme-warning-bg,#fff3cd);color:var(--theme-warning-text,#805d00);border:1px solid var(--theme-warning-border,#e2b93b);border-radius:12px;padding:12px 16px;box-shadow:0 8px 28px rgba(0,0,0,.18)}@media(max-width:760px){.lesson-progress-rail{right:4px}.lesson-clock{font-size:.82rem}}@media print{.lesson-progress-rail,.lesson-clock,.session-expired-banner{display:none!important}}

.cockpit-bar{
  display:flex!important;
  align-items:center!important;
}
.cockpit-single-line{
  flex-wrap:nowrap!important;
  white-space:nowrap;
  min-width:0;
}
.cockpit-bar-preview{
  gap:.3rem;
  overflow:visible;
  width:100%;
}
.cockpit-bar-preview > *{
  flex:0 0 auto;
}
.cockpit-right-inline{
  display:inline-flex!important;
  align-items:center!important;
  gap:.35rem!important;
  margin-left:.45rem!important;
  flex:0 0 auto!important;
}
.cockpit-global-nav{
  margin-left:auto!important;
  display:flex!important;
  align-items:center!important;
  gap:.42rem!important;
  flex:0 0 auto!important;
  order:999!important;
  white-space:nowrap!important;
}
.cockpit-class-control{
  display:inline-flex;
  align-items:center;
  gap:.25rem;
  white-space:nowrap;
}
.cockpit-class-label{
  font-size:.72rem;
  font-weight:600;
  /* V0.18.11.27 — sans fond propre : suit le theme. */
  color:var(--muted);
}
.cockpit-class-select{
  min-height:1.8rem;
  max-width:8rem;
  padding:.12rem 1.35rem .12rem .4rem;
  border:1px solid #cbd5e1;
  border-radius:.45rem;
  background:var(--surface);
  color:var(--text);
  font:inherit;
  font-size:.72rem;
}
.cockpit-time-control{
  display:inline-flex;
  align-items:center;
  min-height:1.8rem;
  padding:0 .5rem;
  border:1px solid #dbe3ec;
  border-radius:.48rem;
  background:#f7fafc;
  color:#0f172a;
  font-size:.72rem;
  font-weight:700;
  white-space:nowrap;
}
.cockpit-more{
  position:relative;
  display:inline-flex;
  flex:0 0 auto;
}
.cockpit-more-button{
  width:1.85rem;
  height:1.85rem;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid #d8e0ea;
  border-radius:.45rem;
  background:#eef3f8;
  color:#274d73;
  font-size:.95rem;
  cursor:pointer;
}
/* V0.18.11.67 — repos ecrit en dur (#eef3f8, texte #274d73) sans survol propre : il prenait
   var(--primary2), bleu nuit en Classique (1,4) et petrole fonce en Petrole (1,09). */
.cockpit-more-button:hover{background:#e1ebf2}
.cockpit-more-panel{
  position:absolute;
  top:calc(100% + .35rem);
  right:0;
  z-index:4000;
  min-width:12rem;
  padding:.35rem;
  border:1px solid #d8e0ea;
  border-radius:.65rem;
  background:var(--surface);
  box-shadow:0 8px 24px rgba(15,23,42,.15);
}
.cockpit-more-panel[hidden]{display:none!important}
.cockpit-more-item{
  display:flex!important;
  width:100%;
  margin:0!important;
  justify-content:flex-start;
  border-radius:.45rem!important;
}
/* V0.18.10.82 — bouton d'edition de l'apercu rendu un peu plus lisible : fond
   legerement teinte, bordure et glyphe a la couleur primaire. Il restait
   quasiment invisible (blanc sur blanc, bordure tres pale). */
.floating-edit-course{
  position:fixed;
  top:var(--crayon-haut,5.25rem);
  z-index:1600;
  width:2.4rem;
  height:2.4rem;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1.5px solid var(--primary);
  border-radius:.6rem;
  background:color-mix(in srgb,var(--surface) 82%,var(--primary) 18%);
  color:var(--primary);
  text-decoration:none;
  font-size:1.35rem;
  font-weight:700;
  box-shadow:0 4px 16px rgba(15,23,42,.22);
}
.floating-edit-course:hover{
  background:var(--primary);
  color:var(--on-primary);
}
.cockpit-bar-preview,
.cockpit-bar-preview nav,
.cockpit-bar-preview .actions{
  flex-wrap:nowrap!important;
}
.cockpit-bar-preview a,
.cockpit-bar-preview button{white-space:nowrap}

/* Retro unchanged */
.cockpit-bar-retro .cockpit-right{
  margin-left:auto;
  padding-right:.35rem;
}
.cockpit-bar-retro .cockpit-class-label{display:none}
.cockpit-bar-retro .cockpit-class-select{max-width:7.5rem}

@media(max-width:1250px){
  .cockpit-class-label{display:none}
  .cockpit-class-select{max-width:6.5rem}
  .cockpit-time-control{font-size:.68rem;padding:0 .35rem}
}
@media(max-width:1050px){
  .cockpit-time-control{
    max-width:8rem;
    overflow:hidden;
    text-overflow:ellipsis;
  }
}
@media print{
  .cockpit-right,.cockpit-more,.floating-edit-course,.cockpit-global-nav{
    display:none!important;
  }
}


.chapter-session-rail{
  position:fixed;
  right:auto;
  top:7rem;
  bottom:4.8rem;
  width:4.4rem;
  z-index:1050;
  pointer-events:none;
}
.chapter-session-track{
  position:absolute;
  top:0;
  bottom:0;
  left:50%;
  width:4px;
  transform:translateX(-50%);
  border-radius:999px;
  background:var(--line);
}
.chapter-session-end-label{
  position:absolute;
  left:calc(50% + 10px);
  transform:none;
  font-size:.66rem;
  line-height:1;
  color:var(--muted);
  white-space:nowrap;
  background:color-mix(in srgb,var(--surface) 94%,transparent);
  padding:.08rem .18rem;
  border-radius:.2rem;
  pointer-events:none;
}
.chapter-session-start-label{
  top:0;
  transform:translateY(-50%);
}
.chapter-session-finish-label{
  bottom:0;
  transform:translateY(50%);
}
.chapter-session-boundary{
  position:absolute;
  left:50%;
  width:20px;
  border-top:3px solid #475569;
  transform:translateX(-50%);
  z-index:2;
}
.chapter-session-boundary-start{top:0}
.chapter-session-boundary-end{bottom:0}
.chapter-session-actual{
  position:absolute;
  left:50%;
  width:15px;
  height:15px;
  transform:translate(-50%,-50%);
  border-radius:50%;
  background:#18222d;
  box-shadow:0 0 0 3px rgba(255,255,255,.8);
  z-index:4;
}
.chapter-session-theoretical{
  position:absolute;
  left:50%;
  width:24px;
  height:0;
  transform:translate(-50%,-50%);
  border-top:2px dashed #64748b;
  z-index:3;
}
.chapter-session-theoretical span{
  position:absolute;
  right:1.15rem;
  top:-.55rem;
  font-size:.56rem;
  color:var(--muted);
  white-space:nowrap;
  background:color-mix(in srgb,var(--surface) 92%,transparent);
  padding:0 .15rem;
  border-radius:.2rem;
}
.chapter-session-theoretical[hidden]{display:none}
/* V0.18.12.33 — faire défiler le cours avec le rail : zone cliquable autour du trait, rond déplaçable. */
.chapter-session-zone{
  position:absolute;
  top:0;
  bottom:0;
  left:50%;
  width:26px;
  transform:translateX(-50%);
  pointer-events:auto;
  cursor:pointer;
  /* Au doigt, un balayage qui commence ici fait défiler la page comme ailleurs. */
  touch-action:pan-y;
  z-index:1;
}
/* Le rond au-dessus des points d'arrêt (z 5) : à la reprise d'une séance, il est à leur place. */
.chapter-session-actual{
  pointer-events:auto;
  cursor:grab;
  touch-action:none;
  z-index:6;
}
.chapter-session-actual:focus-visible{
  outline:3px solid var(--primary);
  outline-offset:2px;
}
.chapter-session-rail.is-dragging .chapter-session-actual,
.chapter-session-rail.is-dragging .chapter-session-zone{cursor:grabbing}
.chapter-session-milestone{
  position:absolute;
  left:50%;
  transform:translate(-50%,-50%);
  width:3.2rem;
  height:1.2rem;
  margin:0;
  padding:0;
  border:0;
  background:transparent;
  cursor:pointer;
  pointer-events:auto;
  z-index:2;
}
.chapter-session-tick{
  position:absolute;
  left:50%;
  top:50%;
  width:14px;
  border-top:2px solid #64748b;
  transform:translate(-50%,-50%);
}
.chapter-session-code{
  position:absolute;
  left:calc(50% + 10px);
  right:auto;
  top:50%;
  transform:translateY(-50%);
  font-size:.58rem;
  font-weight:700;
  color:var(--muted);
  background:color-mix(in srgb,var(--surface) 93%,transparent);
  padding:.05rem .18rem;
  border-radius:.2rem;
  white-space:nowrap;
  width:max-content;
}
.chapter-session-milestone.is-current .chapter-session-tick{
  width:20px;
  border-top-width:3px;
}
.chapter-session-milestone.is-current .chapter-session-code{
  color:var(--text);
}
@media(max-width:1100px){
  .chapter-session-rail{
    width:3.4rem;
  }
  .chapter-session-theoretical span{display:none}
}
@media print{
  .chapter-session-rail{display:none!important}
}


body.presentation-mode .floating-edit-course,
body.presentation-mode .chapter-session-rail,
body.retroprojection .floating-edit-course,
body.retroprojection .chapter-session-rail,
body.is-presentation .floating-edit-course,
body.is-presentation .chapter-session-rail,
[data-retroprojection] .floating-edit-course,
[data-retroprojection] .chapter-session-rail{
  display:none!important;
}


:fullscreen .floating-edit-course{
  display:none!important;
}

/* V0.18.12.81 — le rail de progression reste affiché en rétroprojection (la documentation le promet depuis la
   V0.18.12.30, mais une règle « :fullscreen » le masquait dès que la rétroprojection passait en plein écran).
   Il n'est retiré que sur écran étroit (moins de 901 px), où il recouvrirait le cours. Une marge à droite lui est
   réservée : positionRail() (application.js) pose la frise, étiquettes comprises, dans la zone visible, et le cours
   s'arrête avant elle. */
@media(max-width:900px){
  :fullscreen .chapter-session-rail{display:none!important}
}
@media screen and (min-width:901px){
  body.projection-mode:has(> .chapter-session-rail) .container{padding-right:146px!important}
}
@media screen and (min-width:1101px){
  body.projection-mode:has(> .chapter-session-rail) .container{padding-right:160px!important}
}


.chapter-session-milestone.is-last .chapter-session-code{
  text-align:left;
  font-weight:700;
  color:var(--muted);
}


.chapter-session-active-segment{
  position:absolute;
  left:50%;
  width:5px;
  transform:translateX(-50%);
  border-radius:0;
  background:#6f8faa;
  opacity:.9;
  z-index:1;
  pointer-events:none;
}

/* V0.17.3.9 — chronologie visuelle des fins de séance.
   Les éléments sont des <button> pour rester accessibles : on neutralise ici
   le style global des boutons de l'application. */
.chapter-stop-marker{
  position:absolute;
  left:50%;
  width:8px;
  min-width:8px;
  height:8px;
  margin:0;
  padding:0;
  transform:translate(calc(-50% + var(--marker-offset,0px)),-50%);
  border:0;
  border-radius:50%;
  background:#64748b;
  box-shadow:0 0 0 2px rgba(255,255,255,.96);
  z-index:5;
  pointer-events:auto;
  cursor:pointer;
}
.chapter-stop-marker:hover,
.chapter-stop-marker:focus-visible{
  margin:0;
  background:#475569;
  outline:2px solid rgba(71,85,105,.25);
  outline-offset:2px;
}

/* Dernier point d'arrêt : double cercle.
   Le cercle externe reste creux ; le pseudo-élément forme le point central. */
.chapter-stop-marker.is-latest{
  width:17px;
  min-width:17px;
  height:17px;
  border:2px solid #d08b18;
  background:var(--surface);
  box-shadow:0 0 0 2px rgba(255,255,255,.96),0 0 0 3px rgba(208,139,24,.22);
}
.chapter-stop-marker.is-latest::after{
  content:"";
  position:absolute;
  left:50%;
  top:50%;
  width:7px;
  height:7px;
  transform:translate(-50%,-50%);
  border-radius:50%;
  background:#d08b18;
}
.chapter-stop-marker.is-latest:hover,
.chapter-stop-marker.is-latest:focus-visible{
  background:var(--surface);
  border-color:#ad6f12;
}
.chapter-stop-marker.is-latest:hover::after,
.chapter-stop-marker.is-latest:focus-visible::after{
  background:#ad6f12;
}


.chapter-session-milestone.is-last .chapter-session-code{
  margin-top:-1px;
}


.chapter-session-milestone.is-last .chapter-session-tick{
  left:50%;
  width:18px;
  transform:translate(-50%,-50%);
  border-top-width:2px;
}


.chapter-session-milestone.is-last .chapter-session-code{
  min-width:6.2rem;
}


.floating-edit-course .floating-edit-course-label{
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  padding:0!important;
  margin:-1px!important;
  overflow:hidden!important;
  clip:rect(0,0,0,0)!important;
  white-space:nowrap!important;
  border:0!important;
}

/* V0.14.57.15 — option explicite de redémarrage de la numérotation des questions */
body[data-page="session"] .question-numbering-option{
  width:fit-content;
  max-width:100%;
  margin:0;
  padding:9px 11px;
  border:1px solid #d9e2ea;
  border-radius:9px;
  background:var(--tone-soft);
  color:var(--muted);
  font-size:.88rem;
  font-weight:650;
}
body[data-page="session"] .question-numbering-option input{
  flex:0 0 auto;
}

/* V0.18.3.9 — rétroprojection : masquer l'ancien cockpit sous la barre de contexte.
   Depuis la rationalisation du cockpit V0.18.3.x, la barre cockpit restait présente
   sous la nouvelle interface de rétroprojection et ses contrôles dépassaient par le bas. */
body.projection-mode.presentation-ui-v01447 .cockpit-bar{
  display:none!important;
}

/* V0.18.4.0 — rétroprojection : suppression du bandeau de contexte supérieur.
   Le titre de séance suffit comme repère en projection ; le bandeau de contexte
   n'occupe donc plus l'écran et ne peut plus passer sous le bandeau de séance. */
body.projection-mode.presentation-ui-v01447{
  --presentation-projection-top:0px !important;
  scroll-padding-top:8px !important;
}

body.projection-mode.presentation-ui-v01447 .presentation-projection-context{
  display:none!important;
}

body.projection-mode.presentation-ui-v01447 .container{
  padding-top:12px!important;
}

body.projection-mode.presentation-ui-v01447 .course-document{
  --session-sticky-top:8px!important;
}

body.projection-mode.presentation-ui-v01447 .rendered-session .session-title{
  scroll-margin-top:12px!important;
}

/* V0.18.5.0 — formules mathématiques LaTeX */
.block-formula{border-left-color:#315d86}
.block-editor-formula{
  margin:10px 0 14px;
  padding:14px;
  border:1px solid #cbd9e5;
  border-radius:10px;
  background:color-mix(in srgb,var(--primary) 6%,var(--surface));
}
.block-editor-formula textarea{
  min-height:92px;
  font-family:"SFMono-Regular",Consolas,"Liberation Mono",monospace;
  font-size:.93rem;
  line-height:1.45;
  tab-size:2;
}
.formula-live-preview{
  min-height:74px;
  display:flex;
  align-items:center;
  justify-content:center;
  margin-top:10px;
  padding:14px;
  overflow-x:auto;
  border:1px dashed #aabed0;
  border-radius:9px;
  background:var(--surface);
}
.formula-live-preview.is-empty{
  color:var(--muted);
  font-size:.85rem;
}
.rendered-formula{
  padding:14px 16px;
  border:1px solid #d7e2eb;
  border-radius:10px;
  background:#fbfdff;
}
.rendered-formula .rendered-block-label{color:#315d86}
.rendered-formula .rendered-block-content{
  overflow-x:auto;
  padding:8px 0;
  text-align:center;
  font-size:1.08em;
}
.formula-render-error{
  color:var(--danger);
  font-family:"SFMono-Regular",Consolas,"Liberation Mono",monospace;
  white-space:pre-wrap;
}
.math-render-unavailable .rendered-formula .rendered-block-content::before{
  content:"Rendu mathématique indisponible — LaTeX : ";
  color:#8a6200;
  font-size:.78rem;
  font-weight:800;
}
/* V0.18.12.27 — l'em part déjà du document agrandi (.course-document = 1rem × échelle) : multiplier
   encore par l'échelle l'appliquait deux fois (à 175 %, 53 px au lieu de 30). 1.08em suffit. */
body.projection-mode .rendered-formula .rendered-block-content{
  font-size:1.08em;
}
@media print{
  .rendered-formula{
    break-inside:avoid-page;
    page-break-inside:avoid;
  }
  .rendered-formula .rendered-block-content{
    overflow:visible;
  }
}


/* V0.18.6.0 — éditeur visuel de formules */
.formula-visual-editor{
  margin:0 0 14px;
  padding:14px;
  border:1px solid #b9cfdf;
  border-radius:12px;
  background:color-mix(in srgb,var(--primary) 6%,var(--surface));
}
.formula-visual-heading{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}
.formula-visual-heading > div{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:3px;
}
.formula-visual-heading strong{
  color:var(--primary);
  font-size:.95rem;
}
.formula-visual-heading span{
  color:var(--muted);
  font-size:.82rem;
}
.formula-keyboard-button{
  flex:0 0 auto;
  margin:0;
  padding:8px 10px;
  font-size:.8rem;
}
math-field[data-formula-mathfield]{
  display:block;
  width:100%;
  min-height:68px;
  box-sizing:border-box;
  padding:12px 14px;
  border:1px solid #8fb2ca;
  border-radius:10px;
  background:var(--surface);
  color:var(--text);
  font-size:1.45rem;
  --caret-color:#156f7a;
  --selection-background-color:#d7edf2;
  --contains-highlight-background-color:#eef8fa;
}
math-field[data-formula-mathfield]:focus-within{
  border-color:#147b84;
  box-shadow:0 0 0 3px rgba(20,123,132,.12);
}
.formula-palette{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-top:10px;
}
.formula-palette-button{
  min-width:42px;
  min-height:36px;
  margin:0;
  padding:7px 10px;
  border:1px solid var(--line);
  border-radius:8px;
  background:var(--surface);
  /* V0.18.11.27 — le fond suivait deja le theme, la couleur non : bleu nuit sur
     bleu nuit, 1,78. Les deux vont ensemble ou ne vont pas. */
  color:var(--primary);
  font-weight:750;
  line-height:1;
}
.formula-palette-button:hover,
.formula-palette-button:focus{
  background:var(--tone-hover);
}
.formula-visual-help{
  margin:9px 0 0;
}
.formula-advanced-editor{
  margin:8px 0 12px;
  border-top:1px solid var(--line);
  padding-top:8px;
}
.formula-advanced-editor summary{
  cursor:pointer;
  color:var(--muted);
  font-size:.82rem;
  font-weight:750;
}
.formula-advanced-editor label{
  display:block;
  margin-top:9px;
}
/* V0.18.12.98 — volets dépliants de l'éditeur de formule (application.js, enhanceFormulaEditor) : raccourcis, code LaTeX et aperçu se replient ; sur téléphone les raccourcis et l'aperçu le sont au départ. */
.formula-raccourcis{
  margin:10px 0 0;
}
.formula-apercu-volet{
  margin:8px 0 12px;
  border-top:1px solid var(--line);
  padding-top:2px;
}
.formula-raccourcis > summary,
.formula-apercu-volet > summary,
.formula-advanced-editor > summary{
  cursor:pointer;
  padding:8px 0;
  line-height:1.2;
  color:var(--muted);
  font-size:.82rem;
  font-weight:750;
}
@media(max-width:700px),(any-pointer:coarse){
  /* au doigt : une zone d'au moins 40 px */
  .formula-raccourcis > summary,
  .formula-apercu-volet > summary,
  .formula-advanced-editor > summary{
    padding:12px 0;
  }
}
.formula-apercu-volet .formula-live-preview{
  margin-top:6px;
}
.formula-visual-unavailable .formula-live-preview{
  display:block;
}
.formula-visual-warning{
  margin-bottom:10px;
}
@media(max-width:700px){
  .formula-visual-heading{
    flex-direction:column;
  }
  .formula-visual-heading span{
    display:none;
  }
  .formula-visual-editor{
    padding:10px;
  }
  .formula-keyboard-button{
    width:100%;
  }
  math-field[data-formula-mathfield]{
    min-height:60px;
    font-size:1.25rem;
  }
}
@media print{
  .formula-visual-editor,
  .formula-advanced-editor,
  .formula-visual-warning{
    display:none!important;
  }
}


/* V0.18.6.1 — indicateur du futur point d'arrêt de séance */
.teaching-stop-preview-indicator{
  position:fixed;
  z-index:910;
  display:none;
  width:20px;
  height:24px;
  transform:translateY(-50%);
  pointer-events:none;
  align-items:center;
  justify-content:center;
  color:#b7791f;
  filter:drop-shadow(0 1px 2px rgba(80,55,10,.18));
}
.teaching-stop-preview-indicator.is-visible{
  display:flex;
}
.teaching-stop-preview-indicator span{
  display:block;
  font-size:18px;
  line-height:1;
  font-weight:900;
}
.teaching-stop-preview-indicator::after{
  content:"";
  position:absolute;
  left:13px;
  top:50%;
  width:10px;
  height:2px;
  transform:translateY(-50%);
  border-radius:999px;
  background:currentColor;
  opacity:.82;
}
.teaching-stop-preview-indicator.is-inside-course{
  opacity:.78;
}
body.teaching-marker-repositioning .teaching-stop-preview-indicator{
  display:none!important;
}
@media print{
  .teaching-stop-preview-indicator{display:none!important}
}


/* V0.18.6.4 — suppression ciblée dans le Journal des séances */
.teaching-journal-delete-form{
  display:block;
  margin:.28rem 0 0;
}
.teaching-journal-delete-button{
  margin:0;
  padding:0;
  border:0;
  background:transparent;
  box-shadow:none;
  color:#a23a32;
  font:inherit;
  font-size:.82rem;
  font-weight:750;
  cursor:pointer;
  text-align:left;
}
.teaching-journal-delete-button:hover,
.teaching-journal-delete-button:focus{
  color:#7a271f;
  text-decoration:underline;
  background:transparent;
}
@media print{
  .teaching-journal-delete-form{display:none!important}
}


/* V0.18.6.5 — action Supprimer dans le journal général */
td .teaching-journal-delete-form{
  margin-top:.45rem;
}
td .teaching-journal-delete-button{
  display:inline-flex;
  align-items:center;
  gap:.2rem;
}



/* V0.18.7.0 — finition de l’état actif « Aujourd’hui » */
body[data-page="dashboard"] .main-nav > a[href*="page=dashboard"]{
  background:color-mix(in srgb,var(--surface) 11%,transparent)!important;
  border:1px solid rgba(255,255,255,.58)!important;
  box-shadow:inset 0 -2px 0 rgba(255,255,255,.78)!important;
  border-radius:9px!important;
}
body[data-page="dashboard"] .main-nav > a[href*="page=dashboard"]:hover,
body[data-page="dashboard"] .main-nav > a[href*="page=dashboard"]:focus-visible{
  background:color-mix(in srgb,var(--surface) 17%,transparent)!important;
}


/* V0.18.7.0 — palette de composants */
.block-component-palette-ready .component-native-select-label,
.block-component-palette-ready select[data-block-type-select]{
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  padding:0!important;
  margin:-1px!important;
  overflow:hidden!important;
  clip:rect(0,0,0,0)!important;
  white-space:nowrap!important;
  border:0!important;
}
.block-component-palette-ready .quick-blocks{
  display:none!important;
}
.component-palette-trigger{
  width:100%;
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  gap:10px;
  align-items:center;
  margin:0 0 12px;
  padding:10px 12px;
  border:1px solid var(--line);
  border-radius:10px;
  background:var(--surface);
  color:var(--text);
  text-align:left;
  box-shadow:none;
}
.component-palette-trigger:hover,
.component-palette-trigger:focus-visible{
  border-color:var(--primary);
  background:color-mix(in srgb,var(--surface) 92%,var(--primary) 8%);
}
.component-palette-trigger-icon{
  display:grid;
  place-items:center;
  width:34px;
  height:34px;
  border-radius:8px;
  background:color-mix(in srgb,var(--primary) 9%,var(--surface));
  color:var(--primary);
  font-size:1.05rem;
  font-weight:900;
}
.component-palette-trigger > span:nth-child(2){
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:1px;
}
.component-palette-trigger small{
  color:var(--muted);
  font-size:.72rem;
  font-weight:650;
}
.component-palette-trigger strong{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:.9rem;
}
.component-palette-trigger-chevron{
  color:var(--muted);
  font-size:1.35rem;
  line-height:1;
}

.component-palette-backdrop{
  position:fixed;
  inset:0;
  z-index:3000;
  padding:24px;
  background:rgba(18,28,40,.48);
  backdrop-filter:blur(4px);
}
.component-palette-backdrop[hidden]{display:none!important}
body.component-palette-open{overflow:hidden}

.component-palette-dialog{
  width:min(980px,calc(100vw - 48px));
  height:min(720px,calc(100vh - 48px));
  max-height:100%;
  margin:0 auto;
  display:grid;
  grid-template-rows:auto minmax(0,1fr) auto;
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:16px;
  background:var(--surface);
  box-shadow:0 22px 70px rgba(15,23,42,.28);
}
.component-palette-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  padding:18px 20px 14px;
  border-bottom:1px solid var(--line);
}
.component-palette-header h2{
  margin:2px 0 0;
  font-size:1.25rem;
}
.component-palette-kicker{
  color:var(--muted);
  font-size:.74rem;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.045em;
}
.component-palette-close{
  width:38px;
  height:38px;
  margin:0;
  padding:0;
  display:grid;
  place-items:center;
  border:1px solid var(--line);
  border-radius:9px;
  background:var(--surface);
  color:var(--text);
  font-size:1.45rem;
  line-height:1;
}
/* V0.18.11.67 — repos var(--surface) / var(--text), sans survol propre : il prenait celui de tous
   les boutons, var(--primary2), sous var(--text) (1,2 en Classique, 1,9 en Petrole, 1,7 en Nuit).
   Trouve par la sonde des survols, palette ouverte. */
.component-palette-close:hover{background:var(--tone-hover)}
.component-palette-body{
  min-height:0;
  display:grid;
  grid-template-columns:minmax(300px,42%) minmax(0,58%);
}
.component-palette-left{
  min-width:0;
  min-height:0;
  display:flex;
  flex-direction:column;
  padding:14px;
  border-right:1px solid var(--line);
  background:color-mix(in srgb,var(--surface) 96%,var(--bg) 4%);
}
.component-palette-search-label{
  display:block;
  margin:0 0 12px;
  color:var(--muted);
  font-size:.76rem;
  font-weight:750;
}
.component-palette-search-label span{
  display:block;
  margin:0 0 5px;
}
.component-palette-search-label input{
  width:100%;
  box-sizing:border-box;
  margin:0;
}
.component-palette-usages{flex:0 0 auto;display:flex;flex-wrap:wrap;gap:5px;margin:0 0 8px}   /* flex:0 0 auto : sans cela, la colonne flex l'écrase quand elle défile (overflow-x) */
.component-usage-chip{flex:0 0 auto;margin:0;padding:3px 9px;border:1px solid var(--line);border-radius:999px;background:var(--surface);color:var(--text);font-size:.74rem;font-weight:650;line-height:1.5;cursor:pointer}
.component-usage-chip:hover{border-color:var(--primary);color:var(--primary)}
.component-usage-chip.is-active{background:var(--primary);border-color:var(--primary);color:var(--on-primary,#fff)}
/* Le filtre de matière tient en deux lignes : la liste des blocs, dessous, garde sa hauteur (surtout sur téléphone). */
.component-palette-filtre{flex:0 0 auto;display:grid;gap:4px;margin:0 0 8px}
.component-palette-filtre[hidden]{display:none}
.component-palette-filtre-ligne{display:flex;align-items:center;gap:6px}
.component-palette-matiere{flex:1 1 auto;min-width:0;box-sizing:border-box;margin:0;padding:5px 8px;font-size:.82rem}
.component-palette-filtre-etat{margin:0;color:var(--muted);font-size:.74rem;line-height:1.35}
.component-palette-voir-tous{flex:0 0 auto;margin:0;padding:5px 9px;border:1px solid var(--primary);border-radius:8px;background:transparent;color:var(--primary);font-size:.76rem;font-weight:700;line-height:1.3;white-space:nowrap;cursor:pointer}
.component-palette-voir-tous[hidden]{display:none}
.component-palette-voir-tous:hover{background:var(--primary);color:var(--on-primary,#fff)}
.component-preview-usages{display:grid;gap:6px;margin-top:12px}
.component-preview-usages > strong{color:var(--muted);font-size:.72rem;text-transform:uppercase;letter-spacing:.035em}
.component-usage-chips{display:flex;flex-wrap:wrap;gap:5px}
.component-preview-matieres{color:var(--muted);font-size:.76rem;line-height:1.35}
.component-palette-list{
  min-height:0;
  overflow:auto;
  padding-right:4px;
  /* V0.18.12.59.1 — le titre du groupe est collant (sticky, en haut de la liste) : sans cette marge, amener un composant « en vue »
     le laissait sous le titre, à moitié caché. */
  scroll-padding-top:2.6rem;
}
.component-palette-group + .component-palette-group{
  margin-top:16px;
}
.component-palette-group > h3{
  position:sticky;
  top:0;
  z-index:1;
  margin:0 0 6px;
  padding:6px 4px;
  background:color-mix(in srgb,var(--surface) 96%,var(--bg) 4%);
  color:var(--muted);
  font-size:.72rem;
  text-transform:uppercase;
  letter-spacing:.035em;
}
.component-palette-item{
  width:100%;
  display:grid;
  grid-template-columns:34px minmax(0,1fr);
  gap:9px;
  align-items:start;
  margin:0 0 4px;
  padding:8px 9px;
  border:1px solid transparent;
  border-radius:9px;
  background:transparent;
  color:var(--text);
  text-align:left;
  box-shadow:none;
}
.component-palette-item:hover{
  background:color-mix(in srgb,var(--primary) 7%,var(--surface));
}
.component-palette-item.is-selected{
  border-color:color-mix(in srgb,var(--primary) 42%,var(--line));
  background:color-mix(in srgb,var(--primary) 11%,var(--surface));
}
.component-palette-item-icon{
  width:32px;
  height:32px;
  display:grid;
  place-items:center;
  border-radius:8px;
  background:color-mix(in srgb,var(--primary) 10%,var(--surface));
  color:var(--primary);
  font-size:.82rem;
  font-weight:900;
}
.component-palette-item-text{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:2px;
}
.component-palette-item-text strong{
  font-size:.87rem;
}
.component-palette-item-text small{
  display:-webkit-box;
  overflow:hidden;
  color:var(--muted);
  font-size:.73rem;
  line-height:1.25;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
}
.component-palette-no-result{
  padding:18px 10px;
  color:var(--muted);
  text-align:center;
}

.component-palette-right{
  min-width:0;
  min-height:0;
  overflow:auto;
  padding:26px;
}
.component-preview-empty{
  min-height:100%;
  display:grid;
  place-items:center;
  color:var(--muted);
  text-align:center;
}
.component-preview-head{
  display:flex;
  align-items:center;
  gap:12px;
}
.component-preview-icon{
  width:48px;
  height:48px;
  display:grid;
  place-items:center;
  border-radius:12px;
  background:color-mix(in srgb,var(--primary) 9%,var(--surface));
  color:var(--primary);
  font-size:1.15rem;
  font-weight:900;
}
.component-preview-head h3{
  margin:2px 0 0;
  font-size:1.25rem;
}
.component-preview-category{
  color:var(--muted);
  font-size:.75rem;
  font-weight:750;
}
.component-preview-description{
  margin:18px 0;
  line-height:1.55;
}
.component-preview-demo{
  margin-top:20px;
}
.component-preview-demo-label{
  display:block;
  margin:0 0 7px;
  color:var(--muted);
  font-size:.75rem;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.035em;
}
.component-preview-card{
  padding:16px;
  border:1px solid var(--line);
  border-left:4px solid var(--primary);
  border-radius:10px;
  background:color-mix(in srgb,var(--surface) 94%,var(--bg) 6%);
}
.component-preview-card-label{
  display:block;
  margin:0 0 8px;
  color:var(--primary);
  font-size:.72rem;
  font-weight:850;
  text-transform:uppercase;
}
.component-preview-card-content{
  line-height:1.55;
}
.component-preview-formula .component-preview-card-content{
  padding:10px 0;
  text-align:center;
  font-family:Georgia,"Times New Roman",serif;
  font-size:1.42rem;
}
.component-preview-keywords{
  margin-top:20px;
  padding-top:16px;
  border-top:1px solid var(--line);
}
.component-preview-keywords strong,
.component-preview-keywords span{
  display:block;
}
.component-preview-keywords strong{
  margin-bottom:4px;
  font-size:.78rem;
}
.component-preview-keywords span{
  color:var(--muted);
  font-size:.78rem;
  line-height:1.45;
}

.component-palette-footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:12px 18px;
  border-top:1px solid var(--line);
}
.component-palette-use{
  margin:0;
}
.component-palette-use:disabled{
  opacity:.5;
  cursor:not-allowed;
}

@media(max-width:760px){
  .component-palette-backdrop{padding:8px}
  /* V0.18.12.121.1 — sur téléphone, 100vh est la hauteur de la fenêtre AVEC la barre d'adresse rentrée : barre affichée (en bas sur Android),
     la fenêtre dépassait de la zone visible et le pied, avec « Utiliser ce composant », passait SOUS la barre — impossible d'insérer un bloc.
     100dvh suit la zone visible ; max-height:100% borne en tout cas la fenêtre à l'arrière-plan fixe, qui est, lui, toujours la zone visible. */
  .component-palette-dialog{
    width:calc(100vw - 16px);
    height:calc(100vh - 16px);
    height:calc(100dvh - 16px);
    max-height:100%;
  }
  .component-palette-body{
    grid-template-columns:1fr;
    grid-template-rows:minmax(300px,60%) minmax(0,40%);   /* V.186 : la recherche, les pastilles et le filtre prennent ~170 px : la liste doit garder de quoi montrer 3 blocs */
  }
  .component-palette-left{
    border-right:0;
    border-bottom:1px solid var(--line);
  }
  /* Les pastilles d'usage tiennent sur UNE ligne qui défile au doigt : trois lignes de pastilles mangeaient la liste des blocs. */
  .component-palette-usages{flex-wrap:nowrap;overflow-x:auto;padding-bottom:4px;scrollbar-width:thin}
  /* L'explication du filtre (lue par les lecteurs d'écran) reste hors de vue sur téléphone : le sélecteur et le bouton « Voir tous les blocs » suffisent, et la hauteur revient à la liste. */
  .component-palette-filtre-etat{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
  .component-palette-right{
    padding:16px;
  }
  .component-palette-footer .meta{
    display:none;
  }
}
@media print{
  .component-palette-backdrop,
  .component-palette-trigger{display:none!important}
}


/* V0.18.7.3 — récupération d’anciens blocs formule */
.legacy-formula-recovery-notice{
  margin:0 0 12px;
  padding:10px 12px;
  border:1px solid color-mix(in srgb,var(--primary) 32%,var(--line));
  border-radius:9px;
  background:color-mix(in srgb,var(--primary) 8%,var(--surface));
  color:var(--text);
  font-size:.82rem;
  line-height:1.4;
}
.legacy-formula-recovered{
  outline:1px solid color-mix(in srgb,var(--primary) 22%,transparent);
  outline-offset:2px;
}


/* V0.18.7.7 — aperçu réel des composants dans la palette */
.component-preview-demo-real{
  margin-top:20px;
}
.component-preview-real-stage{
  min-height:150px;
  padding:14px;
  overflow:auto;
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--bg);
}
.component-preview-real-stage .component-preview-course-document{
  width:100%;
  max-width:none;
  min-height:0;
  margin:0;
  padding:24px 26px;
  border-radius:7px;
  box-shadow:0 3px 12px rgba(16,24,40,.06);
}
.component-preview-real-stage .component-preview-course-document .rendered-block{
  margin-bottom:0;
}
.component-preview-real-stage .component-preview-course-document .course-heading{
  margin-top:4px;
  margin-bottom:4px;
}
.component-preview-real-loading{
  min-height:120px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  color:var(--muted);
  font-size:.86rem;
}
.component-preview-real-spinner{
  width:18px;
  height:18px;
  border:2px solid var(--line);
  border-top-color:var(--primary);
  border-radius:50%;
  animation:component-preview-spin .75s linear infinite;
}
@keyframes component-preview-spin{
  to{transform:rotate(360deg)}
}
.component-preview-real-fallback{
  min-height:120px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:6px;
  padding:16px;
  color:var(--muted);
}
.component-preview-real-fallback strong{
  color:var(--text);
}
.component-preview-media-placeholder{
  min-height:150px;
  display:grid;
  place-items:center;
  align-content:center;
  gap:5px;
  padding:20px;
  border:1px dashed var(--line);
  border-radius:8px;
  background:color-mix(in srgb,var(--surface) 92%,var(--bg) 8%);
  text-align:center;
}
.component-preview-media-placeholder>span{
  font-size:2rem;
  color:var(--primary);
}
.component-preview-media-placeholder>small{
  color:var(--muted);
}
.component-preview-real-stage .rendered-formula .rendered-block-content{
  min-height:70px;
  display:grid;
  place-items:center;
}
@media(max-width:760px){
  .component-preview-real-stage{
    padding:8px;
  }
  .component-preview-real-stage .component-preview-course-document{
    padding:18px 14px;
  }
}


/* Application Prof V0.18.9.0 — vidéo, graphique de données, code et lien externe. */
.print-only{display:none}
.block-editor-video,
.block-editor-data_chart,
.block-editor-code,
.block-editor-external_link{display:grid;gap:14px;margin-top:12px}
.block-editor-video.hidden,
.block-editor-data_chart.hidden,
.block-editor-code.hidden,
.block-editor-external_link.hidden{display:none!important}
.data-chart-editor-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.data-chart-data-input,
.course-code-editor{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,"Liberation Mono",monospace;tab-size:4;white-space:pre}
.course-code-editor{min-height:230px}

.course-video-block{margin:.35rem 0}
.course-video-frame{position:relative;overflow:hidden;width:100%;aspect-ratio:16/9;border:1px solid var(--line);border-radius:12px;background:#111}
.course-video-frame iframe{position:absolute;inset:0;width:100%;height:100%;border:0}
.course-video-caption{margin-top:10px;line-height:1.55}
.course-video-link{margin-top:8px;overflow-wrap:anywhere;font-size:.92rem}

/* V0.18.12.297 — LE BLOC GENIALLY. Le cadre n'existe pas dans la page : seul le bouton « Afficher le Genially » le remplit, au clic (assets/js/application.js). Le cadre garde les proportions choisies
   (16/9, 4/3, carré, portrait 3/4) mais ne dépasse jamais la hauteur de la fenêtre : sa largeur maximale est celle qui, à ces proportions, tient dans la fenêtre (une présentation projetée se voit en entier,
   une infographie en portrait n'est pas plus haute que l'écran). Deux déclarations : « vh » d'abord, « dvh » ensuite (une barre d'adresse de téléphone ne coupe pas le cadre ; un navigateur sans dvh garde vh). */
.course-genially-block{margin:.35rem 0}
.course-genially-frame{--g-w:16;--g-h:9;position:relative;overflow:hidden;width:100%;max-width:min(100%,calc((100vh - 8rem) * var(--g-w) / var(--g-h)));max-width:min(100%,calc((100dvh - 8rem) * var(--g-w) / var(--g-h)));min-width:min(100%,16rem);margin-inline:auto;aspect-ratio:var(--g-w) / var(--g-h);border:1px solid var(--line);border-radius:12px;background:color-mix(in srgb,var(--surface) 92%,var(--bg) 8%)}
.course-genially-frame:not(.is-launched){min-height:11rem}   /* le bouton ne se rogne jamais ; une fois lancé, le Genially garde ses proportions exactes */
.course-genially-frame.is-ratio-4-3{--g-w:4;--g-h:3}
.course-genially-frame.is-ratio-1-1{--g-w:1;--g-h:1}
.course-genially-frame.is-ratio-3-4{--g-w:3;--g-h:4}
.course-genially-frame iframe{position:absolute;inset:0;width:100%;height:100%;border:0;background:var(--surface)}
.course-genially-launch{position:absolute;inset:0;display:grid;place-items:center;align-content:center;gap:6px;width:100%;margin:0;padding:16px;border:0;border-radius:inherit;background:transparent;color:var(--text);font:inherit;text-align:center;cursor:pointer}
.course-genially-launch-icon{display:grid;place-items:center;width:3.4rem;height:3.4rem;padding-left:.2rem;border-radius:50%;background:var(--primary);color:var(--on-primary);font-size:1.4rem;line-height:1}
.course-genially-launch strong{font-size:1.05rem}
.course-genially-launch small{max-width:30rem;color:var(--muted)}
/* La règle générale « button:hover » fond le bouton en bleu nuit (spécificité 0,1,1) : elle rendait son texte illisible au survol (relecture V.297). Celle-ci (0,3,0) la remplace : le fond reste transparent, seule la pastille change. */
.course-genially-frame .course-genially-launch:hover{background:transparent;color:var(--text)}
.course-genially-launch:hover .course-genially-launch-icon,.course-genially-launch:focus-visible .course-genially-launch-icon{background:var(--primary2)}
@media(max-width:760px){
  .course-genially-launch{gap:4px;padding:10px}
  .course-genially-launch-icon{width:2.6rem;height:2.6rem;font-size:1.1rem}
  .course-genially-launch small{font-size:.82rem;line-height:1.35}
}
.course-genially-caption{margin-top:10px;line-height:1.55}
.course-genially-link{display:flex;flex-wrap:wrap;align-items:center;gap:10px 16px;margin-top:8px;font-size:.92rem}
.course-genially-link a{color:var(--primary);font-weight:650;text-decoration:underline;text-underline-offset:3px}
.course-genially-link [hidden]{display:none!important}
.course-genially-adresse{margin-top:8px;overflow-wrap:anywhere;font-size:.92rem}

/* V0.18.12.323 — LE BLOC « JEU DE CARTES » (render_card_deck_depuis_bloc_v012323, app/modules/bloc-jeu-cartes.php). Une carte de présentation : le titre du jeu, son nombre de cartes, puis soit le bouton « S'entraîner » (version élève, lien
   ouvert seulement), soit l'état du lien en toutes lettres (version enseignant). Aucune couleur écrite : les jetons du thème (clair, sombre, pétrole). Le bouton garde une cible tactile de 44 px (tablettes de la Région) et les lignes sont
   ESPACÉES (gap) : rien n'est collé au titre. À l'impression : ni bouton ni état du lien, seulement le titre et, si le lien est ouvert, l'adresse écrite et le QR code (.print-only, .course-print-qr). */
.course-cartes-block{display:grid;gap:12px;margin:.35rem 0;padding:14px 16px;border:1px solid var(--line);border-radius:12px;background:color-mix(in srgb,var(--surface) 92%,var(--bg) 8%)}
.course-cartes-titre,.course-cartes-actions,.course-cartes-lien,.course-cartes-indispo{margin:0}
.course-cartes-titre{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 12px}
.course-cartes-nom{font-size:1.05rem;overflow-wrap:anywhere}
.course-cartes-nombre{color:var(--muted);font-size:.92rem}
.course-cartes-actions{display:flex;flex-wrap:wrap;align-items:center;gap:12px;padding-top:4px}
.course-cartes-entrainer{display:inline-flex;align-items:center;justify-content:center;min-height:44px;margin-top:0;text-decoration:none}
.course-cartes-lien,.course-cartes-indispo{font-size:.92rem;line-height:1.5}
.course-cartes-gerer{color:var(--primary);font-weight:650;text-decoration:underline;text-underline-offset:3px;white-space:nowrap}
.course-cartes-adresse{overflow-wrap:anywhere;font-size:.92rem;line-height:1.5}
@media(max-width:760px){
  .course-cartes-block{padding:12px}
  .course-cartes-entrainer{width:100%}
}
/* Le panneau d'édition du bloc (formulaires d'ajout et de modification) : le menu des jeux, puis les lignes d'aide, séparés. */
.block-editor-card_deck{display:grid;gap:10px}
.block-editor-card_deck>label{margin:0}
.block-editor-card_deck .format-help{margin:0;line-height:1.5}

.course-code-block{border:1px solid var(--line);border-radius:12px;overflow:hidden;background:#111827;color:#f8fafc}
.course-code-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 12px;background:#0b1220;border-bottom:1px solid rgba(255,255,255,.14);font-size:.82rem;font-weight:750;letter-spacing:.02em}
.course-code-head button{margin:0}
.course-code-block pre{margin:0;padding:16px;overflow:auto;white-space:pre;tab-size:4;font:500 .92rem/1.55 ui-monospace,SFMono-Regular,Menlo,Consolas,"Liberation Mono",monospace;color:inherit;background:transparent}
.course-code-block code{font:inherit;color:inherit}

.course-external-link{display:grid;grid-template-columns:38px minmax(0,1fr);gap:12px;align-items:start;padding:14px 16px;border:1px solid var(--line);border-radius:12px;background:var(--surface);color:var(--text);text-decoration:none}
.course-external-link:hover{border-color:var(--primary);text-decoration:none}
.course-external-link-icon{width:34px;height:34px;border-radius:9px;display:grid;place-items:center;background:var(--tone-panel);color:var(--primary);font-weight:900;font-size:1.1rem}
.course-external-link strong,.course-external-link-description,.course-external-link-url{display:block}
.course-external-link-description{margin-top:4px;line-height:1.5}
.course-external-link-url{margin-top:5px;color:var(--muted);font-size:.82rem;overflow-wrap:anywhere}

.data-chart-block{--dc-0:#2563eb;--dc-1:#d97706;--dc-2:#059669;--dc-3:#7c3aed;--dc-4:#db2777;--dc-5:#0891b2;margin:.3rem 0;max-width:100%}
.data-chart-svg{display:block;width:100%;height:auto;min-height:260px;border:1px solid var(--line);border-radius:12px;background:var(--surface)}
/* V0.18.12.235 — un graphique lié à un tableau, tant que la classe n'a rien rempli (ou hors projection) : un cadre discret à la place du dessin */
.data-chart-attente{padding:1.4rem 1rem;border:1px dashed var(--line);border-radius:12px;background:var(--surface);text-align:center}
.data-chart-attente p{margin:0}
.chart-table-editor{margin-top:.8rem}
.data-chart-grid{stroke:var(--line);stroke-width:1}
.data-chart-axis{stroke:var(--text);stroke-width:1.2}
.data-chart-axis-label,.data-chart-legend{fill:var(--muted);font:12px system-ui,sans-serif}
.data-chart-axis-title{fill:var(--text);font:600 13px system-ui,sans-serif}
.data-chart-line{fill:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}
.data-chart-series-0{fill:var(--dc-0,#2563eb)}
.data-chart-series-1{fill:var(--dc-1,#d97706)}
.data-chart-series-2{fill:var(--dc-2,#059669)}
.data-chart-series-3{fill:var(--dc-3,#7c3aed)}
.data-chart-series-4{fill:var(--dc-4,#db2777)}
.data-chart-series-5{fill:var(--dc-5,#0891b2)}
.data-chart-series-stroke-0{stroke:var(--dc-0,#2563eb)}
.data-chart-series-stroke-1{stroke:var(--dc-1,#d97706)}
.data-chart-series-stroke-2{stroke:var(--dc-2,#059669)}
.data-chart-series-stroke-3{stroke:var(--dc-3,#7c3aed)}
.data-chart-series-stroke-4{stroke:var(--dc-4,#db2777)}
.data-chart-series-stroke-5{stroke:var(--dc-5,#0891b2)}
/* V0.18.12.176 — un graphique lisible à la photocopie en noir et blanc : chaque série se distingue par plus que sa teinte. Barres et secteurs : un motif de hachures (la série 0 reste unie ; les motifs
   sont déclarés dans le <svg>, voir data_chart_motifs_v012176). Courbes : un trait par série (plein, tirets, pointillés…) et un marqueur de forme différente. Les traits des motifs sont BLANCS sur la teinte de la série. */
.data-chart-motif-fond-1{fill:var(--dc-1,#d97706)}
.data-chart-motif-fond-2{fill:var(--dc-2,#059669)}
.data-chart-motif-fond-3{fill:var(--dc-3,#7c3aed)}
.data-chart-motif-fond-4{fill:var(--dc-4,#db2777)}
.data-chart-motif-fond-5{fill:var(--dc-5,#0891b2)}
.data-chart-motif-trait{stroke:#fff;stroke-width:1.8;fill:none}
.data-chart-motif-point{fill:#fff}
.data-chart-series-stroke-1{stroke-dasharray:10 6}
.data-chart-series-stroke-2{stroke-dasharray:3 5}
.data-chart-series-stroke-3{stroke-dasharray:14 5 3 5}
.data-chart-series-stroke-4{stroke-dasharray:6 3}
.data-chart-series-stroke-5{stroke-dasharray:1 6}
.data-chart-marqueur-trait{fill:none;stroke-width:2.6;stroke-linecap:round}
.data-chart-marqueur-4{stroke:var(--dc-4,#db2777)}
.data-chart-marqueur-5{stroke:var(--dc-5,#0891b2)}
.data-chart-note{margin:6px 0 0;font-size:.85rem}
.data-chart-data{margin-top:8px;font-size:.9rem}
.data-chart-data>summary{cursor:pointer;color:var(--muted)}
.data-chart-data .table-scroll{margin-top:8px}

@media(max-width:760px){
  .data-chart-editor-grid{grid-template-columns:1fr}
  .course-external-link{grid-template-columns:32px minmax(0,1fr);padding:12px}
  .course-external-link-icon{width:30px;height:30px}
  .data-chart-svg{min-height:220px}
}

@media print{
  .print-only{display:block!important}
  .course-video-frame{display:none!important}
  .course-video-link{display:block!important;color:#000}
  .course-genially-frame,.course-genially-link{display:none!important}   /* V0.18.12.297 — ni cadre, ni bouton, ni lien à l'impression : l'adresse écrite et le QR code */
  .course-genially-adresse{display:block!important;color:#000}
  .course-genially-block{break-inside:avoid}
  .course-cartes-actions,.course-cartes-lien,.course-cartes-indispo{display:none!important}   /* V0.18.12.323 — ni bouton ni état du lien sur le papier : le titre, et l'adresse écrite + le QR code si le lien est ouvert */
  .course-cartes-block{break-inside:avoid;background:none}
  .course-code-block{break-inside:avoid;border:1px solid #777;background:#fff;color:#000}
  .course-code-head{background:#f2f2f2;color:#000;border-bottom:1px solid #aaa}
  .course-code-block pre{white-space:pre-wrap;overflow:visible}
  .course-external-link{break-inside:avoid;background:#fff;color:#000}
  .data-chart-block{break-inside:avoid}
  .data-chart-svg{background:#fff}
  .data-chart-data{display:none}
}

/* V0.18.11.60 — bloc Schéma (node_diagram), dessiné par le serveur
   (render_node_diagram_structured_block). Fond, trait et texte viennent ensemble des
   variables du papier (.course-document) : lisible en Nuit comme en Pétrole. */
.node-diagram-block{margin:4px 0}
.node-diagram-scroll{overflow-x:auto}
.node-diagram-svg{display:block;width:100%;height:auto}
.node-diagram-svg .nd-shape{fill:var(--surface);stroke:var(--text);stroke-width:1.6}
.node-diagram-svg .nd-text{fill:var(--text);font-family:Arial,Helvetica,sans-serif;font-size:14px}
.node-diagram-svg .nd-arrow{fill:none;stroke:var(--text);stroke-width:1.5}
.node-diagram-svg .nd-head{fill:var(--text);stroke:none}
.node-diagram-svg .nd-sign{fill:var(--surface);stroke:var(--text);stroke-width:1.2}
.node-diagram-svg .nd-sign-text{fill:var(--text);font-family:Arial,Helvetica,sans-serif;font-size:15px;font-weight:700}
.node-diagram-svg .nd-label{fill:var(--text);font-family:Arial,Helvetica,sans-serif;font-size:13px;font-style:italic;paint-order:stroke;stroke:var(--surface);stroke-width:4px;stroke-linejoin:round}
/* V0.18.12.121 — forme à fond coloré : le groupe porte « nd-coul » et « nd-c-<clé> » (une des huit clés de
   node_diagram_palette(), PHP ; mêmes teintes dans COULEURS, node-diagram-editor.js). Pas de style= dans le dessin : la
   teinte est ici. Spécificité 3 classes, donc plus forte que le « fond blanc » de l'impression (2 classes). Les teintes sont
   CLAIRES : trait et texte sont fixés en sombre au lieu de suivre --text, qui est CLAIR dans une page de thème Nuit hors du
   « papier » (relecture d'un import) et rendrait le texte invisible. La réponse (version enseignant) reste rouge, au moins
   4,5 de contraste sur chaque teinte. */
.node-diagram-svg .nd-c-jaune .nd-shape{fill:#fff1a8}
.node-diagram-svg .nd-c-orange .nd-shape{fill:#ffd9ae}
.node-diagram-svg .nd-c-rose .nd-shape{fill:#ffd0d8}
.node-diagram-svg .nd-c-vert .nd-shape{fill:#c9eec5}
.node-diagram-svg .nd-c-turquoise .nd-shape{fill:#b5ece6}
.node-diagram-svg .nd-c-bleu .nd-shape{fill:#c0dbfc}
.node-diagram-svg .nd-c-violet .nd-shape{fill:#e4d3f8}
.node-diagram-svg .nd-c-gris .nd-shape{fill:#dcdcdc}
.node-diagram-svg .nd-node.nd-coul .nd-shape{stroke:#1f2933}
.node-diagram-svg .nd-node.nd-coul .nd-text{fill:#1f2933}
.node-diagram-svg .nd-node.nd-coul .nd-text.nd-reponse{fill:#b42318}
.node-diagram-relations{margin-top:6px;font-size:.9rem;color:var(--muted)}
.node-diagram-relations ul{margin:6px 0 0;padding-left:20px}
/* V0.18.11.64 — version élève du Schéma : la page porte les deux versions, une seule
   s'affiche ; masquée par display:none, l'autre n'est ni peinte ni imprimée. Partout, la
   version enseignant, réponses soulignées et signe à compléter dans un rond en tirets ; dans
   la vue élève, la version élève, jusqu'à « Afficher la correction » (.table-correction-revealed,
   comme les tableaux) ou « toutes les corrections » (body.projection-show-all-corrections). */
.node-diagram-block .nd-version-eleve{display:none}
body:not(.projection-show-all-corrections) .course-view-student .rendered-node_diagram:not(.table-correction-revealed) .nd-version-eleve{display:revert}
body:not(.projection-show-all-corrections) .course-view-student .rendered-node_diagram:not(.table-correction-revealed) .nd-version-enseignant{display:none}
/* V0.18.12.4 — la réponse (version enseignant, correction révélée) est en rouge, comme les
   corrections des tableaux, et non plus soulignée : le souligné est désormais une mise en forme
   choisie par l'enseignant. Le signe à compléter aussi. Rouge gardé à l'impression (plus bas). */
.node-diagram-svg .nd-reponse,.node-diagram-svg .nd-sign-text.nd-version-enseignant{fill:#b42318}
.node-diagram-svg .nd-sign-masque{stroke-dasharray:2.9 2.336}  /* 12 tirets égaux sur le rond de rayon 10 */
body:not(.projection-show-all-corrections) .course-view-student .rendered-node_diagram:not(.table-correction-revealed) .nd-sign-masque{stroke-dasharray:none}
.node-diagram-block .node-diagram-correction-actions{display:none}
.course-view-student .node-diagram-block .node-diagram-correction-actions{display:block}
.course-view-student .rendered-node_diagram.table-correction-revealed .table-correction-toggle{background:#234b72;color:#fff;border-color:#234b72}
/* Sur téléphone, le schéma garde une largeur lisible et défile dans son cadre. */
@media(max-width:600px){.node-diagram-svg{min-width:520px}}
/* En projection, un schema haut tient dans l'ecran (le viewBox garde les proportions). */
body.projection-mode .node-diagram-svg{max-height:calc(100vh - 150px)}
/* L'éditeur (assets/js/node-diagram-editor.js) et l'aperçu du formulaire du bloc :
   palette « papier » par .node-diagram-paper (themes.css), comme le document. */
.node-diagram-editor-preview{border:1px dashed var(--line);border-radius:12px;padding:10px;margin:8px 0;min-height:60px;background:var(--surface)}
.node-diagram-editor-preview.is-loading{opacity:.5}
.nd-dialog{width:min(1180px,100%)}
.nd-outils{display:flex;flex-wrap:wrap;gap:6px 12px;align-items:center;margin:4px 0 6px}
.nd-outils .nd-groupe{display:flex;flex-wrap:wrap;gap:6px;align-items:center;font-weight:700}
.nd-outils .button{margin:0}
.nd-statut{min-height:1.4em;margin:0 0 6px}
.nd-corps{display:grid;grid-template-columns:minmax(0,1fr) 270px;gap:14px;align-items:start}
.nd-toile{border:1px solid var(--line);border-radius:12px;overflow:auto;max-height:66vh;background:var(--surface)}
.nd-stage{touch-action:none;user-select:none;min-width:520px}
.nd-stage .nd-grid line{stroke:var(--line);stroke-width:.6}
.nd-stage .nd-fond{fill:transparent}
.nd-stage .nd-node{cursor:grab}
.nd-stage .nd-node.is-selected .nd-shape{stroke:#1565c0;stroke-width:2.6}
.nd-stage .nd-node.is-source .nd-shape{stroke:#1565c0;stroke-dasharray:6 3}
.nd-stage .nd-hit{fill:none;stroke:transparent;stroke-width:16;cursor:pointer}
.nd-stage .nd-arrow-group.is-selected .nd-arrow{stroke:#1565c0;stroke-width:2.4}
.nd-stage .nd-arrow-group.is-selected .nd-head{fill:#1565c0}
.nd-stage .nd-text,.nd-stage .nd-sign,.nd-stage .nd-sign-text,.nd-stage .nd-label{pointer-events:none}
.nd-stage .nd-handle{fill:#1565c0;stroke:#fff;stroke-width:2}
.nd-stage .nd-handle-size{cursor:nwse-resize}
.nd-stage .nd-handle-curve{cursor:move}
.nd-panneaux{display:grid;gap:12px}
.nd-panneau{border:1px solid var(--line);border-radius:12px;padding:12px;display:grid;gap:8px}
.nd-panneau[hidden]{display:none}
/* Un <label> ou un <p> caché du panneau (texte élève) : la règle générale des label l'emporterait. */
.nd-panneau [hidden]{display:none!important}
.nd-dialog:focus{outline:none}
/* Un schema valide mais pas enregistre, retrouve dans ce navigateur (node-diagram-editor.js). */
.nd-brouillon{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:8px 0;padding:10px 12px;border:1px solid var(--line);border-left:4px solid var(--primary);border-radius:10px;background:var(--surface)}
.nd-brouillon p{margin:0;flex:1 1 260px}
.nd-brouillon .button{margin:0}
.nd-panneau h3{margin:0;font-size:1rem}
.nd-panneau label{margin:0}
/* V0.18.12.4 — texte d'une forme : zone mise en forme (G, I, S), taille du texte. */
.nd-champ{display:grid;gap:4px}
/* V0.18.12.106 — même défaut que la barre du scan : « display:grid » l'emportait sur hidden, le champ « Texte élève » était affiché même sans « Texte différent pour l'élève ». */
.nd-champ[hidden]{display:none}
.nd-champ-tete{display:flex;align-items:center;justify-content:space-between;gap:8px;font-weight:600}
.nd-format{display:inline-flex;gap:4px}
/* V0.18.12.178.1 — la barre G / I / S est SOUS la zone de texte (le menu flottant du système, qui s'ouvre au-dessus de la sélection, la recouvrait) ; boutons plus larges au doigt. */
.nd-champ>.nd-format{justify-self:start;margin-top:2px}
.nd-panneau .nd-format button{margin:0;min-width:30px;height:28px;padding:0 6px;border:1px solid var(--line);border-radius:6px;background:var(--surface);color:var(--text);font:inherit;font-size:.95rem;line-height:1;cursor:pointer}
.nd-panneau .nd-format button:hover{border-color:var(--primary)}
@media (pointer:coarse){.nd-panneau .nd-format{gap:8px}.nd-panneau .nd-format button{min-width:48px;height:42px;font-size:1.05rem}}
.nd-zone{min-height:4.2em;max-height:12em;overflow:auto;padding:8px 10px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--text);font-family:Arial,Helvetica,sans-serif;font-size:14px;line-height:1.35;white-space:pre-wrap;overflow-wrap:anywhere}
.nd-zone:focus{outline:2px solid var(--primary);outline-offset:1px}
.nd-zone:empty::before{content:attr(data-placeholder);color:var(--muted)}
.nd-taille{display:flex;flex-wrap:wrap;align-items:end;gap:8px}
.nd-taille label{flex:1 1 140px}
/* V0.18.12.121 — couleur de fond d'une forme : huit pastilles + « Aucune », chacune un vrai bouton NOMMÉ ; la pastille
   choisie a un cadre épais ET une coche (la couleur n'est jamais le seul signal), aria-pressed la dit au lecteur d'écran. */
.nd-couleurs{border:0;margin:0;padding:0;min-width:0;display:grid;gap:6px}
.nd-couleurs legend{padding:0;margin:0 0 4px;font-weight:600}
.nd-pastilles{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.nd-panneau .nd-pastille{display:flex;align-items:center;gap:8px;width:100%;min-height:34px;margin:0;padding:4px 8px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--text);font:inherit;font-size:.9rem;font-weight:400;text-align:left;cursor:pointer}
.nd-panneau .nd-pastille:hover{border-color:var(--primary)}
.nd-panneau .nd-pastille:focus-visible{outline:2px solid var(--primary);outline-offset:2px}
.nd-panneau .nd-pastille[aria-pressed="true"]{border:3px solid var(--primary);padding:2px 6px;font-weight:700}
.nd-pastille-puce{flex:0 0 20px;width:20px;height:20px;border:1.5px solid var(--text);border-radius:4px}
.nd-pastille-puce.est-vide{background:repeating-linear-gradient(135deg,transparent 0 4px,var(--line) 4px 6px)}
.nd-pastille-coche{margin-left:auto;visibility:hidden;font-weight:700}
.nd-pastille[aria-pressed="true"] .nd-pastille-coche{visibility:visible}
.nd-panneau .button{margin:0;justify-self:start}
@media(max-width:860px){.nd-corps{grid-template-columns:1fr}}
@media print{
  .node-diagram-block{break-inside:avoid}
  .node-diagram-relations{display:none}
  .node-diagram-svg{max-height:235mm}
  .node-diagram-svg .nd-shape,.node-diagram-svg .nd-sign{fill:#fff;stroke:#000}
  .node-diagram-svg .nd-text,.node-diagram-svg .nd-sign-text,.node-diagram-svg .nd-head{fill:#000}
  .node-diagram-svg .nd-label{fill:#000;stroke:#fff}
  .node-diagram-svg .nd-arrow{stroke:#000}
  .node-diagram-svg .nd-reponse,.node-diagram-svg .nd-sign-text.nd-version-enseignant{fill:#b42318}
  /* V0.18.12.121 — fond coloré : la teinte (.nd-c-<clé> .nd-shape, 3 classes) l'emporte sur le « fond blanc » ci-dessus (2) ; le
     trait et le texte restent noirs (une photocopie en gris garde un contour franc et un texte à plus de 10 de contraste), la réponse rouge. */
  .node-diagram-svg .nd-node.nd-coul .nd-shape{stroke:#000}
  .node-diagram-svg .nd-node.nd-coul .nd-text{fill:#000}
  .node-diagram-svg .nd-node.nd-coul .nd-text.nd-reponse{fill:#b42318}
  .node-diagram-svg{-webkit-print-color-adjust:exact;print-color-adjust:exact}
}


/* V0.18.9.8 — aperçu de cours adapté aux tablettes à 100 % de zoom.
   Le palier tablette conserve la frise et les commandes, mais donne la priorité
   au document et permet au bandeau de défiler horizontalement si nécessaire. */
@media (min-width:761px) and (max-width:1280px){
  body[data-page="chapter_preview"]:not(.projection-mode) .topbar,
  body[data-page="session_preview"]:not(.projection-mode) .topbar{
    gap:8px;
    padding:8px 12px;
  }

  body[data-page="chapter_preview"]:not(.projection-mode) .topbar > .brand,
  body[data-page="session_preview"]:not(.projection-mode) .topbar > .brand{
    flex:0 0 auto;
  }

  /* V0.18.12.340.2 — « ENSEIGNANTS » est masqué avec le mot. */
  body[data-page="chapter_preview"]:not(.projection-mode) .topbar > .brand .brand-sub,
  body[data-page="session_preview"]:not(.projection-mode) .topbar > .brand .brand-sub,
  body[data-page="chapter_preview"]:not(.projection-mode) .topbar > .brand .brand-label,
  body[data-page="session_preview"]:not(.projection-mode) .topbar > .brand .brand-label{
    display:none;
  }

  body[data-page="chapter_preview"]:not(.projection-mode)
  .topbar.preview-tools-docked > .preview-floating-tools.preview-tools-docked,
  body[data-page="session_preview"]:not(.projection-mode)
  .topbar.preview-tools-docked > .preview-floating-tools.preview-tools-docked{
    display:flex!important;
    flex:1 1 auto!important;
    min-width:0!important;
    width:auto!important;
    max-width:none!important;
    margin:0!important;
    padding:2px 0!important;
    gap:5px!important;
    flex-wrap:nowrap!important;
    justify-content:flex-start!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    scrollbar-width:none;
    -webkit-overflow-scrolling:touch;
    overscroll-behavior-x:contain;
  }

  body[data-page="chapter_preview"]:not(.projection-mode)
  .topbar.preview-tools-docked > .preview-floating-tools.preview-tools-docked::-webkit-scrollbar,
  body[data-page="session_preview"]:not(.projection-mode)
  .topbar.preview-tools-docked > .preview-floating-tools.preview-tools-docked::-webkit-scrollbar{
    display:none;
  }

  body[data-page="chapter_preview"]:not(.projection-mode)
  .topbar.preview-tools-docked > .preview-floating-tools.preview-tools-docked > *,
  body[data-page="session_preview"]:not(.projection-mode)
  .topbar.preview-tools-docked > .preview-floating-tools.preview-tools-docked > *{
    flex:0 0 auto!important;
    width:auto!important;
    max-width:none!important;
    margin:0!important;
  }

  body[data-page="chapter_preview"]:not(.projection-mode)
  .topbar.preview-tools-docked .preview-floating-tools .backlink,
  body[data-page="chapter_preview"]:not(.projection-mode)
  .topbar.preview-tools-docked .preview-floating-tools .button,
  body[data-page="chapter_preview"]:not(.projection-mode)
  .topbar.preview-tools-docked .preview-floating-tools button,
  body[data-page="session_preview"]:not(.projection-mode)
  .topbar.preview-tools-docked .preview-floating-tools .backlink,
  body[data-page="session_preview"]:not(.projection-mode)
  .topbar.preview-tools-docked .preview-floating-tools .button,
  body[data-page="session_preview"]:not(.projection-mode)
  .topbar.preview-tools-docked .preview-floating-tools button{
    min-height:34px!important;
    padding:6px 8px!important;
    font-size:.80rem!important;
    line-height:1.1!important;
    white-space:nowrap!important;
  }

  body[data-page="chapter_preview"]:not(.projection-mode) .container,
  body[data-page="session_preview"]:not(.projection-mode) .container{
    max-width:none!important;
    width:100%!important;
    padding-left:14px!important;
    padding-right:42px!important;
    box-sizing:border-box;
  }

  body[data-page="chapter_preview"]:not(.projection-mode) .course-document,
  body[data-page="session_preview"]:not(.projection-mode) .course-document{
    width:100%!important;
    max-width:min(1040px,calc(100vw - 70px))!important;
    box-sizing:border-box;
    padding:30px 34px;
  }

  body[data-page="chapter_preview"]:not(.projection-mode) .lesson-progress-rail,
  body[data-page="session_preview"]:not(.projection-mode) .lesson-progress-rail{
    right:5px;
  }

  body[data-page="chapter_preview"]:not(.projection-mode) .lesson-clock,
  body[data-page="session_preview"]:not(.projection-mode) .lesson-clock{
    font-size:.80rem;
  }
}

@media (min-width:761px) and (max-width:980px){
  body[data-page="chapter_preview"]:not(.projection-mode) .course-document,
  body[data-page="session_preview"]:not(.projection-mode) .course-document{
    max-width:calc(100vw - 54px)!important;
    padding:26px 24px;
  }
}


/* V0.18.10.97 — règles reprises de marker-history.css, que ce fichier était le seul
   à porter alors qu'AUCUNE page ne le chargeait. Le balisage correspondant est bien
   produit (assets/js/application.js — widget de marqueur de fin de séance), ces éléments s'affichaient donc sans mise en forme.
   Seules les règles absentes de tout fichier chargé ont été reprises : aucun conflit. */
@media(max-width:760px){
  .teaching-marker-note-panel{
    right:8px;
    bottom:82px;
    width:calc(100vw - 16px);
  }
  .marker-history-controls{
    align-items:stretch;
    flex-direction:column;
  }
  .marker-history-count{white-space:normal}
}
.teaching-marker-host{position:relative}
/* V0.18.11.58 — l'ancienne pastille « 📍 fin de séance » (::before, V0.14.44) et le badge
   de la dernière fin se dessinaient sur le même bloc : le badge devait la recouvrir, mais
   la marge globale des boutons (14 px) le décalait, et les deux pastilles se voyaient.
   Un bloc qui porte des badges n'affiche plus que ses badges ; l'ancienne pastille ne
   sert plus qu'à l'instant qui suit l'enregistrement, avant l'arrivée des badges. */
.teaching-end-marker-target.teaching-marker-host::before{content:none;display:none}
.teaching-end-marker-badges{
  position:absolute;
  right:8px;
  top:-17px;
  z-index:12;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:5px;
  max-width:calc(100% - 16px);
  pointer-events:auto;
}
.teaching-end-marker-badge{
  /* Des <button> : on neutralise la marge globale des boutons, comme .chapter-stop-marker. */
  margin:0;
  display:inline-flex;
  align-items:center;
  min-height:25px;
  padding:3px 9px;
  box-sizing:border-box;
  border:1px solid #b9c8d5;
  border-radius:999px;
  background:var(--tone-soft);
  color:var(--muted);
  box-shadow:0 2px 6px rgba(22,45,68,.08);
  font-size:.72rem;
  font-weight:750;
  line-height:1.15;
  white-space:nowrap;
}
.teaching-end-marker-badge.is-history{
  opacity:.82;
  background:var(--surface);
  color:var(--muted);
}
.teaching-end-marker-badge.is-latest{
  border-color:#e3bd68;
  background:#fff4d6;
  color:#8a5a00;
  opacity:1;
}
.teaching-end-marker-badge.is-correction{border-style:dashed}
@media(max-width:760px){
  .teaching-end-marker-badges{right:4px;gap:3px}
  .teaching-end-marker-badge{padding:3px 6px;font-size:.66rem}
}
@media print{
  .teaching-end-marker-badges,
  .chapter-stop-marker{display:none!important}
}
/* V0.18.12.34 — « font:inherit » écrasait la taille et la graisse de la règle ci-dessus : une pastille
   passée prenait la police de l'élément où elle est posée (16 px sur un bloc, 20,5 px en gras sur un
   titre de sous-partie). Seule la famille de caractères est héritée ; toutes les pastilles ont la même
   taille (choix du concepteur) — la dernière ne se distingue plus que par ses couleurs, une correction par
   sa bordure en pointillés. */
.teaching-end-marker-badge{
  appearance:none;
  font-family:inherit;
  cursor:pointer;
}
.teaching-end-marker-badge::after{
  content:'✎';
  display:inline-block;
  margin-left:5px;
  font-size:.68em;
  opacity:0;
  transform:translateX(-2px);
  transition:opacity .12s ease,transform .12s ease;
}
.teaching-end-marker-badge:hover::after,
.teaching-end-marker-badge:focus-visible::after{
  opacity:.72;
  transform:translateX(0);
}
.teaching-marker-move-panel{
  position:fixed;
  right:18px;
  bottom:92px;
  z-index:1100;
  width:min(390px,calc(100vw - 24px));
  box-sizing:border-box;
  padding:12px;
  border:1px solid #d6b66c;
  border-radius:14px;
  background:rgba(255,252,242,.98);
  box-shadow:0 14px 38px rgba(22,45,68,.24);
  backdrop-filter:blur(8px);
}
.teaching-marker-move-panel[hidden],
.teaching-marker-move-guide[hidden]{display:none!important}
.teaching-marker-move-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.teaching-marker-move-head strong{color:#7a5200}
.teaching-marker-move-head button{
  width:32px;
  height:32px;
  margin:0;
  padding:0;
  display:grid;
  place-items:center;
  background:var(--surface);
  color:var(--muted);
  border:1px solid #e0d4b7;
}
.teaching-marker-move-panel p{
  margin:8px 0 10px;
  color:var(--muted);
  font-size:.84rem;
  line-height:1.4;
}
.teaching-marker-move-actions{
  display:flex;
  justify-content:flex-end;
  gap:7px;
}
.teaching-marker-move-actions button{margin:0}
.teaching-marker-move-save{
  background:#8a5a00;
  color:#fff;
  font-weight:800;
}
.teaching-marker-move-status{
  display:block;
  min-height:1.1em;
  margin-top:6px;
  color:var(--theme-warning-text,#8a5a00);
  font-size:.75rem;
}
.teaching-marker-move-panel.is-busy{opacity:.72}
.teaching-marker-move-guide{
  position:fixed;
  z-index:1095;
  height:0;
  border-top:2px dashed #d08b18;
  pointer-events:none;
}
.teaching-marker-move-guide::before{
  content:'';
  position:absolute;
  left:-5px;
  top:-6px;
  width:10px;
  height:10px;
  border-radius:50%;
  background:#d08b18;
  box-shadow:0 0 0 2px #fff;
}
.teaching-marker-move-guide span{
  position:absolute;
  right:0;
  top:-27px;
  padding:4px 8px;
  border:1px solid #e3bd68;
  border-radius:999px;
  background:#fff9e8;
  color:#8a5a00;
  font-size:.7rem;
  font-weight:800;
  white-space:nowrap;
}
body.projection-mode .teaching-marker-move-panel{
  bottom:calc(var(--presentation-projection-bottom,66px) + 14px);
  z-index:1300;
}
body.projection-mode .teaching-marker-move-guide{z-index:1295}
@media(max-width:760px){
  .teaching-marker-move-panel{
    right:8px;
    bottom:82px;
    width:calc(100vw - 16px);
  }
  .teaching-marker-move-guide span{font-size:.64rem}
}
@media print{
  .teaching-marker-move-panel,
  .teaching-marker-move-guide{display:none!important}
}

/* V0.18.10.98 — repère « ce réglage se change ailleurs ».
   Discret par construction : un lien de la taille d'une légende, jamais un bouton.
   Il y en a un par section, pas un par champ — semer une icône sur chaque réglage
   couvrirait l'écran de symboles, ce qui dessert l'utilisateur novice qu'on aide. */
.settings-shortcut{
  display:inline-flex;align-items:center;gap:5px;
  padding:3px 9px 3px 7px;border:1px solid var(--line);border-radius:999px;
  background:var(--surface);color:var(--muted);
  font-size:.76rem;font-weight:700;line-height:1.3;text-decoration:none;white-space:nowrap;
}
.settings-shortcut:hover,.settings-shortcut:focus-visible{border-color:var(--primary);color:var(--primary)}
.settings-shortcut-icon{font-size:.9em;line-height:1}
.settings-shortcut-row{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}

/* Bannière de retour : posée par render_header, donc valable sur toute page
   atteinte depuis un repère. Cliquer sur un réglage ne doit pas perdre l'enseignant. */
.settings-return{
  display:inline-flex;align-items:center;gap:7px;
  margin:0 0 16px;padding:9px 14px;border-radius:10px;
  border:1px solid color-mix(in srgb,var(--line) 60%,var(--primary) 40%);
  background:color-mix(in srgb,var(--surface) 88%,var(--primary) 12%);
  color:var(--primary);font-weight:750;font-size:.86rem;text-decoration:none;
}
.settings-return:hover,.settings-return:focus-visible{background:color-mix(in srgb,var(--surface) 78%,var(--primary) 22%)}

/* V0.18.11.16 — divergence entre le fichier VERSION et la derniere installation
   enregistree : signe qu'un transfert de fichiers a ecrase l'application. */
.admin-version-mismatch{
  margin:0 0 16px;
  padding:14px 16px;
  border:1px solid #e4b4ae;
  border-left:4px solid #a8352c;
  border-radius:11px;
  background:#fdeceb;
  color:#7a2c25;
}
.admin-version-mismatch p{margin:.45rem 0}
.admin-version-mismatch form{margin:.7rem 0 0}
[data-theme="night"] .admin-version-mismatch{background:#3d1f1c;border-color:#5f302b;color:#f0a49c}

/* V0.18.11.26 — course ajoutee sous le cours pour que le point d'arret puisse
   atteindre les derniers blocs. Sa hauteur est posee par application.js, au
   pixel pres : la regle ne fait qu'en garantir le comportement. */
.teaching-marker-reach{height:0;flex:0 0 auto;pointer-events:none}
@media print{.teaching-marker-reach{display:none!important}}

/* V0.18.11.32 — signaler brievement l'element qu'on vient de retrouver.
   Apres un rechargement, cet element a souvent change de texte : sans ce
   signal, rien ne dirait que c'est bien celui qu'on vient de modifier.
   Les deux termes suivent le theme, et l'animation se tait si le systeme
   demande a reduire les animations. */
.retour-a-sa-place{
  animation:retour-a-sa-place 2.4s ease-out 1;
  border-radius:12px;
}
@keyframes retour-a-sa-place{
  0%   { box-shadow:0 0 0 3px color-mix(in srgb,var(--primary) 55%,transparent); }
  70%  { box-shadow:0 0 0 3px color-mix(in srgb,var(--primary) 35%,transparent); }
  100% { box-shadow:0 0 0 3px transparent; }
}
@media(prefers-reduced-motion:reduce){
  .retour-a-sa-place{animation:none;box-shadow:0 0 0 3px color-mix(in srgb,var(--primary) 45%,transparent)}
}

/* V0.18.11.78 — Administration : politique de correction. Les boutons radio
   echappent a input{width:100%}, qui frappe toute case (voir la .69). */
.admin-politique-choix{border:0;padding:0;margin:0 0 14px;display:grid;gap:10px;min-width:0}
.admin-politique-choix legend{font-weight:800;margin:0 0 8px;padding:0}
.admin-politique-option{font-weight:400;display:flex;gap:10px;align-items:flex-start;padding:10px 12px;border:1px solid var(--line);border-radius:10px;cursor:pointer;background:var(--surface)}
.admin-politique-option input{width:auto;margin:3px 0 0;flex:none}
.admin-politique-option:has(input:checked){border-color:var(--primary);background:var(--tone-soft)}
/* V0.18.11.79 — Configuration : « tu » ou « vous » dans les retours proposés par l'IA. */
.configuration-retour-ia{display:flex;flex-wrap:wrap;gap:10px 18px;align-items:center}
.configuration-retour-ia .checkbox-label{display:inline-flex;gap:6px;align-items:center;margin:0}
/* V0.18.11.81 — convertir une image en schéma : panneau de relecture (séance) ;
   V0.18.11.82 — le même panneau sur les pages d'import, d'où sa place ici. */
.ap-schema-conversion{margin:12px 0 0;padding:14px 16px;border:1px solid #d9cef1;border-radius:10px;background:color-mix(in srgb,var(--surface) 94%,#7057a8 6%);display:grid;gap:10px}
.ap-schema-conversion h3{margin:0;font-size:1rem}
.ap-schema-conversion-cote{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.ap-schema-conversion-cote figure{margin:0;padding:8px;border:1px solid var(--line);border-radius:8px;background:var(--surface);min-width:0;display:grid;gap:6px}
.ap-schema-conversion-cote img{max-width:100%;height:auto}
.ap-schema-conversion-cote figcaption{font-size:.8rem;font-weight:700;color:var(--muted)}
.ap-schema-conversion-apercu svg{max-width:100%;height:auto}
.ap-schema-conversion-eleve{margin:0;padding:8px;border:1px dashed var(--line);border-radius:8px;background:var(--surface);display:grid;gap:6px}
.ap-schema-conversion-eleve figcaption{font-size:.8rem;font-weight:700;color:var(--muted)}
.ap-schema-conversion-relations ul{margin:.3rem 0 0;padding-left:1.2rem}
.ap-schema-conversion-remarque{margin:0;font-weight:700}
.ap-schema-conversion-aide{margin:0;color:var(--muted);font-size:.9rem}
.ap-schema-conversion-erreur{margin:0;color:var(--danger);font-weight:700}
/* V0.18.11.81.1 — l'attente se voit : roue, message en gras, secondes écoulées. */
.ap-schema-conversion-attente{display:flex;flex-wrap:wrap;align-items:center;gap:10px 14px;padding:14px 16px;border:2px solid #7057a8;border-radius:10px;background:#f1edfa;color:#2b2140}
.ap-schema-conversion-attente .ap-schema-roue{width:1.6rem;height:1.6rem;flex:0 0 1.6rem;border-width:3px;color:#7057a8}
.ap-schema-conversion-attente .ap-schema-conversion-etat{margin:0;flex:1 1 18rem;font-weight:800;font-size:1.02rem}
.ap-schema-conversion-chrono{font:700 .95rem ui-monospace,monospace;font-variant-numeric:tabular-nums}
[data-theme="night"] .ap-schema-conversion-attente{background:#242033;border-color:#4b3f68;color:#e3dcf5}
[data-theme="night"] .ap-schema-conversion-attente .ap-schema-roue{color:#b9a5ea}
.ap-schema-conversion-actions{display:flex;flex-wrap:wrap;gap:8px}
@media (max-width:640px){.ap-schema-conversion-cote{grid-template-columns:1fr}}
/* V0.18.11.82 — la proposition de schéma à l'import (relecture d'un cours en PDF, transfert ponctuel). */
.ap-schema-import-remplace,.ap-schema-snippet-retenu{display:grid;gap:8px;padding:10px 12px;border:1px solid #d9cef1;border-radius:10px;background:var(--surface)}
.ap-schema-import-remplace .meta,.ap-schema-snippet-retenu .meta{margin:0}
.ap-schema-import-remplace>button,.ap-schema-snippet-retenu>button{justify-self:start}
.ap-schema-import-relations{margin:0;padding-left:1.2rem}
.import-type-fixe{display:block;padding:6px 0}
.ap-schema-import-info{margin:6px 0 0}
.ap-schema-snippet-zone:empty{display:none}
.ap-schema-snippet-zone{margin:8px 0}
/* V0.18.11.83 — support de réponse d'une question de cours : quadrillage, zone libre, image de correction.
   Hauteur = nombre de lignes × 22 px (celle des lignes) : changer de support ne déplace rien sur la fiche. */
.answer-lines.answer-zone{height:calc(var(--answer-lines,2) * 22px);box-sizing:border-box;border:1px solid #aeb8c2;border-radius:4px;background-color:#fff}
/* Classe construite en PHP ('answer-zone-'.$type, course-blocks.php) : invisible à une recherche du nom
   entier. Retirée à tort en V0.18.11.92 comme règle morte, rétablie en V0.18.12.3. */
.answer-lines.answer-zone-grid{
  background-image:linear-gradient(to right,#cfd7df 0.25mm,transparent 0.25mm),linear-gradient(to bottom,#cfd7df 0.25mm,transparent 0.25mm);
  background-size:var(--grid-step,5mm) var(--grid-step,5mm);
  background-position:-0.1mm -0.1mm;
}
/* Même hauteur que la zone : texte en haut, l'image prend le reste (rien ne saute à l'affichage).
   Le cadre intérieur porte la mise en page : les règles d'affichage de .question-teacher-answer
   (vue, projection, impression) restent seules à décider s'il se voit. */
.question-teacher-answer.question-teacher-answer-image{padding:0;background:#fff;color:#7d2a22;box-sizing:border-box;border:1px solid #d9b3ad}
.question-response-area .question-teacher-answer.question-teacher-answer-image{margin-top:12px}
.question-correction-cadre{display:flex;flex-direction:column;min-height:calc(var(--answer-lines,2) * 22px - 2px)}
.question-correction-cadre .question-teacher-answer-texte{flex:none}
.question-teacher-answer-image .question-teacher-answer-texte{padding:10px 12px;background:#fff2ef;border-radius:7px 7px 0 0}
.question-correction-image{display:block;flex:1 1 0;min-height:min(40px, calc(var(--answer-lines,2) * 22px - 2px));width:100%;max-height:calc(var(--answer-lines,2) * 22px);object-fit:contain}
/* Sans zone (0 ligne) et en vue enseignant (aucune zone à recouvrir) : l'image à sa taille. */
.question-teacher-answer-image.sans-zone .question-correction-cadre,
.course-view-teacher .question-correction-cadre{min-height:0}
.question-teacher-answer-image.sans-zone .question-correction-image,
.course-view-teacher .question-correction-image{flex:none;max-height:none;height:auto;width:auto;max-width:100%;margin:0 auto}
.question-support-editor:not(:has(select[name="response_support"] option[value="lines"]:checked)) .question-support-reserve{display:none}
@media print{
  .answer-zone,.answer-zone-grid,.question-teacher-answer-image{-webkit-print-color-adjust:exact;print-color-adjust:exact}
}
/* V0.18.11.85 — nombre de lignes et support de réponse côte à côte (l'un sous l'autre sur écran étroit). */
.question-editor-reponse{display:grid;grid-template-columns:minmax(170px,240px) minmax(0,1fr);gap:12px 16px;align-items:start}
.question-editor-reponse>.question-editor-lines{margin:0}
@media (max-width:700px){.question-editor-reponse{grid-template-columns:minmax(0,1fr)}}
.question-correction-paste img{max-width:220px;max-height:140px;object-fit:contain}
.question-support-editor{margin:0;padding:10px 12px;border:1px solid var(--line);border-radius:8px;display:grid;gap:8px}
.question-support-editor legend{font-weight:700;padding:0 4px}
.question-support-row{display:flex;flex-wrap:wrap;gap:8px 16px;align-items:end}
.question-support-row label{margin:0}
.question-support-editor .format-help{margin:0}
.question-support-image{display:grid;gap:6px}
.question-support-image-titre{font-weight:700}
.question-support-image-apercu{max-width:220px;max-height:140px;object-fit:contain;border:1px solid var(--line);border-radius:6px;background:#fff}
.question-support-editor input[type="checkbox"]{width:auto}
.question-support-editor:has(select[name="response_support"] option[value="lines"]:checked) .question-support-image,
.question-support-editor:not(:has(select[name="response_support"] option[value="grid"]:checked)) .question-support-grid{display:none}
/* V0.18.11.84 — « Supprimer ce bloc » dans le menu ⋮ : en dernier, séparé, en couleur d'alerte. */
.block-context-menu .block-context-delete{margin-top:4px;padding-top:4px;border-top:1px solid var(--line)}
/* V0.18.12.13 — groupes dépliants du menu ⋮ d'un bloc, et formulaire « Vers une autre séance ». */
.block-context-menu{max-height:min(70vh,560px);overflow-y:auto}
.block-context-menu .block-menu-groupe-titre::before{content:"▸";display:inline-block;width:1.1em;color:var(--muted)}
.block-context-menu .block-menu-groupe-titre[aria-expanded="true"]::before{content:"▾"}
.block-context-menu .block-menu-groupe-contenu{margin:0 0 4px 12px;padding-left:6px;border-left:2px solid var(--line)}
.block-context-menu .block-deplacer-seance[hidden]{display:none!important}   /* display:grid battait [hidden] */
.block-context-menu .block-deplacer-seance{display:grid;gap:6px;margin:2px 0 6px;padding:8px;border:1px solid var(--line);border-radius:8px;background:var(--tone-soft,transparent)}
.block-context-menu .block-deplacer-seance label{margin:0;font-weight:700;font-size:.85rem}
.block-context-menu .block-deplacer-seance select{width:100%;margin:4px 0 0}
.block-context-menu .block-deplacer-ou{display:flex;flex-wrap:wrap;gap:4px 14px}
.block-context-menu .block-deplacer-ou label{display:inline-flex;align-items:center;gap:6px;font-weight:600}
.block-context-menu .block-deplacer-ou input{width:auto;margin:0}
.block-context-menu .block-deplacer-seance button[type="submit"]{background:var(--primary);color:var(--surface);text-align:center}
.block-context-menu .block-deplacer-seance button[type="submit"]:hover{background:var(--primary2,var(--primary))}
.block-deplace-notice{margin:0 0 14px}
.block-context-menu .block-context-delete button{color:var(--danger)}
.block-context-menu .block-context-delete button:hover{background:color-mix(in srgb,var(--danger) 10%,transparent)}

/* V0.18.11.89 — rappel de la note de reprise, au-dessus de « Fin de séance ici » (placé par
   application.js d'après la position réelle de la boîte). Couleurs écrites en dur, comme la
   pastille « 📍 fin de séance » : ambre clair et texte brun foncé dans tous les thèmes. */
.rappel-reprise{position:fixed;right:18px;bottom:96px;z-index:2610;display:flex;flex-direction:column;align-items:flex-end;pointer-events:none}
.rappel-reprise[hidden]{display:none!important}
.rappel-reprise>*{pointer-events:auto}
.rappel-reprise[data-etat="ouvert"] .rappel-reprise-pastille,
.rappel-reprise[data-etat="replie"] .rappel-reprise-carte{display:none}
.rappel-reprise-pastille{margin:0;padding:7px 12px;min-height:36px;border:1px solid #e3bd68;border-radius:999px;background:#fff4d6;color:#6b4500;font-weight:800;font-size:.82rem;box-shadow:0 6px 18px rgba(22,45,68,.18)}
.rappel-reprise-pastille:hover{background:#ffe9b3;color:#6b4500}
.rappel-reprise-carte{box-sizing:border-box;width:var(--rappel-largeur,390px);max-width:calc(100vw - 16px);padding:9px 12px 11px;border:1px solid #e3bd68;border-left:5px solid #d08b18;border-radius:14px;background:#fff8e6;color:#3d2a00;box-shadow:0 12px 30px rgba(22,45,68,.20)}
.rappel-reprise-tete{display:flex;align-items:baseline;gap:8px;margin-bottom:5px}
.rappel-reprise-tete strong{color:#6b4500;font-size:.88rem;white-space:nowrap}
.rappel-reprise-date{flex:1;min-width:0;color:#6b4500;font-size:.74rem}
.rappel-reprise-fermer{flex:0 0 auto;align-self:center;width:30px;height:30px;margin:0;padding:0;display:grid;place-items:center;border:1px solid #e3bd68;border-radius:8px;background:#fff4d6;color:#6b4500;font-size:1.05rem;font-weight:800;line-height:1}
.rappel-reprise-fermer:hover{background:#ffe9b3;color:#6b4500}
.rappel-reprise-texte{margin:0;max-height:9.5em;overflow-y:auto;white-space:pre-line;overflow-wrap:anywhere;font-size:.9rem;line-height:1.4;color:#3d2a00}
/* Un panneau de la boîte (menu ⋯, note, repositionnement, choix de classe) ou le menu de
   projection s'ouvre au même endroit : le rappel s'efface le temps qu'il est ouvert. */
body.teaching-marker-repositioning .rappel-reprise,
body:has(.teaching-marker-menu:not([hidden])) .rappel-reprise,
body:has(.teaching-marker-note-panel:not([hidden])) .rappel-reprise,
body:has(.marker-context-chooser.is-open) .rappel-reprise,
body:has(.presentation-projection-menu.is-open) .rappel-reprise{visibility:hidden!important}
/* V0.18.12.67.2 — le rail de progression (z-index 1050) passait DEVANT le menu ⋯, la note de fin de séance et le choix de classe du
   panneau 📍 (z-index 135 à 990) : ses « Fin S3 », « Fin S4 »… se mêlaient aux libellés du menu (1280 × 900 et 1366 × 768). Le temps
   qu'un de ces panneaux est ouvert, le rail passe derrière lui : il reste visible tout autour. */
body:has(.teaching-marker-menu:not([hidden])) .chapter-session-rail,
body:has(.teaching-marker-note-panel:not([hidden])) .chapter-session-rail,
body:has(.marker-context-chooser.is-open) .chapter-session-rail,
/* V0.18.12.81 — le rail est affiché en rétroprojection : il passait aussi devant le menu ⋯ de la barre de projection. */
body:has(.presentation-projection-menu.is-open) .chapter-session-rail{z-index:120}
@media (pointer:coarse){
  .rappel-reprise-pastille{min-height:40px;padding-inline:14px}
  .rappel-reprise-fermer{width:40px;height:40px}
}
@media print{.rappel-reprise{display:none!important}}

/* V0.18.11.98 — aides ⓘ : le bouton (rond discret, taille de doigt au toucher) et la bulle. */
.aide-i{display:inline-grid;place-items:center;flex:0 0 auto;width:20px;height:20px;min-height:0;margin:0;padding:0;
  border:1px solid color-mix(in srgb,var(--primary) 45%,var(--line));border-radius:999px;background:var(--surface);
  color:var(--primary);font:italic 700 .72rem/1 Georgia,"Times New Roman",serif;cursor:help;box-shadow:none}
.aide-i:hover,.aide-i[aria-expanded="true"]{background:var(--primary);color:var(--surface);border-color:var(--primary)}
.aide-i:focus-visible{outline:2px solid var(--primary);outline-offset:2px}
.aide-i-exemple{vertical-align:-3px;cursor:default}
@media (pointer:coarse){.aide-i{width:28px;height:28px;font-size:.85rem}}
.aide-bulle{position:absolute;z-index:4000;max-width:min(320px,calc(100vw - 16px));padding:9px 12px;
  border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--text);
  font-size:.84rem;line-height:1.45;box-shadow:0 10px 28px rgba(15,30,45,.22)}
.aide-bulle[hidden]{display:none!important}
@media print{.aide-i,.aide-bulle{display:none!important}}
/* À côté d'un titre de page : centrée sur la ligne, un peu d'air. */
h1>.aide-i{margin-left:12px;vertical-align:.35em}
h2>.aide-i{margin-left:8px;vertical-align:.2em}
/* V0.18.12.136 — ⓘ posées à côté d'un libellé, d'une métrique, d'un bouton ou d'un paragraphe (hors titres, déjà réglés ci-dessus). */
:is(p,dt,th,span,strong,legend,li,h3)>.aide-i,.button-row>.aide-i,form>.aide-i{margin-left:6px;vertical-align:middle}
.settings-shortcut-row>.aide-i{align-self:center}
.teacher-calendar-toolbar>.aide-i{margin-left:8px;align-self:center}
/* Les boutons d'une rangée d'actions s'étirent à 100 % sur téléphone : la ⓘ garde sa taille (zone de doigt au toucher). */
.resource-usage-actions .aide-i{width:20px}
@media (pointer:coarse){.resource-usage-actions .aide-i{width:28px}}
/* Le bandeau violet de lancement repeint tout bouton en violet plein : la ⓘ garde son aspect. */
.corrections-hub-launch .aide-i{background:var(--surface);color:var(--primary);border-color:color-mix(in srgb,var(--primary) 45%,var(--line))}
.corrections-hub-launch .aide-i:hover:not(:disabled),.corrections-hub-launch .aide-i[aria-expanded="true"]{background:var(--primary);color:var(--surface);border-color:var(--primary)}
/* Menu ⋮ d'un bloc : une ligne de titre et sa ⓘ ; les boutons du menu prennent toute la largeur,
   pas celle-ci (taille fixée, sinon la règle des boutons du menu l'étire). */
.block-context-aide{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:2px 6px 6px;margin-bottom:4px;border-bottom:1px solid var(--line);color:var(--muted);font-size:.78rem;font-weight:700}
.block-context-menu .block-context-aide .aide-i{width:20px;min-width:0;height:20px;padding:0;margin:0;justify-content:center;text-align:center}
@media (pointer:coarse){.block-context-menu .block-context-aide .aide-i{width:28px;height:28px}}
.teaching-marker-main>.aide-i{align-self:center}
/* V0.18.12.317 — le « ? » d'un endroit de saisie (aide_lien_saisie_v012317) : un LIEN qui s'ouvre dans un nouvel onglet, avec le rond discret des « i ». Au moins 8 px d'air de chaque côté d'un voisin ;
   au doigt, la zone sensible (::after, 8 px de plus tout autour) fait 44 px sans agrandir le rond. La barre de mise en forme le pose juste après son état (« Sélectionnez un texte modifiable »), hors de ses commandes
   (qui sont estompées et inactives tant qu'aucun texte n'est choisi) ; le bloc Formule et le bloc Code le posent en tête de leur volet ; une question d'évaluation, à côté de son numéro. */
a.aide-i-lien{position:relative;margin-inline:8px;font-family:inherit;font-style:normal;font-weight:700;font-size:.8rem;line-height:1;text-decoration:none;cursor:pointer}
@media (pointer:coarse){a.aide-i-lien::after{content:"";position:absolute;inset:-8px}}
.aide-saisie{display:flex;justify-content:flex-end;align-items:center;margin:0 0 6px}
.aide-saisie>a.aide-i-lien{margin-inline:0}
.wysiwyg-toolbar>a.aide-i-lien{flex:0 0 auto;margin-inline:0}
@media (min-width:921px){.wysiwyg-toolbar>a.aide-i-lien{margin-right:auto}}
.evaluation-question-editor-head a.aide-i-lien{margin-inline:10px 6px;vertical-align:middle}
.evaluation-rail-cell{position:relative;display:grid;min-width:0}
.evaluation-rail-cell>.evaluation-rail-step{min-width:0}
.evaluation-rail-cell>.aide-i{position:absolute;top:7px;right:7px}
.evaluation-rail-cell:has(.aide-i)>.evaluation-rail-step{padding-right:34px}
.appearance-aides-form{display:flex;align-items:center;flex-wrap:wrap;gap:12px}
.appearance-aides-form .checkbox-label{margin:0}

/* V0.18.12.48 — bloc Audio : lecteur avec onde et curseur (aperçu, séance, rétroprojection). L'onde et les boutons
   sont construits par application.js (courseAudioV01248) ; sans JavaScript, le lecteur natif <audio controls> reste. */
.course-audio{margin:14px 0;max-width:720px}
.course-audio audio{display:block;width:100%}
.course-audio-ui{display:grid;gap:10px;margin-top:8px}
.course-audio-commandes{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.course-audio-bouton{margin:0;padding:8px 14px;font-size:.92rem;touch-action:manipulation}   /* V0.18.12.59.2 — pas de délai ni de zoom au double toucher */
.course-audio-bouton:disabled{opacity:.45;cursor:default}
.course-audio-temps{margin-left:auto;font-variant-numeric:tabular-nums;color:var(--muted);font-size:.9rem}
.course-audio-onde{display:block;width:100%;height:96px;border:1px solid var(--line);border-radius:10px;background:var(--surface);cursor:pointer;touch-action:none}
.course-audio-onde:focus-visible{outline:2px solid var(--primary);outline-offset:2px}
/* V0.18.12.59 — un navigateur qui ne sait pas lire le fichier masque l'onde et les boutons (attribut hidden) : sans ces règles, display:block / flex l'emportaient et ils restaient affichés, sans effet. */
.course-audio-onde[hidden],.course-audio-commandes[hidden],.course-audio-erreur[hidden]{display:none}
.course-audio-erreur{margin:4px 0 0;color:var(--danger)}
@media (pointer:coarse){.course-audio-bouton{padding:12px 16px}.course-audio-onde{height:112px}}
body.projection-mode .course-audio{max-width:none}
body.projection-mode .course-audio-onde{height:160px}
body.projection-mode .course-audio-bouton{padding:12px 22px;font-size:1.15rem}
body.projection-mode .course-audio-temps{font-size:1.1rem}
@media print{.course-audio-ui,.course-audio audio{display:none!important}.course-audio::before{content:"🔊 Message audio";font-size:.9rem;color:#53616e}}

/* V0.18.12.49 — bloc Audio : enregistrer depuis le téléphone (panneau d'édition) */
.audio-telephone{margin:10px 0}
.audio-telephone-zone{margin-top:10px;padding:12px;border:1px solid var(--line);border-radius:12px;background:var(--surface);max-width:360px}
.audio-telephone-zone[hidden]{display:none}
.audio-telephone-qr{display:flex;justify-content:center;min-height:0;margin-bottom:6px}
.audio-telephone-qr img,.audio-telephone-qr canvas{max-width:100%;height:auto;background:#fff;padding:6px;border-radius:8px}

/* V0.18.12.50 — bloc Audio : découper les blancs (repères début / fin sur l'onde, dans l'éditeur du bloc) */
.audio-decoupe{margin:12px 0;padding:12px;border:1px solid var(--line);border-radius:12px;background:var(--surface);max-width:720px}
.audio-decoupe[hidden]{display:none}
.audio-decoupe-onde{display:block;width:100%;height:96px;border:1px solid var(--line);border-radius:10px;background:var(--surface);touch-action:none;cursor:ew-resize}
.audio-decoupe-onde:focus-visible{outline:2px solid var(--primary);outline-offset:2px}
.audio-decoupe-champs{display:flex;flex-wrap:wrap;align-items:center;gap:6px 16px;margin:10px 0}
.audio-decoupe-champs label{display:inline-flex;align-items:center;gap:6px;margin:0}
.audio-decoupe-champs input{width:5.5em;margin:0}
.audio-decoupe-actions{display:flex;flex-wrap:wrap;gap:8px}
.audio-decoupe-actions button{margin:0}

/* V0.18.12.50 — bloc Audio : la réception du message du téléphone est annoncée en grand dans l'éditeur du bloc */
.audio-recu{margin:12px 0;padding:12px 14px;border:2px solid var(--success);border-radius:12px;background:color-mix(in srgb,var(--success) 10%,var(--surface));color:var(--text);max-width:720px}
.audio-recu[hidden]{display:none}
.audio-recu strong{display:block;margin-bottom:2px;color:color-mix(in srgb,var(--success) 80%,var(--text));font-size:1.05rem} /* V0.18.12.64 : 4,5:1 en Pétrole */
.audio-recu audio{display:block;width:100%;margin-top:8px}
@keyframes audio-recu-clignote{0%{box-shadow:0 0 0 0 color-mix(in srgb,var(--success) 55%,transparent)}70%{box-shadow:0 0 0 14px transparent}100%{box-shadow:0 0 0 0 transparent}}
.audio-recu-flash{animation:audio-recu-clignote 1.2s ease-out 2}
@media (prefers-reduced-motion:reduce){.audio-recu-flash{animation:none}}

/* V0.18.12.52 — Progression : « ✔ Chapitre terminé » dans l'en-tête d'un chapitre */
.progress-chapter-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.progress-chapter-finish{margin:0}
/* V0.18.12.67.3 — « ↩ Rouvrir ce chapitre… » (défaire un « Chapitre terminé ») : un dépliant qui se voit comme un bouton. */
.progress-chapter-reopen{margin:0}
.progress-chapter-reopen>summary{display:inline-block;cursor:pointer;padding:.3rem .7rem;border:1px solid var(--line);border-radius:999px;background:var(--surface);color:var(--primary);font-weight:700;font-size:.85rem;list-style:none}
.progress-chapter-reopen>summary::-webkit-details-marker{display:none}
.progress-chapter-reopen[open]>summary{margin-bottom:.4rem}
.progress-chapter-finish button{margin:0}

/* V0.18.12.53 — « Chapitre terminé » depuis l'aperçu : question dans le panneau de fin de séance */
.teaching-marker-chapitres{margin:10px 0;padding:10px 12px;border:1px solid var(--line);border-radius:10px;background:var(--surface)}
.teaching-marker-chapitres[hidden]{display:none}
.teaching-marker-chapitre{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-top:8px}
.teaching-marker-chapitre button{margin:0;padding:7px 12px;font-size:.88rem}
.teaching-marker-chapitre.is-fait span{color:color-mix(in srgb,var(--success) 85%,var(--text))} /* V0.18.12.64 : 4,5:1 en Pétrole */

/* V0.18.12.57 — import de l'emploi du temps PRONOTE (page timetable_import). */
.tti-card{margin-top:16px}
.tti-upload{display:flex;flex-wrap:wrap;align-items:flex-end;gap:12px}
.tti-upload label{margin:0;flex:1 1 280px}
.tti-upload button{margin:0}
.tti-privacy{margin:12px 0 0;line-height:1.5}
.tti-resume{margin:0;padding-left:1.2rem;display:grid;gap:4px}
.tti-table-wrap{overflow-x:auto}
.tti-table{width:100%;border-collapse:collapse}
.tti-table th,.tti-table td{padding:10px 8px;border-bottom:1px solid var(--line);text-align:left;vertical-align:top}
.tti-table tr.tti-pending td:first-child{box-shadow:inset 4px 0 0 var(--danger)}
.tti-table tr.tti-ignored{color:var(--muted)}
.tti-map-form{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.tti-map-form select{flex:1 1 220px;min-width:0;margin:0}
.tti-map-form button{margin:0}
.tti-create{margin-top:8px}
.tti-create>summary{cursor:pointer;color:var(--primary);font-size:.86rem;font-weight:700}
.tti-create-form{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;gap:8px;align-items:end;margin-top:8px}
.tti-create-form label,.tti-create-form input,.tti-create-form select,.tti-create-form button{margin:0}
.tti-apercu{list-style:none;margin:0;padding:0;display:grid;gap:2px}
.tti-apercu li{display:grid;grid-template-columns:minmax(120px,170px) minmax(0,1fr) 70px minmax(80px,140px);gap:10px;padding:7px 4px;border-bottom:1px solid var(--line)}
.tti-quand{font-variant-numeric:tabular-nums;font-weight:700}
.tti-quoi{overflow-wrap:anywhere}
.tti-forget>summary{cursor:pointer;color:var(--muted);font-weight:700}
/* V0.18.12.60 — case « Remplacer même s'il y a beaucoup moins de cours » (une case hérite sinon de input{width:100%}) ; libellés absents */
.tti-forcer{display:flex;align-items:flex-start;gap:8px;flex:1 1 100%;margin:0;font-weight:600;font-size:.88rem;color:var(--muted)}
.tti-forcer input{width:auto;flex:0 0 auto;margin:3px 0 0}
.tti-absents{margin-top:12px}
.tti-absents>summary{cursor:pointer;color:var(--muted);font-weight:700;font-size:.9rem}
.tti-absents ul{margin:8px 0 0;padding-left:1.2rem;color:var(--muted)}
/* V0.18.12.61 — lecture automatique par l'adresse PRONOTE : section de la page d'import, avis d'Aujourd'hui / Progression */
.tti-sync-form{display:flex;flex-wrap:wrap;align-items:flex-end;gap:12px}
.tti-sync-form label{margin:0;flex:1 1 280px}
.tti-sync-form button{margin:0}
/* l'adresse secrète est masquée à l'écran (rétroprojection), sans être un champ « mot de passe » que le navigateur proposerait d'enregistrer */
.tti-secret{-webkit-text-security:disc;text-security:disc;font-family:var(--font-mono,monospace)}
.tti-sync-actions form{margin:0}
.tti-sync-changer form{margin-top:10px}
.tti-sync-alerte{color:var(--danger);font-weight:600}
.tti-sync-etat{margin:12px 0 0;line-height:1.5}
.pronote-sync-retard,.pronote-sync-avis{margin:0 0 12px;padding:8px 12px;border:1px solid var(--line);border-radius:10px;background:var(--surface);font-size:.9rem;line-height:1.45}
.pronote-sync-retard{border-left:4px solid var(--danger)}
.pronote-sync-avis{border-left:4px solid var(--primary)}
.pronote-sync-avis[hidden]{display:none}
.tti-absents li{margin:4px 0}
.tti-retirer{display:inline-block;margin:0 0 0 8px}
.tti-retirer button{margin:0;padding:2px 10px;font-size:.8rem}
/* libellé dont la classe est supprimée, archivée ou d'une autre année : à associer de nouveau */
.tti-table tr.tti-a-associer td:first-child{box-shadow:inset 4px 0 0 var(--danger)}
.tti-perdu{display:block;margin-top:4px;color:var(--danger);font-size:.84rem;font-weight:600}
.tti-forget form{margin-top:8px}
@media(max-width:760px){
  .tti-table thead{display:none}
  .tti-table,.tti-table tbody,.tti-table tr,.tti-table td{display:block;width:auto}
  .tti-table tr{border:1px solid var(--line);border-radius:12px;padding:10px 12px;margin-bottom:10px;background:var(--surface)}
  .tti-table td{border:0;padding:6px 0;overflow-wrap:anywhere}
  .tti-table tr.tti-pending td:first-child,.tti-table tr.tti-a-associer td:first-child{padding-left:12px}
  .tti-table td[data-label]::before{content:attr(data-label);display:block;color:var(--muted);font-size:.7rem;font-weight:800;letter-spacing:.04em;text-transform:uppercase;margin-bottom:2px}
  .tti-create-form{grid-template-columns:1fr}
  .tti-apercu li{grid-template-columns:1fr 1fr;gap:2px 10px}
  .tti-quoi{grid-column:1/-1;order:3}
}
/* V0.18.12.58 — choix de la source de l'emploi du temps (page timetable_import). */
.tti-source-form{display:grid;gap:10px}
.tti-choix{display:flex;align-items:flex-start;gap:10px;margin:0;padding:10px 12px;border:1px solid var(--line);border-radius:10px;cursor:pointer;background:var(--surface)}
.tti-choix input[type="radio"]{width:18px;height:18px;margin:2px 0 0;flex:none}
.tti-choix span{display:grid;gap:2px}
.tti-choix small{color:var(--muted);font-size:.84rem;line-height:1.35}
.tti-source-form button{margin:0;justify-self:start}
.tti-avertissement{margin:12px 0 0;line-height:1.5}
.tti-choix.is-indisponible{opacity:.7;cursor:not-allowed}
.tti-choix.is-indisponible input{cursor:not-allowed}
.tti-source-form .button-row{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.tti-source-form .button-row .button,.tti-source-form .button-row button{margin:0}
/* V0.18.12.62 — page d'entrée de Cumpari (connexion) : fond noir, la marque, boîte sombre.
   Les jetons sont redéfinis sur la page entière (html body:has, plus fort que body[data-theme=…]) : la
   page est la même dans les quatre thèmes, et tout ce qui s'y affiche (bandeaux, pied de page) suit le noir.
   Le turquoise des boutons et des liens est celui de l'ancien logo, conservé (la boîte ne change pas) ; sur lui, le
   texte est presque noir (6,5:1 ; le blanc n'y ferait que 2,8:1).
   V0.18.12.340.3 — la MARQUE de la page est celle de la barre (« cumpari. » et « ENSEIGNANTS » : ui_marque_entree_v0123403, habillage dans app-branding.css, bloc « brand-entree »). Ses trois
   couleurs sont les jetons de la barre (--theme-brand-*), posés ICI aux valeurs des thèmes sombres de la barre (themes.css : Pétrole, Nuit, Cumpari — le thème Classique, à barre blanche, aurait
   un mot bleu nuit sur le noir) : le mot blanc (21:1 sur #000), le point violet #a69afe (8,6:1), la ligne #a8b8d4 (10,2:1). */
html:root:has(.entree-cumpari){background:#000;color-scheme:dark}
html body:has(.entree-cumpari){
  --bg:#000;--surface:#13171a;--text:#e8edf0;--muted:#9ba7b0;--line:#2b3339;
  --primary:#3fa8bb;--primary2:#62bfcf;--on-primary:#04191e;--danger:#ff8a80;--success:#6fd3a0;
  --theme-field:#0b0e10;--theme-focus:rgba(63,168,187,.55);--tone-chip:#1d2428;
  --shadow:0 18px 48px rgba(0,0,0,.6);
  background:#000;color:var(--text)
}
html body:has(.entree-cumpari) .container{padding-top:12px}
html body:has(.entree-cumpari) .flash.warning{background:#2b250f;color:#f2d27a}
/* Les mêmes jetons sur le bloc lui-même : un navigateur sans :has() (Firefox ESR 115, Safari < 15.4) ignore
   la règle ci-dessus ; la boîte reste alors cohérente, dans un cadre noir, sur la page claire. */
.entree-cumpari{
  --surface:#13171a;--text:#e8edf0;--muted:#9ba7b0;--line:#2b3339;
  --primary:#3fa8bb;--primary2:#62bfcf;--on-primary:#04191e;--danger:#ff8a80;--success:#6fd3a0;
  --theme-field:#0b0e10;--theme-focus:rgba(63,168,187,.55);--tone-chip:#1d2428;
  --theme-brand-word:#ffffff;--theme-brand-dot:#a69afe;--theme-brand-sub:#a8b8d4;
  --shadow:0 18px 48px rgba(0,0,0,.6);
  display:flex;flex-direction:column;align-items:center;
  background:#000;color:var(--text);border-radius:18px;padding-block:6px}
.entree-titre{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.entree-devise{margin:18px 0;color:var(--muted);font-size:.95rem;text-align:center;text-wrap:balance}
.entree-cumpari .auth-card.entree-boite{width:100%;max-width:400px;margin:0 auto 12px;background:var(--surface);border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow);padding:22px}
.entree-cumpari .entree-boite form{margin:0}
.entree-cumpari .entree-invitation{margin:14px 0 0;font-size:.85rem;text-align:center;color:var(--muted)}
.entree-cumpari .entree-boite label{color:var(--text);margin:0 0 14px}
.entree-cumpari .entree-boite input{background:var(--theme-field);color:var(--text);border-color:#323c43}
.entree-cumpari .entree-boite input:focus{outline:2px solid var(--theme-focus);outline-offset:1px;border-color:var(--primary)}
/* Remplissage automatique du navigateur : sans cela, Chrome peint le champ en bleu clair sous un texte clair. */
.entree-cumpari .entree-boite input:-webkit-autofill{-webkit-box-shadow:0 0 0 1000px var(--theme-field) inset;-webkit-text-fill-color:var(--text);caret-color:var(--text)}
.entree-cumpari .entree-boite button{width:100%;margin-top:6px;background:var(--primary);color:var(--on-primary);font:inherit;font-weight:750}
.entree-cumpari .entree-boite button:hover{background:var(--primary2)}
.entree-cumpari .entree-boite button:focus-visible{outline:2px solid #9fdde8;outline-offset:2px}
.entree-cumpari .entree-boite .flash.error{background:color-mix(in srgb,var(--danger) 14%,var(--surface));color:#ffb3ab}
.entree-cumpari .entree-boite .flash.warning{background:#2b250f;color:#f2d27a}
/* V0.18.12.263 — deuxième étape de la connexion (le code de l'application) : le champ du code est gros et centré ; la case « se souvenir de cet appareil » reprend sa taille propre (input{width:100%} la frappait) ;
   « Annuler » est un lien sous le bouton, pas un second bouton turquoise. */
.entree-cumpari .entree-boite .entree-code{font-size:1.4rem;letter-spacing:.18em;text-align:center;font-variant-numeric:tabular-nums}
.entree-cumpari .entree-boite .entree-case{display:flex;align-items:flex-start;gap:10px;font-size:.92rem;color:var(--muted);line-height:1.35}
.entree-cumpari .entree-boite .entree-case input{width:auto;flex:0 0 auto;padding:0;margin:2px 0 0}
.entree-cumpari .entree-boite .entree-lien{display:block;margin-top:14px;text-align:center;font-size:.92rem;color:var(--primary2)}

/* V0.18.12.63 — pastille « PRONOTE » de l'accueil, à côté du repère « Emploi du temps » (même gabarit). Trois
   états : la couleur vient du thème (--success, --danger ; orange propre, plus clair en Nuit), le texte est mêlé
   d'un peu de la couleur du texte et posé sur un fond teinté : lisible dans les trois thèmes. Le symbole et le mot
   disent l'état sans la couleur. */
.pronote-pastille{
  --pastille:var(--success);
  display:inline-flex;align-items:center;gap:5px;
  padding:3px 9px 3px 7px;border:1px solid color-mix(in srgb,var(--pastille) 45%,var(--surface));border-radius:999px;
  background:color-mix(in srgb,var(--pastille) 10%,var(--surface));color:color-mix(in srgb,var(--pastille) 85%,var(--text));
  font-size:.76rem;font-weight:700;line-height:1.3;text-decoration:none;white-space:nowrap;
}
.pronote-pastille.is-attention{--pastille:#a15c00}
body[data-theme="night"] .pronote-pastille.is-attention{--pastille:#e9b44c}
.pronote-pastille.is-echec{--pastille:var(--danger)}
.pronote-pastille:hover,.pronote-pastille:focus-visible{border-color:var(--pastille);text-decoration:underline}
.pronote-pastille-symbole{font-size:.95em;line-height:1}
.pronote-pastille[hidden]{display:none}
/* Zone d'annonce aux lecteurs d'écran (changement d'état en direct), invisible à l'écran. */
.pronote-pastille-annonce{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.pronote-sync-retard[hidden]{display:none}
/* Le clic sur la pastille (ou « Voir pourquoi », « voir les libellés ») amène la section sous la barre du haut, collante. */
#lecture-automatique,#libelles{scroll-margin-top:calc(var(--app-topbar-height,64px) + 12px)}
/* V0.18.12.203 — les ancres de la carte « Pour démarrer » (sur les TITRES de Configuration) arrivent sous l'en-tête fixe, qui passe sur deux lignes (≈ 110 px) en dessous de 760 px. */
#annee-scolaire,#matieres,#classes{scroll-margin-top:calc(var(--app-topbar-height,64px) + 12px)}
@media (max-width:760px){#annee-scolaire,#matieres,#classes{scroll-margin-top:calc(var(--app-topbar-height,64px) + 64px)}}

/* V0.18.12.77 — bloc « Courbe de fonction » (function_plot) : tracé, curseurs et panneau de saisie.
   Les couleurs de l'écran viennent des variables du thème ; celles des courbes sont fixes (comme les séries du graphique de données)
   et se doublent de types de trait différents, pour rester lisibles en noir et blanc. function-plot.js dessine le tout. */
.function-plot-block{margin:.3rem 0;max-width:100%}
.function-plot-fallback{margin:0;color:var(--muted);font-size:.9rem}
.fp-monte .fp-graphe{position:relative;touch-action:pan-y pinch-zoom;user-select:none;border:1px solid var(--line);border-radius:12px;background:var(--surface);padding:6px}
.fp-monte .fp-graphe[tabindex="0"]{cursor:grab}
.fp-monte .fp-graphe.fp-glisse{cursor:grabbing}
.fp-monte .fp-graphe:focus-visible{outline:2px solid var(--primary);outline-offset:2px}
.fp-hote svg{display:block;width:100%;height:auto}
.fp-fond{fill:var(--surface)}
.fp-grille{stroke:var(--line);stroke-width:.7}
.fp-zero{stroke:var(--muted)}
.fp-axe{stroke:var(--text);stroke-width:1.3}
.fp-etiquette{fill:var(--muted);font:11px system-ui,sans-serif}
.fp-titre-axe{fill:var(--text);font:italic 600 13px system-ui,sans-serif}
.fp-courbe{fill:none;stroke-width:2.4;stroke-linejoin:round;stroke-linecap:round}
.fp-droite{stroke:var(--muted);stroke-width:1.2;stroke-dasharray:6 4}
.fp-point{fill:var(--text);stroke:var(--surface);stroke-width:1.5}
.fp-nom-point{fill:var(--text);font:12px system-ui,sans-serif;paint-order:stroke;stroke:var(--surface);stroke-width:3px}
.fp-cadre{fill:none;stroke:var(--line)}
.fp-bulle{position:absolute;display:none;pointer-events:none;z-index:2;white-space:nowrap;font-size:12px;font-variant-numeric:tabular-nums;color:var(--text);background:var(--surface);border:1px solid var(--line);border-radius:6px;padding:2px 6px}
.fp-pt{position:absolute;display:none;pointer-events:none;z-index:2;width:9px;height:9px;margin:-4.5px 0 0 -4.5px;border-radius:50%;border:2px solid var(--text);background:var(--surface)}
.fp-legende{display:flex;flex-wrap:wrap;gap:4px 16px;margin:8px 0 0;font-size:.9rem}
.fp-legende:empty{display:none}
.fp-legende-item{display:inline-flex;align-items:center;gap:6px}
.fp-erreurs .fp-erreur{margin:6px 0 0;color:var(--danger);font-size:.9rem}
.fp-curseurs{display:grid;gap:4px;margin:10px 0 0}
.fp-curseur{display:grid;grid-template-columns:2rem minmax(0,1fr) 3.6rem;gap:10px;align-items:center;font-size:.95rem;margin:0}
.fp-curseur input[type=range]{width:100%;margin:0;padding:0;border:0;background:none;accent-color:var(--primary)}
.fp-curseur-nom{font-family:ui-monospace,monospace;font-weight:700}
.fp-curseur-valeur{text-align:right;font-variant-numeric:tabular-nums}
.fp-outils{display:flex;flex-wrap:wrap;gap:6px 10px;align-items:center;margin:10px 0 0}
.fp-bouton{margin-top:0}
.fp-aide{color:var(--muted);font-size:.85rem}
.fp-texte{margin-top:8px;font-size:.9rem}
.fp-texte>summary{cursor:pointer;color:var(--muted)}
.fp-valeurs{display:none;margin:6px 0 0;font-size:.9rem}
.block-editor-function_plot.hidden{display:none!important}
.block-editor-function_plot .fp-editeur-grille{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px;align-items:start}
.block-editor-function_plot fieldset{min-width:0;margin:0 0 10px;padding:8px 10px;border:1px solid var(--line);border-radius:10px}
.block-editor-function_plot legend{padding:0 6px;font-weight:700}
.fp-ligne{display:grid;grid-template-columns:3.8rem minmax(0,1fr) minmax(0,.55fr);gap:6px 8px;align-items:center;margin:0 0 6px}
.fp-ligne input{margin:0;min-width:0}
.fp-ligne .fp-erreur{grid-column:2 / -1;color:var(--danger);font-size:.85rem}
.fp-ligne .fp-erreur:empty{display:none}
.fp-numero{font-family:ui-monospace,monospace;color:var(--muted);font-size:.9rem}
.fp-params:empty{display:none}
.block-editor-function_plot small.fp-erreur{display:block;margin:-4px 0 8px;color:var(--danger);font-size:.85rem}
.block-editor-function_plot small.fp-erreur:empty{display:none}
.fp-attente{margin:0 0 8px}
.fp-params-titre{margin:0 0 6px;color:var(--muted);font-size:.9rem}
.fp-param{display:grid;grid-template-columns:1.6rem repeat(3,minmax(0,1fr));gap:6px;align-items:center;margin:0 0 6px}
.fp-param input{margin:0;min-width:0}
.fp-param-nom{font-family:ui-monospace,monospace}
.block-editor-function_plot .fp-fenetre{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px 8px}
.block-editor-function_plot .fp-fenetre legend{grid-column:1 / -1}
.block-editor-function_plot .fp-fenetre label{display:block;margin:0}
.fp-axes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
/* V0.18.12.98 — les réglages de la courbe en volets dépliants (<details data-fp-volet>, course-blocks.php ; function-plot.js ouvre ceux qui sont réglés ou en erreur et résume chacun dans son titre) */
.block-editor-function_plot .fp-volet{margin:0 0 8px;padding:0 10px 2px;border:1px solid var(--line);border-radius:10px}
.block-editor-function_plot .fp-volet>summary{margin:0 -10px;padding:11px 10px;cursor:pointer;font-weight:700;line-height:1.3;border-radius:10px}
.block-editor-function_plot .fp-volet[open]>summary{margin-bottom:4px}
.block-editor-function_plot .fp-volet>summary .meta{font-weight:400}
.block-editor-function_plot .fp-volet-aide{margin:6px 0 8px}
.block-editor-function_plot .fp-fonctions .fp-volet{margin:4px 0 0;padding:0;border:0;border-top:1px dashed var(--line);border-radius:0}
.block-editor-function_plot .fp-fonctions .fp-volet>summary{margin:0;padding:10px 0;border-radius:0}
.block-editor-function_plot .fp-volet-aide-generale{margin:6px 0 0}
.block-editor-function_plot .fp-volet-aide-generale>.format-help{margin:0 0 8px}
.fp-editeur-apercu{min-width:0}
@media(max-width:900px){
  .block-editor-function_plot .fp-editeur-grille{grid-template-columns:1fr}
  .fp-editeur-apercu{position:static}
}
@media(max-width:560px){
  .fp-ligne{grid-template-columns:3.2rem minmax(0,1fr)}
  .fp-ligne [data-fp-name]{grid-column:2}
  .block-editor-function_plot .fp-fenetre{grid-template-columns:repeat(2,minmax(0,1fr))}
}
.fp-sombre .fp-courbe-0,.fp-sombre .fp-leg-0{stroke:#7db8f0}
.fp-sombre .fp-courbe-1,.fp-sombre .fp-leg-1{stroke:#ff9a8a}
.fp-sombre .fp-courbe-2,.fp-sombre .fp-leg-2{stroke:#6fdc97}
.fp-sombre .fp-courbe-3,.fp-sombre .fp-leg-3{stroke:#c9a2f2}
@media print{
  .function-plot-block{break-inside:avoid}
  .fp-courbe-0,.fp-leg-0{stroke:#1f5f9e!important}
  .fp-courbe-1,.fp-leg-1{stroke:#c0392b!important}
  .fp-courbe-2,.fp-leg-2{stroke:#2a8a4a!important}
  .fp-courbe-3,.fp-leg-3{stroke:#8e44ad!important}
  .fp-etiquette,.fp-titre-axe,.fp-nom-point{fill:#000}
  .fp-nom-point{stroke:#fff}
  .fp-axe{stroke:#000}
  .fp-grille{stroke:#ccc}
  .fp-zero{stroke:#888}

  .fp-outils,.fp-curseurs,.fp-texte,.fp-bulle,.fp-pt{display:none!important}
  .fp-valeurs{display:block}
  .fp-monte .fp-graphe{background:#fff;border-color:#999}
  .fp-fond{fill:#fff}
  .fp-point{fill:#000;stroke:#fff}
}

/* V0.18.12.80 — tableau de variations (option du bloc « Courbe de fonction »). Le texte reprend la couleur du fond où il est posé
   (cours, aperçu de l'éditeur, thème nuit) : tout est tracé en currentColor, y compris les flèches et la double barre des valeurs interdites. */
.fp-variations{margin:12px 0 0;max-width:100%;overflow-x:auto}
.fp-variations[hidden]{display:none}
.fp-variations .fp-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.fp-tableau{border-collapse:collapse;margin:0 auto;font-variant-numeric:tabular-nums;font-size:.95rem;line-height:1.25}
.fp-tableau-titre{caption-side:top;padding:0 0 6px;text-align:left;color:var(--muted);font-size:.85rem}
.fp-tete{padding:6px 12px 6px 8px;text-align:left;font-weight:700;font-style:italic;white-space:nowrap;border-right:2px solid currentColor}
.fp-lx>*,.fp-ld>*{border-bottom:1px solid currentColor}
.fp-pt-col{position:relative;min-width:3.4em;padding:6px 8px;text-align:center;white-space:nowrap}
.fp-int-col{width:5em;min-width:4em;padding:6px 4px;text-align:center}
.fp-pole-col{min-width:6em}
.fp-ld .fp-pole-col::after,.fp-lf .fp-pole-col::after{content:"";position:absolute;top:0;bottom:0;left:50%;width:4px;margin-left:-3px;border-left:1px solid currentColor;border-right:1px solid currentColor;pointer-events:none}
.fp-lf .fp-pt-col,.fp-lf .fp-int-col{height:5.8em;padding:0}
.fp-simple,.fp-pole-v{display:grid;height:5.8em}
.fp-simple{justify-items:center}
.fp-pole-v{grid-template-columns:1fr 1fr;column-gap:16px}
.fp-v-g{justify-self:end;text-align:right}
.fp-v-d{justify-self:start;text-align:left}
.fp-v-haut{align-self:start;padding-top:5px}
.fp-v-bas{align-self:end;padding-bottom:5px}
.fp-v-milieu{align-self:center}
.fp-vint{position:relative;padding:0 4px}
.fp-fleche{display:block;width:100%;height:5.8em}
.fp-fleche line{stroke:currentColor;stroke-width:2.2;stroke-linecap:round}
.fp-fleche polygon{fill:currentColor}
.fp-trou{background:repeating-linear-gradient(135deg,transparent 0 5px,rgba(128,128,128,.45) 5px 6px)}
.fp-tableau-note{margin:6px 0 0;color:var(--muted);font-size:.85rem}
.fp-variations .fp-erreur{margin:0;color:var(--danger);font-size:.9rem}
.block-editor-function_plot .fp-variations-editeur .checkbox-label{display:block;margin:0 0 6px}
.fp-var-reglages[hidden]{display:none}
.fp-var-ligne{display:grid;grid-template-columns:auto minmax(0,1fr) minmax(0,1fr);gap:6px 8px;align-items:end;margin:0 0 8px}
.fp-var-ligne label{display:block;margin:0}
.fp-var-ligne select,.fp-var-ligne input{width:100%;margin:0}
/* V0.18.12.82 — le bouton « ℝ entier (−∞ à +∞) » prend sa propre ligne, sous la fonction et l'intervalle */
.fp-var-ligne .button{grid-column:1 / -1;justify-self:start;margin:0}
.fp-var-reglages textarea{width:100%;font-family:ui-monospace,monospace}
.fp-var-reglages .button{margin:4px 0 0}
.fp-var-aide{margin:8px 0 0;font-size:.85rem}
@media(max-width:560px){
  .fp-var-ligne{grid-template-columns:repeat(2,minmax(0,1fr))}
  .fp-var-ligne label:first-child{grid-column:1 / -1}
  .fp-tableau{font-size:.85rem}
  .fp-tete{padding:6px 8px 6px 4px}
  .fp-pt-col{min-width:2.4em;padding:6px 3px}
  .fp-pole-col{min-width:5em}
  .fp-int-col{width:3.4em;min-width:3em;padding-inline:2px}
  .fp-pole-v{column-gap:12px}
}
@media print{
  .fp-variations{overflow:visible;break-inside:avoid;color:#000}
  .fp-tableau-titre,.fp-tableau-note{color:#333}
  .fp-trou{background:repeating-linear-gradient(135deg,transparent 0 5px,#999 5px 6px)}
}

/* V0.18.12.83 — identité de l'établissement (Administration) : le bandeau « Les documents utilisent encore… », l'aperçu repris, le formulaire. */
.admin-identity-banner{margin:0 0 14px;padding:12px 14px;border:1px solid var(--line);border-left:4px solid var(--primary);border-radius:10px;background:var(--tone-soft,var(--surface))}
.admin-identity-banner p{margin:0 0 8px}
.admin-identity-preview{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:0 0 10px}
.admin-identity-preview img,.admin-identity-logo-state img{max-height:40px;width:auto;padding:4px 6px;border:1px solid var(--line);border-radius:8px;background:#fff}
.admin-identity-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.admin-institution-settings .admin-identity-actions form{display:block;margin:0}
.admin-identity-actions button,.admin-identity-actions .button{margin:0}
.admin-institution-settings .admin-identity-form{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;align-items:start;max-width:640px}
.admin-identity-form label{display:grid;gap:4px;margin:0}
.admin-identity-form input:not([type=checkbox]):not([type=file]){width:100%;margin:0}
.admin-identity-form input[type=file]{width:100%;margin:0}
.admin-identity-form small{color:var(--muted);font-weight:400;font-size:.8rem;line-height:1.3}
/* V0.18.12.223 (constat 1) — l'interrupteur « chaque enseignant peut garder son nom et son logo » : sous le formulaire d'identité, un bloc en colonne (la case à sa taille, pas étirée) */
.admin-institution-settings .admin-identity-libre{display:grid;grid-template-columns:minmax(0,1fr);gap:8px;align-items:start;max-width:640px;margin-top:18px;padding-top:14px;border-top:1px solid var(--line)}
.admin-identity-libre-case{display:flex;align-items:flex-start;gap:10px;margin:0;cursor:pointer}
.admin-identity-libre-case input[type="checkbox"]{flex:none;width:1.15rem;height:1.15rem;margin:.15rem 0 0}
.admin-identity-libre .meta{margin:0}
.admin-identity-libre button{justify-self:start;margin:0}
.admin-identity-logo-state{display:flex;align-items:center;gap:12px;flex-wrap:wrap;min-height:44px}
.admin-identity-logo-state label{display:flex;align-items:center;gap:6px;font-size:.88rem}
.admin-identity-logo-state input[type=checkbox]{width:auto;margin:0}
.admin-identity-engagement{margin:0}
.admin-institution-settings .admin-identity-form button{justify-self:start;margin:0;width:auto}

/* V0.18.12.84 — statistiques de consommation de l'IA (Mon compte, Administration). Couleurs par jetons du thème : lisibles clair et sombre. */
.ai-stats-filtre{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:0 0 14px}
.ai-stats-filtre label{display:flex;align-items:center;gap:8px;margin:0;font-weight:700}
.ai-stats-filtre select{width:auto;margin:0}
.ai-stats-cartes{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px;margin:0 0 14px}
.ai-stats-carte{display:grid;gap:2px;padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:var(--surface)}
.ai-stats-carte strong{font-size:1.35rem;line-height:1.2;font-variant-numeric:tabular-nums}
.ai-stats-carte span{color:var(--muted);font-size:.85rem}
.ai-stats-bloc{margin:0 0 14px}
.ai-stats-bloc h3{margin:0 0 10px}
.ai-stats-courbe{margin:0}
.ai-stats-courbe svg{display:block;width:100%;height:auto;max-height:240px}
.ai-stats-barre{fill:var(--primary)}
.ai-stats-axe{stroke:var(--line);stroke-width:1}
.ai-stats-texte{fill:var(--muted);font-size:11px;font-family:inherit}
.ai-stats-courbe figcaption{margin:4px 0 0}
/* V0.18.12.205 — la carte « Erreurs récentes » d'Administration › Maintenance : un tableau qui défile de côté sur téléphone, la trace repliée, la couleur de l'erreur dans une bordure (jetons du thème). */
.journal-erreurs-defilement{overflow-x:auto}
.journal-erreurs-table{width:100%;border-collapse:collapse;font-size:.9rem}
.journal-erreurs-table th,.journal-erreurs-table td{padding:7px 10px;border-bottom:1px solid var(--line);text-align:left;vertical-align:top}
.journal-erreurs-table thead th{color:var(--muted);font-weight:700;font-size:.82rem;white-space:nowrap}
.journal-erreurs-table td:nth-child(5){min-width:16rem;overflow-wrap:anywhere}
.journal-erreurs-table td:first-child{white-space:nowrap}
.journal-erreurs-table tr.is-exception td:first-child,.journal-erreurs-table tr.is-fatale td:first-child{border-left:4px solid var(--danger,var(--primary))}
.journal-erreurs-table pre{margin:6px 0 0;padding:8px;max-height:16rem;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;font-size:.8rem;background:var(--surface-soft,var(--surface));border:1px solid var(--line);border-radius:8px}
.journal-erreurs-type{display:inline-block;padding:0 8px;margin-right:4px;border:1px solid var(--line);border-radius:999px;font-size:.78rem;font-weight:700;color:var(--muted)}
.journal-erreurs-vide{margin:0;font-weight:800;color:var(--success,var(--primary))}
/* V0.18.12.205.1 — les erreurs que le serveur a journalisées pour le compte qui signale : en clair dans le détail d'un signalement, et un repère dans la liste */
.feedback-erreurs-serveur{margin:12px 0;padding:10px 14px;border:1px solid var(--line);border-left:4px solid var(--danger,var(--primary));border-radius:10px;background:color-mix(in srgb,var(--danger,var(--primary)) 7%,var(--surface))}
.feedback-erreurs-serveur ul{margin:6px 0 4px;padding-left:20px}
.feedback-erreurs-serveur li{overflow-wrap:anywhere}
.feedback-erreurs-serveur p{margin:4px 0 0}
.feedback-erreur-marque{color:var(--danger,var(--primary))}
/* V0.18.12.206 — la page « Cours démo » (menu Aide) et le lien de la carte « Pour démarrer » */
.cours-demo-actions{display:flex;flex-wrap:wrap;gap:12px;align-items:center;margin:12px 0}
.cours-demo-actions form{margin:0}
.cours-demo-nouveau{margin:14px 0 4px;padding:10px 14px;border:1px solid var(--line);border-radius:10px;background:var(--tone-soft)}
.cours-demo-nouveau h3{margin:0 0 6px}
.cours-demo-nouveau p{margin:6px 0}
.cours-demo-conseils ul{margin:6px 0 0;padding-left:20px}
.premiers-pas-demo{margin:12px 0 0}
.ai-stats-table-wrap{overflow-x:auto}
.ai-stats-table{width:100%;border-collapse:collapse;font-size:.92rem}
.ai-stats-table th,.ai-stats-table td{padding:7px 10px;border-bottom:1px solid var(--line);text-align:right;vertical-align:middle;font-variant-numeric:tabular-nums}
.ai-stats-table thead th{color:var(--muted);font-weight:700;font-size:.82rem;white-space:nowrap}
.ai-stats-table th:first-child,.ai-stats-table td:first-child{text-align:left}
.ai-stats-table tbody th{font-weight:600}
.ai-stats-part{width:70px;height:8px;vertical-align:middle;accent-color:var(--primary)}
.ai-stats-export{margin:6px 0}
.ai-stats-lien{color:var(--primary);text-decoration:underline;font-weight:650}
.ai-stats-col-part{white-space:nowrap}
@media (max-width:760px){
  .ai-stats-page .section-heading{align-items:flex-start;flex-direction:column;gap:10px}
  .ai-stats-page .section-heading>div{width:100%;min-width:0}
  .ai-stats-page .admin-badge.institution{align-self:flex-start;width:auto;max-width:100%;white-space:nowrap;text-align:left}
}
.ai-stats-tarifs input[type=text]{width:100%;max-width:150px;margin:0;text-align:right}
.ai-stats-tarifs button{margin-top:12px}
@media (max-width:560px){.ai-stats-texte{font-size:21px}.ai-stats-table{font-size:.85rem}.ai-stats-table th,.ai-stats-table td{padding:6px 6px}}

/* V0.18.12.103 — ALIGNEMENT d'un bloc Formule (colonne lesson_blocks.content_align) : une formule isolée est centrée par défaut (KaTeX) ; « À gauche » et « À droite » la rangent.
   La classe est sur le <section class="rendered-block"> (aperçu, rétroprojection, impression) : KaTeX remplit .rendered-block-content, qui n'a plus de <span> à classer ensuite.
   Les règles visent aussi le texte brut (formule invalide, contenu mixte). */
.rendered-block.math-align-left .rendered-block-content,
.rendered-block.math-align-left .katex-display,
.rendered-block.math-align-left .katex-display>.katex{text-align:left}
.rendered-block.math-align-right .rendered-block-content,
.rendered-block.math-align-right .katex-display,
.rendered-block.math-align-right .katex-display>.katex{text-align:right}
.block-formula-align{display:block;margin-top:8px}
.block-formula-align select{width:auto;max-width:100%}

/* V0.18.12.130 — QCM d'une question de cours. ÉDITEUR : le panneau n'apparaît que lorsque « QCM (propositions) » est choisi (par :has, comme le carreau du
   quadrillage) ; l'image de correction, la hauteur en lignes et leur aide disparaissent alors (un QCM n'a ni lignes ni zone à dessiner). */
.question-qcm-editor{display:none;gap:8px}
.question-support-editor:has(select[name="response_support"] option[value="qcm"]:checked) .question-qcm-editor{display:grid}
.question-support-editor:has(select[name="response_support"] option[value="qcm"]:checked) .question-support-image,
.question-support-editor:has(select[name="response_support"] option[value="qcm"]:checked) .question-support-hauteur,
.question-support-editor:has(select[name="response_support"] option[value="qcm"]:checked) .question-support-reserve{display:none}
.block-editor-question:has(select[name="response_support"] option[value="qcm"]:checked) .question-editor-lines{display:none}
/* un QCM a besoin de la largeur : sans le champ « nombre de lignes » (masqué), le support de réponse prenait la colonne étroite de ce champ */
.question-editor-reponse:has(select[name="response_support"] option[value="qcm"]:checked){grid-template-columns:minmax(0,1fr)}
.question-qcm-editor{max-width:680px}
.qcm-editor-liste{list-style:none;margin:0;padding:0;display:grid;gap:6px}
.qcm-editor-ligne{display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;gap:8px;align-items:center}
.qcm-editor-lettre{font-weight:800;min-width:1.4em;text-align:center}
.qcm-editor-ligne input[type="text"]{width:100%;min-width:0;margin:0}
.qcm-editor-bonne{margin:0;white-space:nowrap}
.qcm-editor-retirer{padding:4px 9px;margin:0}
.qcm-editor-actions{display:flex;flex-wrap:wrap;gap:8px}
/* téléphone : le champ de la proposition prend toute la largeur, « Bonne » et « ✕ » passent dessous (sinon le champ restait à ~135 px) */
@media (max-width:560px){
  .qcm-editor-ligne{grid-template-columns:auto minmax(0,1fr) auto;grid-template-areas:"lettre champ champ" ". bonne retirer"}
}
@media (max-width:560px){
  .qcm-editor-lettre{grid-area:lettre}
  .qcm-editor-ligne input[type="text"]{grid-area:champ}
  .qcm-editor-bonne{grid-area:bonne}
  .qcm-editor-retirer{grid-area:retirer;justify-self:end}
}
.qcm-erreur{margin:0;color:var(--danger,#b42318);font-weight:700}
/* V0.18.12.233 — un SONDAGE n'a pas de bonne réponse : la case « Bonne » disparaît de l'éditeur et l'aide du sondage apparaît. */
.question-qcm-aide-sondage{display:none}
.question-qcm-editor:has(select[name="qcm_mode"] option[value^="poll_"]:checked) .qcm-editor-bonne{display:none}
.question-qcm-editor:has(select[name="qcm_mode"] option[value^="poll_"]:checked) .question-qcm-aide-sondage{display:block}
/* AFFICHAGE (aperçu, rétroprojection, impression) : la case est dessinée (ronde pour une seule bonne réponse, carrée pour plusieurs), pas un champ de
   formulaire. La coche de la bonne réponse est dans le HTML mais cachée tant que la correction n'est pas affichée en vue Élève ; la vue Enseignant la montre. */
.qcm-consigne{margin:6px 0 4px;font-size:.88em;font-style:italic;color:var(--muted)}
.question-qcm{list-style:none;margin:6px 0 0;padding:0;display:grid;gap:6px}
.qcm-choix{display:grid;grid-template-columns:auto auto minmax(0,1fr);gap:8px;align-items:baseline}
.qcm-case{width:1.05em;height:1.05em;box-sizing:border-box;border:2px solid currentColor;align-self:center}
.question-qcm-single .qcm-case{border-radius:50%}
.question-qcm-multiple .qcm-case{border-radius:3px}
.qcm-lettre{font-weight:800}
.qcm-texte{min-width:0;overflow-wrap:anywhere}
.qcm-coche{visibility:hidden;color:#177a45;font-weight:900}
.course-view-teacher .qcm-coche,
.course-view-student .rendered-question:has(.question-teacher-answer.is-revealed) .qcm-coche,
body.projection-mode.projection-show-all-corrections .course-view-student .rendered-question .qcm-coche{visibility:visible}
.course-view-teacher .qcm-bonne .qcm-texte,
.course-view-student .rendered-question:has(.question-teacher-answer.is-revealed) .qcm-bonne .qcm-texte,
body.projection-mode.projection-show-all-corrections .course-view-student .rendered-question .qcm-bonne .qcm-texte{font-weight:700}
.qcm-explication{margin-top:6px}
.import-qcm-resume{margin:6px 0;padding:8px 12px;border:1px solid var(--line);border-radius:8px;display:grid;gap:4px}
.import-qcm-resume ol{margin:0;padding-left:1.6rem}
.qcm-coche-import{color:#177a45;font-weight:900}
[data-theme="night"] .qcm-coche-import{color:#7fd6a2}

/* V0.18.12.131 — LE REPÈRE : une zone de réponse en papier millimétré (lignes fines tous les mm, plus marquées tous les 5 et 10 mm), deux axes fléchés et leurs
   étiquettes, sans graduations chiffrées. Tout est dessiné par la feuille de style (pas d'image) et s'imprime avec ses couleurs (voir @media print plus haut).
   --ox / --oy : la place de l'origine (en bas à gauche : 10 mm du bord gauche et du bord bas ; au centre : 50 %). */
.answer-lines.answer-zone-repere{
  position:relative;
  break-inside:avoid;
  --ox:10mm;--oy:10mm;
  background-image:
    linear-gradient(to right,#9db0c0 0.2mm,transparent 0.2mm),linear-gradient(to bottom,#9db0c0 0.2mm,transparent 0.2mm),
    linear-gradient(to right,#c3d0db 0.15mm,transparent 0.15mm),linear-gradient(to bottom,#c3d0db 0.15mm,transparent 0.15mm),
    linear-gradient(to right,#e3e9ef 0.1mm,transparent 0.1mm),linear-gradient(to bottom,#e3e9ef 0.1mm,transparent 0.1mm);
  background-size:10mm 10mm,10mm 10mm,5mm 5mm,5mm 5mm,1mm 1mm,1mm 1mm;
  background-position:-0.1mm -0.1mm;
}
.answer-zone-repere.repere-origine-centre{--ox:50%;--oy:50%}
.repere-axe{position:absolute;display:block;pointer-events:none}
.repere-axe-x{left:3mm;right:3mm;bottom:var(--oy);height:0;border-top:0.5mm solid #1f2933}
.repere-axe-y{top:3mm;bottom:3mm;left:var(--ox);width:0;border-left:0.5mm solid #1f2933}
.repere-axe-x::after{content:"";position:absolute;right:-1mm;top:-1.75mm;border-left:3mm solid #1f2933;border-top:1.5mm solid transparent;border-bottom:1.5mm solid transparent}
.repere-axe-y::after{content:"";position:absolute;top:-1mm;left:-1.75mm;border-bottom:3mm solid #1f2933;border-left:1.5mm solid transparent;border-right:1.5mm solid transparent}
.repere-etiquette{position:absolute;padding:0 3px;background:rgba(255,255,255,.9);color:#1f2933;font-weight:700;font-size:.85rem;line-height:1.3;max-width:45%;overflow-wrap:anywhere}
.repere-etiquette-x{right:7mm;bottom:calc(var(--oy) + 2mm)}
.repere-etiquette-y{top:5mm;left:calc(var(--ox) + 2.5mm)}
/* V0.18.12.284 — les axes sont CALÉS sur les traits principaux du papier. Le papier part du coin haut gauche de la zone et ses traits principaux tombent tous les 10 mm ; la hauteur de la zone (lignes × 22 px)
   n'est pas un multiple de 10 mm, donc une origine « à 10 mm du bord bas » ou « à 50 % » tombait entre deux traits (jusqu'à 4,7 mm d'écart, mesuré dans Edge). Là où CSS sait arrondir (round), l'origine est
   posée sur un trait : en bas à gauche, le trait le plus bas qui laisse 10 mm au moins sous l'axe (place des graduations) et le premier à 10 mm du bord gauche ; au centre, le trait le plus proche du milieu.
   La bordure de 0,5 mm est centrée sur le trait (−0,25 mm) et les étiquettes suivent leur axe. Ailleurs, la place d'avant (--ox / --oy) est gardée. */
@supports (width:round(down,100%,1mm)){
  .answer-lines.answer-zone-repere{--axe-y:max(10mm,round(down,calc(100% - 10mm),10mm));--axe-x:10mm}
  .answer-zone-repere.repere-origine-centre{--axe-y:round(nearest,50%,10mm);--axe-x:round(nearest,50%,10mm)}
  .repere-axe-x{top:calc(var(--axe-y) - 0.25mm);bottom:auto}
  .repere-axe-y{left:calc(var(--axe-x) - 0.25mm)}
  .repere-etiquette-x{top:calc(var(--axe-y) - 2mm);bottom:auto;transform:translateY(-100%)}
  .repere-etiquette-y{left:calc(var(--axe-x) + 2.5mm)}
}
/* ÉDITEUR : le panneau du repère n'apparaît que pour ce type (par :has, comme le carreau du quadrillage) */
.question-repere-editor{display:none;gap:8px}
.question-support-editor:has(select[name="response_support"] option[value="repere"]:checked) .question-repere-editor{display:grid}
.question-repere-editor input[type="text"]{max-width:16rem}

/* V0.18.12.145 — partage d'un chapitre entre collègues */
.chapter-view-tabs{display:flex;gap:8px;margin:0 0 16px}
.chapter-view-tabs a{padding:7px 14px;border-radius:999px;border:1px solid var(--line);color:var(--text);text-decoration:none;font-weight:650;background:var(--surface)}
.chapter-view-tabs a.is-active{background:var(--primary);color:var(--on-primary);border-color:var(--primary)}
.chapter-shared-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:16px}
.chapter-shared-card{border:1px dashed var(--line);padding:16px 18px}
.chapter-shared-card h2{margin:8px 0 4px;font-size:1.05rem}
.chapter-shared-card .muted{margin:4px 0 0}
.chapter-shared-by{color:var(--muted);font-size:.84rem;margin:2px 0 8px}
.chapter-already-copied{color:var(--success);font-size:.84rem;font-weight:650;margin:6px 0 0}
.chapter-shared-actions{display:flex;flex-wrap:wrap;align-items:end;justify-content:space-between;gap:10px;margin-top:10px}
.chapter-shared-actions label{margin:0;font-size:.84rem}
.chapter-share-card,.chapter-share-form{max-width:900px}
.chapter-share-form{display:flex;flex-wrap:wrap;gap:10px 18px;margin-top:10px}
.chapter-share-row{display:flex;align-items:center;gap:6px;margin:0;font-weight:600}
.chapter-share-actions{flex-basis:100%;display:flex;justify-content:flex-end}

/* V0.18.12.175 — exposant et indice sans élargir l'interligne (un 1er ou un H2O ne décale pas la ligne d'un texte projeté ou imprimé). */
.course-document sup,.course-document sub,.rich-editor sup,.rich-editor sub{line-height:0}

/* V0.18.12.175 — QR code imprimé sous une vidéo ou un lien externe : rien à l'écran, 24 mm à l'impression (une fois dessiné par application.js), sans coupure de page au milieu. */
.course-print-qr{display:none}
.course-video-extrait{display:none}
@media print{
  .course-print-qr:not(:empty){display:block;width:24mm;height:24mm;margin:2mm 0 0;break-inside:avoid;page-break-inside:avoid}
  .course-print-qr img{display:block;width:100%;height:100%;image-rendering:pixelated;-webkit-print-color-adjust:exact;print-color-adjust:exact}
  .course-video-extrait{display:block;margin:2px 0 0;font-size:.88em}
}

/* V0.18.12.175 — zoom plein écran sur une image du cours. Le voile est NOIR dans tous les thèmes, comme celui d'une visionneuse de photos : l'image est le sujet, et son texte d'aide est blanc sur ce fond. */
.course-document:not(.print-course-document) figure.course-media img{cursor:zoom-in}
.image-zoom{position:fixed;inset:0;z-index:5000;display:flex;flex-direction:column;align-items:center;background:rgba(0,0,0,.92);color:#fff}
.image-zoom-fermer{align-self:flex-end;margin:12px 14px 4px;padding:8px 14px;border:1px solid rgba(255,255,255,.55);border-radius:8px;background:rgba(0,0,0,.55);color:#fff;font-weight:700;cursor:pointer}
.image-zoom-fermer:focus-visible,.image-zoom-cadre img:focus-visible{outline:3px solid #fff;outline-offset:2px}
.image-zoom-cadre{flex:1 1 auto;min-height:0;width:100%;display:flex;align-items:center;justify-content:center;padding:0 12px;overflow:auto}
.image-zoom-cadre img{max-width:100%;max-height:100%;object-fit:contain;cursor:zoom-in;background:#fff}
.image-zoom.est-reelle .image-zoom-cadre{display:block;text-align:center}
.image-zoom.est-reelle .image-zoom-cadre img{max-width:none;max-height:none;cursor:zoom-out}
.image-zoom-aide{flex:none;margin:6px 12px 12px;font-size:.88rem;color:rgba(255,255,255,.85)}
html.image-zoom-ouverte,.image-zoom-ouverte body{overflow:hidden}
@media print{.image-zoom{display:none!important}}

/* V0.18.12.176 — hauteur minimale des lignes d'un tableau (8, 12, 16 ou 24 mm, choisie dans l'éditeur du bloc) : de la place pour écrire à la main. Sans choix, la variable n'existe pas : « auto », comme avant.
   Un « height » de cellule agit comme une hauteur MINIMALE : une cellule au texte plus long grandit. */
.course-table th,.course-table td{height:var(--table-row-min,auto)}

/* V0.18.12.177 — les « papiers » : six supports de réponse de plus pour une question de cours. Comme le quadrillage et le repère : dessinés ici (pas d'image), même hauteur que les lignes
   (--answer-lines × 22 px), imprimés avec leurs traits (print-color-adjust plus haut). Papier blanc dans tous les thèmes ; les traits sont des gris et des violets pâles qui
   survivent à la photocopie. Seyès : grands carreaux de 8 mm, lignes fines tous les 2 mm. Portées : cinq lignes, 2 mm d'écart, une portée tous les 16 mm.
   Les traits sont des tuiles SVG (comme l'isométrique et les cases de caractères) et non des dégradés à arêtes vives : Edge en fait, à l'impression en PDF, des motifs qui perdent des traits fins.
   Les deux lignes de légende d'un cadre sont de vraies bordures (pseudo-éléments) : un fond SVG de 9 mm de haut perdait l'une des deux dans le PDF. */
.answer-lines.answer-zone-seyes,.answer-lines.answer-zone-portees,.answer-lines.answer-zone-points,.answer-lines.answer-zone-isometrique,.answer-lines.answer-zone-caracteres,.answer-lines.answer-zone-storyboard{break-inside:avoid}
.answer-lines.answer-zone-seyes{
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8' preserveAspectRatio='none'%3E%3Cpath d='M0 2H8M0 4H8M0 6H8' fill='none' stroke='%23d3cee9' stroke-width='1' shape-rendering='crispEdges' vector-effect='non-scaling-stroke'/%3E%3Cpath d='M0 0H8M0 0V8' fill='none' stroke='%239d96c4' stroke-width='2' shape-rendering='crispEdges' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E");
  background-size:8mm 8mm;
}
.answer-lines.answer-zone-portees{
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 16' preserveAspectRatio='none'%3E%3Cpath d='M0 4H100M0 6H100M0 8H100M0 10H100M0 12H100' fill='none' stroke='%235b6670' stroke-width='1' shape-rendering='crispEdges' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E");
  background-size:100% 16mm;
  background-repeat:repeat-y;
}
.answer-lines.answer-zone-points{
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10' preserveAspectRatio='none'%3E%3Cpath d='M5 5h0.01' fill='none' stroke='%237b8794' stroke-width='2.4' stroke-linecap='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E");
  background-size:var(--paper-mm,5mm) var(--paper-mm,5mm);
}
/* Isométrique : une maille de triangles équilatéraux à lignes verticales (côté --paper-mm). La tuile mesure 1,7320508 × le côté de large (2 colonnes de nœuds) et le côté de haut ; le trait garde
   une épaisseur fixe (vector-effect) quelle que soit la maille. */
.answer-lines.answer-zone-isometrique{
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 17.3205 10' preserveAspectRatio='none'%3E%3Cpath d='M0 0V10M8.6603 0V10M0 0L8.6603 5L17.3205 0M0 10L8.6603 5L17.3205 10' fill='none' stroke='%238c9faf' stroke-width='1' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E");
  background-size:calc(var(--paper-mm,10mm) * 1.7320508) var(--paper-mm,10mm);
  background-position:-0.1mm -0.1mm;
}
/* Cases de caractères : un trait plein en haut et à gauche de chaque case, une croix pointillée au milieu ; le cadre de la zone ferme la dernière rangée et la dernière colonne. Là où CSS sait
   arrondir (round), la zone fait un nombre ENTIER de cases (sinon une case coupée au bord). */
.answer-lines.answer-zone-caracteres{
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10' preserveAspectRatio='none'%3E%3Cpath d='M0 0H10M0 0V10' fill='none' stroke='%236b7782' stroke-width='1.2' vector-effect='non-scaling-stroke'/%3E%3Cpath d='M0 5H10M5 0V10' fill='none' stroke='%23b9c3cb' stroke-width='1' stroke-dasharray='4 3' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E");
  background-size:var(--paper-mm,15mm) var(--paper-mm,15mm);
  background-position:0 0;
}
@supports (width:round(down,100%,1mm)){
  .answer-lines.answer-zone-caracteres{
    width:round(down,100%,var(--paper-mm,15mm));
    height:max(var(--paper-mm,15mm),round(down,calc(var(--answer-lines,2) * 22px),var(--paper-mm,15mm)));
  }
}
/* Storyboard : des cadres (forme --cadres-ratio) sur --cadres-col colonnes, chacun avec son numéro et deux lignes de légende. La hauteur de la zone est un MINIMUM : les cadres l'agrandissent. */
.answer-lines.answer-zone-storyboard{
  height:auto;min-height:calc(var(--answer-lines,2) * 22px);
  display:grid;grid-template-columns:repeat(var(--cadres-col,3),minmax(0,1fr));gap:4mm;padding:3mm;align-content:start;
}
.storyboard-cadre{display:flex;flex-direction:column;gap:1.5mm;min-width:0}
.storyboard-image{position:relative;display:block;aspect-ratio:var(--cadres-ratio,16 / 9);border:0.35mm solid #4a5560;background:#fff}
.storyboard-numero{position:absolute;top:0.8mm;left:1.2mm;font:700 .75rem/1 system-ui,sans-serif;color:#6b7782}
.storyboard-legende{display:block;position:relative;height:9mm}
.storyboard-legende::before,.storyboard-legende::after{content:"";position:absolute;left:0;right:0;border-top:0.25mm solid #9aa6b0}
.storyboard-legende::before{top:4mm}
.storyboard-legende::after{top:8mm}
/* ÉDITEUR : le panneau d'un papier n'apparaît que pour son type (par :has, comme le repère et le carreau du quadrillage) */
.question-papier-editor{display:none;gap:8px}
.question-support-editor:has(select[name="response_support"] option[value="points"]:checked) .question-papier-points,
.question-support-editor:has(select[name="response_support"] option[value="isometrique"]:checked) .question-papier-isometrique,
.question-support-editor:has(select[name="response_support"] option[value="caracteres"]:checked) .question-papier-caracteres,
.question-support-editor:has(select[name="response_support"] option[value="seyes"]:checked) .question-papier-seyes,
.question-support-editor:has(select[name="response_support"] option[value="portees"]:checked) .question-papier-portees,
.question-support-editor:has(select[name="response_support"] option[value="storyboard"]:checked) .question-papier-storyboard{display:grid}

/* V0.18.12.177 — les CHOIX d'un texte à trous : « (va / vas / vont) ». La bonne proposition (celle qui portait l'étoile) est en gras et soulignée — pas seulement en couleur, pour
   que la version enseignant imprimée en noir et blanc la montre aussi — dans la version enseignant, et dans la version élève une fois la correction du bloc dévoilée
   (comme la coche d'un QCM). Sur la fiche de l'élève et en projection, rien ne la distingue. */
.fill-choix-option{white-space:nowrap}
.course-view-teacher .fill-choix-bonne,
.course-view-student .rendered-fill_blank:has(.fill-blank-teacher-correction.is-revealed) .fill-choix-bonne,
.course-view-student .rendered-summary:has(.fill-blank-teacher-correction.is-revealed) .fill-choix-bonne,
body.projection-mode.projection-show-all-corrections .course-view-student .fill-choix-bonne{font-weight:700;text-decoration:underline;text-underline-offset:2px}

/* V0.18.12.190 — bloc « Activité musicale interactive » (assets/js/music-activity.js). Couleurs par les jetons du thème ; une case allumée porte un SYMBOLE (●) et son libellé lu, jamais la seule couleur. */
.music-activity{margin:6px 0 10px;padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:var(--surface);color:var(--text)}
.music-consigne{margin:0 0 10px;font-weight:600}
.music-barre{display:flex;flex-wrap:wrap;align-items:center;gap:8px 14px;margin:0 0 10px}
.music-btn{width:auto;margin:0;padding:7px 12px;border:1px solid var(--line);border-radius:9px;background:var(--surface);color:var(--text);font-size:.9rem;font-weight:700;cursor:pointer}
.music-btn:hover{border-color:var(--primary);color:var(--primary)}
.music-btn:disabled{opacity:.5;cursor:not-allowed}
.music-btn:focus-visible,.music-case:focus-visible,.music-activity input:focus-visible,.music-activity select:focus-visible,.music-activity textarea:focus-visible{outline:3px solid var(--primary);outline-offset:2px}
.music-play{background:var(--primary);border-color:var(--primary);color:var(--on-primary)}
.music-play:hover{background:var(--primary);color:var(--on-primary);filter:brightness(1.08)}
.music-champ{display:inline-flex;align-items:center;gap:6px;margin:0;font-size:.85rem;font-weight:700;color:var(--muted)}
.music-champ input[type=range]{width:120px;margin:0}
.music-champ input[type=checkbox],.music-case-a-cocher input[type=checkbox]{width:auto;margin:0}
.music-valeur{min-width:4.5em;color:var(--text);font-variant-numeric:tabular-nums}
.music-message{min-height:1.2em;margin:0 0 6px;color:var(--muted);font-size:.85rem}
.music-grille{overflow-x:auto;padding-bottom:4px}
.music-table{border-collapse:separate;border-spacing:0;font-size:.8rem}
.music-table th,.music-table td{padding:0;text-align:center}
.music-coin{text-align:left;padding:0 10px 4px 0;color:var(--muted);font-weight:700}
/* Sur un écran étroit la grille défile de côté : les noms des pistes restent en place à gauche (opaques, pour ne pas laisser voir les cases qui passent dessous). */
.music-coin,.music-nom-piste{position:sticky;left:0;z-index:2;background:var(--surface)}
.music-pas{min-width:30px;padding:0 0 3px;color:var(--muted);font-weight:700;font-variant-numeric:tabular-nums}
.music-pas.music-debut-temps{color:var(--text)}
.music-nom-piste{text-align:left;white-space:nowrap;padding:3px 10px 3px 0;font-weight:700}
.music-nom{margin-right:8px}
.music-case-cellule{border:1px solid var(--line);border-left-width:0;background:var(--surface)}
.music-case-cellule.music-debut-temps{border-left-width:2px;border-left-color:color-mix(in srgb,var(--text) 45%,var(--line))}
.music-case-cellule.music-debut-mesure{border-left-width:4px;border-left-color:var(--text)}
.music-pas.music-debut-mesure{border-left:4px solid transparent}
.music-case{display:flex;align-items:center;justify-content:center;width:100%;min-width:30px;height:34px;margin:0;padding:0;border:0;border-radius:0;background:transparent;color:var(--muted);font-size:1rem;line-height:1}
button.music-case{cursor:pointer}
button.music-case:hover{background:color-mix(in srgb,var(--primary) 14%,transparent)}
.music-case.music-on{background:var(--primary);color:var(--on-primary)}
.music-courant{box-shadow:inset 0 0 0 2px var(--text);background:color-mix(in srgb,var(--primary) 16%,var(--surface))}
.music-case.music-on.music-courant,.music-courant .music-case.music-on{outline:2px solid var(--text);outline-offset:-3px}
.music-sr{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.music-muet{padding:3px 8px;font-size:.75rem}
/* l'éditeur */
/* La colonne de la grille du panneau est « minmax(0,1fr) » et sa racine a un min-width nul : sans cela, la largeur MINIMALE du tableau (16 colonnes) devenait celle du panneau et la page débordait de l'écran d'un téléphone (signalé par le concepteur, V.190). */
.block-editor-music_activity{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;min-width:0}
.block-editor-music_activity [data-music-editor-racine]{min-width:0}
.music-grille{max-width:100%}
.music-reglages,.music-actions,.music-piste-editeur{display:flex;flex-wrap:wrap;align-items:end;gap:10px 14px}
.music-champ-editeur{display:grid;gap:3px;margin:0;font-size:.8rem;font-weight:700;color:var(--muted)}
.music-champ-editeur input,.music-champ-editeur select,.music-champ-editeur textarea{margin:0}
.music-champ-large{width:100%}
.music-champ-large textarea{width:100%;box-sizing:border-box}
.music-case-a-cocher{display:inline-flex;align-items:center;gap:6px;margin:0;font-size:.85rem;font-weight:700}
.music-piste-editeur{padding:8px 10px;border:1px solid var(--line);border-radius:10px;background:var(--bg)}
.music-copie{display:inline-flex;flex-wrap:wrap;align-items:center;gap:6px;font-size:.85rem}
.music-copie[hidden]{display:none}
.music-copie select{width:auto;min-width:4.5rem;margin:0}
.music-libelle{font-size:.8rem;font-weight:700;color:var(--muted)}
/* rétroprojection : grandes cases et seules les commandes de base (lecture, retour au début, volume) */
body.projection-mode .music-activity .music-ctl-avance{display:none}
body.projection-mode .music-activity .music-btn{font-size:calc(.9rem * var(--projection-font-scale,1.4));padding:10px 16px}
body.projection-mode .music-activity .music-table{font-size:calc(.8rem * var(--projection-font-scale,1.4))}
body.projection-mode .music-activity .music-case{min-width:calc(30px * var(--projection-font-scale,1.4));height:calc(34px * var(--projection-font-scale,1.4))}
body.projection-mode .music-activity .music-consigne{font-size:calc(1rem * var(--projection-font-scale,1.4))}
@media (max-width:520px){.music-nom-piste .music-nom{display:block;margin:0 0 2px}.music-nom-piste .music-muet{display:block}}
@media (prefers-reduced-motion:reduce){.music-courant{box-shadow:inset 0 0 0 3px var(--text)}}
@media print{
  .music-activity{break-inside:avoid;border-color:#999}
  .music-barre,.music-message{display:none!important}
  .music-case.music-on{background:transparent;color:#000;font-weight:900}
  .music-courant{box-shadow:none;background:transparent}
}

/* V0.18.12.191 — mode « Boomwhackers » de l'activité musicale : une séquence de blocs colorés, le NOM de la note toujours écrit dedans (la couleur ne dit jamais seule). Les huit couleurs sont des couleurs de TUBES, fixes d'un thème à l'autre
   (la légende les montre) : ce sont les seules teintes en dur de ce bloc, chacune avec la couleur de texte qui la contraste (essai : contraste d'au moins 4,5 dans les deux palettes).
   « arcenciel » est une palette INDICATIVE : le fabricant ne publie pas la couleur de chaque note, l'association couleur ↔ note est à comparer avec de vrais tubes. « accessible » (huit teintes bien distinctes, y compris pour un daltonien) ne change pas l'association note ↔ hauteur. */
.bw-pal-arcenciel .bw-n0,.bw-pal-arcenciel .bw-n7{background:#C62828;color:#fff}
.bw-pal-arcenciel .bw-n1{background:#F57C00;color:#000}
.bw-pal-arcenciel .bw-n2{background:#FDD835;color:#000}
.bw-pal-arcenciel .bw-n3{background:#2E7D32;color:#fff}
.bw-pal-arcenciel .bw-n4{background:#00ACC1;color:#000}
.bw-pal-arcenciel .bw-n5{background:#1565C0;color:#fff}
.bw-pal-arcenciel .bw-n6{background:#6A1B9A;color:#fff}
.bw-pal-accessible .bw-n0{background:#000;color:#fff}
.bw-pal-accessible .bw-n1{background:#E69F00;color:#000}
.bw-pal-accessible .bw-n2{background:#56B4E9;color:#000}
.bw-pal-accessible .bw-n3{background:#009E73;color:#000}
.bw-pal-accessible .bw-n4{background:#F0E442;color:#000}
.bw-pal-accessible .bw-n5{background:#0072B2;color:#fff}
.bw-pal-accessible .bw-n6{background:#D55E00;color:#000}
.bw-pal-accessible .bw-n7{background:#CC79A7;color:#000}
.bw-frise{display:grid;gap:12px;margin:8px 0;min-width:0}
.bw-mesure{display:grid;gap:4px;min-width:0}
.bw-mesure-titre{margin:0;font-size:.8rem;font-weight:700;color:var(--muted)}
.bw-cases{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin:0;padding:0;list-style:none}
.bw-cases.bw-col-2{grid-template-columns:repeat(2,minmax(0,1fr))}
.bw-cases.bw-col-3{grid-template-columns:repeat(3,minmax(0,1fr))}
.bw-cases.bw-col-6{grid-template-columns:repeat(6,minmax(0,1fr))}
.bw-cases.bw-col-8{grid-template-columns:repeat(8,minmax(0,1fr))}
.bw-item{display:grid;gap:2px;margin:0;padding:0;min-width:0}
.bw-temps{min-height:1em;font-size:.75rem;font-weight:700;color:var(--muted);text-align:center;font-variant-numeric:tabular-nums}
.bw-debut-temps .bw-temps{color:var(--text)}
.bw-pas,.bw-puce,.bw-en-cours-note,.bw-pinceau{box-sizing:border-box;border:2px solid color-mix(in srgb,var(--text) 40%,transparent);font-family:inherit;font-weight:800;line-height:1.1;text-align:center;overflow-wrap:anywhere}
.bw-pas{display:flex;align-items:center;justify-content:center;width:100%;min-height:3.2rem;margin:0;padding:4px 2px;border-radius:8px;font-size:.95rem}
.bw-silence{background:transparent;color:var(--muted);border-style:dashed}
button.bw-pas{cursor:pointer}
button.bw-pas:hover,.bw-pinceau:hover{filter:brightness(1.12)}
button.bw-pas:focus-visible,.bw-pinceau:focus-visible{outline:3px solid var(--primary);outline-offset:2px}
.bw-courant{outline:4px solid var(--text);outline-offset:2px}
.bw-en-cours{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;margin:0 0 10px}
.bw-en-cours-titre{font-size:.8rem;font-weight:700;color:var(--muted)}
.bw-en-cours-note{display:inline-flex;align-items:center;justify-content:center;min-width:6.5rem;min-height:3.4rem;padding:4px 14px;border-radius:12px;font-size:1.8rem;font-weight:900}
.bw-legende{display:flex;flex-wrap:wrap;gap:6px 10px;margin:0 0 10px;padding:0;list-style:none}
.bw-legende-item{display:inline-flex;align-items:center;gap:4px;margin:0;padding:0}
.bw-puce{padding:3px 10px;border-radius:999px;font-size:.8rem}
.bw-anglais{font-size:.7rem;font-weight:700;color:var(--muted)}
.bw-pinceaux{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 6px}
.bw-pinceau{width:auto;min-width:3.4rem;margin:0;padding:8px 10px;border-radius:9px;font-size:.9rem;cursor:pointer}
.bw-pinceau.bw-choisi{box-shadow:0 0 0 3px var(--surface),0 0 0 6px var(--text)}
.bw-pinceau.bw-choisi::before{content:"✓ "}
/* V0.18.12.191.1 — la TENUE : un bloc de tenue se fond dans celui de sa note (même couleur, sans trait ni écart entre les deux sur une même ligne) ; en tête d'une ligne il rappelle la note entre parenthèses. */
.bw-item.bw-tenue-liee{margin-left:-6px}
.bw-pas.bw-tenue-liee{border-left-width:0;border-top-left-radius:0;border-bottom-left-radius:0}
.bw-pas.bw-suivi-tenue{border-right-width:0;border-top-right-radius:0;border-bottom-right-radius:0}
.bw-tenue-pinceau{background:var(--surface);color:var(--text);border-style:double;border-width:4px}
.music-mode-zone{display:grid;gap:12px;min-width:0}
.music-champ-mode{max-width:22rem}
.music-aide{margin:0;color:var(--muted);font-size:.8rem}
body.projection-mode .music-activity .bw-pas{min-height:calc(3.2rem * var(--projection-font-scale,1.4));font-size:calc(.95rem * var(--projection-font-scale,1.4))}
body.projection-mode .music-activity .bw-en-cours-note{min-height:calc(3.4rem * var(--projection-font-scale,1.4));font-size:calc(1.8rem * var(--projection-font-scale,1.4))}
body.projection-mode .music-activity .bw-puce,body.projection-mode .music-activity .bw-temps,body.projection-mode .music-activity .bw-mesure-titre{font-size:calc(.8rem * var(--projection-font-scale,1.4))}
@media (max-width:520px){
  .bw-cases{gap:3px}
  .bw-item.bw-tenue-liee{margin-left:-3px}
  .bw-cases.bw-col-8 .bw-pas,.bw-cases.bw-col-6 .bw-pas{padding:2px 1px;font-size:.78rem}
}
@media print{
  .bw-pas,.bw-puce,.bw-en-cours-note{-webkit-print-color-adjust:exact;print-color-adjust:exact;border-color:#000}
  .bw-courant{outline:none}
  .bw-en-cours,.bw-pinceaux{display:none}
}

/* V0.18.12.192 — mode « structure » de l'activité musicale : une ligne de temps proportionnelle à la durée du fichier audio, des sections colorées dont le NOM est toujours écrit (la couleur ne dit jamais seule), un curseur qui suit l'écoute.
   Les huit couleurs de section sont fixes d'un thème à l'autre, chacune avec la couleur de texte qui la contraste (essai : au moins 4,5) ; ce sont les seules teintes en dur du mode. */
.ms-c-bleu{background:#0072B2;color:#fff}
.ms-c-vert{background:#009E73;color:#000}
.ms-c-orange{background:#E69F00;color:#000}
.ms-c-violet{background:#6A1B9A;color:#fff}
.ms-c-rouge{background:#C62828;color:#fff}
.ms-c-turquoise{background:#00ACC1;color:#000}
.ms-c-jaune{background:#F0E442;color:#000}
.ms-c-gris{background:#616161;color:#fff}
.ms-oeuvre{margin:0 0 8px;font-size:1.05rem;font-weight:800}
.ms-barre{align-items:center}
.ms-temps{min-width:6.5em;font-variant-numeric:tabular-nums;font-weight:700}
.ms-position input[type=range]{width:min(320px,60vw);margin:0}
.ms-frise{position:relative;height:3.4rem;margin:8px 0 10px;overflow:hidden;border:1px solid var(--line);border-radius:10px;background:var(--bg);cursor:pointer}
.ms-section{position:absolute;top:0;bottom:0;box-sizing:border-box;padding:0 6px;overflow:hidden;border-left:2px solid var(--surface);font-size:.85rem;font-weight:800;line-height:3.2rem;white-space:nowrap;text-overflow:ellipsis}
.ms-tete{position:absolute;top:0;bottom:0;width:3px;margin-left:-1px;background:var(--text);box-shadow:0 0 0 2px var(--surface);pointer-events:none}
.ms-en-cours{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;margin:0 0 8px}
.ms-en-cours-titre{font-size:.8rem;font-weight:700;color:var(--muted)}
.ms-en-cours-valeur{display:inline-block;max-width:100%;padding:4px 14px;box-sizing:border-box;overflow-wrap:anywhere;border:2px solid color-mix(in srgb,var(--text) 40%,transparent);border-radius:12px;font-size:1.6rem;font-weight:900;line-height:1.2}
.ms-liste{display:grid;gap:6px;margin:0;padding:0;list-style:none}
.ms-activite .ms-liste{margin:0;padding:0}   /* plus précis que la règle des listes du cours (padding-left) */
.ms-item{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;margin:0;padding:6px 8px;border:1px solid var(--line);border-radius:10px;background:var(--surface)}
.ms-item.ms-active{outline:3px solid var(--text);outline-offset:1px}
.ms-puce{padding:2px 10px;border:2px solid color-mix(in srgb,var(--text) 40%,transparent);border-radius:999px;font-weight:800;overflow-wrap:anywhere}
.ms-intervalle{font-variant-numeric:tabular-nums;font-weight:700;color:var(--muted)}
.ms-ecouter{margin-left:auto}
.ms-sections-editeur{display:grid;gap:8px;min-width:0}
.ms-ligne{display:flex;flex-wrap:wrap;align-items:end;gap:8px 10px;margin:0;padding:8px 10px;border:1px solid var(--line);border-radius:10px;background:var(--bg)}
.ms-ligne input[type=number]{width:6.5em}
.ms-ligne input[type=text]{min-width:9em}
body.projection-mode .music-activity .ms-frise{height:calc(3.4rem * var(--projection-font-scale,1.4))}
body.projection-mode .music-activity .ms-section{font-size:calc(.85rem * var(--projection-font-scale,1.4));line-height:calc(3.2rem * var(--projection-font-scale,1.4))}
body.projection-mode .music-activity .ms-en-cours-valeur{font-size:calc(1.6rem * var(--projection-font-scale,1.4))}
body.projection-mode .music-activity .ms-item,body.projection-mode .music-activity .ms-oeuvre{font-size:calc(1rem * var(--projection-font-scale,1.4))}
@media (max-width:520px){
  .ms-frise{height:2.8rem}
  .ms-section{line-height:2.6rem}
  .ms-position{flex:1 1 100%}
  .ms-position input[type=range]{width:100%}
  .ms-ligne input[type=text]{min-width:0;width:100%}
}
@media print{
  .ms-section,.ms-puce,.ms-en-cours-valeur{-webkit-print-color-adjust:exact;print-color-adjust:exact}
  .ms-ecouter,.ms-en-cours,.ms-tete,audio.music-fallback{display:none}
}

/* V0.18.12.193 — IMAGE ANNOTÉE : repères numérotés, cadres et flèches posés sur une image (bloc Image), avec leur légende. La couche est un SVG dessiné par le serveur (course_annot_svg) ; l'éditeur
   (image-annotee.js) la dessine pareil. Les couleurs sont FIXES (noir et blanc, rouge pour les corrections) : elles se posent sur une photo, pas sur le fond d'un thème, et se lisent en noir et blanc.
   Une correction est rouge ET en pointillés (lisible sans couleur) ; la vue élève la cache tant que « Afficher la correction » n'est pas pressé (même mécanisme que les tableaux et les schémas).
   Aucune propriété d'épaisseur ici : les épaisseurs sont des attributs du dessin (elles suivent la taille choisie). */
.annot-stage{position:relative;display:inline-block;max-width:100%;line-height:0;vertical-align:top}
.annot-stage>img{display:block;max-width:100%;height:auto}
.ai-overlay{position:absolute;left:0;top:0;width:100%;height:100%;overflow:visible;pointer-events:none;-webkit-print-color-adjust:exact;print-color-adjust:exact}
.ai-overlay .ai-rond{fill:#fff;stroke:#111;stroke-width:3.5}
.ai-overlay .ai-num{fill:#111;font-family:Arial,Helvetica,sans-serif;font-weight:700}
.ai-overlay .ai-halo{fill:none;stroke:#fff;stroke-linejoin:round}
.ai-overlay .ai-trait{fill:none;stroke:#111;stroke-linejoin:round}
.ai-overlay .ai-tete{fill:#111;stroke:#fff;stroke-width:3;stroke-linejoin:round;paint-order:stroke}
.ai-overlay .ai-corr .ai-rond{stroke:#c1121f;stroke-dasharray:8 5}
.ai-overlay .ai-corr .ai-num{fill:#c1121f}
.ai-overlay .ai-corr .ai-trait{stroke:#c1121f;stroke-dasharray:18 10}
.ai-overlay .ai-corr .ai-tete{fill:#c1121f}
.ai-overlay .ai-sel .ai-rond,.ai-overlay .ai-sel .ai-trait{stroke:#0b5ed7}
.ai-overlay .ai-sel .ai-tete{fill:#0b5ed7}
.ai-overlay .ai-sel .ai-num{fill:#0b5ed7}
.ai-legende{margin:8px 0 0;padding:0;list-style:none;line-height:1.35;text-align:left;font-size:.92rem}
/* En rétroprojection chaque texte est mis à l'échelle (--projection-font-scale) : la légende porte les numéros, elle suit. */
body.projection-mode.presentation-ui-v01447 .course-document .ai-legende{font-size:calc(.92rem * var(--projection-font-scale))}
.ai-legende .ai-ligne{display:flex;align-items:baseline;gap:8px;margin:3px 0}
.ai-legende .ai-n{flex:none;box-sizing:border-box;min-width:1.7em;height:1.7em;padding:0 .3em;border:2px solid #111;border-radius:999px;background:#fff;color:#111;font-weight:700;font-size:.85em;line-height:calc(1.7em - 4px);text-align:center;-webkit-print-color-adjust:exact;print-color-adjust:exact}
.ai-legende .ai-corr .ai-n{border-color:#c1121f;border-style:dashed;color:#c1121f}
.ai-legende .ai-texte{min-width:0;overflow-wrap:anywhere}
.ai-legende .ai-pointilles{display:none;flex:1 1 4em;min-width:3em;height:1.1em;border-bottom:2px dotted currentColor}
.annot-correction-actions{display:none;line-height:normal}
.course-view-student .annot-correction-actions{display:block}
/* Vue élève : tant que la correction n'est pas révélée, les éléments « correction » et les textes de légende à compléter disparaissent (pointillés à la place). */
body:not(.projection-show-all-corrections) .course-view-student :is(.rendered-image,.rendered-graph):not(.table-correction-revealed) .ai-corr,
body:not(.projection-show-all-corrections) .course-view-student :is(.rendered-image,.rendered-graph):not(.table-correction-revealed) .ai-texte-masque{display:none}
body:not(.projection-show-all-corrections) .course-view-student :is(.rendered-image,.rendered-graph):not(.table-correction-revealed) .ai-pointilles{display:block}
.course-view-student :is(.rendered-image,.rendered-graph).table-correction-revealed .table-correction-toggle{background:#234b72;color:#fff;border-color:#234b72}
@media print{
  .ai-legende{break-inside:avoid;page-break-inside:avoid}
  .annot-stage{break-inside:avoid;page-break-inside:avoid}
}
/* La fenêtre d'agrandissement (application.js, applicationProfZoomImageV012175) : l'image et sa couche restent ensemble. */
.image-zoom-cadre .annot-stage{max-width:100%;background:#fff}
.image-zoom-cadre .annot-stage>img{max-width:100%;max-height:calc(100vh - 120px);max-height:calc(100dvh - 120px)}
.image-zoom.est-reelle .image-zoom-cadre .annot-stage{max-width:none}
.image-zoom.est-reelle .image-zoom-cadre .annot-stage>img{max-width:none;max-height:none}
/* L'éditeur : le volet « Annoter l'image » du formulaire du bloc. */
.annot-editor{margin:10px 0;padding:8px 10px;border:1px solid var(--line);border-radius:10px;background:var(--surface)}
.annot-editor[hidden],.annot-editor [hidden]{display:none!important}
.annot-editor>summary{cursor:pointer;font-weight:700}
.annot-editor-resume{margin-left:6px;font-weight:400;color:var(--muted);font-size:.9em}
.annot-barre{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0 4px}
.annot-barre .annot-outil{width:auto;margin:0;background:var(--tone-panel);color:var(--primary);border:1px solid var(--line)}
.annot-barre .annot-outil:hover{background:var(--tone-hover)}
.annot-barre .annot-outil.est-actif{background:var(--primary);color:var(--on-primary);border-color:var(--primary);box-shadow:inset 0 0 0 2px var(--on-primary)}
.annot-aide,.annot-absent,.annot-message{margin:4px 0;font-size:.88rem;color:var(--muted)}
.annot-message:empty{display:none}
.annot-stage-edit{margin:6px 0;border:1px solid var(--line);background:#fff}
.annot-stage-edit>img{max-height:480px;width:auto;margin:0;border-radius:0;-webkit-user-drag:none;user-select:none}
.annot-capture{position:absolute;left:0;top:0;width:100%;height:100%;cursor:crosshair;touch-action:none;outline-offset:2px}
.annot-capture[data-outil="move"]{cursor:move}
.annot-capture[data-outil="pin"]{touch-action:manipulation}
.annot-capture:focus-visible{outline:3px solid #0b5ed7}
.annot-vue-eleve .ai-corr{display:none}
.annot-reglages{display:flex;flex-wrap:wrap;gap:6px 16px;align-items:center;margin:8px 0}
.annot-reglages label{display:flex;align-items:center;gap:6px;width:auto;margin:0}
.annot-reglages select{width:auto}
.annot-reglages input[type="checkbox"]{width:auto;margin:0;flex:none}
.annot-vue-eleve-choix{flex-wrap:nowrap}
.annot-liste{margin:6px 0 0;padding:0;list-style:none;display:grid;gap:6px}
.annot-ligne{display:flex;flex-wrap:wrap;align-items:center;gap:6px 8px;padding:5px 6px;border:1px solid var(--line);border-radius:8px}
.annot-ligne.est-choisi{border-color:var(--primary);box-shadow:0 0 0 1px var(--primary)}
.annot-num{flex:none;box-sizing:border-box;min-width:1.9em;height:1.9em;padding:0 .3em;border:2px solid #111;border-radius:999px;background:#fff;color:#111;font-weight:700;text-align:center;line-height:calc(1.9em - 4px)}
.annot-ligne.est-correction .annot-num{border-color:#c1121f;border-style:dashed;color:#c1121f}
.annot-type{flex:none;font-size:.85rem;color:var(--muted);min-width:3.6em}
.annot-ligne input[type="text"]{flex:1 1 12em;min-width:0;width:auto;margin:0}
.annot-corr-choix{display:flex;align-items:center;gap:4px;width:auto;margin:0;font-size:.88rem}
.annot-corr-choix input{width:auto;margin:0}
.annot-mini{width:auto;margin:0;padding:4px 9px;background:var(--tone-panel);color:var(--primary);border:1px solid var(--line)}
.annot-mini:hover:not(:disabled){background:var(--tone-hover)}
.annot-mini:disabled{opacity:.45;cursor:default}
.annot-position{flex:1 1 100%;font-size:.88rem}
.annot-position>summary{cursor:pointer;color:var(--muted)}
.annot-position-champs{display:grid;grid-template-columns:repeat(auto-fit,minmax(13em,1fr));gap:6px 12px;margin-top:6px}
.annot-position-champs label{display:flex;align-items:center;gap:6px;width:auto;margin:0}
.annot-position-champs input{width:6.5em;margin:0}
@media (pointer:coarse){
  .annot-mini{min-width:40px;min-height:40px}
  .annot-barre .annot-outil{min-height:40px}
}

/* V0.18.12.194 — APPARITION PROGRESSIVE (assets/js/reveal-steps.js) : sous body.projection-mode SEULEMENT, les parties d'un bloc réglé « Apparition progressive » qui n'ont pas encore été montrées gardent
   leur place mais ne se voient pas (visibility:hidden : la page ne saute pas quand elles apparaissent) ; le bloc porte ses boutons « ◀ Suivant ▶ · n / N · Tout afficher ». L'aperçu ordinaire et l'impression montrent tout. */
.reveal-control{display:none}
body.projection-mode .rendered-block[data-reveal-steps] .reveal-control{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:8px;margin-top:10px;font-size:calc(.9rem * var(--projection-font-scale,1))}
body.projection-mode .reveal-attente{visibility:hidden}
.reveal-control button{width:auto;margin:0;padding:6px 14px;border:1px solid var(--line);border-radius:8px;background:var(--tone-panel);color:var(--primary);font-weight:800;font-size:inherit;cursor:pointer}
.reveal-control button:hover:not(:disabled){background:var(--tone-hover)}
.reveal-control button:disabled{opacity:.45;cursor:default}
.reveal-control .reveal-suivant{background:var(--primary);color:var(--on-primary);border-color:var(--primary)}
.reveal-control .reveal-suivant:disabled{background:var(--tone-panel);color:var(--primary);border-color:var(--line)}
.reveal-control .reveal-suivant:hover:not(:disabled){background:var(--primary);color:var(--on-primary);filter:brightness(1.12)}
@media (pointer:coarse){
  .reveal-control button{min-height:44px;min-width:44px}
}
.reveal-compte{color:var(--muted);font-variant-numeric:tabular-nums}
.reveal-steps-select{width:auto;margin:0}
@media print{
  .reveal-control{display:none!important}
  .reveal-attente{visibility:visible!important}
}

/* V0.18.12.194.1 — APPARITION PROGRESSIVE DE LA CORRECTION (data-reveal-steps="2") : le bloc reste affiché, seule sa correction avance. VUE ÉLÈVE seulement (la vue Enseignant montre déjà tout), sous body.projection-mode,
   et pas quand « Afficher toutes les corrections » est pressé. Les classes sont à part (celles du bloc entier ne servent pas) : une cellule enseignant montrée (reveal-corr-vue), une réponse pas encore montrée
   (reveal-corr-attente : elle garde sa place), le bloc de correction ouvert (reveal-corr-ouverte : plus fort que les règles qui le cachent jusqu'à « Afficher la correction », dont les « !important » de la V.14.45).
   Les boutons « Afficher la correction » du bloc sont remplacés par ceux du module ; le rouge est celui des corrections d'avant (en dur, comme elles). */
body.projection-mode:not(.projection-show-all-corrections) .course-view-student .reveal-corr-attente{visibility:hidden}
body.projection-mode .course-view-student .rendered-block[data-reveal-steps="2"] .reveal-corr-ouverte.reveal-corr-ouverte.reveal-corr-ouverte{display:block!important}
body.projection-mode .course-view-student .rendered-block[data-reveal-steps="2"] .table-teacher-cell.reveal-corr-vue .table-teacher-placeholder{display:none!important}
body.projection-mode .course-view-student .rendered-block[data-reveal-steps="2"] .table-teacher-cell.reveal-corr-vue .table-teacher-value{display:inline!important;color:#b42318;font-weight:600}
body.projection-mode .course-view-student .rendered-block[data-reveal-steps="2"] :is(.correction-toggle,.table-correction-actions,.fill-blank-correction-toggle){display:none!important}
/* La correction au complet (reveal-corr-fin, posée à la dernière partie) : les marques qui, d'ordinaire, attendent le « is-revealed » du bloc de correction — la coche et le gras des bonnes propositions d'un QCM, la bonne
   proposition d'un texte à choix. À l'impression, une réponse pas encore montrée reste cachée, comme une case de tableau : on imprime ce qui est montré. */
body.projection-mode .course-view-student .rendered-question:has(.question-teacher-answer.reveal-corr-fin) .qcm-coche{visibility:visible}
body.projection-mode .course-view-student .rendered-question:has(.question-teacher-answer.reveal-corr-fin) .qcm-bonne .qcm-texte{font-weight:700}
body.projection-mode .course-view-student :is(.rendered-fill_blank,.rendered-summary):has(.fill-blank-teacher-correction.reveal-corr-fin) .fill-choix-bonne{font-weight:700;text-decoration:underline;text-underline-offset:2px}

/* V0.18.12.195 — LA FRISE CHRONOLOGIQUE (type `timeline`). Le dessin vient du serveur (course-blocks.php, timeline_svg) : un axe gradué, des barres pour les périodes (un MOTIF par piste : le noir et blanc les distingue), des tiges et
   des étiquettes. Les couleurs viennent des jetons du thème ; le gris des barres est fixe (il porte un motif et un contour, jamais la seule couleur). Ce que la version élève masque est de deux sortes d'éléments :
   .tl-vide (les pointillés, visibles pour l'élève seulement) et .tl-corr (le vrai texte, rouge, visible pour l'enseignant ou une fois la correction révélée — même mécanisme que les tableaux : table-correction-revealed). */
.tl-block{margin:.3rem 0;max-width:100%}
.tl-defile{max-width:100%;overflow-x:auto}
.tl-svg{display:block;width:100%;height:auto;border:1px solid var(--line);border-radius:12px;background:var(--surface);font-family:system-ui,sans-serif}
.tl-axe{stroke:var(--text);stroke-width:2.2;stroke-linecap:round}
.tl-grad{stroke:var(--text);stroke-width:1.4}
.tl-grad-txt{fill:var(--muted);font-size:12px;font-variant-numeric:tabular-nums}
.tl-sep{stroke:var(--line);stroke-width:1;stroke-dasharray:6 5}
.tl-piste{fill:var(--text);font-size:13px;font-weight:700;letter-spacing:.03em}
.tl-halo{stroke:var(--surface);stroke-width:5}
.tl-tige{stroke:var(--text);stroke-width:1.3}
.tl-cle .tl-tige{stroke-width:2.4}
.tl-pt{fill:var(--text);stroke:var(--surface);stroke-width:1.5}
.tl-bar{fill:#d4d4d4;stroke:var(--text);stroke-width:1.3}
.tl-cle .tl-bar-0{fill:#9a9a9a}
.tl-date{fill:var(--text);font-size:12px;font-weight:700;font-variant-numeric:tabular-nums}
.tl-lib{fill:var(--text);font-size:13px}
.tl-cle .tl-lib{font-weight:700}
.tl-points{stroke:var(--muted);stroke-width:1.6;stroke-dasharray:1.5 4;stroke-linecap:round}
.tl-vide{display:none}
.tl-corr{fill:#b42318;color:#b42318}
.course-view-student .rendered-timeline:not(.table-correction-revealed) .tl-vide{display:inline}
.course-view-student .rendered-timeline:not(.table-correction-revealed) .tl-corr{display:none}
body.projection-show-all-corrections .course-view-student .rendered-timeline .tl-vide{display:none}
body.projection-show-all-corrections .course-view-student .rendered-timeline .tl-corr{display:inline}
.tl-liste{margin-top:8px;font-size:.9rem}
.tl-liste>summary{cursor:pointer;color:var(--muted)}
.tl-liste ol{margin:.5rem 0 0;padding-left:1.4rem}
.tl-correction-actions{margin-top:8px}
body.projection-mode .tl-liste{display:none}
/* l'éditeur : une ligne par repère */
.block-editor-timeline{display:grid;gap:14px;margin-top:12px}
.block-editor-timeline.hidden{display:none!important}
.timeline-data-input{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,"Liberation Mono",monospace;white-space:pre;tab-size:4;width:100%}
.timeline-editor-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.timeline-aide{font-size:.9rem}
.timeline-aide>summary{cursor:pointer;color:var(--muted)}
.timeline-aide ul{margin:.5rem 0 0;padding-left:1.2rem;display:grid;gap:4px}
@media (max-width:640px){
  .timeline-editor-grid{grid-template-columns:minmax(0,1fr)}
  /* sur un téléphone le dessin garde une largeur lisible (le texte y serait à 5 px) et défile dans son cadre */
  .tl-svg{min-width:600px}
}
/* l'apparition progressive (V.194 et V.194.1) : un repère après l'autre — ou, pour la correction seule, un repère masqué après l'autre. La règle est plus forte que celles qui masquent la correction à l'élève. */
body.projection-mode .course-view-student .rendered-block[data-reveal-steps="2"] .tl-item.reveal-corr-vue .tl-vide{display:none}
body.projection-mode .course-view-student .rendered-block[data-reveal-steps="2"] .tl-item.reveal-corr-vue .tl-corr{display:inline}
body.projection-mode .course-view-student .rendered-block[data-reveal-steps="2"] .tl-correction-actions{display:none!important}
@media print{
  .tl-svg{border-color:#000;break-inside:avoid;min-width:0}
  .tl-defile{overflow:visible}
  .tl-liste{display:none}
}

/* V0.18.12.196 — LE TABLEAU ENRICHI (phase 1) : fonds, alignement, largeur, nombres, cases à cocher. Sans réglage, un tableau n'a aucune de ces classes (rendu d'avant). Les fonds sont les huit teintes CLAIRES du Schéma
   (node_diagram_palette : le texte reste foncé, le contraste est de 10 à 13), COPIÉES ici comme dans la feuille du Schéma ; elles gagnent sur les thèmes (!important) et s'impriment (print-color-adjust). Une case à cocher
   est DESSINÉE (bordure, trait en CSS) : elle s'imprime et se photocopie, aucune police de symboles n'est nécessaire. */
.course-table .tbl-f-jaune{background:#fff1a8!important;color:#1f2937!important}
.course-table .tbl-f-orange{background:#ffd9ae!important;color:#1f2937!important}
.course-table .tbl-f-rose{background:#ffd0d8!important;color:#1f2937!important}
.course-table .tbl-f-vert{background:#c9eec5!important;color:#1f2937!important}
.course-table .tbl-f-turquoise{background:#b5ece6!important;color:#1f2937!important}
.course-table .tbl-f-bleu{background:#c0dbfc!important;color:#1f2937!important}
.course-table .tbl-f-violet{background:#e4d3f8!important;color:#1f2937!important}
.course-table .tbl-f-gris{background:#dcdcdc!important;color:#1f2937!important}
.course-table .tbl-nombre{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
/* V0.18.12.234 — « tableau complété en classe » : la colonne à remplir (vote en direct ou saisie à la main). La cellule garde le contenu du cours (« modèle ») ; la valeur de la classe, quand elle existe, prend sa place. */
.course-table td.tbl-fill{cursor:cell}
.course-table td.tbl-fill:hover{outline:2px dotted var(--muted,#667085);outline-offset:-3px}
.course-table td.tbl-fill .tbl-fill-valeur{display:none;font-weight:800;font-variant-numeric:tabular-nums}
.course-table td.tbl-fill-rempli .tbl-fill-valeur{display:inline}
.course-table td.tbl-fill-rempli .tbl-fill-modele{display:none}
.course-table td.tbl-fill[data-fill-origine="main"] .tbl-fill-valeur{border-bottom:2px dotted currentColor}
.course-table td.tbl-fill-edition .tbl-fill-valeur,.course-table td.tbl-fill-edition .tbl-fill-modele{display:none}
.course-table td.tbl-fill .tbl-fill-champ{width:100%;min-width:3.5em;box-sizing:border-box;margin:0;padding:2px 4px;font:inherit;text-align:inherit}
@media print{.course-table td.tbl-fill{cursor:auto}.course-table td.tbl-fill:hover{outline:0}}
.course-table .tbl-a-g{text-align:left}
.course-table .tbl-a-c{text-align:center}
.course-table .tbl-a-d{text-align:right}
.course-table.tbl-largeurs{table-layout:fixed;width:100%;min-width:30rem}
.course-table .tbl-cellule-case{text-align:center}
.tbl-case{display:inline-block;position:relative;width:1.05em;height:1.05em;box-sizing:border-box;border:2px solid currentColor;border-radius:3px;vertical-align:-.15em}
.tbl-case-oui::after{content:"";position:absolute;left:.26em;top:-.02em;width:.26em;height:.58em;border:solid currentColor;border-width:0 .17em .17em 0;transform:rotate(42deg)}
.table-teacher-value .tbl-case{color:#b42318}
@media print{
  .course-table td[class*="tbl-f-"],.course-table th[class*="tbl-f-"]{-webkit-print-color-adjust:exact;print-color-adjust:exact}
}

/* V0.18.12.196 — l'ÉDITEUR du tableau enrichi (assets/js/table-enrichi.js) : barre sous la grille, réglages de colonne ; une cellule couverte par une fusion est grisée (et bloquée), une cellule d'ancrage a un cadre. */
.table-enrichi{display:grid;gap:8px;margin-top:10px;padding:10px 12px;border:1px solid var(--line);border-radius:10px;background:var(--surface)}
.table-enrichi-cellule{margin:0;font-weight:600}
.table-enrichi-barre{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.table-enrichi-fonds{display:inline-flex;flex-wrap:wrap;gap:6px;align-items:center;padding:0 4px}
.table-enrichi-pastille{width:26px;height:26px;min-height:0;padding:0;border:2px solid var(--line);border-radius:50%;cursor:pointer}
.table-enrichi-pastille:hover,.table-enrichi-pastille:focus-visible{border-color:var(--text)}
.table-enrichi-colonnes>summary{cursor:pointer;font-weight:600}
.table-enrichi-liste{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:10px;margin-top:8px}
.table-enrichi-colonne{display:grid;gap:6px;padding:8px 10px;border:1px solid var(--line);border-radius:8px}
.table-enrichi-colonne label{display:grid;gap:2px;font-size:.88rem}
.table-enrichi-aide{margin:0}
.table-editor .te-cache{display:none!important}
.table-editor .te-couverte{background:repeating-linear-gradient(45deg,var(--tone-panel),var(--tone-panel) 6px,var(--line) 6px,var(--line) 12px)!important;color:transparent!important;pointer-events:none;user-select:none}
.table-editor .te-ancre{box-shadow:inset 0 0 0 2px var(--primary)}
.table-editor .te-active{outline:3px solid var(--primary);outline-offset:1px}

/* V0.18.12.197 — LE TEXTE NUMÉROTÉ (numbered_text) : un numéro de ligne dessiné par la feuille de style (::before, attr(data-num)) : il ne se copie pas avec le texte, il ne se lit pas deux fois (alternative vide), et il s'imprime. Une ligne trop longue se coupe
   avec un RETRAIT (la ligne est une grille « numéro | texte » ; le texte a un retrait négatif de première ligne : une suite de vers ne se confond pas avec un nouveau vers) ; une strophe n'est jamais coupée par un saut de page. La marge d'annotation est
   une colonne vide en pointillés à droite (la grille n'existe qu'avec elle : un poème long s'imprime en page continue partout) ; elle disparaît quand le BLOC est étroit (téléphone, bloc « moitié »). Les notes ne paraissent pas dans la version élève quand
   l'enseignant les réserve (et la version enseignant le dit). Couleurs : les jetons du thème (jamais une couleur en dur). */
.numbered-text{margin:0;font-size:1.05rem;line-height:1.7;container-type:inline-size}
.numbered-text .nt-zone{display:block}
.numbered-text.nt-marge-m .nt-zone{display:grid;grid-template-columns:minmax(0,1fr) 30%;column-gap:20px}
.numbered-text.nt-marge-l .nt-zone{display:grid;grid-template-columns:minmax(0,1fr) 42%;column-gap:20px}
.numbered-text .nt-marge{border-left:2px dashed var(--muted);min-height:4em}
.numbered-text .nt-bloc{margin:0 0 1.15em;break-inside:avoid;page-break-inside:avoid}
.numbered-text .nt-ligne{display:grid;grid-template-columns:2.9em minmax(0,1fr)}
.numbered-text .nt-ligne::before{content:attr(data-num);content:attr(data-num) / "";padding-right:.9em;text-align:right;font-size:.82em;line-height:2.07;font-variant-numeric:tabular-nums;color:var(--muted);-webkit-user-select:none;user-select:none}
.numbered-text .nt-texte{min-width:0;overflow-wrap:anywhere;padding-inline-start:1.5em;text-indent:-1.5em}
.numbered-text .nt-prose{margin:0 0 .85em;overflow-wrap:anywhere}
.numbered-text .nt-repere{display:inline-block;margin:0 .3em;padding:0 .34em;border:1px solid currentColor;border-radius:3px;font-size:.7em;font-weight:700;line-height:1.4;vertical-align:.22em;color:var(--muted);-webkit-user-select:none;user-select:none}
.numbered-text .nt-ref{margin:.5em 0 0;text-align:right;font-style:italic;color:var(--muted)}
.numbered-text .nt-notes{margin-top:1em;padding-top:.65em;border-top:1px solid var(--line);font-size:.92em;line-height:1.55}
.numbered-text .nt-notes-titre{margin:0 0 .3em;font-weight:700}
.numbered-text .nt-notes ul{margin:0;padding-left:1.2em}
.numbered-text .nt-note-l{font-weight:700;margin-right:.25em}
.course-view-student .numbered-text .nt-notes-enseignant{display:none}
.course-view-teacher .numbered-text .nt-notes-enseignant .nt-notes-titre::after{content:" (réservées à l’enseignant : absentes de la version élève)";font-weight:400;color:var(--muted)}
body.projection-mode .numbered-text{font-size:1.32rem}
@container (max-width:520px){
  .numbered-text.nt-marge-m .nt-zone,.numbered-text.nt-marge-l .nt-zone{display:block}
  .numbered-text .nt-marge{display:none}
}
@media screen and (max-width:520px){
  .numbered-text.nt-marge-m .nt-zone,.numbered-text.nt-marge-l .nt-zone{display:block}
  .numbered-text .nt-marge{display:none}
}
@media print{
  .numbered-text{font-size:11pt;line-height:1.6}
  .numbered-text .nt-ligne::before,.numbered-text .nt-repere,.numbered-text .nt-ref{color:#000}
  .numbered-text .nt-marge{border-left-color:#000}
  .numbered-text .nt-notes{border-top-color:#000}
}
.block-editor-numbered-text{display:grid;gap:10px}
.block-editor-numbered-text.hidden{display:none}
.numbered-text-editor-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:10px}
.numbered-text-editor-grid label{display:grid;gap:4px}
.numbered-text-editor-grid select{width:100%}
.numbered-text-ref{grid-column:1/-1}
.numbered-text-teacher-notes{display:flex!important;gap:8px;align-items:center}
.numbered-text-teacher-notes input{width:auto;margin:0;flex:none}
.numbered-text-data-input,.numbered-text-notes-input{font-family:inherit;line-height:1.5}

/* V0.18.12.198 — L'ATTENTE DITE (assets/js/attente.js) : une barre fine en haut dès 120 ms, une pastille en bas à 300 ms (« Enregistrement en cours… », « Chargement du cours… ») ; pendant un ENVOI, un voile léger
   (sans flou : un flou sur une page de plusieurs mégaoctets pèse sur le processeur graphique des tablettes) empêche de cliquer pendant que la page travaille. Jetons du thème ; rien à l'impression ni en rétroprojection. */
.attente-barre{position:fixed;top:0;left:0;right:0;height:3px;z-index:100001;overflow:hidden;pointer-events:none;opacity:0;transition:opacity .15s ease}
.attente-barre::before{content:"";position:absolute;top:0;bottom:0;left:0;width:38%;background:var(--primary,#234b72);border-radius:0 3px 3px 0;animation:attente-barre 1.15s ease-in-out infinite}
.attente-voile{position:fixed;inset:0;z-index:99998;display:none;background:rgba(127,127,127,.22);background:color-mix(in srgb,var(--surface,#fff) 42%,transparent)}
.attente-pastille{position:fixed;left:50%;bottom:18px;z-index:100000;display:flex;align-items:center;gap:.65rem;width:max-content;max-width:min(520px,calc(100vw - 24px));box-sizing:border-box;padding:.72rem 1.05rem;border:1px solid var(--line,#cbd5e1);border-radius:999px;background:var(--surface,#fff);color:var(--text,#17202a);box-shadow:0 12px 36px rgba(15,23,42,.2);font-size:.88rem;font-weight:800;line-height:1.2;transform:translate(-50%,calc(100% + 40px));opacity:0;pointer-events:none;transition:transform .18s ease,opacity .18s ease}
.attente-tour{flex:0 0 1rem;width:1rem;height:1rem;box-sizing:border-box;border:2px solid var(--primary,#234b72);border-right-color:transparent;border-radius:50%;animation:attente-tour .75s linear infinite}
body.attente-leger .attente-barre,body.attente-active .attente-barre{opacity:1}
body.attente-active .attente-pastille{transform:translate(-50%,0);opacity:1}
body.attente-envoi .attente-voile{display:block}
/* V0.18.12.207 — AUCUN pointeur « occupé » (cursor:progress / wait) pendant l'attente : la roue de Windows suivait la souris et RESTAIT sur la page suivante tant que la souris ne bougeait pas (signalé par le concepteur après avoir validé une correction). La barre et la pastille disent l'attente. */
body.attente-patient .attente-voile{cursor:pointer}
html[data-theme="night"] .attente-pastille{box-shadow:0 14px 38px rgba(0,0,0,.38)}
@keyframes attente-barre{0%{transform:translateX(-100%)}100%{transform:translateX(265%)}}
@keyframes attente-tour{to{transform:rotate(360deg)}}
@media (max-width:700px){.attente-pastille{bottom:10px;padding:.62rem .85rem;font-size:.8rem}}
@media (prefers-reduced-motion:reduce){.attente-barre::before{animation:none;width:100%;opacity:.55;border-radius:0}.attente-tour{animation-duration:2s}.attente-pastille{transition:none}}
@media print{.attente{display:none!important}}
body.projection-mode .attente{display:none!important}
/* V0.18.12.201 — L'ATTENTE DITE PARTOUT : la barre fine paraît dès 120 ms (la pastille, à 300 ms) ; la page qui s'ouvre porte la même barre tant que <html> a la classe « ap-charge » (posée par le serveur, retirée par attente.js quand les scripts
   de la page ont tous eu leur tour). Elle n'apparaît qu'après 250 ms (une page rapide ne montre rien) et se retire seule après 8 s si le script ne le fait pas (JavaScript coupé, erreur). */
html.ap-charge::before{content:"";position:fixed;top:0;left:0;width:38%;height:3px;z-index:100001;pointer-events:none;background:var(--primary,#234b72);border-radius:0 3px 3px 0;opacity:0;animation:ap-charge-apparait .15s linear .25s forwards,attente-barre 1.15s ease-in-out infinite,ap-charge-fin .01s linear 8s forwards}
@keyframes ap-charge-apparait{to{opacity:1}}
@keyframes ap-charge-fin{to{opacity:0}}
@media (prefers-reduced-motion:reduce){html.ap-charge::before{width:100%;border-radius:0;animation:ap-charge-apparait .15s linear .25s forwards,ap-charge-fin .01s linear 8s forwards}}
@media print{html.ap-charge::before{display:none}}

/* V0.18.12.218 — un prérequis qui manque (une matière, une classe) se dit en haut du formulaire, avec le chemin pour le créer (constat 6 de l'audit « nouvel enseignant »). Jetons du thème seulement. */
.prerequis-manquant{grid-column:1/-1;margin:0 0 14px;padding:12px 14px;border-radius:10px;background:color-mix(in srgb,var(--primary) 8%,var(--surface));border:1px solid color-mix(in srgb,var(--primary) 30%,transparent);color:var(--text)}
.prerequis-manquant a{font-weight:750;white-space:nowrap}

/* V0.18.12.218 — un bouton d'IA que le compte ne peut pas utiliser : faux bouton grisé et la raison EN CLAIR à côté (constat 7 de l'audit « nouvel enseignant »). */
.ia-indisponible{display:inline-flex;flex-direction:column;align-items:flex-start;gap:4px;max-width:100%}
.ia-indisponible .is-disabled{opacity:.5;cursor:not-allowed;pointer-events:none}
.ia-indisponible-raison{max-width:36ch;line-height:1.3}

/* V0.18.12.226 — « ASSOCIER » (type `matching`). Deux colonnes : à gauche les éléments numérotés (dans l'ordre saisi), à droite les propositions mélangées et lettrées ; un point d'accroche face à face pour tracer
   au crayon sur la copie imprimée, et une ligne de réponses « 1 – … 2 – … ». L'application ne trace aucun trait : la hauteur des lignes dépend du texte. Les couleurs viennent des jetons du thème (le rouge de la
   correction est celui de --danger) ; une case, un numéro et une lettre se lisent sans la couleur. Ce que la version élève masque : .mt-corr (la lettre juste, rouge, visible pour l'enseignant ou une fois la
   correction révélée — même mécanisme que les tableaux et la frise : table-correction-revealed) à la place de .mt-vide (la case à remplir). */
.matching{margin:.3rem 0;max-width:100%;container-type:inline-size}
.mt-consigne{margin:0 0 10px;font-weight:700}
.mt-zone{display:grid;grid-template-columns:minmax(0,1fr) minmax(28px,.3fr) minmax(0,1fr);align-items:start}
.mt-g{grid-column:1}
.mt-d{grid-column:3}
/* « .matching » devant : la règle des listes d'un bloc (.rendered-block-content :is(ul,ol) : marges et retrait de 1,5 em) est plus spécifique que « .mt-g » seul ; la piste « minmax(0,1fr) » : sans elle, un mot long impose sa largeur à la colonne */
.matching .mt-g,.matching .mt-d{list-style:none;margin:0;padding:0;display:grid;gap:8px;grid-template-columns:minmax(0,1fr)}
.mt-l,.mt-r{display:flex;align-items:center;gap:8px;min-height:44px;padding:8px 10px;border:1px solid var(--line);border-radius:10px;background:var(--surface);break-inside:avoid}
.mt-texte{flex:1 1 auto;min-width:0;overflow-wrap:break-word}
.mt-num,.mt-lettre{flex:0 0 auto;display:inline-grid;place-items:center;min-width:1.8em;height:1.8em;box-sizing:border-box;border:2px solid var(--text);border-radius:50%;font-weight:800;font-size:.9em;line-height:1}
.mt-point{flex:0 0 auto;width:.75em;height:.75em;box-sizing:border-box;border:2px solid var(--text);border-radius:50%;background:var(--surface)}
.mt-reponses{display:flex;flex-wrap:wrap;align-items:baseline;gap:6px 16px;margin:12px 0 0}
.mt-rep-titre{color:var(--muted);font-size:.8em;font-weight:800;letter-spacing:.06em;text-transform:uppercase}
.mt-rep{display:inline-flex;align-items:baseline;gap:5px;white-space:nowrap}
.mt-rep-num{font-weight:700}
.mt-rep-num::after{content:" –"}
.mt-vide{display:none;min-width:2.4em;border-bottom:2px solid var(--text)}
.mt-corr{color:var(--danger);font-weight:800}
.course-view-student .rendered-matching:not(.table-correction-revealed) .mt-vide{display:inline-block}
.course-view-student .rendered-matching:not(.table-correction-revealed) .mt-corr{display:none}
body.projection-show-all-corrections .course-view-student .rendered-matching .mt-vide{display:none}
body.projection-show-all-corrections .course-view-student .rendered-matching .mt-corr{display:inline}
.mt-correction-actions{margin-top:8px}
.course-view-student .rendered-matching:not(.table-correction-revealed) .mt-sans-cases .mt-reponses{display:none}
body.projection-show-all-corrections .course-view-student .rendered-matching .mt-sans-cases .mt-reponses{display:flex}
/* l'apparition progressive de la correction (V.194.1) : une lettre après l'autre ; la règle est plus forte que celles qui masquent la correction à l'élève */
body.projection-mode .course-view-student .rendered-block[data-reveal-steps="2"] .mt-rep.reveal-corr-vue .mt-vide{display:none}
body.projection-mode .course-view-student .rendered-block[data-reveal-steps="2"] .mt-rep.reveal-corr-vue .mt-corr{display:inline}
body.projection-mode .course-view-student .rendered-block[data-reveal-steps="2"] .mt-correction-actions{display:none!important}
body.projection-mode .course-view-student .rendered-block[data-reveal-steps="2"] .mt-sans-cases .mt-reponses.reveal-corr-ouverte{display:flex}
/* V0.18.12.315 : la règle générale « .reveal-corr-ouverte{display:block!important} » (V.194.1, plus haut) s'applique aussi à la ligne des réponses dès la première lettre : elle perdait son « flex » et son écart (« 1 – c2 – d3 – b4 – a »). Une règle aussi forte, une classe de plus, la lui rend ; l'écart de 16 px vient de « .mt-reponses » */
body.projection-mode .course-view-student .rendered-block[data-reveal-steps="2"] .mt-reponses.reveal-corr-ouverte.reveal-corr-ouverte.reveal-corr-ouverte{display:flex!important}
/* un bloc ÉTROIT (un demi ou un tiers de rangée, un téléphone) : deux listes l'une sous l'autre (côte à côte, les mots se coupent ou les cartes se chevauchent), sans point d'accroche (on ne trace pas au crayon sur un
   écran) ; la requête de conteneur suit la largeur du BLOC, celle d'écran couvre un navigateur qui n'en a pas (et ne s'applique pas à l'impression) */
@container (max-width:420px){
  .mt-zone{grid-template-columns:minmax(0,1fr)}
  .mt-g,.mt-d{grid-column:1}
  .matching .mt-d{margin-top:16px}
  .mt-point{display:none}
}
@media screen and (max-width:560px){
  .mt-zone{grid-template-columns:minmax(0,1fr)}
  .mt-g,.mt-d{grid-column:1}
  .matching .mt-d{margin-top:16px}
  .mt-point{display:none}
}
@media print{
  .mt-l,.mt-r{border-color:#000;break-inside:avoid}
  .mt-zone,.mt-reponses{break-inside:avoid}
  .mt-vide{border-bottom-color:#000}
}
/* l'éditeur : la consigne, une paire par ligne, le mélange */
.block-editor-matching{display:grid;gap:14px;margin-top:12px}
.block-editor-matching.hidden{display:none!important}
.matching-data-input{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,"Liberation Mono",monospace;white-space:pre;tab-size:4;width:100%}
.matching-editor-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.matching-aide{font-size:.9rem}
.matching-aide>summary{cursor:pointer;color:var(--muted)}
.matching-aide ul{margin:.5rem 0 0;padding-left:1.2rem;display:grid;gap:4px}
@media (max-width:640px){
  .matching-editor-grid{grid-template-columns:minmax(0,1fr)}
}
/* fin V0.18.12.226 */
/* V0.18.12.229 — ASSISTANTS IA (MCP) : la page où l'on branche son assistant (Paramètres › Assistants IA) et la carte d'administration. Que des jetons du thème (aucune couleur en dur) ; une ligne de jeton
   inactive passe en gris atténué par la COULEUR, jamais par l'opacité (le texte garde son contraste). */
.admin-assistants .admin-identity-libre{display:grid;grid-template-columns:minmax(0,1fr);gap:8px;align-items:start;max-width:640px}
/* V0.18.12.288 — la carte « Sondages des élèves » : la même mise en page que celle des assistants IA (le bouton sous le texte, à 8 px, aligné à gauche ; l'explication en paragraphe, pas en gras dans l'étiquette) */
.admin-sondages .admin-identity-libre{display:grid;grid-template-columns:minmax(0,1fr);gap:8px;align-items:start;max-width:640px}
.assistants-etapes{display:grid;gap:6px;margin:8px 0 12px;padding-left:1.3rem}
.assistants-etapes li{max-width:70ch}
.assistants-adresse{overflow-wrap:anywhere;word-break:break-all}
.assistants-nouveau{border-left:4px solid var(--primary)}
.assistants-jeton-ligne{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:10px 0}
.assistants-jeton{flex:1 1 20rem;min-width:0;margin:0;font-family:ui-monospace,Consolas,monospace;font-size:.9rem}
.assistants-formulaire{display:grid;gap:10px;max-width:420px}
.assistants-formulaire label{display:grid;gap:4px;margin:0}
.assistants-formulaire input,.assistants-formulaire select{width:100%;margin:0}
.assistants-formulaire button{justify-self:start;margin:0}
.assistants-ligne{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;padding:10px 0;border-top:1px solid var(--line)}
.assistants-liste h2+.assistants-ligne{border-top:0}
.assistants-ligne-texte{display:grid;gap:2px;min-width:0}
.assistants-ligne.is-inactif strong{color:var(--muted)}
.assistants-revoquer,.assistants-revoquer button{margin:0}
.assistants-appels{display:grid;gap:6px;margin:0;padding:0;list-style:none;font-size:.92rem}
.assistants-appels li{overflow-wrap:anywhere}
.assistants-appels li.is-refuse{color:var(--muted)}
/* V0.18.12.322 — la carte « Les images de mes cours » : la case et sa phrase sur une ligne (la case garde sa taille : elle hérite sinon de input{width:100%}), le bouton À DISTANCE de l'aide, jetons du thème seulement */
.assistants-images-formulaire{display:grid;gap:16px;max-width:70ch}
.assistants-images-formulaire p{margin:0}
.assistants-images-case{display:flex;align-items:flex-start;gap:10px;margin:0;font-weight:400}
.assistants-images-case input{flex:0 0 auto;width:1.15rem;height:1.15rem;margin:.2em 0 0;padding:0}
.assistants-images-actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:4px}
.assistants-images-actions button{margin:0}
/* V0.18.12.271 — la page d'accord OAuth (/authorize : Claude demande à se brancher) et le journal de la connexion dans l'administration. Que des jetons du thème. */
.oauth-page{max-width:680px;margin:0 auto}
.oauth-carte h1{margin:4px 0 14px;font-size:1.45rem;line-height:1.25;text-wrap:balance}
.oauth-carte h2{margin:18px 0 6px;font-size:1.05rem}
.oauth-faits{display:grid;gap:8px;margin:0 0 6px}
.oauth-faits div{display:grid;grid-template-columns:minmax(0,11rem) minmax(0,1fr);gap:4px 12px}
.oauth-faits dt{color:var(--muted);font-weight:600}
.oauth-faits dd{margin:0;overflow-wrap:anywhere}
.oauth-droits{display:grid;gap:6px;margin:0 0 12px;padding-left:1.3rem}
.oauth-vigilance{margin:14px 0;padding:10px 12px;border-left:4px solid var(--primary);background:var(--surface)}
.oauth-formulaire{display:grid;gap:12px}
.oauth-formulaire label{display:grid;gap:4px;margin:0;max-width:320px}
.oauth-formulaire select{width:100%;margin:0}
.oauth-formulaire .oauth-remplacer{display:flex;align-items:flex-start;gap:8px;max-width:none}
.oauth-formulaire .oauth-remplacer input{width:auto;margin:.2em 0 0;flex:0 0 auto}
.oauth-formulaire .oauth-remplacer span{font-weight:400}
.oauth-actions{display:flex;flex-wrap:wrap;align-items:center;gap:10px}
.oauth-actions button,.oauth-actions p{margin:0}
.oauth-erreur h1{font-size:1.3rem}
.admin-oauth-journal{margin-top:10px}
.admin-oauth-journal summary{cursor:pointer;font-weight:600}
.admin-oauth-journal .assistants-appels{margin-top:8px}
@media (max-width:560px){.oauth-faits div{grid-template-columns:minmax(0,1fr)}}

/* V0.18.12.178 — LE BLOC CODE : numéros de ligne, lignes repérées, trous « [[…]] ». Sans réglage, le bloc n'a aucune de ces classes (rendu d'avant). Une ligne est un bloc (.code-ligne, sans retour à la ligne
   entre elles : le script de copie les joint) ; le numéro vient d'un compteur CSS, jamais du texte (il ne se copie pas). La ligne repérée a un fond ET un trait à gauche (une bordure s'imprime toujours,
   un fond seulement avec print-color-adjust). Les lignes vont d'un bord à l'autre du bloc (marges négatives égales au remplissage du <pre> : 16 px). */
.course-code-lignes .code-ligne{display:block;min-height:1.55em;margin:0 -16px;padding:0 16px 0 13px;border-left:3px solid transparent}
.course-code-numerote{counter-reset:code-ligne}
.course-code-numerote .code-ligne{counter-increment:code-ligne;position:relative;padding-left:calc(13px + 3em)}
.course-code-numerote .code-ligne::before{content:counter(code-ligne);position:absolute;left:10px;width:2em;text-align:right;opacity:.6;-webkit-user-select:none;user-select:none}
.course-code-lignes .code-ligne-repere{background:rgba(250,204,21,.16);border-left-color:#facc15}
/* Un trou : la réponse garde sa place (texte transparent, donc la largeur du trou est celle de la réponse), soulignée en pointillés. Elle n'est lisible qu'en version Enseignant, ou avec « toutes les corrections » en projection. */
.code-trou{display:inline-block;min-width:2.5ch;margin:0 .1em;padding:0 .15em;border-bottom:2px dotted currentColor}
.code-trou-reponse{color:transparent;-webkit-user-select:none;user-select:none}
.course-view-teacher .code-trou-reponse,
body.projection-mode.projection-show-all-corrections .course-view-student .code-trou-reponse{color:#fde68a;font-weight:700;-webkit-user-select:text;user-select:text}
.course-code-options{display:grid;gap:8px;margin-top:8px}
@media print{
  .course-code-block .code-ligne-repere{background:#fff3b0;border-left-color:#b45309;-webkit-print-color-adjust:exact;print-color-adjust:exact}
  .course-code-numerote .code-ligne::before{color:#444;opacity:1}
  .course-code-block .code-trou{border-bottom-color:#000}
  .course-view-teacher .course-code-block .code-trou-reponse{color:#7c2d12}
}

/* V0.18.12.179 — LE BLOC CODE GARDE SES COULEURS DANS TOUS LES THÈMES. Les thèmes Pétrole et Nuit donnent à tout « code » une couleur et un fond (themes.css : « body[data-theme="petrol"] code » — #174f55 sur #dcebec, spécificité 0,1,2) :
   dans le bloc Code, dont le fond est sombre dans tous les thèmes, le texte devenait vert foncé sur fond noir (contraste 1,9 sur 21 ; le concepteur, 18/10, thème Pétrole). Le préfixe « html body » (0,1,3) l'emporte sur ces règles
   sans dépendre de l'ordre des feuilles : même méthode que le code des évaluations (evaluations.css). */
html body .course-code-block code{background:none;color:inherit;padding:0;border:0;border-radius:0}

/* V0.18.12.180 — la fiche imprimable d'un exercice : la note pour l'enseignant et la mention d'origine (version enseignant seulement). */
.exercise-print-note{margin:8px 0 0;padding:8px 12px;border:1px solid var(--line);border-radius:8px;font-size:.92rem}
/* V0.18.12.309 — la pastille d'origine IA de la fiche d'un exercice : SANS le cadre de la note ci-dessus (une pastille seule dans un cadre pleine largeur faisait un cadre presque vide) ; mêmes marges. Elle s'imprime avec son fond violet (le texte est blanc : sans cette règle un navigateur qui retire les fonds à l'impression le rendrait invisible). */
.exercise-print-origine{margin:8px 0 0}
.exercise-print-origine .ai-origin-badge{-webkit-print-color-adjust:exact;print-color-adjust:exact}

/* V0.18.12.181 — LA COLORATION SYNTAXIQUE DU BLOC CODE (app/modules/code-highlight.php). Neuf types de jetons : c commentaire, s chaîne, n nombre, k mot-clé, b fonction ou constante connue, f nom défini,
   t balise, a attribut ou clé, v variable. Écran : le fond du bloc est SOMBRE dans tous les thèmes (#111827) ; chaque teinte a un contraste d'au moins 4,5 : 1 (l'essai le calcule). Impression : fond blanc,
   teintes foncées ; le commentaire est en italique et le mot-clé en gras, pour se distinguer aussi en noir et blanc. Une réponse de trou n'a jamais de jeton (texte uni : rien ne la rend lisible en version élève). */
.course-code-block .tk-c{color:#94a3b8;font-style:italic}
.course-code-block .tk-s{color:#86efac}
.course-code-block .tk-n{color:#fcd34d}
.course-code-block .tk-k{color:#c4b5fd;font-weight:700}
.course-code-block .tk-b{color:#7dd3fc}
.course-code-block .tk-f{color:#fde68a}
.course-code-block .tk-t{color:#fda4af}
.course-code-block .tk-a{color:#7dd3fc}
.course-code-block .tk-v{color:#fdba74}
@media print{
  .course-code-block .tk-c{color:#4b5563}
  .course-code-block .tk-s{color:#166534}
  .course-code-block .tk-n{color:#92400e}
  .course-code-block .tk-k{color:#5b21b6}
  .course-code-block .tk-b{color:#075985}
  .course-code-block .tk-f{color:#854d0e}
  .course-code-block .tk-t{color:#9f1239}
  .course-code-block .tk-a{color:#075985}
  .course-code-block .tk-v{color:#9a3412}
}

/* V0.18.12.184 — bloc Code « Exécutable » (Python) : barre de boutons, éditeur, sortie, réponse attendue par input(). Couleurs figées sur le fond sombre du bloc (comme le bloc Code lui-même, V.179) ;
   les règles de champ passent par « html body » pour l'emporter sur celles des thèmes (themes.css colore input et textarea). Contrastes calculés par tools/test-bloc-code-executable.php. */
.code-run{border-top:1px solid rgba(255,255,255,.14)}
.code-run [hidden],.course-code-block [hidden]{display:none!important}
.code-run-bar,.code-run-entree{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:8px 12px;background:#0b1220}
.code-run-bar .button,.code-run-entree .button{margin:0}
.code-run-etat{flex:1 1 12rem;min-width:0;font-size:.85rem;color:#cbd5e1;overflow-wrap:anywhere}
.code-run-etat.ok{color:#86efac}
.code-run-etat.erreur{color:#fda4af}
.code-run-etat.attention{color:#fde68a}
.course-code-block pre.code-run-sortie{padding:12px 16px;max-height:min(50vh,28rem);overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;background:#020617;color:#e5e7eb;border-top:1px solid rgba(255,255,255,.14)}
.code-run-sortie .code-run-err{color:#fda4af}
.code-run-entree label{display:flex;align-items:center;gap:8px;flex:1 1 14rem;min-width:0;font-size:.85rem;font-weight:700;color:#e5e7eb}
html body .code-run-entree input{flex:1;min-width:0;width:auto;margin:0;padding:8px 10px;border:1px solid #475569;border-radius:8px;background:#020617;color:#f8fafc;font:500 .92rem/1.4 ui-monospace,SFMono-Regular,Menlo,Consolas,"Liberation Mono",monospace}
/* V0.18.12.185 — l'éditeur COLORÉ : un calque (<pre>) sous le champ de texte, dans une grille d'UNE cellule (même taille, un seul défilement : celui de .code-run-ed). Le champ est transparent par-dessus :
   on tape dans le champ, on lit le calque (les couleurs tk-… du bloc Code). Même police, même interligne, mêmes marges pour les deux : sinon la couleur glisserait sous le texte tapé. */
.code-run-ed{display:grid;position:relative;min-height:7rem;max-height:min(70vh,38rem);overflow:auto;background:#111827}
.course-code-block .code-run-calque,html body .course-code-block textarea.code-run-editor{grid-area:1/1;box-sizing:border-box;margin:0;padding:16px;border:0;border-radius:0;font:500 .92rem/1.55 ui-monospace,SFMono-Regular,Menlo,Consolas,"Liberation Mono",monospace;font-variant-ligatures:none;letter-spacing:normal;word-spacing:normal;tab-size:4;white-space:pre;-webkit-text-size-adjust:100%;text-size-adjust:100%}
.course-code-block .code-run-calque{overflow:visible;pointer-events:none;background:transparent;color:#f8fafc}   /* pas de min-width:0 : sa ligne la plus longue élargit la cellule, donc le champ, et .code-run-ed défile */
html body .course-code-block textarea.code-run-editor{width:100%;height:100%;min-width:0;resize:none;overflow:hidden;outline:0;background:transparent;color:transparent;-webkit-text-fill-color:transparent;caret-color:#f8fafc}
html body .course-code-block textarea.code-run-editor::selection{background:rgba(125,211,252,.35);color:transparent;-webkit-text-fill-color:transparent}
.code-run-ed:focus-within{box-shadow:inset 0 0 0 2px #7dd3fc}
body.projection-mode.presentation-ui-v01447 .course-document .course-code-block textarea.code-run-editor{font-size:calc(.92rem * var(--projection-font-scale))}
body.projection-mode.presentation-ui-v01447 .course-document .code-run-etat,
body.projection-mode.presentation-ui-v01447 .course-document .code-run-entree label,
body.projection-mode.presentation-ui-v01447 .course-document .code-run-bar .button{font-size:calc(.85rem * var(--projection-font-scale))}
@media print{
  .code-run,.code-run-ed{display:none!important}
  .course-code-block > pre[hidden]{display:block!important}
}

/* V0.18.12.263 — la DOUBLE AUTHENTIFICATION : la page d'activation (QR code, code à six chiffres, codes de secours) et la carte de « Mon compte ». Les couleurs viennent des jetons du thème (rien en dur, hors le blanc du QR code,
   qui doit rester un blanc pour être lu) ; les cases à cocher reprennent leur taille propre (input{width:100%} les frappait). */
.totp-carte{max-width:620px}
.totp-carte h2{scroll-margin-top:calc(var(--app-topbar-height, 64px) + 18px)}
.totp-etapes{margin:12px 0 18px;padding-left:1.3rem;display:grid;gap:14px}
.totp-qr{display:inline-block;margin:12px 0 4px;padding:12px;background:#fff;border:1px solid var(--line);border-radius:12px;min-width:224px;min-height:224px;line-height:0}
.totp-qr canvas,.totp-qr img{max-width:100%;height:auto}
.totp-cle{display:inline-block;padding:2px 8px;border:1px solid var(--line);border-radius:6px;background:var(--surface);color:var(--text);font-size:1rem;letter-spacing:.06em;word-break:break-all}
.totp-formulaire{display:grid;gap:12px;max-width:360px}
.totp-formulaire label{margin:0}
.totp-code{font-size:1.4rem;letter-spacing:.18em;text-align:center;font-variant-numeric:tabular-nums}
.totp-case{display:flex;align-items:flex-start;gap:10px;margin:0 0 12px;line-height:1.35}
.totp-case input{width:auto;flex:0 0 auto;padding:0;margin:3px 0 0}
.totp-codes{list-style:none;margin:14px 0;padding:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:8px}
.totp-codes li{padding:8px 12px;border:1px solid var(--line);border-radius:8px;background:var(--surface)}
.totp-codes code{font-size:1.05rem;letter-spacing:.08em;color:var(--text);font-variant-numeric:tabular-nums}
.totp-tableau{max-width:100%;overflow-x:auto;margin:8px 0 14px}
.totp-appareils{width:100%;border-collapse:collapse;font-size:.92rem}
.totp-carte .muted a{color:var(--primary);text-decoration:underline}
.totp-case span,.entree-case span{font-weight:400}
.totp-appareils th,.totp-appareils td{padding:7px 5px;border-bottom:1px solid var(--line);text-align:left;vertical-align:middle}
.totp-appareils form{margin:0}
.totp-etat{display:inline-block;padding:2px 10px;border-radius:999px;border:1px solid var(--line);font-size:.85rem;font-weight:700}
.totp-etat.is-actif{color:var(--success);border-color:currentColor}
.totp-etat.is-inactif{color:var(--danger);border-color:currentColor}
/* V0.18.12.324 — LE NOM d'un appareil de confiance. Un champ facultatif sous la case « Se souvenir de cet appareil » (connexion avec code, activation) ; dans la liste de Mon compte, le nom passe devant et le libellé automatique
   (navigateur · système) reste derrière, atténué ; le formulaire « Renommer » est sous eux. Couleurs : jetons du thème seulement (rien en dur). Jusqu'à 640 px chaque appareil devient un petit bloc : la ligne de tableau, trop large,
   défilait de côté et cachait « Retirer ». */
.totp-nom-appareil{margin:0}
.totp-nom-appareil label{margin:0 0 6px}
.totp-nom-appareil input{margin:0}
.totp-nom-appareil p{margin:6px 0 0;font-size:.85rem;line-height:1.35}
.entree-cumpari .entree-boite .totp-nom-appareil{margin:0 0 14px}
.entree-cumpari .entree-boite .totp-nom-appareil label{margin:0 0 6px;font-size:.92rem}
.totp-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.totp-appareil-nom{display:block;overflow-wrap:anywhere}
.totp-appareil-auto{display:block;font-size:.85rem;overflow-wrap:anywhere}
.totp-appareils td:first-child{overflow-wrap:anywhere}
.totp-appareils td:first-child form{display:flex;flex-wrap:wrap;align-items:stretch;gap:10px;margin:10px 0 2px}
.totp-appareils td:first-child input{flex:1 1 6.5rem;width:auto;min-width:0;margin:0;padding:7px 10px;font-size:.9rem}
.totp-appareils td:first-child button{margin:0;padding:7px 12px;font-size:.9rem}
.totp-legende{display:none}
.totp-aide-appareils{max-width:560px;font-size:.88rem;line-height:1.4}
@media (pointer:coarse){.totp-appareils td:first-child input,.totp-appareils td:first-child button{min-height:44px}}
@media (max-width:640px){
  .totp-tableau{overflow-x:visible}
  .totp-appareils thead{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
  .totp-appareils,.totp-appareils tbody,.totp-appareils tr,.totp-appareils td{display:block;width:100%}
  .totp-appareils tr{padding:12px 0;border-bottom:1px solid var(--line)}
  .totp-appareils td{padding:3px 0;border-bottom:0}
  .totp-legende{display:inline;color:var(--muted)}
  .totp-appareils td:last-child{padding-top:10px}
}
@media print{
  .totp-carte .button-row,.totp-carte form,.hero .button{display:none!important}
}

/* V0.18.12.304.1 — LA BARRE DE MISE EN FORME TIENT DANS LA LARGEUR (chapitre, séance, import). Ses quinze commandes demandent 1 220 px, plus l'état « Sélectionnez un texte modifiable » (≈ 190 px) et un remplissage qui suit la colonne de 1 180 px :
   entre 921 et ≈ 1 700 px (une tablette en paysage, un portable) elle débordait de la page, et Chrome dézoomait toute la page pour la montrer. Dans cette plage : remplissage réduit et commandes qui passent à la ligne (deux rangées au plus). Jusqu'à 920 px, la règle
   plus haut (défilement horizontal de la barre seule) ne change pas. La hauteur réelle est relue par application.js (--wysiwyg-toolbar-height). */
@media (min-width:921px) and (max-width:1760px){
  .wysiwyg-toolbar{padding:6px 16px}
  .wysiwyg-toolbar .toolbar-controls{flex-wrap:wrap;row-gap:6px}
}

/* V0.18.12.338.1 — LISERÉ « BLOC RÉSERVÉ À L'ENSEIGNANT » (aperçus du cours : séance ET chapitre, version enseignant seulement, à l'écran seulement). La vue Enseignant montre tout : on ne voyait pas quels BLOCS la classe ne verra pas.
   Un liseré rouge (le --danger du thème), à gauche, marque chaque bloc ou titre ABSENT de la version élève (visibilité « Enseignant seulement » : remarque enseignant, correction, ou tout bloc réglé ainsi). Les blocs communs n'en ont pas (décision du
   concepteur) ; les corrections posées DANS un bloc commun (cadre « Correction : … », cases d'un tableau) restent signalées par leur rouge, rien n'y est ajouté. Un bloc : une barre de 3 px dans la marge, collée à son bord gauche (box-shadow : ni largeur,
   ni bordure de type, ni pseudo-élément n'en dépendent) ; un titre, plus bas qu'un bloc (pas de remplissage vertical), a une barre moins retirée en haut et en bas. Un bloc sans cadre propre se décale de 8 px vers la gauche et se remplit d'autant : son texte ne bouge pas (sinon la barre toucherait la première lettre) ; les types à cadre gardent leur remplissage.
   Portée : les deux pages d'aperçu seulement (data-page) ; la page d'impression, la rétroprojection élève et la version élève ne changent pas. Aucun raccourci border/margin/padding : la bordure de type d'un bloc (definition, key_point…) n'est pas écrasée. */
@media screen{
  body:is([data-page="session_preview"],[data-page="chapter_preview"]) .course-view-teacher{--repere-reserve:var(--danger)}
  body:is([data-page="session_preview"],[data-page="chapter_preview"]) .course-view-teacher .rendered-block.teacher-only{box-shadow:-12px 0 0 -9px var(--repere-reserve)}
  body:is([data-page="session_preview"],[data-page="chapter_preview"]) .course-view-teacher :is(.course-heading.heading-reserve,.course-heading-body.heading-reserve){box-shadow:-5px 0 0 -2px var(--repere-reserve)}
  body:is([data-page="session_preview"],[data-page="chapter_preview"]) .course-view-teacher :is(.rendered-block.teacher-only:not(.rendered-activity,.rendered-chapter_summary,.rendered-definition,.rendered-document,.rendered-dossier,.rendered-exercise,.rendered-formula,.rendered-key_point,.rendered-learning_objective,.rendered-official_objectives,.rendered-summary,.rendered-transition,.rendered-written_trace),.course-heading.heading-reserve,.course-heading-body.heading-reserve){margin-left:-8px;padding-left:8px}
  /* la légende (course_legende_enseignant_v0123381) : le même repère, en petit, devant la phrase (un élément, pas un pseudo-élément : tools/test-bloc-code.php n'admet aucun texte généré de plus après son repère de la feuille) */
  .document-version-legende{display:flex;align-items:center;gap:8px;margin:4px 0 0}
  .document-version-legende .repere-reserve{flex:none;width:3px;height:1.1em;background:var(--repere-reserve,var(--danger))}
}
