/* ==========================================================================
   Écran de la tente (/tente) — étape 3, décisions D45, D49, D51.
   Fond noir, lisible de loin et de nuit. Trois modes (classe sur <body>) :
     .mode-ordinateur : paysage, on clique sur les gros boutons ;
     .mode-affichage  : télé, aucun bouton d'action, marge pour le bord de l'écran ;
     .mode-telephone  : en hauteur, tout empilé, gros boutons en bas.
   Règles : l'horloge et les gros boutons ne sont jamais recouverts ni animés ;
   transitions seulement sur transform / opacity (les effets viendront en B6).
   ========================================================================== */

body.tente {
  background: #111111;
  color: var(--texte);
  overflow: hidden;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
body.tente.mode-telephone { overflow: auto; }
body.tente textarea, body.tente input { -webkit-user-select: text; user-select: text; }

.t-ecran {
  --t-vert: #2F7A1F;
  --t-rouge: #C62E1F;
  --t-jaune: #FBE122;
  --t-gris: #3a3a3a;
  --t-doux: #b9b6aa;
  --t-surface: #1c1c1c;
  --t-surface-2: #262626;
  --t-bordure: #4a4a4a;
  height: 100dvh;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr); /* bandeau du haut, bandeaux qui restent, corps */
  background: #111111;
}
.mode-telephone .t-ecran { height: auto; min-height: 100dvh; display: block; }

/* ---------- Boutons ---------- */
.t-btn {
  min-height: 56px; padding: 0 18px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 2px solid var(--t-bordure); border-radius: 12px;
  background: var(--t-surface); color: var(--texte);
  font-family: var(--police-titre); font-weight: 700; font-size: 1.15rem; letter-spacing: .03em; text-transform: uppercase;
  cursor: pointer; text-decoration: none;
  transition: transform 120ms var(--sortie), opacity 120ms var(--sortie);
}
.t-btn:active { transform: scale(.97); }
.t-btn:disabled { opacity: .45; cursor: default; }
.t-btn:focus-visible, .t-gros-btn:focus-visible, .t-ligne:focus-visible, .t-cause:focus-visible { outline: 3px solid var(--t-jaune); outline-offset: 3px; }
.t-btn-large { width: 100%; }
.t-btn-jaune { background: var(--t-jaune); color: #111111; border-color: var(--t-jaune); }
.t-btn-rouge { background: var(--t-rouge); color: #ffffff; border-color: var(--t-rouge); }
.t-btn-vert { background: var(--t-vert); color: #ffffff; border-color: var(--t-vert); }
.t-btn-actif { border-color: var(--t-jaune); box-shadow: inset 0 0 0 2px var(--t-jaune); }
.garde { pointer-events: none; }
.curseur-cache, .curseur-cache * { cursor: none !important; }
.mode-telephone [data-action="liste"] { display: none; }

/* ---------- Bandeau du haut : événement, HORLOGE, état ---------- */
.t-bandeau {
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 2vw;
  padding: 1.2vh 2vw; min-height: 16vh;
  border-bottom: 6px solid transparent; border-image: var(--bande) 1;
  position: relative; z-index: 50; background: #111111;
}
.t-evenement { display: flex; align-items: center; gap: 1.2vw; min-width: 0; }
.t-embleme {
  flex: none; width: clamp(48px, 9vh, 96px); height: clamp(48px, 9vh, 96px); border-radius: 50%;
  background: #ffffff; display: grid; place-items: center; overflow: hidden;
}
.t-embleme img { width: 82%; height: 82%; object-fit: contain; }
.t-evenement-nom {
  font-family: var(--police-titre); font-weight: 700; font-size: clamp(1.1rem, 3.6vh, 2.6rem); line-height: 1.05; text-transform: uppercase;
  overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
}
.t-horloge {
  font-family: var(--police-titre); font-weight: 800; font-size: clamp(64px, 13vh, 170px); line-height: 1;
  white-space: nowrap; color: #ffffff;
}
/* Chaque chiffre dans une case de largeur fixe : l'heure ne « danse » pas. */
.t-chiffre { display: inline-block; width: .52em; text-align: center; }
.t-deux-points { display: inline-block; width: .26em; text-align: center; position: relative; top: -.06em; }
.t-etat { display: flex; flex-direction: column; align-items: flex-end; gap: .6vh; min-width: 0; }
.t-reseau {
  display: inline-flex; align-items: center; gap: 8px; padding: 4px 14px; border-radius: 999px;
  font-weight: 700; font-size: clamp(.9rem, 2.2vh, 1.4rem); background: var(--t-surface-2); color: var(--texte); border: 2px solid transparent;
}
.t-reseau::before { content: ''; width: .7em; height: .7em; border-radius: 50%; background: currentColor; }
.t-reseau[data-niveau="direct"] { color: #7CD65A; }
.t-reseau[data-niveau="attente"] { color: var(--t-jaune); }
.t-reseau[data-niveau="coupe"] { color: #ffffff; background: var(--t-rouge); }
.t-heure-source { color: var(--t-doux); font-size: clamp(.8rem, 1.9vh, 1.15rem); }
/* (la classe « alerte » existe aussi dans app.css : ici elle ne doit changer que la couleur, pas la taille du bandeau) */
.t-heure-source.alerte { color: var(--t-jaune); font-weight: 700; padding: 0; margin: 0; border: 0; background: none; border-radius: 0; }
.t-mode-affichage { color: var(--t-doux); font-size: clamp(.8rem, 1.9vh, 1.15rem); letter-spacing: .06em; text-transform: uppercase; }
.t-outils { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
/* Fenêtre étroite (1024×768) : les 3 boutons restent sur une rangée (sinon le bandeau mange l'écran). */
@media (max-width: 1100px) {
  .tente:not(.mode-telephone) .t-outils { flex-wrap: nowrap; gap: 6px; }
  .tente:not(.mode-telephone) .t-outils .t-btn { padding: 0 9px; font-size: 1rem; letter-spacing: 0; }
  .tente:not(.mode-telephone) .t-cible:not(.t-cible-petite) { width: min(32vh, 22vw); }
}
/* Fenêtre basse (zoom du navigateur, petit écran) : on serre la scène, les gros boutons restent entiers. */
@media (max-height: 560px) {
  .tente:not(.mode-telephone) .t-haut, .tente:not(.mode-telephone) .t-haut .t-btn { min-height: 48px; }
  .tente:not(.mode-telephone) .t-depart-infos .t-tireur, .tente:not(.mode-telephone) .t-cible-petite { display: none; }
  .tente:not(.mode-telephone) .t-gros-boutons { height: 120px; }
  .tente:not(.mode-telephone) .t-charge-desc { display: none; }
  .tente:not(.mode-telephone) .t-charge { padding: .6vh 1.4vw; }
  .tente:not(.mode-telephone) .t-charge .verre { height: 64px; width: auto; }
  .tente:not(.mode-telephone) .t-attente-bas { flex-wrap: nowrap; }
  .tente:not(.mode-telephone) .t-attente-bas .t-btn { padding: 0 10px; font-size: 1rem; min-height: 48px; }
  .tente:not(.mode-telephone) .t-gros-nom { font-size: 1.5rem; }
}

/* ---------- Corps : scène + colonne ---------- */
.t-corps { display: grid; grid-template-columns: 58fr 42fr; min-height: 0; }
.t-scene { min-width: 0; min-height: 0; padding: 2.4vh 2vw; display: flex; flex-direction: column; gap: 1.6vh; overflow: hidden; position: relative; }
.t-colonne {
  min-width: 0; min-height: 0; padding: 2vh 1.6vw; display: flex; flex-direction: column; gap: 1.4vh;
  border-left: 2px solid var(--t-surface-2); overflow-y: auto; overscroll-behavior: contain;
}
/* DÉPART, CAUSES, DÉCISION, À RETIRER : la scène prend toute la largeur (la colonne se replie),
   sauf si on a demandé la liste (« Liste / corriger ») ou si un message attend dans la colonne. */
.scene-large:not(.colonne-ouverte) .t-corps { grid-template-columns: minmax(0, 1fr); }
.scene-large:not(.colonne-ouverte) .t-colonne { display: none; }
.t-colonne > * { flex: none; }
.t-colonne { padding-bottom: 0; }
.t-colonne-bas { margin-top: auto; padding: 1vh 0 2vh; position: sticky; bottom: 0; background: #111111; }
.panneau-ouvert .t-colonne-bas { visibility: hidden; }
.mode-affichage [data-action-seulement] { display: none !important; }

/* ---------- Scène : éléments communs ---------- */
.t-haut { display: flex; gap: 10px; justify-content: space-between; align-items: center; flex-wrap: wrap; min-height: 56px; }
.t-haut-groupe { display: flex; gap: 10px; flex-wrap: wrap; }
.t-titre {
  margin: 0; font-family: var(--police-titre); font-weight: 800; text-transform: uppercase; line-height: 1;
  font-size: clamp(2rem, 8vh, 6rem); color: #ffffff; outline: none;
}
.t-sous-titre { margin: 0; font-size: clamp(1.1rem, 3.4vh, 2.4rem); color: var(--t-doux); }
.t-sous-titre strong { color: var(--texte); }
.t-retard { color: var(--t-jaune); font-weight: 700; }
.t-tir-nom {
  margin: 0; font-family: var(--police-titre); font-weight: 800; text-transform: uppercase; line-height: 1.02;
  font-size: clamp(1.8rem, min(7vh, 5vw), 5.2rem); overflow-wrap: break-word; hyphens: none;
}
.t-tireur { margin: 0; font-size: clamp(1.1rem, 3.6vh, 2.6rem); color: var(--t-doux); }
.t-tireur strong { color: var(--texte); font-weight: 700; }
.t-prevu { font-variant-numeric: tabular-nums; }

/* Cible avec anneau (compte à rebours au centre). L'anneau est posé chaque seconde par le JavaScript. */
.t-cible { position: relative; flex: none; width: min(40vh, 28vw); aspect-ratio: 1; display: grid; place-items: center; }
.t-cible svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.t-cible-fond { fill: none; stroke: var(--t-surface-2); stroke-width: 6; }
.t-cible-cercle { fill: none; stroke: #2e2e2e; stroke-width: 1.5; }
.t-cible-anneau { fill: none; stroke: var(--t-jaune); stroke-width: 6; stroke-linecap: butt; transform: rotate(-90deg); transform-origin: 50% 50%; }
.t-cible.urgent .t-cible-anneau { stroke: var(--t-rouge); }
.t-compte {
  position: relative; font-family: var(--police-titre); font-weight: 800; line-height: 1; color: #ffffff;
  font-size: min(13vh, 9vw); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.t-cible-petite { width: min(17vh, 13vw); }
.t-cible-petite .t-compte { font-size: min(5.4vh, 4vw); }

/* Charge : verre + nom + préparation (texte qui s'adapte pour tenir, jamais coupé en silence) */
.t-charge { display: flex; gap: 2vw; align-items: center; flex: 0 1 auto; min-height: 0; overflow: hidden; padding: 1.6vh 1.4vw; border-radius: 18px; background: var(--t-surface); }
.t-charge .verre { color: #ffffff; --poudre: #cfcab7; --fond-verre: #1c1c1c; flex: none; }
.t-charge-texte { min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: .6vh; }
.t-charge-nom {
  font-family: var(--police-titre); font-weight: 800; text-transform: uppercase; font-size: clamp(1.5rem, 5.4vh, 4rem); line-height: 1;
  display: flex; align-items: center; gap: .6em; flex-wrap: wrap;
}
.t-charge-pastille { width: .7em; height: .7em; border-radius: 50%; background: var(--c, #888); border: 2px solid #ffffff; flex: none; }
.t-charge-pos { font-family: var(--police); font-weight: 400; text-transform: none; font-size: .5em; color: var(--t-doux); }
.t-charge-desc { margin: 0; font-size: clamp(1.15rem, 3.6vh, 2.5rem); line-height: 1.25; overflow-wrap: anywhere; max-height: 14vh; overflow: hidden; }
.t-charge-vide {
  display: inline-flex; padding: 4px 14px; border-radius: 999px; font-weight: 700; color: #d6d3c8; border: 2px dashed #888;
  background: repeating-linear-gradient(135deg, #2a2a2a 0 8px, #333 8px 16px);
}
.t-charge-ligne { display: inline-flex; align-items: center; gap: .5em; font-weight: 700; }
.t-charge-ligne .verre { color: #ffffff; --poudre: #cfcab7; --fond-verre: #111111; }

/* ---------- Vue ATTENTE ---------- */
.t-attente-haut { display: flex; gap: 2.4vw; align-items: center; flex: 1 1 auto; min-height: 0; overflow: hidden; }
.t-attente-infos { min-width: 0; display: flex; flex-direction: column; gap: 1vh; }
.t-attente-bas { margin-top: auto; display: flex; justify-content: flex-end; }

/* ---------- Vues DÉPART et À RETIRER ---------- */
.t-depart-tete { display: flex; align-items: center; gap: 2vw; min-height: 0; }
.t-depart-texte { min-width: 0; display: flex; flex-direction: column; gap: .8vh; }
.t-depart-infos { display: flex; flex-wrap: wrap; gap: .4vh 2vw; align-items: baseline; font-size: clamp(1.2rem, 4vh, 3rem); }
.t-depart-infos .t-tir-nom { font-size: clamp(1.6rem, 5.6vh, 4.2rem); }
.t-entete-retirer {
  margin: 0; padding: 1vh 1.2vw; border-radius: 12px; background: var(--t-jaune); color: #111111;
  font-family: var(--police-titre); font-weight: 800; text-transform: uppercase; font-size: clamp(1.3rem, 4.4vh, 3.2rem); line-height: 1.05;
}
/* Messages : une rangée DANS la scène (jamais par-dessus les boutons) */
/* Le haut de la scène (rangée de boutons, titre, nom du tir) se tasse s'il le faut ; les messages et
   les gros boutons gardent toujours leur place (rien ne passe dessous, rien ne dépasse de l'écran). */
.t-dessus { flex: 1 1 auto; min-height: 0; overflow: hidden; display: flex; flex-direction: column; gap: 1.6vh; }
/* Rien ne se recouvre : chaque ligne garde sa hauteur ; quand la place manque, le JavaScript cache
   d'abord le petit cercle (serre-1), puis le tireur et la charge (serre-2) — jamais le nom du tir. */
.t-dessus > * { flex: none; }
.tente:not(.mode-telephone) .t-dessus .t-haut { flex-wrap: nowrap; }
.tente:not(.mode-telephone).colonne-ouverte .t-dessus .t-haut .t-btn { padding: 0 10px; font-size: 1rem; }
.tente:not(.mode-telephone) .t-depart-tete .t-titre { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tente:not(.mode-telephone) .t-depart-tete { overflow: hidden; }
.serre-1 .t-cible-petite { display: none; }
.serre-titre .t-depart-tete .t-titre { font-size: clamp(1.6rem, 5vh, 3rem); }
.serre-2 .t-depart-infos { display: none; }
.serre-2 .t-depart-tete .t-titre { font-size: clamp(1.6rem, 5vh, 3rem); }
/* cran 3 : plus de titre (« En retard de… » reste) ; cran 4 : plus rien que la rangée de boutons. */
.serre-3 .t-depart-tete .t-titre, .serre-3 .t-depart-texte .t-titre { display: none; }
.serre-4 .t-depart-tete, .serre-4 .t-entete-retirer, .serre-4 .t-depart-texte { display: none; }
/* La confirmation de la rangée du haut tient sur une ligne (elle ne pousse rien). */
.tente:not(.mode-telephone) .t-haut .t-confirmer { flex-wrap: nowrap; padding: 4px 8px; }
.tente:not(.mode-telephone) .t-haut .t-confirmer p { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#t-titre-scene:focus, #t-titre-scene:focus-visible { outline: none; }
.t-depart-infos .t-tir-nom { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-messages { display: flex; flex-direction: column; gap: 6px; flex: none; }
.t-messages:empty { display: none; }
.t-message {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 4px 12px; min-height: 52px; border-radius: 12px; background: var(--t-surface-2); font-size: clamp(1rem, 2.6vh, 1.5rem); font-weight: 600;
}
.t-message > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-message .t-btn { flex: none; min-height: 48px; }
.t-note {
  padding: 8px 14px; border-radius: 12px; background: #1f3a1a; color: #ffffff; border: 2px solid #57b83f;
  font-weight: 600; text-align: center; font-size: clamp(1rem, 2.6vh, 1.4rem); box-shadow: 0 4px 14px rgba(0, 0, 0, .6);
}
.t-note-erreur { background: #4a1712; border-color: #f0624f; }
.t-btn[hidden] { display: none; }
.t-gardes { margin: 0 0 12px; padding: 10px 14px; border-radius: 10px; background: #fff3c4; color: #111111; }
.t-message-jaune { background: #3d3606; color: var(--t-jaune); border: 2px solid var(--t-jaune); }
/* Filet de sécurité : si la place manque quand même, c'est le HAUT de la scène qui est rogné, jamais les gros boutons. */
.tente:not(.mode-telephone).scene-large .t-scene { justify-content: flex-end; }
.t-charge > .t-charge-vide { font-size: clamp(1.3rem, 3.6vh, 2.6rem); padding: 6px 20px; }
/* Le bloc du bas : le NOM du tir, les messages (2 lignes au plus) et les deux gros boutons, toujours ensemble.
   Les gros boutons ont une hauteur FIXE et sont collés en bas : rien ne les déplace jamais ; c'est le haut de
   la scène (.t-dessus) qui cède la place. */
.t-gros { flex: none; margin-top: auto; display: flex; flex-direction: column; gap: 1vh; }
.t-gros-boutons { flex: none; height: clamp(160px, 27vh, 380px); display: grid; grid-template-columns: 1fr 1fr; gap: 4vw; }
.t-gros-nom {
  margin: 0; display: flex; align-items: baseline; gap: .5em; min-width: 0;
  font-family: var(--police-titre); font-weight: 800; text-transform: uppercase; line-height: 1.05; font-size: clamp(1.5rem, 5vh, 3.6rem);
}
.t-gros-nom strong { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-gros-heure { flex: none; font-size: .6em; color: var(--t-doux); font-variant-numeric: tabular-nums; }
.t-gros-btn {
  min-height: 0; border: 3px solid transparent; border-radius: 22px; cursor: pointer;
  font-family: var(--police-titre); font-weight: 800; text-transform: uppercase; line-height: 1; letter-spacing: .02em;
  font-size: clamp(2rem, 6vh, 5.4rem); color: #ffffff; padding: 0 2vw;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3em;
  transition: transform 120ms var(--sortie), opacity 120ms var(--sortie);
}
.t-gros-btn:active { transform: scale(.98); }
.t-gros-btn small { font-family: var(--police); font-weight: 600; font-size: .32em; text-transform: none; letter-spacing: 0; opacity: .92; }
.t-gros-tire { background: var(--t-vert); border-color: #57b83f; }
.t-gros-pas-parti { background: var(--t-rouge); border-color: #f0624f; }
.t-gros-jaune { background: var(--t-jaune); color: #111111; border-color: #fff27a; }
.t-gros-gris { background: var(--t-gris); border-color: #6a6a6a; }
.t-suivi { text-align: center; font-size: clamp(1.4rem, 5vh, 3.6rem); font-weight: 700; color: var(--t-doux); margin-top: auto; padding: 3vh 0; }

/* ---------- Décaler ce départ (D54) ---------- */
.t-attente-bas { gap: 10px; flex-wrap: wrap; }
.t-haut .t-confirmer { flex: 1; align-items: center; }
.t-decaler { display: flex; flex-direction: column; gap: 1.4vh; min-height: 0; }
.t-decaler .t-tir-nom { font-size: clamp(1.5rem, 4.6vh, 3rem); }
.t-decaler-boutons { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.t-btn-decaler { min-height: 88px; flex-direction: column; gap: 2px; font-size: clamp(1.5rem, 4.4vh, 2.6rem); background: var(--t-surface-2); border-color: var(--t-jaune); }
.t-btn-decaler small { font-family: var(--police); font-weight: 600; font-size: .45em; text-transform: none; letter-spacing: 0; color: var(--t-jaune); }
.t-bascule { justify-content: flex-start; gap: 12px; min-height: 64px; text-transform: none; font-family: var(--police); font-size: clamp(1rem, 2.6vh, 1.4rem); letter-spacing: 0; text-align: left; }
.t-case { flex: none; width: 32px; height: 32px; border-radius: 8px; border: 3px solid currentColor; display: grid; place-items: center; font-size: 1.3rem; line-height: 1; }
.t-bascule.t-btn-actif .t-case { background: var(--t-jaune); border-color: var(--t-jaune); color: #111111; }
.t-decaler-heure { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
.t-decaler-ligne { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.t-decaler-heure input {
  min-height: 56px; padding: 0 12px; border-radius: 12px; border: 2px solid var(--t-bordure); background: #111111; color: #ffffff;
  font-family: var(--police-titre); font-weight: 800; font-size: 1.8rem;
}
.t-etat-tir[data-etat="annule"] { background: #6a675e; color: #ffffff; }
.mode-telephone .t-btn-decaler { min-height: 84px; font-size: 1.9rem; }
.mode-telephone .t-haut { gap: 8px; }
.mode-telephone .t-haut .t-btn { min-height: 52px; padding: 0 14px; font-size: 1rem; }

/* ---------- Vue TIRÉ ---------- */
.t-tire { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.6vh; text-align: center; }
.t-coche { width: min(26vh, 22vw); height: min(26vh, 22vw); border-radius: 50%; background: var(--t-vert); display: grid; place-items: center; }
.t-coche svg { width: 62%; height: 62%; stroke: #ffffff; stroke-width: 3.2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.t-tire .t-titre { font-size: clamp(2.6rem, 12vh, 9rem); }
.t-tire-heure { font-family: var(--police-titre); font-weight: 700; font-size: clamp(1.6rem, 7vh, 5rem); font-variant-numeric: tabular-nums; }
.t-envoi { font-size: clamp(1rem, 2.8vh, 1.6rem); color: var(--t-doux); min-height: 1.4em; }
.t-envoi.fait { color: #7CD65A; }
.t-coin-oppose { position: absolute; top: 2.4vh; right: 2vw; } /* à l'opposé de l'ancien COUP TIRÉ (en bas à gauche) */

/* ---------- Vues CAUSES et DÉCISION (rouge sobre) ---------- */
.vue-causes .t-scene, .vue-decision .t-scene { background: #2b0e0a; }
.t-causes { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 1fr; gap: 1.6vh 1.4vw; }
.t-cause {
  min-height: 96px; border: 3px solid #a84a3e; border-radius: 18px; background: #4a1610; color: #ffffff; cursor: pointer; padding: 8px 12px;
  font-family: var(--police-titre); font-weight: 700; font-size: clamp(1.4rem, 4.6vh, 3.2rem); line-height: 1.05; text-transform: uppercase;
  transition: transform 120ms var(--sortie), opacity 120ms var(--sortie);
}
.t-cause:active { transform: scale(.98); }
.t-bas-droite { display: flex; justify-content: flex-end; }

/* ---------- Vues FINI, AUCUN, CHARGEMENT ---------- */
.t-centre { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2vh; text-align: center; }
.t-bilan { display: flex; gap: 2vw; flex-wrap: wrap; justify-content: center; }
.t-bilan div { background: var(--t-surface); border-radius: 18px; padding: 1.6vh 2vw; min-width: 9em; }
.t-bilan b { display: block; font-family: var(--police-titre); font-weight: 800; font-size: clamp(2.4rem, 9vh, 6rem); line-height: 1; }
.t-bilan span { color: var(--t-doux); font-size: clamp(1rem, 2.8vh, 1.6rem); }
.t-squelette { flex: 1; border-radius: 22px; background: var(--t-surface); opacity: .7; }

/* ---------- Colonne ---------- */
.t-section h2 {
  margin: 0 0 .8vh; font-family: var(--police-titre); font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  font-size: clamp(1rem, 2.6vh, 1.5rem); color: var(--t-doux);
}
.t-section + .t-section { margin-top: 1.2vh; }
.t-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.t-ligne {
  width: 100%; min-height: 64px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 6px 12px; border-radius: 12px; border: 2px solid transparent; background: var(--t-surface); color: var(--texte);
  font: inherit; text-align: left; cursor: pointer;
  transition: transform 120ms var(--sortie), opacity 120ms var(--sortie);
}
.t-ligne:active { transform: scale(.99); }
.mode-affichage .t-ligne { cursor: default; }
.t-ligne-heure { font-family: var(--police-titre); font-weight: 700; font-size: clamp(1.3rem, 3.6vh, 2.2rem); font-variant-numeric: tabular-nums; }
.t-ligne-nom { display: block; font-weight: 700; font-size: clamp(1rem, 2.7vh, 1.6rem); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-ligne-detail { display: block; color: var(--t-doux); font-size: clamp(.85rem, 2.1vh, 1.25rem); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-ligne-droite { display: flex; align-items: center; gap: 8px; font-size: clamp(.85rem, 2.1vh, 1.25rem); font-weight: 600; white-space: nowrap; }
.t-ligne-droite .verre { color: #ffffff; --poudre: #cfcab7; --fond-verre: #1c1c1c; }
.t-ligne.est-courant { border-color: var(--t-jaune); }
.t-ligne.en-attente .t-ligne-detail::after { content: ' · envoi…'; color: var(--t-jaune); }
.t-etat-tir { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px; font-weight: 700; font-size: .85em; white-space: nowrap; }
.t-etat-tir[data-etat="tire"], .t-etat-tir[data-etat="retire"] { background: var(--t-vert); color: #ffffff; }
.t-etat-tir[data-etat="pas_parti"] { background: var(--t-rouge); color: #ffffff; }
.t-etat-tir[data-etat="a_retirer"] { background: var(--t-jaune); color: #111111; }
.t-etat-tir[data-etat="a_venir"] { background: var(--t-surface-2); color: var(--texte); border: 1px solid var(--t-bordure); }
.t-vide { color: var(--t-doux); margin: 0; padding: 8px 0; }
.t-liste-jour { margin-top: 6px; padding: 4px 2px; font-family: var(--police-titre); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--t-jaune); font-size: clamp(1rem, 2.4vh, 1.4rem); }

/* Bandeaux qui RESTENT (conflit, session perdue, tir à retirer, nouvelle version) */
.t-bandeaux { display: flex; flex-direction: column; gap: 6px; padding: 1vh 2vw 0; }
/* Places fixes dans la grille de la page (la rangée des bandeaux reste là même quand elle est vide). */
.t-ecran > .t-bandeau { grid-row: 1; }
.t-ecran > .t-bandeaux { grid-row: 2; }
.t-ecran > .t-corps { grid-row: 3; }
/* Sur l'ordinateur et la télé : un bandeau = une ligne compacte (texte à gauche, boutons à droite). */
.tente:not(.mode-telephone) .t-avis { display: flex; align-items: center; gap: 12px; padding: 6px 12px; }
.tente:not(.mode-telephone) .t-avis > p { margin: 0; flex: 1 1 auto; min-width: 0; }
.tente:not(.mode-telephone) .t-avis-actions { flex: none; flex-wrap: nowrap; }
.tente:not(.mode-telephone) .t-avis .t-btn { min-height: 48px; padding: 0 12px; font-size: 1rem; }
/* Notes courtes (4 s) : juste sous le bandeau du haut, sans jamais cacher l'heure ni les gros boutons. */
.t-notes {
  position: absolute; left: 50%; top: 100%; transform: translateX(-50%); z-index: 60; width: min(92vw, 640px);
  display: flex; flex-direction: column; gap: 6px; padding-top: 8px; pointer-events: none;
}
.t-notes:empty { display: none; }
/* La note ne prend jamais un appui : il passe au bouton qui est dessous (elle s'efface seule après 4 s). */
.t-notes .t-note { pointer-events: none; width: 100%; font-family: inherit; }
.t-bandeaux:empty { display: none; }
.t-avis { padding: 10px 14px; border-radius: 12px; background: var(--t-surface-2); border: 2px solid var(--t-bordure); font-size: clamp(1rem, 2.5vh, 1.4rem); }
.t-avis p { margin: 0 0 8px; font-weight: 600; }
.t-avis-jaune { background: #3d3606; border-color: var(--t-jaune); }
.t-avis-rouge { background: #4a1610; border-color: var(--t-rouge); }
.t-avis-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.tente .toasts { position: static; transform: none; width: auto; max-width: none; padding: 0; pointer-events: auto; }
.tente .toasts:empty { display: none; }

/* Panneaux de la colonne : mode, événement, liste des tirs, fiche d'un tir */
.t-panneau { display: flex; flex-direction: column; gap: 1.2vh; min-height: 0; }
.t-panneau-tete { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.t-panneau-tete h2 { margin: 0; font-family: var(--police-titre); font-weight: 800; text-transform: uppercase; font-size: clamp(1.3rem, 3.6vh, 2.2rem); }
.t-choix { display: flex; flex-direction: column; gap: 8px; }
.t-choix .t-btn { justify-content: flex-start; text-align: left; height: auto; padding: 10px 16px; flex-direction: column; align-items: flex-start; gap: 2px; }
.t-choix .t-btn small { font-family: var(--police); font-weight: 400; font-size: .85rem; text-transform: none; letter-spacing: 0; color: var(--t-doux); }
.t-fiche-etat { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: clamp(1.2rem, 3.4vh, 2rem); font-weight: 700; }
.t-fiche-actions { display: flex; flex-direction: column; gap: 8px; }
.t-confirmer { display: flex; gap: 8px; flex-wrap: wrap; padding: 8px; border-radius: 12px; background: var(--t-surface-2); }
.t-confirmer p { margin: 0; flex: 1 1 100%; font-weight: 600; }
.t-fiche textarea {
  width: 100%; min-height: 96px; border-radius: 12px; border: 2px solid var(--t-bordure); background: #111111; color: var(--texte);
  font: inherit; padding: 10px 12px;
}
.t-historique { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: clamp(.9rem, 2.2vh, 1.2rem); color: var(--t-doux); }
.t-historique li { padding: 6px 0; border-top: 1px solid var(--t-surface-2); }
.t-historique b { color: var(--texte); }
.t-historique .annulee { text-decoration: line-through; }
.t-code-tente { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tente:not(.mode-telephone) .t-code-tente { flex: none; flex-wrap: nowrap; }
.tente:not(.mode-telephone) .t-code-tente input { height: 48px; min-height: 48px; width: 7em; padding: 0 8px; font-size: 1.5rem; }
/* Téléphone, vue d'attente : la ligne « Attend aussi… — Passer » passe en haut de la scène (toujours visible). */
.mode-telephone.vue-attente .t-scene > .t-carte-depart ~ .t-messages { order: -1; }
.t-code-tente input {
  min-height: 56px; width: 9.5em; border-radius: 12px; border: 2px solid var(--t-bordure); background: #111111; color: #ffffff;
  font-family: var(--police-titre); font-weight: 800; font-size: 1.8rem; letter-spacing: .2em; text-align: center;
}

/* ---------- Mode téléphone (en hauteur) : tout empilé, gros boutons en bas ---------- */
.mode-telephone .t-bandeau {
  grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "evenement etat" "horloge horloge";
  position: sticky; top: 0; min-height: 0; padding: 8px 12px; gap: 4px 10px; border-bottom-width: 4px;
}
.mode-telephone .t-evenement { grid-area: evenement; gap: 8px; }
.mode-telephone .t-embleme { width: 36px; height: 36px; }
.mode-telephone .t-evenement-nom { font-size: 1.05rem; -webkit-line-clamp: 1; line-clamp: 1; }
.mode-telephone .t-etat { grid-area: etat; flex-direction: row; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.mode-telephone .t-reseau { font-size: .85rem; padding: 2px 10px; }
.mode-telephone .t-heure-source { display: none; }
.mode-telephone .t-heure-source.alerte { display: inline; font-size: .8rem; }
.mode-telephone .t-outils .t-btn { min-height: 48px; padding: 0 12px; font-size: .95rem; }
.mode-telephone .t-outils [data-plein-ecran], .mode-telephone .t-outils [data-ouvrir="evenements"] { display: none; }
.mode-telephone .t-horloge { grid-area: horloge; font-size: clamp(56px, 19vw, 104px); text-align: center; }
.mode-telephone .t-corps { display: block; }
.mode-telephone .t-scene { min-height: calc(100dvh - 190px); padding: 14px 14px 0; gap: 12px; overflow: visible; }
.mode-telephone .t-scene > :last-child:not(.t-gros) { margin-bottom: 18px; }
.mode-telephone .t-colonne { display: flex !important; border-left: 0; border-top: 2px solid var(--t-surface-2); padding: 16px 14px 28px; overflow: visible; gap: 12px; }
.mode-telephone .t-titre { font-size: clamp(2rem, 10.5vw, 3.4rem); }
.mode-telephone .t-sous-titre, .mode-telephone .t-tireur { font-size: 1.25rem; }
.mode-telephone .t-tir-nom, .mode-telephone .t-depart-infos .t-tir-nom { font-size: clamp(1.7rem, 8.4vw, 2.8rem); }
.mode-telephone .t-depart-infos { font-size: 1.2rem; }
.mode-telephone .t-cible { width: min(40vw, 190px); }
.mode-telephone .t-compte { font-size: min(12.5vw, 60px); }
.mode-telephone .t-cible-petite { width: 76px; }
.mode-telephone .t-cible-petite .t-compte { font-size: 23px; }
.mode-telephone .t-depart-tete { gap: 12px; }
.mode-telephone .t-depart-tete .t-titre { font-size: clamp(1.4rem, 7.2vw, 2.2rem); }
.mode-telephone .t-colonne-bas { position: static; }
.mode-telephone .t-attente-haut { gap: 14px; align-items: center; }
.mode-telephone .t-attente-bas { justify-content: stretch; }
.mode-telephone .t-attente-bas .t-btn { flex: 1 1 40%; white-space: normal; line-height: 1.1; padding: 6px 10px; }
.mode-telephone .t-attente-bas .t-btn-principal { order: -1; flex-basis: 100%; }
.mode-telephone .t-attente-bas .t-confirmer { flex: 1 1 100%; }
.mode-telephone .t-dessus { overflow: visible; flex: none; gap: 10px; }
.mode-telephone .t-message { flex-wrap: wrap; }
.mode-telephone .t-message > span { white-space: normal; }
.mode-telephone .t-charge { gap: 14px; padding: 12px; }
.mode-telephone .t-charge-nom { font-size: 1.7rem; }
.mode-telephone .t-charge-desc { font-size: 1.15rem; max-height: none; }
.mode-telephone .t-entete-retirer { font-size: 1.35rem; padding: 8px 12px; }
.mode-telephone .t-message { font-size: 1.05rem; }
/* Les deux gros boutons sont FIXÉS en bas de l'écran, avec le nom du tir et les messages juste au-dessus :
   toujours visibles, toujours à la même place, quoi qu'il y ait au-dessus (bandeaux, textes longs). */
.mode-telephone .t-gros {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; height: auto; margin: 0;
  background: #111111; border-top: 2px solid var(--t-surface-2); padding: 6px 14px max(10px, env(safe-area-inset-bottom));
}
.mode-telephone .t-gros-boutons { display: grid; grid-template-columns: 1fr; gap: 10px; }
.mode-telephone .t-gros-btn { height: 96px; font-size: clamp(2rem, 10vw, 3rem); }
.mode-telephone .t-gros { display: flex; flex-direction: column; gap: 8px; }
.mode-telephone .t-gros-boutons { height: auto; }
.mode-telephone .t-gros-nom { font-size: 1.3rem; }
.mode-telephone .t-gros .t-message { min-height: 0; padding: 3px 10px; font-size: .95rem; flex-wrap: nowrap; }
.mode-telephone .t-gros .t-message > span { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mode-telephone .t-gros .t-message .t-btn { min-height: 48px; padding: 0 10px; font-size: .9rem; }
/* La hauteur du bloc fixé (mesurée par la page : --bloc-bas) est réservée tout en bas : tout reste atteignable. */
.mode-telephone .t-colonne { padding-bottom: calc(28px + var(--bloc-bas, 0px)); }
.mode-telephone .t-panneau, .mode-telephone .t-ligne { scroll-margin-top: 135px; }
.mode-telephone .t-bandeaux { padding: 8px 14px 0; }
/* Avec les gros boutons, l'horloge est un peu plus petite (jamais cachée) pour laisser la place au tir. */
.mode-telephone.vue-depart .t-horloge, .mode-telephone.vue-a-retirer .t-horloge { font-size: clamp(44px, 14vw, 72px); }
.mode-telephone .t-avis p { display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mode-telephone .t-avis .t-btn { min-height: 48px; padding: 0 12px; font-size: .95rem; }
.t-avis-plus { margin: 0; font-size: .9rem; color: var(--t-doux); }
.mode-telephone .t-causes { grid-template-columns: 1fr 1fr; flex: none; gap: 10px; }
.mode-telephone .t-cause { font-size: 1.35rem; min-height: 88px; }
.mode-telephone .t-coin-oppose { position: static; align-self: flex-end; }
.mode-telephone .t-coche { width: 38vw; height: 38vw; max-width: 180px; max-height: 180px; }
.mode-telephone .t-tire .t-titre { font-size: clamp(2.4rem, 13vw, 4rem); }
.mode-telephone .t-tire-heure { font-size: 2.4rem; }
.mode-telephone .t-bilan b { font-size: 2.8rem; }
.mode-telephone .t-ligne-heure { font-size: 1.5rem; }
.mode-telephone .t-ligne-nom { font-size: 1.05rem; }
.mode-telephone .t-ligne-detail, .mode-telephone .t-ligne-droite { font-size: .9rem; }
.mode-telephone .t-section h2 { font-size: 1.05rem; }
.mode-telephone .t-avis { font-size: 1.05rem; }
.mode-telephone .t-suivi { font-size: 1.6rem; padding: 18px 0; }

/* Petit écran en largeur mais mode ordinateur (1024×768, fenêtre étroite) : un peu plus serré */
@media (max-aspect-ratio: 4/3) {
  body:not(.mode-telephone) .t-corps { grid-template-columns: 55fr 45fr; }
}

/* Contrastes forcés (Windows) : bordures toujours visibles */
@media (forced-colors: active) {
  .t-btn, .t-gros-btn, .t-cause, .t-ligne, .t-avis, .t-reseau { border: 2px solid ButtonText; }
  .t-cible-anneau { stroke: Highlight; }
}

/* Téléphone couché : bandeau sur une ligne, gros boutons côte à côte, toujours collés en bas. */
@media (orientation: landscape) and (max-height: 500px) {
  .mode-telephone .t-bandeau { grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "evenement horloge etat"; }
  .mode-telephone .t-horloge { font-size: 44px; }
  .mode-telephone .t-scene { min-height: calc(100dvh - 80px); }
  .mode-telephone .t-gros-boutons { grid-template-columns: 1fr 1fr; }
  .mode-telephone .t-gros-btn { height: 80px; }
  .mode-telephone .t-causes { grid-template-columns: repeat(3, 1fr); }
  .mode-telephone .t-cause { min-height: 64px; font-size: 1.1rem; }
  .mode-telephone .t-attente-bas .t-btn, .mode-telephone .t-attente-bas .t-btn-principal { flex: 1 1 30%; order: 0; }
  .mode-telephone .t-cible:not(.t-cible-petite) { width: 120px; }
}

/* Télé (affichage seul) : la colonne ne défile pas ; sa dernière ligne s'estompe au lieu d'être coupée net. */
.t-charge:has(> .t-charge-vide) { flex: none; padding: 1vh 1.4vw; }

/* ==========================================================================
   GRAND AFFICHAGE — ordinateur et télé (D59)
   Rien d'autre que l'affichage sur fond noir : l'horloge, le compte à rebours, le nom du départ, le tireur
   et la charge prennent toute la place. Pas de colonne, pas de petit bouton. Les boutons « Mode / Plein
   écran / Événement » sont cachés (classe « outils-visibles » sur <html> quand la souris bouge).
   Sur l'ordinateur, les deux gros boutons arrivent en bas au moment de tirer.
   ========================================================================== */
.tente:not(.mode-telephone) .t-ecran { padding: 1vh 1vw; }
.tente:not(.mode-telephone) .t-bandeau { min-height: 0; padding: .4vh 1vw 1vh; gap: 1.5vw; }
.tente:not(.mode-telephone) .t-horloge { font-size: clamp(72px, min(20vh, 13vw), 320px); }
.tente:not(.mode-telephone) .t-evenement-nom { font-size: clamp(1.1rem, min(4.2vh, 2.6vw), 3.2rem); }
.tente:not(.mode-telephone) .t-reseau { font-size: clamp(.9rem, min(2.6vh, 1.6vw), 1.8rem); }
.tente:not(.mode-telephone) .t-heure-source, .tente:not(.mode-telephone) .t-mode-affichage { font-size: clamp(.8rem, min(2.1vh, 1.3vw), 1.4rem); }

/* Boutons du haut : posés PAR-DESSUS le coin (ils ne déplacent rien), invisibles et sans effet tant qu'ils sont cachés. */
.tente:not(.mode-telephone) .t-outils {
  position: absolute; top: 6px; right: 6px; z-index: 5; flex-wrap: nowrap; gap: 8px;
  padding: 8px; border-radius: 16px; background: #111111; border: 2px solid var(--t-bordure);
  opacity: 0; pointer-events: none; transition: opacity 200ms var(--sortie);
}
.outils-visibles .tente:not(.mode-telephone) .t-outils, .tente:not(.mode-telephone) .t-outils:focus-within { opacity: 1; pointer-events: auto; }

/* Pas de colonne : la scène prend tout l'écran. « Mode » et « Événement » s'ouvrent par-dessus, à droite. */
.tente:not(.mode-telephone) .t-corps { grid-template-columns: minmax(0, 1fr); }
.tente:not(.mode-telephone) .t-colonne { display: none; }
.tente:not(.mode-telephone) .t-colonne-bas { display: none; }
.tente:not(.mode-telephone).panneau-ouvert .t-colonne {
  display: flex; position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 94vw); z-index: 70;
  padding: 2vh 20px; background: #161616; border-left: 2px solid var(--t-bordure); box-shadow: -12px 0 40px rgba(0, 0, 0, .7);
}

/* La scène : cible + nom du départ en très grand, charge sur toute la largeur. */
.tente:not(.mode-telephone) .t-scene { padding: 1.6vh 1vw 1vh; gap: 1.8vh; }
.tente:not(.mode-telephone) .t-attente-haut { gap: 3.5vw; }
.tente:not(.mode-telephone) .t-attente-infos { flex: 1 1 0; gap: 1.4vh; }
.tente:not(.mode-telephone) .t-cible:not(.t-cible-petite) { width: min(47vh, 31vw); }
.tente:not(.mode-telephone) .t-cible:not(.t-cible-petite) .t-compte { font-size: min(14.5vh, 9.6vw); }
.tente:not(.mode-telephone) .t-attente-infos .t-sous-titre,
.tente:not(.mode-telephone) .t-attente-infos .t-tireur { font-size: clamp(1.3rem, min(5.2vh, 3.3vw), 4.4rem); }
.tente:not(.mode-telephone) .t-tir-nom { font-size: clamp(2rem, min(12.5vh, 6.6vw), 12rem); }
/* La charge garde sa hauteur (elle ne se tasse pas) : c'est le haut — cercle et nom — qui s'adapte à la place qui reste. */
.tente:not(.mode-telephone) .t-charge { padding: 2vh 2vw; gap: 2.4vw; border-radius: 22px; flex: none; max-height: 38vh; }
.tente:not(.mode-telephone) .t-charge .verre { width: clamp(96px, 17vh, 260px); height: clamp(120px, 21.25vh, 325px); }
.tente:not(.mode-telephone) .t-charge-nom { font-size: clamp(1.6rem, min(7.6vh, 5vw), 7rem); }
.tente:not(.mode-telephone) .t-charge-desc { font-size: clamp(1.2rem, min(4.6vh, 3vw), 4rem); max-height: 18vh; }
.t-depart-charge { margin: 0; font-size: clamp(1.2rem, min(4.6vh, 3vw), 3.6rem); }
/* Messages et bandeaux : du texte seulement (aucun bouton), en plus gros. */
.tente:not(.mode-telephone) .t-message { font-size: clamp(1.1rem, min(3.4vh, 2.2vw), 2.6rem); min-height: 0; padding: .8vh 1.2vw; }
.tente:not(.mode-telephone) .t-avis { font-size: clamp(1.1rem, min(3vh, 2vw), 2.2rem); }

/* Ordinateur, au moment de tirer : le nom du départ est déjà écrit en très grand juste au-dessus des gros boutons. */
.tente:not(.mode-telephone) .t-gros-nom { display: none; }
.tente:not(.mode-telephone) .t-gros-boutons { height: clamp(150px, 30vh, 420px); }
.tente:not(.mode-telephone) .t-gros-btn { font-size: clamp(2rem, min(8vh, 5vw), 7rem); }

/* Résultat en grand : « COUP TIRÉ — 14:35 » / « COUP PAS PARTI — 14:35 ». */
.t-tire.est-rate .t-coche { background: var(--t-rouge); }
.t-tire-note { margin: 0; font-size: clamp(1rem, 2.8vh, 1.8rem); color: var(--t-doux); }
.tente:not(.mode-telephone) .t-tire { min-height: 0; gap: 1.2vh; }
.tente:not(.mode-telephone) .t-tire > * { flex: none; margin: 0; }
.tente:not(.mode-telephone) .t-coche { width: min(19vh, 16vw); height: min(19vh, 16vw); }
.tente:not(.mode-telephone) .t-tire .t-titre { font-size: clamp(2.2rem, min(14vh, 9vw), 13rem); }
.tente:not(.mode-telephone) .t-tire-heure { font-size: clamp(2.2rem, min(13vh, 9vw), 12rem); line-height: 1; }
.tente:not(.mode-telephone) .t-tire .t-sous-titre { font-size: clamp(1.1rem, min(4.2vh, 2.8vw), 3.4rem); max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tente:not(.mode-telephone) .t-envoi { min-height: 0; line-height: 1.2; }
/* « Annuler (erreur) » : discret, dans le coin, quelques secondes seulement. */
.tente:not(.mode-telephone) .t-coin-oppose .t-btn { min-height: 48px; padding: 0 14px; font-size: 1rem; opacity: .7; }
.tente:not(.mode-telephone) .t-centre .t-titre { font-size: clamp(2rem, min(12vh, 7vw), 10rem); }
.tente:not(.mode-telephone) .t-centre .t-sous-titre { font-size: clamp(1.2rem, min(5vh, 3.2vw), 4rem); }

/* ==========================================================================
   VUE LISTE — ordinateur et télé, à plus de 5 minutes du prochain tir (D60)
   Pas de cible ni de compte à rebours : le prochain tir en grand, puis tous les suivants.
   ========================================================================== */
.vue-liste .t-scene { gap: 2vh; }
.t-prochain {
  flex: none; display: flex; flex-direction: column; gap: 1.2vh; padding: 2.2vh 2.2vw 2.6vh;
  border-radius: 26px; background: var(--t-surface); border-left: 1.1vw solid var(--t-jaune);
}
.t-prochain-etiquette {
  margin: 0; display: flex; align-items: baseline; gap: 1.2vw; color: var(--t-jaune);
  font-family: var(--police-titre); font-weight: 800; text-transform: uppercase; letter-spacing: .08em;
  font-size: clamp(1.1rem, min(3.8vh, 2.4vw), 3rem);
}
.t-prochain-etiquette span { color: var(--t-doux); font-family: var(--police); font-weight: 600; text-transform: none; letter-spacing: 0; }
.t-prochain-corps { display: flex; align-items: center; gap: 3vw; min-width: 0; }
.t-prochain-heure {
  flex: none; font-family: var(--police-titre); font-weight: 800; line-height: .95; color: #ffffff; font-variant-numeric: tabular-nums;
  font-size: clamp(3rem, min(18vh, 11vw), 17rem);
}
.t-prochain-infos { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: .8vh; }
.tente:not(.mode-telephone) .t-prochain .t-tir-nom { font-size: clamp(1.8rem, min(9.5vh, 5.2vw), 9rem); }
.t-prochain .t-tireur, .t-prochain-decale { margin: 0; font-size: clamp(1.2rem, min(4.6vh, 3vw), 4rem); color: var(--t-doux); }
.t-prochain-charge {
  flex: none; display: flex; flex-direction: column; align-items: center; gap: 1vh; max-width: 24vw;
  font-family: var(--police-titre); font-weight: 800; text-transform: uppercase; font-size: clamp(1.2rem, min(4.6vh, 2.9vw), 3.8rem); line-height: 1;
}
.t-prochain-charge .verre { width: clamp(72px, 12vh, 190px); height: clamp(90px, 15vh, 238px); color: #ffffff; --poudre: #cfcab7; --fond-verre: #1c1c1c; }
.t-prochain-charge-nom { display: inline-flex; align-items: center; gap: .45em; text-align: center; }
.t-suite { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 1.2vh; }
.t-suite-titre {
  margin: 0; flex: none; font-family: var(--police-titre); font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  font-size: clamp(1rem, min(3.2vh, 2vw), 2.4rem); color: var(--t-doux);
}
.t-suite-liste {
  list-style: none; margin: 0; padding: 0; flex: 1 1 auto; min-height: 0; overflow: hidden;
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); grid-template-rows: repeat(var(--rangs, 6), auto);
  align-content: start; gap: 1vh 2vw;
  font-size: clamp(1.1rem, min(3.9vh, 2.4vw), 3.2rem);
}
.t-suite-liste.deux { font-size: clamp(1rem, min(3.4vh, 1.75vw), 2.6rem); }
.t-suite-ligne {
  display: grid; grid-template-columns: auto minmax(0, 1.7fr) minmax(0, 1fr) auto; gap: 1.4vw; align-items: center;
  padding: 1vh 1.3vw; border-radius: 14px; background: var(--t-surface); min-width: 0;
}
.t-suite-heure { font-family: var(--police-titre); font-weight: 800; font-size: 1.2em; line-height: 1; color: #ffffff; font-variant-numeric: tabular-nums; }
.t-suite-nom { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-suite-tireur { color: var(--t-doux); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-suite-charge { display: inline-flex; align-items: center; white-space: nowrap; font-size: .85em; }
.t-suite-charge .verre { color: #ffffff; --poudre: #cfcab7; --fond-verre: #1c1c1c; width: .9em; height: 1.15em; }
.t-suite-plus, .t-suite-vide { padding: 1vh 1.3vw; color: var(--t-doux); font-weight: 600; }

/* Changement de vue (liste → cible → résultat → liste) : une entrée douce. Seulement transform et opacity,
   jamais sur les gros boutons (ils répondent tout de suite), jamais sur l'horloge. */
@keyframes t-vue-entre { from { opacity: 0; transform: translateY(3vh) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes t-cible-entre { from { opacity: 0; transform: scale(.5) rotate(-30deg); } to { opacity: 1; transform: none; } }
@keyframes t-ligne-entre { from { opacity: 0; transform: translateX(-2vw); } to { opacity: 1; transform: none; } }
.t-scene.vue-change > :not(.t-gros):not(.t-coin-oppose) { animation: t-vue-entre 520ms var(--sortie) both; }
.t-scene.vue-change > :nth-child(2):not(.t-gros) { animation-delay: 80ms; }
.t-scene.vue-change > :nth-child(3):not(.t-gros) { animation-delay: 160ms; }
.t-scene.vue-change .t-cible { animation: t-cible-entre 720ms var(--sortie) both; }
.t-scene.vue-change .t-suite-ligne { animation: t-ligne-entre 420ms var(--sortie) both; animation-delay: calc(var(--i, 0) * 45ms + 160ms); }

/* ==========================================================================
   « QUEL ÉCRAN EST-CE ? » — choix du mode avec de grosses cartes (D60)
   En CLAIR (D63) : le fond noir est réservé aux écrans d'affichage ; ici, on choisit seulement.
   ========================================================================== */
body.tente.choisir-mode { overflow: auto; background: var(--fond); color: var(--texte); -webkit-user-select: auto; user-select: auto; }
.t-choisir {
  --t-jaune: #FBE122; --t-doux: var(--texte-doux); --t-surface: var(--surface); --t-surface-2: var(--surface-2); --t-bordure: var(--bordure);
  position: relative; min-height: 100dvh; padding: max(32px, 5vh) max(20px, 4vw) max(24px, 4vh); background: var(--fond); color: var(--texte);
  display: flex; flex-direction: column; gap: clamp(20px, 4vh, 48px); justify-content: center;
}
.t-choisir-bande { position: absolute; top: 0; left: 0; right: 0; }
.t-choisir-tete { display: flex; align-items: center; gap: 20px; }
.t-choisir-tete .t-embleme { border: 2px solid var(--bordure); }
.t-choisir-tete h1 { margin: 0 0 6px; color: var(--texte); font-size: clamp(2rem, 6vh, 4rem); }
.t-choisir-tete p { margin: 0; color: var(--t-doux); font-size: clamp(1.05rem, 2.8vh, 1.6rem); max-width: 46em; }
.t-choisir-cartes { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 900px) { .t-choisir-cartes { grid-template-columns: repeat(3, 1fr); gap: 2vw; } }
.t-carte-mode {
  position: relative; min-height: 150px; padding: clamp(18px, 3vh, 36px) clamp(18px, 2vw, 32px);
  display: flex; flex-direction: column; align-items: flex-start; gap: 12px; text-align: left;
  border: 3px solid var(--t-bordure); border-radius: 24px; background: var(--t-surface); color: var(--texte); cursor: pointer; font: inherit;
  box-shadow: var(--ombre);
  transition: transform 140ms var(--sortie), opacity 140ms var(--sortie);
}
.t-carte-mode:hover { transform: translateY(-4px); }
.t-carte-mode:active { transform: scale(.98); }
.t-carte-mode:focus-visible { outline: 4px solid var(--focus); outline-offset: 4px; }
.t-carte-mode.est-conseille { border-color: var(--noir); }
.t-carte-icone { width: clamp(72px, 12vh, 132px); color: var(--noir); }
.t-carte-icone svg .plein { color: var(--vert-fonce); }
.t-carte-icone svg { width: 100%; height: auto; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.t-carte-icone svg .plein { fill: currentColor; stroke: none; }
.t-carte-titre { font-family: var(--police-titre); font-weight: 800; text-transform: uppercase; line-height: 1.02; color: var(--texte); font-size: clamp(1.6rem, 4.4vh, 2.8rem); }
.t-carte-texte { color: var(--t-doux); font-size: clamp(1.05rem, 2.6vh, 1.5rem); line-height: 1.35; }
.t-carte-badge {
  margin-top: auto; padding: 4px 14px; border-radius: 999px; background: var(--t-jaune); color: #111111;
  font-family: var(--police-titre); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 1rem;
}
.t-choisir-pied { margin: 0; }
@media (max-width: 899px) {
  .t-choisir { justify-content: flex-start; }
  .t-choisir-tete { gap: 14px; align-items: flex-start; }
  .t-choisir-tete .t-embleme { width: 52px; height: 52px; }
  .t-choisir-tete h1 { font-size: 1.9rem; }
  .t-choisir-tete p { font-size: 1.05rem; }
  .t-carte-mode { flex-direction: row; flex-wrap: wrap; align-items: center; column-gap: 16px; row-gap: 6px; min-height: 0; }
  .t-carte-icone { width: 64px; flex: none; }
  .t-carte-titre { flex: 1 1 0; min-width: 0; }
  .t-carte-texte, .t-carte-badge { flex: 1 1 100%; }
  .t-carte-badge { flex: none; margin-top: 4px; }
}

/* ---------- « Autres écrans d'affichage » (lot 7) : 2ᵉ groupe, sous les trois cartes des modes ---------- */
.t-autres[hidden] { display: none; }
.t-autres h2 { margin: 0 0 4px; color: var(--texte); font-size: clamp(1.5rem, 3.6vh, 2.2rem); text-transform: uppercase; }
.t-autres-intro { margin: 0 0 14px; color: var(--t-doux); font-size: clamp(1rem, 2.2vh, 1.25rem); max-width: 60em; }
.t-autres-cartes { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
@media (min-width: 700px) { .t-autres-cartes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .t-autres-cartes { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 1.2vw; } }
.t-carte-ecran {
  position: relative; min-height: 72px; padding: 14px 16px; display: grid; grid-template-columns: 44px minmax(0, 1fr); align-content: start;
  column-gap: 14px; row-gap: 2px; text-decoration: none; text-align: left;
  border: 2px solid var(--t-bordure); border-radius: 16px; background: var(--t-surface); color: var(--texte);
  transition: transform 140ms var(--sortie);
}
.t-carte-ecran:hover { transform: translateY(-2px); border-color: var(--noir); }
.t-carte-ecran:active { transform: scale(.985); }
.t-carte-ecran:focus-visible { outline: 4px solid var(--focus); outline-offset: 3px; }
.t-carte-ecran.est-choisi { border-color: var(--noir); border-width: 3px; }
.t-carte-ecran-icone { grid-row: 1 / span 2; width: 44px; color: var(--noir); }
.t-carte-ecran-icone svg { width: 100%; height: auto; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.t-carte-ecran-icone svg .plein { fill: var(--vert-fonce); stroke: none; }
.t-carte-ecran-titre { font-family: var(--police-titre); font-weight: 800; text-transform: uppercase; line-height: 1.05; font-size: 1.4rem; }
.t-carte-ecran-texte { grid-column: 2; color: var(--t-doux); font-size: 1rem; line-height: 1.3; }
.t-carte-ecran-badge {
  grid-column: 2; justify-self: start; margin-top: 6px; padding: 2px 12px; border-radius: 999px; background: var(--t-jaune); color: #111111;
  font-family: var(--police-titre); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: .92rem;
}

/* ==========================================================================
   ÉCRAN DE MARQUAGE (mode « téléphone ») — FOND CLAIR, comme le reste du site (D61)
   Le fond noir est réservé aux écrans d'AFFICHAGE : « Ordinateur de la tente » et « Affichage seul ».
   Sur téléphone : une carte « Prochain départ », le bouton principal, les autres actions, puis les listes ;
   les deux gros boutons restent fixés en bas, sous le pouce.
   Sur un grand écran (900 px et plus) : une vraie page d'ordinateur, au milieu — le départ et les gros
   boutons à gauche, les actions (décaler, annulé / reporté, note, cause) et les listes à côté.
   ========================================================================== */
.t-retour-accueil, .t-actions-large { display: none; }
.mode-telephone .t-retour-accueil { display: inline-flex; }
.mode-telephone .t-retour-accueil[hidden] { display: none; }

body.tente.mode-telephone { background: var(--fond); color: var(--texte); }
.mode-telephone .t-ecran {
  --t-gris: #d9d5c8; --t-doux: var(--texte-doux); --t-surface: var(--blanc); --t-surface-2: var(--surface-2); --t-bordure: #c9c5b6;
  background: var(--fond);
}
.mode-telephone .t-bandeau { background: var(--blanc); }
.mode-telephone .t-embleme { border: 1px solid var(--bordure); }
.mode-telephone .t-horloge, .mode-telephone .t-titre, .mode-telephone .t-compte, .mode-telephone .t-tire-heure { color: var(--noir); }
.mode-telephone .t-reseau[data-niveau="direct"] { color: #2F7A1F; }
.mode-telephone .t-reseau[data-niveau="attente"] { color: #7a5c00; }
.mode-telephone .t-heure-source.alerte, .mode-telephone .t-retard { color: #8a4b00; }
.mode-telephone .t-envoi.fait { color: #2F7A1F; }
/* Boutons : ceux du site (blanc bordé de noir ; le bouton principal noir et jaune). */
.mode-telephone .t-btn { background: var(--blanc); color: var(--noir); border-color: var(--noir); }
.mode-telephone .t-btn-principal { background: var(--noir); color: var(--jaune); border-color: var(--noir); }
.mode-telephone .t-btn-jaune { background: var(--jaune); color: var(--noir); border-color: var(--noir); }
.mode-telephone .t-btn-rouge { background: var(--t-rouge); color: #ffffff; border-color: var(--t-rouge); }
.mode-telephone .t-btn-vert { background: var(--t-vert); color: #ffffff; border-color: var(--t-vert); }
.mode-telephone .t-btn-actif { background: #fff6c2; border-color: var(--noir); box-shadow: inset 0 0 0 2px var(--noir); }
.mode-telephone .t-btn:focus-visible, .mode-telephone .t-gros-btn:focus-visible, .mode-telephone .t-ligne:focus-visible, .mode-telephone .t-cause:focus-visible { outline-color: var(--focus, var(--noir)); }
.mode-telephone .t-btn-decaler { background: var(--blanc); border-color: var(--noir); }
.mode-telephone .t-btn-decaler small { color: var(--texte-doux); }
.mode-telephone .t-bascule.t-btn-actif .t-case { background: var(--noir); border-color: var(--noir); color: var(--jaune); }
/* Cible : anneau noir sur fond clair (le jaune ne se verrait pas). */
.mode-telephone .t-cible-fond { stroke: #e3dfd2; }
.mode-telephone .t-cible-cercle { stroke: #d2cdbd; }
.mode-telephone .t-cible-anneau { stroke: var(--noir); }
.mode-telephone .t-cible.urgent .t-cible-anneau { stroke: var(--t-rouge); }
/* Charge, verres. */
.mode-telephone .t-charge { background: var(--surface-2); }
.mode-telephone .t-charge .verre, .mode-telephone .t-charge-ligne .verre, .mode-telephone .t-ligne-droite .verre { color: var(--noir); --poudre: #b9b29a; --fond-verre: var(--blanc); }
.mode-telephone .t-charge-pastille { border-color: var(--noir); }
.mode-telephone .t-charge-vide { color: #55524a; border-color: #a39f90; background: repeating-linear-gradient(135deg, #f3f0e7 0 8px, #e8e4d8 8px 16px); }
/* Messages, bandeaux. */
.mode-telephone .t-message-jaune { background: #fff6c2; color: var(--noir); border-color: #d9b800; }
.mode-telephone .t-avis-jaune { background: #fff6c2; border-color: #d9b800; }
.mode-telephone .t-avis-rouge { background: #fde5e1; border-color: var(--t-rouge); }
.mode-telephone .t-liste-jour { color: var(--texte-doux); }
.mode-telephone .t-ligne { border-color: var(--bordure); }
.mode-telephone .t-ligne.est-courant { border-color: var(--noir); }
.mode-telephone .t-ligne.en-attente .t-ligne-detail::after { color: #7a5c00; font-weight: 700; } /* « · envoi… » lisible sur fond clair */
.mode-telephone .t-colonne-bas { background: var(--fond); }
.mode-telephone .t-decaler-heure input, .mode-telephone .t-fiche textarea, .mode-telephone .t-code-tente input { background: var(--blanc); color: var(--noir); }
/* Causes du coup pas parti : rouge clair. */
.mode-telephone.vue-causes .t-scene { background: #fdeeeb; }
.mode-telephone .t-cause { background: var(--blanc); color: #8c2318; border-color: var(--t-rouge); }
/* Bloc fixé en bas (gros boutons). */
.mode-telephone .t-gros { background: var(--blanc); border-top-color: var(--bordure); box-shadow: 0 -6px 18px rgba(17, 17, 17, .08); }

/* ---------- Téléphone : mieux rangé ---------- */
.mode-telephone .t-horloge, .mode-telephone.vue-depart .t-horloge, .mode-telephone.vue-a-retirer .t-horloge { font-size: clamp(40px, 12.5vw, 60px); }
.mode-telephone .t-scene { min-height: 0; }
.t-carte-depart {
  display: flex; flex-direction: column; gap: 12px; padding: 14px;
  background: var(--blanc); border: 1px solid var(--bordure); border-radius: 22px; box-shadow: var(--ombre);
}
.t-carte-etiquette {
  margin: 0; font-family: var(--police-titre); font-weight: 800; text-transform: uppercase; letter-spacing: .06em;
  font-size: 1rem; color: #2F7A1F;
}
.mode-telephone .t-cible:not(.t-cible-petite) { width: min(34vw, 150px); }
.mode-telephone .t-cible:not(.t-cible-petite) .t-compte { font-size: min(10vw, 46px); }
.mode-telephone .t-depart-infos { align-items: center; }
/* En-tête du téléphone : 1re ligne l'événement et les boutons, 2e ligne l'heure et l'état du réseau. */
.mode-telephone .t-bandeau { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "evenement outils" "horloge reseau"; align-items: center; }
.mode-telephone .t-etat { display: contents; }
.mode-telephone .t-outils { grid-area: outils; flex-wrap: nowrap; }
.mode-telephone .t-reseau { grid-area: reseau; justify-self: end; }
.mode-telephone .t-horloge { text-align: left; }
.mode-telephone .t-heure-source.alerte { grid-column: 1 / -1; }
.mode-telephone .t-retour-accueil { padding: 0 10px; }
.mode-telephone .t-attente-bas { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 14px; margin-top: 0; }
.mode-telephone .t-attente-bas .t-btn-principal { order: 0; flex: none; min-height: 68px; font-size: 1.5rem; }
.t-autres { display: flex; flex-direction: column; gap: 8px; }
.t-autres-titre {
  margin: 0; font-family: var(--police-titre); font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  font-size: 1rem; color: var(--t-doux);
}
.t-autres-boutons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mode-telephone .t-autres-boutons .t-btn { flex: none; min-height: 56px; white-space: normal; line-height: 1.1; padding: 6px 10px; }
.t-autres-boutons .t-btn:last-child:nth-child(odd) { grid-column: 1 / -1; }
.t-actions-boutons { display: flex; flex-direction: column; gap: 8px; }

/* ---------- Grand écran : une vraie page d'ordinateur ----------
   (assez LARGE et assez HAUT : un téléphone couché fait plus de 900 px de large mais garde la mise en page
   du téléphone, avec ses gros boutons collés en bas) */
@media (min-width: 900px) and (min-height: 620px) {
  .mode-telephone .t-ecran { max-width: 1240px; margin: 0 auto; padding: 0 28px 40px; }
  .mode-telephone .t-bandeau {
    position: static; grid-template-columns: minmax(0, 1fr) auto auto auto; grid-template-areas: "evenement horloge reseau outils";
    padding: 14px 20px; margin: 0 -28px; gap: 20px;
  }
  .mode-telephone .t-horloge { text-align: center; }
  .mode-telephone .t-retour-accueil { padding: 0 18px; }
  .mode-telephone .t-embleme { width: 48px; height: 48px; }
  .mode-telephone .t-evenement-nom { font-size: 1.4rem; }
  .mode-telephone .t-horloge, .mode-telephone.vue-depart .t-horloge, .mode-telephone.vue-a-retirer .t-horloge { font-size: 64px; }
  .mode-telephone .t-reseau { font-size: 1rem; padding: 4px 14px; }
  .mode-telephone .t-bandeaux { padding: 16px 0 0; }
  .mode-telephone .t-corps, .mode-telephone.scene-large:not(.colonne-ouverte) .t-corps {
    display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr); gap: 24px; align-items: start; padding-top: 24px;
  }
  /* À gauche : le départ et les gros boutons, dans une grande carte. */
  .mode-telephone .t-scene {
    padding: 28px; gap: 20px; background: var(--blanc); border: 1px solid var(--bordure); border-radius: 26px; box-shadow: var(--ombre);
  }
  .mode-telephone.vue-causes .t-scene { background: #fdeeeb; }
  .mode-telephone .t-carte-depart { padding: 0; border: 0; box-shadow: none; background: none; gap: 18px; }
  .mode-telephone .t-carte-etiquette, .mode-telephone .t-autres-titre { font-size: 1.1rem; }
  .mode-telephone .t-attente-haut { gap: 28px; }
  .mode-telephone .t-cible:not(.t-cible-petite) { width: 210px; }
  .mode-telephone .t-cible:not(.t-cible-petite) .t-compte { font-size: 62px; }
  .mode-telephone .t-cible-petite { width: 130px; }
  .mode-telephone .t-cible-petite .t-compte { font-size: 38px; }
  .mode-telephone .t-tir-nom, .mode-telephone .t-depart-infos .t-tir-nom { font-size: 3rem; }
  .mode-telephone .t-sous-titre, .mode-telephone .t-tireur { font-size: 1.5rem; }
  .mode-telephone .t-titre, .mode-telephone .t-depart-tete .t-titre { font-size: 3rem; }
  .mode-telephone .t-depart-infos { font-size: 1.4rem; }
  .mode-telephone .t-charge { padding: 18px 22px; gap: 22px; }
  .mode-telephone .t-attente-bas .t-btn-principal { min-height: 84px; font-size: 1.9rem; }
  /* Les deux gros boutons : dans la carte, côte à côte (plus de bloc fixé en bas). */
  .mode-telephone .t-gros { position: static; padding: 0; background: none; border: 0; box-shadow: none; gap: 12px; }
  .mode-telephone .t-gros-nom { font-size: 1.6rem; }
  .mode-telephone .t-gros-boutons { grid-template-columns: 1fr 1fr; gap: 20px; }
  .mode-telephone .t-gros-btn { height: 170px; font-size: 2.3rem; }
  .mode-telephone .t-coche { width: 170px; height: 170px; }
  .mode-telephone .t-tire .t-titre { font-size: 4rem; }
  .mode-telephone .t-causes { grid-template-columns: repeat(3, 1fr); }
  /* À côté : les actions du départ, puis les listes. Les mêmes boutons de la scène (téléphone) sont cachés ici. */
  .mode-telephone .t-actions-large { display: block; }
  .mode-telephone [data-scene] [data-action="ouvrir-decaler"],
  .mode-telephone [data-scene] [data-action="confirmer"],
  .mode-telephone [data-scene] .t-autres,
  .mode-telephone [data-scene] .t-attente-bas .t-confirmer,
  .mode-telephone [data-scene] .t-dessus .t-haut .t-confirmer { display: none; }
  /* (vue DÉPART seulement : ailleurs — tir « à retirer » — la rangée du haut porte des boutons qui n'existent pas à côté) */
  .mode-telephone.vue-depart [data-scene] .t-dessus .t-haut:not(:has([data-action="retour"]:not([hidden]))) { display: none; }
  .mode-telephone .t-colonne {
    padding: 22px; border: 1px solid var(--bordure); border-radius: 26px; background: var(--blanc); box-shadow: var(--ombre);
    gap: 16px; max-height: none;
  }
  .mode-telephone .t-colonne .t-ligne { background: var(--surface-2); border-color: transparent; }
  .mode-telephone .t-colonne .t-ligne.est-courant { border-color: var(--noir); }
  .mode-telephone .t-colonne-bas { background: none; padding: 0; }
  .mode-telephone .t-actions-large .t-btn { min-height: 60px; justify-content: flex-start; padding: 0 18px; }
  .mode-telephone .t-decaler-boutons { grid-template-columns: repeat(4, 1fr); }
  .mode-telephone .t-btn-decaler { min-height: 96px; }
}
/* Téléphone couché : l'en-tête tient sur une seule ligne (la place en hauteur est rare). */
@media (orientation: landscape) and (max-height: 500px) {
  .mode-telephone .t-bandeau { grid-template-columns: minmax(0, 1fr) auto auto auto; grid-template-areas: "evenement horloge reseau outils"; }
  .mode-telephone .t-horloge, .mode-telephone.vue-depart .t-horloge, .mode-telephone.vue-a-retirer .t-horloge { font-size: 40px; }
}


/* ---------- (lot 8b) Écran de marquage : la ligne « heure non vérifiée » a sa place RÉSERVÉE ----------
   Avant, cette ligne ajoutait une rangée au bandeau du haut (22 px) : tout ce qui est dessous se décalait
   quand elle apparaissait ou disparaissait. Maintenant elle a toujours sa place, sous l'état du réseau et
   à côté de l'heure : qu'elle soit écrite ou non, le bandeau garde la même hauteur et RIEN ne bouge
   (règle « sous le doigt »). Mesuré par `node scripts/essais/finitions.js`. */
.mode-telephone .t-bandeau { grid-template-areas: "evenement outils" "horloge reseau" "horloge source"; }
.mode-telephone .t-reseau { align-self: end; }
.mode-telephone .t-heure-source, .mode-telephone .t-heure-source.alerte {
  display: block; grid-area: source; justify-self: end; align-self: start; visibility: hidden;
  font-size: .8rem; line-height: 1.2; min-height: 1.2em; white-space: nowrap;
  /* Largeur fixe (le texte le plus long : « heure du serveur (± 12 s) ») : la colonne ne change pas de
     largeur avec le texte, l'heure ne glisse pas de côté. */
  min-width: 13em; text-align: right;
}
.mode-telephone .t-heure-source.alerte { visibility: visible; }
@media (min-width: 900px) and (min-height: 620px) {
  .mode-telephone .t-bandeau { grid-template-areas: "evenement horloge reseau outils" "evenement horloge source outils"; row-gap: 4px; }
}
@media (orientation: landscape) and (max-height: 500px) {
  .mode-telephone .t-bandeau { grid-template-areas: "evenement horloge reseau outils" "evenement horloge source outils"; }
}

/* ---------- (revue) Téléphone : la fiche d'un tir est ouverte ---------- */
/* Le bloc fixé en bas (messages + deux gros boutons l'un sur l'autre) cachait presque toute la fiche : cause,
   « On a finalement retiré », commentaire, photo. Tant que la fiche est ouverte, les deux gros boutons restent
   là, côte à côte et plus bas (64 px), avec le nom du départ qu'ils marquent ; les messages reviennent quand on
   ferme la fiche. (Pas dans la grande mise en page : les gros boutons y sont dans la carte, pas fixés en bas.) */
@media (max-width: 899px), (max-height: 619px) {
  .mode-telephone.fiche-ouverte .t-gros { gap: 4px; padding-top: 4px; }
  .mode-telephone.fiche-ouverte .t-gros .t-messages { display: none; }
  .mode-telephone.fiche-ouverte .t-gros-nom { font-size: 1.05rem; }
  .mode-telephone.fiche-ouverte .t-gros-boutons { grid-template-columns: 1fr 1fr; gap: 10px; }
  .mode-telephone.fiche-ouverte .t-gros-btn { height: 64px; font-size: clamp(1.05rem, 5.4vw, 1.6rem); padding: 0 6px; border-radius: 16px; }
}

/* (lot 9a) Rien ne saute à l'ouverture : tant que la scène n'est pas dessinée (premier chargement), la
   colonne d'à côté / d'en dessous reste invisible à sa place — elle n'est pas poussée sous les yeux. */
.t-scene:empty ~ .t-colonne { visibility: hidden; }
/* (lot 9a) Écran de marquage du téléphone :
   - la scène occupe au moins tout l'écran : la suite du programme (en dessous) n'est jamais poussée sous
     les yeux quand l'écran change après un appui (COUP TIRÉ, coup pas parti…) ;
   - quand la vue change, le contenu apparaît en FONDU (ni glissement, ni agrandissement, ni rotation). */
.mode-telephone .t-scene { min-height: 100dvh; }
.mode-telephone .t-scene.vue-change > :not(.t-gros):not(.t-coin-oppose),
.mode-telephone .t-scene.vue-change .t-cible,
.mode-telephone .t-scene.vue-change .t-suite-ligne { animation-name: apparait; animation-duration: var(--fondu); animation-timing-function: var(--courbe); }
/* (lot 9a) Ordinateur et télé : « heure non vérifiée » puis « heure du serveur » tiennent toujours sur UNE
   ligne : le bandeau de l'heure garde sa hauteur au démarrage (l'heure ne saute pas). */
.tente:not(.mode-telephone) .t-heure-source { white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
/* (lot 9a) Téléphone : « Accueil / Mode » restent collés à droite, à leur taille : quand l'état du réseau
   s'allonge (« Envoi… · 1 action en attente », « Hors réseau »), les boutons du haut ne bougent pas. */
.mode-telephone .t-outils { justify-self: end; }
.mode-telephone .t-reseau { white-space: nowrap; }
/* (lot 9a) « Annuler / corriger » attend que la suite du programme soit là (sinon il apparaît en haut de la
   colonne puis descend quand la liste arrive). Il ne sert à rien tant que la colonne est vide. */
.t-panneau:empty ~ .t-colonne-bas { visibility: hidden; }
