/* Afficheur plein écran : style propre (pas la charte SNCF). Lisible de loin, clair même en plein jour. */
@font-face { font-family: "Barlow Condensed"; src: url(/fonts/barlow-condensed-600.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url(/fonts/barlow-condensed-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Barlow"; src: url(/fonts/barlow-500.woff2) format("woff2"); font-weight: 500; font-display: swap; }
:root { --bg: #070d1f; --row: #0d1631; --row2: #0a1229; --ink: #f4f6fb; --amber: #ffc93c; --dim: #8d9bc2; --red: #ff5a63; --line: #1a2650; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); }
body.aff { display: flex; flex-direction: column; min-height: 100vh; font-family: "Barlow Condensed", "Arial Narrow", sans-serif; overflow: hidden; }
.aff-head { display: flex; justify-content: space-between; align-items: flex-end; padding: 2.2vh 3vw 1.4vh; border-bottom: 4px solid var(--amber); }
.aff-kind { display: inline-block; background: var(--amber); color: #0b1430; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; padding: .2em .5em; border-radius: 4px; font-size: clamp(14px, 2.2vh, 26px); }
.aff-head h1 { margin: .15em 0 0; font-weight: 700; font-size: clamp(28px, 6vh, 72px); line-height: 1; letter-spacing: .01em; }
.aff-clock { font-weight: 700; font-size: clamp(32px, 8vh, 96px); color: var(--amber); font-variant-numeric: tabular-nums; line-height: 1; }
.aff-cols, .aff-rows li { display: grid; grid-template-columns: calc(clamp(22px, 4.6vh, 56px) * 2.6) minmax(0, 1fr) calc(clamp(14px, 2.6vh, 32px) * 6) calc(clamp(20px, 4.2vh, 52px) * 2); gap: 2vw; align-items: center; padding: 0 3vw; }
.aff-cols { color: var(--dim); text-transform: uppercase; letter-spacing: .12em; font-size: clamp(11px, 1.7vh, 18px); padding-top: 1.2vh; padding-bottom: .8vh; }
.aff-cols span:nth-child(3), .aff-cols span:nth-child(4) { text-align: right; }
.aff-rows { list-style: none; margin: 0; padding: 0; flex: 1; overflow: hidden; }
.aff-rows li { min-height: 7.4vh; border-top: 1px solid var(--line); background: var(--row); animation: flip .45s ease both; }
.aff-rows li:nth-child(even) { background: var(--row2); }
.a-time { font-weight: 700; font-size: clamp(22px, 4.6vh, 56px); color: var(--amber); font-variant-numeric: tabular-nums; }
.a-dest { font-weight: 700; font-size: clamp(20px, 4.2vh, 52px); text-transform: uppercase; line-height: 1.02; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.a-dest small { display: block; font-family: "Barlow", sans-serif; font-weight: 500; text-transform: none; color: var(--dim); font-size: clamp(11px, 1.8vh, 20px); letter-spacing: .02em; }
.a-state { text-align: right; font-weight: 700; font-size: clamp(14px, 2.6vh, 32px); color: #7be0b0; }
.late .a-state { color: var(--amber); }
.x .a-state { color: #fff; background: var(--red); border-radius: 4px; padding: .1em .3em; text-align: center; }
.x .a-dest, .x .a-time { opacity: .55; text-decoration: line-through; text-decoration-thickness: 2px; }
.a-voie { justify-self: end; min-width: 2.2em; text-align: center; font-weight: 700; font-size: clamp(20px, 4.2vh, 52px); border: 3px solid var(--ink); border-radius: 8px; padding: 0 .15em; }
.a-voie:empty { border-color: transparent; }
.empty { display: block !important; padding: 4vh 3vw !important; color: var(--dim); }
.aff-foot { display: flex; align-items: center; gap: 2vw; border-top: 4px solid var(--amber); background: #0b1430; padding: .8vh 3vw; }
.aff-ticker { flex: 1; overflow: hidden; white-space: nowrap; color: var(--ink); font-family: "Barlow", sans-serif; font-size: clamp(12px, 2vh, 22px); }
.aff-ticker span { display: inline-block; padding-left: 100%; animation: ticker 38s linear infinite; }
.aff-tools { display: flex; gap: 10px; font-family: "Barlow", sans-serif; font-size: 14px; }
.aff-tools a, .aff-tools button { color: var(--dim); background: none; border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px; text-decoration: none; cursor: pointer; font: inherit; }
.aff-tools a:hover, .aff-tools button:hover { color: var(--ink); border-color: var(--dim); }
:fullscreen .aff-tools { display: none; }
@keyframes ticker { to { transform: translateX(-100%); } }
@keyframes flip { from { transform: rotateX(-80deg); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .aff-rows li, .aff-ticker span { animation: none; } .aff-ticker span { padding-left: 0; } }
@media (max-width: 640px) { .aff-cols, .aff-rows li { grid-template-columns: 58px minmax(0, 1fr) 84px 44px; gap: 8px; padding: 0 12px; } .aff-rows li { min-height: 64px; } .aff-head { padding: 14px 12px 10px; } .aff-tools { font-size: 12px; } .a-state { font-size: 14px; } .a-time { font-size: 24px; } .a-dest { font-size: 21px; } .a-voie { font-size: 20px; border-width: 2px; } .aff-head h1 { font-size: 30px; } .aff-clock { font-size: 36px; } .aff-cols { font-size: 11px; } .aff-ticker { display: none; } }
