/* ============================================================
   STYLE DE L'APPLICATION DE VOTE
   Pour changer les couleurs ou les polices : modifiez seulement
   les variables du bloc :root ci-dessous.
   ============================================================ */

:root {
  /* Couleurs de la charte */
  --anthracite: #242429;
  --anthracite-fonce: #1b1b1f;
  --anthracite-doux: #34343b;
  --orange: #d97904;
  --orange-texte: #9a5600;      /* petit texte orange sur fond clair */
  --orange-pale: #f3dfc8;
  --ivoire: #f7f3ec;
  --blanc: #ffffff;
  --ligne: #d9d3c8;
  --gris-clair: #d9d3c8;        /* texte secondaire sur anthracite */

  /* Boutons de vote */
  --couleur-vrai: var(--orange);
  --texte-vrai: var(--anthracite);
  --couleur-faux: var(--anthracite);
  --texte-faux: var(--blanc);

  /* Polices */
  --police-titre: "Anton", Impact, "Arial Narrow", sans-serif;
  --police-texte: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --rayon: 14px;
}

@font-face { font-family: "Anton"; src: url("polices/Anton-Regular.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("polices/Inter-Regular.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("polices/Inter-SemiBold.woff") format("woff"); font-weight: 600; font-display: swap; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--police-texte); color: var(--anthracite); background: var(--ivoire); line-height: 1.45; }
[hidden] { display: none !important; }
button { font: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; }

/* ---------- Éléments communs ---------- */

.logo { font-family: var(--police-titre); letter-spacing: .02em; line-height: 1; display: inline-flex; align-items: baseline; }
.logo::after { content: ""; display: inline-block; width: .3em; height: .3em; background: var(--orange); margin-left: .1em; }
.carre::after { content: ""; display: inline-block; width: .28em; height: .28em; background: var(--orange); margin-left: .12em; }

.bandeau-test {
  background: repeating-linear-gradient(-45deg, var(--orange), var(--orange) 12px, #e88f1f 12px, #e88f1f 24px);
  color: var(--anthracite); font-weight: 600; text-align: center; padding: 6px 10px; font-size: 14px; letter-spacing: .04em;
}

.connexion { position: fixed; left: 50%; bottom: 12px; transform: translateX(-50%); background: var(--anthracite); color: var(--blanc);
  padding: 8px 14px; border-radius: 99px; font-size: 13px; z-index: 50; box-shadow: 0 4px 14px rgba(0,0,0,.25); }

.trait { width: 44px; height: 4px; background: var(--orange); margin: 0 auto 14px; }

@keyframes apparition { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes tampon { 0% { opacity: 0; transform: scale(2.2) rotate(-8deg); } 60% { opacity: 1; transform: scale(.94) rotate(-3deg); } 100% { transform: scale(1) rotate(-3deg); } }
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.35); opacity: .5; } }
@keyframes saut { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.entree { animation: apparition .45s ease-out both; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ============================================================
   1. ÉCRAN PARTICIPANT (téléphone)
   ============================================================ */

.page-participant { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.p-entete { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; border-bottom: 1px solid #e3ddd2; background: var(--ivoire); }
.p-entete .logo { font-size: 26px; }
.p-entete .etiquette { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--orange-texte); }
.p-scene { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 22px 18px 28px; max-width: 520px; width: 100%; margin: 0 auto; text-align: center; }

.p-kicker { font-size: 13px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--orange-texte); margin-bottom: 10px; }
.p-titre { font-family: var(--police-titre); font-weight: 400; font-size: 34px; line-height: 1.08; margin: 0 0 12px; text-transform: uppercase; }
.p-texte { font-size: 17px; margin: 0 0 8px; }
.p-question { font-size: 22px; font-weight: 600; line-height: 1.3; margin: 0 0 18px; }

.p-attente-points { display: flex; gap: 10px; justify-content: center; margin: 26px 0 8px; }
.p-attente-points span { width: 14px; height: 14px; background: var(--orange); animation: saut 1.2s ease-in-out infinite; }
.p-attente-points span:nth-child(2) { animation-delay: .15s; background: var(--anthracite); }
.p-attente-points span:nth-child(3) { animation-delay: .3s; }

.p-chrono { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; margin-bottom: 16px; padding: 6px 14px; border-radius: 99px; background: var(--blanc); border: 1px solid #e3ddd2; }
.p-chrono b { font-family: var(--police-titre); font-weight: 400; font-size: 22px; min-width: 1.4em; color: var(--anthracite); }
.p-chrono.urgent b { color: var(--orange-texte); }

.p-boutons { display: grid; gap: 14px; }
.btn-vote {
  border: 0; border-radius: var(--rayon); min-height: 96px; font-family: var(--police-titre); font-size: 40px; letter-spacing: .04em;
  text-transform: uppercase; display: flex; align-items: center; justify-content: center; gap: 14px;
  transition: transform .12s, opacity .25s, filter .25s, box-shadow .2s; -webkit-tap-highlight-color: transparent;
  box-shadow: 0 6px 0 rgba(0,0,0,.18);
}
.btn-vote:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 2px 0 rgba(0,0,0,.18); }
.btn-vote.vrai { background: var(--couleur-vrai); color: var(--texte-vrai); }
.btn-vote.faux { background: var(--couleur-faux); color: var(--texte-faux); }
.btn-vote:disabled { filter: grayscale(1); opacity: .35; box-shadow: none; }
.btn-vote.choisi { opacity: 1; filter: none; outline: 4px solid var(--anthracite); outline-offset: 4px; }
.btn-vote.faux.choisi { outline-color: var(--orange); }
.btn-vote .icone { font-family: var(--police-texte); font-size: 30px; }

.p-message { margin-top: 18px; font-size: 16px; min-height: 1.5em; }
.p-message.ok { font-weight: 600; }

.p-verdict { font-family: var(--police-titre); font-size: 48px; text-transform: uppercase; line-height: 1; margin: 6px 0 10px; }
.p-verdict.gagne { color: var(--orange); }
.p-reponse { display: inline-block; background: var(--anthracite); color: var(--blanc); padding: 8px 18px; border-radius: 8px; font-weight: 600; margin-bottom: 14px; }
.p-reponse b { color: var(--orange); font-family: var(--police-titre); font-weight: 400; font-size: 22px; letter-spacing: .04em; }

.p-score { display: inline-block; background: var(--orange-pale); border-radius: var(--rayon); padding: 12px 20px; margin: 4px 0 22px; }
.p-score b { font-family: var(--police-titre); font-weight: 400; font-size: 34px; }

.p-carte { background: var(--blanc); border: 1px solid #e3ddd2; border-radius: var(--rayon); padding: 20px 18px; text-align: left; }
.p-carte h2 { font-family: var(--police-titre); font-weight: 400; text-transform: uppercase; font-size: 24px; margin: 0 0 6px; }
.p-carte label { display: block; font-size: 14px; font-weight: 600; margin: 14px 0 6px; }
.p-carte input { width: 100%; font: inherit; font-size: 17px; padding: 12px 14px; border: 1px solid var(--ligne); border-radius: 10px; background: var(--ivoire); }
.p-carte input:focus { outline: 3px solid var(--orange-pale); border-color: var(--orange); }
.p-carte .aide { font-size: 13px; color: #5c5c63; margin: 6px 0 0; }
.btn-principal {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; margin-top: 16px; min-height: 58px; border: 0;
  border-radius: 10px; background: var(--orange); color: var(--anthracite); font-weight: 600; font-size: 17px; text-decoration: none;
}
.btn-principal:disabled { opacity: .6; }

/* ============================================================
   2. ÉCRAN PROJETÉ (16:9)
   ============================================================ */

.page-ecran {
  height: 100vh; overflow: hidden; color: var(--blanc);
  background-color: var(--anthracite);
  background-image: radial-gradient(rgba(255,255,255,.035) 1px, transparent 1.2px);
  background-size: 6px 6px;
  font-size: 1.6vw;
}
.e-cadre { height: 100vh; display: flex; flex-direction: column; }
.e-entete { display: flex; align-items: center; justify-content: space-between; padding: 2.2vh 3vw; }
.e-entete .logo { font-size: 2.6vw; }
.e-entete .logo-sous { font-size: .8vw; letter-spacing: .14em; text-transform: uppercase; color: var(--gris-clair); margin-left: 1vw; }
.e-compteur-q { font-family: var(--police-titre); font-size: 2vw; letter-spacing: .06em; color: var(--gris-clair); }
.e-compteur-q b { color: var(--orange); font-weight: 400; }
.e-scene { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 0 6vw 4vh; text-align: center; position: relative; }
.e-bandeau-test { position: fixed; top: 0; left: 0; right: 0; font-size: .9vw; padding: .4vw; z-index: 20; }

.e-titre { font-family: var(--police-titre); font-weight: 400; text-transform: uppercase; font-size: 7.5vw; line-height: .95; margin: 0; }
.e-titre em { font-style: normal; color: var(--orange); }
.e-sous { font-size: 2vw; color: var(--gris-clair); margin: 1.6vh 0 0; }

.e-accueil { display: grid; grid-template-columns: 1.2fr 1fr; gap: 5vw; align-items: center; width: 100%; }
.e-accueil .gauche { text-align: left; }
.e-qr { background: var(--blanc); padding: 1.6vw; border-radius: 1.2vw; display: inline-block; position: relative; }
.e-qr img { display: block; width: 26vw; height: auto; max-height: 56vh; aspect-ratio: 1; image-rendering: pixelated; }
.e-qr::after { content: ""; position: absolute; width: 3vw; height: 3vw; background: var(--orange); right: -1vw; bottom: -1vw; }
.e-adresse { margin-top: 2.4vh; font-size: 2.2vw; font-weight: 600; letter-spacing: .02em; }
.e-adresse span { color: var(--orange); }
.e-etapes { list-style: none; padding: 0; margin: 3.5vh 0 0; font-size: 1.8vw; }
.e-etapes li { display: flex; align-items: center; gap: 1vw; margin: 1.2vh 0; }
.e-etapes b { font-family: var(--police-titre); font-weight: 400; color: var(--orange); font-size: 2.4vw; min-width: 2vw; }

.e-question { font-size: 4.6vw; font-weight: 600; line-height: 1.18; margin: 0; max-width: 80vw; }
.e-question::before { content: "« "; color: var(--orange); }
.e-question::after { content: " »"; color: var(--orange); }

.e-bas { display: flex; align-items: center; justify-content: center; gap: 5vw; margin-top: 6vh; }
.e-chrono { position: relative; width: 11vw; height: 11vw; }
.e-chrono svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.e-chrono circle { fill: none; stroke-width: 8; }
.e-chrono .fond { stroke: rgba(255,255,255,.12); }
.e-chrono .barre { stroke: var(--orange); stroke-linecap: butt; transition: stroke-dashoffset .2s linear; }
.e-chrono .chiffre { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--police-titre); font-size: 5vw; }
.e-chrono.lecture .barre { stroke: var(--gris-clair); }
.e-etat { text-align: left; }
.e-etat .libelle { font-size: 1.4vw; letter-spacing: .14em; text-transform: uppercase; color: var(--gris-clair); }
.e-etat .valeur { font-family: var(--police-titre); font-size: 3.4vw; text-transform: uppercase; line-height: 1.05; }
.e-etat .valeur.orange { color: var(--orange); }
.e-votants { text-align: left; }
.e-votants .nombre { font-family: var(--police-titre); font-size: 7vw; line-height: 1; color: var(--orange); display: block; transition: transform .2s; }
.e-votants .nombre.bump { transform: scale(1.12); }
.e-votants .libelle { font-size: 1.4vw; letter-spacing: .14em; text-transform: uppercase; color: var(--gris-clair); }
.e-mini-qr { position: absolute; right: 3vw; bottom: 3vh; background: var(--blanc); padding: .5vw; border-radius: .5vw; text-align: center; color: var(--anthracite); font-size: .8vw; font-weight: 600; }
.e-mini-qr img { display: block; width: 7vw; height: 7vw; image-rendering: pixelated; }

.e-pulse { display: inline-block; width: 1.2vw; height: 1.2vw; background: var(--orange); border-radius: 50%; animation: pulse 1.2s infinite; margin-right: .8vw; vertical-align: middle; }

.e-revele .e-question { font-size: 3vw; opacity: .9; }
.e-tampon { display: inline-block; margin: 4vh 0 3vh; padding: 1vh 3vw; border: .5vw solid var(--orange); color: var(--orange); font-family: var(--police-titre); font-size: 6vw; text-transform: uppercase; line-height: 1.1; animation: tampon .6s cubic-bezier(.2,.9,.3,1.2) both; }
.e-barres { width: 70vw; display: grid; gap: 2.4vh; }
.e-barre { display: grid; grid-template-columns: 9vw 1fr 9vw; align-items: center; gap: 1.6vw; }
.e-barre .nom { font-family: var(--police-titre); font-size: 3vw; text-transform: uppercase; text-align: right; }
.e-barre .piste { height: 6.4vh; background: rgba(255,255,255,.08); position: relative; overflow: hidden; }
.e-barre .remplissage { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--anthracite-doux); border-right: .3vw solid var(--gris-clair); transition: width 1.6s cubic-bezier(.2,.8,.2,1); }
.e-barre.bonne .remplissage { background: var(--orange); border-right-color: var(--blanc); }
.e-barre .pct { font-family: var(--police-titre); font-size: 3.6vw; text-align: left; }
.e-barre.bonne .pct, .e-barre.bonne .nom { color: var(--orange); }
.e-total { margin-top: 3vh; font-size: 1.5vw; color: var(--gris-clair); }

.e-fin { display: grid; grid-template-columns: 1.3fr 1fr; gap: 5vw; align-items: center; width: 100%; text-align: left; }
.e-coord { list-style: none; padding: 0; margin: 4vh 0 0; font-size: 2.1vw; }
.e-coord li { margin: 1.4vh 0; display: flex; gap: 1.2vw; align-items: baseline; }
.e-coord .k { font-size: 1vw; letter-spacing: .14em; text-transform: uppercase; color: var(--gris-clair); min-width: 9vw; }
.e-nom { font-family: var(--police-titre); font-size: 3.4vw; text-transform: uppercase; margin-top: 4vh; }
.e-nom small { display: block; font-family: var(--police-texte); font-size: 1.4vw; text-transform: none; color: var(--gris-clair); margin-top: .6vh; }
.e-fin .droite { text-align: center; }
.e-fin .e-qr img { width: 17vw; }
.e-fin .appel { font-size: 1.7vw; margin: 2.4vh 0 3vh; }
.e-qualiopi { background: var(--blanc); border-radius: .8vw; padding: .8vw 1.2vw; display: inline-block; }
.e-qualiopi img { display: block; height: 12vh; width: auto; }

.btn-plein-ecran { position: fixed; right: 14px; bottom: 14px; z-index: 30; background: rgba(255,255,255,.1); color: var(--blanc); border: 1px solid rgba(255,255,255,.25); border-radius: 8px; padding: 8px 14px; font-size: 14px; }
.btn-plein-ecran:hover { background: rgba(255,255,255,.2); }

/* ============================================================
   3. ÉCRAN ANIMATRICE
   ============================================================ */

.page-animatrice { min-height: 100vh; }
.a-entete { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; background: var(--anthracite); color: var(--blanc); position: sticky; top: 0; z-index: 10; }
.a-entete .logo { font-size: 24px; }
.a-entete a { color: var(--gris-clair); font-size: 14px; }
.a-contenu { max-width: 980px; margin: 0 auto; padding: 16px; display: grid; gap: 14px; }
.a-carte { background: var(--blanc); border: 1px solid #e3ddd2; border-radius: var(--rayon); padding: 16px; }
.a-carte h2 { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--orange-texte); margin: 0 0 10px; }

.a-statut { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.a-pastille { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; font-weight: 600; font-size: 14px; background: var(--ivoire); border: 1px solid #e3ddd2; }
.a-pastille.vive { background: var(--orange); border-color: var(--orange); color: var(--anthracite); }
.a-chrono { font-family: var(--police-titre); font-size: 40px; line-height: 1; }

.a-question { font-size: 20px; font-weight: 600; margin: 10px 0 6px; }
.a-reponse { display: inline-block; font-family: var(--police-titre); font-size: 20px; letter-spacing: .04em; padding: 2px 12px; border-radius: 6px; background: var(--anthracite); color: var(--orange); text-transform: uppercase; }
.a-antiseche { background: var(--orange-pale); border-left: 4px solid var(--orange); padding: 14px 16px; border-radius: 0 10px 10px 0; font-size: 19px; line-height: 1.45; margin-top: 12px; }
.a-antiseche small { display: block; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--orange-texte); font-weight: 600; margin-bottom: 4px; }

.a-repartition { display: grid; gap: 8px; margin-top: 12px; }
.a-ligne { display: grid; grid-template-columns: 52px 1fr 92px; gap: 10px; align-items: center; font-weight: 600; }
.a-ligne .piste { height: 22px; background: var(--ivoire); border-radius: 4px; overflow: hidden; }
.a-ligne .remplissage { height: 100%; background: var(--anthracite-doux); width: 0; transition: width .4s; }
.a-ligne.bonne .remplissage { background: var(--orange); }
.a-votants { font-family: var(--police-titre); font-size: 44px; line-height: 1; }

.a-boutons { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.a-btn { min-height: 64px; border-radius: 12px; border: 2px solid var(--anthracite); background: var(--blanc); color: var(--anthracite); font-weight: 600; font-size: 17px; padding: 8px 12px; }
.a-btn.principal { background: var(--orange); border-color: var(--orange); }
.a-btn.sombre { background: var(--anthracite); color: var(--blanc); }
.a-btn.danger { border-color: #b3261e; color: #b3261e; }
.a-btn:disabled { opacity: .35; }
.a-btn.petit { min-height: 44px; font-size: 15px; }

.a-suivante { font-size: 15px; color: #4a4a52; }
.a-suivante b { color: var(--anthracite); }

.a-interrupteur { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.a-interrupteur .txt { font-size: 15px; }
.switch { position: relative; width: 58px; height: 32px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--ligne); border-radius: 99px; transition: .2s; }
.switch span::before { content: ""; position: absolute; width: 24px; height: 24px; left: 4px; top: 4px; background: var(--blanc); border-radius: 50%; transition: .2s; }
.switch input:checked + span { background: var(--orange); }
.switch input:checked + span::before { transform: translateX(26px); }
.switch input:focus-visible + span { outline: 3px solid var(--anthracite); }

.a-liens { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.a-liens a { font-size: 14px; color: var(--anthracite); background: var(--ivoire); border: 1px solid #e3ddd2; border-radius: 8px; padding: 8px 12px; text-decoration: none; }

.a-prenoms { list-style: none; margin: 10px 0 0; padding: 0; max-height: 260px; overflow: auto; border-top: 1px solid #e3ddd2; }
.a-prenoms li { display: flex; justify-content: space-between; padding: 8px 2px; border-bottom: 1px solid #efe9df; font-size: 15px; }
.a-prenoms li span { color: #6b6b73; font-size: 13px; }
.a-erreur { background: #fde8e6; color: #8a1c14; border-radius: 10px; padding: 10px 14px; font-size: 15px; }

.a-connexion { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; background: var(--anthracite); }
.a-connexion form { background: var(--ivoire); border-radius: var(--rayon); padding: 28px 24px; width: 100%; max-width: 360px; text-align: center; }
.a-connexion .logo { font-size: 40px; margin-bottom: 6px; }
.a-connexion input { width: 100%; font-size: 28px; text-align: center; letter-spacing: .3em; padding: 12px; border: 1px solid var(--ligne); border-radius: 10px; margin: 16px 0 4px; }

@media (min-width: 820px) {
  .a-contenu { grid-template-columns: 1.4fr 1fr; align-items: start; }
  .a-contenu > .large { grid-column: 1 / -1; }
}
