/* ============================================================================
   Empire Premium — Cast Receiver (TV, 1280×720 / 1920×1080)
   Même identité que le lecteur de la webapp : noir, rouge #e5222e, Gotham.
   ============================================================================ */

@font-face { font-family: 'Gotham'; src: url('assets/fonts/Gotham-Book.otf') format('opentype'); font-weight: 400; }
@font-face { font-family: 'Gotham'; src: url('assets/fonts/Gotham-Bold.otf') format('opentype'); font-weight: 700 800; }

:root {
  --red: #e5222e;
  --red-glow: rgba(229, 34, 46, .45);
  --text: #fff;
  --muted: rgba(255, 255, 255, .7);
  --font: 'Gotham', 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #000; color: var(--text); font-family: var(--font); }

/* ===== Lecteur Google : couleurs Empire ===== */
cast-media-player {
  --theme-hue: 357;
  --progress-color: var(--red);
  --font-family: var(--font);
  --background-color: #000;
  /* écrans natifs Google (splash / idle) masqués : on a les nôtres */
  --splash-image: none;
  --logo-image: none;
  --background-image: none;
  position: absolute;
  inset: 0;
}

/* ===== Écran d'attente ===== */
.idle {
  position: absolute; inset: 0; z-index: 30;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  background: radial-gradient(ellipse at 50% 40%, #2a0a0a 0%, #050505 70%);
  opacity: 0; visibility: hidden; transition: opacity .5s ease, visibility .5s;
}
.idle.is-visible { opacity: 1; visibility: visible; }
.idle-halo {
  position: absolute; width: 520px; height: 520px; border-radius: 50%;
  background: radial-gradient(circle, var(--red-glow) 0%, transparent 70%);
  filter: blur(30px); animation: pulse 4s ease-in-out infinite;
}
.idle-logo { position: relative; width: 150px; filter: drop-shadow(0 12px 40px var(--red-glow)); }
.idle-brand { position: relative; display: flex; flex-direction: column; align-items: center; line-height: 1; }
.idle-name { font-size: 64px; font-weight: 800; letter-spacing: 10px; }
.idle-tag { margin-top: 8px; font-size: 20px; font-weight: 700; letter-spacing: 9px; color: #d4a029; }
.idle-text { position: relative; margin-top: 18px; font-size: 22px; color: var(--muted); }

@keyframes pulse { 0%, 100% { opacity: .75; transform: scale(1); } 50% { opacity: 1; transform: scale(1.08); } }

/* ===== Loader ===== */
.loader {
  position: absolute; inset: 0; z-index: 25;
  display: grid; place-items: center;
  background: rgba(0, 0, 0, .55);
  opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility .3s;
}
.loader.is-visible { opacity: 1; visibility: visible; }
.loader-logo { grid-area: 1 / 1; width: 70px; }
.loader-spin {
  grid-area: 1 / 1; width: 140px; height: 140px; border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, .12); border-top-color: var(--red);
  animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Overlay infos ===== */
.info {
  position: absolute; inset: 0; z-index: 20; pointer-events: none;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 48px 64px 140px; /* bas : laisse la place à la barre de progression native */
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, .75) 0%, transparent 28%),
    linear-gradient(to top, rgba(0, 0, 0, .9) 0%, rgba(0, 0, 0, .35) 45%, transparent 70%);
  opacity: 0; transition: opacity .6s ease;
}
.info.is-visible { opacity: 1; }

.info-top { display: flex; align-items: center; gap: 14px; }
.info-logo { width: 46px; }
.info-brand { font-size: 22px; font-weight: 800; letter-spacing: 4px; }
.info-brand b { color: #d4a029; font-weight: 700; }

.info-bottom { display: flex; align-items: flex-end; gap: 32px; max-width: 75%; }
.info-poster {
  width: 170px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 10px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .7); display: none;
}
.info-poster.has-src { display: block; }
.info-text { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.info-badge {
  align-self: flex-start; padding: 6px 14px; border-radius: 999px;
  background: var(--red); font-size: 16px; font-weight: 800; letter-spacing: 1px;
  box-shadow: 0 8px 24px var(--red-glow);
}
.info-badge:empty { display: none; }
.info-title { font-size: 52px; font-weight: 800; line-height: 1.1; letter-spacing: -.5px; text-shadow: 0 4px 20px rgba(0, 0, 0, .6); }
.info-meta { font-size: 22px; color: var(--muted); }
.info-meta:empty { display: none; }
.info-desc {
  font-size: 20px; line-height: 1.45; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.info-desc:empty { display: none; }

/* Gros symbole pause au centre */
.info-paused {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 140px; height: 140px; border-radius: 50%;
  display: none; place-items: center;
  background: rgba(0, 0, 0, .55); border: 3px solid rgba(255, 255, 255, .25);
  font-size: 46px; letter-spacing: -6px;
}
.info.is-paused .info-paused { display: grid; }
