/* =====================================================================
   Interface 2 — régie de l'animateur
   Thème clair de travail (body.clair) ; barre du haut et pupitre de réponse
   en encre. Les couleurs viennent des jetons de base.css.
   ===================================================================== */

body.regie-page { min-height: 100vh; background: var(--papier); font-size: 15px; }
body.regie-page :focus-visible { outline: 3px solid var(--majorelle); outline-offset: 2px; }

/* Zones en encre : on redéfinit les variables locales pour que .btn, .kbd,
   .segment et les champs s'adaptent sans autre règle. */
.regie-tete, .pupitre {
  --surface: transparent;
  --surface-2: var(--encre-2);
  --texte: var(--platre);
  --texte-2: var(--brume);
  --trait: #3A3380;
  --accent: var(--majorelle-clair);
  color: var(--texte);
}
.regie-tete :focus-visible, .pupitre :focus-visible { outline-color: var(--safran); }

/* Petits boutons : cible tactile de 44 px dans toute la régie */
body.regie-page .btn-petit { min-height: 44px; padding: 6px 14px; font-size: 15px; border-radius: 10px; }
body.regie-page .btn-petit.btn-icone { min-width: 44px; padding: 6px; }
body.regie-page .btn { border-width: 1px; }
.badge.majorelle { background: var(--surface-2); color: var(--majorelle-fonce); font-weight: 700; }

/* En-tête ------------------------------------------------------------------ */
.regie-tete {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px 20px;
  padding: 12px 28px; background: var(--encre);
}
.rt-gauche { display: flex; align-items: center; gap: 10px; }
.rt-logo { display: block; width: 28px; height: 28px; flex: none; border-radius: 6px; }
.rt-logo .etoile-logo { width: 28px; height: 28px; }
.rt-titre { font-family: var(--police-titre); font-weight: 700; font-size: 20px; line-height: 1; }
.rt-partie { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--brume); }
.rt-nom {
  min-height: 44px; padding: 0 8px; border: none; border-radius: 8px; background: none; cursor: pointer;
  color: var(--brume); font-size: 15px; font-weight: 400;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 320px;
}
.rt-nom:hover { background: var(--encre-2); color: var(--platre); }
.rt-sep { white-space: nowrap; }
.rt-code { font-weight: 700; letter-spacing: .06em; color: var(--platre); font-variant-numeric: tabular-nums; }
.rt-tablettes {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 12px; border-radius: 999px; background: var(--encre-2); color: #CFC9FF; font-size: 14px; white-space: nowrap;
}
.rt-tablettes:empty { display: none; }
.rt-tablettes .puce { width: 8px; height: 8px; }
.rt-tablettes .puce.ok { box-shadow: none; }
.rt-tablettes .puce.non { border-color: var(--brume); }
.rt-droite { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.rt-droite .btn { font-weight: 400; }
.rt-droite .btn:hover { background: var(--encre-2); border-color: var(--trait); }
.rt-droite .rt-annuler { background: var(--platre); border-color: var(--platre); color: var(--encre); font-weight: 600; }
.rt-droite .rt-annuler:hover { background: #fff; border-color: #fff; }
.rt-annuler:focus-visible { outline-color: var(--safran); }
.compteur-annuler {
  display: inline-block; min-width: 22px; padding: 0 6px; border-radius: 999px;
  background: var(--encre); color: var(--platre); font-size: 12px; line-height: 20px; text-align: center; font-variant-numeric: tabular-nums;
}
.page-parties .rt-code, .liste-parties .rt-code { color: var(--texte); }

/* Étapes -------------------------------------------------------------------- */
.etapes-barre { padding: 10px 28px; background: var(--surface); border-bottom: 1px solid var(--trait); overflow-x: auto; }
.etapes { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px; counter-reset: etape; }
.etapes li {
  counter-increment: etape;
  display: flex; align-items: center; gap: 8px;
  padding: 4px 12px 4px 4px; border-radius: 999px;
  font-size: 14px; font-weight: 600; color: var(--gris-texte); white-space: nowrap;
}
.etapes li::before {
  content: counter(etape);
  width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--trait); color: var(--gris-texte); font-size: 12px; font-weight: 700;
}
.etapes li.faite { color: var(--emeraude-fonce); }
.etapes li.faite::before { content: '✓'; border-color: var(--emeraude); background: #E6F7F1; color: var(--emeraude-fonce); }
.etapes li.active { background: var(--surface-2); color: var(--majorelle-fonce); }
.etapes li.active::before { background: var(--majorelle); border-color: var(--majorelle); color: #fff; }

/* Corps : trois colonnes qui passent à la ligne ----------------------------- */
.regie-corps {
  display: flex; flex-wrap: wrap; align-items: flex-start; gap: 20px;
  padding: 24px 28px;
}
.joueurs-panneau { flex: 1 0 380px; max-width: 100%; }
.centre-colonne { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.rail { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }

.panneau, .carte {
  background: var(--surface); border: 1px solid var(--trait); border-radius: 16px; min-width: 0;
}
.panneau-tete { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 18px 18px 10px; }
.panneau-tete h2 { font-family: var(--police-texte); font-size: 16px; font-weight: 600; letter-spacing: 0; }
.panneau-note { color: var(--gris-texte); font-size: 13px; }
.compte { color: var(--gris-texte); font-weight: 400; margin-left: 6px; }
.vide { padding: 4px 18px 18px; color: var(--texte-2); }

/* Joueurs ------------------------------------------------------------------- */
.joueurs-panneau { display: flex; flex-direction: column; }
.liste-joueurs { list-style: none; margin: 0; padding: 0 10px 6px; overflow-y: auto; }
.ligne-joueur {
  display: grid; grid-template-columns: 22px minmax(0, 1fr) auto auto; align-items: center; gap: 8px;
  padding: 6px 8px 6px 10px; border-radius: 10px;
}
.ligne-joueur + .ligne-joueur { margin-top: 4px; }
.ligne-joueur.buzz { background: #FFF3D6; }
.ligne-joueur.buzz .lj-etat { color: #6B4600; font-weight: 700; }
.ligne-joueur.exclu .lj-nom, .ligne-joueur.exclu .lj-score { color: var(--gris-texte); font-weight: 500; }
.ligne-joueur.horsjeu .lj-nom, .ligne-joueur.horsjeu .lj-score { color: var(--gris-texte); font-weight: 500; }
.ligne-joueur.horsjeu .pastille { opacity: .5; }
.lj-rang { color: var(--gris-texte); font-size: 13px; text-align: center; font-variant-numeric: tabular-nums; }
.lj-ident {
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px; min-width: 0; min-height: 44px; justify-content: center;
  background: none; border: none; padding: 4px 6px; margin-left: -6px; border-radius: 8px; cursor: pointer; text-align: left; color: var(--texte);
}
.lj-ident:hover { background: var(--surface-2); }
.ligne-joueur.buzz .lj-ident:hover { background: #FBE6B5; }
.lj-nom { display: flex; align-items: center; gap: 7px; min-width: 0; max-width: 100%; font-weight: 600; font-size: 15px; line-height: 1.2; overflow-wrap: anywhere; }
.lj-nom .pastille, .pastille { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; }
.lj-note { display: block; font-size: 12px; color: var(--gris-texte); line-height: 1.35; }
.lj-tablette { display: inline-grid; place-items: center; width: 14px; height: 14px; margin-right: 4px; vertical-align: -3px; }
.lj-tablette svg { width: 14px; height: 14px; }
.lj-tablette.ok { color: var(--emeraude-fonce); }
.lj-tablette.lie { color: #8A5A00; }
.lj-tablette.non { color: var(--gris-doux); }
.lj-score {
  min-width: 34px; text-align: right; font-family: var(--police-titre); font-weight: 800; font-size: 22px; line-height: 1;
  color: var(--texte); font-variant-numeric: tabular-nums;
}
.lj-score small { font-family: var(--police-texte); font-size: 12px; color: var(--gris-texte); font-weight: 400; }
.lj-ajuster { display: flex; gap: 2px; }
.lj-ajuster button {
  width: 40px; height: 44px; border-radius: 8px; border: 1px solid transparent;
  background: none; color: var(--gris-texte); font-size: 18px; font-weight: 700; cursor: pointer; padding: 0; line-height: 1;
}
.lj-ajuster button:hover { background: var(--surface-2); border-color: var(--trait); color: var(--texte); }
.badge-qualifie { color: #8A5A00; font-size: 14px; }
.joueurs-pied { padding: 6px 10px 12px; }
.joueurs-pied .btn-ajout {
  width: 100%; border: 1px dashed #BDB7DA; background: transparent; color: var(--majorelle-fonce); font-weight: 600;
}
.joueurs-pied .btn-ajout:hover { background: var(--surface-2); }

/* Centre : cartes ------------------------------------------------------------ */
.carte { padding: 24px 28px; }
.carte h2 { font-size: 26px; }
.carte h3 { font-size: 19px; }
.titre-centre { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }

.q-entete { display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap; color: var(--gris-texte); }
.q-num { color: var(--gris-texte); }
.q-chrono { margin-left: auto; display: flex; align-items: baseline; gap: 6px; color: var(--gris-texte); }
.chrono-chiffre {
  font-family: var(--police-titre); font-weight: 800; font-size: 34px; line-height: 1;
  color: var(--texte); font-variant-numeric: tabular-nums; min-width: 2.5em; text-align: right;
}
.chrono-chiffre.urgent { color: var(--grenade-fonce); }
.barre-temps { display: block; margin-top: 12px; height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.barre-temps i { display: block; height: 100%; background: var(--majorelle); border-radius: 3px; transform-origin: left center; }
.barre-temps.urgent i { background: var(--grenade); }
[dir="rtl"] .barre-temps i { transform-origin: right center; }

.q-texte {
  margin: 12px 0 0; font-family: var(--police-titre); font-weight: 700; font-size: 38px; line-height: 1.1;
  letter-spacing: 0; overflow-wrap: anywhere;
}
.q-reponse {
  display: flex; align-items: center; gap: 6px 14px; flex-wrap: wrap;
  margin-top: 18px; padding: 14px 18px; border-radius: 12px;
  background: #E6F7F1; color: #0B5E45; border: 1px solid transparent;
}
.q-reponse > span { font-size: 13px; font-weight: 600; }
.q-reponse strong { font-family: var(--police-titre); font-weight: 700; font-size: 26px; line-height: 1.15; overflow-wrap: anywhere; }
.q-reponse.affichee { border-color: var(--emeraude); }

/* Pupitre « réponse en cours » ---------------------------------------------- */
.pupitre {
  display: flex; flex-direction: column; gap: 18px;
  padding: 22px 28px; border-radius: 16px; background: var(--encre);
}
.pupitre-haut { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 14px; }
.pupitre-label { color: var(--brume); }
.zb-nom {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--police-titre); font-weight: 800; font-size: 34px; line-height: 1.05; color: var(--safran); overflow-wrap: anywhere;
}
.zb-nom .pastille { width: 14px; height: 14px; }
.zb-temps { margin-left: auto; font-family: var(--police-titre); font-weight: 800; font-size: 30px; line-height: 1; color: var(--platre); font-variant-numeric: tabular-nums; }
.zb-temps.urgent { color: #FF8597; }
.verdicts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.btn-geant {
  min-height: 76px; padding: 10px 18px; border-radius: 14px; border: 0;
  font-size: 22px; font-weight: 700; line-height: 1.2; text-align: center; white-space: normal;
}
.pupitre .btn-succes { background: var(--emeraude); color: #04281D; }
.pupitre .btn-succes:hover { background: #0FA578; }
.pupitre .btn-danger { background: var(--grenade); color: #fff; }
.pupitre .btn-danger:hover { background: #D42A42; }
.pupitre .btn-primaire { background: var(--majorelle); border-color: var(--majorelle); color: #fff; }
.pupitre .btn-primaire:hover { background: #5C51F0; border-color: #5C51F0; }
.pupitre .btn:not(.btn-primaire):not(.btn-succes):not(.btn-danger) { font-weight: 400; }
.pupitre .btn:not(.btn-primaire):not(.btn-succes):not(.btn-danger):hover { background: var(--encre-2); }
.pupitre .btn-fantome { border-color: transparent; }

.zone-etat h3 { font-size: 24px; color: var(--platre); }
.zone-etat p { color: var(--brume); margin-top: 4px; }
.zone-etat.bonne h3 { color: #5BE5B7; }
.zone-etat.rate h3 { color: #FF9AA8; }
.zone-etat.pause h3 { color: var(--safran); }

.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.actions + .actions { margin-top: 10px; }
.actions .espace, .pied-centre .espace { flex: 1; }
.btn .kbd { margin-left: 8px; }
.btn-geant .kbd { font-size: 13px; }

.oral { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; font-size: 14px; color: var(--texte-2); }
.oral select { width: auto; max-width: 100%; min-height: 44px; padding: 4px 10px; font-size: 15px; }
.pupitre select { background: var(--encre-2); border-color: var(--trait); color: var(--platre); }

.bandeau-info {
  display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap;
  padding: 12px 18px; border-radius: 16px;
  background: #FFF3D6; border: 1px solid #F2D58A; color: #6B4600; font-weight: 600;
}
.carte .bandeau-info { margin: 14px 0 0; }
.bandeau-info .btn { margin-left: auto; }

/* Préparation */
.preparation { list-style: none; padding: 0; margin: 0 0 20px; counter-reset: prep; }
.preparation li {
  counter-increment: prep;
  display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 14px;
  padding: 14px 0; border-bottom: 1px solid var(--trait);
}
.preparation li::before {
  content: counter(prep); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--trait); font-weight: 700; font-size: 14px; color: var(--gris-texte);
}
.preparation li.ok::before { content: '✓'; border-color: var(--emeraude); background: #E6F7F1; color: var(--emeraude-fonce); }
.preparation strong { display: block; font-weight: 600; }
.preparation span { color: var(--gris-texte); font-size: 14px; }
.carte > .aide { margin-top: 10px; }

.vide-centre { text-align: center; padding: 22px 10px 12px; }
.vide-centre p { color: var(--gris-texte); margin: 8px auto 22px; max-width: 520px; }

.test-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin: 16px 0 20px; }
.test-case { padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--trait); }
.test-case strong { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.test-case span { font-size: 14px; color: var(--gris-texte); }
.test-case.ok { background: #E6F7F1; border-color: var(--emeraude); }
.test-case.ok > span { color: var(--emeraude-fonce); font-weight: 600; }

/* Classement / finalistes */
.table-classement { width: 100%; border-collapse: collapse; margin: 16px 0 18px; }
.table-classement th { text-align: left; font-size: 13px; color: var(--gris-texte); font-weight: 600; padding: 6px 10px; }
.table-classement td { padding: 10px; border-top: 1px solid var(--trait); }
.table-classement .rang { width: 48px; color: var(--gris-texte); font-variant-numeric: tabular-nums; }
.table-classement .score { text-align: right; font-family: var(--police-titre); font-weight: 800; font-size: 22px; font-variant-numeric: tabular-nums; }
.table-classement tr.choisi td { background: #F1EFFC; }
.table-classement .pastille { margin-right: 8px; }
.choix-finalistes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; align-items: end; }
.choix-finalistes .champ + .champ { margin-top: 0; }

/* Face-à-face */
.carte-duel .titre-centre { margin-bottom: 12px; }
.duel-regie { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.duelliste-regie {
  position: relative; padding: 14px 16px; border-radius: 14px; background: var(--surface);
  border: 1px solid var(--trait); text-align: left; color: var(--texte); cursor: default; min-height: 44px;
}
.duelliste-regie.main { border: 2px solid var(--c); padding: 13px 15px; background: #FAF9FE; }
button.duelliste-regie { cursor: pointer; font: inherit; }
button.duelliste-regie:hover { border-color: var(--c); }
.dr-nom { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 17px; padding-right: 86px; }
.dr-score { font-family: var(--police-titre); font-size: 40px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.dr-score small { font-family: var(--police-texte); font-size: 15px; font-weight: 400; color: var(--gris-texte); }
.dr-main { position: absolute; right: 12px; top: 12px; padding: 2px 10px; border-radius: 999px; background: var(--c); color: var(--ct); font-size: 13px; font-weight: 700; }
.choix-main { margin-top: 16px; }
.choix-main p { margin-top: 2px; }
.indices-regie { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.indices-regie li {
  display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 10px 14px; border-radius: 12px; border: 1px dashed var(--trait);
}
.indices-regie .ir-pts {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--trait); font-weight: 700; font-size: 14px; color: var(--gris-texte);
}
.indices-regie .ir-texte { overflow-wrap: anywhere; }
.indices-regie .ir-etat { font-size: 12px; color: var(--gris-texte); white-space: nowrap; }
.indices-regie li.revele { border-style: solid; }
.indices-regie li.revele .ir-pts { background: var(--c, var(--majorelle)); border-color: transparent; color: var(--ct, #fff); }
.indices-regie li.actuel { border: 2px solid var(--c); padding: 9px 13px; background: #FAF9FE; }
.indices-regie li.actuel .ir-texte { font-weight: 700; }
.indices-regie li.cache-public .ir-texte { color: var(--gris-texte); }

/* Contrôle de l'écran de projection */
.carte-ecran { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; padding: 12px 18px; font-size: 14px; color: var(--gris-texte); }
.segment { display: inline-flex; flex-wrap: wrap; padding: 3px; border-radius: 12px; background: var(--surface-2); gap: 2px; }
.segment button {
  min-height: 40px; border: 1px solid transparent; background: none; color: var(--gris-texte);
  font-weight: 600; padding: 6px 14px; border-radius: 9px; cursor: pointer; font-size: 14px;
}
.segment button:hover { color: var(--texte); }
.segment button.actif { background: var(--surface); border-color: var(--trait); color: var(--texte); }

.champion-regie { text-align: center; padding: 10px 0; }
.champion-regie svg { width: 96px; height: 96px; margin: 0 auto; display: block; }
.champion-regie h2 { font-size: 34px; margin: 12px 0 6px; }
.champion-regie p { color: var(--gris-texte); margin-bottom: 20px; }
.champion-regie .actions { justify-content: center; }
.champion-regie .aide { margin: 16px 0 0; }

/* Questions (rail de droite) ------------------------------------------------- */
.questions-panneau { display: flex; flex-direction: column; }
.questions-panneau .panneau-tete { flex-wrap: wrap; }
.onglets { display: flex; gap: 4px; padding: 0 12px 10px; }
.onglets button {
  flex: 1; min-height: 40px; border: 1px solid transparent; background: var(--surface-2); color: var(--gris-texte);
  padding: 6px 8px; border-radius: 9px; font-weight: 600; cursor: pointer; font-size: 14px;
}
.onglets button.actif { background: var(--surface); border-color: var(--majorelle); color: var(--majorelle-fonce); }
.liste-questions { list-style: none; margin: 0; padding: 0 8px 8px; overflow-y: auto; max-height: 52vh; }
.lq button {
  width: 100%; min-height: 44px; display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 8px; align-items: start;
  padding: 8px 10px; border-radius: 10px; border: 1px solid transparent; background: none;
  color: #3E3962; text-align: left; cursor: pointer; font-size: 14px; line-height: 1.35;
}
.lq button:hover { background: var(--surface-2); }
.lq-num { color: var(--gris-texte); text-align: right; font-variant-numeric: tabular-nums; }
.lq-texte { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.lq-texte small { color: var(--gris-texte); }
.lq-pts { color: var(--gris-texte); font-size: 13px; white-space: nowrap; }
.lq.jouee button { color: var(--gris-texte); }
.lq.jouee .lq-texte { text-decoration: line-through; text-decoration-color: var(--gris-doux); }
.lq.jouee .lq-num::after { content: ' ✓'; }
.lq.en-cours button { border-color: #F2D58A; background: #FFF3D6; color: var(--texte); font-weight: 600; }
.questions-pied .btn { padding: 6px 10px; }
.questions-pied { padding: 8px 12px 12px; border-top: 1px solid var(--trait); display: flex; gap: 6px; flex-wrap: wrap; }
.questions-pied .btn { color: var(--majorelle-fonce); font-weight: 600; }

/* Journal -------------------------------------------------------------------- */
.journal-liste { list-style: none; margin: 0; padding: 0 18px 16px; max-height: 280px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: #3E3962; }
.journal-liste li { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 6px; }
.journal-liste time { color: var(--gris-texte); font-variant-numeric: tabular-nums; }

/* Menu ----------------------------------------------------------------------- */
.menu-regie {
  position: fixed; z-index: 60; min-width: 270px; padding: 6px;
  background: var(--surface); border: 1px solid var(--trait); border-radius: 14px;
  box-shadow: 0 12px 32px rgba(15, 12, 46, .16);
}
.menu-regie button, .menu-regie a {
  display: flex; align-items: center; width: 100%; min-height: 44px; text-align: left; padding: 8px 12px; border-radius: 9px;
  background: none; border: none; color: var(--texte); font-weight: 400; cursor: pointer; text-decoration: none; font-size: 15px;
}
.menu-regie button:hover, .menu-regie a:hover { background: var(--surface-2); }
.menu-regie hr { border: none; border-top: 1px solid var(--trait); margin: 6px 4px; }
.menu-regie .danger { color: var(--grenade-fonce); }

/* Écran des parties ----------------------------------------------------------- */
.page-parties { max-width: 1080px; margin: 0 auto; padding: 28px; display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 20px; align-items: start; }
.page-parties .panneau { padding: 22px 24px; }
.page-parties h2 { font-family: var(--police-texte); font-size: 18px; font-weight: 600; letter-spacing: 0; margin-bottom: 6px; }
.page-intro { font-size: 14px; margin-bottom: 16px; }
.page-parties form .btn { width: 100%; margin-top: 18px; }
.liste-parties { list-style: none; margin: 8px 0 0; padding: 0; }
.liste-parties li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 14px 0; border-top: 1px solid var(--trait); }
.liste-parties li:first-child { border-top: none; }
.lp-nom { font-family: var(--police-titre); font-weight: 700; font-size: 20px; line-height: 1.2; }
.lp-nom .rt-code { font-family: var(--police-texte); font-size: 13px; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--majorelle-fonce); vertical-align: 2px; }
.lp-meta { font-size: 13px; color: var(--gris-texte); margin-top: 2px; }
.lp-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

/* Porte (connexion) ----------------------------------------------------------- */
body.regie-page .porte-carte { border: 1px solid var(--trait); box-shadow: none; border-radius: 16px; }
body.regie-page .porte-carte .etoile-logo { width: 48px; height: 48px; }

/* Dialogues propres à la régie --------------------------------------------- */
body.regie-page .dialogue { border: 1px solid var(--trait); border-radius: 16px; box-shadow: 0 16px 48px rgba(15, 12, 46, .22); }
.palette { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.palette button { width: 44px; height: 44px; border-radius: 50%; border: 3px solid var(--surface); cursor: pointer; background: var(--c); box-shadow: 0 0 0 1px var(--trait); }
.palette button.actif { box-shadow: 0 0 0 2px var(--encre); }
.qr-grand { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 20px; align-items: center; }
.qr-grand .qr { width: 240px; height: 240px; border-radius: 12px; border: 1px solid var(--trait); }
.qr-url { font-size: 15px; word-break: break-all; color: var(--gris-texte); }
.qr-code { font-family: var(--police-titre); font-size: 40px; font-weight: 800; letter-spacing: .12em; color: var(--texte); margin: 6px 0 2px; }
.qr-joueurs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 18px; }
.qr-joueur { text-align: center; padding: 10px; border-radius: 12px; background: #fff; color: var(--encre); border: 1px solid var(--trait); }
.qr-joueur .qr { width: 120px; height: 120px; }
.qr-joueur strong { display: block; margin-top: 4px; font-weight: 600; }
.qr-joueur .code-joueur { display: block; margin-top: 4px; font-family: var(--police-titre); font-size: 24px; font-weight: 800; letter-spacing: .15em; }
.qr-joueur .badge { margin-top: 6px; }
.qr-code-inline { letter-spacing: .1em; }
.grille-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grille-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.grille-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.grille-2 .champ + .champ, .grille-3 .champ + .champ, .grille-4 .champ + .champ { margin-top: 0; }
.reglages fieldset { border: 1px solid var(--trait); border-radius: 16px; padding: 14px 16px 16px; margin: 0 0 14px; }
.reglages legend { font-weight: 700; padding: 0 6px; }
.reglages .etiquette { margin-top: 14px; }
.reglages .case { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-weight: 400; min-height: 32px; }
.reglages .nombre-court { width: 80px; min-height: 36px; padding: 4px 8px; display: inline-block; }
.reglages .champ.court { max-width: 340px; margin-top: 14px; }

/* Adaptations ---------------------------------------------------------------- */
@media (min-width: 1240px) {
  .joueurs-panneau { position: sticky; top: 84px; max-height: calc(100vh - 160px); }
}
@media (max-width: 900px) {
  .regie-tete, .etapes-barre { padding-left: 16px; padding-right: 16px; }
  .regie-corps { padding: 16px; gap: 16px; }
  .rt-droite { margin-left: 0; width: 100%; }
  .regie-tete { position: static; }
  .etapes li span { display: none; }
  .etapes li.active span { display: inline; }
}
@media (max-width: 760px) {
  .carte { padding: 18px 16px; }
  .pupitre { padding: 18px 16px; }
  .q-texte { font-size: 28px; }
  .zb-nom { font-size: 28px; }
  .verdicts, .duel-regie, .choix-finalistes, .grille-2, .grille-3 { grid-template-columns: 1fr; }
  .grille-4 { grid-template-columns: 1fr 1fr; }
  .page-parties { grid-template-columns: 1fr; padding: 16px; }
  .qr-grand { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .rt-nom { max-width: 160px; }
}

@media print {
  body * { visibility: hidden; }
  .impression, .impression * { visibility: visible; }
  .impression { position: absolute; left: 0; top: 0; width: 100%; }
}

/* Ordre des buzz (manche 1) ---------------------------------------------- */
.historique-buzz { border-top: 1px solid var(--encre-3); padding-top: 12px; }
.historique-buzz h3 { margin: 0 0 8px; font-family: var(--police-texte); font-size: 14px; font-weight: 600; color: var(--brume); }
.historique-buzz ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.historique-buzz li { display: grid; grid-template-columns: 22px 12px 1fr auto; align-items: center; gap: 10px; padding: 4px 0; }
.historique-buzz .hb-rang { color: var(--brume); font-size: 13px; text-align: right; }
.historique-buzz .hb-nom { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.historique-buzz .hb-ecart { color: var(--safran); font-weight: 700; font-variant-numeric: tabular-nums; }
.historique-buzz li:first-child .hb-ecart, .historique-buzz .hb-vague + li .hb-ecart { color: var(--brume); font-weight: 500; }
.historique-buzz .hb-vague { display: block; padding: 8px 0 2px; font-size: 13px; color: var(--brume); }
