   REDESIGN 2026-07 — "Cinema" pass (override en fin de cascade)
   Dark OLED + refined motion + glass. Mobile: bottom navigation.
   ============================================================ */

:root {
  --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.55);
}

/* ---------- Rows / section titles ---------- */
.row-head h2, #content h2 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.3px;
  margin-bottom: 0;
}
.row-head .see-all {
  opacity: 1;
  font-size: 0.85rem;
  color: var(--muted);
}
.row-head:hover .see-all { color: var(--accent-hover); }

/* ---------- Cartes ---------- */
.card {
  position: relative;
  will-change: transform;
}
.card .poster {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
/* VOD/series: title BELOW poster -- zero collision with poster art/text
   (overlay overlaid our title on the poster printed title = double text). */
.card:not(.live) .title {
  position: static;
  margin: 0.55rem 0.15rem 0;
  padding: 0;
  background: none;
  color: #ddd;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  transition: color 0.18s ease;
}
@media (hover: hover) { .card:not(.live):hover .title { color: #fff; } }
/* LIVE: keeps banner (channel logo + current EPG) -- live thumbnails
   are simple logos, overlay interferes nothing and integrates EPG. */
.card.live .title {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  margin: 0;
  padding: 1.4rem 0.6rem 1.35rem;
  border-radius: 0 0 4px 4px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.72) 55%, rgba(0, 0, 0, 0.88));
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.3;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}
.card.live .epg-line {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  margin: 0;
  padding: 0.15rem 0.6rem 0.45rem;
  background: rgba(0, 0, 0, 0.88);
  border-radius: 0 0 4px 4px;
  font-size: 0.7rem;
  pointer-events: none;
}
/* EPG overlay inside card (Issue #2 Phase 2) — hover reveal */
.card .card-epg-overlay {
  position: absolute;
  left: 6px; right: 6px; bottom: 6px;
  padding: 0.5rem 0.6rem;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  border-radius: 6px;
  font-size: 0.75rem;
  color: #fff;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: none;
  z-index: 3;
}
.card:hover .card-epg-overlay { opacity: 1; transform: translateY(0); }
.card-epg-now { font-weight: 700; color: var(--accent); }
.card-epg-next { color: var(--muted); margin-left: 0.5rem; }
/* hover: lift + anneau accent (desktop) */
@media (hover: hover) {
  .card:hover { z-index: 3; }
  .card:hover .poster {
    transform: translateY(-3px);
    box-shadow: 0 0 0 2px var(--accent), 0 20px 50px rgba(0, 0, 0, 0.75);
  }
  .card:hover .title { color: #fff; }
}
.card:active .poster { transform: scale(0.97); }
/* On touch mobile, no lift (hover broken) */
@media (hover: none) {
  .card:active .poster { transform: scale(0.97); }
}
/* reprise: barre par-dessus le bandeau titre */
.card.resume .resume-bar { z-index: 2; }

/* ---------- Player: scrims + worthy controls ---------- */
.player-controls {
  padding: 2.6rem 1.2rem max(0.9rem, env(safe-area-inset-bottom));
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.55) 40%, rgba(0, 0, 0, 0.85));
}
.pc-btn {
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
  color: #fff;
}
.pc-skip {
  width: auto;
  min-width: 52px;
  padding-inline: 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.pc-btn:hover { background: rgba(255, 255, 255, 0.12); }
.pc-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 1.02rem;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8);
}
.pc-live {
  background: #c0392b;
  color: #fff;
  border-radius: 999px;
  padding: 0.18rem 0.55rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
  text-shadow: none;
}
.pc-vlc {
  border-radius: var(--radius-full) !important;
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 0 0.9rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.4px;
}
/* seek: thicker, thumb on hover */
.pc-seek-wrap {
  height: 5px;
  border-radius: var(--radius-full);
  transition: height 0.15s ease;
}
.pc-seek-wrap:hover { height: 9px; }
.pc-seek-bar { border-radius: var(--radius-full); }
.pc-seek-bar::after {
  content: '';
  position: absolute;
  right: -7px; top: 50%;
  width: 14px; height: 14px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: var(--accent-hover);
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: opacity 0.15s ease;
}
.pc-seek-wrap:hover .pc-seek-bar::after { opacity: 1; }
.player-bigplay {
  width: 104px; height: 104px;
  border-radius: 50%;
  background: linear-gradient(145deg, #100e14, #1b1822);
  color: #cbbcff;
  box-shadow: inset 3px 3px 7px rgba(0, 0, 0, 0.78), inset -2px -2px 5px rgba(255, 255, 255, 0.05), 0 0 0 1px rgba(167, 139, 250, 0.35), 0 0 60px rgba(167, 139, 250, 0.3);
  border: 0;
}

/* ---------- Audit guidelines (Vercel web-interface-guidelines) ---------- */
/* horizontal rail: fade at right edge = "continues to right" affordance */
.row-scroll {
  mask-image: linear-gradient(90deg, #000 calc(100% - 48px), transparent);
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 48px), transparent);
}
/* titres: pas de mot orphelin */
#content h2, .row-head h2, .detail h1 { text-wrap: balance; }
/* player time: tabular digits, zero shake every second */
.pc-time, #vod-time { font-variant-numeric: tabular-nums; }

/* ---------- Product polish pass: shared responsive overrides ---------- */
/* Desktop OTT shell: keep the primary navigation horizontal and explicit.
   The former icon-only vertical rail hid labels and made the product feel
   like an admin console rather than a media library. */
@media (min-width: 1024px) {
  body { padding-left: 0; }
  #topbar {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) auto minmax(180px, 1fr);
    width: min(100% - 3rem, 1480px);
    margin: 0 auto;
    padding: 0.8rem 0 0;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: nowrap;
  }
  .brand {
    display: block;
    justify-self: start;
    color: var(--text-bright);
    font-family: 'Outfit', sans-serif;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.04em;
  }
  .tabs {
    position: static;
    transform: none;
    flex-direction: row;
    justify-self: center;
    margin: 0;
    padding: 0.25rem;
  }
  .tabs button {
    flex-direction: row;
    gap: 0.45rem;
    padding: 0.65rem 0.9rem;
  }
  .tabs button .label { display: inline; }
  .tabs button[data-tip]::after { display: none; }
  #logout {
    position: static;
    justify-self: end;
  }
  #search-wrap {
    grid-column: 1 / -1;
    width: min(100%, 620px);
    justify-self: center;
    margin-inline: 0;
  }
  #topbar.search-open #search-wrap { margin-top: 0.25rem; }
  #content {
    width: min(100% - 3rem, 1480px);
    padding-left: 0;
    padding-right: 0;
  }

  @media (min-width: 769px) and (max-width: 1023px) {
    #topbar { padding-top: 0.75rem; }
    .tabs { margin-inline: auto; }
  }
}

.tabs {
  background: rgba(17, 21, 29, 0.88);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.34), 0 0 0 1px rgba(255,255,255,0.025);
}
.tabs button:focus-visible,
.search:focus-visible,
.btn:focus-visible,
a:focus-visible {
  outline-color: var(--accent-hover);
}
.tabs button.active {
  background: linear-gradient(135deg, var(--accent), #c4b5fd);
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.28);
}
.row h2, .row-head h2 {
  font-size: 1.35rem;
  letter-spacing: -0.015em;
}
.row {
  margin-bottom: 3rem;
}
.home-hero {
  position: relative;
  min-height: clamp(300px, 42vw, 520px);
  margin: 0 0 2.5rem;
  overflow: hidden;
  border-radius: 24px;
  isolation: isolate;
  background: var(--surface);
}
.home-hero-backdrop {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  filter: saturate(0.9);
  z-index: -2;
}
.home-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(5, 7, 12, 0.94), rgba(5, 7, 12, 0.5) 48%, rgba(5, 7, 12, 0.12)),
    linear-gradient(0deg, rgba(5, 7, 12, 0.8), transparent 65%);
  z-index: -1;
}
.home-hero-content {
  max-width: 620px;
  padding: clamp(2rem, 5vw, 5rem);
  align-self: end;
}
.home-hero-kicker {
  color: var(--accent-hover);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.home-hero h1 {
  max-width: 12ch;
  margin: 0.6rem 0 0.8rem;
  color: #fff;
  font-family: 'Outfit', sans-serif;
  font-size: clamp(2.1rem, 5vw, 4.4rem);
  line-height: 0.98;
  text-wrap: balance;
}
.home-hero p {
  max-width: 48ch;
  color: #f1f5f9;
  font-size: 1rem;
  line-height: 1.55;
}
.home-hero-actions { display: flex; gap: 0.75rem; align-items: center; margin-top: 1.4rem; }
.home-hero-actions .fav { min-height: 44px; }
.resume-play { margin: 0.55rem 0 0.2rem; min-height: 40px; }
.grid {
  gap: 1.4rem;
}
.card .poster {
  background-color: #121722;
  border-color: rgba(226, 232, 240, 0.1);
}
.card {
  border-radius: var(--radius-md);
  isolation: isolate;
}
.card .title {
  letter-spacing: -0.01em;
}
.card-meta {
  color: var(--muted);
  font-size: 0.74rem;
  margin: 0.35rem 0.15rem 0;
}
.grid-live {
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}
.grid-live .card {
  background: transparent;
}
.card .card-overlay {
  background:
    linear-gradient(180deg, rgba(5, 7, 12, 0.76), transparent 42%),
    linear-gradient(0deg, rgba(5, 7, 12, 0.9), transparent 68%);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.card .ov-btn {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255,255,255,0.22);
  background: rgba(8, 10, 15, 0.72);
  box-shadow: 0 8px 22px rgba(0,0,0,0.35);
}
.card .ov-play {
  width: 52px;
  height: 52px;
  background: var(--accent);
  color: #090a0f;
  border-color: transparent;
}
.card .ov-btn:hover {
  background: var(--accent);
  color: #090a0f;
  border-color: transparent;
}
.card:focus-visible {
  outline: 2px solid var(--accent-hover);
  outline-offset: 5px;
}
.card:focus-within .card-overlay {
  opacity: 1;
  pointer-events: auto;
}
.row-scroll {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.35) transparent;
  padding-inline: 0.45rem;
  scroll-padding-inline: 0.45rem;
}
.row-scroll::-webkit-scrollbar { height: 6px; }
.row-scroll::-webkit-scrollbar-track { background: transparent; }
.row-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.35);
  border-radius: 999px;
}
.row-scroll > .card { scroll-snap-align: start; }

@media (max-width: 768px) {
  #content {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .tabs {
    background: rgba(13, 17, 25, 0.94);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.48), 0 0 0 1px rgba(167, 139, 250, 0.06);
  }
  .tabs button:active { transform: scale(0.94); }
  .tabs button.active svg { filter: drop-shadow(0 0 6px rgba(255,255,255,0.3)); }
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }
  .row-scroll > .card { flex-basis: 148px; }
  .card { width: 148px; }
  .detail-body {
    margin-top: -48px;
    padding: 1.5rem 1.1rem 2.5rem;
    border-radius: 22px 22px 0 0;
    box-shadow: 0 -18px 45px rgba(0, 0, 0, 0.5);
  }
  .detail-body::before {
    content: "";
    display: block;
    width: 42px;
    height: 4px;
    margin: -0.35rem auto 1.15rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.28);
  }
  .detail-hero { min-height: 230px; }
}

@media (max-width: 480px) {
  .grid { gap: 0.7rem; }
  .row { margin-bottom: 2rem; }
  .row h2, .row-head h2 { font-size: 1.12rem; }
  .row-scroll > .card { flex-basis: 136px; }
  .card { width: 136px; }
  .player-controls .pc-btn {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
  }
  .player-controls .pc-btn.pc-vlc { height: 44px; }
}

/* ---------- Player ergonomics ---------- */
#player-video { background: #0c0b0e; }
.player-controls {
  padding: 1.8rem 1.6rem max(1.5rem, calc(env(safe-area-inset-bottom) + 0.7rem));
  background: linear-gradient(to top, rgba(3, 4, 7, 0.96), rgba(3, 4, 7, 0.48) 62%, transparent);
}
.pc-btn {
  background: rgba(17, 21, 29, 0.84);
  border-color: rgba(226, 232, 240, 0.16);
  min-width: 44px;
  min-height: 44px;
}
.pc-btn:focus-visible,
.player-bigplay:focus-visible {
  outline: 2px solid var(--accent-hover);
  outline-offset: 3px;
}
.pc-title { font-size: 1rem; }
.player-msg {
  background: rgba(17, 21, 29, 0.96);
  border: 1px solid rgba(226, 232, 240, 0.12);
  box-shadow: 0 24px 80px rgba(0,0,0,0.5);
}

@media (max-width: 480px) {
  .player-controls {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
  .player-controls .pc-btn {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
  }
  .player-controls .pc-btn.pc-vlc {
    height: 44px;
    padding-inline: 0.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Conteneur des lecteurs alternatifs (xgplayer) ---------- */

/* engine menu in top bar: open downward (otherwise off-screen) */
.pq-menu.pq-down {
  bottom: auto;
  top: calc(100% + 0.6rem);
}
.pq-item {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  width: 100%;
  padding: 0.55rem 0.7rem;
  border-radius: 9px;
  color: var(--muted);
  text-align: left;
}
.pq-item:hover { background: rgba(255, 255, 255, 0.07); color: var(--text-bright); }
.pq-item.active { background: var(--accent); color: #000; }
.pq-label { flex: 0 0 3rem; font-weight: 700; font-size: 0.8rem; }
.pq-name {
  flex: 1;
  min-width: 0;
  font-size: 0.82rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pq-src {
  flex: 0 0 auto;
  padding: 0.1rem 0.4rem;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}

/* ---------- Lecteur: panneau statistiques ---------- */
.pc-stats { font-weight: 800; font-size: 0.85rem; }
.pc-stats.active { background: var(--accent); color: #000; }
.player-stats-panel {
  position: absolute;
  top: max(4.5rem, calc(env(safe-area-inset-top) + 4rem));
  left: 1.2rem;
  z-index: 63;
  min-width: 240px;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}
.st-row {
  display: flex;
  justify-content: space-between;
  gap: 1.2rem;
  padding: 0.15rem 0;
}
.st-k { color: var(--muted); }
.st-v { color: var(--text-bright); font-weight: 600; }

/* ---------- Viewing progress per episode ---------- */
.ep-progress {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.2);
}
.ep-progress-fill {
  height: 100%;
  background: var(--accent);
}
.ep-seen {
  position: absolute;
  top: 5px; right: 5px;
  min-width: 28px; height: 20px;
  padding-inline: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent);
  color: #000;
  font-size: 0.7rem;
  font-weight: 700;
}

/* ---------- Tri "Voir tout" ---------- */
.cat-sort-line {
  flex-basis: 100%;
  display: flex;
  margin-top: 0.8rem;
}
.cat-sort {
  display: flex;
  align-items: center;
  gap: 2px;
  width: max-content;
  padding: 4px;
  border-radius: 9999px;
  background: rgba(22, 18, 32, 0.78);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.cat-sort .pill {
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  background: transparent;
  color: #bdb7c8;
  font-size: 14px;
}
.cat-sort .pill.active {
  background: linear-gradient(180deg, #bba8ff, #a78bfa);
  color: #14101f;
  box-shadow: 0 6px 14px -4px rgba(167, 139, 250, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

/* ---------- Channel detail EPG: hourly list + live ---------- */
.epg-row {
  display: flex;
  gap: 0.9rem;
  align-items: baseline;
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.epg-row:last-child { border-bottom: none; }
.epg-time {
  flex: 0 0 3.2rem;
  color: var(--muted);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}
.epg-prog { flex: 1; min-width: 0; }
.epg-title {
  font-size: 0.92rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.epg-row.cur .epg-title { color: var(--text-bright); font-weight: 600; }
.epg-row.cur .epg-time { color: var(--accent-hover); }
.epg-bar {
  height: 3px;
  margin-top: 0.35rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}
.epg-bar-fill {
  height: 100%;
  background: var(--grad);
}


/* ---------- Loading skeleton cards (re-added for UX polish) ---------- */
.skeleton {
  background: linear-gradient(90deg, var(--surface) 0%, rgba(40, 40, 40, 0.5) 50%, var(--surface) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  border-radius: var(--radius-md);
  pointer-events: none;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.sk-row { margin-bottom: 2.2rem; }
.sk-row-title {
  height: 28px; width: 200px;
  margin-bottom: 1rem;
  border-radius: var(--radius-sm);
}
.sk-row-scroll {
  display: flex; gap: var(--sp-4);
  overflow: hidden;
}
.sk-card {
  flex: 0 0 170px;
  display: flex; flex-direction: column;
  gap: 0.6rem;
}
.sk-poster {
  width: 100%; aspect-ratio: 2/3;
  border-radius: var(--radius-md);
}
.sk-title {
  height: 16px; width: 100%;
  border-radius: 3px;
}
.sk-card.resume .sk-poster { aspect-ratio: 16/9; }

/* ---------- Barre de progression ---------- */
#loading-bar {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  background: var(--accent);
  z-index: 100;
  width: 100%;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
#loading-bar.active {
  opacity: 0.5;
  animation: lbPulse 1.4s ease-in-out infinite;
}
@keyframes lbPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 0.15; }
}

/* ---------- Content entry fade (when API responds) ---------- */
.content-in { animation: contentIn 0.25s ease; }
@keyframes contentIn {
  from { opacity: 0.3; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Lecteur: barre haute (titre + fermer), scrim descendant ---------- */
.player-top {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 63; /* above video (z 50), aligned with .player-controls */
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: max(0.8rem, env(safe-area-inset-top)) 1.2rem 2.4rem;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.65), transparent);
  transition: opacity 0.25s ease;
}
.player-top .pc-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.player.pc-hidden .player-top {
  opacity: 0;
  pointer-events: none;
}
.pc-spacer { flex: 1; }

/* pastille ±10 s du double-tap */
.seek-fb {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 63;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-full);
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
  animation: seekPop 0.65s ease forwards;
}
.seek-fb.left { left: 10%; }
.seek-fb.right { right: 10%; }
@keyframes seekPop {
  from { opacity: 0; scale: 0.85; }
  30% { opacity: 1; scale: 1; }
  to { opacity: 0; }
}

/* ---------- "Up next" (auto-play next episode) ---------- */
.upnext {
  position: absolute;
  right: 1rem;
  bottom: max(7rem, calc(env(safe-area-inset-bottom) + 4rem));
  z-index: 63; /* above video (z 50) -- at 5 the card was invisible */
  display: flex;
  gap: 0.8rem;
  align-items: center;
  max-width: min(380px, calc(100% - 2rem));
  padding: 0.7rem;
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}
.upnext img {
  width: 110px;
  height: auto;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 8px;
  background: #0a0a0a;
}
.upnext-info { min-width: 0; }
.upnext-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--muted);
}
#upnext-title {
  font-weight: 600;
  font-size: 0.95rem;
  margin: 0.15rem 0 0.55rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* #audit-prod: le toast (z:100) passait SOUS la bottom nav — le header (z:40)
   gagnait le contexte d'empilement, et son bottom (2.5rem) tombait DANS la
   nav (5.5rem+safe). Fix: au-dessus de tout + positionné au-dessus de la nav. */
.toast {
  z-index: 1000;
  bottom: calc(6rem + env(safe-area-inset-bottom));
}
.upnext-actions { display: flex; gap: 0.5rem; }
/* focus clavier visible (souris/tap: rien) — remplace le outline:none global */
:where(button, a, [tabindex]):focus-visible {
  outline: 2px solid #e50914;
  outline-offset: 2px;
}
/* mobile tap: no 300ms delay nor accidental zoom on controls */
button, a, .card, .ep, .pill { touch-action: manipulation; }
/* accessibility: animations disabled when system requests it */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ========== Extended Breakpoints (Issue #8) - 9 niveaux de 400px à 1600px ========== */
/* Extra Small: 400px */
@media (max-width: 400px) {
  .tabs button { font-size: 0.7rem; padding: 0.5rem 0.6rem; }
  .card { width: 110px; }
}

/* Small: 480px (déjà existant) */
/* Medium: 576px */
@media (min-width: 576px) {
  .row-scroll { gap: 1.2rem; }
}

/* Large: 768px (déjà existant) */
/* 2X Large: 1200px */
@media (min-width: 1200px) {
  .row-scroll { gap: 1rem; }
  .card { width: 170px; }
}

/* 3X Large: 1400px */
@media (min-width: 1400px) {
  .card { width: 180px; }
}

/* 4X Large: 1600px */
@media (min-width: 1600px) {
  .row-scroll { gap: 1.2rem; }
  .card { width: 190px; }
}

/* ---------- #199: aide raccourcis clavier ---------- */
.kbd-body { max-width: 560px; margin: 0 auto; padding: 1.5rem 2rem 3rem; }
.kbd-group {
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 1.4rem 0 0.5rem;
}
.kbd-group:first-child { margin-top: 0; }
.kbd-table { width: 100%; border-collapse: collapse; }
.kbd-table td { padding: 0.45rem 0.6rem; border-bottom: 1px solid rgba(255, 255, 255, 0.06); font-size: 0.92rem; }
.kbd-table tr:last-child td { border-bottom: none; }
.kbd-ctx { color: var(--muted); font-size: 0.8rem; text-align: right; }
.kbd-table kbd {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-bottom-width: 2px;
  font-family: inherit;
  font-size: 0.82rem;
  color: var(--text-bright);
}

/* ---------- #200: palette de commandes (Ctrl/⌘+K) ---------- */
#cmdk { display: grid; place-items: start center; padding-top: 12vh; }
.cmdk-panel {
  width: min(560px, 92vw);
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  background: rgba(18, 18, 20, 0.97);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  animation: cmdk-in 0.16s ease;
}
@keyframes cmdk-in {
  from { opacity: 0; transform: translateY(-10px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
.cmdk-input-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.cmdk-input-row svg { color: var(--muted); flex: 0 0 auto; }
#cmdk-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text-bright);
  font-size: 1rem;
  font-family: inherit;
  /* #audit-mobile: input 20px -> zone de frappe 44px */
  padding: 12px 0;
  min-height: 44px;
}
#cmdk-input::placeholder { color: var(--muted); }

/* #232: saisie n° de chaîne — overlay discret + input mobile + flash cible */
#ch-num-overlay {
  position: fixed;
  left: 50%;
  bottom: 14vh;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  font-family: 'Outfit', sans-serif;
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  padding: 0.55rem 1.5rem 0.45rem;
  border-radius: var(--radius-full, 999px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.55);
  z-index: 95;
  pointer-events: none;
}
#ch-num-overlay[hidden] { display: none; }
#chnum {
  width: 74px;
  flex: 0 0 auto;
  padding: 0.65rem 0.55rem; /* #audit-mobile: hauteur tactile 40px+ */
  border-radius: var(--radius-full, 999px);
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-bright);
  font-size: 1rem;
  font-family: inherit;
  text-align: center;
}
#chnum:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.05);
}
@media (max-width: 560px) {
  /* #232b: l'input n° perturbe sur mobile (pas de clavier digits) — desktop only */
  #chnum { display: none; }
}
.ch-num-flash {
  outline: 3px solid #e50914;
  outline-offset: 3px;
  animation: ch-num-pulse 0.35s ease 3;
}
@keyframes ch-num-pulse {
  50% { outline-color: rgba(229, 9, 20, 0.25); }
}
.cmdk-kbd {
  padding: 0.1rem 0.45rem;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--muted);
  font-size: 0.72rem;
}
#cmdk-results { overflow-y: auto; padding: 0.5rem 0.4rem 0.7rem; }
.cmdk-group {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 0.6rem 0.8rem 0.3rem;
}
.cmdk-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 0.8rem;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text);
  font-size: 0.95rem;
}
.cmdk-item .cmdk-ico { color: var(--muted); display: grid; place-items: center; width: 20px; }
.cmdk-item.active { background: rgba(229, 9, 20, 0.16); color: var(--text-bright); }
.cmdk-item.active .cmdk-ico { color: #e50914; }
.cmdk-empty { color: var(--muted); text-align: center; padding: 1.6rem 1rem; }

/* ---------- #193: dialog détails programme EPG ---------- */
.epg-prog-panel { width: min(480px, 92vw); max-height: 80vh; }
.epg-prog-body { padding: 1.4rem 1.6rem 1.8rem; overflow-y: auto; }
.epg-prog-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-bright);
  margin: 0 0 0.7rem;
}
.epg-prog-ch { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.6rem; }
.epg-prog-ch img { width: 34px; height: 34px; object-fit: contain; border-radius: 6px; background: rgba(255,255,255,0.05); }
.epg-prog-ch span { font-size: 0.92rem; color: var(--text); }
.epg-prog-meta { display: flex; align-items: center; gap: 0.8rem; color: var(--muted); font-size: 0.86rem; margin-bottom: 0.7rem; }
.epg-prog-live { color: #f87171; font-weight: 600; }
.epg-prog-soon { color: #93c5fd; }
.epg-prog-bar { height: 4px; border-radius: 2px; background: rgba(255,255,255,0.1); margin-bottom: 0.9rem; overflow: hidden; }
.epg-prog-bar-fill { height: 100%; background: #e50914; border-radius: 2px; }
.epg-prog-desc { font-size: 0.94rem; line-height: 1.6; color: var(--text); margin: 0 0 1.2rem; }
.epg-prog-actions { display: flex; gap: 0.6rem; }
/* centrage du dialog programme + aide (comme #cmdk) */
#epg-prog, #kbd-help { display: grid; place-items: start center; padding-top: 12vh; }

/* ---------- #186: vue liste du guide (mobile façon template) ---------- */
.egl-row {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin: 0 0 10px;
}
.egl-info { flex: 1; min-width: 0; }
.egl-ch { display: flex; align-items: center; gap: 8px; }
.egl-ch-name { font-weight: 600; font-size: 13px; color: #bdb7c8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.egl-live { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; letter-spacing: 0.06em; color: #ff8a7e; white-space: nowrap; }
.egl-title {
  display: block; width: 100%; text-align: left;
  margin-top: 3px; padding: 0; border: 0; background: none; cursor: pointer;
  font-weight: 600; font-size: 15.5px; line-height: 20px; color: var(--text-bright);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.egl-row .epg-prog-bar { margin-top: 8px; height: 3px; border-radius: 3px; background: rgba(255,255,255,0.14); }
.egl-row .epg-prog-bar-fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg, rgba(167,139,250,0), #a78bfa 88%); box-shadow: 0 0 10px rgba(167,139,250,0.7); }
.egl-next { margin-top: 7px; font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; color: #b0abba; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.egl-zap {
  flex: 0 0 44px; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.08); color: #fff; border: none; cursor: pointer;
  transition: transform 0.15s ease;
}
.egl-zap:hover { transform: scale(1.08); }
.egl-row .g-num { width: 44px; height: 44px; flex: 0 0 44px; font-size: 12px; color: #cbbcff; }

/* ---------- #187: filtres de recherche ---------- */
.search-filters {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.2rem 1rem;
  flex-wrap: wrap;
}
.sf-fav { display: inline-flex; align-items: center; gap: 0.35rem; }
.sf-count { margin-left: auto; color: var(--muted); font-size: 0.85rem; }
#sec-search .title b { color: #e50914; font-weight: 700; }

/* ---------- #202: enregistrements ---------- */
.rec-poster { aspect-ratio: 16/9; display: grid; place-items: center; }
.rec-status {
  position: absolute; top: 8px; right: 8px;
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 0.8rem; font-weight: 700;
  background: rgba(0,0,0,0.6); border: 1px solid var(--glass-border);
}
.rec-done { color: #4ade80; }
.rec-recording { color: #f87171; animation: recpulse 1.2s infinite; }
.rec-failed { color: var(--muted); }
@keyframes recpulse { 50% { opacity: 0.4; } }
.rec-meta { color: var(--muted); font-size: 0.8rem; padding: 0 0.1rem 0.4rem; }
.rec-del {
  position: absolute; bottom: 8px; right: 8px;
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(0,0,0,0.6); color: #f87171;
  border: 1px solid var(--glass-border); cursor: pointer;
  opacity: 0; transition: opacity 0.2s ease, background 0.15s ease;
}
.rec-card:hover .rec-del { opacity: 1; }
.rec-del:hover { background: rgba(239, 68, 68, 0.4); color: #fff; }
@media (hover: none) { .rec-del { opacity: 1; } }

/* #203: nav temporelle — SUPPRIMÉ (doublon périmé) : guide.css est
   désormais l'unique source des boutons du header (pastilles 40px). */
