/* Diffusion TV de la galerie : plein écran, lisible de loin. */
:root { color-scheme: dark; --brand: #2cc3a0; --ink: #f4f7f6; --muted: rgba(244, 247, 246, .7); }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #070b0a; color: var(--ink); font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; }
body.idle, body.idle * { cursor: none !important; }
[hidden] { display: none !important; }

.stage { position: fixed; inset: 0; }
.slide { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity 1.2s ease; }
.slide.active { opacity: 1; }
.slide .blur { position: absolute; inset: -40px; background-size: cover; background-position: center; filter: blur(40px) brightness(.45) saturate(1.2); transform: scale(1.1); }
.slide img { position: absolute; inset: 4vh 4vw 12vh; width: 92vw; height: 84vh; object-fit: contain; filter: drop-shadow(0 20px 60px rgba(0,0,0,.6)); }
.slide.active img { animation: kenburns var(--duration, 8s) ease-out forwards; }
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.05); } }
@media (prefers-reduced-motion: reduce) { .slide.active img { animation: none; } .slide { transition: none; } }

.slide figcaption {
  position: absolute; left: 4vw; bottom: 4.5vh; right: 30vw;
  display: flex; flex-wrap: wrap; align-items: center; gap: .6vw 1vw;
  font-size: clamp(16px, 1.7vw, 34px); text-shadow: 0 2px 12px rgba(0,0,0,.7);
}
.team { background: var(--brand); color: #06201a; font-weight: 800; padding: .25em .8em; border-radius: 999px; text-shadow: none; }
.challenge { font-weight: 800; }
.caption { color: var(--muted); font-weight: 500; flex-basis: 100%; }
.new-badge { background: #ff8a3d; color: #1c0d00; font-weight: 800; padding: .2em .7em; border-radius: 999px; text-shadow: none; animation: pop .6s ease; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }

.tv-top { position: fixed; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding: 2.2vh 3vw; background: linear-gradient(rgba(0,0,0,.55), transparent); pointer-events: none; }
.brand { display: flex; align-items: center; gap: .8vw; }
.mark { display: grid; place-items: center; width: 2.6vw; height: 2.6vw; min-width: 36px; min-height: 36px; border-radius: 22%; background: linear-gradient(135deg, #16b892, #0b7c64); font-weight: 800; font-size: clamp(16px, 1.4vw, 28px); }
.brand strong { display: block; letter-spacing: .15em; font-size: clamp(14px, 1.2vw, 24px); }
.brand div span { display: block; color: var(--muted); font-size: clamp(12px, .95vw, 20px); }
.live { font-size: clamp(13px, 1vw, 22px); color: var(--muted); display: flex; align-items: center; gap: .5em; }
.live b { color: var(--ink); }
.live .dot { width: .7em; height: .7em; border-radius: 50%; background: #ff4d4d; animation: blink 1.6s infinite; }
@keyframes blink { 50% { opacity: .3; } }

.tv-qr { position: fixed; right: 2.5vw; bottom: 4vh; display: flex; align-items: center; gap: 1vw; background: rgba(255,255,255,.95); color: #0b1a17; padding: 1vw 1.2vw 1vw 1vw; border-radius: 1.2vw; max-width: 26vw; box-shadow: 0 10px 40px rgba(0,0,0,.4); }
.tv-qr .qr svg { display: block; width: 8vw; height: 8vw; min-width: 90px; min-height: 90px; }
.tv-qr p { margin: 0; font-size: clamp(12px, .95vw, 20px); line-height: 1.35; }
.tv-qr strong { display: block; font-size: 1.2em; margin-bottom: .2em; }
body.no-qr .tv-qr { display: none; }
body.no-qr .slide figcaption { right: 4vw; }

.progress { position: fixed; left: 0; right: 0; bottom: 0; height: 5px; background: rgba(255,255,255,.1); }
.progress span { display: block; height: 100%; width: 0; background: var(--brand); }

.empty { position: fixed; inset: 0; display: grid; place-content: center; text-align: center; padding: 5vw; background: radial-gradient(circle at 30% 20%, rgba(44,195,160,.25), transparent 50%), radial-gradient(circle at 80% 90%, rgba(255,138,61,.2), transparent 50%); }
.empty-mark { font-size: 8vw; }
.empty h1 { font-size: clamp(28px, 4vw, 80px); margin: .2em 0; }
.empty p { font-size: clamp(16px, 1.8vw, 36px); color: var(--muted); margin: 0; }

.controls {
  position: fixed; left: 50%; top: 9vh; transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center;
  padding: 10px 14px; border-radius: 16px; background: rgba(15, 22, 20, .85); backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.12); transition: opacity .3s ease; font-size: 14px;
}
body.idle .controls { opacity: 0; pointer-events: none; }
.controls button, .controls select { font: inherit; color: var(--ink); background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); border-radius: 10px; padding: 8px 12px; cursor: pointer; }
.controls button:hover { background: rgba(255,255,255,.2); }
.controls label { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.controls option { color: #111; }

/* Écran vertical ou étroit (tablette, téléphone, TV pivotée) */
@media (orientation: portrait), (max-width: 900px) {
  .tv-top { flex-wrap: wrap; gap: 8px; }
  .mark { width: 40px; height: 40px; }
  .slide img { inset: 12vh 4vw 22vh; width: 92vw; height: 66vh; }
  .slide figcaption { right: 4vw; bottom: 15vh; font-size: clamp(16px, 4vw, 30px); }
  .tv-qr { left: 4vw; right: 4vw; bottom: 2.5vh; max-width: none; padding: 12px; border-radius: 16px; gap: 14px; }
  .tv-qr .qr svg { width: 84px; height: 84px; min-width: 0; min-height: 0; }
  .tv-qr p { font-size: 15px; }
  body.no-qr .slide figcaption { bottom: 5vh; }
  .controls { top: auto; bottom: 18vh; width: calc(100vw - 32px); }
}


