/* Un élément masqué par le site (attribut hidden) reste masqué, quel que soit son style. */
[hidden] { display: none !important; }

/* ==========================================================
   Espace TIM — feuille de style
   Plateforme de travail sobre : menu latéral, typographie IBM Plex,
   une couleur discrète par classe. Mode sombre automatique.
   ========================================================== */

/* Identité MBCODE : graphite + vert acide, titres Space Grotesk,
   effets 3D discrets. Thème sombre par défaut, clair si l'appareil le demande. */
:root {
  --fond: #111318;
  --surface: #171a21;
  --surface-2: #1f232c;
  --texte: #eceee8;
  --texte-doux: #9ca3af;
  --bord: #272c36;
  --bord-fort: #383e4b;
  --primaire: #c6f432;          /* vert acide MBCODE */
  --primaire-texte: #c6f432;    /* même couleur, utilisée pour du texte */
  --sur-primaire: #14161b;
  --primaire-clair: rgb(198 244 50 / .1);
  --lien: #c6f432;
  --c1: #38d39f;   /* 2nde SAPAT */
  --c2: #ff9a4d;   /* Terminale SAPAT */
  --c3: #82a7ff;   /* BTSA DATR */
  --exemple: #f5c451; --exemple-fond: rgb(245 196 81 / .1); --exemple-bord: rgb(245 196 81 / .35);
  --attention: #ff7a66; --attention-fond: rgb(255 122 102 / .1);
  --ombre-3d: 0 1px 0 rgb(255 255 255 / .04) inset, 0 18px 40px -18px rgb(0 0 0 / .7);
  --rayon: 10px;
  --menu-largeur: 260px;
  --entete-hauteur: 64px;
  --police: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --titre: "Space Grotesk", "IBM Plex Sans", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --accent: var(--primaire);
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --fond: #f3f4ef;
    --surface: #ffffff;
    --surface-2: #eceee7;
    --texte: #14161b;
    --texte-doux: #5b616c;
    --bord: #dfe2da;
    --bord-fort: #c7cbc0;
    --primaire: #c6f432;
    --primaire-texte: #4a6400;
    --primaire-clair: rgb(198 244 50 / .28);
    --lien: #3f5a00;
    --c1: #0f8a63;
    --c2: #c25a14;
    --c3: #3157c9;
    --exemple: #8a5a00; --exemple-fond: #fdf4dc; --exemple-bord: #ecd59a;
    --attention: #b3341c; --attention-fond: #fcece8;
    --ombre-3d: 0 18px 36px -20px rgb(20 22 27 / .35);
    color-scheme: light;
  }
}
.classe--c1 { --accent: var(--c1); }
.classe--c2 { --accent: var(--c2); }
.classe--c3 { --accent: var(--c3); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--police); font-size: 1rem; line-height: 1.6; color: var(--texte); background: var(--fond); }
img, iframe { max-width: 100%; }
a { color: var(--lien); text-underline-offset: .18em; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--lien); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--titre); line-height: 1.15; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.02em; }
h1 { font-size: clamp(1.7rem, 4vw, 2.25rem); font-weight: 700; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.1rem; }
.icone-pixel { width: 16px; height: 16px; flex: none; }
.visuellement-cache { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.lien-evitement { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 100; border: 1px solid var(--bord); }
.lien-evitement:focus { left: 8px; }
.puce { display: inline-block; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); flex: none; }
.puce--grande { width: 12px; height: 12px; margin-right: 10px; vertical-align: .05em; }

/* ---------- En-tête ---------- */
.entete { position: sticky; top: 0; z-index: 40; height: var(--entete-hauteur); display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 16px; background: var(--surface); border-bottom: 1px solid var(--bord); }
.marque { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--texte); min-width: 0; }
.marque__texte { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.marque__texte strong { font-family: var(--titre); font-size: 1.25rem; letter-spacing: -.02em; }
.marque__texte strong span { color: var(--texte-doux); font-weight: 500; }
.logo { flex: none; transition: transform .3s ease; }
.marque:hover .logo { transform: rotate(-8deg) scale(1.05); }
.marque__texte small b { color: var(--primaire-texte); font-weight: 600; }
.marque__texte small { font-size: .78rem; color: var(--texte-doux); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.entete .marque { margin-right: auto; }
.compte-lien { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 8px; border: 1px solid var(--bord-fort); color: var(--texte); text-decoration: none; font-weight: 500; font-size: .9rem; white-space: nowrap; }
.compte-lien:hover { border-color: var(--primaire); color: var(--texte); }
@media (max-width: 480px) { .compte-lien span { display: none; } .marque__texte small { display: none; } }
.menu-bouton { display: inline-flex; align-items: center; gap: 8px; font: 500 .9rem var(--police); padding: 7px 12px; border: 1px solid var(--bord-fort); border-radius: 6px; background: var(--surface); color: var(--texte); cursor: pointer; }
.menu-bouton__icone, .menu-bouton__icone::before, .menu-bouton__icone::after { display: block; width: 16px; height: 2px; background: currentColor; position: relative; }
.menu-bouton__icone::before, .menu-bouton__icone::after { content: ""; position: absolute; left: 0; }
.menu-bouton__icone::before { top: -5px; }
.menu-bouton__icone::after { top: 5px; }

/* ---------- Cadre : menu latéral + contenu ---------- */
.cadre { display: block; }
.menu { background: var(--surface); border-bottom: 1px solid var(--bord); padding: 12px 12px 20px; }
.js .menu[data-ferme] { display: none; }
.menu__titre { margin: 18px 10px 6px; font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--texte-doux); }
.menu__liste { list-style: none; margin: 0; padding: 0; }
.menu__lien { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 6px; color: var(--texte); text-decoration: none; font-weight: 500; font-size: .95rem; }
.menu__lien .icone-pixel { color: var(--texte-doux); }
.menu__lien:hover { background: var(--surface-2); }
.menu__lien[aria-current="page"], .menu__lien[data-actif] { background: var(--primaire-clair); color: var(--texte); font-weight: 600; box-shadow: inset 3px 0 0 var(--primaire); }
.menu__lien[aria-current="page"] .icone-pixel, .menu__lien[data-actif] .icone-pixel { color: var(--primaire-texte); }
.menu__lien--classe[aria-current="page"], .menu__lien--classe[data-actif] { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--texte); box-shadow: inset 3px 0 0 var(--accent); }

.principal { min-width: 0; padding: 0 16px; }
@media (min-width: 1000px) {
  .menu-bouton { display: none; }
  .cadre { display: grid; grid-template-columns: var(--menu-largeur) minmax(0, 1fr); background: linear-gradient(90deg, var(--surface) calc(var(--menu-largeur) - 1px), var(--bord) calc(var(--menu-largeur) - 1px), var(--bord) var(--menu-largeur), transparent var(--menu-largeur)); min-height: calc(100vh - var(--entete-hauteur)); }
  .menu, .js .menu[data-ferme] { display: block; position: sticky; top: var(--entete-hauteur); height: calc(100vh - var(--entete-hauteur)); overflow-y: auto; border-bottom: 0; border-right: 1px solid var(--bord); padding: 16px 14px; }
  .principal { padding: 0 48px; max-width: 1080px; }
  .entete { padding: 0 24px; }
}

/* ---------- Têtes de page ---------- */
.tete { padding: 32px 0 24px; border-bottom: 1px solid var(--bord); }
.tete--accueil { padding-top: 48px; padding-bottom: 32px; }
.tete__surtitre { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-family: var(--mono); font-size: .8rem; font-weight: 500; color: var(--accent); text-transform: uppercase; letter-spacing: .04em; }
.tete__texte { margin: 0; max-width: 62ch; font-size: 1.08rem; color: var(--texte-doux); }
.fil { display: flex; flex-wrap: wrap; gap: 8px; font-size: .85rem; color: var(--texte-doux); margin-bottom: 16px; }
.fil a { color: var(--texte-doux); }
.tete--article { border-bottom: 0; padding-bottom: 8px; }
.tete--article h1 { max-width: 28ch; }
.fiche { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 20px 0 0; padding: 14px 0; border-top: 1px solid var(--bord); border-bottom: 1px solid var(--bord); }
.fiche div { display: flex; flex-direction: column; }
.fiche dt { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--texte-doux); }
.fiche dd { margin: 0; display: flex; align-items: center; gap: 8px; font-weight: 500; }

.onglets-page { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--bord); scrollbar-width: none; }
.onglets-page a { flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 12px 12px; color: var(--texte-doux); text-decoration: none; font-weight: 500; font-size: .95rem; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.onglets-page a:hover { color: var(--texte); border-bottom-color: var(--bord-fort); }
.compteur { font-family: var(--mono); font-size: .75rem; padding: 0 6px; border-radius: 4px; background: var(--surface-2); color: var(--texte-doux); border: 1px solid var(--bord); }

/* ---------- Sections ---------- */
.section { padding: 32px 0 4px; scroll-margin-top: calc(var(--entete-hauteur) + 12px); }
.section__entete { margin-bottom: 14px; }
.section__entete h2 { margin: 0; display: flex; align-items: center; }
.section__entete p { margin: 2px 0 0; color: var(--texte-doux); font-size: .95rem; }
.vide { margin: 0; padding: 14px 16px; border: 1px dashed var(--bord-fort); border-radius: var(--rayon); color: var(--texte-doux); font-size: .95rem; }

/* ---------- Classes (accueil) ---------- */
.classes { list-style: none; margin: 0; padding: 0; perspective: 900px; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.classe__lien {
  position: relative; display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 22px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 9%, var(--surface)) 0%, var(--surface) 55%);
  border: 1px solid var(--bord); border-radius: 14px; color: var(--texte); text-decoration: none;
  box-shadow: var(--ombre-3d); transform-style: preserve-3d;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .25s ease, border-color .2s;
}
.classe__lien::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: radial-gradient(circle at var(--gx, 50%) var(--gy, 0%), rgb(255 255 255 / .09), transparent 55%); opacity: 0; transition: opacity .2s; }
.classe__lien::after { content: ""; position: absolute; left: 22px; top: 0; width: 44px; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent); }
.classe__lien:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--bord)); color: var(--texte); }
.classe__lien:hover::before { opacity: 1; }
.classe__lien > * { transform: translateZ(24px); }
.classe__niveau { font-size: .8rem; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: .05em; }
.classe__nom { font-family: var(--titre); font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; }
.classe__texte { color: var(--texte-doux); font-size: .93rem; }
.classe__stats { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; margin: 14px 0 6px; padding-top: 12px; border-top: 1px solid var(--bord); font-size: .88rem; color: var(--texte-doux); }
.classe__stats strong { font-family: var(--mono); font-weight: 500; color: var(--texte); margin-right: 4px; }
.classe__ouvrir { margin-top: auto; padding-top: 6px; font-weight: 600; font-size: .92rem; color: var(--accent); }

/* ---------- Listes de contenus ---------- */
.liste { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon); overflow: hidden; box-shadow: var(--ombre-3d); }
.ligne + .ligne { border-top: 1px solid var(--bord); }
.ligne__lien { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; padding: 14px 16px; color: var(--texte); text-decoration: none; }
.ligne__lien:hover { background: var(--surface-2); }
.ligne__lien:hover .ligne__icone { color: var(--accent); border-color: var(--accent); transform: translateY(-2px) rotate(-6deg); }
.ligne__icone { transition: transform .2s, color .2s, border-color .2s; }
.ligne__lien:hover .ligne__titre { color: var(--texte); text-decoration: underline; text-underline-offset: .18em; }
.ligne__icone { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 6px; background: var(--surface-2); color: var(--texte-doux); border: 1px solid var(--bord); }
.ligne__corps { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ligne__titre { font-weight: 600; }
.ligne__texte { color: var(--texte-doux); font-size: .93rem; }
.ligne__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ligne__meta { grid-column: 2; display: flex; align-items: center; gap: 10px; font-size: .85rem; color: var(--texte-doux); }
.ligne__duree { font-family: var(--mono); font-size: .8rem; }
@media (min-width: 700px) {
  .ligne__lien { grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; }
  .ligne__meta { grid-column: auto; }
}
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 500; padding: 1px 8px; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--bord); color: var(--texte-doux); }
.tag--exemple { background: var(--exemple-fond); border-color: var(--exemple-bord); color: var(--exemple); }

/* ---------- Outils ---------- */
.outils { list-style: none; margin: 0 0 1.5em; padding: 0; background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon); }
.outil { display: grid; gap: 2px 20px; padding: 14px 16px; }
.outil + .outil { border-top: 1px solid var(--bord); }
.outil__nom { font-weight: 600; }
.outil__texte { color: var(--texte-doux); font-size: .95rem; }
.outil a { font-size: .9rem; white-space: nowrap; }
@media (min-width: 700px) { .outil { grid-template-columns: 11rem 1fr auto; align-items: baseline; } }

/* ---------- Article ---------- */
.article { max-width: 760px; }
.avertissement { margin: 20px 0 0; padding: 10px 14px; border-radius: var(--rayon); background: var(--exemple-fond); border: 1px solid var(--exemple-bord); font-size: .92rem; }
.avertissement strong { color: var(--exemple); }
.prose { padding: 12px 0; font-size: 1.05rem; line-height: 1.7; }
.prose--large > :not(.editeur):not(.outils) { max-width: 760px; }
.prose h2 { margin-top: 1.8em; font-size: 1.35rem; }
.prose h3 { margin-top: 1.4em; }
.prose p, .prose ul, .prose ol { margin: 0 0 1em; }
.prose li { margin-bottom: .3em; }
.prose code { font-family: var(--mono); font-size: .88em; background: var(--surface-2); padding: 1px 5px; border-radius: 4px; border: 1px solid var(--bord); }
.prose pre { background: var(--surface-2); padding: 14px 16px; overflow-x: auto; border-radius: var(--rayon); border: 1px solid var(--bord); }
.prose pre code { border: 0; padding: 0; background: none; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.2em; display: block; overflow-x: auto; font-size: .95rem; }
.prose th, .prose td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--bord); vertical-align: top; }
.prose th { font-weight: 600; background: var(--surface-2); border-bottom-color: var(--bord-fort); }
.prose blockquote { margin: 0 0 1em; padding: 4px 0 4px 16px; border-left: 3px solid var(--bord-fort); color: var(--texte-doux); }
.prose details { background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 10px 14px; margin: 0 0 8px; }
.prose summary { cursor: pointer; font-weight: 600; }
.prose details[open] summary { margin-bottom: 8px; }
.note { color: var(--texte-doux); font-size: .93rem; font-style: italic; }

/* Encadrés : {: .objectifs } / {: .attention } / {: .astuce } sous un paragraphe */
.objectifs, .attention, .astuce { padding: 14px 16px; border-radius: var(--rayon); margin: 0 0 1.2em; border: 1px solid var(--bord); border-left-width: 4px; background: var(--surface); }
.objectifs { border-left-color: var(--primaire); }
.objectifs::before { color: var(--primaire-texte) !important; }
.objectifs::before { content: "Objectifs de la séance"; display: block; font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--primaire); margin-bottom: 4px; }
.attention { border-left-color: var(--attention); background: var(--attention-fond); border-color: transparent; border-left-color: var(--attention); }
.attention strong:first-child { color: var(--attention); }
.astuce { border-left-color: var(--c3); }
.objectifs > :last-child, .attention > :last-child, .astuce > :last-child { margin-bottom: 0; }
.retour { margin: 28px 0 0; font-size: .95rem; }

/* ---------- Boutons (effet touche en relief) ---------- */
.bouton { display: inline-flex; align-items: center; gap: 6px; font: 600 .95rem var(--titre); padding: 10px 16px; border-radius: 8px; border: 1px solid transparent; background: var(--primaire); color: var(--sur-primaire, #14161b); text-decoration: none; cursor: pointer; box-shadow: 0 4px 0 #7f9e14; transform: translateY(0); transition: transform .08s, box-shadow .08s; }
.bouton:hover { color: #14161b; filter: brightness(1.05); }
.bouton:active { transform: translateY(3px); box-shadow: 0 1px 0 #7f9e14; }
.bouton--petit { padding: 6px 11px; font-size: .85rem; box-shadow: 0 3px 0 #7f9e14; }
.bouton--discret { background: var(--surface-2); color: var(--texte); border-color: var(--bord-fort); box-shadow: 0 4px 0 var(--bord-fort); }
.bouton--discret:hover { color: var(--texte); background: var(--surface); }
.bouton--discret:active { box-shadow: 0 1px 0 var(--bord-fort); }
.bouton--petit.bouton--discret { box-shadow: 0 3px 0 var(--bord-fort); }

/* ---------- Bac à sable ---------- */
.editeur { border: 1px solid var(--bord); border-radius: var(--rayon); overflow: hidden; background: var(--surface); margin: 0 0 1.5em; }
.editeur__barre { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; padding: 8px; border-bottom: 1px solid var(--bord); background: var(--surface-2); }
.onglets { display: flex; gap: 2px; }
.onglets button { font: 500 .85rem var(--mono); padding: 6px 12px; border-radius: 5px; border: 1px solid transparent; background: transparent; color: var(--texte-doux); cursor: pointer; }
.onglets button[aria-selected="true"] { background: var(--surface); border-color: var(--bord); color: var(--texte); }
.editeur__actions { display: flex; flex-wrap: wrap; gap: 6px; }
.editeur__corps { display: grid; grid-template-columns: 1fr; }
.editeur__code textarea { display: block; width: 100%; min-height: 280px; resize: vertical; border: 0; padding: 14px 16px; font-family: var(--mono); font-size: .88rem; line-height: 1.6; background: var(--surface); color: var(--texte); tab-size: 2; }
.editeur__code textarea[hidden] { display: none; }
.editeur__code textarea:focus-visible { outline-offset: -2px; border-radius: 0; }
.editeur__rendu { border-top: 1px solid var(--bord); background: #fff; }
.editeur__rendu iframe { display: block; width: 100%; height: 320px; border: 0; background: #fff; }
.editeur__auto { display: flex; align-items: center; gap: 8px; padding: 8px 12px; font-size: .85rem; color: var(--texte-doux); border-top: 1px solid var(--bord); }
@media (min-width: 1200px) {
  .editeur__corps { grid-template-columns: 1fr 1fr; }
  .editeur__rendu { border-top: 0; border-left: 1px solid var(--bord); }
  .editeur__code textarea { min-height: 400px; }
  .editeur__rendu iframe { height: 100%; min-height: 400px; }
}

/* ---------- Pied de page ---------- */
.pied { margin-top: 56px; padding: 20px 0 32px; border-top: 1px solid var(--bord); color: var(--texte-doux); font-size: .85rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; }
.pied p { margin: 0; }
.pied__marque { font-family: var(--titre); font-weight: 700; color: var(--texte); }
.pied__marque span { color: var(--texte-doux); font-weight: 500; }
.pied__code { font-family: var(--mono); font-size: .78rem; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ---------- Accueil : écran d'ouverture avec cube 3D ---------- */
.une { position: relative; display: grid; gap: 24px; align-items: center; padding: 40px 0 36px; border-bottom: 1px solid var(--bord); overflow: hidden; }
@media (min-width: 860px) { .une { grid-template-columns: minmax(0, 1.25fr) minmax(260px, .75fr); padding: 56px 0 48px; } }
.une__invite { font-family: var(--mono); font-size: .9rem; color: var(--primaire-texte); margin: 0 0 14px; }
.curseur { display: inline-block; width: .6em; height: 1.05em; margin-left: 3px; vertical-align: -.18em; background: var(--primaire); animation: clignote 1.1s steps(1) infinite; }
@keyframes clignote { 50% { opacity: 0; } }
.une__titre { font-size: clamp(1.6rem, 3.6vw, 2.4rem); line-height: 1.12; margin-bottom: 18px; max-width: 22ch; font-weight: 600; color: var(--texte-doux); }
.une__titre em { font-style: normal; font-weight: 700; color: var(--primaire-texte); }
.une__titre em:first-child, .une__titre > em { }
.sigle { display: block; font-size: clamp(4.5rem, 12vw, 8rem); line-height: .9; font-weight: 700; letter-spacing: -.04em; color: var(--texte); margin-bottom: 10px; }
.une__titre { --t-first: var(--primaire-texte); }
.une__texte { margin: 0 0 24px; max-width: 54ch; font-size: 1.1rem; color: var(--texte-doux); }
.une__actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 0; }

.une__scene { position: relative; height: 280px; }
@media (min-width: 860px) { .une__scene { height: 360px; } }
.une__toile { position: absolute; inset: 0; width: 100%; height: 100%; }
.une__legende { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; display: flex; justify-content: center; gap: 18px; font-family: var(--mono); font-size: .75rem; color: var(--texte-doux); }
.une__legende span::before { content: "● "; color: var(--primaire-texte); }
.une__sol {
  position: absolute; left: -10%; right: -10%; bottom: -20px; height: 160px;
  background-image: linear-gradient(var(--bord-fort) 1px, transparent 1px), linear-gradient(90deg, var(--bord-fort) 1px, transparent 1px);
  background-size: 32px 32px; transform: rotateX(72deg); transform-origin: bottom;
  mask-image: linear-gradient(to top, #000 10%, transparent 85%); -webkit-mask-image: linear-gradient(to top, #000 10%, transparent 85%);
  opacity: .7;
}
.cube {
  --t: 64px; position: relative; width: calc(var(--t) * 2); height: calc(var(--t) * 2); transform-style: preserve-3d; z-index: 1;
  transform: rotateX(calc(-24deg + var(--souris-y, 0deg))) rotateY(calc(-38deg + var(--souris-x, 0deg)));
  transition: transform .4s ease-out; animation: flotte 5s ease-in-out infinite;
}
@media (min-width: 860px) { .cube { --t: 78px; } }
@keyframes flotte { 50% { translate: 0 -10px; } }
.cube__face { position: absolute; inset: 0; display: grid; place-items: center; border: 1px solid rgb(0 0 0 / .25); font-family: var(--titre); font-weight: 700; font-size: calc(var(--t) * 1.1); line-height: 1; backface-visibility: hidden; }
.cube__face--avant  { transform: translateZ(var(--t)); background: #2a2e37; color: var(--primaire); }
.cube__face--droite { transform: rotateY(90deg) translateZ(var(--t)); background: #3a404c; color: #f2f4ef; }
.cube__face--haut   { transform: rotateX(90deg) translateZ(var(--t)); background: var(--primaire); color: #14161b; font-family: var(--mono); font-size: calc(var(--t) * .62); }
.cube__face--arriere { transform: rotateY(180deg) translateZ(var(--t)); background: #2a2e37; }
.cube__face--gauche { transform: rotateY(-90deg) translateZ(var(--t)); background: #3a404c; }
.cube__face--bas    { transform: rotateX(-90deg) translateZ(var(--t)); background: #1c1f26; }
@media (prefers-reduced-motion: reduce) { .cube, .curseur { animation: none; } .classe__lien { transform: none !important; } }

/* Trois cubes T · I · M */
.cubes { display: flex; gap: 18px; align-items: flex-end; transform-style: preserve-3d; z-index: 1; }
.cubes .cube { --t: 36px; }
.cubes .cube--2 { animation-delay: -1.6s; }
.cubes .cube--3 { animation-delay: -3.2s; }
@media (min-width: 860px) { .cubes .cube { --t: 44px; } .cubes { gap: 22px; } }
.cubes .cube__face--avant { font-size: calc(var(--t) * 1.25); }
.cubes .cube--2 .cube__face--avant { color: #f2f4ef; }

/* Domaines du TIM */
.domaines { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); perspective: 900px; }
.domaine {
  position: relative; margin: 0; padding: 18px 18px 16px; background: var(--surface); border: 1px solid var(--bord); border-radius: 12px; box-shadow: var(--ombre-3d);
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .25s ease, border-color .2s;
}
.domaine:hover { border-color: color-mix(in srgb, var(--primaire) 50%, var(--bord)); }
.domaine__code { display: inline-block; font-family: var(--mono); font-size: .8rem; font-weight: 500; color: var(--primaire-texte); background: var(--primaire-clair); padding: 1px 8px; border-radius: 5px; margin-bottom: 10px; }
.domaine__code span { opacity: .6; }
.domaine__nom { font-size: 1.12rem; margin: 0 0 4px; }
.domaine__texte { margin: 0; color: var(--texte-doux); font-size: .93rem; line-height: 1.55; }

/* ---------- Connexion et espace élève ---------- */
.connexion { display: grid; place-items: center; padding: 48px 0; }
.connexion__carte { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--bord); border-radius: 14px; padding: 28px; box-shadow: var(--ombre-3d); }
.connexion__texte, .connexion__aide { color: var(--texte-doux); font-size: .95rem; }
.connexion__aide { margin: 18px 0 0; }
.formulaire { display: grid; gap: 6px; margin-top: 18px; }
.formulaire label { font-weight: 600; font-size: .9rem; margin-top: 8px; }
.formulaire input { font: inherit; font-size: 16px; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--bord-fort); background: var(--fond); color: var(--texte); }
.formulaire input:focus-visible { outline: 2px solid var(--primaire); outline-offset: 1px; }
.formulaire input:disabled { opacity: .6; }
.formulaire .bouton { margin-top: 16px; justify-content: center; }
.formulaire .bouton:disabled { opacity: .6; cursor: not-allowed; }
.formulaire__message { margin: 8px 0 0; padding: 10px 12px; border-radius: 8px; background: var(--attention-fond); color: var(--texte); font-size: .92rem; }
.espace__actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0 0; }
.notes { display: block; width: 100%; font: 16px/1.6 var(--police); padding: 14px 16px; border-radius: 10px; border: 1px solid var(--bord-fort); background: var(--surface); color: var(--texte); resize: vertical; }
.notes__etat { min-height: 1.4em; margin: 6px 0 0; color: var(--texte-doux); font-size: .85rem; }

.menu__deconnexion { width: 100%; margin-top: 18px; border: 0; background: none; font: inherit; font-weight: 500; font-size: .95rem; color: var(--texte-doux); cursor: pointer; text-align: left; }

/* ---------- Porte d'entrée : page de connexion ---------- */
.porte-page { min-height: 100vh; background: #0c0e12; color: #eceee8; }
@media (prefers-color-scheme: light) { .porte-page { background: #0c0e12; color: #eceee8; } }
.porte { display: grid; min-height: 100vh; grid-template-columns: 1fr; }
@media (min-width: 960px) { .porte { grid-template-columns: minmax(0, 1.35fr) minmax(400px, .9fr); } }
.porte__scene { position: relative; min-height: 300px; overflow: hidden; background:
  radial-gradient(ellipse at 40% 45%, rgb(198 244 50 / .10), transparent 60%),
  radial-gradient(ellipse at 75% 80%, rgb(130 167 255 / .10), transparent 55%), #0c0e12; }
@media (min-width: 960px) { .porte__scene { min-height: 100vh; } }
.porte__toile { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }
.porte__grille { position: absolute; left: -20%; right: -20%; bottom: -10%; height: 55%;
  background-image: linear-gradient(rgb(198 244 50 / .14) 1px, transparent 1px), linear-gradient(90deg, rgb(198 244 50 / .14) 1px, transparent 1px);
  background-size: 48px 48px; transform: perspective(500px) rotateX(62deg); transform-origin: bottom;
  -webkit-mask-image: linear-gradient(to top, #000 0%, transparent 90%); mask-image: linear-gradient(to top, #000 0%, transparent 90%);
  animation: defile 3s linear infinite; }
@keyframes defile { to { background-position: 0 48px; } }
.porte__panneau { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 26px; padding: 28px max(5vw, 20px) 32px; background: #12151b; border-left: 1px solid #262b34; }
@media (min-width: 960px) { .porte__panneau { justify-content: center; padding: 48px 56px; } }
.porte__marque { display: flex; align-items: center; gap: 12px; }
.porte__marque .logo { width: 44px; height: 50px; }
.porte__marque span { display: flex; flex-direction: column; line-height: 1.15; }
.porte__marque strong { font-family: var(--titre); font-size: 1.6rem; letter-spacing: -.02em; }
.porte__marque strong span { display: inline; color: #9ca3af; font-weight: 500; }
.porte__marque small { color: #9ca3af; font-size: .85rem; }
.porte__intro h1 { font-size: clamp(1.6rem, 3vw, 2.1rem); line-height: 1.15; margin: 0 0 10px; font-weight: 600; color: #d6dad2; }
.porte__intro h1 em { font-style: normal; font-weight: 700; color: #c6f432; }
.porte__intro p { margin: 0; color: #9ca3af; }
.porte__intro .une__invite { color: #c6f432; margin-bottom: 12px; }
.porte__intro .curseur { background: #c6f432; }
.porte__formulaire { margin: 0; padding: 22px; border-radius: 14px; background: #171a21; border: 1px solid #2c323d; box-shadow: 0 30px 60px -30px rgb(0 0 0 / .8), inset 0 1px 0 rgb(255 255 255 / .04); }
.porte__formulaire label { color: #eceee8; }
.champ { position: relative; display: flex; align-items: center; }
.champ > svg { position: absolute; left: 12px; width: 16px; height: 16px; color: #9ca3af; pointer-events: none; }
.champ input { width: 100%; padding-left: 38px !important; background: #0f1116 !important; border-color: #353c48 !important; color: #eceee8 !important; }
.champ input:focus-visible { outline: 2px solid #c6f432 !important; border-color: transparent !important; }
.champ__oeil { position: absolute; right: 6px; font: 500 .8rem var(--police); padding: 6px 8px; border: 0; border-radius: 6px; background: transparent; color: #9ca3af; cursor: pointer; }
.champ__oeil:hover { color: #eceee8; background: #222731; }
.bouton--large { width: 100%; padding: 13px 16px; font-size: 1rem; }
.porte .formulaire__message { background: rgb(255 122 102 / .12); color: #ffd2c9; }
.porte__demo { margin: 14px 0 0; padding: 10px 12px; border-radius: 8px; background: rgb(245 196 81 / .1); border: 1px solid rgb(245 196 81 / .3); color: #e9dcb8; font-size: .88rem; }
.porte__demo strong { color: #f5c451; }
.porte__aide { margin: -8px 0 0; color: #9ca3af; font-size: .9rem; }
.porte__pied { margin: 0; color: #6b7280; font-size: .8rem; line-height: 1.7; }
.porte__pied span { font-family: var(--mono); }
.porte__pied strong { color: #9ca3af; }
@media (prefers-reduced-motion: reduce) { .porte__grille { animation: none; } }

/* ==========================================================
   Espace enseignant
   ========================================================== */
.menu__lien--enseignant { color: var(--primaire-texte); }
.avertissement--erreur { background: var(--attention-fond); border-color: var(--attention); }
.avertissement code, .ens-note code { font-family: var(--mono); font-size: .85em; }
.ens-outils { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.ens-onglets { display: flex; flex-wrap: wrap; gap: 8px; }
.ens-onglet { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 8px; border: 1px solid var(--bord-fort); background: var(--surface); color: var(--texte); font: 500 .92rem var(--police); cursor: pointer; }
.ens-onglet .puce { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.ens-onglet[aria-selected="true"] { border-color: var(--accent); background: var(--surface-2); box-shadow: inset 0 -2px 0 var(--accent); }
.ens-onglet__nombre { font: 500 .78rem var(--mono); color: var(--texte-doux); }
.ens-recherche input { font: 15px var(--police); padding: 8px 12px; min-width: 220px; border-radius: 8px; border: 1px solid var(--bord-fort); background: var(--surface); color: var(--texte); }
.ens-tableau { overflow-x: auto; border: 1px solid var(--bord); border-radius: var(--rayon); background: var(--surface); }
.ens-tableau table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.ens-tableau th { text-align: left; font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--texte-doux); padding: 10px 14px; border-bottom: 1px solid var(--bord); white-space: nowrap; }
.ens-tableau td { padding: 10px 14px; border-bottom: 1px solid var(--bord); vertical-align: middle; }
.ens-tableau tr:last-child td { border-bottom: 0; }
.ens-identifiant, .ens-mdp { font-family: var(--mono); font-size: .88rem; }
.ens-date { color: var(--texte-doux); white-space: nowrap; }
.ens-action { text-align: right; white-space: nowrap; }
.ens-nouveau { display: inline-flex; align-items: center; gap: 8px; }
.ens-nouveau__label { font-size: .8rem; color: var(--texte-doux); }
.ens-mdp { padding: 3px 8px; border-radius: 6px; background: var(--primaire-clair); color: var(--primaire-texte); border: 1px solid var(--primaire); }
.ens-note { margin: 12px 0 0; font-size: .85rem; color: var(--texte-doux); }
.ed__seance { margin: 18px 0 0; padding: 10px 14px; border-radius: var(--rayon); background: var(--exemple-fond); border: 1px solid var(--exemple-bord); color: var(--texte); }
@media (max-width: 640px) {
  .ens-recherche, .ens-recherche input { width: 100%; }
  .ens-tableau thead { display: none; }
  .ens-tableau tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 10px 14px; border-bottom: 1px solid var(--bord); }
  .ens-tableau td { padding: 0; border: 0; }
  .ens-tableau .ens-action { grid-column: 1 / -1; text-align: left; margin-top: 6px; }
}

/* ---------- Tableau de bord enseignant ---------- */
.tdb-tete { padding-top: 28px; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.tdb-tete h1 { margin: 0; }
.tdb-date { margin: 4px 0 0; color: var(--texte-doux); }
.tdb-raccourcis { display: flex; flex-wrap: wrap; gap: 10px; }
.tdb-chiffres { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 0 0 8px; }
.tdb-chiffres div { padding: 16px 18px; border-radius: var(--rayon); background: var(--surface); border: 1px solid var(--bord); }
.tdb-chiffres dt { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--texte-doux); }
.tdb-chiffres dd { margin: 6px 0 0; font: 600 2rem/1 var(--titre); font-variant-numeric: tabular-nums; }
.tdb-classes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.tdb-classe__lien { display: flex; flex-direction: column; gap: 8px; height: 100%; padding: 16px 18px; border-radius: var(--rayon); background: var(--surface); border: 1px solid var(--bord); border-top: 3px solid var(--accent); color: var(--texte); text-decoration: none; transition: border-color .15s, transform .15s; }
.tdb-classe__lien:hover { border-color: var(--accent); transform: translateY(-2px); color: var(--texte); }
.tdb-classe__nom { font: 600 1.1rem var(--titre); }
.tdb-classe__nombre { color: var(--texte-doux); } .tdb-classe__nombre strong { color: var(--texte); font-size: 1.2rem; }
.tdb-classe__groupes { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.tdb-jauge { display: block; height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.tdb-jauge span { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.tdb-discret { color: var(--texte-doux); font-size: .85rem; }
.tdb-colonnes { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; margin-top: 32px; }
.tdb-panneau { padding: 16px 18px; border-radius: var(--rayon); background: var(--surface); border: 1px solid var(--bord); }
.tdb-panneau h2 { margin: 0 0 10px; font-size: 1.05rem; }
.tdb-liste { list-style: none; margin: 0; padding: 0; }
.tdb-liste li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--bord); }
.tdb-liste li:first-child { border-top: 0; }
.tdb-liste li > span:first-child { display: flex; flex-direction: column; }
.tdb-liste small, .ens-sous { color: var(--texte-doux); font-size: .8rem; display: block; }
.tdb-liste code { font-family: var(--mono); }

/* ---------- Gestion des élèves ---------- */
.tete__surtitre a { color: inherit; }
.ens-groupes { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 14px; }
.ens-groupe { padding: 4px 10px; border-radius: 999px; border: 1px solid var(--bord-fort); background: transparent; color: var(--texte-doux); font: 500 .85rem var(--police); cursor: pointer; }
.ens-groupe[aria-pressed="true"] { background: var(--surface-2); color: var(--texte); border-color: var(--texte-doux); }
.ens-ligne--ouverte td { border-bottom-color: transparent; background: var(--surface-2); }
.ens-ligne-gerer td { background: var(--surface-2); }
.ens-gerer { display: flex; flex-wrap: wrap; gap: 14px 32px; padding: 4px 0 6px; }
.ens-gerer__bloc h3 { margin: 0 0 8px; font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--texte-doux); }
.ens-gerer__ligne { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ens-gerer select, .ens-gerer input, .ens-champs select, .ens-champs input { font: 15px var(--police); padding: 7px 10px; border-radius: 8px; border: 1px solid var(--bord-fort); background: var(--surface); color: var(--texte); }
.ens-gerer input { width: 9rem; }
.bouton--danger { background: transparent; color: var(--attention); border-color: var(--attention); box-shadow: 0 3px 0 var(--attention-fond); }
.bouton--danger:hover { background: var(--attention-fond); color: var(--attention); }
.ens-creer { margin: 0 0 28px; }
.ens-creer > summary { list-style: none; cursor: pointer; display: inline-block; }
.ens-creer > summary::-webkit-details-marker { display: none; }
.ens-creer[open] > summary .bouton { background: var(--surface-2); color: var(--texte); box-shadow: 0 4px 0 var(--bord-fort); }
.ens-creer__form, .ens-resultat { margin-top: 14px; padding: 18px; border-radius: var(--rayon); background: var(--surface); border: 1px solid var(--bord); }
.ens-champs { display: flex; flex-wrap: wrap; gap: 14px; }
.ens-champs label, .ens-liste { display: flex; flex-direction: column; gap: 6px; font-weight: 500; font-size: .92rem; }
.ens-champs small { color: var(--texte-doux); font-weight: 400; }
.ens-liste { margin-top: 14px; }
.ens-liste textarea { font: 15px/1.6 var(--mono); padding: 10px 12px; border-radius: 8px; border: 1px solid var(--bord-fort); background: var(--fond); color: var(--texte); resize: vertical; }
.ens-apercu { min-height: 1.4em; color: var(--texte-doux); font-size: .88rem; }
.ens-resultat h2 { margin: 0 0 4px; }
.ens-echec { color: var(--attention); }
.impression { display: none; }
@media print {
  body * { visibility: hidden; }
  .impression, .impression * { visibility: visible; }
  .impression { display: grid; grid-template-columns: 1fr 1fr; gap: 0; position: absolute; inset: 0 auto auto 0; width: 100%; color: #000; background: #fff; }
  .fiche-eleve { padding: 14px 16px; border: 1px dashed #999; break-inside: avoid; font: 12pt/1.5 system-ui, sans-serif; }
  .fiche-eleve p { margin: 0; }
  .fiche-eleve__marque { font-size: 9pt; color: #555; }
  .fiche-eleve__nom { font-weight: 700; font-size: 13pt; margin: 2px 0 6px !important; }
  .fiche-eleve strong { font-family: ui-monospace, Menlo, monospace; }
  .fiche-eleve__note { margin-top: 6px !important; font-size: 8.5pt; color: #555; }
}

/* ---------- Encadrés dans les contenus : > [!astuce] … ---------- */
.encadre { padding: 14px 16px; border-radius: var(--rayon); margin: 0 0 1.2em; border: 1px solid var(--bord); border-left-width: 4px; background: var(--surface); }
.encadre > :last-child { margin-bottom: 0; }
.encadre::before { display: block; font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.encadre.objectifs::before { content: "Objectifs de la séance"; }
.encadre.astuce::before { content: "Astuce"; color: var(--c3); }
.encadre.attention::before { content: "Attention"; color: var(--attention); }
.encadre.note { border-left-color: var(--texte-doux); font-style: normal; color: var(--texte); font-size: 1rem; }
.encadre.note::before { content: "Note"; color: var(--texte-doux); }
.encadre.consigne { border-left-color: var(--c2); }
.encadre.consigne::before { content: "Consigne"; color: var(--c2); }
.barre-prof { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; margin: 16px 0 -8px; }

/* ---------- Contenus : liste et éditeur enseignant ---------- */
.etat { display: inline-block; font-size: .78rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.etat--publie { background: var(--primaire-clair); color: var(--primaire-texte); }
.etat--brouillon { background: var(--surface-2); color: var(--texte-doux); border: 1px dashed var(--bord-fort); }
.ed-lien { font-weight: 600; color: var(--texte); margin-right: 6px; }
.ens-outils select { font: 15px var(--police); padding: 8px 10px; border-radius: 8px; border: 1px solid var(--bord-fort); background: var(--surface); color: var(--texte); }
.ed__tete { padding-top: 24px; display: flex; flex-direction: column; gap: 6px; }
.ed__titre { font: 600 clamp(1.6rem, 3vw, 2.2rem)/1.2 var(--titre); border: 0; border-bottom: 1px solid transparent; background: transparent; color: var(--texte); padding: 4px 0; }
.ed__description { font: 1.05rem var(--police); border: 0; background: transparent; color: var(--texte-doux); padding: 4px 0; }
.ed__titre:focus, .ed__description:focus { outline: none; border-bottom-color: var(--primaire); }
.ed__reglages { margin: 18px 0; padding: 14px 16px; border-radius: var(--rayon); background: var(--surface); border: 1px solid var(--bord); }
.ed__outils { position: sticky; top: var(--entete-hauteur); z-index: 2; display: flex; flex-wrap: wrap; gap: 4px; padding: 8px; border: 1px solid var(--bord); border-bottom: 0; border-radius: var(--rayon) var(--rayon) 0 0; background: var(--surface-2); }
.ed__outils button { font: 500 .85rem var(--police); padding: 5px 9px; border-radius: 6px; border: 1px solid transparent; background: transparent; color: var(--texte); cursor: pointer; }
.ed__outils button:hover { background: var(--surface); border-color: var(--bord-fort); }
.ed__sep { width: 1px; margin: 2px 6px; background: var(--bord-fort); }
.ed__zones { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--bord); border-radius: 0 0 var(--rayon) var(--rayon); overflow: hidden; }
.ed__zone { display: flex; flex-direction: column; min-width: 0; }
.ed__zone + .ed__zone { border-left: 1px solid var(--bord); }
.ed__etiquette { font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--texte-doux); padding: 8px 14px; border-bottom: 1px solid var(--bord); background: var(--surface); }
.ed__zone textarea { flex: 1; min-height: 60vh; resize: vertical; border: 0; padding: 14px; font: 15px/1.7 var(--mono); background: var(--fond); color: var(--texte); }
.ed__zone textarea:focus { outline: 2px solid var(--primaire); outline-offset: -2px; }
.ed__apercu { padding: 14px 18px; max-height: 70vh; overflow: auto; background: var(--fond); }
.ed__actions { position: sticky; bottom: 0; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 16px; padding: 12px 0; background: var(--fond); border-top: 1px solid var(--bord); }
.ed__etat { margin-right: auto; color: var(--texte-doux); font-size: .9rem; }
@media (max-width: 800px) {
  .ed__zones { grid-template-columns: 1fr; }
  .ed__zone + .ed__zone { border-left: 0; border-top: 1px solid var(--bord); }
  .ed__zone textarea { min-height: 40vh; }
}

/* ---------- Import de documents et PDF intégrés ---------- */
.ed__import-barre { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0 0 12px; }
.ed__import-barre .ens-note { margin: 0; }
.ed__import { margin: 0 0 12px; padding: 12px 16px; border-radius: var(--rayon); border: 1px solid var(--primaire); background: var(--primaire-clair); }
.ed__import p { margin: 0; }
.prose img { max-width: 100%; height: auto; border-radius: 6px; }
/* Visionneuse de documents (PDF, Word) */
.visio { margin: 0 0 1.4em; border: 1px solid var(--bord); border-radius: var(--rayon); background: var(--surface); overflow: hidden; }
.visio__barre { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 8px 10px 8px 14px; border-bottom: 1px solid var(--bord); font-size: .9rem; }
.visio__nom { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.visio__nom::before { content: attr(data-genre); display: inline-block; margin-right: 8px; padding: 1px 6px; border-radius: 4px; background: var(--primaire-clair); color: var(--primaire-texte); font: 600 .72rem/1.5 var(--mono); vertical-align: 1px; }
.visio__info { color: var(--texte-doux); font-size: .85rem; }
.visio__actions { display: flex; gap: 6px; margin-left: auto; }
.visio__bouton { padding: 5px 10px; min-width: 34px; border: 1px solid var(--bord-fort); border-radius: 6px; background: transparent; color: var(--texte); font: inherit; font-size: .85rem; line-height: 1.2; cursor: pointer; text-decoration: none; text-align: center; }
.visio__bouton:hover { border-color: var(--primaire); color: var(--texte); }
.visio__bouton:focus-visible { outline: 2px solid var(--primaire); outline-offset: 2px; }
.visio__corps { height: min(80vh, 1000px); overflow: auto; background: #52565e; overscroll-behavior: contain; }
.visio__attente { margin: 0; padding: 24px; color: #e6e7e3; }
.visio__page { margin: 16px auto; background: #fff; box-shadow: 0 2px 10px rgb(0 0 0 / .35); }
.visio__page canvas { display: block; width: 100%; height: 100%; }
.visio__word .docx-wrapper { background: transparent; padding: 16px; display: flex; flex-direction: column; align-items: center; }
.visio__word .docx-wrapper > section.docx { margin: 0 0 16px; box-shadow: 0 2px 10px rgb(0 0 0 / .35); }
.visio--plein { position: fixed; inset: 0; z-index: 1000; margin: 0; border-radius: 0; border: 0; display: flex; flex-direction: column; }
.visio--plein .visio__corps { flex: 1; height: auto; }
.visio-ouverte { overflow: hidden; }
@media (max-width: 640px) {
  .visio__corps { height: 70vh; }
  .visio__actions { margin-left: 0; width: 100%; }
  .visio__actions [data-visio-telecharger] { margin-left: auto; }
}

/* ---------- Dépôt des travaux ---------- */
.etat--retard { background: var(--attention-fond); color: var(--attention); }
.ed__depot { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 28px; margin: -6px 0 18px; padding: 14px 16px; border-radius: var(--rayon); background: var(--surface); border: 1px solid var(--bord); }
.ed__case { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; max-width: 46rem; }
.ed__case input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--primaire); flex: none; }
.ed__case small { display: block; color: var(--texte-doux); font-size: .85rem; }
.ed__limite { display: flex; flex-direction: column; gap: 6px; font-weight: 500; font-size: .92rem; }
.ed__limite small { color: var(--texte-doux); font-weight: 400; }
.ed__limite input, .dep-limite input, .ens-gerer input[type="datetime-local"] { font: 15px var(--police); padding: 7px 10px; border-radius: 8px; border: 1px solid var(--bord-fort); background: var(--surface); color: var(--texte); width: auto; color-scheme: light dark; }

.depot { margin: 28px 0 8px; padding: 18px 20px; border-radius: var(--rayon); border: 1px solid var(--bord); border-top: 3px solid var(--primaire); background: var(--surface); }
.depot__tete { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.depot__tete h2 { margin: 0; font-size: 1.25rem; }
.depot__limite { margin: 6px 0 14px; color: var(--texte-doux); }
.depot__limite strong { color: var(--texte); font-variant-numeric: tabular-nums; }
.depot__limite--fermee { color: var(--attention); }
.depot__urgent { color: var(--attention) !important; }
.depot__fichiers { list-style: none; margin: 0 0 14px; padding: 0; border: 1px solid var(--bord); border-radius: 8px; }
.depot__fichiers li { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-top: 1px solid var(--bord); }
.depot__fichiers li:first-child { border-top: 0; }
.depot__fichiers small { color: var(--texte-doux); margin-left: auto; white-space: nowrap; }
.depot__fichier-nom { min-width: 0; overflow-wrap: anywhere; }
.depot__zone { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px 16px; border: 2px dashed var(--bord-fort); border-radius: var(--rayon); text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.depot__zone span { color: var(--texte-doux); font-size: .9rem; max-width: 34rem; }
.depot__zone:hover, .depot__zone--survol, .depot__zone:focus-within { border-color: var(--primaire); background: var(--primaire-clair); }
.depot__envoi { margin: 10px 0 0; font-size: .92rem; }
.depot__message { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.depot__message textarea, .dep-correction textarea { width: 100%; font: 15px/1.45 var(--police); padding: 8px 10px; border-radius: 8px; border: 1px solid var(--bord-fort); background: var(--surface); color: var(--texte); resize: vertical; }
.depot__mot { margin: 0 0 8px; }
.depot .avertissement { margin-top: 12px; }
.depot__correction { margin-top: 18px; padding: 14px 16px; border-radius: 8px; background: var(--primaire-clair); }
.depot__correction h3 { margin: 0 0 8px; font-size: 1rem; }
.depot__note { display: flex; align-items: baseline; gap: 10px; margin: 0 0 6px; }
.depot__note span { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--texte-doux); }
.depot__note strong { font: 600 1.4rem var(--titre); }
.depot__appreciation { margin: 0 0 10px; white-space: pre-line; }
.depot__correction .depot__fichiers { margin: 0; background: var(--surface); }

.dep-cartes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.dep-cartes > .vide { grid-column: 1 / -1; }
.dep-carte { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border-radius: var(--rayon); background: var(--surface); border: 1px solid var(--bord); }
.dep-carte__tete { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.dep-carte__titre { font-weight: 600; color: var(--texte); text-decoration: none; }
.dep-carte__titre:hover { color: var(--lien); text-decoration: underline; }
.dep-carte small { color: var(--texte-doux); font-size: .85rem; }
.dep-compte { font: 600 .9rem var(--mono); white-space: nowrap; }
.dep-chiffres { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
.dep-chiffres div { padding: 10px 14px; border-radius: var(--rayon); background: var(--surface); border: 1px solid var(--bord); }
.dep-chiffres dt { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--texte-doux); }
.dep-chiffres dd { margin: 2px 0 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.dep-limite { display: flex; flex-wrap: wrap; gap: 14px 36px; margin: 0 0 20px; padding: 14px 16px; border-radius: var(--rayon); background: var(--surface); border: 1px solid var(--bord); }
.dep-fichiers { list-style: none; margin: 0; padding: 0; font-size: .9rem; }
.dep-fichiers li { overflow-wrap: anywhere; }
.dep-mot { max-width: 22rem; font-style: italic; }
.dep-note { font-weight: 600; }
.dep-delai { color: var(--primaire-texte); }
.dep-actions { text-align: right; }
.dep-espace { margin-top: 8px; }
.dep-correction { flex: 1 1 320px; display: flex; flex-direction: column; gap: 8px; }
.dep-fichier-corr { font-size: .9rem; color: var(--texte-doux); }
.dep-fichier-corr input { width: auto; border: 0; padding: 4px 0; background: transparent; }
.tdb-panneau h2 a { color: inherit; text-decoration: none; }
.tdb-panneau h2 a:hover { text-decoration: underline; }

/* ---------- Notes ---------- */
.nt-tableau th[scope="row"] { font-weight: 600; white-space: nowrap; text-transform: none; letter-spacing: 0; font-size: .95rem; color: var(--texte); border-bottom: 1px solid var(--bord); }
.nt-tableau th[scope="row"] .ens-sous { font-weight: 400; }
.nt-tableau .nt-exo { min-width: 7rem; max-width: 11rem; white-space: normal; text-transform: none; letter-spacing: 0; font-size: .82rem; vertical-align: bottom; }
.nt-tableau .nt-exo a { color: var(--texte); text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nt-tableau .nt-exo a:hover { text-decoration: underline; }
.nt-tableau .nt-exo small { display: block; color: var(--texte-doux); font-weight: 400; }
.nt-cellule, .nt-moy { text-align: center; font-variant-numeric: tabular-nums; white-space: nowrap; }
.nt-tableau .nt-moy { font-weight: 700; background: var(--surface-2); }
.nt-tableau tfoot th, .nt-tableau tfoot td { border-top: 2px solid var(--bord-fort); font-weight: 600; color: var(--texte-doux); }
.nt-bas { color: var(--attention); }
[data-notes-groupe] { font: 15px var(--police); padding: 7px 10px; border-radius: 8px; border: 1px solid var(--bord-fort); background: var(--surface); color: var(--texte); }
.nt-resume { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.nt-chiffre { flex: 1 1 160px; padding: 14px 16px; border-radius: var(--rayon); background: var(--surface); border: 1px solid var(--bord); }
.nt-chiffre span { display: block; font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--texte-doux); }
.nt-chiffre strong { display: block; margin-top: 4px; font: 600 1.7rem/1.2 var(--titre); }
.nt-chiffre strong small { font-size: .95rem; color: var(--texte-doux); font-weight: 500; }
.nt-detail { display: block; margin-top: 2px; font-size: .8rem; color: var(--texte-doux); }
.nt-figure { margin: 0 0 16px; padding: 14px 16px 10px; border-radius: var(--rayon); background: var(--surface); border: 1px solid var(--bord); }
.nt-figure figcaption { font-size: .85rem; color: var(--texte-doux); margin-bottom: 6px; }
.nt-cadre { position: relative; }
.nt-courbe { display: block; width: 100%; height: auto; overflow: visible; }
.nt-grille { stroke: var(--bord); stroke-width: 1; }
.nt-repere { stroke: var(--bord-fort); stroke-width: 1; stroke-dasharray: 4 4; }
.nt-axe { fill: var(--texte-doux); font: 12px var(--mono); }
.nt-ligne { fill: none; stroke: var(--primaire-texte); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.nt-marque { fill: var(--primaire-texte); stroke: var(--surface); stroke-width: 2; }
.nt-cible { fill: transparent; cursor: pointer; }
.nt-point:focus { outline: none; }
.nt-point:hover .nt-marque, .nt-point:focus .nt-marque { r: 6.5; }
.nt-bulle { position: absolute; transform: translate(-50%, calc(-100% - 12px)); padding: 6px 10px; border-radius: 8px; background: var(--texte); color: var(--fond); font-size: .82rem; pointer-events: none; white-space: nowrap; max-width: 240px; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 4px 14px rgb(0 0 0 / .2); }
.nt-bulle strong { margin-right: 6px; }
.nt-note { font-variant-numeric: tabular-nums; }

/* ---------- Exercices interactifs ---------- */
.ed__quiz { margin: 22px 0; padding: 16px 18px; border-radius: var(--rayon); background: var(--surface); border: 1px solid var(--bord); }
.ed__quiz-tete h2 { margin: 0; font-size: 1.15rem; }
.ed__quiz-tete .ens-note { margin: 4px 0 14px; }
.ed__quiz-ajout { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.ed__quiz-ajout > span { font-size: .9rem; color: var(--texte-doux); }
.ed__quiz-reglages { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--bord); align-items: flex-end; }
.qz-carte { margin-bottom: 12px; border: 1px solid var(--bord-fort); border-radius: var(--rayon); background: var(--fond); }
.qz-carte__tete { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 12px; border-bottom: 1px solid var(--bord); }
.qz-carte__outils { display: flex; gap: 6px; margin-left: auto; }
.qz-points { display: flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--texte-doux); }
.qz-points input { width: 4.5rem; }
.qz-carte__corps { display: flex; flex-direction: column; gap: 10px; padding: 12px; }
.qz-label { display: flex; flex-direction: column; gap: 6px; font-size: .9rem; font-weight: 500; }
.qz-carte input[type="text"], .qz-carte input[type="number"], .qz-carte textarea { font: 15px/1.4 var(--police); padding: 7px 10px; border-radius: 8px; border: 1px solid var(--bord-fort); background: var(--surface); color: var(--texte); width: 100%; }
.qz-carte input[type="number"] { width: 4.5rem; }
.qz-ligne { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.qz-ligne input[type="text"] { flex: 1 1 200px; width: auto; }
.qz-juste { display: inline-flex; align-items: center; gap: 6px; font-size: .88rem; white-space: nowrap; }
.qz-juste input { accent-color: var(--primaire); width: 17px; height: 17px; }
.qz-aide { margin: 0; font-size: .85rem; color: var(--texte-doux); display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.qz-paires { display: flex; flex-direction: column; gap: 8px; }
.qz-paire { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.qz-gauche { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.qz-gauche input[type="text"] { flex: 1 1 140px; width: auto; }
.qz-fleche { color: var(--texte-doux); }
.qz-image img { display: block; max-width: 160px; max-height: 110px; border-radius: 6px; border: 1px solid var(--bord); }

.quiz { margin: 28px 0 8px; padding: 18px 20px; border-radius: var(--rayon); border: 1px solid var(--bord); border-top: 3px solid var(--primaire); background: var(--surface); }
.quiz__tete { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.quiz__tete h2 { margin: 0; font-size: 1.25rem; }
.quiz__info { margin: 6px 0 16px; color: var(--texte-doux); }
.quiz__q { margin: 0 0 14px; padding: 12px 16px 14px; border: 1px solid var(--bord); border-radius: var(--rayon); background: var(--fond); min-width: 0; }
.quiz__q legend { display: flex; gap: 10px; align-items: baseline; padding: 0 6px; font-weight: 600; }
.quiz__q legend small { font-weight: 400; color: var(--texte-doux); }
.quiz__enonce { margin-bottom: 8px; }
.quiz__enonce > :last-child { margin-bottom: 0; }
.quiz__choix { display: flex; align-items: flex-start; gap: 10px; padding: 7px 10px; margin: 0 -10px; border-radius: 8px; cursor: pointer; }
.quiz__choix:hover { background: var(--surface-2); }
.quiz__choix input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--primaire); flex: none; }
.quiz__texte, .quiz__trous input, .quiz__paire select { font: 16px var(--police); padding: 7px 10px; border-radius: 8px; border: 1px solid var(--bord-fort); background: var(--surface); color: var(--texte); }
.quiz__texte { width: min(100%, 26rem); }
.quiz__trous { line-height: 2.4; margin: 0; }
.quiz__trous input { padding: 3px 8px; margin: 0 3px; max-width: 11rem; }
.quiz__paires { display: flex; flex-direction: column; gap: 10px; }
.quiz__paire { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 10px; }
.quiz__paire select { width: 100%; min-width: 0; }
.quiz__gauche .qz-image img { max-width: 100%; max-height: 140px; }
.quiz__gauche-texte { font-weight: 500; }
.quiz__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.quiz__actions .ens-note { margin: 0; }
.quiz__resultat { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin: 0 0 16px; padding: 14px 16px; border-radius: var(--rayon); background: var(--primaire-clair); }
.quiz__resultat > span:first-child { font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--texte-doux); }
.quiz__resultat strong { font: 600 2rem/1 var(--titre); }
.quiz__resultat strong small { font-size: 1rem; color: var(--texte-doux); }
.quiz__points { color: var(--texte-doux); font-size: .92rem; }
.quiz__correction { margin: 10px 0 0; font-size: .92rem; }
.quiz__q--juste { border-color: var(--primaire-texte); }
.quiz__q--juste .quiz__correction strong { color: var(--primaire-texte); }
.quiz__q--faux { border-color: var(--attention); }
.quiz__q--faux .quiz__correction strong { color: var(--attention); }
.quiz__q--partiel { border-color: var(--exemple); }
.quiz__q--partiel .quiz__correction strong { color: var(--exemple); }
.quiz__champ--juste { border-color: var(--primaire-texte) !important; box-shadow: inset 0 0 0 1px var(--primaire-texte); }
.quiz__champ--faux { border-color: var(--attention) !important; box-shadow: inset 0 0 0 1px var(--attention); }
@media (max-width: 640px) {
  .qz-paire { grid-template-columns: 1fr auto; }
  .qz-paire .qz-fleche { display: none; }
  .quiz__paire { grid-template-columns: 1fr; gap: 6px; }
  .quiz__paire .qz-fleche { display: none; }
  .quiz { padding: 16px 14px; }
}
.ens-champs .ed__case { flex-direction: row; font-weight: 400; }

/* ---------- Corrigé ---------- */
.ed__corrige { margin: 22px 0; padding: 16px 18px; border-radius: var(--rayon); background: var(--surface); border: 1px solid var(--bord); display: flex; flex-direction: column; gap: 10px; }
.ed__corrige h2 { margin: 0; font-size: 1.15rem; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ed__corrige .ens-note { margin: 4px 0 0; }
.ed__corrige .ed__import-barre { margin: 0; }
.ed__corrige-texte { width: 100%; font: 14px/1.5 var(--mono); padding: 10px 12px; border-radius: 8px; border: 1px solid var(--bord-fort); background: var(--fond); color: var(--texte); resize: vertical; }
.corrige { margin: 28px 0 8px; padding: 18px 20px; border-radius: var(--rayon); border: 1px solid var(--bord); border-top: 3px solid var(--texte-doux); background: var(--surface); }
.corrige .depot__tete { margin-bottom: 10px; }
.corrige--masque { opacity: .75; }
.dep-fin { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-top: 28px; padding: 14px 16px; border-radius: var(--rayon); border: 1px dashed var(--attention); }
.dep-fin h3 { margin: 0 0 4px; font-size: 1rem; }
.dep-fin .ens-note { margin: 0; max-width: 40rem; }

/* ---------- Progression et séances ---------- */
.prog { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
.prog:has(.prog-panneau:not([hidden])) { grid-template-columns: minmax(0, 1fr) minmax(320px, 400px); }
.cal { padding: 14px; border-radius: var(--rayon); background: var(--surface); border: 1px solid var(--bord); }
.cal__tete { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.cal__mois { margin: 0 auto 0 4px; font-size: 1.15rem; order: -1; flex: 1; }
.cal__grille { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal__jour-nom { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--texte-doux); padding: 0 6px 4px; }
.cal__case { min-height: 92px; display: flex; flex-direction: column; gap: 3px; padding: 4px; border-radius: 8px; background: var(--fond); border: 1px solid var(--bord); min-width: 0; }
.cal__case--weekend { background: transparent; }
.cal__case--hors { opacity: .45; }
.cal__case--aujourdhui { border-color: var(--primaire-texte); box-shadow: inset 0 0 0 1px var(--primaire-texte); }
.cal__num { align-self: flex-start; min-width: 26px; height: 26px; padding: 0 6px; border: 0; border-radius: 6px; background: transparent; color: var(--texte-doux); font: 600 .85rem var(--mono); cursor: pointer; text-align: left; }
.cal__case--aujourdhui .cal__num { background: var(--primaire); color: var(--sur-primaire); }
.cal__num:hover { background: var(--surface-2); color: var(--texte); }
.cal__num:hover::after { content: " +"; }
.cal__seance { display: flex; align-items: center; gap: 5px; width: 100%; padding: 3px 6px; border-radius: 5px; border: 1px dashed var(--bord-fort); background: var(--surface); color: var(--texte); font: 500 .76rem/1.25 var(--police); text-align: left; cursor: pointer; min-width: 0; }
.cal__seance span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal__seance .puce { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none; }
.cal__seance--lancee { border-style: solid; background: var(--primaire-clair); }
.cal__seance--active { outline: 2px solid var(--primaire-texte); outline-offset: 1px; }
.prog-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.prog-ligne { display: flex; align-items: center; gap: 14px; padding: 10px 14px; border-radius: var(--rayon); background: var(--surface); border: 1px solid var(--bord); border-left: 3px solid var(--accent); }
.prog-ligne__date { font: 600 .85rem var(--mono); color: var(--texte-doux); min-width: 6.5rem; }
.prog-ligne__corps { flex: 1; min-width: 0; }
.prog-ligne__titre { border: 0; background: none; padding: 0; font: 600 1rem var(--police); color: var(--texte); cursor: pointer; text-align: left; }
.prog-ligne__titre:hover { text-decoration: underline; }
.prog-ligne small { display: block; color: var(--texte-doux); font-size: .82rem; }
.prog-hors { margin-top: 24px; padding: 12px 16px; border-radius: var(--rayon); background: var(--surface); border: 1px solid var(--bord); }
.prog-hors summary { cursor: pointer; font-weight: 600; }
.prog-contenu { display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: wrap; }
.prog-contenu svg { width: 16px; height: 16px; flex: none; color: var(--texte-doux); }
.prog-contenu small { color: var(--texte-doux); font-size: .8rem; }
.prog-panneau { position: sticky; top: calc(var(--entete-hauteur) + 12px); max-height: calc(100vh - var(--entete-hauteur) - 24px); overflow: auto; padding: 16px; border-radius: var(--rayon); background: var(--surface); border: 1px solid var(--bord-fort); display: flex; flex-direction: column; gap: 12px; }
.prog-panneau__tete { display: flex; align-items: center; gap: 10px; }
.prog-panneau__tete h2 { margin: 0; font-size: 1.15rem; }
.prog-panneau__tete .bouton { margin-left: auto; }
.prog-champs label { flex: 1 1 110px; }
.prog-champs input, .prog-champs select { width: 100%; }
.prog-label { display: flex; flex-direction: column; gap: 6px; font-weight: 500; font-size: .92rem; }
.prog-label input, .prog-label textarea, .prog-ajout select { font: 15px var(--police); padding: 7px 10px; border-radius: 8px; border: 1px solid var(--bord-fort); background: var(--surface); color: var(--texte); width: 100%; }
.prog-label textarea { resize: vertical; font-size: 14px; }
.prog-sous-titre { margin: 4px 0 0; font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--texte-doux); }
.prog-ordre { list-style: none; counter-reset: seance; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.prog-ordre li { counter-increment: seance; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px; border-radius: 8px; background: var(--fond); border: 1px solid var(--bord); }
.prog-ordre li::before { content: counter(seance); font: 600 .78rem var(--mono); color: var(--texte-doux); min-width: 1.2em; }
.prog-ordre li .prog-contenu { flex: 1; }
.prog-ordre__outils { display: flex; gap: 2px; }
.prog-ordre__outils .bouton { padding: 2px 7px; box-shadow: none; }
.prog-ajout { margin-top: 8px; }
.prog-ajout select { flex: 1 1 200px; width: auto; }
.prog-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 10px; border-top: 1px solid var(--bord); }
.prog-actions .ens-note { margin: 0; flex-basis: 100%; }
.prog-lancer::before { content: "▶ "; }
.tdb-seances { margin-bottom: 24px; }
.tdb-seances__liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.tdb-seance { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-radius: var(--rayon); background: var(--surface); border: 1px solid var(--bord); border-left: 4px solid var(--accent); }
.tdb-seance--lancee { background: var(--primaire-clair); }
.tdb-seance__pour { display: flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--texte-doux); }
.tdb-seance__pour .puce { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.tdb-seance__titre { display: block; margin: 2px 0; font: 600 1.1rem var(--titre); color: var(--texte); text-decoration: none; }
.tdb-seance__titre:hover { text-decoration: underline; }
.tdb-seance small { color: var(--texte-doux); }
.seance-eleve__num { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--primaire); color: var(--sur-primaire); font: 700 .85rem var(--mono); flex: none; }
.seance-du-jour { padding: 18px 20px; border-radius: var(--rayon); background: var(--surface); border: 1px solid var(--bord); border-top: 3px solid var(--primaire); }
@media (max-width: 1100px) {
  .prog:has(.prog-panneau:not([hidden])) { grid-template-columns: minmax(0, 1fr); }
  .prog-panneau { position: static; max-height: none; order: -1; }
}
@media (max-width: 640px) {
  .cal { padding: 8px; }
  .cal__grille { gap: 2px; }
  .cal__case { min-height: 58px; padding: 2px; }
  .cal__seance { padding: 2px 3px; font-size: 0; }
  .cal__seance .puce { width: 8px; height: 8px; }
  .cal__jour-nom { padding: 0 2px 4px; font-size: .62rem; letter-spacing: 0; }
  .prog-ligne { flex-wrap: wrap; gap: 4px 12px; }
}
.prog-ajout select { flex: 1 1 100%; min-width: 0; max-width: 100%; }
/* Choix d'un groupe : liste + saisie libre (« Autre… ») */
.champ-groupe { display: flex; flex-wrap: wrap; gap: 6px; }
.champ-groupe select { flex: 1 1 12em; min-width: 0; }
.champ-groupe input { flex: 1 1 8em; min-width: 0; }
.champ-groupe [hidden] { display: none; }
/* Élèves : sélection et actions en lot */
.ens-coche { width: 2.2em; text-align: center; }
.ens-coche input { width: 18px; height: 18px; accent-color: var(--primaire); cursor: pointer; }
.ens-ligne--choisie td { background: var(--primaire-clair); }
.ens-lot { position: sticky; top: 8px; z-index: 5; margin: 0 0 12px; padding: 12px 14px; border-radius: var(--rayon); border: 1px solid var(--primaire); background: var(--surface); box-shadow: 0 6px 18px rgba(0, 0, 0, .08); }
.ens-lot__tete { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.ens-lot__actions { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.ens-lot__bloc { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ens-lot__titre { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--texte-doux); }
.ens-lot select, .ens-lot input[type=text] { font: 15px var(--police); padding: 7px 10px; border-radius: 8px; border: 1px solid var(--bord-fort); background: var(--surface); color: var(--texte); }
.ens-lot__etat { display: block; margin-top: 6px; font-size: .85rem; color: var(--texte-doux); }
.ens-lot__etat:empty { display: none; }
.ens-lot__message { margin: 0 0 10px; padding: 8px 12px; border-radius: var(--rayon); background: var(--primaire-clair); color: var(--primaire-texte); }

/* ==========================================================
   Outil « Traitement de texte »
   L'interface suit le thème du site ; la page reste blanche,
   comme une feuille A4, pour voir le document tel qu'il sera imprimé.
   ========================================================== */
.tete--outil { padding-bottom: 20px; }
.tt { position: relative; margin: 20px 0 16px; border: 1px solid var(--bord); border-radius: var(--rayon); background: var(--surface); box-shadow: var(--ombre-3d); }
.tt button { font: inherit; color: inherit; }
.tt__doc { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 10px 12px; border-bottom: 1px solid var(--bord); }
.tt__titre { flex: 1 1 220px; min-width: 0; font: 600 1.05rem var(--titre); color: var(--texte); background: transparent; border: 1px solid transparent; border-radius: 6px; padding: 6px 8px; }
.tt__titre:hover { border-color: var(--bord); }
.tt__titre:focus { outline: none; border-color: var(--primaire); background: var(--surface-2); }
.tt__fichier { display: flex; flex-wrap: wrap; gap: 4px; }
.tt__bouton-texte { background: none; border: 1px solid transparent; border-radius: 6px; padding: 6px 10px; font-size: .88rem !important; cursor: pointer; color: var(--texte); }
.tt__bouton-texte:hover, .tt__bouton-texte[aria-expanded="true"] { background: var(--surface-2); border-color: var(--bord); }
.tt__bouton-texte--fort { border-color: var(--bord-fort); font-weight: 600; }

.tt__outils { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 6px 8px; background: var(--surface-2); border-bottom: 1px solid var(--bord); position: sticky; top: var(--entete-hauteur); z-index: 5; }
.tt__groupe { display: flex; align-items: center; gap: 2px; padding-right: 6px; margin-right: 2px; border-right: 1px solid var(--bord); }
.tt__groupe:last-of-type { border-right: 0; }
.tt__outils button, .tt__couleur { display: inline-grid; place-items: center; grid-auto-flow: column; min-width: 32px; height: 32px; padding: 0 6px; border: 1px solid transparent; border-radius: 6px; background: none; cursor: pointer; color: var(--texte); }
.tt__outils button:hover, .tt__couleur:hover { background: var(--surface); border-color: var(--bord); }
.tt__outils button[aria-pressed="true"], .tt__outils button[aria-expanded="true"] { background: var(--primaire-clair); border-color: var(--primaire); }
.tt__outils svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tt__outils svg .plein { fill: currentColor; stroke: none; }
.tt__outils svg .fin { stroke-width: 1.4; }
.tt__lettre { font-family: Georgia, "Times New Roman", serif; font-size: 1rem; line-height: 1; }
.tt__lettre sup, .tt__lettre sub { font-size: .6em; }
.tt__choix { height: 32px; border: 1px solid var(--bord); border-radius: 6px; background: var(--surface); color: var(--texte); font: inherit; font-size: .85rem; padding: 0 6px; cursor: pointer; }
.tt__choix--style { width: 104px; }
.tt__choix--police { width: 132px; }
.tt__choix--taille { width: 58px; margin-left: 2px; }
.tt__choix--interligne { width: 112px; margin-left: 4px; }
.tt__couleur { position: relative; grid-auto-flow: row; grid-template-rows: 1fr 4px; row-gap: 1px; padding: 4px 6px; }
.tt__couleur svg { width: 16px; height: 16px; }
.tt__barre-couleur { width: 18px; height: 4px; border-radius: 1px; border: 1px solid rgb(0 0 0 / .2); }
.tt__couleur input { position: absolute; right: -2px; bottom: -2px; width: 14px; height: 14px; padding: 0; border: 0; opacity: 0; cursor: pointer; }
.tt__couleur::after { content: "▾"; position: absolute; right: 0; bottom: 0; font-size: 9px; line-height: 1; color: var(--texte-doux); }

.tt__pop { position: absolute; z-index: 20; display: grid; gap: 10px; width: min(320px, calc(100% - 16px)); padding: 14px; background: var(--surface); border: 1px solid var(--bord-fort); border-radius: var(--rayon); box-shadow: 0 18px 40px -12px rgb(0 0 0 / .45); font-size: .9rem; }
.tt__pop--droite { top: calc(100% - 4px); right: 12px; width: min(330px, calc(100% - 24px)); padding: 6px; gap: 2px; }
.tt__pop label { display: grid; gap: 4px; font-weight: 500; }
.tt__pop label small { font-weight: 400; color: var(--texte-doux); }
.tt__pop input[type=text], .tt__pop input[type=url], .tt__pop input[type=number] { font: inherit; padding: 7px 9px; border: 1px solid var(--bord-fort); border-radius: 6px; background: var(--surface-2); color: var(--texte); width: 100%; }
.tt__pop-ligne { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tt__pop .tt__case { display: flex; align-items: center; gap: 8px; font-weight: 400; }
.tt__pop-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tt__pop-info { margin: 0; min-height: 1.2em; color: var(--texte-doux); font-size: .85rem; }
.tt__pop-titre { margin: 6px 8px 4px; font-size: .78rem; font-family: var(--mono); text-transform: uppercase; letter-spacing: .04em; color: var(--texte-doux); }
.tt__pop--droite > button { display: grid; gap: 1px; text-align: left; padding: 8px 10px; border: 0; border-radius: 6px; background: none; cursor: pointer; }
.tt__pop--droite > button:hover { background: var(--surface-2); }
.tt__pop--droite > button span, .tt__liste-ouvrir span { font-size: .8rem; color: var(--texte-doux); }
.tt__liste { list-style: none; margin: 0; padding: 0; max-height: 320px; overflow-y: auto; }
.tt__liste li { display: flex; align-items: center; gap: 4px; border-radius: 6px; }
.tt__liste li:hover { background: var(--surface-2); }
.tt__liste-courant { box-shadow: inset 3px 0 0 var(--primaire); }
.tt__liste-ouvrir { flex: 1; min-width: 0; display: grid; text-align: left; padding: 7px 10px; background: none; border: 0; cursor: pointer; }
.tt__liste-ouvrir b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.tt__liste-suppr { background: none; border: 0; padding: 6px 8px; font-size: .78rem !important; color: var(--texte-doux) !important; cursor: pointer; border-radius: 6px; }
.tt__liste-suppr:hover { color: var(--attention) !important; background: var(--attention-fond); }

.tt__contexte { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 6px 10px; background: var(--primaire-clair); border-bottom: 1px solid var(--bord); font-size: .82rem; }
.tt__contexte > span { display: contents; }
.tt__contexte-titre { font-family: var(--mono); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; margin-right: 6px; }
.tt__contexte button { padding: 4px 8px; border: 1px solid var(--bord-fort); border-radius: 6px; background: var(--surface); cursor: pointer; font-size: .82rem !important; }
.tt__contexte button:hover { border-color: var(--primaire); }
.tt__contexte .tt__danger { color: var(--attention); }

.tt__bureau { overflow: auto; max-height: 78vh; min-height: 420px; padding: 24px 12px 32px; background: var(--fond); background-image: radial-gradient(var(--bord) 1px, transparent 1px); background-size: 18px 18px; }
.tt__echelle { width: 21cm; margin: 0 auto; }
.tt__page { box-sizing: border-box; width: 21cm; min-height: 29.7cm; padding: 2.5cm; background: #fff; color: #000; box-shadow: 0 1px 3px rgb(0 0 0 / .25), 0 12px 32px -10px rgb(0 0 0 / .45); font-family: Calibri, Carlito, Arial, sans-serif; font-size: 12pt; line-height: 1.4; outline: none; overflow-wrap: break-word; color-scheme: light; caret-color: #000; }
.tt__page::selection, .tt__page *::selection { background: #b4d5fe; color: inherit; }
.tt__page--vide > p:first-child:last-child::before { content: "Commencez à écrire votre document ici…"; color: #9a9a9a; pointer-events: none; }
.tt__page h1 { font-family: inherit; font-size: 20pt; margin: 0 0 12pt; letter-spacing: 0; line-height: 1.2; }
.tt__page h2 { font-family: inherit; font-size: 16pt; margin: 14pt 0 8pt; letter-spacing: 0; }
.tt__page h3 { font-family: inherit; font-size: 13pt; margin: 12pt 0 6pt; letter-spacing: 0; }
.tt__page p { margin: 0 0 8pt; }
.tt__page ul, .tt__page ol { margin: 0 0 8pt; padding-left: 24pt; }
.tt__page blockquote { margin: 0 0 8pt 24pt; padding-left: 10pt; border-left: 3pt solid #999; color: #444; font-style: italic; }
.tt__page a { color: #1a56c4; }
.tt__page hr { border: 0; border-top: 1px solid #999; margin: 10pt 0; }
.tt__page table { border-collapse: collapse; width: 100%; margin: 0 0 10pt; }
.tt__page td, .tt__page th { border: 1px solid #777; padding: 4pt 6pt; vertical-align: top; text-align: left; min-width: 2em; }
.tt__page th { background: #eee; font-weight: 700; }
.tt__page img { max-width: 100%; height: auto; cursor: pointer; }
.tt__page img.tt-choisie { outline: 2px solid #3b82f6; outline-offset: 2px; }
.tt__page .saut-page { position: relative; height: 0; margin: 28pt -2.5cm; border-top: 2px dashed #bbb; user-select: none; }
.tt__page .saut-page::after { content: "Saut de page"; position: absolute; left: 50%; top: -9px; transform: translateX(-50%); padding: 0 8px; background: #fff; color: #888; font: 11px/16px var(--mono); }

.tt__etat { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; padding: 7px 12px; border-top: 1px solid var(--bord); font-size: .8rem; color: var(--texte-doux); font-family: var(--mono); }
.tt__etat-sauve { flex: 1; min-width: 12rem; }
.tt__etat-sauve--alerte { color: var(--attention); }
.tt__zoom { display: flex; align-items: center; gap: 6px; }
.tt__zoom select { font: inherit; background: var(--surface-2); color: var(--texte); border: 1px solid var(--bord); border-radius: 4px; padding: 2px 4px; }

.tt-aide { max-width: 760px; margin: 0 0 32px; background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 10px 14px; font-size: .95rem; }
.tt-aide summary { cursor: pointer; font-weight: 600; }
.tt-aide ul { margin: 10px 0; padding-left: 20px; }
.tt-aide p { margin: 0; color: var(--texte-doux); }
.tt-aide kbd, .outils-tim kbd { font-family: var(--mono); font-size: .8em; padding: 1px 5px; border: 1px solid var(--bord-fort); border-bottom-width: 2px; border-radius: 4px; background: var(--surface-2); }

@media (max-width: 700px) {
  .tt { margin-left: -8px; margin-right: -8px; }
  .tt__outils { top: 0; position: relative; }
  .tt__bureau { padding: 12px 4px 20px; max-height: none; }
}

/* Cartes des outils développés pour TIMlab (page Outils) */
.outils-tim { display: grid; gap: 12px; margin: 0 0 2em; padding: 0; list-style: none; }
@media (min-width: 700px) { .outils-tim { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); } }
.outil-tim { position: relative; display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; padding: 16px; background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon); transition: border-color .15s, transform .15s; }
.outil-tim:hover { border-color: var(--primaire); transform: translateY(-2px); }
.outil-tim__icone { grid-row: span 2; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; background: var(--primaire-clair); color: var(--primaire-texte); }
.outil-tim__icone svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.outil-tim__nom { font: 700 1.05rem var(--titre); color: var(--texte); text-decoration: none; }
.outil-tim__nom::after { content: ""; position: absolute; inset: 0; border-radius: var(--rayon); }
.outil-tim__texte { margin: 0; color: var(--texte-doux); font-size: .92rem; line-height: 1.5; }

/* ==========================================================
   Outil « Tableur »
   Le cadre suit le thème du site ; la grille reste claire,
   comme une feuille de calcul imprimée.
   ========================================================== */
.tb { position: relative; margin: 20px 0 16px; border: 1px solid var(--bord); border-radius: var(--rayon); background: var(--surface); box-shadow: var(--ombre-3d); }
.tb button { font: inherit; color: inherit; }
.tb__outils svg .txt { font: 700 9px var(--police); fill: currentColor; stroke: none; }
.tb__choix-format { width: 128px; }
.tb__dec { font-family: var(--mono) !important; font-size: .78rem !important; letter-spacing: -.02em; }
.tb__fx { font-family: Georgia, serif; font-size: 1rem !important; }
.tb__pop-menu { width: 260px; gap: 0; padding: 6px; }
.tb__pop-menu button { display: block; width: 100%; text-align: left; padding: 8px 10px; border: 0; border-radius: 6px; background: none; cursor: pointer; }
.tb__pop-menu button:hover { background: var(--surface-2); }
.tt__danger { color: var(--attention) !important; }

.tb__formule { display: flex; align-items: stretch; gap: 0; border-bottom: 1px solid var(--bord); background: var(--surface); }
.tb__nom { width: 92px; flex: none; border: 0; border-right: 1px solid var(--bord); background: transparent; color: var(--texte); font: 500 .88rem var(--mono); padding: 7px 10px; text-align: center; }
.tb__fx-label { display: flex; align-items: center; justify-content: center; width: 36px; flex: none; color: var(--texte-doux); font-family: Georgia, serif; border-right: 1px solid var(--bord); }
.tb__barre { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--texte); font: .92rem var(--mono); padding: 7px 10px; }
.tb__nom:focus, .tb__barre:focus { outline: none; background: var(--surface-2); box-shadow: inset 0 -2px 0 var(--primaire); }
.tb__aide { padding: 6px 12px; font-size: .85rem; background: var(--primaire-clair); border-bottom: 1px solid var(--bord); color: var(--texte); }
.tb__aide code { font-family: var(--mono); font-weight: 600; margin-right: 8px; }

.tb__zone { position: relative; overflow: auto; height: min(62vh, 620px); min-height: 320px; background: #fff; color-scheme: light; outline: none; overscroll-behavior: contain; }
.tb__zone:focus-visible { box-shadow: inset 0 0 0 2px var(--primaire); }
.tb__grille { border-collapse: collapse; table-layout: fixed; width: max-content; font: 13.5px/1.25 Calibri, Carlito, "Segoe UI", Arial, sans-serif; color: #111; user-select: none; -webkit-user-select: none; }
.tb__grille td { height: 24px; padding: 0 5px; border: 1px solid #e2e3e5; white-space: nowrap; overflow: hidden; text-overflow: clip; vertical-align: bottom; background-clip: padding-box; cursor: cell; }
.tb__grille td > span { display: block; overflow: hidden; }
.tb__grille td.tb--deborde { overflow: visible; }
.tb__grille td.tb--deborde > span { overflow: visible; position: relative; z-index: 1; width: max-content; }
.tb__grille td.tb--retour { white-space: normal; overflow-wrap: anywhere; vertical-align: top; }
.tb__grille th { position: sticky; z-index: 3; background: #f1f3f4; color: #4a4f57; font: 500 12px var(--police); border: 1px solid #d5d8dc; height: 24px; padding: 0; text-align: center; cursor: default; }
.tb__grille thead th { top: 0; }
.tb__grille tbody th { left: 0; z-index: 2; }
.tb__grille .tb__coin { left: 0; z-index: 4; cursor: pointer; }
.tb__grille .tb__coin::after { content: ""; position: absolute; right: 3px; bottom: 3px; border: 5px solid transparent; border-right-color: #9aa0a6; border-bottom-color: #9aa0a6; }
.tb__grille th.tb--entete-actif { background: #dfe9d0; color: #2c3a12; font-weight: 700; }
.tb__grille th[data-col] { cursor: s-resize; }
.tb__grille th[data-lig] { cursor: e-resize; }
.tb__entete--filtre::before { content: "▾"; position: absolute; right: 8px; color: #3b6d00; font-size: 11px; }
.tb__redim { position: absolute; top: 0; right: -4px; width: 8px; height: 100%; cursor: col-resize; z-index: 2; }
.tb__redim:hover { background: rgb(85 130 0 / .35); }
.tb__grille tr[hidden] { display: none; }

.tb__selection { position: absolute; z-index: 2; pointer-events: none; border: 2px solid #3b7d1e; margin: -1px 0 0 -1px; box-sizing: content-box; }
.tb__selection--multiple { background: rgb(59 125 30 / .08); }

.tb__poignee { position: absolute; right: -5px; bottom: -5px; width: 8px; height: 8px; background: #3b7d1e; border: 1px solid #fff; pointer-events: auto; cursor: crosshair; }
.tb__copie { position: absolute; z-index: 2; pointer-events: none; border: 2px dashed #3b7d1e; margin: -1px 0 0 -1px; animation: tb-fourmis 1s linear infinite; }
@keyframes tb-fourmis { 50% { border-color: #8fbf6b; } }
@media (prefers-reduced-motion: reduce) { .tb__copie { animation: none; } }
.tb__recopie { position: absolute; z-index: 2; pointer-events: none; border: 2px dashed #555; margin: -1px 0 0 -1px; }
.tb__refs { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.tb__ref { position: absolute; border: 2px solid var(--coul); background: color-mix(in srgb, var(--coul) 10%, transparent); margin: -1px 0 0 -1px; }
.tb__editeur { position: absolute; z-index: 5; margin: -1px 0 0 -1px; padding: 3px 5px; border: 2px solid #3b7d1e; background: #fff; color: #111; font: 13.5px/1.25 Calibri, Carlito, "Segoe UI", Arial, sans-serif; resize: none; overflow: hidden; white-space: pre; box-shadow: 0 4px 14px rgb(0 0 0 / .18); outline: none; }
.tb__mesure { position: absolute; visibility: hidden; white-space: pre; font: 13.5px/1.25 Calibri, Carlito, "Segoe UI", Arial, sans-serif; }
.tb__suggestions { position: absolute; z-index: 6; list-style: none; margin: 0; padding: 4px; width: 340px; max-width: calc(100% - 16px); background: #fff; color: #111; border: 1px solid #c9ccd1; border-radius: 8px; box-shadow: 0 10px 28px rgb(0 0 0 / .2); font-size: 13px; }
.tb__suggestions li { display: grid; gap: 1px; padding: 6px 8px; border-radius: 5px; cursor: pointer; }
.tb__suggestions li b { font-family: var(--mono); font-size: 12.5px; }
.tb__suggestions li span { color: #5b616c; font-size: 12px; line-height: 1.35; }
.tb__suggestions li[aria-selected="true"], .tb__suggestions li:hover { background: #eaf3dc; }

.tb__graphiques { position: absolute; left: 0; top: 0; width: 0; height: 0; z-index: 4; }
.tb__graphique { position: absolute; display: grid; grid-template-rows: auto 1fr; background: #fff; border: 1px solid #c9ccd1; border-radius: 6px; box-shadow: 0 8px 24px rgb(0 0 0 / .16); overflow: hidden; color: #111; }
.tb__graphique-barre { display: flex; align-items: center; gap: 4px; padding: 3px 4px 3px 10px; background: #f1f3f4; border-bottom: 1px solid #e2e3e5; cursor: move; font-size: 12px; color: #4a4f57; }
.tb__graphique-barre span { flex: 1; font-weight: 600; }
.tb__graphique-barre button { border: 1px solid transparent; background: none; border-radius: 4px; padding: 2px 7px; cursor: pointer; font-size: 12px !important; color: #333 !important; }
.tb__graphique-barre button:hover { background: #fff; border-color: #c9ccd1; }
.tb__graphique-corps { position: relative; min-height: 0; padding: 8px; }
.tb__graphique-corps canvas { position: absolute; inset: 8px; }
.tb__graphique-vide { margin: 0; padding: 20px; color: #c5221f; font-size: 13px; }
.tb__graphique-taille { position: absolute; right: 0; bottom: 0; width: 14px; height: 14px; cursor: nwse-resize; background: linear-gradient(135deg, transparent 50%, #9aa0a6 50%, #9aa0a6 60%, transparent 60%, transparent 70%, #9aa0a6 70%, #9aa0a6 80%, transparent 80%); }

.tb__bas { display: flex; align-items: center; gap: 4px; padding: 0 8px; border-top: 1px solid var(--bord); background: var(--surface-2); min-height: 38px; flex-wrap: wrap; }
.tb__onglets { display: flex; gap: 2px; overflow-x: auto; max-width: 70%; }
.tb__onglet, .tb__onglet-champ { flex: none; padding: 7px 14px; border: 1px solid transparent; border-top: 0; border-radius: 0 0 6px 6px; background: none; cursor: pointer; font-size: .88rem !important; white-space: nowrap; }
.tb__onglet:hover { background: var(--surface); }
.tb__onglet[aria-selected="true"] { background: var(--surface); border-color: var(--bord); box-shadow: inset 0 2px 0 var(--primaire); font-weight: 600; }
.tb__onglet-champ { width: 140px; background: var(--surface); color: var(--texte); border: 1px solid var(--primaire); font: inherit; }
.tb__ajout { width: 30px; height: 30px; border: 1px solid transparent; border-radius: 6px; background: none; cursor: pointer; font-size: 1.1rem !important; }
.tb__ajout:hover { background: var(--surface); border-color: var(--bord); }
.tb__stats { margin-left: auto; font: .8rem var(--mono); color: var(--texte-doux); white-space: pre; padding: 6px 4px; }
.tb__etat-astuce { color: var(--texte-doux); }
@media (max-width: 700px) { .tb__etat-astuce { display: none; } }

.tb__voile { position: fixed; inset: 0; z-index: 40; background: rgb(10 12 16 / .45); }
.tb__dialogue { position: fixed; z-index: 41; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 40px); overflow: auto; display: grid; gap: 12px; padding: 18px; background: var(--surface); color: var(--texte); border: 1px solid var(--bord-fort); border-radius: 12px; box-shadow: 0 30px 70px rgb(0 0 0 / .45); font-size: .92rem; }
.tb__dialogue--petit { width: min(400px, calc(100vw - 24px)); }
.tb__dialogue-tete { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tb__dialogue-tete h2 { margin: 0; font-size: 1.15rem; }
.tb__fermer { width: 32px; height: 32px; border: 1px solid var(--bord); border-radius: 6px; background: none; cursor: pointer; font-size: 1.2rem !important; line-height: 1; }
.tb__dialogue label { display: grid; gap: 4px; font-weight: 500; }
.tb__dialogue input[type=text], .tb__dialogue input[type=search] { font: inherit; padding: 8px 10px; border: 1px solid var(--bord-fort); border-radius: 6px; background: var(--surface-2); color: var(--texte); width: 100%; }
.tb__dialogue .tt__case { display: flex; align-items: center; gap: 8px; font-weight: 400; }
.tb__note { margin: 0; color: var(--texte-doux); font-size: .85rem; }
.tb__types { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; border: 0; margin: 0; padding: 0; }
.tb__types legend { font-weight: 500; margin-bottom: 6px; }
.tb__types label { display: block; }
.tb__types input { position: absolute; opacity: 0; }
.tb__types span { display: grid; justify-items: center; gap: 4px; padding: 10px 6px; border: 1px solid var(--bord); border-radius: 8px; cursor: pointer; font-size: .82rem; font-weight: 500; text-align: center; }
.tb__types svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tb__types svg .plein { fill: currentColor; stroke: none; }
.tb__types input:checked + span { border-color: var(--primaire); background: var(--primaire-clair); }
.tb__types input:focus-visible + span { outline: 2px solid var(--lien); }
.tb__fn-cats { display: flex; flex-wrap: wrap; gap: 4px; }
.tb__fn-cats button { padding: 4px 10px; border: 1px solid var(--bord); border-radius: 999px; background: none; cursor: pointer; font-size: .82rem !important; }
.tb__fn-cats button[aria-pressed="true"] { background: var(--primaire-clair); border-color: var(--primaire); }
.tb__fn-liste { list-style: none; margin: 0; padding: 0; max-height: 46vh; overflow: auto; border: 1px solid var(--bord); border-radius: 8px; }
.tb__fn-liste li + li { border-top: 1px solid var(--bord); }
.tb__fn-liste button { display: grid; gap: 2px; width: 100%; text-align: left; padding: 9px 12px; border: 0; background: none; cursor: pointer; }
.tb__fn-liste button:hover, .tb__fn-liste button:focus-visible { background: var(--surface-2); }
.tb__fn-liste code { font-family: var(--mono); font-size: .85rem; font-weight: 600; }
.tb__fn-liste span { color: var(--texte-doux); font-size: .85rem; }
.tb__vide { padding: 12px; color: var(--texte-doux); }
.tb__f-outils { display: flex; gap: 4px; }
.tb__f-liste { list-style: none; margin: 0; padding: 6px 10px; max-height: 40vh; overflow: auto; border: 1px solid var(--bord); border-radius: 8px; }
.tb__f-liste label { display: flex !important; align-items: center; gap: 8px; font-weight: 400 !important; padding: 3px 0; }
.tb__menu-contexte { position: absolute; z-index: 30; min-width: 230px; padding: 5px; background: var(--surface); border: 1px solid var(--bord-fort); border-radius: 8px; box-shadow: 0 16px 36px rgb(0 0 0 / .35); }
.tb__menu-contexte button { display: block; width: 100%; text-align: left; padding: 7px 10px; border: 0; border-radius: 5px; background: none; cursor: pointer; font-size: .88rem !important; }
.tb__menu-contexte button:hover { background: var(--surface-2); }
.tb__menu-contexte hr { border: 0; border-top: 1px solid var(--bord); margin: 4px 0; }
.tt-aide code { font-family: var(--mono); font-size: .88em; background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }
@media (max-width: 700px) {
  .tb { margin-left: -8px; margin-right: -8px; }
  .tb__zone { height: 56vh; }
  .tb__types { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.tb__editeur--repos { opacity: 0; pointer-events: none; width: 2px !important; min-width: 0 !important; height: 2px !important; padding: 0; border: 0; box-shadow: none; z-index: 0; }

/* ===== Outils simples (mot de passe, empreinte, messagerie) : briques communes ===== */
.ot-carte { background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 22px; }
.ot-carte__titre { font-family: var(--titre); font-size: 1.15rem; margin: 0 0 14px; }
.ot-note { color: var(--texte-doux); font-size: .9rem; margin: 6px 0 12px; }
.ot-ligne { display: flex; flex-wrap: wrap; gap: 12px 18px; margin: 10px 0; }
.ot-ligne label { display: flex; align-items: center; gap: 8px; font-size: .92rem; }
.ot-ligne--cases { gap: 6px 16px; }
.ot-carte select, .ot-carte input[type="text"], .ot-carte input[type="number"], .ot-carte input[type="email"], .ot-carte textarea { background: var(--surface-2); color: var(--texte); border: 1px solid var(--bord-fort); border-radius: 8px; padding: 7px 10px; font: inherit; }
.ot-carte input[type="range"] { width: 100%; accent-color: var(--primaire); }
.ot-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 14px; }
.ot-onglets { display: inline-flex; gap: 4px; padding: 4px; background: var(--surface-2); border: 1px solid var(--bord); border-radius: 10px; margin-bottom: 12px; }
.ot-onglets button { border: 0; background: none; color: var(--texte-doux); padding: 7px 14px; border-radius: 7px; cursor: pointer; font: inherit; font-size: .9rem; }
.ot-onglets button[aria-selected="true"] { background: var(--surface); color: var(--texte); box-shadow: 0 1px 0 var(--bord-fort); font-weight: 600; }
.ot-explication { margin-top: 36px; }
.ot-explication h2 { font-family: var(--titre); font-size: 1.3rem; }
.ot-colonnes { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px 28px; }
.ot-colonnes h3 { font-size: 1rem; margin: 8px 0 6px; }
.ot-colonnes p, .ot-colonnes li { color: var(--texte-doux); font-size: .93rem; line-height: 1.55; }

/* ===== Testeur de mot de passe ===== */
.mdp { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.mdp__champ { display: flex; gap: 8px; }
.mdp__champ input { flex: 1; min-width: 0; font-family: var(--mono); font-size: 1.15rem; padding: 12px 14px; background: var(--surface-2); color: var(--texte); border: 1px solid var(--bord-fort); border-radius: 10px; }
.mdp__champ input:focus { outline: 2px solid var(--primaire); outline-offset: 1px; }
.mdp__oeil { border: 1px solid var(--bord-fort); background: var(--surface-2); color: var(--texte); border-radius: 10px; padding: 0 14px; cursor: pointer; font: inherit; font-size: .88rem; }
.mdp__conseil-saisie { font-size: .82rem; color: var(--texte-doux); margin: 8px 0 16px; }
.mdp__jauge { height: 10px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--bord); overflow: hidden; }
.mdp__jauge span { display: block; height: 100%; width: 0; background: var(--bord-fort); border-radius: 99px; transition: width .25s ease, background-color .25s; }
.mdp--n0 .mdp__jauge span { background: #e5484d; }
.mdp--n1 .mdp__jauge span { background: #f76b15; }
.mdp--n2 .mdp__jauge span { background: #f5c518; }
.mdp--n3 .mdp__jauge span { background: #7cc43a; }
.mdp--n4 .mdp__jauge span { background: var(--primaire); }
.mdp__verdict { margin: 10px 0 16px; min-height: 1.5em; }
.mdp__temps { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mdp__temps > div { background: var(--surface-2); border: 1px solid var(--bord); border-radius: 10px; padding: 12px 14px; }
.mdp__temps-label { margin: 0; font-size: .85rem; font-weight: 600; }
.mdp__temps-label span { display: block; font-weight: 400; color: var(--texte-doux); font-size: .78rem; margin-top: 2px; }
.mdp__temps-valeur { margin: 8px 0 0; font-family: var(--titre); font-size: 1.2rem; }
.mdp__sous-titre { font-size: .95rem; margin: 20px 0 8px; }
.mdp__criteres { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px; font-size: .9rem; }
.mdp__criteres li span { display: inline-block; width: 1.2em; font-weight: 700; }
.mdp__criteres .est-ok span { color: #7cc43a; }
.mdp__criteres .est-ko span { color: #e5484d; }
.mdp__problemes { margin-top: 16px; padding: 12px 14px; border-left: 3px solid var(--attention); background: var(--surface-2); border-radius: 0 10px 10px 0; }
.mdp__problemes-titre { margin: 0 0 6px; font-weight: 600; font-size: .92rem; }
.mdp__problemes ul { margin: 0; padding-left: 18px; font-size: .9rem; }
.mdp__problemes li { margin: 3px 0; }
.mdp__generer label { font-size: .92rem; }
.mdp__resultat { display: block; margin-top: 14px; padding: 14px; font-family: var(--mono); font-size: 1.1rem; overflow-wrap: anywhere; background: var(--surface-2); border: 1px dashed var(--bord-fort); border-radius: 10px; min-height: 1.5em; }
@media (max-width: 860px) { .mdp { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .mdp__temps, .mdp__criteres { grid-template-columns: 1fr; } }

/* ===== Calculateur d'empreinte numérique ===== */
.emp { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.emp__saisie { display: grid; gap: 20px; }
.emp__bilan { position: sticky; top: 16px; }
.emp__ligne { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--bord); }
.emp__ligne:first-child { border-top: 0; }
.emp__ligne.est-vide .emp__nom { color: var(--texte-doux); }
.emp__nom { font-size: .93rem; }
.emp__compteur { display: inline-flex; align-items: center; gap: 2px; background: var(--surface-2); border: 1px solid var(--bord); border-radius: 8px; }
.emp__pas { width: 30px; height: 30px; border: 0; background: none; color: var(--texte); font-size: 1.1rem; cursor: pointer; border-radius: 7px; }
.emp__pas:hover { background: var(--surface); }
.emp__nb { min-width: 1.4em; text-align: center; font-family: var(--mono); font-weight: 700; }
.emp__ligne select:disabled { opacity: .45; }
.emp__usages { display: grid; gap: 4px; margin-top: 6px; }
.emp__usage { padding: 10px 0; border-top: 1px solid var(--bord); }
.emp__usage-tete { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.emp__usage-tete label { font-weight: 600; font-size: .93rem; }
.emp__valeur { font-family: var(--mono); font-size: .88rem; color: var(--primaire-texte); white-space: nowrap; }
.emp__aide { margin: 2px 0 6px; color: var(--texte-doux); font-size: .82rem; }
.emp__options { margin: 8px 0 0; gap: 8px; }
.emp__options select { font-size: .85rem; padding: 5px 8px; }
.emp__total { margin: 0; font-family: var(--titre); font-size: 2.6rem; line-height: 1.1; }
.emp__total small { font-size: .95rem; color: var(--texte-doux); font-family: inherit; }
.emp__repartition { display: flex; height: 12px; margin: 14px 0 8px; border-radius: 99px; overflow: hidden; background: var(--surface-2); }
.emp__repartition span { transition: width .25s ease; }
.emp__part-fab, .emp__puce--fab { background: #8b7cf6; }
.emp__part-us, .emp__puce--us { background: var(--primaire); }
.emp__legende { font-size: .85rem; color: var(--texte-doux); margin: 0; }
.emp__legende b { color: var(--texte); margin-right: 12px; }
.emp__puce { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.emp__equivalent { font-size: .9rem; margin: 14px 0 0; padding: 10px 12px; background: var(--surface-2); border-radius: 8px; }
.emp__postes { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.emp__poste { display: grid; grid-template-columns: 1fr auto; gap: 3px 10px; font-size: .88rem; }
.emp__poste-val { font-family: var(--mono); }
.emp__poste-barre { grid-column: 1 / -1; height: 6px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.emp__poste-barre span { display: block; height: 100%; border-radius: 99px; background: var(--primaire); }
.emp__poste--fab .emp__poste-barre span { background: #8b7cf6; }
.emp__si { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.emp__si li { display: flex; justify-content: space-between; gap: 10px; font-size: .88rem; padding: 7px 10px; border: 1px solid var(--bord); border-radius: 8px; }
.emp__si b { white-space: nowrap; color: var(--primaire-texte); font-family: var(--mono); font-weight: 600; }
.emp__si li.est-faible b { color: var(--texte-doux); }
@media (max-width: 900px) { .emp { grid-template-columns: 1fr; } .emp__bilan { position: static; } }

/* ===== Messagerie d'entraînement ===== */
.msg { display: grid; grid-template-columns: 250px minmax(260px, 340px) minmax(0, 1fr); min-height: 640px; background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon); overflow: hidden; }
.msg svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.msg__cote { display: flex; flex-direction: column; gap: 14px; padding: 16px 12px; background: var(--surface-2); border-right: 1px solid var(--bord); }
.msg__nouveau { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; }
.msg__moi { margin: 0; font-family: var(--mono); font-size: .74rem; color: var(--texte-doux); word-break: break-all; }
.msg__moi span { display: block; font-family: var(--police); font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; }
.msg__dossiers { display: grid; gap: 2px; }
.msg__dossiers button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: none; color: var(--texte); font: inherit; font-size: .9rem; cursor: pointer; text-align: left; }
.msg__dossiers button span { flex: 1; }
.msg__dossiers button b { font-size: .75rem; min-width: 22px; text-align: center; padding: 1px 6px; border-radius: 99px; background: var(--primaire); color: var(--sur-primaire); }
.msg__dossiers button:hover { background: var(--surface); }
.msg__dossiers button[aria-current] { background: var(--primaire-clair); box-shadow: inset 3px 0 0 var(--primaire); font-weight: 600; }
.msg__missions { border-top: 1px solid var(--bord); padding-top: 12px; }
.msg__missions h2 { display: flex; justify-content: space-between; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; margin: 0 0 8px; color: var(--texte-doux); font-family: var(--mono); }
.msg__missions h2 span { color: var(--primaire-texte); }
.msg__progres { height: 5px; background: var(--surface); border-radius: 99px; overflow: hidden; margin-bottom: 8px; }
.msg__progres span { display: block; height: 100%; width: 0; background: var(--primaire); transition: width .3s; }
.msg__missions ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.msg__missions summary { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; font-size: .84rem; padding: 5px 4px; border-radius: 6px; list-style: none; }
.msg__missions summary::-webkit-details-marker { display: none; }
.msg__missions summary:hover { background: var(--surface); }
.msg__missions p { margin: 2px 0 8px 28px; font-size: .8rem; color: var(--texte-doux); line-height: 1.45; }
.msg__coche { flex: none; width: 18px; height: 18px; border: 1.5px solid var(--bord-fort); border-radius: 5px; display: grid; place-items: center; font-size: .72rem; font-weight: 700; }
.msg__missions .est-faite summary { color: var(--texte-doux); text-decoration: line-through; text-decoration-color: var(--bord-fort); }
.msg__missions .est-faite .msg__coche { background: var(--primaire); border-color: var(--primaire); color: var(--sur-primaire); }
.msg__cote-bas { margin-top: auto; display: grid; justify-items: start; gap: 2px; border-top: 1px solid var(--bord); padding-top: 10px; }
.msg__liste { border-right: 1px solid var(--bord); display: flex; flex-direction: column; min-width: 0; }
.msg__liste-tete { padding: 14px; border-bottom: 1px solid var(--bord); display: grid; gap: 10px; }
.msg__liste-tete h2 { margin: 0; font-size: 1.05rem; font-family: var(--titre); }
.msg__liste-tete input { font: inherit; font-size: .88rem; padding: 7px 10px; border-radius: 8px; border: 1px solid var(--bord-fort); background: var(--surface-2); color: var(--texte); }
.msg__items { list-style: none; margin: 0; padding: 0; overflow-y: auto; max-height: 720px; }
.msg__item { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; width: 100%; text-align: left; padding: 11px 14px; border: 0; border-bottom: 1px solid var(--bord); background: none; color: var(--texte); font: inherit; cursor: pointer; }
.msg__item:hover { background: var(--surface-2); }
.msg__item.est-actif { background: var(--primaire-clair); }
.msg__item-qui { font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg__item-date { display: flex; align-items: center; gap: 4px; font-size: .75rem; color: var(--texte-doux); }
.msg__item-date svg { width: 13px; height: 13px; }
.msg__item-objet { grid-column: 1 / -1; font-size: .86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg__item-extrait { grid-column: 1 / -1; font-size: .8rem; color: var(--texte-doux); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg__item.est-non-lu { box-shadow: inset 3px 0 0 var(--primaire); }
.msg__item.est-non-lu .msg__item-qui, .msg__item.est-non-lu .msg__item-objet { font-weight: 700; }
.msg__drapeau { display: inline-grid; place-items: center; width: 15px; height: 15px; margin-right: 5px; border-radius: 4px; background: var(--attention); color: #fff; font-style: normal; font-size: .7rem; font-weight: 700; vertical-align: 1px; }
.msg__vide { padding: 30px 16px; color: var(--texte-doux); font-size: .9rem; text-align: center; }
.msg__lecture { min-width: 0; padding: 18px 22px 26px; }
.msg__accueil { height: 100%; min-height: 300px; display: grid; place-content: center; justify-items: center; text-align: center; color: var(--texte-doux); }
.msg__accueil svg { width: 54px; height: 54px; stroke-width: 1.2; opacity: .6; }
.msg__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding-bottom: 14px; border-bottom: 1px solid var(--bord); margin-bottom: 16px; }
.msg__signaler { color: var(--attention) !important; }
.msg__message h2 { font-family: var(--titre); font-size: 1.3rem; margin: 0 0 12px; }
.msg__entetes { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 0 0 18px; font-size: .88rem; }
.msg__entetes dt { color: var(--texte-doux); }
.msg__entetes dd { margin: 0; word-break: break-word; }
.msg__entetes dd span, .msg__discret { color: var(--texte-doux); font-size: .84rem; }
.msg__corps { line-height: 1.65; font-size: .95rem; overflow-wrap: anywhere; }
.msg__corps a { color: var(--lien); }
.msg__pj { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.msg__pj li { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--bord-fort); border-radius: 8px; background: var(--surface-2); font-size: .85rem; }
.msg__pj small { color: var(--texte-doux); }
.msg__pj button { border: 0; background: none; color: var(--texte-doux); cursor: pointer; font-size: 1.1rem; line-height: 1; padding: 0 2px; }
.msg__pj--edition { margin: 8px 0 0; }
.msg__pj--edition:empty { display: none; }
.msg__alerte { margin: 0 0 18px; padding: 12px 14px; border-radius: 8px; border-left: 3px solid var(--attention); background: var(--attention-fond); font-size: .9rem; }
.msg__alerte--ok { border-left-color: var(--primaire); background: var(--primaire-clair); }
.msg__alerte ul { margin: 6px 0 0; padding-left: 18px; }
.msg__alerte li { margin: 3px 0; }
.msg__bilan { margin-top: 22px; border-top: 1px solid var(--bord); padding-top: 12px; font-size: .88rem; }
.msg__bilan summary { cursor: pointer; color: var(--texte-doux); }
.msg__redaction { display: grid; gap: 8px; }
.msg__redaction-tete { display: flex; justify-content: space-between; align-items: center; }
.msg__redaction-tete h2 { margin: 0; font-family: var(--titre); font-size: 1.2rem; }
.msg__champ { display: grid; grid-template-columns: 56px 1fr; align-items: center; gap: 8px; border-bottom: 1px solid var(--bord); padding: 3px 0; }
.msg__champ > span, .msg__champ > label { color: var(--texte-doux); font-size: .88rem; }
.msg__champ input { width: 100%; font: inherit; padding: 8px 4px; border: 0; background: none; color: var(--texte); }
.msg__champ input:focus { outline: none; }
.msg__champ:focus-within { border-bottom-color: var(--primaire); }
.msg__adr-zone { position: relative; }
.msg__suggestions { position: absolute; z-index: 10; left: 0; right: 0; top: 100%; list-style: none; margin: 2px 0 0; padding: 4px; background: var(--surface); border: 1px solid var(--bord-fort); border-radius: 8px; box-shadow: 0 14px 30px -10px rgb(0 0 0 / .45); }
.msg__suggestions button { display: block; width: 100%; text-align: left; padding: 7px 9px; border: 0; border-radius: 6px; background: none; color: var(--texte); font: inherit; font-size: .88rem; cursor: pointer; }
.msg__suggestions button span { color: var(--texte-doux); font-size: .8rem; }
.msg__suggestions button.est-actif, .msg__suggestions button:hover { background: var(--primaire-clair); }
.msg__copies { justify-self: end; border: 0; background: none; color: var(--lien); font: inherit; font-size: .84rem; cursor: pointer; padding: 2px 0; }
.msg__redaction textarea { width: 100%; min-height: 260px; resize: vertical; font: inherit; font-size: .95rem; line-height: 1.6; padding: 12px; border: 1px solid var(--bord-fort); border-radius: 8px; background: var(--surface-2); color: var(--texte); margin-top: 6px; }
.msg__redaction textarea:focus { outline: 2px solid var(--primaire); outline-offset: 0; }
.msg__redaction-bas { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 4px; }
.msg__joindre { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.msg__joindre svg { width: 15px; height: 15px; }
.msg__relecture-boite { margin-top: 10px; padding: 14px 16px; border: 1px solid var(--bord-fort); border-radius: var(--rayon); background: var(--surface-2); }
.msg__relecture-boite h3 { margin: 0 0 8px; font-size: 1rem; }
.msg__relecture { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; font-size: .88rem; }
.msg__rl { display: flex; gap: 9px; align-items: flex-start; line-height: 1.45; }
.msg__rl span { flex: none; width: 18px; height: 18px; margin-top: 1px; border-radius: 50%; display: grid; place-items: center; font-size: .7rem; font-weight: 700; color: #fff; }
.msg__rl--erreur span { background: #e5484d; }
.msg__rl--alerte span { background: #f76b15; }
.msg__rl--conseil span { background: #6e7bf2; font-family: Georgia, serif; font-style: italic; }
.msg__rl--ok span { background: var(--primaire); color: var(--sur-primaire); }
.msg__rl--ok { color: var(--texte-doux); }
.msg__toast { position: fixed; z-index: 60; left: 50%; bottom: 24px; transform: translateX(-50%); max-width: calc(100% - 32px); padding: 10px 16px; border-radius: 10px; background: var(--texte); color: var(--fond); font-size: .9rem; font-weight: 500; box-shadow: 0 12px 30px rgb(0 0 0 / .35); }
dialog.msg__dialogue { position: fixed; inset: 0; margin: auto; height: fit-content; width: min(520px, calc(100% - 32px)); max-height: calc(100vh - 40px); overflow: auto; color: var(--texte); padding: 20px; }
dialog.msg__dialogue::backdrop { background: rgb(0 0 0 / .5); }
.msg__dialogue h2 { margin: 0 0 8px; font-family: var(--titre); font-size: 1.2rem; }
.msg__dialogue code { font-family: var(--mono); font-size: .84em; word-break: break-all; background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }
.msg__dialogue textarea { width: 100%; font: inherit; padding: 10px; border: 1px solid var(--bord-fort); border-radius: 8px; background: var(--surface-2); color: var(--texte); }
.msg__carnet { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.msg__carnet li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--bord); }
.msg__carnet div { display: grid; gap: 1px; min-width: 0; }
.msg__carnet span { font-size: .8rem; color: var(--texte-doux); }
.msg__carnet code { font-size: .78rem; background: none; padding: 0; color: var(--texte-doux); }
@media (max-width: 1100px) { .msg { grid-template-columns: 220px minmax(0, 1fr); } .msg__lecture { grid-column: 1 / -1; border-top: 1px solid var(--bord); } }
@media (max-width: 700px) {
  .msg { grid-template-columns: 1fr; }
  .msg__cote { border-right: 0; border-bottom: 1px solid var(--bord); }
  .msg__liste { border-right: 0; }
  .msg__items { max-height: 380px; }
  .msg__lecture { padding: 16px; }
}
dialog.msg__dialogue:not([open]) { display: none; }

/* ===== Couleurs et contraste ===== */
.cl { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.cl__contraste { grid-row: span 2; }
.cl__duo { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: end; }
.cl__choix label { display: block; font-size: .85rem; color: var(--texte-doux); margin-bottom: 5px; }
.cl__champ-couleur { display: flex; align-items: center; gap: 6px; padding: 4px; border: 1px solid var(--bord-fort); border-radius: 10px; background: var(--surface-2); }
.cl__champ-couleur input[type="color"], .cl input[type="color"] { width: 40px; height: 34px; padding: 0; border: 0; border-radius: 7px; background: none; cursor: pointer; flex: none; }
.cl input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.cl input[type="color"]::-webkit-color-swatch { border: 1px solid var(--bord-fort); border-radius: 7px; }
.cl__champ-couleur input[type="text"] { width: 100%; min-width: 0; border: 0; background: none; color: var(--texte); font-family: var(--mono); font-size: 1rem; text-transform: uppercase; padding: 4px; }
.cl__champ-couleur input.est-invalide { color: var(--attention); }
.cl__inverser { width: 38px; height: 44px; border: 1px solid var(--bord-fort); background: var(--surface-2); color: var(--texte); border-radius: 10px; cursor: pointer; font-size: 1.1rem; }
.cl__vision { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 14px 0; font-size: .88rem; }
.cl__vision select { max-width: 100%; }
.cl__apercu { border-radius: var(--rayon); padding: 22px; border: 1px solid var(--bord); transition: background-color .15s, color .15s; }
.cl__apercu-titre { margin: 0 0 6px; font-family: var(--titre); font-size: 1.7rem; font-weight: 700; line-height: 1.15; }
.cl__apercu-texte { margin: 0 0 8px; font-size: 1rem; line-height: 1.5; }
.cl__apercu-petit { margin: 0 0 14px; font-size: .78rem; }
.cl__apercu-bouton { display: inline-block; padding: 8px 16px; border-radius: 8px; background: var(--cl-texte); color: var(--cl-fond); font-weight: 600; font-size: .9rem; }
.cl__resultat { display: flex; align-items: center; gap: 16px; margin: 16px 0 8px; padding: 12px 16px; border-radius: 10px; background: var(--surface-2); border-left: 4px solid var(--bord-fort); }
.cl__resultat.cl--n4 { border-left-color: var(--primaire); }
.cl__resultat.cl--n3 { border-left-color: #7cc43a; }
.cl__resultat.cl--n2 { border-left-color: #f76b15; }
.cl__resultat.cl--n0 { border-left-color: #e5484d; }
.cl__ratio { margin: 0; font-family: var(--titre); font-size: 2.2rem; font-weight: 700; line-height: 1; white-space: nowrap; }
.cl__ratio small { font-size: 1rem; color: var(--texte-doux); }
.cl__ratio-texte { margin: 0; font-size: .9rem; }
.cl__normes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px; font-size: .86rem; }
.cl__normes small { display: block; color: var(--texte-doux); font-size: .76rem; margin-left: 1.4em; }
.cl__normes li > span:first-child { display: inline-block; width: 1.4em; font-weight: 700; }
.cl__normes .est-ok > span:first-child { color: #7cc43a; }
.cl__normes .est-ko > span:first-child { color: #e5484d; }
.cl__correction { display: inline-flex; align-items: center; gap: 7px; }
.cl__correction i, .cl__pipette i { display: inline-block; width: 16px; height: 16px; border-radius: 4px; border: 1px solid var(--bord-fort); }
.cl__nuancier { list-style: none; margin: 14px 0 6px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.cl__nuancier:empty { display: none; }
.cl__couleur { display: grid; gap: 2px; border: 1px solid var(--bord); border-radius: 10px; overflow: hidden; background: var(--surface-2); padding-bottom: 6px; }
.cl__pastille { display: flex; flex-direction: column; justify-content: space-between; height: 78px; padding: 8px 10px; font-family: var(--titre); font-weight: 700; font-size: 1.1rem; }
.cl__pastille small { font-family: var(--mono); font-size: .72rem; font-weight: 500; }
.cl__code { border: 0; background: none; color: var(--texte); font-family: var(--mono); font-size: .8rem; text-align: left; padding: 2px 10px; cursor: pointer; }
.cl__code:hover { color: var(--primaire-texte); text-decoration: underline; }
.cl__code--doux { color: var(--texte-doux); font-size: .7rem; }
.cl__envoyer { display: flex; gap: 4px; padding: 4px 8px 0; }
.cl__envoyer button { flex: 1; border: 1px solid var(--bord-fort); background: var(--surface); color: var(--texte); border-radius: 6px; font: inherit; font-size: .74rem; padding: 3px 0; cursor: pointer; }
.cl__envoyer button:hover { border-color: var(--primaire); }
.cl__depot { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 10px; min-height: 120px; padding: 14px; border: 2px dashed var(--bord-fort); border-radius: var(--rayon); color: var(--texte-doux); font-size: .9rem; text-align: center; }
.cl__depot.est-survol { border-color: var(--primaire); background: var(--primaire-clair); }
.cl__depot canvas { flex-basis: 100%; max-width: 100%; height: auto; max-height: 320px; object-fit: contain; border-radius: 8px; cursor: crosshair; }
.cl__depot.a-image { justify-content: flex-start; }
.cl__pipette { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 10px 0 0; font-size: .88rem; }
.cl__pipette small { flex-basis: 100%; color: var(--texte-doux); }
.cl__pipette .cl__envoyer { padding: 0; }
.cl__pipette .cl__envoyer button { padding: 3px 10px; }
.cl__copie { position: fixed; z-index: 60; left: 50%; bottom: 24px; transform: translate(-50%, 20px); margin: 0; padding: 10px 16px; border-radius: 10px; background: var(--texte); color: var(--fond); font-weight: 500; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.cl__copie.est-visible { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 900px) { .cl { grid-template-columns: 1fr; } .cl__contraste { grid-row: auto; } }
@media (max-width: 480px) { .cl__duo { grid-template-columns: 1fr; } .cl__inverser { justify-self: center; transform: rotate(90deg); } .cl__normes { grid-template-columns: 1fr; } }

/* ===== Présentation ===== */
.pr { background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon); overflow: hidden; }
.pr svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pr__barre-doc { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 10px 14px; border-bottom: 1px solid var(--bord); }
.pr__titre { font: 600 1.05rem var(--titre); color: var(--texte); background: none; border: 1px solid transparent; border-radius: 6px; padding: 5px 8px; min-width: 0; width: min(380px, 100%); }
.pr__titre:hover { border-color: var(--bord); }
.pr__titre:focus { outline: none; border-color: var(--primaire); background: var(--surface-2); }
.pr__espace { flex: 1; }
.pr__presenter { white-space: nowrap; }
.pr__outils { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px 10px; border-bottom: 1px solid var(--bord); background: var(--surface-2); }
.pr__groupe { display: flex; align-items: center; gap: 2px; padding-right: 6px; margin-right: 2px; border-right: 1px solid var(--bord); }
.pr__groupe:last-child { border-right: 0; }
.pr__outils button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-width: 32px; height: 32px; padding: 0 6px; border: 0; border-radius: 6px; background: none; color: var(--texte); font: inherit; font-size: .88rem; cursor: pointer; }
.pr__outils button:hover:not(:disabled) { background: var(--surface); }
.pr__outils button[aria-pressed="true"] { background: var(--primaire-clair); box-shadow: inset 0 0 0 1px var(--primaire); }
.pr__outils button:disabled, .pr__outils select:disabled, .pr__outils input:disabled { opacity: .38; cursor: default; }
.pr__outils .pr__large { padding: 0 9px; }
.pr__outils select { height: 32px; font: inherit; font-size: .85rem; color: var(--texte); background: var(--surface); border: 1px solid var(--bord-fort); border-radius: 6px; padding: 0 4px; }
.pr__outils [data-pr-style="police"] { width: 132px; }
.pr__petit-label { display: inline-flex; align-items: center; gap: 5px; font-size: .82rem; color: var(--texte-doux); margin: 0 4px; }
.pr__couleur { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 6px; cursor: pointer; }
.pr__couleur:hover { background: var(--surface); }
.pr__couleur span { font-weight: 700; border-bottom: 4px solid currentColor; line-height: 1.1; padding: 0 2px; }
.pr__couleur--fond span { width: 18px; height: 18px; border-radius: 4px; border: 1px solid var(--bord-fort); padding: 0; }
.pr__couleur--fond span.est-vide { background: linear-gradient(135deg, transparent 45%, #e5484d 45%, #e5484d 55%, transparent 55%) !important; }
.pr__couleur input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.pr__menu-zone { position: relative; }
.pr__menu { position: absolute; z-index: 40; top: calc(100% + 4px); left: 0; min-width: 200px; padding: 5px; background: var(--surface); border: 1px solid var(--bord-fort); border-radius: 8px; box-shadow: 0 16px 36px rgb(0 0 0 / .35); display: grid; gap: 2px; }
.pr__barre-doc .pr__menu { left: auto; right: 0; }
.pr__menu button { display: flex !important; justify-content: flex-start !important; width: 100%; text-align: left; padding: 7px 10px !important; height: auto !important; border: 0; border-radius: 5px; background: none; color: var(--texte); font: inherit; font-size: .88rem; cursor: pointer; }
.pr__menu button:hover { background: var(--surface-2) !important; }
.pr__menu--gabarits { grid-template-columns: repeat(2, 150px); }
.pr__menu--gabarits button { flex-direction: column; align-items: flex-start !important; gap: 5px !important; }
.pr__gabarit-mini { position: relative; display: block; width: 128px; height: 72px; background: var(--surface-2); border: 1px solid var(--bord-fort); border-radius: 4px; }
.pr__gabarit-mini i { position: absolute; border-radius: 2px; background: var(--bord-fort); }
.pr__gabarit-mini .pr__g-titre { background: var(--texte-doux); }
.pr__gabarit-mini .pr__g-image { background: none; border: 1px dashed var(--texte-doux); }
.pr__gabarit-mini .pr__g-forme { background: var(--primaire); }
.pr__menu--formes { grid-template-columns: repeat(4, 44px); min-width: 0; }
.pr__menu--formes button { justify-content: center !important; padding: 6px !important; }
.pr__menu--formes svg { width: 26px; height: 26px; fill: var(--primaire); stroke: var(--texte); stroke-width: 4; }
.pr__corps { display: grid; grid-template-columns: 190px minmax(0, 1fr); min-height: 520px; }
.pr__vignettes { list-style: none; margin: 0; padding: 12px 10px; display: flex; flex-direction: column; gap: 10px; border-right: 1px solid var(--bord); background: var(--surface-2); overflow-y: auto; max-height: 680px; }
.pr__vignette { position: relative; display: grid; grid-template-columns: 18px 1fr; gap: 6px; align-items: start; }
.pr__vignette.est-cible .pr__mini { box-shadow: 0 -3px 0 var(--primaire); }
.pr__num { font-family: var(--mono); font-size: .72rem; color: var(--texte-doux); text-align: right; padding-top: 2px; }
.pr__mini { display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 2px solid var(--bord-fort); border-radius: 6px; overflow: hidden; background: none; cursor: pointer; position: relative; }
.pr__vignette.est-active .pr__mini { border-color: var(--primaire); }
.pr__mini-scene { position: absolute; left: 0; top: 0; width: 960px; height: 540px; transform-origin: 0 0; transform: scale(calc(148 / 960)); pointer-events: none; }
.pr__vignette-actions { position: absolute; right: 4px; top: 4px; display: none; gap: 2px; }
.pr__vignette:hover .pr__vignette-actions, .pr__vignette:focus-within .pr__vignette-actions { display: flex; }
.pr__vignette-actions button { width: 22px; height: 22px; border: 0; border-radius: 4px; background: rgb(0 0 0 / .65); color: #fff; font-size: .8rem; cursor: pointer; line-height: 1; }
.pr__ajout { width: calc(100% - 24px); margin-left: 24px; padding: 8px; border: 1px dashed var(--bord-fort); border-radius: 6px; background: none; color: var(--texte-doux); font: inherit; font-size: .85rem; cursor: pointer; }
.pr__ajout:hover { color: var(--texte); border-color: var(--primaire); }
.pr__centre { display: flex; flex-direction: column; min-width: 0; padding: 0 0 12px; }
.pr__scene-zone { position: relative; overflow: hidden; padding: 16px; outline: none; }
.pr__scene-zone.est-survol { background: var(--primaire-clair); }
.pr__scene { position: relative; width: 960px; height: 540px; transform-origin: 0 0; box-shadow: 0 10px 30px rgb(0 0 0 / .35); }
.pr-diapo { position: absolute; inset: 0; width: 960px; height: 540px; overflow: hidden; }
.pr-el { position: absolute; box-sizing: border-box; }
.pr-el--texte { line-height: 1.25; overflow-wrap: break-word; }
.pr-el__texte { min-height: 100%; outline: none; padding: 4px 6px; box-sizing: border-box; }
.pr-el__texte ul, .pr-el__texte ol { margin: 0; padding-left: 1.15em; }
.pr-el__texte li { margin: 0 0 .3em; }
.pr-el__texte li::marker { color: currentColor; }
.pr__scene .pr-el.est-vide .pr-el__texte::before { content: attr(data-indice); opacity: .45; pointer-events: none; position: absolute; left: 6px; top: 4px; right: 6px; }
.pr__scene .pr-el.est-vide.est-edition .pr-el__texte::before { content: none; }
.pr__scene .pr-el--texte.est-vide { outline: 1.5px dashed rgb(128 128 128 / .6); outline-offset: -1px; }
.pr-el.est-vide li::marker { color: transparent; }
.pr-el--image img { width: 100%; height: 100%; object-fit: contain; display: block; }
.pr-el--image.est-vide { display: flex; align-items: center; justify-content: center; border: 2px dashed rgb(128 128 128 / .6); color: rgb(128 128 128); font: 18px var(--police); text-align: center; }
.pr-el--image.est-vide span { display: grid; justify-items: center; gap: 10px; }
.pr-el--image.est-vide svg { width: 48px; height: 48px; }
.pr-el--forme svg { width: 100%; height: 100%; display: block; overflow: visible; }
.pr__scene .pr-el { cursor: move; }
.pr__scene .pr-el.est-edition { cursor: text; }
.pr__poignees { position: absolute; pointer-events: none; outline: calc(1.5px * var(--k)) solid #3b82f6; z-index: 5; }
.pr__poignees.est-edition { outline-style: dashed; }
.pr__poignees span { position: absolute; width: calc(10px * var(--k)); height: calc(10px * var(--k)); background: #fff; border: calc(1.5px * var(--k)) solid #3b82f6; border-radius: 2px; pointer-events: auto; transform: translate(-50%, -50%); }
.pr__poignees.est-edition span { display: none; }
.pr__poignees [data-poignee="nw"] { left: 0; top: 0; cursor: nwse-resize; }
.pr__poignees [data-poignee="n"] { left: 50%; top: 0; cursor: ns-resize; }
.pr__poignees [data-poignee="ne"] { left: 100%; top: 0; cursor: nesw-resize; }
.pr__poignees [data-poignee="e"] { left: 100%; top: 50%; cursor: ew-resize; }
.pr__poignees [data-poignee="se"] { left: 100%; top: 100%; cursor: nwse-resize; }
.pr__poignees [data-poignee="s"] { left: 50%; top: 100%; cursor: ns-resize; }
.pr__poignees [data-poignee="sw"] { left: 0; top: 100%; cursor: nesw-resize; }
.pr__poignees [data-poignee="w"] { left: 0; top: 50%; cursor: ew-resize; }
.pr__guides { position: absolute; inset: 0; pointer-events: none; z-index: 6; }
.pr__guide { position: absolute; background: #ec4899; }
.pr__guide--v { left: 50%; top: 0; bottom: 0; width: 1px; }
.pr__guide--h { top: 50%; left: 0; right: 0; height: 1px; }
.pr__notes { display: grid; gap: 4px; margin: 0 16px; font-size: .82rem; color: var(--texte-doux); }
.pr__notes textarea { font: inherit; font-size: .9rem; color: var(--texte); background: var(--surface-2); border: 1px solid var(--bord); border-radius: 8px; padding: 8px 10px; resize: vertical; }
.pr__docs { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 6px; max-height: 55vh; overflow: auto; }
.pr__docs li { display: flex; align-items: center; gap: 6px; padding: 6px; border: 1px solid var(--bord); border-radius: 8px; }
.pr__docs li.est-courant { border-color: var(--primaire); }
.pr__doc-ouvrir { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; border: 0; background: none; color: var(--texte); font: inherit; text-align: left; cursor: pointer; }
.pr__doc-ouvrir small { display: block; color: var(--texte-doux); font-size: .78rem; }
.pr__doc-mini { position: relative; flex: none; width: 96px; height: 54px; overflow: hidden; border-radius: 4px; border: 1px solid var(--bord-fort); }
.pr__doc-mini .pr-diapo { transform: scale(.1); transform-origin: 0 0; }
.est-danger { color: var(--attention) !important; }
.tt__etat--alerte { color: var(--attention); }
/* projection */
.pr-projection { position: fixed; inset: 0; z-index: 1000; background: #000; outline: none; cursor: pointer; }
.pr-projection__scene { position: absolute; inset: 0; overflow: hidden; }
.pr-projection__diapo { position: absolute; left: 50%; top: 50%; width: 960px; height: 540px; transform-origin: 50% 50%; }
.pr-trans-fondu { animation: pr-fondu .4s ease both; }
.pr-trans-glisser { animation: pr-glisser .4s ease both; }
.pr-trans-glisser.pr-trans--retour { animation-name: pr-glisser-retour; }
@keyframes pr-fondu { from { opacity: 0; } }
@keyframes pr-glisser { from { opacity: 0; margin-left: 120px; } }
@keyframes pr-glisser-retour { from { opacity: 0; margin-left: -120px; } }
.pr-projection__barre { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 99px; background: rgb(20 22 27 / .75); color: #fff; font: 500 .85rem var(--police); opacity: 0; transition: opacity .2s; }
.pr-projection:hover .pr-projection__barre { opacity: 1; }
.pr-projection__barre button { border: 0; background: none; color: #fff; font: inherit; cursor: pointer; padding: 4px 8px; border-radius: 6px; font-size: .9rem; }
.pr-projection__barre button:hover { background: rgb(255 255 255 / .15); }
body.pr-en-projection { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .pr-trans-fondu, .pr-trans-glisser { animation: none; } }
@media (max-width: 760px) {
  .pr__corps { grid-template-columns: 1fr; }
  .pr__vignettes { flex-direction: row; max-height: none; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--bord); }
  .pr__vignette { flex: none; width: 130px; }
  .pr__vignettes > li:last-child { flex: none; display: flex; align-items: center; }
  .pr__ajout { margin: 0; width: auto; white-space: nowrap; }
}
.pr { margin-bottom: 20px; }
.pr__outils button, .pr__petit-label { white-space: nowrap; }
@media (max-width: 760px) {
  .pr__groupe { flex-wrap: wrap; border-right: 0; }
  .pr__outils [data-pr-style="police"] { width: 120px; }
}
