/* Valeurs reprises des maquettes (design/project/Main.dc.html et Theorique.dc.html). */
@font-face {
  font-family: "Inter";
  src: url("fonts/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0b1422;
  --block: #111d30;
  --text: #f4f6fa;
  --muted: #9fb0c7;
  --accent: #f5a524;
  --on-accent: #1a1204;
  --alert: #fb923c;
  --ok: #34d399;
  --sep: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.05);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  overflow: hidden;
}

body {
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

#viewport {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: var(--bg);
}

/* Scène de référence 1536 × 864, mise à l'échelle en 16:9 et centrée. */
#stage {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1536px;
  height: 864px;
  transform: translate(-50%, -50%) scale(var(--s, 1));
  transform-origin: center center;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
}

/* ---------- En-tête ---------- */
.hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 40px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.hdr-left { display: flex; align-items: center; gap: 22px; }
.logo { width: 76px; height: 76px; object-fit: contain; }
.hdr-titles { display: flex; flex-direction: column; gap: 4px; }
.hdr-titles h1 { margin: 0; font-size: 36px; font-weight: 700; letter-spacing: -0.01em; }
.hdr-titles p { margin: 0; font-size: 18px; color: var(--muted); }
.hdr-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.clock { font-size: 64px; font-weight: 600; line-height: 1; letter-spacing: -0.02em; }
.hdr-meta { display: flex; align-items: center; gap: 16px; font-size: 16px; color: var(--muted); min-height: 28px; }
.status { display: flex; align-items: center; gap: 8px; }
.status .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); }
.status .dot.warn { background: var(--alert); }
.status.pill {
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid rgba(159, 176, 199, 0.4);
}
.status.warn { color: var(--alert); }

/* ---------- Corps ---------- */
.board {
  flex-grow: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
  padding: 22px 40px;
  min-height: 0;
}
.col { display: flex; flex-direction: column; gap: 18px; min-height: 0; }
.section { display: flex; flex-direction: column; gap: 10px; }
.section-head { display: flex; align-items: center; gap: 12px; padding: 0 4px; }
.section-head svg { flex: none; }
.section-head h2 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.section-head .mode { font-size: 16px; color: var(--muted); }
.block {
  background: var(--block);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.row {
  display: grid;
  /* Maquette : 76 / 1fr / 190 / 110. Colonne de temps réduite à 175 px pour que « Gare de Linkebeek »
     (242 px) ne soit pas tronquée (colonne destination : 251 px) ; « En approche » (169 px) y tient. */
  grid-template-columns: 76px minmax(0, 1fr) 175px 110px;
  align-items: center;
  height: 78px;
  padding: 0 22px;
  gap: 18px;
  border-top: 1px solid var(--sep);
}
.row:first-child { border-top: none; }
.row.is-end { opacity: 0.55; }

.badge {
  width: 64px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 800;
}
.dest-wrap { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.dest { font-size: 27px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.alert { display: flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 600; color: var(--alert); }

.time { display: flex; justify-content: flex-end; align-items: baseline; white-space: nowrap; }
.time .big { font-size: 46px; font-weight: 700; line-height: 1; }
.time .unit { font-size: 22px; font-weight: 500; color: var(--muted); margin-left: 6px; }
.time .approach { display: flex; align-items: center; gap: 10px; font-size: 24px; font-weight: 700; color: var(--accent); }
.time .approach .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); animation: pulse 1.6s ease-out infinite; }
.time .clock-time { font-size: 40px; font-weight: 600; line-height: 1; color: #c9d3e1; }
.time .end { font-size: 22px; font-weight: 600; color: var(--muted); }
.time .none { font-size: 32px; font-weight: 600; color: var(--muted); }
.then { text-align: right; font-size: 19px; color: var(--muted); white-space: nowrap; }

/* ---------- Pied de page ---------- */
.footer { height: 62px; flex: none; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.footer[hidden] { display: none; }
.footer.ticker { display: flex; align-items: stretch; background: #15233a; }
.footer.calm {
  display: flex;
  align-items: center;
  padding: 0 40px;
  background: #0f1a2c;
  font-size: 18px;
  color: var(--muted);
}
.ticker-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 26px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.08em;
  white-space: nowrap;
}
.ticker-window { flex-grow: 1; overflow: hidden; display: flex; align-items: center; min-width: 0; }
.ticker-track { display: flex; width: max-content; white-space: nowrap; font-size: 22px; font-weight: 500; animation: ticker linear infinite; }
.ticker-copy { display: flex; gap: 120px; padding-left: 40px; padding-right: 80px; }

/* ---------- Animations ---------- */
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(245, 165, 36, 0.7); }
  70% { box-shadow: 0 0 0 12px rgba(245, 165, 36, 0); }
  100% { box-shadow: 0 0 0 0 rgba(245, 165, 36, 0); }
}
@keyframes live {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.status .dot.live { animation: live 2s ease-in-out infinite; }
