/* ------------------------------------------------------------------
 * CE QUE L HOTE DESSINAIT LUI-MEME.
 *
 * `style.css` est celui de Stepan, intact : il habille la liste des
 * cours, c'est-a-dire la page web de son logiciel. Ce fichier-ci
 * habille ce qui, chez lui, n'etait PAS une page web -- la fenetre de
 * seance et les boites de dialogue -- et rien d'autre. Les deux ne se
 * croisent pas : toutes les classes d'ici commencent par `tx-`.
 *
 * LES COULEURS SONT CELLES DU BINAIRE, pas des approximations :
 *   rgb(15, 23, 42)   le voile de pause      (TColor 0x2a170f)
 *   rgb(6, 182, 212)  son accent             (TColor 0xd4b606)
 *   rgb(35, 45, 60)   le chronometre sur noir (TColor 0x3c2d23)
 * ------------------------------------------------------------------ */

/* ------------------------------------------------------------------
 * LA SEANCE.
 *
 * ELLE COUVRE TOUT, ET RIEN NE DOIT PASSER AU-DESSUS. La couleur EST
 * le traitement : un bandeau, une barre de defilement ou un reste
 * d'interface qui depasse change ce que l'oeil recoit.
 * ------------------------------------------------------------------ */
.tx-seance {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: #000;
  cursor: none;
}

.tx-seance-toile {
  display: block;
  width: 100%;
  height: 100%;
}

/* LE DEFILEMENT DE LA PAGE EST COUPE PENDANT LA SEANCE : sans cela,
   une molette ou une barre d'espace decalerait le fond sous la toile. */
body.tx-en-seance {
  overflow: hidden;
}

/* ------------------------------------------------------------------
 * LA PAUSE.
 *
 * Le fond reste la couleur, FIXE -- le clignotement s'arrete, c'est ce
 * que fait l'hote (0x00656d3c : en pause, la branche couleur est prise
 * quel que soit l'etat du clignotement). Le voile ne couvre donc que le
 * centre, pour que la couleur reste visible autour.
 * ------------------------------------------------------------------ */
.tx-seance-pause {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  cursor: default;
}

.tx-seance-pause[hidden] { display: none; }

.tx-pause-boite {
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(6, 182, 212, 0.35);
  border-radius: 14px;
  padding: 28px 44px;
  text-align: center;
  color: #e2e8f0;
  font-family: "Segoe UI", Tahoma, system-ui, sans-serif;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

.tx-pause-titre {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: rgb(6, 182, 212);
  margin-bottom: 10px;
}

.tx-pause-texte {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 14px;
}

.tx-pause-reprendre {
  font-size: 13px;
  color: #94a3b8;
}

.tx-pause-sortir {
  font-size: 12px;
  color: #64748b;
  margin-top: 6px;
}

/* ------------------------------------------------------------------
 * LES BOITES DE DIALOGUE.
 *
 * Elles passent AU-DESSUS de la seance (z-index superieur), parce que
 * la question « interrompre la seance ? » se pose pendant qu'elle
 * tourne.
 * ------------------------------------------------------------------ */
.tx-modale {
  position: fixed;
  inset: 0;
  z-index: 9500;
  display: grid;
  place-items: center;
  background: rgba(2, 6, 23, 0.62);
  backdrop-filter: blur(3px);
  padding: 16px;
}

.tx-modale-boite {
  width: min(520px, 100%);
  background: #0f172a;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  padding: 24px 26px 20px;
  color: #e2e8f0;
  font-family: "Segoe UI", Tahoma, system-ui, sans-serif;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}

.tx-modale-titre {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgb(6, 182, 212);
  margin-bottom: 12px;
}

.tx-modale-texte {
  font-size: 15px;
  line-height: 1.55;
  color: #cbd5e1;
}

.tx-modale-texte p { margin: 0 0 8px; }
.tx-modale-texte p:last-child { margin-bottom: 0; }

.tx-avert-suite {
  margin-top: 14px !important;
  color: #94a3b8;
  font-size: 13px;
}

/* L AVERTISSEMENT PORTE SA MISE EN GARDE, et elle doit se voir : c'est
   le seul ecran ou le logiciel dit « n'utilisez jamais les cours d'une
   autre personne ». */
.tx-modale--avertissement .tx-modale-texte p:first-child {
  font-size: 16px;
  font-weight: 600;
  color: #fbbf24;
}

.tx-modale-gestes {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

.tx-bouton {
  min-width: 108px;
  padding: 9px 18px;
  border-radius: 10px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease;
}

.tx-bouton--discret {
  background: rgba(148, 163, 184, 0.10);
  border-color: rgba(148, 163, 184, 0.22);
  color: #cbd5e1;
}

.tx-bouton--discret:hover {
  background: rgba(148, 163, 184, 0.18);
}

.tx-bouton--vif {
  background: rgb(6, 182, 212);
  color: #04222a;
}

.tx-bouton--vif:hover {
  background: rgb(34, 197, 225);
}

.tx-bouton:focus-visible {
  outline: 2px solid rgb(125, 211, 252);
  outline-offset: 2px;
}

@media (max-width: 520px) {
  .tx-modale-gestes { flex-direction: column-reverse; }
  .tx-bouton { width: 100%; }
}

/* ==================================================================
 * LES ECRANS DE L ADMIN, REPRIS DU `dat4-player`.
 *
 * L'Admin, le 23/10/2026 : « Les modifications qu'on a faites a /courses,
 * je les veux aussi sur /treatex (interface de controle, une seule page
 * et mon compte a rebours) ».
 *
 * LES VALEURS SONT RELEVEES DANS SA FEUILLE, pas approchees : chaque
 * taille, chaque interlettre et chaque opacite vient de
 * `public/css/lk.css`, ou elles avaient deja ete portees depuis
 * `public/dat4-player/css/app.css`. Une reprise « presque pareille » est
 * le pire des deux : on perd l'original sans gagner de coherence.
 *
 * ELLES NE DEPENDENT D AUCUNE VARIABLE DE THEME. La seance se joue sur
 * fond noir, en plein ecran, hors de toute page : il n'y a ni theme clair
 * ni theme sombre a suivre, et une `var(--...)` non definie ici rendrait
 * un texte invisible sans que rien ne le dise.
 * ================================================================== */

/* ------------------------------------------------------------------
 * LE COMPTE A REBOURS : chapeau, nom de l'element, phrase, chiffre.
 * ------------------------------------------------------------------ */
.tx-prepare {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: #000;
  color: #fff;
  font-family: "Segoe UI", Tahoma, system-ui, sans-serif;
  z-index: 2;
}

/* ON NE LE CACHE PAS, ON LE RETIRE : un ecran noir laisse en place
   par-dessus la toile mangerait la couleur, qui EST le traitement. */
.tx-prepare-fini { display: none; }

.tx-prepare-boite {
  max-width: min(680px, 92vw);
  text-align: center;
  padding: 0 24px;
}

.tx-prepare-chapeau {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.38);
  margin-bottom: 18px;
}

.tx-prepare-nom {
  font-size: clamp(30px, 7vw, 64px);
  font-weight: 760;
  line-height: 1.08;
  letter-spacing: -0.045em;
  margin-bottom: 16px;
}

.tx-prepare-phrase {
  font-size: clamp(14px, 2.5vw, 18px);
  color: rgba(255, 255, 255, 0.58);
  line-height: 1.6;
}

.tx-prepare-compte {
  font-size: clamp(48px, 13vw, 112px);
  font-weight: 300;
  line-height: 1;
  margin-top: 20px;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.92);
}

/* ------------------------------------------------------------------
 * LA BARRE DE COMMANDE.
 *
 * UNE SEULE PASTILLE, ET ELLE S EFFACE. La frise, le temps et les
 * commandes vivaient a trois coins de l'ecran : trois reperes poses en
 * permanence sur les bords tirent l'oeil chacun de son cote, pendant les
 * vingt minutes que dure la phase la plus longue.
 * ------------------------------------------------------------------ */
.tx-barre {
  position: absolute;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);

  /* LARGEUR FIXE, ET C EST LE POINT.
     L'Admin, le 23/10/2026, deux fois : « plus petit pour la palette de
     controle, pas besoin que ce soit aussi long », puis, ayant vu une barre
     calee sur son contenu, « Pas autant variable en taille, tu peux laisser
     720 px ».

     CE QU UNE LARGEUR AU CONTENU FAIT VRAIMENT : elle respire a chaque
     changement de libelle -- le passage de « Phase 1 sur 3 » a « Phase 2
     sur 3 », un nom d'organe plus long a l'element suivant -- et la barre
     saute sous l'oeil pendant qu'on regarde la couleur. Un repere qui bouge
     tout seul attire plus l'attention qu'un repere trop large. */
  width: min(720px, calc(100vw - 32px));
  box-sizing: border-box;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  cursor: default;

  /* LA FRISE EST DEDANS, PAS AU BORD. L'Admin, le 23/10/2026 : « je veux ma
     bande interne pour les phases, pas la bordure ». Elle etait collee au
     bord haut, sur toute la largeur, et se lisait comme un filet de cadre.
     Le rembourrage et l'ecart sont ceux de sa barre (`lk.css`). */
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 16px;
  z-index: 3;
  opacity: 1;
  transition: opacity 0.35s ease, transform 0.35s ease;
  font-family: "Segoe UI", Tahoma, system-ui, sans-serif;
}

/* ELLE NE SE RETIRE PAS DU FLUX : `display:none` ferait sauter la mise en
   page au retour, et `visibility` couperait la transition. */
.tx-barre-cachee {
  opacity: 0;
  transform: translateX(-50%) translateY(14px);
  pointer-events: none;
}

/* LA FRISE MONTRE LES TROIS PHASES A LEUR PART, jamais des tiers : sur les
   elements reels elles vont de 11 a 67 % de la seance. */
.tx-barre-frise {
  display: flex;
  gap: 3px;
  height: 5px;
  min-width: 220px;
}

/* UNE PISTE GRISE PAR PHASE, que sa couleur remplit. `flex` est pose en ligne
   depuis la duree, avec une base de zero : seule la part compte. */
.tx-frise-seg {
  flex: 0 1 0%;
  position: relative;
  border-radius: 3px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.16);
}

.tx-frise-plein {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: 3px;
}

.tx-barre-ligne {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* LE BLOC DE GAUCHE REPREND LA PLACE LIBRE, puisque la largeur est fixe :
   les commandes restent a droite, le nom a gauche, et rien ne se deplace
   quand un libelle change de longueur. */
.tx-barre-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.tx-barre-phase {
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
}

.tx-barre-nom {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tx-barre-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* L ARRET EN TOUTES LETTRES, pas en pictogramme : c'est le seul geste
   qu'on veut pouvoir faire sans reflechir pendant une seance. */
.tx-barre-pause {
  flex-shrink: 0;
  min-width: 92px;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.88);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  transition: background 0.15s, color 0.15s;
}

.tx-barre-pause:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.tx-barre-pause-active {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

/* LE TEMPS ECOULE EN GRAND, LE RESTANT DESSOUS. Deux lignes qui ne disent
   pas la meme chose : l'une avance, l'autre decompte. */
.tx-barre-minuterie {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex-shrink: 0;
}

.tx-barre-temps {
  font-family: "SF Mono", "Fira Mono", ui-monospace, monospace;
  font-size: 24px;
  font-weight: 600;
  line-height: 1;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.tx-barre-restant {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.28);
  margin-top: 3px;
  text-align: right;
}

/* LA SORTIE EST LA SEULE CHOSE ROUGE DE L ECRAN, et c'est voulu : elle met
   fin a la seance. Rien d'autre ne doit lui ressembler. */
.tx-barre-sortie {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  background: rgba(255, 79, 106, 0.14);
  border: 1px solid rgba(255, 79, 106, 0.32);
  color: #ff4f6a;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.tx-barre-sortie:hover { background: rgba(255, 79, 106, 0.3); }

/* LA BARRE PASSE AU-DESSUS DU VOILE DE PAUSE, et c'est une correction.

   Mesure du 23/10/2026 sur la page reelle : seance en pause, clic sur la
   croix rouge, la seance REPREND au lieu de s'arreter. Le voile couvre
   `inset: 0` -- toute la surface -- et passait devant la barre. Rien ne se
   recouvrait a l'oeil, puisque le voile n'a de visible que sa boite
   centrale ; mais sa surface de CLIC descendait jusqu'en bas et recevait le
   geste a la place du bouton, d'ou le « clic pour reprendre » du produit.

   LES DEUX NE SE DISPUTENT RIEN : la boite du voile est au centre, la barre
   en bas. */
.tx-seance-pause { z-index: 4; }
.tx-barre { z-index: 5; }

@media (max-width: 560px) {
  .tx-barre { bottom: 14px; border-radius: 14px; padding: 10px 12px; gap: 8px; }
  .tx-barre-ligne { gap: 10px; }
  .tx-barre-frise { min-width: 0; }
  .tx-barre-pause { min-width: 76px; }
  .tx-barre-temps { font-size: 20px; }
}

/* ------------------------------------------------------------------
 * LE DEPOT DE FICHIERS.
 *
 * L'Admin, le 23/10/2026 : « Le drag & drop doit etre ajoute ».
 *
 * LE VOILE NE PREND PAS LES EVENEMENTS (`pointer-events: none`) : s'il
 * les prenait, le `dragleave` du document partirait des qu'il apparait
 * sous le curseur, et il clignoterait sans fin.
 * ------------------------------------------------------------------ */
.tx-depot {
  position: fixed;
  inset: 0;
  z-index: 8500;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(8, 12, 20, 0.86);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s ease, visibility 0.18s ease;
  pointer-events: none;
  font-family: "Segoe UI", Tahoma, system-ui, sans-serif;
}

.tx-depot-actif {
  opacity: 1;
  visibility: visible;
}

.tx-depot-cadre {
  width: min(560px, 100%);
  padding: 48px 32px;
  border: 2px dashed rgba(6, 182, 212, 0.65);
  border-radius: 20px;
  background: rgba(6, 182, 212, 0.06);
  text-align: center;
}

.tx-depot-texte {
  font-size: clamp(16px, 3vw, 22px);
  font-weight: 650;
  line-height: 1.4;
  color: #fff;
}
