/* =====================================================================
   Dashboard Formation — Facultatieve Technologies
   Feuille unique pour les six écrans du module : accueil, banque de quiz,
   éditeur, pilotage, vidéoprojecteur, téléphone du candidat.
   ===================================================================== */

:root {
  /* Charte FT (reprise de l'écran expéditions) */
  --orange:    #fc9004;
  --orange-3:  #ca7303;
  --orange-05: #fedeb4;
  --slate:     #3a474d;

  /* Chrome de l'application (barre du haut, menu, pupitres). C'est le gris
     bleuté FT — les --slate-6/7 étaient trop proches du noir. */
  --ardoise:      #3a474d;
  --ardoise-clair: #46555c;
  --ardoise-txt:  #e3e9eb;
  --ardoise-doux: #a5b2b8;
  --slate-1:   #d2d9dd;
  --slate-2:   #b4bcc0;
  --slate-4:   #778187;
  --slate-6:   #232b2e;
  --slate-7:   #171c1f;
  --gris-05:   #f6f6f6;
  --gris-1:    #ecedee;
  --gris-2:    #d9dbdd;
  --gris-6:    #83888b;

  --ok:        #4fa172;
  --danger:    #e0594c;
  --info:      #4a7c94;

  /* Les quatre réponses : ni couleur ni forme par lettre (26/09/2026, « je
     ne veux pas ces couleurs », « j'aime pas les formes non plus »). Toutes
     à l'ardoise FT, la lettre dans un même carré arrondi les distingue.
     Seule la bonne réponse, une fois révélée, passe au vert. */
  --rep-a: var(--ardoise);
  --rep-b: var(--ardoise);
  --rep-c: var(--ardoise);
  --rep-d: var(--ardoise);

  --rayon: 10px;
  --ombre: 0 1px 2px rgba(23, 28, 31, .08), 0 6px 18px rgba(23, 28, 31, .06);
  --police: "Segoe UI", Roboto, -apple-system, "Helvetica Neue", Arial, sans-serif;

  /* Hauteur de la barre du haut : ce qui se colle dessous (menu, scène du
     four, pupitres) la lit ici. Plus basse sur téléphone (voir 760 px). */
  --haut-barre: 62px;
}

* { box-sizing: border-box; }

html {
  background: var(--gris-05);   /* pas d'éclair blanc entre deux pages */
}

/* Fondu natif d'une page à l'autre (Chrome/Edge). Les navigateurs qui ne
   connaissent pas la règle l'ignorent : on retombe sur une navigation
   classique, sans rien casser. */
@view-transition { navigation: auto; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--police);
  color: var(--slate-6);
  background: var(--gris-05);
  -webkit-text-size-adjust: 100%;
}

a { color: var(--orange-3); }

/* --- Structure ------------------------------------------------------ */

.barre {
  view-transition-name: barre-haut;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 22px;
  height: var(--haut-barre);
  background: var(--ardoise);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 30;
}
/* Le nom du dashboard : « FT Academy » (27/10/2026 ; « FT Learning » depuis
   le 26/09/2026, « Formation » avant), écrit tel quel — plus en capitales. */
.barre .marque {
  font-weight: 700;
  letter-spacing: .01em;
  font-size: 16px;
  white-space: nowrap;
  color: var(--orange);
  text-decoration: none;
}
.barre .fil { color: var(--slate-2); font-size: 14px; }
.barre .fil a { color: var(--slate-1); text-decoration: none; }
.barre .fil a:hover { color: #fff; }
.barre .pousse { margin-left: auto; }
/* Le logo FT, en haut à droite de chaque page qui a la barre (26/09/2026,
   « ajoute notre logo en haut à droite »). Un pseudo-élément : aucune page
   n'a à l'écrire. Quand la barre pousse déjà des éléments à droite
   (.pousse), il se range juste après eux. */
.barre::after {
  content: "";
  order: 99;
  flex: 0 0 auto;
  margin-left: auto;
  width: 66px;
  height: 34px;
  background: url("../img/logo-ft.svg") right center / contain no-repeat;
}
.barre:has(> .pousse)::after { margin-left: 4px; }
.barre .qui { font-size: 13px; color: var(--slate-2); }

.page { max-width: 1180px; margin: 0 auto; padding: 24px 22px 60px; }
.page.large { max-width: 1520px; }

h1 { font-size: 24px; margin: 0 0 6px; font-weight: 650; }
h2 { font-size: 17px; margin: 28px 0 12px; font-weight: 650; }
.sous { color: var(--gris-6); font-size: 14px; margin: 0 0 22px; }

/* --- Cartes et grilles ---------------------------------------------- */

.grille { display: grid; gap: 16px; }
.grille.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grille.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grille.auto { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

.carte {
  background: #fff;
  border: 1px solid var(--gris-2);
  border-radius: var(--rayon);
  box-shadow: var(--ombre);
  padding: 18px;
}
.carte.lien { text-decoration: none; color: inherit; display: block; transition: .12s; }
.carte.lien:hover { border-color: var(--orange); transform: translateY(-1px); }
.carte h3 { margin: 0 0 6px; font-size: 16px; font-weight: 650; }
.carte p { margin: 0; color: var(--gris-6); font-size: 13.5px; line-height: 1.5; }

/* --- Étiquette de famille sur les cartes ---------------------------- */

.etiquette-langue {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--gris-1);
  color: var(--slate-4);
}
.etiquette-langue { background: #dde7ec; color: #2d6e9e; text-transform: uppercase; }
.etiquette-langue.fr { background: var(--orange-05); color: var(--orange-3); }

/* --- Boutons -------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--gris-2);
  background: #fff;
  color: var(--slate-6);
  border-radius: 8px;
  padding: 9px 16px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: .12s;
}
.btn:hover:not(:disabled) { border-color: var(--slate-2); background: var(--gris-05); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primaire { background: var(--orange); border-color: var(--orange); color: #241703; }
.btn.primaire:hover:not(:disabled) { background: var(--orange-3); border-color: var(--orange-3); color: #fff; }
.btn.sombre { background: var(--ardoise); border-color: var(--ardoise); color: #fff; }
.btn.sombre:hover:not(:disabled) { background: var(--ardoise-clair); border-color: var(--ardoise-clair); }
.btn.danger { color: var(--danger); border-color: #f0c5c0; }
.btn.danger:hover:not(:disabled) { background: #fdf2f1; }
.btn.gros { padding: 13px 22px; font-size: 15.5px; }
.btn.plein { width: 100%; }

.actions { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; }

/* --- Formulaires ---------------------------------------------------- */

label.champ { display: block; margin-bottom: 14px; }
label.champ > span {
  display: block;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--slate-4);
  margin-bottom: 5px;
}
input[type=text], input[type=search], input[type=date], input[type=email], input[type=password], textarea, select {
  width: 100%;
  border: 1px solid var(--gris-2);
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
  font-size: 14.5px;
  color: var(--slate-6);
  background: #fff;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px var(--orange-05);
}
textarea { resize: vertical; min-height: 80px; line-height: 1.5; }

/* --- Tableaux ------------------------------------------------------- */

table.liste { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--rayon); overflow: hidden; box-shadow: var(--ombre); }
table.liste th, table.liste td { padding: 11px 14px; text-align: left; font-size: 14px; border-bottom: 1px solid var(--gris-1); }
table.liste th { background: var(--gris-05); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--gris-6); font-weight: 700; }
table.liste tr:last-child td { border-bottom: none; }
table.liste tr:hover td { background: #fcfcfd; }

/* Sur téléphone, un tableau passé par F.fiches (commun.js) devient une pile
   de fiches : une par ligne, la première cellule en titre, les suivantes
   précédées du titre de leur colonne (data-l). */
@media (max-width: 600px) {
  table.liste.fiches, table.liste.fiches tbody { display: block; background: none; box-shadow: none;
                                                 border-radius: 0; overflow: visible; }
  table.liste.fiches thead { display: none; }
  table.liste.fiches tr { display: block; background: #fff; border: 1px solid var(--gris-2);
                          border-radius: 12px; box-shadow: var(--ombre); padding: 10px 14px 11px; margin-bottom: 10px; }
  table.liste.fiches td { display: block; position: relative; border: 0; padding: 3px 0 3px 112px;
                          min-height: 24px; font-size: 13.5px; overflow-wrap: anywhere; }
  table.liste.fiches td::before { content: attr(data-l); position: absolute; left: 0; top: 5px; width: 104px;
                                  font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
                                  color: var(--gris-6); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  table.liste.fiches td:first-child { padding: 0 0 5px; font-size: 15px; }
  table.liste.fiches td:first-child::before, table.liste.fiches td[data-l=""]::before { content: none; }
  table.liste.fiches td[data-l=""] { padding-left: 0; }
  /* Les boutons d'une ligne passent dessous, alignés à gauche. */
  table.liste.fiches td.actions { display: flex; flex-wrap: wrap !important; justify-content: flex-start !important;
                                  gap: 8px; padding-top: 9px; }
  table.liste.fiches tr:hover td { background: none; }
}

/* --- Réponses A B C D ----------------------------------------------- */

.reponse {
  display: flex;
  align-items: center;
  gap: 14px;
  border-radius: 12px;
  padding: 16px 18px;
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
  border: 3px solid transparent;
  text-align: left;
  width: 100%;
  font-family: inherit;
  cursor: default;
}
.reponse.A { background: var(--rep-a); }
.reponse.B { background: var(--rep-b); }
.reponse.C { background: var(--rep-c); }
.reponse.D { background: var(--rep-d); }
.reponse .forme {
  flex: 0 0 auto;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, .22);
  font-weight: 800;
  border-radius: 8px;
}
.reponse .texte { flex: 1 1 auto; min-width: 0; }
.reponse .compte { font-variant-numeric: tabular-nums; font-size: 15px; opacity: .9; }

/* Variante claire, pour le téléphone du candidat : les quatre réponses se
   ressemblent, seule celle qu'il choisit passe en orange FT. La lettre
   suffit à les distinguer. */
.reponse.neutre {
  background: #fff;
  color: var(--slate-6);
  border-color: var(--gris-2);
  transition: border-color .12s ease, background .12s ease;
}
.reponse.neutre .forme { background: var(--gris-1); color: var(--slate-4); }
.reponse.neutre:hover:not(:disabled) { border-color: var(--slate-2); }
.reponse.neutre.choisie {
  background: var(--orange);
  border-color: var(--orange-3);
  color: #241703;
}
.reponse.neutre.choisie .forme { background: rgba(0, 0, 0, .15); color: #241703; }
/* Une fois la réponse donnée, les autres s'effacent sans disparaître. */
.reponse.neutre[disabled]:not(.choisie) { opacity: .5; }

.reponse.pale { opacity: .32; }
.reponse.juste { border-color: #fff; box-shadow: 0 0 0 4px var(--ok); opacity: 1; }
.reponse.juste .forme { background: var(--ok); color: #fff; }
.reponse.choisie { border-color: #fff; }

/* Barre de répartition sous chaque réponse */
.jauge { height: 7px; border-radius: 999px; background: rgba(255, 255, 255, .28); overflow: hidden; margin-top: 8px; }
.jauge > i { display: block; height: 100%; background: #fff; border-radius: 999px; transition: width .35s ease; }

/* --- Divers --------------------------------------------------------- */

.pastille {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--gris-1);
  color: var(--slate-4);
}
.pastille.vert  { background: #e2f1e9; color: #2f7050; }
.pastille.orange { background: var(--orange-05); color: var(--orange-3); }
.pastille.rouge { background: #fbe4e1; color: #a9352a; }

.vide { text-align: center; padding: 48px 20px; color: var(--gris-6); }
.vide strong { display: block; font-size: 16px; color: var(--slate-4); margin-bottom: 6px; }

.messages { position: fixed; right: 18px; bottom: 18px; z-index: 90; display: grid; gap: 8px; }
.message {
  background: var(--ardoise);
  color: #fff;
  padding: 11px 16px;
  border-radius: 8px;
  font-size: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .22);
  max-width: 380px;
}
.message.erreur { background: var(--danger); }
.message.ok { background: var(--ok); }

.mono { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }

.code-salle {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-weight: 700;
  letter-spacing: .18em;
  background: var(--ardoise);
  color: var(--orange);
  padding: 4px 12px;
  border-radius: 7px;
  display: inline-block;
}

@media (max-width: 860px) {
  .grille.c2, .grille.c3 { grid-template-columns: 1fr; }
  .page { padding: 18px 14px 48px; }
}

/* --- Slides des modules de formation -------------------------------- */
/* Le conteneur porte le ratio ; l'iframe de 1280x720 est mise à l'échelle
   par public/js/slides.js. Voir public/css/slide.css pour l'intérieur. */

.cadre-slide {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #3a474d;                 /* le fond des slides (slide.css) */
  border-radius: 10px;
  border: 1px solid var(--bordure-slide, #2a353b);
}
.toile-slide {
  width: 1280px;
  height: 720px;
  border: 0;
  display: block;
  transform-origin: 0 0;
  pointer-events: none;      /* une vignette ne se clique pas */
}
.cadre-slide.vivant .toile-slide { pointer-events: auto; }

/* --- Menu latéral ---------------------------------------------------- */
/* Construit par public/js/menu.js à partir du registre des modules. Il
   enveloppe la .page existante dans un .corps : les pages n'ont rien à
   changer à leur structure, elles chargent le script.

   Fond en gris bleuté FT, dans la continuité de la barre du haut : les deux
   forment un L d'une seule couleur, et la zone de travail reste claire. */

/* Avant que menu.js n'enveloppe la page, la largeur du menu est déjà
   réservée et sa bande déjà peinte : il n'y a aucun décalage au chargement.
   Ces règles cessent de s'appliquer dès que .page passe dans .corps. */
body.avec-menu {
  min-height: 100vh;
  background: linear-gradient(to right, var(--ardoise) 0 236px, var(--gris-05) 236px);
}
body.avec-menu > .page { margin-left: 236px; }

.corps { display: flex; align-items: stretch; min-height: calc(100vh - var(--haut-barre)); }
.corps > .page { flex: 1 1 auto; min-width: 0; margin: 0 auto; }

.menu {
  view-transition-name: menu-lateral;
  flex: 0 0 236px;
  width: 236px;
  position: sticky;
  top: var(--haut-barre);
  align-self: flex-start;
  height: calc(100vh - var(--haut-barre));
  overflow: auto;
  background: var(--ardoise);
  color: var(--ardoise-txt);
  padding: 20px 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.menu-titre {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--ardoise-doux);
  padding: 0 10px;
  margin-bottom: 9px;
}

/* La langue : une liste déroulante (26/09/2026, « mets les langues dans une
   liste ») plutôt que sept pastilles — c'était la moitié de la hauteur du
   menu. Aux couleurs du menu, flèche dessinée ici (appearance: none). */
.menu-langues { padding: 0 6px; }
.menu-langue-liste {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 8px;
  padding: 8px 32px 8px 11px;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  background: rgba(255, 255, 255, .08)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%23fc9004' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    no-repeat right 11px center / 11px 8px;
  transition: background-color .14s ease, border-color .14s ease;
}
.menu-langue-liste:hover { background-color: rgba(255, 255, 255, .13); }
.menu-langue-liste:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(252, 144, 4, .25); }
/* La liste ouverte est dessinée par le système : fond clair, texte sombre. */
.menu-langue-liste option { color: var(--slate-6); background: #fff; }
.menu-langue-nom { font-size: 11.5px; color: var(--ardoise-doux); padding: 7px 10px 0; }

.menu-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 10px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--ardoise-txt);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
  transition: background .14s ease, color .14s ease;
}
.menu-item:hover { background: rgba(255, 255, 255, .09); color: #fff; }
.menu-item[aria-current="page"] {
  background: rgba(255, 255, 255, .14);
  color: #fff;
  box-shadow: inset 3px 0 0 var(--orange);
}
.menu-item .ic { flex: 0 0 20px; height: 20px; color: var(--ardoise-doux); transition: color .14s ease; }
.menu-item .ic svg { width: 20px; height: 20px; display: block; }
.menu-item:hover .ic, .menu-item[aria-current="page"] .ic { color: var(--orange); }
.menu-item .lb { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-item .nb {
  flex: 0 0 auto;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ardoise-doux);
  background: rgba(255, 255, 255, .12);
  border-radius: 999px;
  padding: 1px 8px;
}
.menu-item .nb:empty { display: none; }

/* Sous-entrée d'un module (le palmarès sous le quiz) : décalée, plus
   discrète, sans icône — on doit voir qu'elle dépend de la ligne du dessus. */
.menu-sous {
  font-size: 13px;
  font-weight: 500;
  padding-top: 7px;
  padding-bottom: 7px;
  color: var(--ardoise-doux);
}
.menu-sous .ic { flex: 0 0 20px; position: relative; }
.menu-sous .ic::before {
  content: "";
  position: absolute;
  left: 8px; top: 50%;
  width: 6px; height: 6px;
  margin-top: -3px;
  border-radius: 50%;
  background: currentColor;
  opacity: .5;
}
.menu-item[aria-current="page"] .nb { background: rgba(255, 255, 255, .2); color: #fff; }

.menu-pied { margin-top: auto; border-top: 1px solid rgba(255, 255, 255, .12); padding-top: 14px; }
.menu-pied .menu-item { color: var(--ardoise-doux); }
.menu-qui { font-size: 12px; color: var(--ardoise-doux); padding: 8px 10px 0; }

/* Squelette affiché le temps du premier chargement : mêmes dimensions que
   les vraies entrées, donc rien ne bouge quand elles arrivent. */
.menu-fantome { opacity: .28; pointer-events: none; }
.menu-fantome .lb { background: currentColor; border-radius: 4px; height: 10px; }

/* Arrivée du contenu : un fondu court, pour les navigateurs sans fondu
   natif. Pas de glissement — cumulé au fondu natif, ça ferait vibrer. */
.corps > .page { animation: page-entre .16s ease-out both; }
@keyframes page-entre { from { opacity: 0; } to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .corps > .page { animation: none; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* --- Le menu sur un écran étroit : un tiroir -------------------------
   Sous 900 px, le menu quitte le côté de la page. Il se range derrière le
   bouton ☰ que menu.js pose au début de la barre, et glisse depuis la
   gauche, par-dessus la page, sur un voile qui le referme au toucher.
   C'était un bandeau qui défilait de côté (26/09/2026, « rends le tout bien
   sur mobile ») : la langue en prenait la moitié, on ne voyait qu'« Accueil »
   et rien ne disait que le reste était caché à droite. Le tiroir garde la
   colonne du grand écran : mêmes blocs, mêmes entrées, mêmes libellés. */
.menu-bouton, .menu-voile, .menu-tete { display: none; }

@media (max-width: 900px) {
  body.avec-menu { background: var(--gris-05); }
  body.avec-menu > .page { margin-left: 0; }
  .corps { display: block; min-height: 0; }
  .corps > .page { width: 100%; }

  .menu-bouton {
    display: grid; place-items: center; flex: 0 0 auto; position: relative;
    width: 42px; height: 42px; margin-left: -9px; padding: 0;
    border: 0; border-radius: 10px; background: none; color: #fff; cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background .14s ease;
  }
  .menu-bouton:hover, .menu-bouton[aria-expanded="true"] { background: rgba(255, 255, 255, .1); }
  .menu-bouton:focus-visible { outline: 2px solid var(--orange); outline-offset: -2px; }
  .menu-bouton svg { width: 24px; height: 24px; display: block; }
  /* Une formation tourne : un point vert sur le ☰ (voir « En cours »). */
  .menu-bouton.vivant::after {
    content: ""; position: absolute; right: 6px; top: 7px;
    width: 9px; height: 9px; border-radius: 50%;
    background: var(--ok); box-shadow: 0 0 0 2px var(--ardoise);
  }

  .menu {
    view-transition-name: none;
    position: fixed; z-index: 70; top: 0; bottom: 0; left: 0;
    flex: none; width: min(304px, 86vw); height: auto;
    padding: 0 12px calc(16px + env(safe-area-inset-bottom));
    gap: 20px;
    overflow-y: auto; overscroll-behavior: contain;
    box-shadow: 14px 0 34px -14px rgba(0, 0, 0, .55);
    transform: translateX(-104%);
    visibility: hidden;          /* fermé : hors d'atteinte du clavier */
    transition: transform .26s cubic-bezier(.2, .8, .25, 1), visibility 0s linear .26s;
  }
  body.menu-ouvert .menu { transform: none; visibility: visible; transition-delay: 0s; }

  .menu-voile {
    display: block; position: fixed; inset: 0; z-index: 65;
    background: rgba(23, 28, 31, .5);
    opacity: 0; pointer-events: none; touch-action: none;
    transition: opacity .26s ease;
  }
  body.menu-ouvert .menu-voile { opacity: 1; pointer-events: auto; }
  body.menu-ouvert { overflow: hidden; }

  /* L'en-tête du tiroir, à la hauteur de la barre : le nom et la croix. */
  .menu-tete {
    display: flex; align-items: center; gap: 10px; flex: 0 0 auto;
    position: sticky; top: 0; z-index: 1;
    height: var(--haut-barre); margin: 0 -12px; padding: 0 8px 0 20px;
    background: var(--ardoise); border-bottom: 1px solid rgba(255, 255, 255, .1);
  }
  .menu-tete .marque { font-weight: 700; font-size: 16px; color: var(--orange); text-decoration: none; white-space: nowrap; }
  .menu-fermer {
    margin-left: auto; width: 42px; height: 42px; padding: 0;
    display: grid; place-items: center;
    border: 0; border-radius: 10px; background: none; color: var(--ardoise-txt); cursor: pointer;
  }
  .menu-fermer:hover { background: rgba(255, 255, 255, .1); color: #fff; }
  .menu-fermer:focus-visible { outline: 2px solid var(--orange); outline-offset: -2px; }
  .menu-fermer svg { width: 22px; height: 22px; display: block; }

  /* Au doigt : des entrées de 44 px. */
  .menu-item { padding-top: 11px; padding-bottom: 11px; }
  .menu-sous { padding-top: 9px; padding-bottom: 9px; }
  .menu-langue-liste { min-height: 42px; font-size: 16px; }   /* 16 px : iOS ne zoome pas */
  .trois-points { min-width: 42px; min-height: 42px; }
}

/* --- Boîtes de dialogue ---------------------------------------------
   Les fenêtres natives du navigateur (alert, confirm, prompt) ne sont
   jamais utilisées : elles sortent du thème et ne se traduisent pas.
   Voir F.boite / F.confirmer / F.demander dans public/js/commun.js. */

.boite-fond {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center; padding: 20px;
  background: rgba(23, 28, 31, .55);
  opacity: 0; transition: opacity .12s ease;
}
.boite-fond.ouverte { opacity: 1; }

.boite {
  width: 100%; max-width: 440px;
  /* Plus haute que l'écran (une fiche à deux liens sur un téléphone
     couché), elle défile chez elle au lieu d'être coupée haut et bas. */
  max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); overflow-y: auto;
  background: #fff; border-radius: 14px; padding: 22px 24px 18px;
  box-shadow: 0 24px 60px -20px rgba(23, 28, 31, .55), 0 2px 6px rgba(23, 28, 31, .12);
  transform: translateY(6px) scale(.985);
  transition: transform .14s cubic-bezier(.2, .9, .3, 1);
}
.boite-fond.ouverte .boite { transform: none; }

.boite h3 { margin: 0 0 6px; font-size: 17px; }
.boite p  { margin: 0 0 16px; font-size: 14.5px; line-height: 1.55; color: var(--slate-4); white-space: pre-line; }
.boite .boite-champ {
  width: 100%; margin-bottom: 16px;
  border: 1px solid var(--gris-2); border-radius: 9px; padding: 10px 12px;
  font: inherit; font-size: 14.5px;
}
.boite .boite-champ:focus {
  outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-05);
}

/* --- Téléphone : le dashboard comme télécommande ---------------------
   Le formateur se déplace dans la salle avec son téléphone : il avance les
   slides, révèle une réponse, envoie une vidéo à l'écran. Ces règles-là
   valent pour toutes les pages ; chaque écran de pilotage ajoute les
   siennes (le pupitre passe en bas, à portée de pouce). */

@media (max-width: 760px) {
  /* Un enfant intrinsèquement large — l'iframe 1280 d'une slide, un tableau
     de séances — ne doit pas élargir la page entière : il défile chez lui.
     Sans ces min-width, la grille CSS prend la largeur du contenu (piège du
     `1fr` qui vaut `minmax(auto, 1fr)`). */
  .corps, .corps > .page, .page { min-width: 0; }
  .grille, .grille > * { min-width: 0; }

  .page { padding: 16px 12px 40px; }
  h1 { font-size: 22px; }
  h2 { font-size: 18px; }

  /* Les tableaux défilent dans leur boîte. */
  #sessions, #projections, #tableau, .zone-table { overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* Au doigt : des cibles d'au moins 40 px. */
  .btn { min-height: 40px; }
  .actions { gap: 8px; }

  /* Un champ en dessous de 16 px, et Safari sur iPhone zoome la page quand
     on le touche — sans jamais revenir. Même taille pour tous. */
  input[type=text], input[type=search], input[type=date], textarea, select,
  .boite .boite-champ { font-size: 16px; }
  input[type=date] { min-height: 44px; -webkit-appearance: none; appearance: none; }

  /* La barre garde sa ligne, un peu moins haute : le fil d'Ariane
     s'abrège, le logo rétrécit, le nom de l'animateur s'efface (le
     « Reconnexion… » d'un pupitre, lui, reste). */
  :root { --haut-barre: 56px; }
  .barre { padding: 0 12px; gap: 10px; }
  .barre .fil { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .barre .qui { white-space: nowrap; }
  .barre .qui-nom { display: none; }
  .barre::after { width: 52px; height: 27px; }

  .boite-fond { padding: 14px; }
  .boite { max-width: none; border-radius: 12px; padding: 20px 18px 16px; }
  .boite .actions .btn { flex: 1 1 auto; }
}

/* Ce qui tourne en ce moment, en tête du menu : séance, projections, salles
   de quiz. Le point vert dit « c'est vivant ». */
.menu-vivant .lb { font-size: 13.5px; }
/* Les salons se partagent : quand il n'est pas de moi, on dit de qui il est.
   Sur une deuxième ligne, plus petite — le titre reste ce qu'on lit. */
.menu-vivant .lb .qui { display: block; font-style: normal; font-size: 11.5px;
                        opacity: .6; overflow: hidden; text-overflow: ellipsis; }
.menu-vivant .nb { font-family: inherit; letter-spacing: .08em; font-size: 11.5px; }
.point-vivant {
  flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%;
  background: var(--ok); box-shadow: 0 0 0 3px rgba(79, 161, 114, .22);
  margin: 0 11px 0 6px;
}

/* Les trois points d'une entrée « En cours » : la fiche avec ses liens. */
.ligne-vivante { display: flex; align-items: center; }
.ligne-vivante .menu-item { flex: 1 1 auto; min-width: 0; }
.trois-points {
  flex: 0 0 auto; border: 0; background: none; cursor: pointer;
  color: var(--ardoise-doux); font-size: 19px; line-height: 1;
  padding: 6px 10px; margin-right: 4px; border-radius: 7px;
}
.trois-points:hover { background: rgba(255, 255, 255, .12); color: #fff; }

.fiche-lien { border-top: 1px solid var(--gris-1); padding: 12px 0 4px; }
.fiche-lien:first-child { border-top: 0; }
.fiche-libelle { font-size: 12.5px; font-weight: 650; color: var(--slate-4); }
.fiche-url {
  font-size: 12.5px; color: var(--gris-6); margin: 3px 0 8px;
  overflow-wrap: anywhere; font-family: "SFMono-Regular", Consolas, monospace;
}

/* =====================================================================
   Télécommande vidéo (F.telecommandeVideo).

   Le formateur est debout, son téléphone à la main : la glissière doit se
   saisir au pouce, pas à la souris — d'où une piste épaisse et un curseur
   de 20 px, au-delà de ce que dessinent les navigateurs par défaut.
   ===================================================================== */
.tele-video { display:flex; align-items:center; gap:10px; width:100%; }
.tele-video .btn { padding:6px 12px; font-size:14px; line-height:1; }
.tele-video .temps { font-size:12.5px; color:var(--gris-6); font-variant-numeric:tabular-nums;
                     white-space:nowrap; }

.tele-video .glissiere { flex:1 1 auto; min-width:90px; height:22px; margin:0; padding:0;
                         background:transparent; -webkit-appearance:none; appearance:none;
                         cursor:pointer; }
.tele-video .glissiere:disabled { cursor:default; opacity:.5; }
.tele-video .glissiere::-webkit-slider-runnable-track { height:6px; border-radius:99px;
                         background:var(--gris-2); }
.tele-video .glissiere::-moz-range-track { height:6px; border-radius:99px; background:var(--gris-2); }
.tele-video .glissiere::-webkit-slider-thumb { -webkit-appearance:none; appearance:none;
                         width:20px; height:20px; margin-top:-7px; border-radius:50%;
                         background:var(--orange); border:2px solid #fff;
                         box-shadow:0 1px 4px rgba(0,0,0,.28); }
.tele-video .glissiere::-moz-range-thumb { width:18px; height:18px; border-radius:50%;
                         background:var(--orange); border:2px solid #fff;
                         box-shadow:0 1px 4px rgba(0,0,0,.28); }
.tele-video .glissiere:focus-visible { outline:2px solid var(--orange); outline-offset:3px; }

/* =====================================================================
   Formations — l'accueil et le poste de pilotage.

   Une formation = un écran + des stagiaires + du contenu. L'accueil n'a
   qu'un geste principal (Démarrer une formation) et la liste de ce qui
   tourne ; tout le reste se fait depuis la fiche de la formation.
   ===================================================================== */

/* Entrées en cascade : chaque élément porte --i, son rang. */
.entre { animation: entre .42s cubic-bezier(.2, .8, .25, 1) both;
         animation-delay: calc(var(--i, 0) * 55ms); }
@keyframes entre { from { opacity: 0; transform: translateY(10px); } }

/* --- Le bandeau d'accueil ------------------------------------------- */
.heros {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--ardoise) 0%, #2c373c 100%);
  color: #fff; border-radius: 16px; padding: 30px 30px 28px;
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
  box-shadow: 0 18px 40px -24px rgba(23, 28, 31, .6);
  margin-bottom: 30px;
}
/* Deux halos orange qui dérivent lentement : le bandeau vit sans distraire. */
.heros::before, .heros::after {
  content: ""; position: absolute; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(252, 144, 4, .28), transparent 65%);
}
.heros::before { width: 420px; height: 420px; right: -120px; top: -200px; animation: derive 14s ease-in-out infinite alternate; }
.heros::after  { width: 260px; height: 260px; right: 220px; bottom: -170px; opacity: .6; animation: derive 18s ease-in-out infinite alternate-reverse; }
@keyframes derive { to { transform: translate(-40px, 30px) scale(1.12); } }
.heros > * { position: relative; z-index: 1; }
/* Le chemin vers le guide d'utilisation : discret, sous la phrase d'accueil. */
.heros .lien-guide { display: inline-block; margin-top: 9px; font-size: 13.5px; font-weight: 650;
                     color: var(--orange-3); text-decoration: none; }
.heros .lien-guide::after { content: " →"; transition: margin .2s ease; }
.heros .lien-guide:hover { text-decoration: underline; }
.heros .texte { flex: 1 1 320px; min-width: 0; }
.heros h1 { font-size: 28px; margin: 0 0 6px; }
.heros p { margin: 0; color: var(--ardoise-doux); font-size: 15px; line-height: 1.5; }

.btn-demarrer {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; gap: 12px;
  border: 0; border-radius: 12px; cursor: pointer;
  background: var(--orange); color: #241703;
  font: inherit; font-size: 17px; font-weight: 700;
  padding: 16px 26px;
  box-shadow: 0 10px 26px -10px rgba(252, 144, 4, .8);
  transition: transform .18s cubic-bezier(.2, .8, .25, 1), box-shadow .18s ease, background .18s ease;
}
.btn-demarrer:hover { transform: translateY(-2px); box-shadow: 0 16px 32px -12px rgba(252, 144, 4, .9); background: #ff9d1c; }
.btn-demarrer:active { transform: translateY(0) scale(.98); }
/* La croix est dessinée, pas écrite : un « + » de police tombe à côté du
   centre (plus ou moins selon la police), et le décalage se voit quand elle
   tourne au survol. */
.btn-demarrer .plus {
  position: relative; flex: none;
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(0, 0, 0, .14);
  transition: transform .3s cubic-bezier(.2, .8, .25, 1);
}
.btn-demarrer .plus::before,
.btn-demarrer .plus::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 12px; height: 2px; margin: -1px 0 0 -6px; border-radius: 1px;
  background: currentColor;
}
.btn-demarrer .plus::after { transform: rotate(90deg); }
.btn-demarrer:hover .plus { transform: rotate(90deg); }
/* Un reflet qui passe de temps en temps : c'est LE bouton de la page. */
.btn-demarrer::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .45) 50%, transparent 65%);
  transform: translateX(-120%); animation: reflet 5s ease-in-out 1.2s infinite;
}
@keyframes reflet { 0%, 70% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }

/* --- Titres de section ---------------------------------------------- */
.section-tete { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin: 30px 0 14px; }
.section-tete h2 { margin: 0; display: flex; align-items: center; gap: 10px; }
.section-tete p { margin: 3px 0 0; color: var(--gris-6); font-size: 13.5px; }
.section-tete .pousse { margin-left: auto; }
.compteur { font-size: 12px; font-weight: 700; background: var(--gris-1); color: var(--slate-4);
            border-radius: 999px; padding: 2px 9px; }

/* --- Point vivant ---------------------------------------------------- */
.pouls { position: relative; flex: 0 0 auto; width: 10px; height: 10px; border-radius: 50%;
         background: var(--ok); display: inline-block; }
.pouls::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: inherit;
                animation: pouls 1.8s ease-out infinite; }
@keyframes pouls { from { transform: scale(1); opacity: .6; } to { transform: scale(3); opacity: 0; } }
.pouls.eteint { background: var(--gris-2); }
.pouls.eteint::after { display: none; }
.pouls.alerte { background: var(--orange); }

/* --- Cartes de formation -------------------------------------------- */
.formations { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.carte-fo {
  position: relative; display: flex; flex-direction: column; gap: 12px;
  background: #fff; border: 1px solid var(--gris-2); border-radius: 14px;
  padding: 18px 18px 16px; text-decoration: none; color: inherit; cursor: pointer;
  box-shadow: var(--ombre);
  transition: transform .2s cubic-bezier(.2, .8, .25, 1), box-shadow .2s ease, border-color .2s ease;
}
.carte-fo::before { content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 4px;
                    border-radius: 0 4px 4px 0; background: var(--ok); }
.carte-fo:hover { transform: translateY(-3px); border-color: var(--orange);
                  box-shadow: 0 16px 34px -18px rgba(23, 28, 31, .45); }
.carte-fo .tete { display: flex; align-items: flex-start; gap: 10px; }
.carte-fo h3 { margin: 0; font-size: 17px; font-weight: 700; flex: 1 1 auto; min-width: 0;
               overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.carte-fo .code-salle { font-size: 13px; padding: 3px 9px; }
.carte-fo .lignes { display: grid; gap: 7px; font-size: 13.5px; color: var(--slate-4); }
.carte-fo .ligne { display: flex; align-items: center; gap: 9px; min-width: 0; }
.carte-fo .ligne > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.carte-fo .ic { flex: 0 0 18px; width: 18px; height: 18px; color: var(--gris-6); display: grid; place-items: center; }
.carte-fo .ic svg { width: 18px; height: 18px; }
.carte-fo .pied { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--gris-1);
                  padding-top: 11px; font-size: 12.5px; color: var(--gris-6); }
.carte-fo .pied .aller { margin-left: auto; color: var(--orange-3); font-weight: 700; font-size: 13px;
                         transition: transform .2s ease; }
.carte-fo:hover .pied .aller { transform: translateX(4px); }
.carte-fo.autre::before { background: var(--slate-2); }

/* --- Écrans ---------------------------------------------------------- */
.ecrans { display: grid; gap: 10px; }
.ligne-ecran {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: #fff; border: 1px solid var(--gris-2); border-radius: 12px; padding: 12px 14px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.ligne-ecran:hover { border-color: var(--slate-2); box-shadow: var(--ombre); }
.ligne-ecran .icone-ecran { flex: 0 0 42px; height: 42px; border-radius: 10px; display: grid; place-items: center;
                            background: var(--gris-05); color: var(--slate-4); position: relative; }
.ligne-ecran .icone-ecran svg { width: 24px; height: 24px; }
.ligne-ecran .icone-ecran .pouls { position: absolute; right: -2px; top: -2px; border: 2px solid #fff; box-sizing: content-box; }
.ligne-ecran .quoi { flex: 1 1 220px; min-width: 0; }
.ligne-ecran .nom { font-weight: 700; font-size: 15px; }
.ligne-ecran .detail { font-size: 12.5px; color: var(--gris-6); margin-top: 2px;
                       overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ligne-ecran .actions .btn { padding: 6px 12px; font-size: 13px; }

/* --- Banque de quiz : une ligne par quiz, rangées par type ------------ */
.type-quiz .section-tete { margin: 26px 0 10px; }
.type-quiz:first-child .section-tete { margin-top: 6px; }
.type-quiz .section-tete h2 { font-size: 18px; }
/* minmax(0, 1fr) : une description longue se coupe en « … » au lieu
   d'élargir la ligne (et la page) à sa mesure. */
.liste-quiz { display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr); }
.ligne-quiz {
  min-width: 0;
  display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap;
  background: #fff; border: 1px solid var(--gris-2); border-radius: 12px; padding: 12px 14px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.ligne-quiz:hover { border-color: var(--slate-2); box-shadow: var(--ombre); }
.ligne-quiz .quoi { flex: 1 1 300px; min-width: 0; }
.ligne-quiz .nom { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 700; font-size: 15px; }
.ligne-quiz .titre-quiz { min-width: 0; overflow-wrap: anywhere; }
.ligne-quiz .detail { font-size: 12.5px; color: var(--gris-6); margin-top: 3px;
                      overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ligne-quiz .actions { flex-wrap: wrap; }
.ligne-quiz .actions .btn { padding: 6px 12px; font-size: 13px; }
.ligne-quiz.archive { background: var(--gris-05); }
.ligne-quiz.archive .titre-quiz { color: var(--slate-4); }
/* Téléphone : les trois gestes sur une ligne, sous le titre. */
@media (max-width: 600px) {
  .ligne-quiz .actions { width: 100%; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr); }
  .ligne-quiz .actions .btn { padding: 6px 8px; justify-content: center; text-align: center; }
  /* Une salle déjà ouverte : « Reprendre la session » et son code ne
     tiennent pas dans un tiers de ligne — ils prennent la ligne entière,
     Modifier et Dupliquer se partagent celle du dessous. */
  .ligne-quiz .actions:has(> .btn .pastille) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ligne-quiz .actions > .btn:has(.pastille) { grid-column: 1 / -1; }
}

.aide-ajout { display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
              border: 1.5px dashed var(--gris-2); border-radius: 12px; padding: 14px 16px;
              color: var(--gris-6); font-size: 13.5px; background: rgba(255, 255, 255, .5); }
.aide-ajout code { background: var(--gris-1); color: var(--slate-6); padding: 3px 8px; border-radius: 6px;
                   font-size: 13px; overflow-wrap: anywhere; }

/* --- Démarrer une formation : la fenêtre ----------------------------- */
.boite.large { max-width: 620px; padding: 26px 26px 20px; }
.boite .etiquette-champ { display: block; font-size: 12.5px; font-weight: 700; color: var(--slate-4);
                          text-transform: uppercase; letter-spacing: .05em; margin: 4px 0 8px; }
.choix-ecrans { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
                max-height: 46vh; overflow: auto; padding: 2px; margin-bottom: 18px; }
.choix-ecran {
  position: relative; text-align: left; font: inherit; cursor: pointer;
  display: flex; gap: 11px; align-items: flex-start;
  border: 1.5px solid var(--gris-2); background: #fff; border-radius: 11px; padding: 12px 12px;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease, background .15s ease;
}
.choix-ecran:hover { border-color: var(--slate-2); transform: translateY(-1px); }
.choix-ecran .icone-ecran { flex: 0 0 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
                            background: var(--gris-05); color: var(--slate-4); }
.choix-ecran .icone-ecran svg { width: 20px; height: 20px; }
.choix-ecran .nom { font-weight: 700; font-size: 14.5px; display: flex; align-items: center; gap: 7px; }
.choix-ecran .detail { font-size: 12px; color: var(--gris-6); margin-top: 3px; line-height: 1.4; }
.choix-ecran[aria-checked="true"] { border-color: var(--orange); background: #fffaf2;
                                    box-shadow: 0 0 0 3px var(--orange-05); }
.choix-ecran .coche { position: absolute; right: 9px; top: 9px; width: 20px; height: 20px; border-radius: 50%;
                      background: var(--orange); color: #fff; font-size: 12px; font-weight: 800;
                      display: grid; place-items: center; transform: scale(0); transition: transform .22s cubic-bezier(.3, 1.6, .5, 1); }
.choix-ecran[aria-checked="true"] .coche { transform: scale(1); }
.choix-ecran.eteint .nom { color: var(--slate-4); }

.boite .champ-grand { width: 100%; font: inherit; font-size: 17px; font-weight: 600; padding: 12px 14px;
                      border: 1.5px solid var(--gris-2); border-radius: 10px; margin-bottom: 18px; }
.boite .champ-grand:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-05); }
.boite .btn-demarrer { font-size: 15.5px; padding: 12px 22px; }
.boite .btn-demarrer::after { display: none; }

/* --- Le poste de pilotage d'une formation ---------------------------- */
.retour { display: inline-flex; align-items: center; gap: 6px; color: var(--gris-6); text-decoration: none;
          font-size: 13.5px; font-weight: 600; margin-bottom: 14px; transition: color .15s ease, gap .15s ease; }
.retour:hover { color: var(--orange-3); gap: 10px; }

.tete-fo { margin-bottom: 22px; }
.tete-fo .haut { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tete-fo h1 .pouls { margin-right: 12px; vertical-align: middle; }
.tete-fo h1 { margin: 0; font-size: 26px; cursor: text; border-radius: 6px; padding: 0 4px; margin-left: -4px;
              transition: background .15s ease; }
.tete-fo h1:hover { background: rgba(0, 0, 0, .04); }
.tete-fo h1 .crayon { font-size: 15px; color: var(--gris-6); opacity: 0; margin-left: 8px; transition: opacity .15s ease; }
.tete-fo h1:hover .crayon { opacity: 1; }
.tete-fo .haut .pousse { margin-left: auto; }
.puces { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.puce { display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--gris-2);
        border-radius: 999px; padding: 6px 13px; font-size: 13px; color: var(--slate-4); font-weight: 600;
        transition: border-color .25s ease, background .25s ease; }
.puce strong { color: var(--slate-6); }
.puce.flash { animation: flash .9s ease; }
@keyframes flash { 0% { background: var(--orange-05); border-color: var(--orange); } 100% { background: #fff; } }

.pilotage { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: start; }
.pilotage .colonne { display: grid; gap: 18px; min-width: 0; }
@media (max-width: 1100px) { .pilotage { grid-template-columns: 1fr; } }

.bloc { background: #fff; border: 1px solid var(--gris-2); border-radius: 14px; box-shadow: var(--ombre); overflow: hidden; }
.bloc > .bloc-tete { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--gris-1); }
.bloc > .bloc-tete h3 { margin: 0; font-size: 15px; font-weight: 700; }
.bloc > .bloc-tete .etape { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
                            color: var(--orange-3); background: var(--orange-05); border-radius: 6px; padding: 3px 8px; }
.bloc > .bloc-tete .pousse { margin-left: auto; }
.bloc > .bloc-corps { padding: 16px 18px 18px; }
.bloc .aide { font-size: 13px; color: var(--gris-6); margin: 0 0 12px; line-height: 1.5; }

/* L'état de l'écran, en grand : c'est la première chose qu'on vérifie. */
.etat-ecran { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.etat-ecran .moniteur { position: relative; flex: 0 0 64px; height: 50px; border-radius: 9px;
                        background: #12181b; display: grid; place-items: center; color: #fff;
                        box-shadow: inset 0 0 0 3px #2a353b; }
.etat-ecran .moniteur::after { content: ""; position: absolute; bottom: -8px; left: 50%; width: 22px; height: 5px;
                               margin-left: -11px; border-radius: 0 0 4px 4px; background: #2a353b; }
.etat-ecran .moniteur .pouls { position: absolute; right: -4px; top: -4px; border: 2px solid #fff; box-sizing: content-box; }
.etat-ecran .moniteur .lueur { width: 38px; height: 26px; border-radius: 4px;
                               background: linear-gradient(135deg, var(--orange), #ffc46b); opacity: .85;
                               animation: lueur 3.2s ease-in-out infinite; }
.etat-ecran .moniteur.eteint .lueur { background: #232b2e; animation: none; }
@keyframes lueur { 50% { opacity: .45; } }
.etat-ecran .nom { font-weight: 700; font-size: 16px; }
.etat-ecran .detail { font-size: 12.5px; color: var(--gris-6); margin-top: 2px; }
.etat-ecran .detail .mono { color: var(--slate-6); }

.commandes { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.commandes .btn { justify-content: flex-start; text-align: left; line-height: 1.25; font-size: 13.5px; padding: 9px 12px; }
.commandes .btn .ico { flex: 0 0 18px; }
.commandes .btn .ico { width: 18px; text-align: center; }

.avertissement { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.5;
                 background: #fff7ea; border: 1px solid var(--orange-05); color: #7a4a06;
                 border-radius: 10px; padding: 10px 12px; margin-bottom: 14px; }

/* Ce qui est projeté : une vignette qui change avec un fondu. */
.scene-actuelle { display: flex; gap: 14px; align-items: center; background: var(--gris-05);
                  border-radius: 12px; padding: 14px; margin-bottom: 14px; }
.scene-actuelle.change { animation: scene-change .45s cubic-bezier(.2, .8, .25, 1); }
@keyframes scene-change { from { opacity: 0; transform: scale(.97); } }
.scene-actuelle .vignette { flex: 0 0 58px; height: 58px; border-radius: 12px; display: grid; place-items: center;
                            background: var(--ardoise); color: var(--orange); }
.scene-actuelle .vignette svg { width: 28px; height: 28px; }
.scene-actuelle .vignette.noir { background: #000; color: #555; }
.scene-actuelle .type { font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--gris-6); }
.scene-actuelle .titre { font-size: 16px; font-weight: 700; margin-top: 2px; overflow-wrap: anywhere; }

/* Le contenu : onglets et lignes. */
.onglets { display: flex; gap: 4px; background: var(--gris-05); border-radius: 10px; padding: 4px; margin-bottom: 12px; }
.onglets button { flex: 1 1 0; border: 0; background: transparent; border-radius: 8px; padding: 8px 10px; cursor: pointer;
                  font: inherit; font-size: 13.5px; font-weight: 650; color: var(--slate-4);
                  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
                  transition: background .18s ease, color .18s ease, box-shadow .18s ease; }
.onglets button[aria-selected="true"] { background: #fff; color: var(--slate-6); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
.onglets .nb { font-size: 11px; background: var(--gris-1); border-radius: 999px; padding: 1px 7px; }

.contenus { display: grid; gap: 6px; grid-template-columns: minmax(0, 1fr); }
.contenu { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
           border: 1px solid transparent; transition: background .15s ease, border-color .15s ease; }
.contenu:hover { background: var(--gris-05); }
.contenu .ic { flex: 0 0 36px; height: 36px; border-radius: 9px; display: grid; place-items: center;
               background: var(--gris-1); color: var(--slate-4); }
.contenu .ic svg { width: 19px; height: 19px; }
.contenu .quoi { flex: 1 1 auto; min-width: 0; }
.contenu .titre { font-weight: 650; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contenu .detail { font-size: 12.5px; color: var(--gris-6); }
.contenu .btn { flex: 0 0 auto; padding: 7px 14px; font-size: 13px; }
.contenu.affiche { background: #fff7ea; border-color: var(--orange-05); }
.contenu.affiche .ic { background: var(--orange); color: #fff; }

.stagiaires { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.stagiaires img { width: 118px; height: 118px; border-radius: 12px; border: 1px solid var(--gris-1); background: #fff; }
.stagiaires .code-salle { font-size: 26px; letter-spacing: .22em; padding: 6px 14px; }
.stagiaires .nb-connectes { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; }
.stagiaires .nb-connectes small { font-size: 13px; font-weight: 600; color: var(--gris-6); margin-left: 6px; }
.chiffre-saute { display: inline-block; animation: saute .5s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes saute { from { transform: scale(1.35); color: var(--orange-3); } }

.zone-danger { display: flex; justify-content: flex-end; margin-top: 22px; }

/* Squelettes de chargement : même taille que ce qui arrive. */
.fantome { background: linear-gradient(90deg, var(--gris-1) 0%, #f6f7f8 50%, var(--gris-1) 100%);
           background-size: 200% 100%; animation: fantome 1.3s linear infinite; border-radius: 12px; }
@keyframes fantome { to { background-position: -200% 0; } }

@media (max-width: 760px) {
  .heros { padding: 22px 18px; }
  .heros h1 { font-size: 23px; }
  .btn-demarrer { width: 100%; justify-content: center; }
  .formations { grid-template-columns: 1fr; }
  .tete-fo h1 { font-size: 22px; }
  .commandes { grid-template-columns: 1fr 1fr; }

  /* Les blocs du pilotage : un peu moins de marge, la place va au contenu. */
  .bloc > .bloc-tete { padding: 12px 14px; }
  .bloc > .bloc-corps { padding: 14px 14px 16px; }
  /* Quatre onglets (supports, quiz, vidéos, four 3D) ne tiennent pas sur
     une ligne : deux par ligne plutôt qu'un quatrième coupé au bord. */
  .onglets:has(> :nth-child(4)) { flex-wrap: wrap; }
  .onglets:has(> :nth-child(4)) > button { flex: 1 1 calc(50% - 2px); }
  .onglets button { min-height: 40px; padding: 8px 6px; }
  /* Un titre de support tient sur deux lignes avant de s'abréger. */
  .contenu { padding: 10px 6px; gap: 10px; }
  .contenu .titre { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical;
                    -webkit-line-clamp: 2; line-height: 1.3; overflow-wrap: anywhere; }
  .contenu .btn { padding: 7px 12px; }
}

/* --- Karaoké (easter egg, js/karaoke.js) ------------------------------ */
.karaoke-cible { margin: 0 0 14px; font-size: 13.5px; color: var(--gris-6); }
.karaoke-liste { list-style: none; margin: 0 0 6px; padding: 0; display: flex; flex-direction: column; gap: 8px;
                 max-height: 55vh; overflow-y: auto; }
.karaoke-liste li { display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
                    border: 1px solid var(--gris-2); border-radius: 10px; padding: 10px 12px; }
.karaoke-liste li.absente { opacity: .55; }
.karaoke-liste .rang { font-weight: 700; color: var(--orange); min-width: 1.4em; }
.karaoke-liste .quoi { flex: 1 1 180px; min-width: 0; display: flex; flex-direction: column; }
.karaoke-liste .quoi small { font-size: 12px; color: var(--gris-6); }
.karaoke-liste .gestes { display: flex; gap: 6px; }
.karaoke-local { position: fixed; inset: 0; z-index: 1000; background: #000; display: grid; place-items: center; }
.karaoke-local video { width: 100%; height: 100%; object-fit: contain; }
.karaoke-local .fermer { position: absolute; top: 12px; right: 14px; width: 44px; height: 44px; border-radius: 50%;
                         border: 0; background: rgba(255,255,255,.15); color: #fff; font-size: 28px; line-height: 1; cursor: pointer; }
