/* style.css — les trois rôles. Charte du client par variables CSS (commun.js),
 * typographie Geologica (titres) et Onest (texte). Fond clair, aplats, ombres douces. */
:root {
  --principale: #1644fb;
  --accent: #0b0b0b;
  --fond: #ffffff;
  --gris: #6b7280;
  --gris-clair: #eef0f4;
  --ligne: #e3e6ec;
  --ok: #0b8a4a;
  --alerte: #c2410c;
  --ombre: 0 10px 30px rgba(11, 11, 11, .06);
  --rayon: 14px;
  --titre: 'Geologica', system-ui, sans-serif;
  --texte: 'Onest', system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--fond); color: var(--accent); font-family: var(--texte); font-size: 16px; line-height: 1.45; }
h1, h2, h3 { font-family: var(--titre); margin: 0; letter-spacing: -.01em; }
button { font: inherit; cursor: pointer; }
input, select { font: inherit; }
.logo { height: 28px; width: auto; }
.sur-titre { font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--principale); }
.aide { color: var(--gris); font-size: .9rem; margin: .4rem 0; }
.vide { color: var(--gris); font-style: normal; }
.pastille { display: inline-block; width: .7em; height: .7em; border-radius: 50%; background: var(--tuile, var(--principale)); margin-right: .45em; vertical-align: middle; }

/* ── boutons ── */
.bouton { display: inline-flex; align-items: center; justify-content: center; gap: .4em; border: 0; border-radius: 12px; background: var(--principale); color: #fff; font-weight: 600; padding: .8em 1.2em; min-height: 48px; transition: transform .08s ease, opacity .15s; }
.bouton:active { transform: scale(.98); }
.bouton:disabled { opacity: .45; cursor: default; }
.bouton.grand { width: 100%; font-size: 1.1rem; min-height: 56px; }
.bouton.secondaire { background: var(--gris-clair); color: var(--accent); }
.bouton.vers-ecran { background: var(--accent); color: #fff; }
.discret, .bouton.discret { background: transparent; border: 1px solid var(--ligne); color: var(--gris); border-radius: 10px; padding: .5em .8em; min-height: 40px; font-weight: 500; }
.rangee { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin: .6rem 0; }
.rangee .bouton { flex: 1 1 auto; }
.champ, input[type=text], input[type=number], select { width: 100%; border: 1.5px solid var(--ligne); border-radius: 12px; padding: .75em .9em; min-height: 48px; background: #fff; color: var(--accent); }
input:focus, select:focus, button:focus-visible { outline: 3px solid color-mix(in srgb, var(--principale) 35%, transparent); outline-offset: 1px; }
.champ-ligne { display: flex; align-items: center; gap: .5rem; font-weight: 500; }
.champ-ligne input { width: 5.5rem; }

/* ── connexion, toast, file ── */
.connexion { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #c8ccd4; flex: none; }
.connexion.mode-flux { background: var(--ok); }
.connexion.mode-sondage { background: #d9a400; }
.connexion.mode-ferme { background: var(--alerte); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--accent); color: #fff; padding: .7em 1.1em; border-radius: 12px; font-weight: 500; box-shadow: var(--ombre); max-width: calc(100vw - 32px); z-index: 30; }
.toast.ton-alerte { background: var(--alerte); }
.file { position: fixed; right: 12px; bottom: 12px; background: #fff; border: 1px solid var(--ligne); color: var(--gris); font-size: .8rem; padding: .35em .7em; border-radius: 999px; box-shadow: var(--ombre); z-index: 20; }

/* ── formulaire du code ── */
.code { position: fixed; inset: 0; background: var(--fond); z-index: 40; display: flex; align-items: center; justify-content: center; padding: 24px; }
.code-boite { width: min(420px, 100%); background: #fff; border-radius: 20px; box-shadow: var(--ombre); padding: 32px; text-align: center; font-size: 16px; }
.code-boite .logo { height: 34px; margin-bottom: 16px; }
.code-boite h1 { font-size: 1.6rem; margin-bottom: .3rem; }
.code-boite p { color: var(--gris); margin: 0 0 1rem; }
.code-boite input { text-align: center; font-size: 1.8rem; letter-spacing: .3em; font-family: var(--titre); margin-bottom: 12px; }
.code-boite .message { color: var(--alerte); min-height: 1.4em; margin-top: .8rem; }

/* ── téléphones (pilote, participant) ── */
.tel-entete { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 12px; padding: 12px 16px; padding-top: max(12px, env(safe-area-inset-top)); background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--ligne); }
.tel-entete .entete-texte { flex: 1; min-width: 0; }
.entete-programme { font-family: var(--titre); font-weight: 600; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.entete-sous { font-size: .78rem; color: var(--gris); display: flex; gap: .5em; align-items: center; }
.equipe-badge { display: inline-block; padding: .1em .6em; border-radius: 999px; background: var(--tuile, var(--principale)); color: #fff; font-weight: 600; font-size: .75rem; }
.tel-corps { padding: 16px; padding-bottom: max(32px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 16px; max-width: 640px; margin: 0 auto; }
.carte { background: #fff; border-radius: var(--rayon); box-shadow: var(--ombre); border: 1px solid var(--ligne); padding: 18px; }
.carte-tete { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.carte-titre { font-size: 1.35rem; line-height: 1.2; margin-bottom: 10px; }
.badge { font-size: .75rem; font-weight: 600; padding: .2em .7em; border-radius: 999px; background: var(--gris-clair); color: var(--gris); white-space: nowrap; }
.badge.ok, .badge.phase-jeu { background: color-mix(in srgb, var(--ok) 14%, #fff); color: var(--ok); }
.badge.attente, .badge.phase-verrouillee { background: #fff3cd; color: #8a6100; }
.badge.phase-revelation { background: color-mix(in srgb, var(--principale) 12%, #fff); color: var(--principale); }
.blocs { display: flex; flex-direction: column; gap: 14px; }
.commandes { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.commandes:empty { display: none; }
.debrief { margin-top: 14px; border-top: 1px solid var(--ligne); padding-top: 10px; color: var(--gris); font-size: .92rem; }
.debrief summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.debrief p { margin: .5rem 0 0; white-space: pre-line; }
.ligne-info { color: var(--gris); font-size: .9rem; }
.equipes { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.equipe-jeton { display: inline-flex; align-items: center; padding: .3em .8em; border-radius: 999px; background: var(--gris-clair); font-size: .85rem; font-weight: 500; }
.participants { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.participant { display: grid; grid-template-columns: 2.4rem 1fr auto auto; gap: 8px; align-items: center; padding: 6px 0; border-top: 1px solid var(--ligne); }
.participant.absent .participant-nom { color: var(--gris); }
.participant-carte { font-family: var(--titre); font-weight: 700; color: var(--principale); }
.participant-nom { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.participant select { width: auto; min-width: 8rem; min-height: 40px; padding: .4em .6em; }
.sequences { display: flex; flex-direction: column; }
.sequence-ligne { display: grid; grid-template-columns: 2rem 1fr auto; gap: 8px; align-items: center; padding: 8px 0; border-top: 1px solid var(--ligne); }
.sequence-ligne.courante .sequence-nom > span { color: var(--principale); font-weight: 600; }
.sequence-index { font-family: var(--titre); font-weight: 700; color: var(--gris); }
.sequence-nom { display: flex; flex-direction: column; }
.sequence-nom small { color: var(--gris); }

/* ── blocs ── */
.bloc-titre { font-size: 1.3rem; }
.bloc-texte { margin: 0; }
.bloc-texte.ton-accent { font-weight: 600; font-size: 1.05rem; }
.bloc-attente, .sequence-attente { display: flex; align-items: center; gap: .6em; color: var(--gris); }
.point { width: .6em; height: .6em; border-radius: 50%; background: var(--principale); animation: pulser 1.6s ease-in-out infinite; flex: none; }
@keyframes pulser { 0%, 100% { opacity: .35; transform: scale(.85); } 50% { opacity: 1; transform: scale(1.05); } }
.bloc-etat { padding: .8em 1em; border-radius: 12px; background: var(--gris-clair); font-weight: 500; }
.bloc-etat.ton-ok { background: color-mix(in srgb, var(--ok) 12%, #fff); color: var(--ok); }
.bloc-etat.ton-alerte { background: color-mix(in srgb, var(--alerte) 12%, #fff); color: var(--alerte); }
.bloc-compteur { display: flex; align-items: baseline; gap: .6em; }
.compteur-valeur { font-family: var(--titre); font-weight: 700; font-size: 2rem; line-height: 1; }
.compteur-total { color: var(--gris); font-size: 1.1rem; font-weight: 500; }
.compteur-libelle { color: var(--gris); }
.chrono { display: flex; flex-direction: column; gap: .4em; }
.chrono-temps { font-family: var(--titre); font-weight: 700; font-size: 1.8rem; font-variant-numeric: tabular-nums; }
.chrono.presque .chrono-temps { color: var(--alerte); }
.chrono.ecoule .chrono-temps { color: var(--gris); font-size: 1.2rem; }
.chrono-piste { height: 6px; border-radius: 3px; background: var(--gris-clair); overflow: hidden; }
.chrono-barre { height: 100%; background: var(--principale); transform-origin: left; transition: transform .25s linear; }
.chrono.presque .chrono-barre { background: var(--alerte); }
.bloc-soustitre { font-size: 1.05rem; margin-bottom: .5rem; }
.barre-ligne, .jauge-ligne { display: grid; grid-template-columns: 1fr auto; grid-template-areas: 'libelle valeur' 'piste piste'; gap: .2em .8em; align-items: center; padding: .35em 0; }
.barre-ligne .barre-rang { grid-area: rang; }
.barre-ligne:has(.barre-rang) { grid-template-columns: 1.6em 1fr auto; grid-template-areas: 'rang libelle valeur' 'rang piste piste'; }
.barre-rang { font-family: var(--titre); font-weight: 700; color: var(--gris); }
.barre-libelle, .jauge-libelle { grid-area: libelle; display: flex; flex-direction: column; min-width: 0; }
.barre-libelle > span, .jauge-libelle > span { overflow: hidden; text-overflow: ellipsis; }
.barre-sous, .liste-sous { color: var(--gris); font-size: .82rem; }
.barre-piste, .jauge-piste { grid-area: piste; height: 10px; border-radius: 5px; background: var(--gris-clair); overflow: hidden; }
.barre-fond, .jauge-fond { height: 100%; border-radius: 5px; background: var(--principale); transition: width .6s cubic-bezier(.2, .8, .2, 1); }
.jauge-ligne:not(.accent) .jauge-fond { background: #b8bec9; }
.barre-valeur, .jauge-valeur { grid-area: valeur; font-family: var(--titre); font-weight: 700; font-variant-numeric: tabular-nums; }
.jauge-ecart { margin-left: .5em; font-family: var(--texte); font-weight: 600; font-size: .85em; }
.jauge-ecart.plus { color: var(--ok); }
.jauge-ecart.moins { color: var(--alerte); }
.jauge-ecart.egal { color: var(--gris); }
.bloc-liste ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .35em; }
.bloc-liste li { display: flex; align-items: baseline; gap: .5em; padding: .45em .7em; background: var(--gris-clair); border-radius: 10px; flex-wrap: wrap; }
.liste-numero { font-family: var(--titre); font-weight: 700; color: var(--principale); min-width: 1.4em; }
.liste-texte { flex: 1 1 auto; }
.grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.tuile { border-radius: 12px; padding: .7em .8em; background: var(--gris-clair); border-left: 5px solid var(--tuile, var(--principale)); }
.tuile.etat-fait { background: color-mix(in srgb, var(--tuile, var(--principale)) 16%, #fff); }
.tuile-texte { font-weight: 600; }
.tuile-sous { color: var(--gris); font-size: .85rem; }
.bloc-tableau table { width: 100%; border-collapse: collapse; }
.bloc-tableau th, .bloc-tableau td { text-align: left; padding: .4em .5em; border-bottom: 1px solid var(--ligne); }
.question { font-weight: 600; margin-bottom: .6em; }
.bloc-choix { display: flex; flex-direction: column; gap: 8px; }
.option { text-align: left; border: 1.5px solid var(--ligne); background: #fff; color: var(--accent); border-radius: 12px; padding: .8em 1em; min-height: 52px; font-weight: 500; transition: border-color .12s, background .12s; }
.option.choisi { border-color: var(--principale); background: color-mix(in srgb, var(--principale) 10%, #fff); color: var(--principale); font-weight: 600; }
.echelle { display: flex; gap: 6px; }
.echelon { flex: 1; min-width: 0; min-height: 52px; border: 1.5px solid var(--ligne); background: #fff; border-radius: 10px; font-family: var(--titre); font-weight: 600; font-size: 1.05rem; color: var(--accent); padding: 0; }
.echelon.choisi { background: var(--principale); border-color: var(--principale); color: #fff; }
.echelle-libelles { display: flex; justify-content: space-between; color: var(--gris); font-size: .8rem; margin-top: .4em; }
.bloc-saisie .aide { text-align: right; margin: .2rem 0 .4rem; font-size: .8rem; }
.bloc-saisie.fait .champ { border-color: color-mix(in srgb, var(--ok) 50%, var(--ligne)); }
.bloc-saisie .rangee { margin: 0; }

/* ── écran projeté ──
 * Lu à 8 à 15 mètres. Unité : 1rem = min(1vw, 1.6vh), soit 17,28 px en 1920 x 1080 et
 * 11,52 px en 1280 x 720 (mêmes proportions). Règle : aucun texte sous 1.8rem (31 px en
 * 1920 x 1080), le texte courant de 2.4 à 3rem, les titres de 3.6 à 5.6rem, les chiffres
 * clés de 6 à 12rem. Rien n'est réduit d'échelle pour tenir : ce qui ne tient pas se
 * montre par pages, sur ordre du Pilote (voir modules/commun.js, « écrans en pages »). */
html.ecran { font-size: min(1vw, 1.6vh); }
.role-ecran { overflow: hidden; height: 100vh; font-size: 2.4rem; line-height: 1.3; }
.role-ecran .scene { position: relative; display: flex; flex-direction: column; height: 100vh; padding: 2.4rem 5rem 1.6rem; gap: 1.6rem; }
.ecran-entete { display: flex; align-items: center; gap: 2.4rem; min-height: 4.2rem; }
.ecran-entete .logo { height: 4.2rem; }
.ecran-entete .entete-texte { display: flex; align-items: baseline; gap: 1.6rem; flex-wrap: wrap; }
.ecran-entete .entete-programme { font-family: var(--titre); font-weight: 600; font-size: 2.4rem; white-space: nowrap; }
.ecran-entete .entete-sequence { color: var(--gris); font-size: 2rem; }
.ecran-corps { flex: 1; min-height: 0; display: flex; gap: 5rem; }
.ecran-pied { display: flex; justify-content: space-between; align-items: center; color: var(--gris); font-size: 1.8rem; line-height: 1.2; }
.ecran-pied .pied-outils { display: flex; align-items: center; gap: 1.5rem; }
.ecran-pied .discret { font-size: 1.8rem; padding: .15em .8em; min-height: 0; }
.ecran-pied .connexion { width: 1.2rem; height: 1.2rem; }
.role-ecran .sur-titre { font-size: 2rem; }
.accueil-gauche { flex: 0 0 38rem; display: flex; flex-direction: column; justify-content: center; gap: 1.6rem; }
.accueil-titre { font-size: 6.4rem; line-height: 1.02; letter-spacing: -.025em; }
.accueil-texte { font-size: 2.6rem; color: var(--gris); margin: 0; max-width: 38rem; line-height: 1.25; }
.accueil-compte { display: flex; align-items: baseline; gap: 1rem; margin-top: 1rem; }
.compte-n { font-family: var(--titre); font-weight: 700; font-size: 7rem; line-height: 1; color: var(--principale); }
.compte-libelle { font-size: 2.4rem; color: var(--gris); }
.accueil-page { font-size: 2rem; color: var(--gris); }
/* les QR remplissent la hauteur disponible, rangée par rangée, sans jamais déborder */
.cartes { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(var(--colonnes, 4), minmax(0, 1fr)); grid-template-rows: repeat(var(--rangees, 3), minmax(0, 1fr)); gap: 1.6rem; }
.carte-qr { background: #fff; border: 1px solid var(--ligne); border-radius: 1.4rem; box-shadow: var(--ombre); padding: 1rem; display: flex; flex-direction: column; gap: .6rem; position: relative; min-height: 0; }
.carte-qr .qr { position: relative; flex: 1; min-height: 0; display: flex; justify-content: center; }
.carte-qr .qr svg { height: 100%; width: auto; max-width: 100%; display: block; }
.carte-qr.arrivee .qr svg { opacity: .06; }
.carte-arrivee { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: .4rem; font-family: var(--titre); font-weight: 700; font-size: 2.4rem; line-height: 1.1; color: var(--principale); overflow-wrap: anywhere; }
.carte-pied { display: flex; justify-content: space-between; align-items: baseline; gap: .6rem; }
.carte-numero { font-family: var(--titre); font-weight: 700; font-size: 2.8rem; line-height: 1.1; color: var(--principale); }
.carte-nom { font-size: 1.9rem; color: var(--gris); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ecran-corps.sequence { flex-direction: column; gap: 2.4rem; }
.sequence-tete { display: flex; flex-direction: column; gap: .5rem; }
.sequence-titre { font-size: 5.6rem; line-height: 1.05; letter-spacing: -.025em; max-width: 90rem; }
.ecran-corps.sequence:not(.phase-presentation) .sequence-titre { font-size: 4.4rem; max-width: none; }
.ecran-entete .entete-sequence.sur-titre { color: var(--principale); font-size: 2rem; }
.entete-page { margin-left: auto; font-family: var(--titre); font-weight: 600; font-size: 2.2rem; color: var(--gris); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ecran-corps .module { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 2.4rem; overflow: hidden; }
.ecran-corps .module.dense { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem 5rem; align-content: start; }
.ecran-corps .module.dense > .bloc-liste { grid-column: 1 / -1; }
.ecran-corps .module.dense.tres-dense { gap: 1.6rem 4rem; }
.role-ecran .bloc-texte { font-size: 2.8rem; max-width: 86rem; margin: 0; }
.role-ecran .bloc-texte.ton-accent { font-size: 3.6rem; font-weight: 600; line-height: 1.2; }
.role-ecran .bloc-compteur { gap: 1.2rem; }
.role-ecran .compteur-valeur { font-size: 9rem; color: var(--principale); }
.role-ecran .compteur-total { font-size: 3.6rem; }
.role-ecran .compteur-libelle { font-size: 2.4rem; }
.role-ecran .chrono { max-width: 60rem; }
.role-ecran .chrono-temps { font-size: 7rem; }
.role-ecran .chrono.ecoule .chrono-temps { font-size: 4rem; }
.role-ecran .chrono-piste { height: 1.4rem; border-radius: .7rem; }
.role-ecran .bloc-soustitre { font-size: 2.8rem; margin-bottom: 1rem; line-height: 1.2; }
.role-ecran .bloc-barres, .role-ecran .bloc-jauges { display: flex; flex-direction: column; gap: .8rem; }
.role-ecran .barre-ligne, .role-ecran .jauge-ligne { font-size: 2.6rem; gap: .4rem 2rem; padding: .4rem 0; }
.role-ecran .barre-piste, .role-ecran .jauge-piste { height: 2rem; border-radius: 1rem; }
.role-ecran .barre-fond, .role-ecran .jauge-fond { border-radius: 1rem; }
.role-ecran .barre-valeur, .role-ecran .jauge-valeur { font-size: 3.4rem; }
.role-ecran .barre-sous, .role-ecran .liste-sous { font-size: 1.9rem; }
.role-ecran .barre-rang { font-size: 3rem; }
.role-ecran .bloc-liste ul { gap: 1.2rem; display: grid; grid-template-columns: repeat(2, 1fr); }
.role-ecran .bloc-liste li { font-size: 2.6rem; padding: 1.2rem 1.8rem; border-radius: 1.4rem; line-height: 1.2; }
.role-ecran .liste-numero { min-width: 1.6em; }
.role-ecran .grille { grid-template-columns: repeat(auto-fill, minmax(24rem, 1fr)); gap: 1.6rem; }
.role-ecran .tuile { padding: 1.6rem 2rem; border-radius: 1.4rem; border-left-width: .8rem; }
.role-ecran .tuile-texte { font-size: 2.8rem; line-height: 1.15; }
.role-ecran .tuile-sous { font-size: 2.2rem; }
.role-ecran .bloc-attente, .role-ecran .sequence-attente { font-size: 2.4rem; }
.role-ecran .bloc-etat { font-size: 2.6rem; }
.role-ecran .galerie { grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr)); gap: 1.6rem; }
.role-ecran .personne { padding: 1.4rem 1rem; border-radius: 1.4rem; border-top-width: .5rem; gap: .6rem; }
.role-ecran .personne .portrait { font-size: 2.2rem; }
.role-ecran .personne-nom { font-size: 2.4rem; }
.role-ecran .personne-sous { font-size: 1.9rem; }
.ecran-corps.fin { flex-direction: column; justify-content: center; gap: 1.6rem; }
.fin-titre { font-size: 12rem; line-height: 1; letter-spacing: -.03em; color: var(--principale); }
.fin-texte { font-size: 2.8rem; color: var(--gris); margin: 0; }

/* ── cinématiques ── */
.cine { position: fixed; inset: 0; z-index: 25; background: var(--fond); opacity: 1; transition: opacity .4s ease; }
.cine.sortie { opacity: 0; }
.cine-scene { position: absolute; inset: 0; overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .point { animation: none; opacity: 1; }
  .barre-fond, .jauge-fond, .chrono-barre { transition: none; }
}
@media (max-width: 480px) {
  .participant { grid-template-columns: 2rem 1fr; }
  .participant select, .participant .discret { grid-column: span 1; }
}

/* ── statut à l'arrivée ── */
.statut-choix { display: flex; gap: 8px; margin-bottom: 14px; }
.statut-choix .option { flex: 1; text-align: center; }
.participant { grid-template-columns: 2.4rem 1fr auto auto auto; }
.participant-statut { width: auto; min-width: 6.5rem; min-height: 40px; padding: .4em .6em; }
.rappels { margin-top: 14px; border-top: 1px solid var(--ligne); padding-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.rappels:empty { display: none; }

/* ── portraits et galerie ── */
.portrait { width: 3.2em; height: 3.2em; border-radius: 50%; background: color-mix(in srgb, var(--tuile, var(--principale)) 18%, #fff); color: var(--tuile, var(--principale)); display: inline-flex; align-items: center; justify-content: center; overflow: hidden; flex: none; font-family: var(--titre); font-weight: 700; font-size: .95em; }
.portrait-photo { width: 100%; height: 100%; object-fit: cover; display: block; }
.portrait.petit { width: 2.2em; height: 2.2em; font-size: .8em; }
.portrait.grand { width: 5em; height: 5em; font-size: 1.4em; }
.galerie { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.personne { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 10px 8px; border-radius: 12px; background: var(--gris-clair); border-top: 4px solid transparent; }
.personne.etat-fait { border-top-color: var(--tuile, var(--ok)); background: color-mix(in srgb, var(--tuile, var(--ok)) 12%, #fff); }
.personne.etat-attente { border-top-color: var(--tuile, var(--gris)); }
.personne-nom { font-weight: 600; line-height: 1.2; }
.personne-sous { color: var(--gris); font-size: .82rem; }

/* ── ordonner (participant) ── */
.bloc-ordonner .etapes { display: flex; flex-direction: column; gap: 8px; }
.etape { display: flex; align-items: center; gap: 12px; text-align: left; border: 1.5px solid var(--ligne); background: #fff; color: var(--accent); border-radius: 12px; padding: .7em .9em; min-height: 56px; font-weight: 500; }
.etape.choisi { border-color: var(--principale); background: color-mix(in srgb, var(--principale) 8%, #fff); }
.etape-rang { flex: none; width: 2em; height: 2em; border-radius: 50%; background: var(--gris-clair); color: var(--gris); display: inline-flex; align-items: center; justify-content: center; font-family: var(--titre); font-weight: 700; }
.etape.choisi .etape-rang { background: var(--principale); color: #fff; }
.etape-texte { display: flex; flex-direction: column; }
.etape-sous { color: var(--gris); font-size: .82rem; }
.bloc-ordonner .aide { text-align: right; }

/* ── écran : composants communs des pages lisibles de loin ── */
.ecran-page { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 2.4rem; }
.ecran-deux { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 34rem; gap: 5rem; align-items: start; }
.chiffres { display: flex; flex-direction: column; gap: 2.8rem; }
.chiffre { display: flex; flex-direction: column; gap: .4rem; }
.chiffre-n { font-family: var(--titre); font-weight: 800; font-size: 10rem; line-height: .95; letter-spacing: -.03em; color: var(--principale); font-variant-numeric: tabular-nums; white-space: nowrap; }
.chiffre-n small { font-size: .42em; font-weight: 700; color: var(--gris); letter-spacing: 0; }
.chiffre-libelle { font-size: 2.4rem; color: var(--gris); line-height: 1.2; }
.chiffre.moyen .chiffre-n { font-size: 7rem; }
.chiffre.plus .chiffre-n { color: var(--ok); }
.chiffre.moins .chiffre-n { color: var(--alerte); }
.scores { display: flex; flex-direction: column; gap: 2rem; }
.scores-titre { font-family: var(--titre); font-weight: 700; font-size: 3rem; line-height: 1.15; }
.scores-grille { display: grid; grid-template-columns: fit-content(44rem) minmax(12rem, 1fr) auto; align-items: center; gap: 2rem 2.4rem; }
.score-ligne { display: contents; }
.score-nom { display: flex; flex-wrap: wrap; align-items: center; font-family: var(--titre); font-weight: 700; font-size: 2.8rem; line-height: 1.1; }
.score-nom .pastille { width: 1.6rem; height: 1.6rem; margin-right: 1rem; }
.score-sous { flex-basis: 100%; font-family: var(--texte); font-weight: 500; font-size: 1.9rem; color: var(--gris); margin-top: .4rem; }
.score-piste { height: 2.4rem; border-radius: 1.2rem; background: var(--gris-clair); overflow: hidden; }
.score-fond { height: 100%; border-radius: 1.2rem; background: var(--tuile, var(--principale)); }
.score-valeur { font-family: var(--titre); font-weight: 800; font-size: 4rem; line-height: 1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.score-valeur small { font-size: .55em; color: var(--gris); font-weight: 700; }
.equipe-nom { display: inline-flex; align-items: center; gap: .8rem; }
.equipe-nom .pastille { width: 1.4rem; height: 1.4rem; margin: 0; }

/* ── écran : carte vivante ── */
.carte-ecran { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 1.8rem; }
.carte-ecran .bloc-texte.ton-accent { font-size: 3rem; }
.carte-zones { display: grid; grid-template-columns: repeat(var(--zones, 2), minmax(0, 1fr)); gap: 1.6rem 2rem; align-content: start; }
.zone { background: var(--gris-clair); border-radius: 1.6rem; padding: 1.2rem 2rem; display: flex; align-items: center; justify-content: space-between; gap: 2rem; min-width: 0; }
.zone-tete { border-left: .5rem solid var(--principale); padding-left: 1.4rem; min-width: 0; }
.zone-libelle { font-family: var(--titre); font-weight: 700; font-size: 2.4rem; line-height: 1.15; }
.zone-sous { color: var(--gris); font-size: 1.9rem; margin-top: .2rem; }
.zone-compte { display: flex; flex-direction: column; align-items: flex-end; flex: none; }
.zone-compte-n { font-family: var(--titre); font-weight: 800; font-size: 4.6rem; line-height: 1; color: var(--principale); font-variant-numeric: tabular-nums; white-space: nowrap; }
.zone-compte-n small { font-size: .5em; color: var(--gris); }
.zone-compte-l { font-size: 1.9rem; color: var(--gris); line-height: 1.15; white-space: nowrap; }
.carte-bas { display: flex; align-items: stretch; gap: 1.6rem; }
.carte-bas .bloc-grille { flex: 1; min-width: 0; }
.carte-bas .grille { grid-template-columns: repeat(var(--equipes, 4), minmax(0, 1fr)); gap: 1.2rem; }
.carte-bas .tuile { padding: .9rem 1.4rem; }
.carte-bas .tuile-texte { font-size: 2.4rem; }
.carte-bas .tuile-sous { font-size: 1.9rem; }
.carte-bas .chiffre { justify-content: center; padding: 0 1rem; flex: none; }
.carte-bas .chiffre-n { font-size: 5rem; }
.carte-bas .chiffre-libelle { font-size: 1.9rem; }
.carte-total { display: flex; align-items: baseline; gap: 1.6rem; }
.carte-total .chiffre-n { font-size: 5.6rem; }
.carte-total span { font-size: 2.4rem; color: var(--gris); }
.carte-detail { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 1.8rem; }
.detail-tete { display: flex; justify-content: space-between; align-items: baseline; gap: 3rem; border-bottom: .4rem solid var(--principale); padding-bottom: .8rem; }
.detail-libelle { font-family: var(--titre); font-weight: 700; font-size: 3.4rem; line-height: 1.1; }
.detail-libelle span { font-family: var(--texte); font-weight: 500; font-size: 2.2rem; color: var(--gris); margin-left: 1.2rem; }
.detail-compte { font-family: var(--titre); font-weight: 800; font-size: 3.4rem; line-height: 1; color: var(--principale); white-space: nowrap; }
.detail-compte span { font-family: var(--texte); font-size: 2.2rem; font-weight: 500; color: var(--gris); margin-left: .8rem; }
.pieces-grandes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.6rem 2rem; align-content: start; }
.piece-grande { display: flex; align-items: center; gap: 1.8rem; background: #fff; border-radius: 1.6rem; padding: 1.4rem 1.8rem; border: .5rem solid var(--tuile, var(--principale)); box-shadow: var(--ombre); min-width: 0; }
.piece-grande.faux { border-style: dashed; background: color-mix(in srgb, var(--alerte) 7%, #fff); }
.piece-grande .portrait { font-size: 2rem; }
.piece-marque { width: 6.4rem; height: 6.4rem; border-radius: 1.2rem; flex: none; background: color-mix(in srgb, var(--tuile, var(--principale)) 22%, #fff); }
.pg-texte { display: flex; flex-direction: column; gap: .4rem; min-width: 0; }
.pg-nom { font-family: var(--titre); font-weight: 700; font-size: 2.6rem; line-height: 1.1; }
.pg-sous { font-size: 2rem; color: var(--gris); line-height: 1.2; }
.pg-statut { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .8rem; font-size: 2rem; font-weight: 600; line-height: 1.2; }
.pg-statut .pastille { width: 1.4rem; height: 1.4rem; margin: 0; }
.piece-grande.juste .pg-statut { color: var(--ok); }
.piece-grande.faux .pg-statut { color: var(--accent); }
.pg-erreur { font-size: 2rem; font-weight: 600; line-height: 1.2; color: var(--alerte); }

/* ── écran : qui sait quoi ── */
.attribution-scores { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 32rem; gap: 5rem; align-items: start; }
.situation-seule { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 36rem; gap: 2.4rem 5rem; align-items: start; }
.situation-gauche { display: flex; flex-direction: column; gap: 2.4rem; min-width: 0; }
.situation-numero { color: var(--principale); font-weight: 600; font-size: 2.2rem; text-transform: uppercase; letter-spacing: .06em; }
.situation-texte { font-family: var(--titre); font-weight: 700; font-size: 4.2rem; line-height: 1.12; }
.situation-reponse { display: flex; align-items: center; gap: 2.4rem; }
.situation-reponse .portrait { font-size: 2.6rem; }
.situation-qui { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.situation-nom { font-family: var(--titre); font-weight: 800; font-size: 4.8rem; line-height: 1.05; color: var(--principale); }
.situation-fonction { color: var(--gris); font-size: 2.6rem; }
.situation-equipes { display: flex; flex-direction: column; gap: 1.2rem; }
.situation-equipes-titre { font-family: var(--titre); font-weight: 700; font-size: 2.6rem; }
.jeton { display: flex; align-items: center; gap: .9rem; padding: .7rem 1.6rem; border-radius: 1.4rem; font-size: 2.2rem; font-weight: 600; line-height: 1.15; background: #fff; border: .3rem solid var(--tuile, var(--gris)); }
.jeton .pastille { width: 1.4rem; height: 1.4rem; margin: 0; flex: none; }
.jeton.juste { background: var(--tuile, var(--ok)); color: #fff; }
.jeton.juste .pastille { background: #fff; }
.jeton.faux { color: var(--accent); border-style: dashed; }
.jeton-choix { display: block; font-weight: 500; font-size: 1.9rem; color: var(--gris); }
.jeton.juste .jeton-choix { color: #fff; opacity: .9; }

/* ── écran : questionnaire révélé ── */
.q-tete { display: flex; flex-direction: column; gap: .6rem; }
.q-numero { font-size: 2rem; font-weight: 600; color: var(--principale); text-transform: uppercase; letter-spacing: .06em; }
.q-texte { font-family: var(--titre); font-weight: 700; font-size: 3.6rem; line-height: 1.15; max-width: 98rem; }
.q-corps { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 30rem; gap: 5rem; align-items: center; }
.q-corps.plein { grid-template-columns: minmax(0, 1fr); align-items: start; }
.q-lignes { display: flex; flex-direction: column; gap: 2.2rem; }
.q-ligne { display: grid; grid-template-columns: 24rem minmax(0, 1fr) 17rem; align-items: center; gap: 2.4rem; }
.q-ligne-libelle { font-size: 2.8rem; font-weight: 600; line-height: 1.1; }
.q-ligne-libelle small { display: block; font-size: 1.9rem; color: var(--gris); font-weight: 500; margin-top: .3rem; }
.q-piste { height: 2.8rem; border-radius: 1.4rem; background: var(--gris-clair); overflow: hidden; }
.q-fond { height: 100%; border-radius: 1.4rem; background: var(--principale); }
.q-ligne.gris .q-fond { background: #b8bec9; }
.q-valeur { font-family: var(--titre); font-weight: 800; font-size: 4.4rem; line-height: 1; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.q-valeur small { font-size: .5em; color: var(--gris); }
.q-textes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.6rem; align-content: start; }
.q-textes li { list-style: none; background: var(--gris-clair); border-radius: 1.4rem; padding: 1.4rem 2rem; font-size: 2.8rem; line-height: 1.2; }
.q-textes { margin: 0; padding: 0; }
.q-bonne { font-family: var(--titre); font-weight: 700; font-size: 3.4rem; line-height: 1.15; }
.q-bonne small { display: block; font-family: var(--texte); font-weight: 500; font-size: 2rem; color: var(--gris); margin-bottom: .4rem; }
.q-intro { font-size: 2.4rem; color: var(--gris); line-height: 1.2; }
.ecarts { display: flex; flex-direction: column; gap: 1.6rem; }
.ecart-ligne { display: grid; grid-template-columns: minmax(0, 1fr) 24rem 19rem; align-items: center; gap: 3rem; padding: 1.2rem 2.4rem; background: var(--gris-clair); border-radius: 1.6rem; }
.ecart-question { font-size: 2.4rem; font-weight: 600; line-height: 1.2; }
.ecart-question b { color: var(--principale); margin-right: .5rem; }
.ecart-avant-apres { font-family: var(--titre); font-weight: 700; font-size: 3.4rem; line-height: 1.1; white-space: nowrap; }
.ecart-avant-apres small { display: block; font-family: var(--texte); font-size: 1.9rem; color: var(--gris); font-weight: 500; }
.ecart-valeur { font-family: var(--titre); font-weight: 800; font-size: 5.6rem; line-height: 1; text-align: right; color: var(--ok); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ecart-valeur.moins { color: var(--alerte); }
.ecart-valeur.egal { color: var(--gris); }
.q-chiffres { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 4rem; align-content: start; }
.q-chiffre { display: flex; flex-direction: column; gap: .8rem; padding: 1.2rem 0; border-top: .3rem solid var(--gris-clair); }
.q-chiffre-texte { font-size: 2.4rem; font-weight: 600; line-height: 1.2; }
.q-chiffre-texte b { color: var(--principale); margin-right: .5rem; }
.q-chiffre-valeur { display: flex; align-items: baseline; gap: 1.2rem; flex-wrap: wrap; }
.q-chiffre-valeur .chiffre-n { font-size: 5.6rem; }
.q-chiffre-valeur span { font-size: 2rem; color: var(--gris); }

/* ── écran : vote, classement et mur ── */
.vote-ecran { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 26rem; gap: 4rem; align-items: start; }
.cartes-textes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.6rem; align-content: start; }
.carte-texte { background: var(--gris-clair); border-radius: 1.6rem; padding: 1.6rem 2rem; display: flex; gap: 1.4rem; align-items: baseline; font-size: 2.6rem; line-height: 1.2; }
.carte-texte-numero { font-family: var(--titre); font-weight: 800; color: var(--principale); font-size: 3rem; flex: none; }
.classement { display: flex; flex-direction: column; gap: 2rem; }
.rang-ligne { display: grid; grid-template-columns: 6rem minmax(0, 1fr) 14rem; gap: .6rem 2.4rem; align-items: center; }
.rang-n { font-family: var(--titre); font-weight: 800; font-size: 4.4rem; color: var(--gris); grid-row: span 2; line-height: 1; }
.rang-ligne.premier .rang-n { color: var(--principale); }
.rang-texte { font-size: 2.8rem; font-weight: 600; line-height: 1.15; grid-column: 2; }
.rang-bas { grid-column: 2; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 2rem; }
.rang-equipe { display: flex; align-items: center; gap: .8rem; font-size: 1.9rem; color: var(--gris); font-weight: 500; white-space: nowrap; }
.rang-equipe .pastille { width: 1.3rem; height: 1.3rem; margin: 0; }
.rang-voix { font-family: var(--titre); font-weight: 800; font-size: 5rem; line-height: 1; text-align: right; grid-column: 3; grid-row: 1 / span 2; font-variant-numeric: tabular-nums; }
.rang-voix small { font-family: var(--texte); font-size: 1.9rem; color: var(--gris); font-weight: 500; margin-left: .6rem; }
.rang-piste { height: 1.4rem; border-radius: .7rem; background: var(--gris-clair); overflow: hidden; }
.rang-fond { height: 100%; background: var(--tuile, var(--principale)); border-radius: .7rem; }
.mur-consigne { font-family: var(--titre); font-weight: 700; font-size: 2.8rem; line-height: 1.15; margin-bottom: -.8rem; }
.mur { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.6rem 2rem; align-content: start; }
.mot { background: var(--gris-clair); border-radius: 1.8rem; padding: 1.4rem 2.4rem; display: flex; flex-direction: column; gap: .8rem; border-top: .6rem solid var(--tuile, var(--principale)); }
.mot-texte { font-family: var(--titre); font-weight: 600; font-size: 3rem; line-height: 1.2; }
.mot.long .mot-texte { font-size: 2.6rem; }
.mot.tres-long .mot-texte { font-size: 2.4rem; }
.mot-equipe { font-size: 2rem; color: var(--gris); font-weight: 500; }

/* ── écran : réseau ── */
.reseau-ensemble { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 36rem; gap: 4rem; }
.reseau-graphe { min-height: 0; min-width: 0; display: flex; flex-direction: column; gap: 1rem; }
.reseau-toile { flex: 1; min-height: 0; position: relative; }
.reseau-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; overflow: visible; }
.reseau-legende { display: flex; flex-wrap: wrap; gap: .6rem 3rem; color: var(--gris); font-size: 2rem; justify-content: center; }
.legende-nouveau { color: var(--principale); font-weight: 600; }
.reseau-chiffres { display: flex; flex-direction: column; gap: 2.4rem; justify-content: center; }

/* ── écran : ordre des étapes ── */
.frise { display: grid; grid-template-columns: repeat(var(--etapes, 4), minmax(0, 1fr)); gap: 3rem; position: relative; align-items: start; }
.frise::before { content: ''; position: absolute; left: 3rem; right: 3rem; top: 2.8rem; height: .5rem; background: var(--gris-clair); border-radius: .25rem; }
.frise-etape { position: relative; display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.frise-rang { width: 6rem; height: 6rem; border-radius: 50%; background: var(--principale); color: #fff; display: flex; align-items: center; justify-content: center; font-family: var(--titre); font-weight: 800; font-size: 3rem; position: relative; z-index: 1; }
.frise-texte { font-family: var(--titre); font-weight: 700; font-size: 2.6rem; line-height: 1.15; }
.frise-sous { color: var(--gris); font-size: 2rem; }
.frise-equipes { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; margin-top: .4rem; }
.frise-equipe { display: inline-flex; align-items: center; gap: .7rem; font-size: 2rem; font-weight: 600; }
.frise-equipe .pastille { width: 1.4rem; height: 1.4rem; margin: 0; }
.frise-aucune { color: var(--gris); font-size: 2rem; }
.frise-legende { font-size: 2.2rem; color: var(--gris); }

/* ── cartes à imprimer ── */
.role-cartes { background: #f4f5f8; }
.impression-entete { display: flex; align-items: center; gap: 16px; padding: 14px 20px; background: #fff; border-bottom: 1px solid var(--ligne); flex-wrap: wrap; }
.impression-entete .entete-texte { flex: 1; min-width: 200px; }
.impression { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 20px; }
.page-a4 { background: #fff; width: 210mm; min-height: 297mm; padding: 10mm; box-sizing: border-box; display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 69mm; gap: 4mm; box-shadow: var(--ombre); }
.carte-impression { border: 1px dashed var(--ligne); border-radius: 4mm; padding: 5mm; display: flex; flex-direction: column; gap: 2mm; align-items: stretch; }
.carte-impression .qr svg { width: 38mm; height: 38mm; display: block; margin: 0 auto; }
.carte-impression .carte-pied { display: flex; justify-content: space-between; align-items: baseline; gap: 2mm; }
.carte-impression .carte-numero { font-family: var(--titre); font-weight: 700; font-size: 18pt; color: var(--principale); }
.carte-impression .carte-programme { font-size: 7.5pt; color: var(--gris); text-align: right; }
.carte-impression .carte-consigne { font-size: 7pt; color: var(--gris); }
@media print {
  .role-cartes { background: #fff; }
  .impression-entete, #code { display: none !important; }
  .impression { padding: 0; gap: 0; }
  .page-a4 { box-shadow: none; page-break-after: always; width: auto; min-height: auto; padding: 0; }
  @page { size: A4; margin: 10mm; }
}
.module > .reseau-graphe { flex: 1; }
