/* ==========================================================================
   Écrans d'AFFICHAGE pour le public (/ecran/<type>) — lot 7, décision D62.
   « Attention canon », feu vert des starters, compteur du jour, tableau des
   départs, veille, code QR, histoire.
   Fond NOIR (ce sont des écrans d'affichage), très gros textes lisibles à 10 m
   sur une télé 16:9, et corrects aussi sur un téléphone.
   Règles : animations sur transform / opacity seulement ; AUCUN clignotement
   (l'alerte est un aplat jaune fixe ; le chiffre change une fois par seconde) ;
   « réduire les animations » respecté (règle générale de app.css + ecran.js).
   Mesure : --u = 1 % de la largeur d'une télé 16:9 (19,2 px en 1920 × 1080).
   ========================================================================== */

body.e-affichage {
  display: block; height: 100vh; height: 100dvh; min-height: 0; overflow: hidden;
  background: #111111; color: #f4f2ea;
  touch-action: manipulation;
  -webkit-user-select: none; user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.e-curseur-cache, .e-curseur-cache * { cursor: none !important; }

.e-ecran {
  --e-jaune: #FBE122;
  --e-vert: #509E2F;
  --e-noir: #111111;
  --e-blanc: #f4f2ea;
  --e-doux: #b9b6aa;
  --e-gris: #3a3a3a;
  --u: min(1vw, 1.7778vh);
  --e-bande: repeating-linear-gradient(45deg, var(--e-jaune) 0 calc(1.6 * var(--u)), var(--e-vert) calc(1.6 * var(--u)) calc(2.8 * var(--u)));
  position: fixed; inset: 0; overflow: hidden;
  background: var(--e-noir); color: var(--e-blanc);
  font-family: var(--police);
}
/* Téléphone en hauteur : l'unité suit surtout la largeur. */
@media (orientation: portrait) { .e-ecran { --u: min(2.3vw, 1.2vh); } }

/* La bande jaune et verte de Veyrier, en bas de chaque écran. */
.e-ecran::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; z-index: 5;
  height: max(8px, calc(1.1 * var(--u))); background: var(--e-bande);
}
.e-scene { position: absolute; inset: 0 0 max(8px, calc(1.1 * var(--u))) 0; display: flex; }
.e-scene > section { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; position: relative; }
.e-message {
  margin: auto; padding: 0 6vw; text-align: center; color: var(--e-doux);
  font-family: var(--police-titre); font-weight: 600; font-size: max(20px, calc(3 * var(--u)));
}

/* ---------- Logos : la Société sur une plaque blanche (+ la place du logo de l'événement, LOT 2) ---------- */
.e-logos { display: flex; align-items: center; justify-content: center; gap: calc(1.6 * var(--u)); }
.e-plaque {
  --h: calc(10 * var(--u));
  flex: none; display: grid; place-items: center; background: #ffffff;
  height: var(--h); padding: 0 calc(var(--h) * .1); border-radius: calc(var(--h) * .14);
}
.e-plaque img { height: calc(var(--h) * .86); width: auto; max-width: calc(var(--h) * 2.2); object-fit: contain; }
.e-logos-petit .e-plaque { --h: calc(6 * var(--u)); }
.e-societe {
  margin: calc(1 * var(--u)) 0 0; text-align: center; color: var(--e-doux);
  font-family: var(--police-titre); font-weight: 700; font-size: max(13px, calc(2.2 * var(--u)));
  letter-spacing: .14em; text-transform: uppercase;
}

/* ---------- Bandeau du haut (compteur, départs, histoire) ---------- */
.e-bandeau {
  flex: none; display: flex; align-items: center; gap: calc(1.8 * var(--u));
  padding: calc(1.6 * var(--u)) calc(3 * var(--u)); border-bottom: 2px solid var(--e-gris);
}
.e-bandeau-nom, .e-bandeau-titre {
  margin: 0; font-family: var(--police-titre); font-weight: 700; text-transform: uppercase; line-height: 1.05;
  font-size: max(15px, calc(3 * var(--u)));
}
.e-bandeau-nom {
  flex: 1; min-width: 0; overflow: hidden;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
}
.e-bandeau-titre { flex: none; color: var(--e-jaune); letter-spacing: .06em; }
/* Écran étroit (téléphone) : le nom de l'événement garde toute la place — même à côté de deux logos (celui
   de la Société et celui de l'événement) : logos un peu plus petits, lettres aussi, 3 lignes au plus. */
@media (max-width: 759px) {
  .e-bandeau-titre { display: none; }
  .e-bandeau { gap: calc(1.2 * var(--u)); }
  .e-bandeau .e-logos { gap: calc(.8 * var(--u)); }
  .e-bandeau .e-logos-petit .e-plaque { --h: calc(5 * var(--u)); }
  .e-bandeau .e-plaque img { max-width: calc(var(--h) * 1.5); }
  .e-bandeau-nom { font-size: max(14px, calc(2.6 * var(--u))); -webkit-line-clamp: 3; line-clamp: 3; }
}

/* « Prochain départ : Poussines à 14:35 », en petit, en bas. */
.e-pied-info {
  flex: none; margin: 0; padding: calc(1.2 * var(--u)) 4vw calc(3 * var(--u)); text-align: center; color: var(--e-doux);
  font-family: var(--police-titre); font-weight: 600; font-size: max(16px, calc(3.2 * var(--u))); line-height: 1.1;
}

/* ==========================================================================
   a) « Attention canon » — au calme
   ========================================================================== */
.e-attention { align-items: center; justify-content: space-between; padding: calc(2.6 * var(--u)) 4vw calc(2.2 * var(--u)); text-align: center; }
.e-attention-tete { flex: none; }
.e-attention-corps {
  flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: opacity 240ms var(--sortie);
}
.e-attention-corps.e-change { opacity: 0; }
.e-attention-titre {
  margin: 0; font-family: var(--police-titre); font-weight: 700; text-transform: uppercase; letter-spacing: .02em;
  font-size: min(calc(6 * var(--u)), 9.5vw); line-height: 1.05; text-wrap: balance;
}
.e-attention-heure {
  margin: calc(.4 * var(--u)) 0 0; color: var(--e-jaune);
  font-family: var(--police-titre); font-weight: 800; font-size: min(calc(21 * var(--u)), 37vw); line-height: .92;
  font-variant-numeric: tabular-nums; letter-spacing: -.01em;
}
.e-attention-sous {
  margin: calc(.8 * var(--u)) 0 0; color: var(--e-doux); max-width: 92vw;
  font-family: var(--police-titre); font-weight: 600; font-size: min(calc(3.6 * var(--u)), 6.4vw); line-height: 1.15; text-wrap: balance;
  overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
}
.e-attention-sous[hidden] { display: none; }
/* Un autre jour (« Prochain coup de canon dimanche 6 décembre à ») : la phrase est plus longue, un peu plus petite. */
.e-attention-corps[data-genre="jour"] .e-attention-titre { font-size: min(calc(4.6 * var(--u)), 8.4vw); }
/* (revue) En allemand cette phrase prend 2 lignes sur un écran large : la ligne « Start : … » était écrasée et
   coupée. Elle ne rétrécit plus jamais, et l'heure se fait un peu plus petite pour laisser la place. */
.e-attention-sous { flex: none; }
@media (orientation: landscape) {
  .e-attention-corps[data-genre="jour"] .e-attention-heure { font-size: min(calc(15 * var(--u)), 27vw); }
}
/* Rien de prévu, ou départ oublié : la phrase seule, en grand. */
.e-attention-corps[data-genre="aucun"] .e-attention-titre,
.e-attention-corps[data-genre="retard"] .e-attention-titre { font-size: min(calc(7.5 * var(--u)), 10vw); max-width: 18ch; }
.e-attention-corps[data-genre="retard"] .e-attention-titre { color: var(--e-jaune); }
.e-langues { flex: none; list-style: none; margin: 0; padding: 0; display: flex; gap: calc(1 * var(--u)); }
.e-langues li {
  min-width: calc(5 * var(--u)); padding: calc(.25 * var(--u)) calc(1.1 * var(--u)); border: 2px solid var(--e-gris); border-radius: 99px;
  color: var(--e-doux); font-family: var(--police-titre); font-weight: 700; font-size: max(13px, calc(2 * var(--u))); letter-spacing: .1em;
}
.e-langues li.est-active { background: var(--e-jaune); border-color: var(--e-jaune); color: var(--e-noir); }

/* ==========================================================================
   L'alerte commune « ATTENTION — COUP DE CANON » (10 s avant, jusqu'au tir marqué)
   Aplat jaune FIXE, lettres noires. Aucun clignotement.
   ========================================================================== */
.e-alerte {
  position: absolute; inset: 0; z-index: 50; display: flex; flex-direction: column;
  background: var(--e-jaune); color: var(--e-noir);
  animation: e-apparait 250ms var(--sortie) both;
}
.e-alerte[hidden], .e-boum[hidden] { display: none; }
.e-alerte-rayures {
  flex: none; height: calc(4.2 * var(--u));
  background: repeating-linear-gradient(-45deg, var(--e-noir) 0 calc(3 * var(--u)), var(--e-jaune) calc(3 * var(--u)) calc(6 * var(--u)));
}
.e-alerte-corps {
  flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center;
  gap: calc(3 * var(--u)); padding: 0 calc(5 * var(--u));
}
.e-alerte-textes p { margin: 0; font-family: var(--police-titre); font-weight: 800; text-transform: uppercase; line-height: .92; }
.e-alerte-titre { display: flex; align-items: center; gap: calc(1.8 * var(--u)); font-size: calc(10.8 * var(--u)); letter-spacing: .01em; }
.e-alerte-triangle { flex: none; height: .82em; width: auto; }
.e-alerte-textes .e-alerte-coup { font-size: calc(10 * var(--u)); margin-top: calc(.8 * var(--u)); white-space: nowrap; }
.e-alerte-textes .e-alerte-oreilles {
  display: inline-block; margin-top: calc(1.8 * var(--u)); padding: calc(.7 * var(--u)) calc(2 * var(--u)) calc(.9 * var(--u));
  background: var(--e-noir); color: var(--e-jaune); border-radius: calc(1.2 * var(--u));
  font-size: calc(5.6 * var(--u)); font-weight: 700; text-transform: none; line-height: 1; white-space: nowrap;
}
.e-alerte-compte {
  width: calc(27 * var(--u)); height: calc(27 * var(--u)); border-radius: 50%;
  display: grid; place-items: center; background: var(--e-noir); color: var(--e-jaune);
  font-family: var(--police-titre); font-weight: 800; font-size: calc(20 * var(--u)); line-height: 1;
  font-variant-numeric: tabular-nums;
}
.e-alerte-compte { align-content: center; }
.e-alerte-compte span { display: block; }
.e-alerte-compte.est-imminent { font-size: calc(5.2 * var(--u)); letter-spacing: .04em; }
/* Canon en retard : sous « IMMINENT », le même mot en anglais et en allemand (les trois langues, toujours). */
.e-alerte-compte .e-alerte-autres {
  margin-top: .34em; color: var(--e-blanc); text-align: center;
  font-size: .52em; font-weight: 700; line-height: 1.16; letter-spacing: .06em;
}
.e-alerte-compte .e-alerte-autres[hidden] { display: none; }
.e-alerte-compte .e-bat { animation: e-bat 300ms var(--sortie) both; }
.e-alerte-langues { flex: none; padding: 0 calc(5 * var(--u)) calc(1.6 * var(--u)); }
.e-alerte-langues p {
  margin: calc(.2 * var(--u)) 0 0; font-family: var(--police-titre); font-weight: 600;
  font-size: calc(3.3 * var(--u)); line-height: 1.15;
}
.e-alerte-langues strong { font-weight: 800; }

@media (orientation: portrait) {
  .e-alerte-corps { grid-template-columns: minmax(0, 1fr); justify-items: center; align-content: center; text-align: center; gap: calc(2.5 * var(--u)); padding: 0 4vw; }
  .e-alerte-titre { justify-content: center; font-size: min(calc(13.5 * var(--u)), 15vw); }
  .e-alerte-textes .e-alerte-coup { font-size: min(calc(10.4 * var(--u)), 12.6vw); }
  .e-alerte-compte { width: calc(29 * var(--u)); height: calc(29 * var(--u)); font-size: calc(21 * var(--u)); }
  .e-alerte-compte.est-imminent { font-size: calc(5.6 * var(--u)); }
  .e-alerte-textes .e-alerte-oreilles { font-size: min(calc(5.6 * var(--u)), 7.6vw); }
  .e-alerte-langues { text-align: center; padding: 0 3vw calc(2 * var(--u)); }
  .e-alerte-langues p { font-size: min(calc(3.3 * var(--u)), 4.3vw); }
}

/* ---------- Effet « BOUM » (court, une seule fois : l'éclat grandit, le mot arrive) ---------- */
.e-boum {
  position: absolute; inset: 0; z-index: 60; display: grid; grid-template-rows: minmax(0, 1fr) auto; place-items: center;
  padding: 3vh 3vw calc(max(8px, 1.1 * var(--u)) + 2.4 * var(--u));
  background: var(--e-noir); animation: e-apparait 120ms linear both;
}
.e-boum-eclat, .e-boum-mot { grid-area: 1 / 1; }
.e-boum-eclat {
  width: min(94vw, 128vh); height: auto; max-height: 100%; aspect-ratio: 330 / 200; fill: var(--e-jaune);
  animation: e-eclat 420ms var(--sortie) both;
}
.e-boum-mot {
  margin: 0; color: var(--e-noir); transform: rotate(-6deg); white-space: nowrap;
  font-family: var(--police-titre); font-weight: 800; font-size: min(18vw, 24vh); line-height: 1; letter-spacing: .01em;
  animation: e-mot 320ms var(--sortie) both;
}
.e-boum-nom {
  grid-area: 2 / 1; margin: calc(1 * var(--u)) 0 0; color: var(--e-blanc); text-align: center;
  font-family: var(--police-titre); font-weight: 700; font-size: max(18px, calc(3.6 * var(--u))); line-height: 1.1;
}
.e-boum-nom:empty { display: none; }
/* Téléphone en hauteur : l'éclat et le nom du départ restent ensemble, au milieu. */
@media (orientation: portrait) { .e-boum { grid-template-rows: auto auto; align-content: center; } }

@keyframes e-apparait { from { opacity: 0; } to { opacity: 1; } }
@keyframes e-bat { from { transform: scale(1.14); } to { transform: scale(1); } }
@keyframes e-eclat { from { transform: scale(.35) rotate(-14deg); opacity: 0; } to { transform: scale(1) rotate(0deg); opacity: 1; } }
@keyframes e-mot { from { transform: rotate(-6deg) scale(1.7); opacity: 0; } to { transform: rotate(-6deg) scale(1); opacity: 1; } }

/* ==========================================================================
   c) Compteur du jour
   ========================================================================== */
.e-compteur-corps { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 4vw; }
.e-compteur-chiffre {
  margin: 0; display: grid; place-items: center; color: var(--e-jaune);
  font-family: var(--police-titre); font-weight: 800; font-size: min(calc(30 * var(--u)), 56vw); line-height: .86;
  font-variant-numeric: tabular-nums;
}
/* Zéro : pas de gros chiffre, la phrase « Aucun coup de canon tiré aujourd'hui » prend sa place. */
.e-compteur-chiffre.est-zero { display: none; }
.e-compteur-chiffre.est-zero + .e-compteur-suite { margin-top: 0; font-size: min(calc(9.5 * var(--u)), 13vw); max-width: 14ch; }
.e-chiffre { grid-area: 1 / 1; display: block; }
.e-chiffre.e-sort { animation: e-chiffre-sort 280ms var(--sortie) both; }
.e-chiffre.e-entre { animation: e-chiffre-entre 300ms var(--sortie) both; }
@keyframes e-chiffre-sort { to { transform: translateY(-45%) scale(.9); opacity: 0; } }
@keyframes e-chiffre-entre { from { transform: translateY(45%) scale(1.12); opacity: 0; } }
.e-compteur-suite {
  margin: calc(1 * var(--u)) 0 0; font-family: var(--police-titre); font-weight: 700; text-transform: uppercase; letter-spacing: .02em;
  font-size: min(calc(6.2 * var(--u)), 9vw); line-height: 1.05; text-wrap: balance;
}

/* ==========================================================================
   d) Tableau des départs façon aéroport
   La taille des lettres (font-size de .e-tableau, en px) est posée par
   departs.js selon la largeur ; tout le reste est en « em ».
   Une case = 0,74 em de large + 0,08 em d'écart (voir miseEnPageTableau).
   ========================================================================== */
.e-departs .e-bandeau { padding-right: calc(27 * var(--u)); }
.e-departs-horloge {
  position: absolute; top: calc(1.6 * var(--u)); right: calc(3 * var(--u)); margin: 0; height: calc(6 * var(--u));
  display: flex; align-items: baseline; gap: calc(.5 * var(--u)); color: #ffffff;
  font-family: var(--police-titre); font-weight: 800; font-size: max(22px, calc(6 * var(--u))); line-height: 1;
  font-variant-numeric: tabular-nums;
}
.e-departs-secondes { font-size: .5em; color: var(--e-doux); }
.e-tableau {
  flex: 1; min-height: 0; padding: 0 max(24px, 3vw); font-size: 48px;
  font-family: var(--police-titre); font-weight: 700;
}
.d-entetes, .d-ligne { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 1.2em; }
.d-entetes { height: 1.5em; align-items: end; padding-bottom: .22em; color: var(--e-doux); }
.d-entetes span { font-size: .4em; letter-spacing: .16em; text-transform: uppercase; }
.d-entetes .d-col-heure { width: calc(4.02em / .4); }
.d-entetes .d-col-etat { width: calc(10.58em / .4); }
.d-ligne { height: 1.66em; align-items: center; position: relative; }
.d-groupe { display: flex; gap: .08em; }
.d-case {
  flex: none; width: .74em; height: 1.44em; position: relative; overflow: hidden;
  display: grid; place-items: center; border-radius: .1em;
  background: linear-gradient(#262626 0 50%, #1d1d1d 50% 100%); color: var(--e-blanc);
}
/* La fente au milieu du volet. */
.d-case::after { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(0, 0, 0, .6); }
.d-car { grid-area: 1 / 1; font-size: .9em; line-height: 1; white-space: pre; }
.d-car.d-sort { animation: d-sort 140ms ease-in both; }
.d-car.d-entre { animation: d-entre 140ms ease-out both; }
@keyframes d-sort { to { transform: rotateX(90deg); opacity: 0; } }
@keyframes d-entre { from { transform: rotateX(-90deg); opacity: 0; } }

.d-ligne[data-genre="a-l-heure"] .d-col-etat .d-case { color: #86DC5C; }
.d-ligne[data-genre="retarde"] .d-col-etat .d-case, .d-ligne[data-genre="avance"] .d-col-etat .d-case { color: var(--e-jaune); }
.d-ligne[data-genre="pas-parti"] .d-col-etat .d-case { color: #FF8A7A; }
.d-ligne[data-genre="annule"] .d-col-etat .d-case { color: #a5a297; }
.d-ligne.est-termine .d-col-heure .d-case, .d-ligne.est-termine .d-col-nom .d-case { color: #8f8c80; }
.d-ligne.est-prochain .d-col-heure .d-case { color: var(--e-jaune); }
/* Le prochain départ : un repère jaune à gauche. */
.d-ligne.est-prochain::before { content: ''; position: absolute; left: -.5em; top: .14em; bottom: .14em; width: .2em; border-radius: .1em; background: var(--e-jaune); }
.d-suite { margin: .7em 0 0; min-height: 1.2em; color: var(--e-doux); font-family: var(--police); font-weight: 500; font-size: max(13px, .42em); }

/* Téléphone en hauteur : deux étages par départ (Heure + État, puis le nom). */
.e-tableau.est-compact { padding: 0 12px; }
.est-compact .d-entetes { grid-template-columns: auto minmax(0, 1fr); height: 1.2em; }
.est-compact .d-entetes .d-col-nom { display: none; }
.est-compact .d-entetes .d-col-etat { width: auto; justify-self: end; }
.est-compact .d-entetes span { font-size: .5em; }
.est-compact .d-entetes .d-col-heure { width: auto; }
.est-compact .d-ligne {
  grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "heure etat" "nom nom";
  height: 3.8em; row-gap: .14em; align-content: center; border-top: 1px solid #2a2a2a;
}
.est-compact .d-ligne .d-col-heure { grid-area: heure; }
.est-compact .d-ligne .d-col-etat { grid-area: etat; justify-self: end; }
.est-compact .d-ligne .d-col-nom { grid-area: nom; }
.est-compact .d-ligne.est-prochain::before { left: -8px; width: 4px; }
/* Écran étroit (téléphone) : l'horloge passe sur sa propre ligne, sous le bandeau — le nom de l'événement
   garde toute la largeur et reste entier (comme sur le compteur et l'histoire). */
@media (max-width: 759px) {
  .e-departs .e-bandeau { padding-right: calc(3 * var(--u)); }
  .e-departs-horloge { position: static; flex: none; height: auto; justify-content: flex-end; padding: 8px 12px 0; font-size: 30px; }
}

/* ==========================================================================
   e) Écran de veille
   ========================================================================== */
.e-veille { align-items: center; justify-content: center; text-align: center; padding: 3vh 4vw; }
.e-veille-bloc { display: flex; flex-direction: column; align-items: center; transition: transform 1.05s linear; will-change: transform; }
.e-veille-bloc.e-sans-glisser { transition: none; }
.e-veille-horloge {
  margin: calc(.6 * var(--u)) 0 0; display: flex; align-items: baseline; justify-content: center; gap: calc(1 * var(--u)); color: #ffffff;
  font-family: var(--police-titre); font-weight: 800; font-size: min(calc(17.5 * var(--u)), 29vw); line-height: .95;
  font-variant-numeric: tabular-nums;
}
.e-veille-secondes { font-size: .36em; color: var(--e-doux); min-width: 1.1em; text-align: left; }
.e-veille-date { margin: 0; font-family: var(--police-titre); font-weight: 600; font-size: min(calc(4.2 * var(--u)), 7vw); line-height: 1.1; }
.e-veille .e-logos-grand .e-plaque { --h: calc(8.5 * var(--u)); }
.e-veille .e-societe { margin-top: calc(.7 * var(--u)); }
.e-veille-date::first-letter { text-transform: uppercase; }
.e-veille-annonce { margin-top: calc(1.6 * var(--u)); padding-top: calc(1.4 * var(--u)); border-top: 2px solid var(--e-gris); min-width: min(60vw, calc(60 * var(--u))); }
.e-veille-annonce p { margin: 0; font-family: var(--police-titre); line-height: 1.1; }
.e-veille-annonce-titre { color: var(--e-doux); font-weight: 700; font-size: max(13px, calc(2.2 * var(--u))); letter-spacing: .14em; text-transform: uppercase; }
.e-veille-annonce-nom {
  color: var(--e-jaune); font-weight: 700; font-size: min(calc(4.6 * var(--u)), 8vw); margin-top: calc(.4 * var(--u)) !important; max-width: 86vw;
  overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
}
.e-veille-annonce-quand { font-weight: 600; font-size: min(calc(3.4 * var(--u)), 6vw); }
.e-veille-annonce-quand::first-letter { text-transform: uppercase; }

/* ==========================================================================
   g) « Histoire et tradition » (diapositives)
   ========================================================================== */
.e-diapos { flex: 1; min-height: 0; position: relative; }
.e-diapo {
  /* --k : réduction posée par histoire.js quand un titre et un texte très longs ne tiennent pas (1 = taille normale). */
  --k: 1;
  position: absolute; inset: 0; overflow: hidden; display: flex; flex-direction: column; justify-content: center;
  padding: 0 calc(7 * var(--u)) calc(6 * var(--u));
  opacity: 0; transform: translateY(calc(1.4 * var(--u))); transition: opacity 600ms var(--sortie), transform 600ms var(--sortie);
}
.e-diapo.est-visible { opacity: 1; transform: none; }
.e-diapo-corps::before { content: ''; display: block; width: calc(14 * var(--u)); height: calc(1.1 * var(--u)); margin-bottom: calc(2.4 * var(--u) * var(--k)); background: var(--e-bande); }
.e-diapo-titre {
  margin: 0; color: var(--e-jaune); text-transform: uppercase; text-wrap: balance;
  font-family: var(--police-titre); font-weight: 800; font-size: calc(min(9.5 * var(--u), 13vw) * var(--k)); line-height: 1;
}
.e-diapo-titre.est-long { font-size: calc(min(7 * var(--u), 10vw) * var(--k)); }
.e-diapo-texte {
  margin: calc(2.4 * var(--u) * var(--k)) 0 0; max-width: 30em; white-space: pre-line; text-wrap: pretty;
  font-family: var(--police); font-weight: 500; font-size: calc(min(4.4 * var(--u), 6.6vw) * var(--k)); line-height: 1.25;
}
.e-diapo-texte.est-long { font-size: calc(min(3.3 * var(--u), 5.2vw) * var(--k)); }
/* Diapositive avec une photo : le texte à gauche, la photo à droite (elle garde ses proportions, jamais coupée). */
.e-diapo-photo { display: none; }
.e-diapo.a-photo {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 42%); grid-template-rows: minmax(0, 1fr);
  align-items: center; column-gap: calc(4 * var(--u)); row-gap: calc(2.4 * var(--u));
}
.e-diapo.a-photo .e-diapo-photo {
  display: flex; align-items: center; justify-content: center; align-self: stretch; min-width: 0; min-height: 0; margin: 0;
  padding: calc(1 * var(--u)) 0;
}
.e-diapo-photo img {
  display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain;
  border-radius: calc(1.4 * var(--u)); background: #ffffff;
}
.e-diapo.a-photo .e-diapo-titre { font-size: calc(min(7.4 * var(--u), 13vw) * var(--k)); }
.e-diapo.a-photo .e-diapo-titre.est-long { font-size: calc(min(5.6 * var(--u), 10vw) * var(--k)); }
.e-diapo.a-photo .e-diapo-texte { font-size: calc(min(3.7 * var(--u), 6.6vw) * var(--k)); }
.e-diapo.a-photo .e-diapo-texte.est-long { font-size: calc(min(3 * var(--u), 5.2vw) * var(--k)); }
.e-points { position: absolute; left: calc(7 * var(--u)); bottom: calc(3.4 * var(--u)); margin: 0; padding: 0; list-style: none; display: flex; gap: calc(1 * var(--u)); }
.e-points li { width: max(8px, calc(1.3 * var(--u))); height: max(8px, calc(1.3 * var(--u))); border-radius: 50%; background: var(--e-gris); }
.e-points li.est-actif { background: var(--e-jaune); }
/* « Prochain coup de canon à 14:35 », dans le coin en bas à droite. */
.e-coin {
  position: absolute; right: calc(3 * var(--u)); bottom: calc(2.4 * var(--u)); z-index: 2; margin: 0; max-width: 70vw;
  padding: calc(.7 * var(--u)) calc(2 * var(--u)); border: 2px solid var(--e-jaune); border-radius: 99px; background: #1c1c1c;
  font-family: var(--police-titre); font-weight: 700; font-size: max(15px, calc(2.8 * var(--u))); line-height: 1.1;
}
@media (orientation: portrait) {
  .e-diapo { padding: 0 6vw calc(16 * var(--u)); }
  /* Téléphone tenu en hauteur : la photo au-dessus (un bon tiers de la hauteur au plus), le texte dessous. */
  .e-diapo.a-photo { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto; align-content: center; }
  .e-diapo.a-photo .e-diapo-photo { order: -1; align-self: auto; justify-content: flex-start; padding: 0; }
  .e-diapo.a-photo .e-diapo-photo img { max-height: calc(26 * var(--u)); }
  .e-points { left: 6vw; bottom: calc(11 * var(--u)); }
  .e-coin { left: 6vw; right: 6vw; max-width: none; text-align: center; bottom: calc(3 * var(--u)); }
}

/* ==========================================================================
   b) « Feu vert pour les starters »
   Plein écran VERT (prêt), ROUGE (pas prêt), GRIS (connexion perdue), noir
   (coup tiré, aucun départ). Jamais la couleur seule : le mot est écrit en
   très grand, avec un signe (coche dans un rond / croix dans un octogone).
   La couleur change d'un coup, une seule fois par changement d'état.
   Les tailles sont comptées pour que tout tienne dans le pire cas (nom de
   l'événement et nom du départ sur plusieurs lignes) : en largeur d'écran,
   56 u de haut ; en hauteur (téléphone), 83 u de haut.
   ========================================================================== */
.e-starters { --s-fond: var(--e-noir); --s-encre: #ffffff; --s-signe: var(--e-noir); background: var(--s-fond); color: var(--s-encre); }
.e-starters[data-genre="pret"] { --s-fond: #1B7F2A; --s-signe: #1B7F2A; }
.e-starters[data-genre="pas-pret"] { --s-fond: #C2241B; --s-signe: #C2241B; }
.e-starters[data-genre="perdu"] { --s-fond: #55565A; --s-signe: #55565A; }
.e-starters[data-genre="tire"] { --s-encre: var(--e-jaune); --s-signe: var(--e-jaune); }
.e-starters .e-bandeau { border-bottom-color: rgba(255, 255, 255, .4); }
.e-starters .e-bandeau-nom { color: #ffffff; }
.e-starters .e-bandeau-titre { color: #ffffff; }
.e-starters-corps {
  flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr); align-items: center;
  gap: calc(3 * var(--u)); padding: calc(1.5 * var(--u)) calc(4 * var(--u)) calc(2.5 * var(--u));
}
.e-starters-etat { min-width: 0; display: flex; align-items: center; gap: calc(2.6 * var(--u)); }
.e-starters-signe { flex: none; width: calc(15 * var(--u)); height: calc(15 * var(--u)); color: var(--s-signe); }
.e-starters-signe[hidden] { display: none; }
.e-starters-signe svg { display: block; width: 100%; height: 100%; }
.e-starters-mots { min-width: 0; }
.e-starters-mot {
  margin: 0; min-width: 0; font-family: var(--police-titre); font-weight: 800; text-transform: uppercase;
  font-size: calc(12 * var(--u)); line-height: 1; letter-spacing: .005em; /* (revue) 1 et non .9 : l'accent de « PRÊT » touchait « CANON » */
}
.e-starters-mot span { display: block; white-space: nowrap; }
/* Une phrase d'explication sous le mot (« On ne sait plus si le canon est prêt… »). */
.e-starters-note {
  margin: calc(1.2 * var(--u)) 0 0; max-width: 24em; text-wrap: balance;
  font-family: var(--police); font-weight: 600; font-size: calc(2.9 * var(--u)); line-height: 1.15;
}
/* Mots plus longs (« CONNEXION PERDUE », « AUCUN DÉPART PRÉVU ») : un peu plus petits pour tenir sur la ligne. */
.e-starters[data-genre="perdu"] .e-starters-mot { font-size: calc(8.4 * var(--u)); }
.e-starters[data-genre="perdu"] .e-starters-signe { width: calc(13 * var(--u)); height: calc(13 * var(--u)); }
.e-starters[data-genre="perdu"] .e-starters-quand { font-size: calc(2.9 * var(--u)); }
.e-starters[data-genre="perdu"] .e-starters-compte-valeur { font-size: calc(8 * var(--u)); }
.e-starters[data-genre="aucun"] .e-starters-mot { font-size: calc(9 * var(--u)); color: var(--e-doux); }
.e-starters[data-genre="aucun"] .e-starters-note { color: var(--e-jaune); }
.e-starters-infos { min-width: 0; display: flex; flex-direction: column; gap: calc(.8 * var(--u)); }
.e-starters-infos p { margin: 0; font-family: var(--police-titre); }
.e-starters-nom {
  font-weight: 800; font-size: calc(5 * var(--u)); line-height: 1.02; text-wrap: balance;
  overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3;
}
.e-starters-nom[hidden], .e-starters-quand[hidden], .e-starters-compte[hidden], .e-starters-note[hidden] { display: none; }
.e-starters-quand { font-weight: 700; font-size: calc(3.7 * var(--u)); line-height: 1.1; font-variant-numeric: tabular-nums; }
.e-starters-compte {
  margin-top: calc(1 * var(--u)); padding: calc(1.2 * var(--u)) calc(1.8 * var(--u)) calc(1.4 * var(--u));
  border-radius: calc(1.6 * var(--u)); background: rgba(0, 0, 0, .34);
}
.e-starters-compte-titre { font-weight: 700; font-size: calc(2.5 * var(--u)); letter-spacing: .08em; text-transform: uppercase; }
.e-starters-compte-valeur { font-weight: 800; font-size: calc(9.4 * var(--u)); line-height: .95; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* « 1 h 05 » : plus de caractères, un peu plus petit. */
.e-starters-compte[data-long="1"] .e-starters-compte-valeur { font-size: calc(7.4 * var(--u)); }
/* Lot 9b : « En retard de » + « 15 min » / « 1 h 05 » — toujours la même taille (rien ne saute à 10 min),
   et la même hauteur de ligne que « IMMINENT » juste avant (5,6 × 1,1) : le nom du départ ne saute pas. */
.e-starters-compte[data-genre="retard"] .e-starters-compte-valeur { font-size: calc(7.4 * var(--u)); line-height: calc(5.6 * 1.1 * var(--u)); }
/* Les 10 dernières secondes : le chiffre seul, encore plus grand (le même que sur les autres écrans). */
.e-starters-compte[data-genre="chiffre"] .e-starters-compte-valeur { font-size: calc(13 * var(--u)); }
.e-starters-compte[data-genre="imminent"] .e-starters-compte-valeur { font-size: calc(5.6 * var(--u)); line-height: 1.1; }

/* Téléphone tenu en hauteur par un starter : tout en colonne, le signe et le mot d'abord. */
@media (orientation: portrait) {
  .e-starters-corps { grid-template-columns: minmax(0, 1fr); align-content: center; justify-items: center; gap: calc(2 * var(--u)); padding: calc(1.2 * var(--u)) 4vw calc(2.4 * var(--u)); text-align: center; }
  .e-starters-etat { flex-direction: column; gap: calc(1.4 * var(--u)); }
  .e-starters-signe { width: calc(11 * var(--u)); height: calc(11 * var(--u)); }
  .e-starters-mot { font-size: min(calc(11.5 * var(--u)), 24vw); }
  .e-starters-note { margin-top: calc(.8 * var(--u)); font-size: min(calc(3 * var(--u)), 4.8vw); }
  .e-starters[data-genre="perdu"] .e-starters-signe { width: calc(8 * var(--u)); height: calc(8 * var(--u)); }
  .e-starters[data-genre="perdu"] .e-starters-etat { gap: calc(1.2 * var(--u)); }
  .e-starters[data-genre="perdu"] .e-starters-mot { font-size: min(calc(9 * var(--u)), 18vw); }
  .e-starters[data-genre="aucun"] .e-starters-mot { font-size: min(calc(8.6 * var(--u)), 15vw); }
  .e-starters-infos { align-items: center; width: 100%; }
  .e-starters-nom { font-size: min(calc(4.4 * var(--u)), 8.6vw); -webkit-line-clamp: 2; line-clamp: 2; }
  .e-starters-quand { font-size: min(calc(3.4 * var(--u)), 6.6vw); }
  .e-starters[data-genre="perdu"] .e-starters-quand { font-size: min(calc(3 * var(--u)), 5.6vw); }
  .e-starters-compte { width: 100%; }
  .e-starters-compte-titre { font-size: min(calc(2.4 * var(--u)), 4.6vw); }
  /* (Même taille pour « 4:32 » et pour le chiffre des 10 dernières secondes : rien ne bouge sous le pouce.) */
  .e-starters-compte-valeur, .e-starters-compte[data-genre="chiffre"] .e-starters-compte-valeur { font-size: min(calc(10.5 * var(--u)), 22vw); }
  .e-starters-compte[data-long="1"] .e-starters-compte-valeur { font-size: min(calc(9 * var(--u)), 19vw); }
  .e-starters-compte[data-genre="retard"] .e-starters-compte-valeur { font-size: min(calc(9 * var(--u)), 19vw); line-height: calc(min(calc(7.4 * var(--u)), 13.5vw) * 1.3); }
  .e-starters-compte[data-genre="imminent"] .e-starters-compte-valeur { font-size: min(calc(7.4 * var(--u)), 13.5vw); line-height: 1.3; }
  .e-starters[data-genre="perdu"] .e-starters-compte-valeur { font-size: min(calc(8 * var(--u)), 17vw); }
}

/* ==========================================================================
   f) Code QR « Suivez le canon en direct »
   Le code est noir sur une plaque blanche (avec sa marge) : il se lit de loin.
   ========================================================================== */
.e-scene > .e-qr { flex-direction: row; align-items: center; justify-content: center; gap: calc(5 * var(--u)); padding: calc(2.6 * var(--u)) calc(5 * var(--u)); }
.e-qr-textes { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.e-qr .e-logos { justify-content: flex-start; }
.e-qr .e-logos-grand .e-plaque { --h: calc(8 * var(--u)); }
.e-qr .e-societe { text-align: left; }
.e-qr-titre {
  margin: calc(1.8 * var(--u)) 0 0; color: var(--e-jaune); text-transform: uppercase; text-wrap: balance;
  font-family: var(--police-titre); font-weight: 800; font-size: calc(6.8 * var(--u)); line-height: .98;
}
.e-qr-aide { margin: calc(1.5 * var(--u)) 0 0; font-family: var(--police); font-weight: 500; font-size: calc(2.8 * var(--u)); line-height: 1.2; text-wrap: balance; }
.e-qr-langues { margin: calc(1 * var(--u)) 0 0; color: var(--e-doux); font-family: var(--police-titre); font-weight: 600; font-size: calc(2.4 * var(--u)); line-height: 1.2; }
.e-qr-langues span + span::before { content: ' · '; }
.e-qr-aide[hidden], .e-qr-langues[hidden], .e-qr-code[hidden], .e-qr-ferme[hidden] { display: none; }
.e-qr-code { flex: none; display: flex; flex-direction: column; align-items: center; gap: calc(1.6 * var(--u)); }
.e-qr-plaque {
  --cote: min(64vh, 40vw);
  width: var(--cote); height: var(--cote); background: #ffffff; border-radius: calc(1.4 * var(--u)); overflow: hidden;
}
.e-qr-plaque svg { display: block; width: 100%; height: 100%; }
.e-qr-adresse {
  margin: 0; max-width: min(92vw, calc(1.5 * min(64vh, 40vw))); text-align: center; overflow-wrap: anywhere;
  font-family: var(--police-titre); font-weight: 700; font-size: calc(3.1 * var(--u)); line-height: 1.1; letter-spacing: .01em;
}
.e-qr-ferme {
  flex: 1 1 0; min-width: 0; margin: 0; color: var(--e-doux); text-wrap: balance;
  font-family: var(--police-titre); font-weight: 700; font-size: calc(5 * var(--u)); line-height: 1.1;
}
.e-qr-ferme small { display: block; margin-top: calc(1.6 * var(--u)); font-family: var(--police); font-weight: 500; font-size: .5em; line-height: 1.3; }
@media (orientation: portrait) {
  .e-scene > .e-qr { flex-direction: column; gap: calc(2 * var(--u)); padding: calc(2 * var(--u)) 5vw calc(3 * var(--u)); text-align: center; }
  .e-qr-textes { flex: none; align-items: center; }
  .e-qr .e-logos-grand .e-plaque { --h: calc(6 * var(--u)); }
  .e-qr .e-societe { text-align: center; margin-top: calc(.8 * var(--u)); font-size: max(12px, calc(1.9 * var(--u))); }
  .e-qr-titre { margin-top: calc(1.2 * var(--u)); font-size: min(calc(6.6 * var(--u)), 10vw); }
  .e-qr-aide { margin-top: calc(1 * var(--u)); font-size: min(calc(3 * var(--u)), 4.6vw); }
  .e-qr-langues { margin-top: calc(.8 * var(--u)); font-size: min(calc(2.4 * var(--u)), 3.8vw); }
  .e-qr-plaque { --cote: min(74vw, 40vh); }
  .e-qr-adresse { font-size: min(calc(3.4 * var(--u)), 5.2vw); max-width: 90vw; }
  .e-qr-ferme { flex: none; font-size: min(calc(5.4 * var(--u)), 8vw); }
}

/* ==========================================================================
   Outils discrets (souris qui bouge, écran touché), pastille « Hors réseau »
   ========================================================================== */
.e-outils {
  position: fixed; top: max(12px, env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right)); z-index: 100;
  display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px;
  opacity: 0; pointer-events: none; transition: opacity 200ms var(--sortie);
}
.e-outils-visibles .e-outils { opacity: 1; pointer-events: auto; }
.e-btn {
  min-height: 56px; padding: 0 18px; display: inline-flex; align-items: center; justify-content: center;
  border: 2px solid #5a5a5a; border-radius: 12px; background: rgba(28, 28, 28, .94); color: #f4f2ea;
  font-family: var(--police-titre); font-weight: 700; font-size: 1.15rem; letter-spacing: .03em; text-transform: uppercase;
  text-decoration: none; cursor: pointer; transition: transform 120ms var(--sortie);
}
.e-btn:active { transform: scale(.97); }
.e-btn:focus-visible { outline: 3px solid #FBE122; outline-offset: 3px; }
.e-btn[hidden] { display: none; }
.e-reseau {
  position: fixed; left: max(12px, env(safe-area-inset-left)); bottom: calc(max(8px, 1.1 * var(--u)) + 10px); z-index: 90;
  display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px; border-radius: 99px;
  background: rgba(28, 28, 28, .9); border: 1px solid #5a5a5a; color: #d9d5c6; font-size: .9rem; font-weight: 600;
}
.e-reseau::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: #FF8A7A; }
.e-reseau[hidden] { display: none; }

/* ==========================================================================
   Adresse /ecran : la liste des écrans (fond clair, comme le reste du site)
   ========================================================================== */
.e-liste .auth-carte { max-width: 560px; }
.e-liste-cartes { display: grid; gap: 10px; margin-top: 18px; }
.e-liste-carte {
  display: grid; gap: 2px; min-height: var(--bouton); padding: 12px 16px; text-decoration: none;
  border: 2px solid var(--bordure); border-radius: var(--rayon); background: var(--surface);
  transition: transform var(--rapide) var(--sortie);
}
.e-liste-carte:active { transform: scale(.985); }
.e-liste-carte:hover, .e-liste-carte:focus-visible { border-color: var(--noir); }
.e-liste-carte strong { font-family: var(--police-titre); font-weight: 800; font-size: 1.35rem; line-height: 1.1; }
.e-liste-carte span { color: var(--texte-doux); font-size: .98rem; }
/* (D72) Appareil connecté par un code « écran d'affichage » : la note et « Déconnecter cet écran ». */
.e-liste-affichage { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--bordure); text-align: center; }
.e-liste-affichage p { margin: 0 0 6px; }
.e-liste-affichage .groupe-boutons { justify-content: center; }
.e-liste-question { font-weight: 600; color: var(--texte); }
