/* Tirage de groupes — feuille de style */

:root {
  color-scheme: light dark;
  --fond: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #f1f3f5;
  --bord: #dde1e6;
  --bord-fort: #c3c9d0;
  --texte: #1b1f24;
  --texte-2: #5a626c;
  --accent: #0d6e66;
  --accent-fort: #0a5852;
  --accent-doux: #e1f2ef;
  --accent-texte: #ffffff;
  --ok: #1e7f46;
  --ok-doux: #e3f4ea;
  --alerte: #8a5300;
  --alerte-doux: #fff3dc;
  --danger: #b42318;
  --danger-doux: #fdecea;
  --ombre: 0 1px 2px rgba(16, 24, 40, .05), 0 2px 6px rgba(16, 24, 40, .06);
  --rayon: 12px;
  --rayon-petit: 8px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --fond: #111416;
    --surface: #1a1e21;
    --surface-2: #23282c;
    --bord: #30373c;
    --bord-fort: #424a51;
    --texte: #e8eaec;
    --texte-2: #a1a9b1;
    --accent: #2bb3a5;
    --accent-fort: #4cc7ba;
    --accent-doux: #133430;
    --accent-texte: #061b19;
    --ok: #4cc27f;
    --ok-doux: #15301f;
    --alerte: #f0b354;
    --alerte-doux: #33270f;
    --danger: #f2756a;
    --danger-doux: #3a1714;
    --ombre: 0 1px 2px rgba(0, 0, 0, .35);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font-size: 15px;
  line-height: 1.45;
}
body.sans-defilement { overflow: hidden; }
[hidden] { display: none !important; }

h1, h2, h3 { line-height: 1.2; }
h2 { font-size: 1.05rem; margin: 0 0 6px; }

button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- En-tête ---------- */

.entete {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  max-width: 1200px; margin: 0 auto; padding: 18px 16px 10px;
}
.entete-titre { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }
.logo { width: 40px; height: 40px; flex: none; }
.entete-texte { min-width: 0; flex: 1; }
.entete h1 { font-size: 1.35rem; margin: 0; letter-spacing: -.01em; }
.nom-seance {
  width: 100%; max-width: 460px; border: 1px solid transparent; background: transparent;
  padding: 2px 6px; margin-left: -6px; border-radius: 6px; color: var(--texte-2);
}
.nom-seance:hover { border-color: var(--bord); }
.nom-seance:focus { border-color: var(--accent); background: var(--surface); color: var(--texte); outline: none; }
.entete-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- Onglets ---------- */

.onglets {
  display: flex; gap: 4px; max-width: 1200px; margin: 0 auto; padding: 0 16px;
  border-bottom: 1px solid var(--bord); overflow-x: auto; scrollbar-width: none;
}
.onglets button {
  border: 0; background: none; padding: 10px 14px; border-bottom: 3px solid transparent;
  color: var(--texte-2); cursor: pointer; white-space: nowrap; display: flex; align-items: center; gap: 8px;
  font-weight: 500;
}
.onglets button:hover { color: var(--texte); }
.onglets button.actif { color: var(--accent); border-bottom-color: var(--accent); }
.num-etape {
  display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  background: var(--surface-2); font-size: .8rem; font-weight: 700;
}
.onglets button.actif .num-etape { background: var(--accent); color: var(--accent-texte); }
.pastille {
  font-size: .75rem; background: var(--surface-2); border-radius: 999px; padding: 1px 8px; font-weight: 600;
}

/* ---------- Mise en page ---------- */

main { max-width: 1200px; margin: 0 auto; padding: 16px 16px 48px; }
.onglet { display: flex; flex-direction: column; gap: 16px; }
.colonnes { display: grid; grid-template-columns: 3fr 2fr; gap: 16px; }
@media (max-width: 820px) { .colonnes { grid-template-columns: 1fr; } }

.carte {
  background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon);
  padding: 18px; box-shadow: var(--ombre); min-width: 0;
}
.carte-entete { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.carte-entete h2 { margin: 0; }
.aide { color: var(--texte-2); font-size: .88rem; margin: 4px 0 12px; }
.facultatif { font-size: .75rem; font-weight: 500; color: var(--texte-2); background: var(--surface-2); padding: 2px 8px; border-radius: 999px; margin-left: 6px; vertical-align: 2px; }
.compteur { color: var(--texte-2); font-weight: 500; }
.vide { color: var(--texte-2); text-align: center; padding: 24px 8px; margin: 0; }
.bloc { margin-top: 16px; }
.champ { margin: 4px 0 14px; }
.champ-ligne { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.etiquette { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.champ-ligne .etiquette { margin: 0; }

/* ---------- Boutons et champs ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--bord-fort); background: var(--surface); color: var(--texte);
  border-radius: var(--rayon-petit); padding: 7px 14px; cursor: pointer; font-weight: 500; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.principal { background: var(--accent); border-color: var(--accent); color: var(--accent-texte); }
.btn.principal:hover { background: var(--accent-fort); border-color: var(--accent-fort); }
.btn.grand { padding: 11px 22px; font-size: 1.05rem; font-weight: 600; }
.btn.discret { border-color: transparent; background: transparent; color: var(--texte-2); }
.btn.discret:hover { background: var(--surface-2); color: var(--texte); }
.btn.danger-discret { color: var(--danger); border-color: var(--bord); }
.btn.danger-discret:hover { background: var(--danger-doux); }
.ligne-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.carte > .ligne-actions { margin-top: 10px; }

input[type="text"], input:not([type]), select, textarea {
  border: 1px solid var(--bord-fort); background: var(--surface); border-radius: var(--rayon-petit);
  padding: 7px 10px; min-width: 0;
}
textarea { width: 100%; resize: vertical; font-family: inherit; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-doux); }
.ligne-saisie { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.ligne-saisie input { flex: 1; min-width: 160px; }
.ligne-saisie.regle select { flex: 1; min-width: 140px; }
.ligne-saisie.regle #regle-type { flex: 0 1 auto; }

/* Pas à pas (− 4 +) */
.pas { display: inline-flex; align-items: center; border: 1px solid var(--bord-fort); border-radius: var(--rayon-petit); overflow: hidden; }
.pas button { border: 0; background: var(--surface-2); width: 34px; height: 32px; cursor: pointer; font-size: 1.1rem; }
.pas button:hover:not(:disabled) { background: var(--bord); }
.pas button:disabled { opacity: .4; cursor: not-allowed; }
.pas output { min-width: 38px; text-align: center; font-weight: 700; }

/* Boutons segmentés */
.segments { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--bord-fort); border-radius: var(--rayon-petit); overflow: hidden; }
.segments button { border: 0; border-right: 1px solid var(--bord); background: var(--surface); padding: 7px 14px; cursor: pointer; }
.segments button:last-child { border-right: 0; }
.segments button:hover { background: var(--surface-2); }
.segments button.actif { background: var(--accent); color: var(--accent-texte); font-weight: 600; }
.segments button:disabled { opacity: .45; cursor: not-allowed; }

/* Cartes de choix (radio) */
.choix-cartes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 640px) { .choix-cartes { grid-template-columns: 1fr; } }
.choix {
  display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--bord-fort); border-radius: var(--rayon-petit);
  padding: 12px; cursor: pointer;
}
.choix:has(input:checked) { border-color: var(--accent); background: var(--accent-doux); }
.choix input { margin-top: 3px; accent-color: var(--accent); }
.choix strong { display: block; }
.choix small { color: var(--texte-2); }

/* Interrupteurs */
.interrupteur { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0 0; cursor: pointer; font-size: .92rem; }
.interrupteur input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--accent); flex: none; }
.interrupteur.inactif { opacity: .5; cursor: not-allowed; }

/* Curseur */
.bloc-curseur { margin: 4px 0 8px; max-width: 520px; }
.bloc-curseur input { width: 100%; accent-color: var(--accent); }
.curseur-legende { display: flex; justify-content: space-between; font-size: .8rem; color: var(--texte-2); }
#valeur-equilibre { font-weight: 600; color: var(--texte); }

/* Puces */
.puces { display: flex; flex-wrap: wrap; gap: 6px; }
.puce {
  display: inline-flex; align-items: center; gap: 6px; background: var(--surface-2); border: 1px solid var(--bord);
  border-radius: 999px; padding: 3px 4px 3px 12px; font-size: .9rem;
}
.puce small { color: var(--texte-2); }
.puce-x { border: 0; background: none; cursor: pointer; width: 22px; height: 22px; border-radius: 50%; color: var(--texte-2); }
.puce-x:hover { background: var(--bord); color: var(--texte); }
.apercu { margin-top: 12px; }
.apercu .puce-groupe { padding: 4px 12px; border-radius: 999px; font-size: .85rem; font-weight: 600; background: var(--c); color: var(--ct); }

/* Tableaux */
.table-defile { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left; font-size: .78rem; font-weight: 600; color: var(--texte-2); text-transform: uppercase;
  letter-spacing: .03em; padding: 6px 6px; border-bottom: 1px solid var(--bord); white-space: nowrap;
}
.table td { padding: 4px 6px; border-bottom: 1px solid var(--bord); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table td.num { color: var(--texte-2); font-size: .8rem; width: 28px; text-align: right; }
.table input, .table select { width: 100%; min-width: 120px; padding: 5px 8px; }
.table .col-action { width: 36px; text-align: center; }
.icone {
  border: 0; background: none; width: 30px; height: 30px; border-radius: 6px; cursor: pointer; color: var(--texte-2); font-size: 1.1rem;
}
.icone:hover { background: var(--danger-doux); color: var(--danger); }

.resume { margin-top: 16px; padding: 10px 14px; border-radius: var(--rayon-petit); background: var(--surface-2); font-size: .92rem; }
.resume.alerte-texte { background: var(--alerte-doux); color: var(--alerte); }

.liste-regles { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 6px; }
.liste-regles li {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: var(--surface-2); border-radius: var(--rayon-petit); padding: 6px 6px 6px 12px;
}
.type-regle { font-weight: 600; }
.type-regle.jamais { color: var(--danger); }
.type-regle.toujours { color: var(--ok); }

/* ---------- Tirage ---------- */

.barre-tirage { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.alerte { padding: 10px 14px; border-radius: var(--rayon-petit); background: var(--alerte-doux); color: var(--alerte); font-size: .92rem; }
.alerte.erreur { background: var(--danger-doux); color: var(--danger); }
.alerte ul { margin: 4px 0 0; padding-left: 20px; }

.bilan { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.tuile { background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 12px 14px; }
.tuile .libelle { font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--texte-2); font-weight: 600; }
.tuile .valeur { font-size: 1.35rem; font-weight: 700; margin-top: 2px; }
.tuile .detail { font-size: .82rem; color: var(--texte-2); }
.tuile.ok .valeur { color: var(--ok); }
.tuile.non .valeur { color: var(--danger); }

.legende { display: inline-block; margin-left: 4px; white-space: nowrap; }
.marque-ok { color: var(--ok); }
.marque-non { color: var(--danger); }

.grille-groupes { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.groupe {
  background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon); overflow: hidden;
  display: flex; flex-direction: column; box-shadow: var(--ombre); transition: box-shadow .15s, transform .15s;
}
.groupe.cible { box-shadow: 0 0 0 3px var(--accent); }
.mode-choix .groupe { cursor: pointer; }
.groupe-tete { background: var(--c); color: var(--ct); padding: 10px 14px; }
.groupe-tete h3 { margin: 0; font-size: 1.02rem; display: flex; justify-content: space-between; gap: 8px; }
.groupe-tete .taille { font-weight: 500; opacity: .9; font-size: .9rem; }
.groupe-theme { font-size: .82rem; opacity: .92; margin-top: 2px; }
.groupe-infos { display: flex; gap: 6px; flex-wrap: wrap; padding: 8px 12px; border-bottom: 1px solid var(--bord); font-size: .78rem; }
.etiquette-orig { background: var(--surface-2); border-radius: 999px; padding: 1px 8px; color: var(--texte-2); }
.etiquette-orig.hors { background: var(--alerte-doux); color: var(--alerte); }
.membres { list-style: none; margin: 0; padding: 8px; display: flex; flex-direction: column; gap: 4px; flex: 1; min-height: 56px; }
.membre {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px;
  border-radius: var(--rayon-petit); background: var(--surface-2); border: 2px solid transparent;
  cursor: pointer; font-size: .92rem; user-select: none;
}
.membre:hover { border-color: var(--bord-fort); }
.membre.choisi { border-color: var(--accent); background: var(--accent-doux); }
.membre.glisse { opacity: .4; }
.membre .nom { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.membre .orig { color: var(--texte-2); font-size: .75rem; margin-left: 4px; }
.marques { display: flex; gap: 6px; font-size: .78rem; white-space: nowrap; color: var(--texte-2); }

/* ---------- Grand écran ---------- */

.ecran {
  position: fixed; inset: 0; z-index: 50; background: #0e1113; color: #f4f5f6;
  overflow: auto; padding: 24px clamp(16px, 3vw, 40px) 40px;
}
.ecran .btn { background: #1f2529; border-color: #3a4248; color: #f4f5f6; }
.ecran .btn:hover { background: #2a3136; }
.ecran .btn.principal { background: #2bb3a5; border-color: #2bb3a5; color: #061b19; }
.ecran-haut { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.ecran-haut h2 { font-size: clamp(1.4rem, 2.6vw, 2.2rem); margin: 0; }
.ecran-grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 20px; }
.ecran-carte { border-radius: 16px; background: #1a1f23; overflow: hidden; min-height: 180px; display: flex; flex-direction: column; }
.ecran-carte .tete { background: var(--c); color: var(--ct); padding: 14px 18px; }
.ecran-carte .tete strong { display: block; font-size: clamp(1.2rem, 2vw, 1.7rem); }
.ecran-carte .tete small { font-size: clamp(.9rem, 1.2vw, 1.1rem); opacity: .92; }
.ecran-carte ul { list-style: none; margin: 0; padding: 14px 18px; font-size: clamp(1.05rem, 1.7vw, 1.5rem); line-height: 1.55; }
.ecran-carte li { animation: apparition .5s both; animation-delay: calc(var(--i) * 140ms); }
.ecran-carte .mystere { flex: 1; display: grid; place-items: center; font-size: 3.5rem; font-weight: 800; color: #3a4248; }
.ecran-carte.revele { animation: eclat .6s ease-out; }
.ecran-astuce { color: #7d868d; font-size: .85rem; text-align: center; margin-top: 28px; }
@keyframes apparition { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes eclat { 0% { transform: scale(.96); } 60% { transform: scale(1.02); } 100% { transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .ecran-carte li, .ecran-carte.revele { animation: none; }
}

/* ---------- Notification ---------- */

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--texte); color: var(--fond); padding: 10px 18px; border-radius: 999px; font-size: .92rem;
  transition: opacity .2s, transform .2s; z-index: 60; max-width: calc(100% - 32px); text-align: center;
}
.toast.visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Impression ---------- */

.imprime-seulement { display: none; }
@media print {
  body { background: #fff; color: #000; font-size: 12pt; }
  .entete, .onglets, .barre-tirage, #bilan, #aide-ajuster, #message-tirage, .toast, .ecran { display: none !important; }
  .onglet:not(#onglet-tirage) { display: none !important; }
  #onglet-tirage { display: block !important; }
  main { padding: 0; max-width: none; }
  .imprime-seulement { display: block; margin-bottom: 12pt; }
  .imprime-seulement h1 { font-size: 18pt; margin: 0 0 4pt; }
  .grille-groupes { grid-template-columns: repeat(2, 1fr); gap: 10pt; }
  .groupe { break-inside: avoid; box-shadow: none; border: 1px solid #999; }
  .groupe-tete { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .membre { background: none; border: 0; padding: 2pt 6pt; }
  .marques, .groupe-infos, .publication { display: none !important; }
}

/* =====================================================================
   Mode en ligne — écran organisateur
   ===================================================================== */

.demarrage main, .demarrage .onglets, .demarrage .entete-actions, .demarrage .nom-seance { visibility: hidden; }

.btn.plein { width: 100%; }
.btn.lien {
  border: 0; background: none; padding: 4px 0; color: var(--accent); text-decoration: underline;
  text-underline-offset: 3px; font-weight: 500;
}
.btn.lien:hover { background: none; color: var(--accent-fort); }

.vue-etroite { max-width: 420px; margin: 40px auto; padding: 0 16px; }
.vue-etroite .carte { display: flex; flex-direction: column; gap: 10px; }
.vue-etroite input { width: 100%; }
.vue-large { max-width: 1200px; margin: 0 auto; padding: 16px 16px 48px; }

.etat-reseau { font-size: .8rem; color: var(--texte-2); padding: 4px 10px; border-radius: 999px; background: var(--surface-2); white-space: nowrap; }
.etat-reseau.ok { color: var(--ok); background: var(--ok-doux); }
.etat-reseau.ko { color: var(--danger); background: var(--danger-doux); }
.entete-actions { align-items: center; }

/* Pastilles de phase */
.phase {
  display: inline-block; font-size: .78rem; font-weight: 600; padding: 3px 10px; border-radius: 999px;
  background: var(--surface-2); color: var(--texte-2); white-space: nowrap;
}
.phase-inscriptions { background: var(--accent-doux); color: var(--accent); }
.phase-fermee { background: var(--alerte-doux); color: var(--alerte); }
.phase-publiee { background: var(--ok-doux); color: var(--ok); }

/* Liste des séances */
.liste-seances { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.liste-seances .vide { padding: 28px 8px; }
.seance-ligne { display: flex; align-items: center; gap: 8px; border: 1px solid var(--bord); border-radius: var(--rayon-petit); padding: 4px 6px 4px 4px; }
.seance-ligne:hover { border-color: var(--bord-fort); background: var(--surface-2); }
.seance-ouvrir {
  flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; text-align: left;
  border: 0; background: none; padding: 10px 12px; cursor: pointer;
}
.seance-ouvrir strong { font-size: 1rem; }
.seance-infos { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: .85rem; color: var(--texte-2); }
.seance-date { font-size: .78rem; color: var(--texte-2); }

/* Carte « Inscriptions en ligne » */
#carte-en-ligne { border-color: var(--accent); }
.en-ligne { display: flex; gap: 20px; align-items: flex-start; margin-top: 10px; }
@media (max-width: 640px) { .en-ligne { flex-direction: column; } }
.qr-mini {
  width: 132px; height: 132px; flex: none; padding: 0; border: 1px solid var(--bord); border-radius: var(--rayon-petit);
  background: #fff; cursor: zoom-in; overflow: hidden;
}
.qr-mini svg { width: 100%; height: 100%; display: block; }
.en-ligne-texte { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.code-seance { font-size: 1rem; color: var(--texte-2); }
.code-seance strong { font-size: 1.6rem; letter-spacing: .12em; color: var(--texte); margin-left: 6px; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; }
.adresse { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .88rem; color: var(--texte-2); word-break: break-all; }
.compteurs { font-size: .92rem; }
.en-ligne-texte .aide { margin: 2px 0 0; }
.en-ligne-texte .interrupteur { margin-top: 4px; }

.col-en-ligne { white-space: nowrap; font-size: .82rem; }
.badge-inscrit { color: var(--ok); font-weight: 600; }
.badge-inscrit::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); margin-right: 5px; vertical-align: 1px; }
.badge-absent { color: var(--texte-2); }
.lien-petit { border: 0; background: none; color: var(--texte-2); text-decoration: underline; cursor: pointer; font-size: .78rem; padding: 2px; }
.lien-petit:hover { color: var(--danger); }
.ajoute-en-ligne { display: block; font-size: .72rem; color: var(--accent); }

/* Bandeau de publication (onglet Tirage) */
.publication {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 12px 14px; border-radius: var(--rayon); border: 1px solid var(--accent); background: var(--accent-doux); font-size: .92rem;
}
.publication.ok { border-color: var(--ok); background: var(--ok-doux); }
.publication.pas-a-jour { border-color: var(--alerte); background: var(--alerte-doux); color: var(--alerte); }

/* Grand écran du QR code */
.ecran-qr { background: #0e1113; }
.qr-grand-bloc { display: flex; align-items: center; justify-content: center; gap: clamp(24px, 5vw, 72px); flex-wrap: wrap; min-height: calc(100vh - 140px); }
.qr-grand { width: min(70vh, 86vw); max-width: 620px; aspect-ratio: 1; background: #fff; border-radius: 16px; padding: 10px; }
.qr-grand svg { width: 100%; height: 100%; display: block; }
.qr-consignes { text-align: center; max-width: 460px; }
.qr-consignes p { margin: 0; }
.qr-consignes .qr-etape { font-size: clamp(1.2rem, 2.4vw, 2rem); font-weight: 700; margin-bottom: 18px; }
.qr-consignes .qr-ou { color: #9aa3aa; font-size: clamp(.95rem, 1.4vw, 1.2rem); margin: 10px 0 4px; }
.qr-adresse { font-size: clamp(1.3rem, 2.6vw, 2.2rem); font-weight: 600; word-break: break-all; }
.qr-code { font-size: clamp(2.6rem, 6vw, 5rem); font-weight: 800; letter-spacing: .14em; color: #2bb3a5; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; }
.qr-consignes .qr-compteur { margin-top: 22px; font-size: clamp(1rem, 1.6vw, 1.35rem); color: #c9d0d5; }

/* =====================================================================
   Page des participants (téléphone)
   ===================================================================== */

.page-participant { min-height: 100vh; display: flex; flex-direction: column; }
.p-entete {
  display: flex; align-items: center; gap: 12px; padding: 16px 16px 8px; max-width: 560px; width: 100%; margin: 0 auto;
}
.p-entete .logo { width: 36px; height: 36px; }
.p-entete h1 { font-size: 1.25rem; margin: 0; }
.p-surtitre { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--texte-2); font-weight: 600; }
.p-main { flex: 1; width: 100%; max-width: 560px; margin: 0 auto; padding: 8px 16px 32px; display: flex; flex-direction: column; gap: 14px; }
.p-carte { background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 18px; box-shadow: var(--ombre); }
.p-carte h2 { font-size: 1.15rem; margin: 0 0 4px; }
.p-carte h3 { font-size: 1rem; margin: 0 0 8px; }
.p-centre { text-align: center; }
.p-centre .btn { margin-top: 8px; }
.p-icone { font-size: 2.4rem; line-height: 1; margin-bottom: 8px; }
.p-petit { font-size: .85rem; margin: 10px 0 0; }
.p-bandeau { background: var(--alerte-doux); color: var(--alerte); text-align: center; padding: 8px 16px; font-size: .9rem; }
.p-pied { text-align: center; padding: 16px; font-size: .85rem; }
.p-pied a { color: var(--texte-2); }

.p-champ-code {
  width: 100%; font-size: 2rem; text-align: center; letter-spacing: .25em; text-transform: uppercase;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; padding: 12px; margin: 6px 0 12px;
}
.p-recherche { width: 100%; font-size: 1rem; padding: 10px 12px; margin: 6px 0 10px; }

.p-noms { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 55vh; overflow-y: auto; }
.p-nom {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: left;
  border: 1px solid var(--bord-fort); background: var(--surface); border-radius: var(--rayon-petit);
  padding: 12px 14px; font-size: 1.02rem; cursor: pointer; min-height: 48px;
}
.p-nom:hover:not(:disabled) { border-color: var(--accent); }
.p-nom:disabled { opacity: .5; cursor: not-allowed; }
.p-nom small { color: var(--texte-2); font-size: .8rem; white-space: nowrap; }
.p-case { justify-content: flex-start; }
.p-case .case {
  width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--bord-fort); flex: none;
  display: grid; place-items: center;
}
.p-case.coche { border-color: var(--accent); background: var(--accent-doux); }
.p-case.coche .case { background: var(--accent); border-color: var(--accent); }
.p-case.coche .case::after { content: "✓"; color: var(--accent-texte); font-size: .85rem; font-weight: 700; }
.p-vide { color: var(--texte-2); text-align: center; padding: 14px; }
.p-choisis { display: flex; flex-wrap: wrap; gap: 6px; min-height: 30px; align-items: center; margin-top: 4px; }
.p-choisis .puce { background: var(--accent-doux); border-color: var(--accent); }

.p-libre { margin-top: 12px; }
.p-form { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.p-form input, .p-form select { width: 100%; font-size: 1rem; padding: 10px 12px; }
.p-form .etiquette { margin: 4px 0 0; }

.p-moi { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.p-moi-nom { font-size: 1.25rem; font-weight: 700; }

.p-themes { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.p-theme {
  border: 1px solid var(--bord-fort); background: var(--surface); border-radius: var(--rayon-petit);
  padding: 12px 14px; font-size: 1.02rem; text-align: left; cursor: pointer; min-height: 48px;
}
.p-theme.coche { border: 2px solid var(--accent); background: var(--accent-doux); font-weight: 600; }

.p-barre-bas {
  position: sticky; bottom: 0; background: var(--fond); padding: 12px 0 calc(12px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 8px;
}
.p-etat { font-size: .88rem; color: var(--alerte); text-align: center; }
.p-etat.ok { color: var(--ok); }
.p-recap { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }

.p-groupe { background: var(--c); color: var(--ct); border-radius: 16px; padding: 22px 20px; box-shadow: var(--ombre); }
.p-groupe .p-surtitre { color: inherit; opacity: .85; }
.p-groupe-nom { font-size: 2rem; font-weight: 800; line-height: 1.15; margin: 4px 0; }
.p-groupe-theme { font-size: 1.05rem; opacity: .95; }
.p-groupe-avec { margin-top: 16px; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; opacity: .85; font-weight: 600; }
.p-groupe ul { margin: 6px 0 0; padding: 0; list-style: none; font-size: 1.15rem; line-height: 1.6; }
.p-tous summary { cursor: pointer; font-weight: 600; }
.p-mini-groupe { padding: 10px 0; border-top: 1px solid var(--bord); }
.p-mini-groupe:first-of-type { margin-top: 10px; }
.p-mini-tete { display: flex; align-items: center; gap: 8px; }
.p-mini-noms { color: var(--texte-2); font-size: .9rem; margin-top: 2px; }
.pastille-couleur { width: 12px; height: 12px; border-radius: 50%; flex: none; }
