/* PUJOLiTRANSPORT — tableaux de départs (style afficheur de gare)
   Scène fixe 1920×1080, mise à l'échelle sur tout écran (bandes noires si autre format). */

:root {
  --fond: #0b1d45;
  --fond-rangee: #0f2656;
  --fond-rangee-2: #0c2150;
  --entete: #07142f;
  --separateur: #1d3b78;
  --jaune: #ffd200;
  --blanc: #ffffff;
  --gris: #9fb0d4;
  --gris-fonce: #5d73a3;
  --orange: #ff9a1f;
  --rouge: #e5142a;
  --vert: #3ccf84;
  --bleu-info: #3d9bff;
  --police: "Avenir Next", "Avenir", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 100%; height: 100%;
  background: #000; color: var(--blanc);
  font-family: var(--police);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
body.curseur-cache, body.curseur-cache * { cursor: none !important; }

/* ── Scène ─────────────────────────────────────────────── */
#scene {
  position: absolute; left: 50%; top: 50%;
  width: 1920px; height: 1080px;
  transform-origin: center center;
  background: var(--fond);
  display: flex; flex-direction: column;
  overflow: hidden;
}

/* ── En-tête ───────────────────────────────────────────── */
.entete {
  height: 150px; flex: none;
  background: var(--entete);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 56px;
  border-bottom: 2px solid var(--separateur);
}
.entete-gauche { display: flex; align-items: center; gap: 34px; min-width: 0; }
.logo-gare {
  width: 92px; height: 92px; flex: none;
  border-radius: 18px; background: var(--blanc); color: var(--fond);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 30px; letter-spacing: -1px;
}
.logo-gare svg { width: 62px; height: 62px; }
.titres { min-width: 0; }
.nom-station { font-size: 62px; font-weight: 800; line-height: 1.05; letter-spacing: -0.5px; white-space: nowrap; }
.titre-page { font-size: 34px; font-weight: 600; color: var(--jaune); margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 1250px; }

.horloge { text-align: right; flex: none; }
.heure { font-size: 96px; font-weight: 800; color: var(--jaune); line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -2px; }
.heure .secondes { font-size: 48px; color: var(--gris); margin-left: 6px; letter-spacing: 0; }
.date { font-size: 27px; color: var(--gris); margin-top: 4px; text-transform: capitalize; }

.progression { height: 6px; flex: none; background: var(--entete); }
.progression > div { height: 100%; width: 0; background: var(--jaune); }

/* ── Contenu ───────────────────────────────────────────── */
.contenu { flex: 1; position: relative; overflow: hidden; display: flex; flex-direction: column; }

.bandeau-erreur {
  flex: none; background: var(--rouge); color: var(--blanc);
  font-size: 28px; font-weight: 700; padding: 14px 56px;
  display: none;
}
.bandeau-erreur.visible { display: block; }

.tableau { flex: 1; display: flex; flex-direction: column; }
.colonnes, .rangee {
  display: grid; align-items: center;
  padding: 0 56px; column-gap: 28px;
}
.colonnes {
  height: 56px; flex: none;
  font-size: 22px; font-weight: 700; text-transform: uppercase; letter-spacing: 2px;
  color: var(--gris); border-bottom: 2px solid var(--separateur);
}
.rangee {
  height: 96px; flex: none;
  border-bottom: 1px solid var(--separateur);
  background: var(--fond-rangee);
}
.rangee:nth-child(even) { background: var(--fond-rangee-2); }

/* grilles par type */
.g-trains   { grid-template-columns: 170px 200px 1fr 340px 120px; }
.g-groupes  { grid-template-columns: 230px 1fr 190px 190px 190px; }
.g-gl       { grid-template-columns: 170px 290px 1fr 340px 120px; }
.colonnes .droite, .rangee .droite { text-align: right; justify-self: end; }
.colonnes .centre { text-align: center; justify-self: center; }

.c-heure { font-size: 62px; font-weight: 800; color: var(--jaune); font-variant-numeric: tabular-nums; letter-spacing: -1px; }
.c-heure.barre { color: var(--gris-fonce); text-decoration: line-through; text-decoration-thickness: 4px; }
.c-dest { min-width: 0; }
.c-dest .dest { font-size: 50px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.1; }
.c-dest .sous { font-size: 24px; color: var(--gris); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.supprime .c-dest .dest { color: var(--gris); text-decoration: line-through; text-decoration-thickness: 3px; }

.c-info { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.etat { font-size: 28px; font-weight: 700; padding: 4px 14px; border-radius: 8px; line-height: 1.2; white-space: nowrap; }
.etat.heure-ok { color: var(--blanc); padding-left: 0; font-weight: 600; }
.etat.retard   { background: var(--orange); color: #1a1000; }
.etat.supprime { background: var(--rouge); color: var(--blanc); }
.etat.quai     { background: var(--jaune); color: var(--fond); animation: clignote 1.2s steps(2, start) infinite; }
.attente { font-size: 30px; color: var(--jaune); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.attente.loin { color: var(--gris); font-weight: 600; }

.voie {
  width: 100px; height: 100px; justify-self: end;
  border-radius: 12px; background: var(--blanc); color: var(--fond);
  display: flex; align-items: center; justify-content: center;
  font-size: 56px; font-weight: 800; letter-spacing: -1px;
}
.voie.long { font-size: 40px; }
.voie.vide { background: transparent; border: 3px solid var(--separateur); color: var(--gris-fonce); font-size: 40px; }

/* bus / métro : prochains passages */
.passage { justify-self: end; text-align: right; min-width: 170px; }
.passage .min { font-size: 56px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--blanc); line-height: 1; }
.passage .min small { font-size: 28px; font-weight: 700; margin-left: 4px; color: var(--gris); }
.passage.premier .min { color: var(--jaune); }
.passage.premier .min small { color: var(--jaune); }
.passage .texte { font-size: 38px; font-weight: 800; color: var(--jaune); }
.passage .texte.approche { animation: clignote 1.2s steps(2, start) infinite; }
.passage .retard-bus { font-size: 20px; color: var(--orange); font-weight: 700; margin-top: 4px; }
.passage.vide .min { color: var(--gris-fonce); }

/* grandes lignes */
.gl-type { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.badge-gl {
  font-size: 24px; font-weight: 800; letter-spacing: 1px; padding: 6px 12px; border-radius: 8px;
  background: var(--blanc); color: var(--fond); white-space: nowrap;
}
.badge-gl.ic    { background: #2f3f8f; color: var(--blanc); }
.badge-gl.ter   { background: #d0d7e6; color: #1a2a55; }
.badge-gl.ouigo { background: #e5007d; color: var(--blanc); }
.badge-gl.tgv   { background: #9a1b48; color: var(--blanc); }
.gl-numero { font-size: 26px; color: var(--gris); font-weight: 700; }

/* message dans un tableau vide */
.vide-message {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 24px; color: var(--gris); font-size: 44px; font-weight: 600; text-align: center; padding: 0 120px;
}
.vide-message .grand { font-size: 64px; color: var(--blanc); font-weight: 800; }
.vide-message .petit { font-size: 30px; }
.vide-message .lignes-ok { display: flex; gap: 22px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }
.coche {
  width: 130px; height: 130px; border-radius: 50%; background: var(--vert); color: var(--fond);
  display: flex; align-items: center; justify-content: center; font-size: 84px; font-weight: 900;
}

/* ── Pictogrammes de lignes ────────────────────────────── */
.picto { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.picto-mode {
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; color: var(--fond); background: var(--blanc);
  height: 56px; padding: 0 9px; border-radius: 10px; font-size: 25px; letter-spacing: 0;
}
.picto-code {
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; height: 70px; min-width: 70px; font-size: 46px; line-height: 1;
}
/* RER : lettre dans un rond */
.picto-rer .picto-mode { border: 3px solid var(--blanc); background: transparent; color: var(--blanc); height: 52px; }
.picto-rer .picto-code { border-radius: 50%; width: 70px; }
/* Transilien : lettre dans un carré arrondi */
.picto-transilien .picto-mode { border-radius: 50%; width: 56px; padding: 0; font-size: 19px; }
.picto-transilien .picto-code { border-radius: 14px; width: 70px; }
/* Métro : numéro dans un rond, « M » cerclé */
.picto-metro .picto-mode { border-radius: 50%; width: 56px; padding: 0; font-size: 34px; }
.picto-metro .picto-code { border-radius: 50%; width: 70px; font-size: 40px; }
/* Bus : numéro dans un rectangle */
.picto-bus .picto-mode { font-size: 22px; height: 46px; }
.picto-bus .picto-code { border-radius: 8px; padding: 0 12px; height: 58px; font-size: 36px; }

.picto.petit .picto-mode { height: 38px; font-size: 17px; padding: 0 6px; border-radius: 7px; }
.picto.petit.picto-transilien .picto-mode,
.picto.petit.picto-metro .picto-mode { width: 38px; padding: 0; font-size: 15px; }
.picto.petit.picto-metro .picto-mode { font-size: 22px; }
.picto.petit .picto-code { height: 46px; min-width: 46px; font-size: 30px; }
.picto.petit.picto-rer .picto-code,
.picto.petit.picto-metro .picto-code { width: 46px; }
.picto.petit.picto-transilien .picto-code { width: 46px; border-radius: 10px; }
.picto.petit.picto-bus .picto-code { height: 40px; font-size: 25px; padding: 0 8px; }
.picto.petit.picto-rer .picto-mode { height: 34px; border-width: 2px; }

/* ── Info trafic ───────────────────────────────────────── */
.alertes { flex: 1; display: flex; flex-direction: column; gap: 22px; padding: 26px 56px; }
.alerte {
  flex: none; height: 240px; display: grid; grid-template-columns: 14px 190px 1fr; column-gap: 28px;
  background: var(--fond-rangee); border-radius: 14px; overflow: hidden;
}
.alerte .bande { background: var(--bleu-info); }
.alerte.BLOQUANTE .bande { background: var(--rouge); }
.alerte.PERTURBEE .bande { background: var(--orange); }
.alerte.a_venir .bande   { background: var(--gris-fonce); }
.alerte .a-picto { display: flex; align-items: center; justify-content: center; }
.alerte .a-corps { padding: 20px 34px 18px 0; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.a-entete { display: flex; align-items: center; gap: 18px; }
.a-gravite { font-size: 23px; font-weight: 800; text-transform: uppercase; letter-spacing: 1.5px; padding: 4px 12px; border-radius: 6px; background: var(--bleu-info); color: var(--blanc); }
.BLOQUANTE .a-gravite { background: var(--rouge); }
.PERTURBEE .a-gravite { background: var(--orange); color: #1a1000; }
.a_venir .a-gravite   { background: var(--gris-fonce); color: var(--blanc); }
.a-periode { font-size: 24px; color: var(--gris); font-weight: 600; }
.a-titre { font-size: 36px; font-weight: 800; line-height: 1.15; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.a-message { font-size: 26px; line-height: 1.32; color: #dfe6f5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; }
.a-arrets { font-size: 22px; color: var(--gris); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.alertes-suite { font-size: 24px; color: var(--gris); text-align: right; }

/* ── Pied de page : bandeau défilant + pages ───────────── */
.pied {
  height: 88px; flex: none; background: var(--entete);
  border-top: 2px solid var(--separateur);
  display: flex; align-items: center;
}
.defilant { flex: 1; height: 100%; overflow: hidden; position: relative; display: flex; align-items: center; min-width: 0; }
.defilant-etiquette {
  flex: none; height: 100%; display: flex; align-items: center; gap: 12px;
  padding: 0 28px 0 56px; background: var(--entete); z-index: 1;
  font-size: 26px; font-weight: 800; text-transform: uppercase; letter-spacing: 1.5px; color: var(--jaune);
}
.defilant-etiquette.ok { color: var(--vert); }
.defilant-piste { flex: 1; overflow: hidden; height: 100%; position: relative; }
.defilant-texte {
  position: absolute; top: 0; left: 0; height: 100%;
  display: flex; align-items: center; gap: 64px; white-space: nowrap;
  font-size: 30px; font-weight: 600;
  will-change: transform;
}
.defilant-texte .item { display: inline-flex; align-items: center; gap: 16px; }
.defilant-texte .item b { color: var(--blanc); }
.defilant-texte.statique { position: static; color: var(--gris); }
@keyframes defile { from { transform: translateX(var(--depart)); } to { transform: translateX(var(--arrivee)); } }

.pages { flex: none; display: flex; gap: 14px; padding: 0 56px 0 28px; align-items: center; }
.pages .p { font-size: 21px; font-weight: 700; color: var(--gris-fonce); padding: 6px 14px; border-radius: 8px; border: 2px solid transparent; white-space: nowrap; }
.pages .p.active { color: var(--fond); background: var(--jaune); }

/* ── Aide plein écran ──────────────────────────────────── */
.aide {
  position: absolute; left: 50%; bottom: 120px; transform: translateX(-50%);
  background: rgba(7, 20, 47, 0.95); border: 2px solid var(--jaune); color: var(--blanc);
  font-size: 30px; font-weight: 600; padding: 18px 34px; border-radius: 14px;
  transition: opacity 0.6s; z-index: 5;
}
.aide.cachee { opacity: 0; pointer-events: none; }

@keyframes clignote { to { visibility: hidden; } }

/* ── Pages de connexion et d'accueil ───────────────────── */
body.page-simple { background: var(--fond); overflow: auto; display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.carte {
  width: min(560px, 92vw); background: var(--entete); border: 2px solid var(--separateur);
  border-radius: 18px; padding: 44px 44px 38px; box-shadow: 0 20px 60px rgba(0,0,0,.45);
}
.carte h1 { font-size: 34px; font-weight: 800; margin-bottom: 6px; }
.carte p { color: var(--gris); font-size: 18px; margin-bottom: 26px; line-height: 1.45; }
.carte label { display: block; font-size: 16px; font-weight: 700; color: var(--gris); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 1px; }
.carte input[type=password] {
  width: 100%; font: inherit; font-size: 22px; padding: 14px 16px; border-radius: 10px;
  border: 2px solid var(--separateur); background: var(--fond); color: var(--blanc);
}
.carte input[type=password]:focus { outline: none; border-color: var(--jaune); }
.carte button {
  margin-top: 22px; width: 100%; font: inherit; font-size: 22px; font-weight: 800; padding: 14px;
  border: 0; border-radius: 10px; background: var(--jaune); color: var(--fond); cursor: pointer;
}
.erreur { display: none; background: var(--rouge); color: var(--blanc); font-weight: 700; padding: 12px 16px; border-radius: 10px; margin-bottom: 18px; font-size: 18px; }
.erreur.visible { display: block; }
.choix { display: grid; gap: 16px; margin-top: 8px; }
.choix a {
  display: flex; align-items: center; justify-content: space-between; text-decoration: none;
  background: var(--fond); border: 2px solid var(--separateur); border-radius: 12px; padding: 20px 22px;
  color: var(--blanc); font-size: 24px; font-weight: 800;
}
.choix a:hover, .choix a:focus { border-color: var(--jaune); outline: none; }
.choix a span { color: var(--gris); font-size: 16px; font-weight: 600; }
.lien-discret { display: inline-block; margin-top: 24px; color: var(--gris); font-size: 15px; }
