/*
  Ares Media Engine
  Copyright © Salema vitor
  All rights reserved
*/

:root {
  --tron-bg: #02040a;
  --tron-bg-alt: #050b18;
  --tron-border: #00e5ff;
  --tron-border-soft: #0088aa;
  --tron-accent: #ff9100;
  --tron-accent-soft: #ffb74d;
  --tron-text: #e0f7ff;
  --tron-muted: #7f9fb3;
  --tron-danger: #ff5252;
  --radius-lg: 18px;
  --radius-md: 12px;
  --transition-fast: 0.18s ease-out;
  --shadow-neon: 0 0 12px rgba(0, 229, 255, 0.5);
  --shadow-neon-amber: 0 0 12px rgba(255, 145, 0, 0.55);
  --fx-pulse-duration: 4s;
  --fx-scan-speed: 7s;
}

/* Thème alternatif Rouge/Bleu */
body.theme-redblue {
  --tron-bg: #04010a;
  --tron-bg-alt: #080315;
  --tron-border: #2979ff;
  --tron-border-soft: #1c54b2;
  --tron-accent: #ff1744;
  --tron-accent-soft: #ff5252;
  --tron-text: #fcefff;
  --tron-muted: #9ca7d0;
  --tron-danger: #ff1744;
  --shadow-neon: 0 0 14px rgba(41, 121, 255, 0.7);
  --shadow-neon-amber: 0 0 16px rgba(255, 23, 68, 0.75);
}

* { box-sizing: border-box; }

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden; /* la fenêtre ne scrolle plus, seulement les listes internes */
}

/* L'app occupe toute la hauteur de l’écran */
.app-shell { height: 100vh; }

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #06111f 0, #02030a 55%, #000 100%);
  color: var(--tron-text);
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  justify-content: center;
}

.app-shell {
  display: flex;
  flex: 1;
  max-width: 100%;
  width: 100%;
  margin: 0;
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(0, 8, 20, 0.96), rgba(0, 0, 0, 0.98));
  border: 1px solid rgba(0, 229, 255, 0.12);
  box-shadow:
    0 0 60px rgba(0, 229, 255, 0.16),
    0 0 60px rgba(255, 145, 0, 0.12);
  overflow: hidden;
  position: relative;
}

/* FX Tron global */
.app-shell.fx-boost::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle at center, rgba(0, 229, 255, 0.09), transparent 55%);
  pointer-events: none;
  opacity: 0;
  animation: tronPulse var(--fx-pulse-duration) infinite;
  mix-blend-mode: screen;
}

@keyframes tronPulse {
  0%   { opacity: 0; transform: scale(0.9); }
  25%  { opacity: 0.36; transform: scale(1); }
  60%  { opacity: 0.12; transform: scale(1.05); }
  100% { opacity: 0; transform: scale(1.1); }
}

/* =========================
   Sidebar
   ========================= */

.sidebar {
  width: 320px;
  max-width: 60vw;
  background: radial-gradient(circle at top left, #061629 0, #02040a 55%);
  border-right: 1px solid rgba(0, 229, 255, 0.18);
  display: flex;
  flex-direction: column;
  transition: width var(--transition-fast), transform var(--transition-fast), opacity var(--transition-fast);
  position: relative;
  z-index: 4;
}

.sidebar.collapsed {
  width: 0;
  transform: translateX(-100%);
  opacity: 0;
  pointer-events: none;
}

.sidebar-header {
  padding: 14px 16px 10px;
  border-bottom: 1px solid rgba(0, 229, 255, 0.18);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-title {
  font-family: "Orbitron", system-ui, sans-serif;
  letter-spacing: 0.12em;
  font-size: 13px;
  text-transform: uppercase;
  color: var(--tron-accent-soft);
}

.status-pill {
  margin-left: auto;
  font-size: 10px;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 3px 8px;
  border: 1px solid rgba(0, 229, 255, 0.5);
  background: radial-gradient(circle at top, rgba(0, 229, 255, 0.15), rgba(0, 0, 0, 0.6));
  color: var(--tron-text);
}

/* =========================
   Tabs (fusion + responsive)
   ========================= */

.tabs {
  display: flex;
  padding: 6px 10px 4px;
  gap: 6px;

  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 8px;
}

.tab-btn {
  flex: 1;
  border-radius: 999px;
  border: 1px solid rgba(0, 229, 255, 0.3);
  background: rgba(3, 11, 24, 0.9);
  color: var(--tron-muted);
  font-size: 11px;
  padding: 6px 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;

  flex: 1 1 calc(50% - 6px);
  min-width: 0;
  line-height: 1.2;
  white-space: nowrap;
}

.tab-btn span { font-size: 13px; }

.tab-btn.active {
  color: var(--tron-text);
  border-color: var(--tron-accent);
  background: radial-gradient(circle at top, rgba(255, 145, 0, 0.28), rgba(0, 0, 0, 0.8));
  box-shadow: var(--shadow-neon-amber);
}

@media (max-width: 420px) {
  .tab-btn { flex: 1 1 100%; }
}


/* =========================
   Tabs : bouton double (FILM / VITRINE) dans un seul slot
   Hérite des dimensions d'un .tab-btn (même flex-basis)
   ========================= */

.tab-split{
  flex: 1 1 calc(50% - 6px);
  min-width: 0;
  display: flex;
  border-radius: 999px;
  border: 1px solid rgba(0, 229, 255, 0.3);
  background: rgba(3, 11, 24, 0.9);
  overflow: hidden;
}

.tab-split-part{
  flex: 1 1 50%;
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--tron-muted);
  font-size: 11px;
  padding: 6px 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  line-height: 1.2;
  white-space: nowrap;
}

.tab-split-part + .tab-split-part{
  border-left: 1px solid rgba(0, 229, 255, 0.18);
}

.tab-split-part:hover{
  background: rgba(0, 0, 0, 0.22);
  color: var(--tron-text);
}

.tab-split .tab-btn{
  /* Le bouton FILM reste un vrai .tab-btn (pour le JS),
     mais à l'intérieur du split on neutralise ses bordures propres. */
  flex: 1 1 50%;
  min-width: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.tab-split .tab-btn.active{
  color: var(--tron-text);
  background: radial-gradient(circle at top, rgba(255, 145, 0, 0.28), rgba(0, 0, 0, 0.8));
  box-shadow: var(--shadow-neon-amber);
  transform: translateZ(0) scale(1.01);
}

@media (max-width: 420px){
  .tab-split{ flex: 1 1 100%; }
}


/* =========================
   Lists
   ========================= */

.lists-container {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.list {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  padding: 4px 8px 10px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: var(--transition-fast);

  /* Firefox scrollbar */
  scrollbar-width: thin;
  scrollbar-color: #00e5ff #050b18;
}

.list.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.scroll-fade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to bottom,
    rgba(2, 4, 10, 0.75) 0,
    transparent 24px,
    transparent calc(100% - 24px),
    rgba(2, 4, 10, 0.9) 100%
  );
  z-index: 1;
}

/* =========================
   Channel items
   ========================= */

.channel-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  margin: 4px 0;
  border-radius: var(--radius-md);
  background: rgba(2, 8, 18, 0.9);
  border: 1px solid rgba(0, 229, 255, 0.25);
  cursor: pointer;
  transition: var(--transition-fast);
  font-size: 12px;
}

.channel-item:hover {
  border-color: var(--tron-accent-soft);
  box-shadow: var(--shadow-neon-amber);
  transform: translateY(-1px);
}

.channel-item.active {
  border-color: var(--tron-accent);
  box-shadow: var(--shadow-neon-amber);
  background: radial-gradient(circle at left, rgba(255, 145, 0, 0.25), rgba(1, 4, 12, 0.98));
}

.channel-logo {
  width: 60px;
  height: 60px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.25), rgba(0, 0, 0, 0.9));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid rgba(0, 229, 255, 0.55);
  box-shadow: var(--shadow-neon);
  font-size: 15px;
  color: var(--tron-text);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.channel-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Zoom logo seulement dans la liste principale channels */
#channelList .channel-item:hover .channel-logo {
  transform: scale(2.12) translateX(18px);
  transform-origin: left center;
  box-shadow: var(--shadow-neon-amber);
  border-color: var(--tron-accent);
  z-index: 5;
}

.channel-meta { flex: 1; min-width: 0; }

.channel-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--tron-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.channel-title-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

/* =========================
   Link checker badge (🟢 OK / 🔴 KO)
   ========================= */
.link-status{
  flex: 0 0 auto;
  font-size: 9px;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.35);
  letter-spacing: .10em;
  text-transform: uppercase;
  opacity: .9;
  white-space: nowrap;
  user-select: none;
}

.link-status.pending{
  border-color: rgba(0,229,255,.35);
  color: rgba(0,229,255,.95);
}

.link-status.ok{
  border-color: rgba(0,255,140,.45);
  color: rgba(0,255,140,.95);
}

.link-status.ko{
  border-color: rgba(255,68,0,.55);
  color: rgba(255,68,0,.95);
}


.channel-num {
  flex: 0 0 auto;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 999px;
  border: 1px solid rgba(0, 229, 255, 0.25);
  background: rgba(0, 0, 0, 0.35);
  color: var(--tron-muted);
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
}

.channel-sub {
  font-size: 11px;
  color: #00e5ff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.channel-tags {
  display: flex;
  gap: 6px;
  margin-top: 2px;
}

.tag-chip {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid rgba(0, 229, 255, 0.35);
  color: var(--tron-muted);
  background: rgba(0, 0, 0, 0.4);
}

.tag-chip--iframe {
  border-color: var(--tron-accent-soft);
  color: var(--tron-accent-soft);
}

.channel-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.icon-btn {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid rgba(0, 229, 255, 0.4);
  background: rgba(0, 0, 0, 0.6);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--tron-muted);
  cursor: pointer;
  transition: var(--transition-fast);
  flex-shrink: 0;
}

.icon-btn:hover {
  border-color: var(--tron-accent);
  color: var(--tron-accent-soft);
  box-shadow: var(--shadow-neon-amber);
  transform: translateY(-1px);
}

.icon-btn[data-fav="true"] {
  color: var(--tron-accent);
  border-color: var(--tron-accent);
  text-shadow: 0 0 8px rgba(255, 145, 0, 0.8);
}

/* =========================
   Loader panel
   ========================= */

.loader-panel {
  border-top: 1px solid rgba(0, 229, 255, 0.18);
  padding: 8px 10px 9px;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.9), rgba(3, 15, 26, 0.95));
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.loader-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--tron-muted);
  margin-bottom: 27px;
}

.loader-row {
  display: flex;
  gap: 6px;
  align-items: center;
}

.loader-subrow {
  font-size: 10px;
  color: var(--tron-muted);
  display: flex;
  justify-content: space-between;
  gap: 4px;
  align-items: center;
}

/* Inputs & buttons */

.input {
  flex: 1;
  padding: 6px 8px;
  border-radius: 999px;
  border: 1px solid rgba(0, 229, 255, 0.35);
  background: rgba(2, 10, 20, 0.95);
  color: var(--tron-text);
  font-size: 11px;
  min-width: 0;
  outline: none;
  transition: var(--transition-fast);
}

.input::placeholder { color: rgba(127, 159, 179, 0.8); }

.input:focus {
  box-shadow: var(--shadow-neon);
  border-color: var(--tron-accent);
}

.btn {
  border-radius: 999px;
  border: 1px solid rgba(0, 229, 255, 0.5);
  background: radial-gradient(circle at top, rgba(0, 229, 255, 0.3), rgba(0, 0, 0, 0.9));
  color: var(--tron-text);
  font-size: 10px;
  padding: 6px 10px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  white-space: nowrap;
  transition: var(--transition-fast);
}

.btn:hover {
  box-shadow: var(--shadow-neon);
  transform: translateY(-1px);
}

.btn-ghost { background: transparent; border-color: rgba(0, 229, 255, 0.35); }

.btn-accent {
  border-color: var(--tron-accent);
  background: radial-gradient(circle at top, rgba(255, 145, 0, 0.35), rgba(0, 0, 0, 0.96));
  box-shadow: var(--shadow-neon-amber);
}

.file-input { display: none; }

/* =========================
   Main & Top bar
   ========================= */

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 10px 12px 10px 10px;
  gap: 8px;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.top-bar-left { display: flex; align-items: center; gap: 10px; }
.top-bar-right { display: flex; gap: 6px; align-items: center; }

/* Banner centré dans la top-bar (unique) */
.top-bar-banner {
  position: absolute;
  left: 5%;
  top: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  background: radial-gradient(circle at top, #00f6ff 0, #0f172a 50%);
  color: #020617;
  box-shadow: var(--border-glow-cyan);
  z-index: 0;
}

.banner-img {
  height: 38px;
  width: auto;
  filter: drop-shadow(0 0 10px var(--tron-border));
  opacity: 0.9;
  transition: opacity 0.25s ease-out, transform 0.25s ease-out;
  animation: tronBannerPulse 4s infinite alternate ease-in-out;
  aspect-ratio: 1399 / 471;
  display: block;
}

@keyframes tronBannerPulse {
  0%   { filter: drop-shadow(0 0 8px var(--tron-border)); opacity: 0.85; }
  50%  { filter: drop-shadow(0 0 20px var(--tron-accent)); opacity: 1; }
  100% { filter: drop-shadow(0 0 10px var(--tron-border-soft)); opacity: 0.9; }
}

/* Adaptation banner pour thème rouge/bleu */
body.theme-redblue .banner-img {
  animation: tronBannerPulseRedBlue 4s infinite alternate ease-in-out;
}

@keyframes tronBannerPulseRedBlue {
  0%   { filter: drop-shadow(0 0 10px rgba(41, 121, 255, 0.9)); }
  50%  { filter: drop-shadow(0 0 22px rgba(255, 23, 68, 0.95)); }
  100% { filter: drop-shadow(0 0 12px rgba(41, 121, 255, 0.9)); }
}

/* Bouton hamburger */

.toggle-sidebar-btn {
  position: relative;
  width: 40px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--tron-border);
  background: rgba(0, 0, 0, 0.85);
  cursor: pointer;
  box-shadow: var(--shadow-neon);
  transition: var(--transition-fast);
  overflow: hidden;
  gap: 0;
}

.toggle-sidebar-btn:hover {
  border-color: var(--tron-accent);
  box-shadow: var(--shadow-neon-amber);
  transform: translateY(-1px);
}

.burger-center {
  width: 16px;
  height: 2px;
  border-radius: 999px;
  background: var(--tron-text);
  position: relative;
  transition: 0.2s ease-out;
}

.burger-center::before,
.burger-center::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
  background: var(--tron-text);
  border-radius: 999px;
  transition: 0.2s ease-out;
}

.burger-center::before { top: -5px; }
.burger-center::after  { top: 5px; }

/* Etat ouvert : X */
.toggle-sidebar-btn.active .burger-center { background: transparent; }

.toggle-sidebar-btn.active .burger-center::before {
  top: 0;
  transform: rotate(45deg);
  background: var(--tron-accent-soft);
}

.toggle-sidebar-btn.active .burger-center::after {
  top: 0;
  transform: rotate(-45deg);
  background: var(--tron-accent-soft);
}

/* Icônes left/right : visibles seulement sur mobile */
.burger-left,
.burger-right { display: none; }

/* =========================
   Player
   ========================= */

.player-shell {
  position: relative;
  flex: 1;
  display: flex;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: radial-gradient(circle at center, #050810 0, #000 70%);
  border: 1px solid rgba(0, 229, 255, 0.26);
  box-shadow:
    0 0 28px rgba(0, 229, 255, 0.3),
    inset 0 0 40px rgba(0, 0, 0, 0.85);
  min-height: 260px;
}

/* FX Tron sur les bords */
.player-shell.fx-boost-edges::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: var(--radius-lg);
  background: linear-gradient(
    to right,
    rgba(0, 229, 255, 0.4),
    rgba(255, 145, 0, 0.75),
    rgba(0, 229, 255, 0.4)
  );
  background-size: 300% 100%;
  mix-blend-mode: screen;
  opacity: 0.65;
  pointer-events: none;
  animation: tronBorderFlow 6s linear infinite;
}

.player-shell.fx-boost-edges::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  background: linear-gradient(
    to bottom,
    transparent 0,
    rgba(0, 229, 255, 0.08) 50%,
    transparent 100%
  );
  background-size: 100% 42px;
  mix-blend-mode: screen;
  opacity: 0.7;
  pointer-events: none;
  animation: tronScan var(--fx-scan-speed) linear infinite;
}

@keyframes tronBorderFlow {
  0% { background-position: 0% 0; }
  100% { background-position: 300% 0; }
}

@keyframes tronScan {
  0% { background-position-y: -42px; }
  100% { background-position-y: 100%; }
}

/* PiP */

.player-shell.pip-mode {
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: 340px;
  max-width: 55vw;
  height: 190px;
  z-index: 30;
  border-radius: 18px;
  cursor: pointer;
}

.player-inner {
  position: relative;
  flex: 1;
  display: flex;
  align-items: stretch;
  justify-content: center;
}

video,
.iframe-overlay {
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, #02050a 0, #000 65%);
}

video { object-fit: fill; }

.iframe-overlay {
  position: absolute;
  inset: 0;
  border: none;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  z-index: 3;
}

.iframe-overlay.hidden { display: none; }

.iframe-overlay iframe {
  border: none;
  width: 100%;
  height: 100%;
}

/* iFrame overlay controls (ex: retour depuis bande-annonce) */
.iframe-overlay-controls{
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
}
.iframe-overlay-controls .btn{
  background: rgba(2, 10, 20, 0.78);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

/* Grille lumineuse */

.player-grid-lines::before,
.player-grid-lines::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(0, 229, 255, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 229, 255, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  mix-blend-mode: screen;
  opacity: 0.7;
}

.player-grid-lines::after {
  background-image:
    linear-gradient(to right, rgba(255, 145, 0, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 145, 0, 0.05) 1px, transparent 1px);
}

/* =========================
   Now playing / bottom bar
   ========================= */

.bottom-bar {
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(0, 229, 255, 0.24);
  background: linear-gradient(to right, rgba(0, 0, 0, 0.92), rgba(5, 18, 32, 0.92));
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.18);
}

.nav-btn {
  border-radius: 999px;
  border: 1px solid rgba(0, 229, 255, 0.55);
  background: rgba(0, 0, 0, 0.9);
  color: var(--tron-text);
  padding: 6px 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 10px;
  cursor: pointer;
  transition: var(--transition-fast);
  flex-shrink: 0;
}

.nav-btn:hover {
  transform: translateY(-1px);
  border-color: var(--tron-accent-soft);
  box-shadow: var(--shadow-neon);
  color: var(--tron-accent-soft);
}

.nav-label-arrow { font-size: 12px; }

.now-playing {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0, 229, 255, 0.35);
  background: radial-gradient(circle at top, rgba(6, 25, 49, 0.95), rgba(0, 0, 0, 0.96));
  box-shadow: var(--shadow-neon);
  overflow: hidden;
}

.np-logo {
  width: 60px;
  height: 33px;
  border-radius: 999px;
  border: 1px solid rgba(255, 145, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.25), rgba(0, 0, 0, 0.9));
  box-shadow: var(--shadow-neon-amber);
  font-size: 14px;
}

.np-logo img { width: 100%; height: 100%; object-fit: contain; }

.np-text { flex: 1; min-width: 0; }

.np-title {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.np-sub {
  font-size: 10px;
  color: var(--tron-muted);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.np-badge {
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid rgba(255, 145, 0, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--tron-accent-soft);
  background: radial-gradient(circle at top, rgba(255, 145, 0, 0.35), rgba(0, 0, 0, 0.96));
  flex-shrink: 0;
}

.np-counter {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(0, 229, 255, 0.35);
  background: rgba(0, 0, 0, 0.35);
  color: var(--tron-text);
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  min-width: 8ch; /* largeur réservée → pas de saut */
  text-align: center;
}

/* Counter tick (Now Playing) */
.np-counter.tick {
  animation: npTick 220ms ease-out;
  will-change: transform, opacity, filter;
}

@keyframes npTick {
  0%   { transform: translateY(1px); opacity: 0.72; filter: drop-shadow(0 0 0 rgba(0,0,0,0)); }
  60%  { opacity: 1; filter: drop-shadow(0 0 10px rgba(0, 229, 255, 0.25)); }
  100% { transform: translateY(0); opacity: 1; filter: drop-shadow(0 0 6px rgba(0, 229, 255, 0.15)); }
}

@media (prefers-reduced-motion: reduce) {
  .np-counter.tick { animation: none; filter: none; }
}



.helper-text {
  font-size: 10px;
  color: var(--tron-muted);
  text-align: right;
  flex-shrink: 0;
}

.helper-text span { color: var(--tron-accent-soft); }

.hidden { display: none !important; }

/* =========================
   Tracks (now-playing)
   ========================= */

.np-tracks {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-left: 8px;

  /* Réserve une place fixe pour éviter les "sauts" visuels */
  flex: 0 0 auto;
  min-width: 64px;
}


.np-track-group { position: relative; }

.np-track-btn {
  width: 26px;
  height: 26px;
  font-size: 14px;
  padding: 0;
}

.np-track-menu {
  position: fixed;
  right: 395px;
  bottom: 110px;
  min-width: 220px;
  max-width: 260px;
  max-height: 260px;
  overflow-y: auto;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid rgba(0, 229, 255, 0.6);
  background: radial-gradient(circle at top,
    rgba(3, 18, 36, 0.98),
    rgba(0, 0, 0, 0.98)
  );
  box-shadow:
    0 0 18px rgba(0, 229, 255, 0.45),
    0 0 26px rgba(255, 145, 0, 0.35);
  font-size: 11px;
  z-index: 60;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.18s ease-out, transform 0.18s ease-out;
}

.np-track-menu.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.np-track-menu-header {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--tron-muted);
  margin-bottom: 4px;
}

.np-track-item {
  padding: 5px 7px;
  border-radius: 10px;
  margin: 2px 0;
  cursor: pointer;
  border: 1px solid rgba(0, 229, 255, 0.25);
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  transition: 0.15s ease-out;
}

.np-track-item:hover {
  border-color: var(--tron-accent-soft);
  box-shadow: var(--shadow-neon-amber);
}

.np-track-item.active {
  border-color: var(--tron-accent);
  background: radial-gradient(circle at left,
    rgba(255, 145, 0, 0.25),
    rgba(0, 0, 0, 0.9)
  );
}

.np-track-item-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.np-track-item-meta { font-size: 9px; color: var(--tron-muted); }

.np-track-btn.active {
  border-color: var(--tron-accent);
  color: var(--tron-accent-soft);
  box-shadow: 0 0 10px var(--tron-accent);
}

/* =========================
   Search (sidebar)
   ========================= */

.search-row { padding: 0 10px 6px; }
.search-input { font-size: 11px; }

.search-wrapper { position: relative; width: 100%; flex: 1; min-width: 0; }

.search-bar {
  display: flex;
  gap: 8px;
  align-items: center;
}


.clear-search-btn {
  position: absolute;
  right: 3px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(0, 229, 255, 0.0);
  background: radial-gradient(circle at 30% 20%, rgba(0, 229, 255, 0.8), rgba(0, 0, 0, 0.95));
  color: var(--tron-bg);
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: 0.18s ease-out;
  box-shadow: none;
}

.search-wrapper.has-text .clear-search-btn {
  visibility: visible;
  opacity: 0.9;
  border-color: rgba(0, 229, 255, 0.8);
  color: var(--tron-text);
  box-shadow:
    0 0 6px rgba(0, 229, 255, 0.7),
    0 0 14px rgba(255, 145, 0, 0.6);
  animation: tronClearPulse 2.2s infinite ease-in-out;
}

.clear-search-btn:hover {
  opacity: 1;
  border-color: var(--tron-accent);
  color: var(--tron-accent-soft);
  box-shadow:
    0 0 10px rgba(255, 145, 0, 0.9),
    0 0 20px rgba(0, 229, 255, 0.9);
  animation-duration: 1.3s;
}

@keyframes tronClearPulse {
  0% {
    transform: translateY(-50%) scale(0.9);
    box-shadow:
      0 0 4px rgba(0, 229, 255, 0.4),
      0 0 8px rgba(255, 145, 0, 0.3);
  }
  50% {
    transform: translateY(-50%) scale(1.1);
    box-shadow:
      0 0 10px rgba(0, 229, 255, 0.9),
      0 0 20px rgba(255, 145, 0, 0.8);
  }
  100% {
    transform: translateY(-50%) scale(0.95);
    box-shadow:
      0 0 5px rgba(0, 229, 255, 0.6),
      0 0 10px rgba(255, 145, 0, 0.5);
  }
}

/* =========================
   Scrollbar TRON circuit (WebKit)
   ========================= */

.list::-webkit-scrollbar { width: 8px; }

.list::-webkit-scrollbar-track {
  background:
    linear-gradient(to bottom, transparent 0, transparent 6px, rgba(0, 229, 255, 0.25) 7px, transparent 8px),
    linear-gradient(to right, transparent 0, transparent 6px, rgba(255, 145, 0, 0.25) 7px, transparent 8px),
    radial-gradient(circle at 30% 0%, #06111f 0%, #02040a 55%, #000 100%);
  background-size: 100% 10px, 10px 100%, 100% 100%;
  border-radius: 999px;
  border: 1px solid rgba(0, 229, 255, 0.4);
  box-shadow:
    0 0 6px rgba(0, 229, 255, 0.4),
    inset 0 0 8px rgba(0, 0, 0, 0.9);
}

.list::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, rgba(0, 229, 255, 0.95), rgba(0, 180, 220, 0.95));
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.9);
  box-shadow:
    0 0 8px rgba(0, 229, 255, 0.9),
    0 0 14px rgba(0, 229, 255, 0.75);
}

.list::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(to bottom, rgba(255, 145, 0, 0.98), rgba(255, 200, 120, 0.98));
  box-shadow:
    0 0 10px rgba(255, 145, 0, 0.95),
    0 0 18px rgba(255, 145, 0, 0.8);
}

@media (max-width: 700px) {
  .list::-webkit-scrollbar { width: 6px; }
}

/* =========================
   Mini Radio (unique) + Visualizer + FX sync
   ========================= */

.mini-radio {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  margin: 6px 8px 2px;
  border-radius: 999px;
  border: 1px solid rgba(0, 229, 255, 0.35);
  background: radial-gradient(circle at left, rgba(0, 229, 255, 0.15), rgba(0, 0, 0, 0.9));
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.2);
  font-size: 11px;
}

.mini-radio-logo {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: contain;
  border: 1px solid rgba(255, 145, 0, 0.7);
  box-shadow:
    0 0 8px rgba(255, 145, 0, 0.7),
    0 0 14px rgba(0, 229, 255, 0.6);
}

.mini-radio-info { flex: 1; min-width: 0; }

.mini-radio-title {
  font-weight: 600;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-radio-rds { font-size: 10px; color: var(--tron-muted); }

.mini-radio-btn {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid rgba(0, 229, 255, 0.6);
  background: rgba(0, 0, 0, 0.8);
  color: var(--tron-text);
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: 0.18s ease-out;
}

.mini-radio-btn:hover {
  border-color: var(--tron-accent);
  box-shadow: var(--shadow-neon-amber);
  transform: translateY(-1px);
}

/* Visualizer base */
.mini-radio-viz {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 24px;
  margin-left: 8px;
  padding: 2px 4px;
  border-radius: 10px;
  background: rgba(0, 255, 255, 0.06);
  border: 1px solid rgba(0, 255, 255, 0.12);
}

.mini-radio-viz-bar {
  width: 3px;
  height: 6px;
  border-radius: 2px;
  opacity: 0.25;
  transform: translateZ(0);
  background: linear-gradient(180deg, #00ffff, #00aaff);
}

/* playing (normal) */
.mini-radio.playing .mini-radio-viz-bar {
  animation: fakeViz 0.85s infinite ease-in-out;
  opacity: 0.95;
}

.mini-radio.playing .mini-radio-viz-bar:nth-child(1){ animation-delay: 0s; }
.mini-radio.playing .mini-radio-viz-bar:nth-child(2){ animation-delay: .12s; }
.mini-radio.playing .mini-radio-viz-bar:nth-child(3){ animation-delay: .24s; }
.mini-radio.playing .mini-radio-viz-bar:nth-child(4){ animation-delay: .36s; }

@keyframes fakeViz {
  0%   { height: 4px; }
  50%  { height: 18px; }
  100% { height: 7px; }
}

/* FX Tron+ sync: utilise .app-shell.fx-boost */
.app-shell.fx-boost .mini-radio-viz {
  background: rgba(0, 255, 255, 0.10);
  border-color: rgba(0, 255, 255, 0.22);
  box-shadow:
    0 0 10px rgba(0,255,255,0.22),
    inset 0 0 10px rgba(0,255,255,0.10);
}

/* BOOST (FX ON + playing) */
.app-shell.fx-boost .mini-radio.playing .mini-radio-viz-bar {
  animation: tronBoost 0.55s infinite steps(12, end);
  opacity: 1;
  filter: saturate(1.25) contrast(1.1);
  box-shadow:
    0 0 10px rgba(0,255,255,0.55),
    0 0 18px rgba(0,170,255,0.35);
}

.app-shell.fx-boost .mini-radio.playing .mini-radio-viz-bar:nth-child(1){ animation-delay: 0s; }
.app-shell.fx-boost .mini-radio.playing .mini-radio-viz-bar:nth-child(2){ animation-delay: .06s; }
.app-shell.fx-boost .mini-radio.playing .mini-radio-viz-bar:nth-child(3){ animation-delay: .12s; }
.app-shell.fx-boost .mini-radio.playing .mini-radio-viz-bar:nth-child(4){ animation-delay: .18s; }

@keyframes tronBoost {
  0%   { height: 4px;  transform: translateY(0); }
  15%  { height: 22px; transform: translateY(-1px); }
  30%  { height: 10px; transform: translateY(0); }
  45%  { height: 26px; transform: translateY(-2px); }
  60%  { height: 14px; transform: translateY(0); }
  75%  { height: 28px; transform: translateY(-2px); }
  100% { height: 8px;  transform: translateY(0); }
}

/* IMPORTANT: pas "tronPulse" => nouveau nom */
.app-shell.fx-boost .mini-radio.playing .mini-radio-viz {
  animation: tronVizPulse 1.2s infinite ease-in-out;
}

@keyframes tronVizPulse {
  0%,100% { transform: scale(1); }
  50%     { transform: scale(1.03); }
}

/* =========================
   Sections repliables loader
   ========================= */

.loader-section {
  border-top: 1px solid rgba(0, 229, 255, 0.18);
  padding-top: 6px;
  margin-top: 4px;
}

.loader-section:first-child {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

.collapsible-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  position: relative;
  padding-right: 18px;
}

.loader-toggle-icon {
  font-size: 11px;
  opacity: 0.8;
  transition: transform 0.18s ease-out, opacity 0.18s ease-out;
}

/* Contenu caché par défaut */
.loader-section-body {
  display: none;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}

/* Quand la section est ouverte */
.loader-section.open .loader-section-body { display: flex; }
.loader-section.open .loader-toggle-icon { transform: rotate(90deg); opacity: 1; }

.collapsible-label::after {
  content: "";
  position: absolute;
  right: 2px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(0, 229, 255, 0.25);
  box-shadow: 0 0 4px rgba(0, 229, 255, 0.4);
  transition: 0.25s ease-out;
}

.loader-section.open .collapsible-label::after {
  background: rgba(255, 68, 0, 0.9);
  box-shadow: 0 0 10px rgba(255, 68, 0, 0.9), 0 0 18px rgba(0, 212, 255, 0.9);
  transform: translateY(-50%) scale(1.25);
}

/* Masquer le banner TRON en mode portrait mobile */
@media screen and (max-width: 600px) and (orientation: portrait) {
  .top-bar-banner, .banner-img { display: none !important; }
}

/* =========================
   Logo glow + pulse (unique)
   ========================= */

.channel-logo img,
.np-logo img {
  filter:
    drop-shadow(0 0 6px var(--tron-border))
    drop-shadow(0 0 12px var(--tron-border-soft));
  transition: 0.25s ease-out;
}

.channel-item:hover .channel-logo img {
  filter:
    drop-shadow(0 0 10px var(--tron-accent))
    drop-shadow(0 0 18px var(--tron-accent-soft));
}

@keyframes tronLogoPulse {
  0% {
    filter:
      drop-shadow(0 0 6px var(--tron-border))
      drop-shadow(0 0 12px var(--tron-border-soft));
  }
  50% {
    filter:
      drop-shadow(0 0 14px var(--tron-accent))
      drop-shadow(0 0 20px var(--tron-accent-soft));
  }
  100% {
    filter:
      drop-shadow(0 0 8px var(--tron-border))
      drop-shadow(0 0 14px var(--tron-border-soft));
  }
}

.channel-logo img,
.np-logo img {
  animation: tronLogoPulse 3.4s infinite ease-in-out;
}

body.theme-redblue .channel-logo img,
body.theme-redblue .np-logo img {
  animation: tronLogoPulseRB 3.4s infinite ease-in-out;
}

@keyframes tronLogoPulseRB {
  0% {
    filter:
      drop-shadow(0 0 8px rgba(41,121,255,0.8))
      drop-shadow(0 0 14px rgba(41,121,255,0.5));
  }
  50% {
    filter:
      drop-shadow(0 0 18px rgba(255,23,68,0.9))
      drop-shadow(0 0 26px rgba(255,23,68,0.65));
  }
  100% {
    filter:
      drop-shadow(0 0 8px rgba(41,121,255,0.8))
      drop-shadow(0 0 14px rgba(41,121,255,0.5));
  }
}

/* =========================
   Responsive
   ========================= */

@media (max-width: 900px) {
  body { align-items: stretch; }

  .app-shell {
    flex-direction: column;
    margin: 0;
    border-radius: 0;
  }

  .main { padding: 8px; }

  .player-shell {
    min-height: auto;
    aspect-ratio: 16 / 9;
  }

  .bottom-bar { flex-wrap: wrap; gap: 6px; }

  .helper-text {
    text-align: left;
    width: 100%;
    margin-top: 2px;
  }

  .sidebar {
    position: fixed;
    inset: 0;
    max-width: 80vw;
    height: 100%;
    z-index: 50;
    box-shadow: 0 0 32px rgba(0, 0, 0, 0.9);
  }

  .sidebar.collapsed {
    transform: translateX(-100%);
    opacity: 0;
  }
  /* Mobile/tablette : garder le bouton burger toujours visible (au-dessus de la sidebar) */
  .toggle-sidebar-btn{
    position: fixed;
    top: calc(10px + env(safe-area-inset-top));
    right: calc(10px + env(safe-area-inset-right));
    z-index: 80;
  }

}

@media (max-width: 768px) {
  .top-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }

  .top-bar-left { justify-content: center; }

  .top-bar-right {
    flex-wrap: wrap;
    justify-content: flex-end;
}

  .top-bar-right .btn{
    flex: 1 1 40%;
    justify-content: center;
  }

  .toggle-sidebar-btn{
    flex: 0 0 auto;
    justify-content: center;
    margin-left: auto;
  }

  .now-playing { order: -1; margin-bottom: 4px; }

  .nav-btn {
    flex: 1 1 30%;
    justify-content: center;
  }

  /* Mobile : un seul burger (centre) */
  .burger-left,
  .burger-right{ display:none !important; }
/* Mobile : bottom-sheet tracks */
  .np-track-menu {
    left: 10px;
    right: 10px;
    bottom: 90px;
    max-width: none;
  }
}

@media (max-width: 540px) {
  .banner-img { height: 52px; }

  .bottom-bar { padding: 6px; border-radius: 10px; }

  .np-logo { display: none; }

  .np-title { font-size: 11px; }
  .np-sub { font-size: 8px; }

  .helper-text { font-size: 9px; }

  .loader-panel { font-size: 11px; }

  .loader-row .btn {
    padding-inline: 6px;
    font-size: 9px;
  }

  .player-shell.pip-mode {
    right: 6px;
    bottom: 6px;
    width: 230px;
    height: 130px;
  }
}

/* Mobile en mode paysage : sidebar jusqu'au haut du now-playing */
@media screen and (max-width: 900px) and (orientation: landscape) {
  .sidebar {
    top: 0;
    bottom: 90px;
    height: auto;
  }

  /* Top-bar banner: always centered + never overlaps the fixed burger (landscape mobile) */
  .top-bar{
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 8px;

    /* leave room for the fixed burger button on the right */
    padding-left: calc(10px + env(safe-area-inset-left));
    padding-right: calc(54px + env(safe-area-inset-right));
  }

  .top-bar-left{ justify-self: start; }
  .top-bar-right{ justify-self: end; flex-wrap: nowrap; }

  .top-bar-banner{
    position: static;
    left: auto;
    top: auto;
    transform: none;
    justify-self: center;
    max-width: 46vw;
    pointer-events: none;
    z-index: 0;
  }

  .banner-img{
    height: clamp(24px, 8vh, 40px);
    max-width: 100%;
    width: auto;
  }
}

/* FIX MOBILE PAYSAGE (S24 & co) */
@media screen and (max-height: 520px) and (orientation: landscape) {
  html, body {
    height: auto;
    min-height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
  }

  .app-shell {
    height: auto;
    min-height: 100vh;
    max-width: 100%;
    margin: 0;
    border-radius: 0;
  }

  .main {
    flex: 1 0 auto;
    padding: 4px 8px;
  }

  .top-bar { margin-bottom: 4px; }

  /* Even tighter banner for very short landscape screens */
  .banner-img{ height: clamp(22px, 9vh, 34px); }


  .player-shell {
    flex: 0 0 auto;
    height: 65vh;
    min-height: 0;
  }

  .bottom-bar {
    margin-top: 4px;
    position: sticky;
    bottom: 0;
    z-index: 20;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 90px;
    height: auto;
    max-height: none;
    max-width: 80vw;
    z-index: 50;
  }

  .sidebar.collapsed { transform: translateX(-100%); }

  .loader-panel { display: none !important; }
  .lists-container { height: 100%; }
}

/* FORCE APP-SHELL FULL WIDTH ON DESKTOP */
@media (min-width: 1025px) {
  #appShell, .app-shell {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100vh !important;
    margin: 0 !important;
  }
}
/* =========================
   RADIO PANEL IN PLAYER
   ========================= */
.player-inner{ position: relative; }

.radio-panel.hidden{ display:none; }

.radio-panel{
  position:absolute;
  inset:0;
  z-index: 30;
  display:grid;
  place-items:center;
  padding: 16px;
  background:
    radial-gradient(900px 600px at 50% 30%, rgba(0,255,255,.14), transparent 60%),
    radial-gradient(900px 600px at 50% 70%, rgba(255,145,0,.12), transparent 60%),
    rgba(4, 8, 14, .92);
  backdrop-filter: blur(10px);
}

.radio-panel-close{
  position:absolute;
  top: 12px;
  right: 12px;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.28);
  color: rgba(255,255,255,.92);
  cursor:pointer;
  z-index: 31;
}

.radio-panel-card{
  width: min(720px, 100%);
  border-radius: 22px;
  padding: 18px;
  border: 1px solid rgba(0,255,255,.22);
  background: linear-gradient(180deg, rgba(10,18,28,.86), rgba(6,10,16,.86));
  box-shadow:
    0 0 0 1px rgba(255,145,0,.10) inset,
    0 18px 50px rgba(0,0,0,.55),
    0 0 22px rgba(0,255,255,.10);
  position: relative;
  overflow:hidden;
}

.radio-panel-card::before{
  content:"";
  position:absolute;
  inset:-2px;
  background: repeating-linear-gradient(
    90deg,
    rgba(0,255,255,.08) 0px,
    rgba(0,255,255,.08) 1px,
    transparent 1px,
    transparent 18px
  );
  opacity:.25;
  pointer-events:none;
}

.radio-panel-header{
  display:flex;
  align-items:center;
  gap: 14px;
  padding: 8px 6px 6px;
}

.radio-panel-logo-wrap{
  width: 72px;
  height: 72px;
  border-radius: 18px;
  display:grid;
  place-items:center;
  background: rgba(0,0,0,.28);
  border: 1px solid rgba(0,255,255,.22);
  box-shadow: 0 0 16px rgba(0,255,255,.16);
}

.radio-panel-logo{
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.radio-panel-title{
  font-family: "Orbitron", system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: .4px;
  font-size: 22px;
  color: rgba(255,255,255,.95);
}

.radio-panel-sub{
  margin-top: 4px;
  opacity: .78;
  font-size: 13px;
}

.radio-panel-viz{
  height: 130px;
  margin: 14px 6px 12px;
  border-radius: 18px;
  border: 1px solid rgba(255,145,0,.18);
  background: rgba(0,0,0,.25);
  display:flex;
  align-items:flex-end;
  justify-content:center;
  gap: 8px;
  padding: 14px;
  box-shadow: 0 0 18px rgba(255,145,0,.10);
}

.radio-panel-viz span{
  width: 10px;
  height: 30%;
  border-radius: 10px;
  background: linear-gradient(to top, rgba(0,255,255,.85), rgba(255,145,0,.85));
  opacity: .9;
  transform-origin: bottom;
  animation: rpv 900ms ease-in-out infinite;
}
.radio-panel-viz span:nth-child(2){ animation-delay: 120ms; }
.radio-panel-viz span:nth-child(3){ animation-delay: 240ms; }
.radio-panel-viz span:nth-child(4){ animation-delay: 360ms; }
.radio-panel-viz span:nth-child(5){ animation-delay: 480ms; }
.radio-panel-viz span:nth-child(6){ animation-delay: 100ms; }
.radio-panel-viz span:nth-child(7){ animation-delay: 220ms; }
.radio-panel-viz span:nth-child(8){ animation-delay: 340ms; }
.radio-panel-viz span:nth-child(9){ animation-delay: 460ms; }
.radio-panel-viz span:nth-child(10){ animation-delay: 580ms; }

@keyframes rpv{
  0%{ transform: scaleY(.35); }
  50%{ transform: scaleY(1.15); }
  100%{ transform: scaleY(.45); }
}

.radio-panel-actions{
  display:flex;
  gap: 10px;
  padding: 6px;
}

.radio-panel-btn{
  flex:1;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.25);
  color: rgba(255,255,255,.92);
  cursor:pointer;
}

.radio-panel-btn-primary{
  border: 1px solid rgba(0,255,255,.25);
  box-shadow: 0 0 18px rgba(0,255,255,.10);
}

/* NP Counter: pas de saut */
#npCounterWrap{
  flex: 0 0 120px;              /* réserve une place fixe */
  display:flex;
  justify-content:flex-end;
  align-items:center;
}

/* PRO+ Radio: l'overlay radio est injecté en JS (#radioOverlayLayer). Le panneau HTML #radioPanel reste caché. */
#radioPanel{display:none !important;}
/* Mobile fix: sidebar au-dessus de l'overlay radio */
@media (max-width: 900px) {
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(92vw, 360px);
    max-width: 100vw;
    height: 100dvh;
    z-index: 1000;
    transform: translateX(-105%);
    transition: transform 0.3s ease;
    box-shadow: 0 0 32px rgba(0,0,0,0.9);
    will-change: transform;
  }

  .sidebar:not(.collapsed) {
    transform: translateX(0);
  }

  .sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 999;
    background: rgba(0,0,0,0.7);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }

  body.sidebar-open .sidebar-overlay {
    opacity: 1;
    pointer-events: auto;
  }

  body.sidebar-open {
    overflow: hidden;
    touch-action: none;
  }
}

@media (max-width: 900px) {
  .sidebar { z-index: 120; }
  #radioOverlayLayer { z-index: 80 !important; }
}




/* =========================
   Stream URL (Akamai-style)
   ========================= */
.btn-icon{
  width: 34px;
  padding: 6px 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  letter-spacing: 0;
  text-transform: none;
}

.streamurl-overlay{
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,.62);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 14px;
}

.streamurl-card{
  width: min(420px, calc(100vw - 28px));
  border-radius: 18px;
  border: 1px solid rgba(0,229,255,.35);
  background: radial-gradient(circle at top, rgba(0,229,255,.14), rgba(0,0,0,.92));
  box-shadow: 0 0 28px rgba(0,229,255,.18), 0 0 38px rgba(255,145,0,.10);
  padding: 12px 12px 10px;
}

.streamurl-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.streamurl-title{
  font-family: 'Orbitron', sans-serif;
  font-weight: 800;
  letter-spacing: .08em;
  font-size: 12px;
  color: rgba(255,255,255,.92);
  text-transform: uppercase;
}

.streamurl-close{
  border: 1px solid rgba(0,229,255,.25);
  background: rgba(0,0,0,.25);
  color: rgba(255,255,255,.9);
  border-radius: 12px;
  width: 34px;
  height: 34px;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor: pointer;
  transition: var(--transition-fast);
}
.streamurl-close:hover{
  border-color: rgba(255,145,0,.45);
  box-shadow: 0 0 14px rgba(255,145,0,.22);
}

.streamurl-label{
  display:block;
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin: 10px 2px 6px;
  color: rgba(255,255,255,.72);
}

.streamurl-input{
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(0,229,255,.25);
  background: rgba(0,0,0,.45);
  color: rgba(255,255,255,.92);
  padding: 10px 12px;
  outline: none;
  font-size: 12px;
}
.streamurl-input:focus{
  border-color: rgba(255,145,0,.55);
  box-shadow: 0 0 0 2px rgba(255,145,0,.15);
}

.streamurl-actions{
  display:flex;
  gap: 10px;
  margin-top: 12px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.streamurl-hint{
  margin-top: 10px;
  font-size: 11px;
  color: rgba(255,255,255,.70);
}
.streamurl-hint span{
  color: rgba(0,229,255,.9);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 11px;
}



/* =====================================================
   LITE PERFORMANCE OVERRIDES (test INP / paint)
   Objectif: réduire blur, filters, gros shadows, animations
   ===================================================== */

:root{
  --shadow-neon: 0 0 6px rgba(0, 229, 255, 0.25);
  --shadow-neon-amber: 0 0 6px rgba(255, 145, 0, 0.25);
}

:root{
  /* Glows légers (peu coûteux) */
  --shadow-neon: 0 0 8px rgba(0, 229, 255, 0.30);
  --shadow-neon-amber: 0 0 8px rgba(255, 145, 0, 0.28);
}

/* Empêche un micro-shift quand l’UI change (scrollbar stable) */
html{ scrollbar-gutter: stable; }

/* Stabilise le LCP vidéo (évite des micro-ajustements au chargement) */
#videoEl{
  display:block;
  width:100%;
  height:auto;
  aspect-ratio: 16 / 9;
}

/* 1) BLUR : OFF sur grandes surfaces (garde l’INP bas) */
#radioOverlayLayer{ backdrop-filter: none !important; }
.radio-panel{ backdrop-filter: none !important; }
.streamurl-overlay{ backdrop-filter: none !important; }

/* 2) Filters coûteux : OFF (drop-shadow / blur / etc.) */
.banner-img,
.channel-logo img,
.np-logo img{
  filter: none !important;
}

/* 3) Tabs : transitions ciblées (OK), + glow léger sur active */
.tab-btn{
  transition: transform 140ms ease, opacity 140ms ease, border-color 140ms ease, background-color 140ms ease !important;
  will-change: transform;
}
.tab-btn.active{
  background: rgba(0,0,0,.65) !important;
  box-shadow: var(--shadow-neon) !important;
  transform: translateZ(0) scale(1.01);
}

/* 4) Hover glows (légers) — pas de filters */
.channel-item:hover,
.channel-item.active,
.icon-btn:hover,
.toggle-sidebar-btn:hover,
.nav-btn:hover,
.btn:hover,
.mini-radio-btn:hover{
  box-shadow: var(--shadow-neon) !important;
  filter: none !important;
}

/* 5) Zoom logos : réduit (évite repaint lourd) */
#channelList .channel-item:hover .channel-logo{
  transform: translateZ(0) scale(1.03) !important;
  box-shadow: var(--shadow-neon) !important;
}

/* 6) Isolation rendu overlays (bon pour l’INP) */
#radioOverlayLayer,
.streamurl-overlay{
  contain: layout paint;
  transform: translateZ(0);
}

/* 7) Respect “réduire les animations” */
@media (prefers-reduced-motion: reduce){
  *{ animation: none !important; transition: none !important; }
}


/* ============================
   🆕 Derniers ajouts
   ============================ */
#newAdditionsContainer{
  display:flex;
  justify-content:center;
  margin:10px 0;
}
#newAdditionsContainer.hidden{ display:none; }

#newAdditionsBtn{
  font-size:11px;
  padding:8px 14px;
  border:1px solid var(--tron-accent);
  background: radial-gradient(circle at top, rgba(255,145,0,0.35), rgba(0,0,0,0.9));
  border-radius:999px;
  box-shadow: var(--shadow-neon-amber);
  color: var(--tron-text);
  cursor:pointer;
  transition: var(--transition-fast);
}
#newAdditionsBtn:hover{
  transform: translateY(-1px);
  box-shadow: 0 0 14px rgba(255,145,0,0.9);
}


/* =========================
   Perf: reduced motion
   ========================= */
@media (prefers-reduced-motion: reduce) {
  .banner-img,
  .channel-logo img,
  .np-logo img,
  .app-shell.fx-boost::before,
  .player-shell.fx-boost-edges::before,
  .player-shell.fx-boost-edges::after,
  .mini-radio.playing .mini-radio-viz-bar,
  .app-shell.fx-boost .mini-radio.playing .mini-radio-viz,
  .np-counter.tick {
    animation: none !important;
  }

  * {
    scroll-behavior: auto !important;
    transition-duration: 0ms !important;
  }
}



/* ============================
   🎥 Actions Films (côte à côte)
   ============================ */

.films-actions-row{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  margin:10px 0 6px;
  padding:0 12px;
}

.films-actions-row .action-slot{
  flex:1;
  display:flex;
}

.films-actions-row .action-slot.hidden{ display:none; }

.films-actions-row .action-slot > button{
  width:100%;
  min-width:0;
}

#newAdditionsBtn{
  font-size:11px;
  padding:8px 14px;
  border:1px solid var(--tron-accent);
  background: radial-gradient(circle at top, rgba(255,145,0,0.35), rgba(0,0,0,0.9));
  border-radius:999px;
  box-shadow: var(--shadow-neon-amber);
  color: var(--tron-text);
  cursor:pointer;
  transition: var(--transition-fast);
}
#newAdditionsBtn:hover{
  transform: translateY(-1px);
  box-shadow: 0 0 14px rgba(255,145,0,0.9);
}

#showcaseBtn{
  font-size:11px;
  padding:8px 14px;
  border-radius:999px;
}


/* =========================
   🎞️ Vitrine (overlay dans le player)
   z-index: 26 (au-dessus vidéo/iframe, sous radio-panel z=30)
   ========================= */

.showcase-overlay{
  position:absolute;
  inset:0;
  z-index:26;
  display:flex;
  flex-direction:column;
  background: rgba(0,0,0,0.68);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-radius: 18px;
  overflow:hidden;
}

.showcase-overlay.hidden{ display:none; }

.showcase-topbar{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border-bottom:1px solid rgba(0,255,255,0.18);
  background: linear-gradient(90deg, rgba(0,0,0,0.75), rgba(0,255,255,0.06));
}

.showcase-search{
  flex:1;
  min-width:0;
  height:34px;
  padding:0 12px;
  border-radius:999px;
  border:1px solid rgba(0,229,255,0.35);
  background: rgba(0,0,0,0.72);
  color: var(--tron-text);
  outline:none;
  font-size:12px;
}
.showcase-search:focus{
  border-color: var(--tron-accent);
  box-shadow: var(--shadow-neon-amber);
}

.showcase-close{
  width:34px;
  height:34px;
  border-radius:999px;
  border:1px solid rgba(0,229,255,0.35);
  background: rgba(0,0,0,0.72);
  color: var(--tron-text);
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  transition: var(--transition-fast);
}
.showcase-close:hover{
  border-color: var(--tron-accent);
  box-shadow: var(--shadow-neon-amber);
  transform: translateY(-1px);
}

.showcase-body{
  flex:1;
  overflow:auto;
  padding:10px 12px 14px;
}

.showcase-section{
  margin: 6px 0 14px;
}

.showcase-section-title{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:10px;
  margin: 6px 2px 8px;
}

.showcase-section-title .name{
  font-size:12px;
  letter-spacing:.06em;
  text-transform:uppercase;
  color: var(--tron-muted);
}

.showcase-section-title .count{
  font-size:11px;
  color: rgba(0,229,255,0.85);
}

.showcase-row{
  display:flex;
  gap:10px;
  overflow-x:auto;
  padding: 2px 2px 10px;
  scroll-snap-type: x proximity;
}

.showcase-row::-webkit-scrollbar{ height: 8px; }
.showcase-row::-webkit-scrollbar-thumb{
  background: linear-gradient(to right, rgba(0,229,255,0.75), rgba(255,145,0,0.7));
  border-radius: 999px;
}

.showcase-card{
  position:relative;
  width: 128px;
  flex: 0 0 auto;
  border-radius: 14px;
  overflow:hidden;
  border:1px solid rgba(0,229,255,0.22);
  background: rgba(0,0,0,0.7);
  box-shadow: 0 0 14px rgba(0,229,255,0.08);
  cursor:pointer;
  scroll-snap-align: start;
  transition: var(--transition-fast);
}

.showcase-card:hover{
  border-color: var(--tron-accent);
  box-shadow: var(--shadow-neon-amber);
  transform: translateY(-2px);
}

.showcase-card .poster{
  width:100%;
  height: 172px;
  background: rgba(0,0,0,0.55);
  display:flex;
  align-items:center;
  justify-content:center;
}

.showcase-card .poster img{
  width:100%;
  height:100%;
  object-fit: cover;
  display:block;
}

.showcase-card .poster .letter{
  width:100%;
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:800;
  font-size:34px;
  color: rgba(0,229,255,0.9);
  text-shadow: 0 0 10px rgba(0,229,255,0.4);
}

.showcase-card .meta{
  padding:8px 8px 9px;
}

.showcase-card .title{
  font-size:11px;
  font-weight:600;
  white-space: nowrap;
  overflow:hidden;
  text-overflow: ellipsis;
}

.showcase-card .chips{
  display:flex;
  flex-wrap:wrap;
  gap:4px;
  margin-top:6px;
}

.showcase-chip{
  font-size:9px;
  padding:2px 6px;
  border-radius:999px;
  border:1px solid rgba(0,229,255,0.28);
  color: var(--tron-muted);
  background: rgba(0,0,0,0.5);
  letter-spacing:.06em;
  text-transform:uppercase;
}

.showcase-info{
  position:absolute;
  top:6px;
  right:6px;
  z-index:2;
  width:26px;
  height:26px;
  border-radius:999px;
  border:1px solid rgba(0,229,255,0.35);
  background: rgba(0,0,0,0.72);
  color: var(--tron-text);
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
}
.showcase-info:hover{
  border-color: var(--tron-accent);
  box-shadow: var(--shadow-neon-amber);
}


/* =========================
   TMDb Synopsis + Backdrop (dans le player)
   z-index: 27 (au-dessus vitrine)
   ========================= */

.tmdb-synopsis-backdrop{
  position:absolute;
  inset:0;
  z-index:27;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:16px;
  background: rgba(0,0,0,0.7);
  overflow:hidden;
}

.tmdb-synopsis-backdrop.hidden{ display:none; }

.tmdb-synopsis-backdrop::before{
  content:"";
  position:absolute;
  inset:0;
  background-position: center;
  background-size: cover;
  background-repeat:no-repeat;
  opacity:0.55;
  filter: blur(10px) saturate(1.1);
  transform: scale(1.05);
}

.tmdb-synopsis-card{
  position:relative;
  z-index:1;
  width: min(860px, 100%);
  border-radius:18px;
  border:1px solid rgba(0,229,255,0.25);
  background: rgba(0,0,0,0.78);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 0 26px rgba(0,229,255,0.18);
  overflow:hidden;
}

.tmdb-synopsis-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  padding:12px 12px 10px;
  border-bottom:1px solid rgba(0,229,255,0.16);
}

.tmdb-synopsis-title{
  font-size:14px;
  font-weight:700;
}

.tmdb-synopsis-meta{
  margin-top:4px;
  font-size:11px;
  color: var(--tron-muted);
}

.tmdb-synopsis-close{
  width:34px;
  height:34px;
  border-radius:999px;
  border:1px solid rgba(0,229,255,0.35);
  background: rgba(0,0,0,0.72);
  color: var(--tron-text);
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
}
.tmdb-synopsis-close:hover{
  border-color: var(--tron-accent);
  box-shadow: var(--shadow-neon-amber);
}

.tmdb-synopsis-body{
  padding:12px;
  font-size:12px;
  line-height:1.45;
  color: rgba(255,255,255,0.92);
}

.tmdb-synopsis-actions{
  display:flex;
  gap:8px;
  padding: 0 12px 12px;
  flex-wrap:wrap;
}

.tmdb-synopsis-actions .btn{
  flex: 1 1 auto;
}


/* ===== TMDb synopsis card (rich layout) ===== */
.tmdb-synopsis-content{
  display:flex;
  gap:12px;
  padding:12px;

  flex:1 1 auto;
  min-height:0;
  overflow:hidden;
}
.tmdb-synopsis-poster{
  flex:0 0 120px;
  width:120px;
  height:180px;
  border-radius:14px;
  overflow:hidden;
  border:1px solid rgba(0,229,255,0.22);
  background: rgba(0,0,0,0.35);
  display:flex;
  align-items:center;
  justify-content:center;
}
.tmdb-synopsis-poster img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.tmdb-synopsis-letter{
  width:100%;
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:44px;
  color: rgba(255,255,255,0.92);
}
.tmdb-synopsis-main{
  flex:1 1 auto;
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:10px;

  min-height:0;
  overflow:auto;
  -webkit-overflow-scrolling: touch;
}
.tmdb-synopsis-body{
  padding:0;
  font-size:12px;
  line-height:1.5;
  color: rgba(255,255,255,0.92);
  flex: 1 1 auto;
  min-height: 0;
  overflow: visible;
  padding-right:6px;
}
.tmdb-synopsis-source{
  font-size:11px;
  color: var(--tron-muted);
}
@media (max-width:520px){
  .tmdb-synopsis-content{ flex-direction:column; }
  .tmdb-synopsis-poster{ width:110px; height:165px; }
}
/* ================================
   Badge NEW (vitrine : Derniers ajouts)
   Affiché uniquement via JS, ici on ne fait que le style.
   ================================ */
.showcase-card .poster{
  position: relative;
  overflow: hidden;
}

.showcase-card .badge-new{
  position:absolute;
  top:8px;
  left:8px;
  z-index: 3;
  padding: 4px 7px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  border-radius: 999px;
  color: #001016;
  background: rgba(0,229,255,0.95);
  box-shadow: 0 0 14px rgba(0,229,255,0.35);
  border: 1px solid rgba(0,229,255,0.75);
  text-transform: uppercase;
  pointer-events:none;
}
/* =========================================================
   VITRINE BUTTON — NEON PULSE (only this button)
   ========================================================= */

#showcaseBtn.btn-ghost{
  position: relative;

  /* néon discret dans le thème */
  background: linear-gradient(135deg,
    rgba(0,229,255,0.62),
    rgba(255,145,0,0.10)
  );

  border-color: rgba(0,229,255,0.35);

  /* glow de base */
  box-shadow:
    0 0 10px rgba(0,229,255,0.25),
    0 0 18px rgba(255,145,0,0.18);

  /* pulse façon Wifeo */
  animation: vitrinePulseShadow 2.2s ease-out infinite;
}

#showcaseBtn.btn-ghost:hover{
  box-shadow:
    0 0 14px rgba(0,229,255,0.35),
    0 0 26px rgba(255,145,0,0.25);
}

/* Pulse néon : halo qui s’étend puis disparaît */
@keyframes vitrinePulseShadow{
  0%{
    box-shadow:
      0 0 10px rgba(0,229,255,0.25),
      0 0 18px rgba(255,145,0,0.18),
      0 0 0 0 rgba(0,229,255,0.35),
      0 0 0 0 rgba(255,145,0,0.22);
  }
  60%{
    box-shadow:
      0 0 10px rgba(0,229,255,0.25),
      0 0 18px rgba(255,145,0,0.18),
      0 0 0 10px rgba(0,229,255,0.00),
      0 0 0 16px rgba(255,145,0,0.00);
  }
  100%{
    box-shadow:
      0 0 10px rgba(0,229,255,0.25),
      0 0 18px rgba(255,145,0,0.18),
      0 0 0 0 rgba(0,229,255,0.00),
      0 0 0 0 rgba(255,145,0,0.00);
  }
}
/* =========================================================
   VITRINE — Play overlay (pro, desktop hover + mobile tactile)
   ========================================================= */

/* Assure un bon empilement */
.showcase-card { position: relative; }
.showcase-card .poster { position: relative; overflow: hidden; }

/* Voile léger + bouton play au centre */
.showcase-card .poster::before{
  content:"";
  position:absolute;
  inset:0;
  z-index:1;
  pointer-events:none;
  opacity:0;
  transition: opacity .18s ease-out;
  background: radial-gradient(circle at center,
    rgba(0,229,255,0.12),
    rgba(0,0,0,0.62)
  );
}

.showcase-card .poster::after{
  content:"▶";
  position:absolute;
  left:50%;
  top:50%;
  transform: translate(-50%,-50%) scale(.92);
  width:47px;
  height:47px;
  border-radius:999px;
  display:flex;
  align-items:center;
  justify-content:center;

  z-index:2;
  pointer-events:none;

  opacity:0;
  transition: opacity .18s ease-out, transform .18s ease-out, box-shadow .18s ease-out;

  color: rgba(224,247,255,0.95);
  font-size:18px;
  line-height:1;

  background: rgba(0,0,0,0.58);
  border: 1px solid rgba(0,229,255,0.45);
  box-shadow:
    0 0 14px rgba(0,229,255,0.22),
    inset 0 0 12px rgba(255,145,0,0.12);
}

/* Le bouton info doit rester au-dessus */
.showcase-info{ z-index:6; }

/* Desktop : hover = effet visible */
.showcase-card:hover .poster::before,
.showcase-card:hover .poster::after{
  opacity:1;
}

.showcase-card:hover .poster::after{
  transform: translate(-50%,-50%) scale(1);
  box-shadow:
    0 0 18px rgba(0,229,255,0.35),
    0 0 16px rgba(255,145,0,0.22),
    inset 0 0 14px rgba(255,145,0,0.16);
}

/* Mobile : pas de hover => on affiche en permanence (discret) */
@media (hover: none) and (pointer: coarse){
  .showcase-card .poster::before{
    opacity:.30;
  }
  .showcase-card .poster::after{
    opacity:.75;
    transform: translate(-50%,-50%) scale(.98);
    animation: vitrinePlayPulse 1.6s ease-in-out infinite;
  }

  /* petit "clic" au tap */
  .showcase-card:active .poster::after{
    transform: translate(-50%,-50%) scale(.94);
    animation: none;
  }
}

/* Pulse néon léger (reste dans le thème) */
@keyframes vitrinePlayPulse{
  0%,100%{
    box-shadow:
      0 0 12px rgba(0,229,255,0.20),
      inset 0 0 12px rgba(255,145,0,0.10);
  }
  50%{
    box-shadow:
      0 0 18px rgba(0,229,255,0.34),
      0 0 14px rgba(255,145,0,0.18),
      inset 0 0 14px rgba(255,145,0,0.14);
  }
}

/* Respect "reduce motion" */
@media (prefers-reduced-motion: reduce){
  .showcase-card .poster::after{ animation: none !important; }
}


/* =========================
   ★ Jaune + User Score Chart
   ========================= */

.icon-btn.fav-btn{
  color: #ffd400;
}
.icon-btn.fav-btn[data-fav="false"]{
  opacity: 0.65;
}
.icon-btn.fav-btn[data-fav="true"]{
  opacity: 1;
  text-shadow: 0 0 10px rgba(255,212,0,0.45);
}

.rating-star{
  color: #ffd400;
}

.tmdb-meta-sep{
  color: rgba(0,229,255,0.35);
  padding: 0 2px;
}

.tmdb-synopsis-head-right{
  display:flex;
  align-items:center;
  gap:10px;
  flex: 0 0 auto;
}


.user-score-wrap{
  display:flex;
  align-items:center;
  gap:10px;
  flex:0 0 auto;
}

.user-score-label{
  font-size:10px;
  line-height:1.05;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(0,229,255,0.88);
  text-shadow: 0 0 10px rgba(0,229,255,0.25);
  user-select:none;
  white-space:nowrap;
}

.user-score-wrap .user-score-chart.empty ~ .user-score-label{
  opacity:0.6;
}

/* TMDB + TRON user score ring */
.user-score-chart{
  width:44px;
  height:44px;
  position:relative;
  flex:0 0 auto;

  /* Dynamic ring colors (TMDb tiers) */
  --usc-color: #21d07a;
  --usc-glow: rgba(33,208,122,0.70);
  --usc-glow2: rgba(33,208,122,0.35);
  --usc-core: #081c22; /* TMDb-ish deep teal */
}

.user-score-chart.empty{
  opacity:0.55;
}

/* tiers */
.user-score-chart.score-low{
  --usc-color: #db2360;
  --usc-glow: rgba(219,35,96,0.75);
  --usc-glow2: rgba(219,35,96,0.40);
  --usc-core: #1c0b18;
}
.user-score-chart.score-med{
  --usc-color: #d2d531;
  --usc-glow: rgba(210,213,49,0.70);
  --usc-glow2: rgba(210,213,49,0.35);
  --usc-core: #191a08;
}
.user-score-chart.score-high{
  --usc-color: #21d07a;
  --usc-glow: rgba(33,208,122,0.70);
  --usc-glow2: rgba(33,208,122,0.35);
  --usc-core: #081c22;
}

/* inner disc (TMDb vibe) + Tron edge */
.user-score-chart::before{
  content:"";
  position:absolute;
  inset:0;
  border-radius:50%;
  background:
    radial-gradient( circle at 30% 25%,
      rgba(255,255,255,0.10) 0%,
      rgba(255,255,255,0.06) 18%,
      rgba(255,255,255,0.00) 45%),
    radial-gradient( circle at 50% 55%,
      rgba(0,229,255,0.08) 0%,
      rgba(0,229,255,0.00) 55%),
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.00)),
    radial-gradient(circle at 50% 55%, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0.55) 70%),
    radial-gradient(circle at 50% 55%, var(--usc-core) 0%, rgba(2,4,10,0.92) 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.06),
    inset 0 0 0 2px rgba(0,0,0,0.35),
    0 0 0 1px rgba(0,229,255,0.20);
  pointer-events:none;
}

/* outer neon halo */
.user-score-chart::after{
  content:"";
  position:absolute;
  inset:-2px;
  border-radius:50%;
  box-shadow:
    0 0 0 1px rgba(0,229,255,0.10),
    0 0 18px rgba(0,0,0,0.40),
    0 0 22px var(--usc-glow2),
    0 0 36px var(--usc-glow);
  opacity:0.0;
  transform: scale(0.985);
  transition: opacity 450ms ease, transform 450ms ease;
  pointer-events:none;
}

.user-score-chart.animated::after{
  opacity:0.95;
  transform: scale(1);
  animation: uscGlowPulse 2.6s ease-in-out infinite;
}

@keyframes uscGlowPulse{
  0%,100%{
    filter: saturate(1);
    opacity:0.82;
  }
  50%{
    filter: saturate(1.12);
    opacity:1.0;
  }
}

.user-score-chart .usc-svg{
  width:44px;
  height:44px;
  transform: rotate(-90deg);
  position:relative;
  z-index:1;
}

.user-score-chart .usc-track{
  stroke: rgba(255,255,255,0.12);
}

.user-score-chart .usc-prog{
  stroke: var(--usc-color);
  transition: stroke-dashoffset 950ms cubic-bezier(.2,.8,.2,1), stroke 250ms linear;
  will-change: stroke-dashoffset;
}

.user-score-chart .usc-text{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:11px;
  font-weight:900;
  color: rgba(255,255,255,0.96);
  text-shadow: 0 0 10px rgba(0,0,0,0.55), 0 0 10px rgba(0,229,255,0.10);
  transform: translateZ(0) scale(0.90);
  opacity:0.0;
  transition: transform 650ms cubic-bezier(.2,.8,.2,1), opacity 650ms ease;
  z-index:2;
}

.user-score-chart.animated .usc-text{
  transform: translateZ(0) scale(1);
  opacity:1.0;
}

.user-score-chart .usc-text span{
  font-size:9px;
  opacity:0.86;
  margin-left:1px;
}


/* =========================================================
   ✅ VITRINE — Recherche + filtres (année / catégorie)
   ========================================================= */

.showcase-topbar{
  flex-wrap: wrap;
}

.showcase-search-wrap{
  position: relative;
  flex: 1 1 220px;
  min-width: 180px;
}

.showcase-search{
  width: 100%;
  padding-right: 40px; /* place pour le bouton effacer */
}

.showcase-clear{
  position:absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid rgba(0,229,255,0.28);
  background: rgba(0,0,0,0.55);
  color: rgba(255,255,255,0.92);
  cursor: pointer;
  display: none;
  align-items:center;
  justify-content:center;
  transition: var(--transition-fast);
}

.showcase-search-wrap.has-text .showcase-clear{
  display:flex;
}

.showcase-clear:hover{
  border-color: var(--tron-accent);
  box-shadow: var(--shadow-neon-amber);
  transform: translateY(-50%) translateY(-1px);
}

.showcase-select{
  height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(0,229,255,0.35);
  background: rgba(0,0,0,0.72);
  color: var(--tron-text);
  outline: none;
  font-size: 12px;
  flex: 0 1 170px;
  min-width: 150px;
}

.showcase-select:focus{
  border-color: var(--tron-accent);
  box-shadow: var(--shadow-neon-amber);
}

.showcase-reset{
  width:34px;
  height:34px;
  border-radius:999px;
  border:1px solid rgba(0,229,255,0.35);
  background: rgba(0,0,0,0.72);
  color: var(--tron-text);
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  transition: var(--transition-fast);
}

.showcase-reset:hover{
  border-color: var(--tron-accent);
  box-shadow: var(--shadow-neon-amber);
  transform: translateY(-1px);
}

@media (max-width: 520px){
  .showcase-select{
    flex: 1 1 140px;
    min-width: 0;
  }
}

/* =========================================================
   ✅ TMDb synopsis — scroll interne fiable (mobile)
   ========================================================= */

.tmdb-synopsis-backdrop{
  -webkit-overflow-scrolling: touch;
  overflow:hidden;
  overscroll-behavior: contain;
  padding:
    calc(16px + env(safe-area-inset-top))
    calc(16px + env(safe-area-inset-right))
    calc(16px + env(safe-area-inset-bottom))
    calc(16px + env(safe-area-inset-left));
}

.tmdb-synopsis-card{
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  display: flex;
  flex-direction: column;
}

.tmdb-synopsis-content{
  flex: 1 1 auto;
  overflow: hidden; /* le scroll se fait dans le body du synopsis */
  min-height:0;
}

.tmdb-synopsis-main{
  flex: 1 1 auto;
  overflow: auto;
  min-height:0;
}

.tmdb-synopsis-body{
  flex: 1 1 auto;
  max-height: none;
  overflow: visible;
}

@media (max-width: 520px){
  /* Le backdrop ne scrolle pas: seul le texte scrolle dans .tmdb-synopsis-body */
  .tmdb-synopsis-backdrop{
    align-items: stretch;
  }

  .tmdb-synopsis-card{
    width: 100%;
    max-height: calc(100vh - 20px);
    max-height: calc(100dvh - 20px);
  }
}


/* =========================================================
   FIX MOBILE TMDB SYNOPSIS
   Objectif: en mobile, seule la zone synopsis (body) scrolle,
   tandis que les crédits (extra/source) + boutons restent visibles.
   ========================================================= */
@media (max-width: 520px){
  .tmdb-synopsis-card{
    display:flex;
    flex-direction:column;
    max-height: calc(100dvh - 20px);
  }

  /* la zone centrale (poster + colonne texte) doit être contenue */
  .tmdb-synopsis-content{
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
  }

  /* colonne texte : ne scrolle PAS en mobile */
  .tmdb-synopsis-main{
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden !important;
    display:flex;
    flex-direction:column;
  }

  /* le synopsis est la seule zone scrollable */
  .tmdb-synopsis-body{
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto !important;
    -webkit-overflow-scrolling: touch;
    padding-right: 8px; /* petite marge pour la scrollbar */
  }

  /* crédits + source restent sous le synopsis */
  .tmdb-synopsis-extra,
  .tmdb-synopsis-source{
    flex: 0 0 auto;
  }

  /* les actions restent en bas de la card */
  .tmdb-synopsis-actions{
    flex: 0 0 auto;
  }
}

/* neutralise une ancienne surcouche qui laissait le body déborder (chevauchements) */
.tmdb-synopsis-body{
  overflow: auto;
}


/* =========================
   Sous-titres : overlay recherche
   ========================= */
.subsearch-overlay{
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0,0,0,.64);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
}

.subsearch-card{
  width: min(760px, calc(100vw - 28px));
  max-height: min(78vh, 760px);
  overflow: auto;
  border-radius: 18px;
  border: 1px solid rgba(0,229,255,.35);
  background: radial-gradient(circle at top, rgba(0,229,255,.14), rgba(0,0,0,.92));
  box-shadow: 0 0 28px rgba(0,229,255,.18), 0 0 38px rgba(255,145,0,.10);
  padding: 12px 12px 14px;
}

.subsearch-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.subsearch-title{
  font-family: 'Orbitron', sans-serif;
  font-weight: 800;
  letter-spacing: .08em;
  font-size: 12px;
  color: rgba(255,255,255,.92);
  text-transform: uppercase;
}

.subsearch-close{
  border: 1px solid rgba(0,229,255,.25);
  background: rgba(0,0,0,.25);
  color: rgba(255,255,255,.9);
  border-radius: 12px;
  width: 34px;
  height: 34px;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor: pointer;
  transition: var(--transition-fast);
}
.subsearch-close:hover{
  border-color: rgba(255,145,0,.45);
  box-shadow: 0 0 14px rgba(255,145,0,.22);
}

.subsearch-row{ margin-top: 10px; }

.subsearch-label{
  display:block;
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin: 0 2px 6px;
  color: rgba(255,255,255,.72);
}

.subsearch-input, .subsearch-select{
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(0,229,255,.25);
  background: rgba(0,0,0,.45);
  color: rgba(255,255,255,.92);
  padding: 10px 12px;
  outline: none;
  font-size: 12px;
}
.subsearch-input:focus, .subsearch-select:focus{
  border-color: rgba(255,145,0,.55);
  box-shadow: 0 0 0 2px rgba(255,145,0,.15);
}

.subsearch-hint{
  margin-top: 6px;
  font-size: 11px;
  color: rgba(255,255,255,.68);
}

.subsearch-actions{
  display:flex;
  gap: 10px;
  margin-top: 12px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.subsearch-status{
  margin-top: 10px;
  font-size: 12px;
  color: rgba(255,255,255,.80);
  min-height: 18px;
}

.subsearch-results{
  margin-top: 10px;
  display: grid;
  gap: 10px;
}

.subsearch-item{
  border: 1px solid rgba(0,229,255,.22);
  background: rgba(0,0,0,.35);
  border-radius: 14px;
  padding: 10px 10px 8px;
}

.subsearch-item-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 10px;
}

.subsearch-item-title{
  font-weight: 700;
  color: rgba(255,255,255,.92);
  font-size: 13px;
  line-height: 1.2;
}

.subsearch-item-meta{
  margin-top: 6px;
  font-size: 12px;
  color: rgba(255,255,255,.70);
}

.subsearch-item-actions{
  display:flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-top: 10px;
}

.subsearch-mini-btn{
  border-radius: 12px;
  border: 1px solid rgba(0,229,255,.22);
  background: rgba(0,0,0,.25);
  color: rgba(255,255,255,.92);
  padding: 8px 10px;
  cursor: pointer;
  transition: var(--transition-fast);
  font-size: 12px;
}
.subsearch-mini-btn:hover{
  border-color: rgba(255,145,0,.45);
  box-shadow: 0 0 14px rgba(255,145,0,.18);
}

.subsearch-footnote{
  margin-top: 12px;
  font-size: 11px;
  color: rgba(255,255,255,.70);
}
.subsearch-footnote span{
  color: rgba(0,229,255,.9);
}

/* Performance: pas de blur ici */
.subsearch-overlay{ backdrop-filter: none !important; }
.help-i-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-left: 8px;
  border-radius: 999px;
  cursor: pointer;
  user-select: none;
  border: 1px solid rgba(0,255,255,.35);
  background: rgba(0,0,0,.35);
  color: #d9ffff;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 0 0 1px rgba(255,145,0,.15) inset;
}
.tmdb-flag{
  margin-right:6px;
  font-size:14px;
  vertical-align:middle;
  filter: drop-shadow(0 0 6px rgba(0,0,0,.6));
}
.tab-flag{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:18px;
  height:14px;
  margin-right:6px;
  transform: translateY(1px);
}
.tab-flag .flag{
  width:18px;
  height:12px;
  border-radius:2px;
  overflow:hidden;
  box-shadow: 0 0 0 1px rgba(255,255,255,.12) inset;
}


/* =========================
   TMDb Synopsis Card — Animations + Skeleton (Nice-to-have)
   ========================= */

.tmdb-synopsis-backdrop:not(.hidden){
  animation: tmdbFadeIn 160ms ease-out both;
}

.tmdb-synopsis-card{
  transform-origin: 50% 60%;
}

.tmdb-synopsis-backdrop:not(.hidden) .tmdb-synopsis-card{
  animation: tmdbCardIn 200ms cubic-bezier(.2,.8,.2,1) both;
}

@keyframes tmdbFadeIn{
  from{ opacity:0; }
  to{ opacity:1; }
}

@keyframes tmdbCardIn{
  from{ opacity:0; transform: translateY(10px) scale(.985); }
  to{ opacity:1; transform: translateY(0) scale(1); }
}

/* Skeleton shimmer */
.tmdb-synopsis-card.loading .user-score-wrap{
  opacity:.35;
}

.tmdb-skel{
  border-radius: 10px;
  background: linear-gradient(90deg,
    rgba(255,255,255,0.06) 0%,
    rgba(255,255,255,0.10) 45%,
    rgba(255,255,255,0.06) 100%);
  background-size: 200% 100%;
  animation: tmdbShimmer 1.1s ease-in-out infinite;
  border: 1px solid rgba(0,229,255,0.10);
}

@keyframes tmdbShimmer{
  0%{ background-position: 200% 0; }
  100%{ background-position: -200% 0; }
}

.tmdb-skel-poster{
  width: 120px;
  height: 180px;
  border-radius: 14px;
}

.tmdb-skel-line{
  height: 10px;
  margin: 8px 0;
  border-radius: 999px;
}

.tmdb-skel-btn{
  height: 34px;
  border-radius: 999px;
}

/* width helpers */
.tmdb-skel.w-92{ width:92%; }
.tmdb-skel.w-88{ width:88%; }
.tmdb-skel.w-80{ width:80%; }
.tmdb-skel.w-76{ width:76%; }
.tmdb-skel.w-64{ width:64%; }
.tmdb-skel.w-60{ width:60%; }
.tmdb-skel.w-58{ width:58%; }
.tmdb-skel.w-55{ width:55%; }
.tmdb-skel.w-40{ width:40%; }
.tmdb-skel.w-35{ width:35%; }
.tmdb-skel.w-30{ width:30%; }


@media (prefers-reduced-motion: reduce) {
  .channel-item.skeleton {
    animation: none;
  }
}


@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;     /* top:0; bottom:0; left:0 */
    width: min(92vw, 360px);
    height: 100dvh;
    max-height: 100dvh;
    z-index: 1000;
    transform: translateX(-105%);
    transition: transform 0.3s ease;
    will-change: transform;
  }

  .sidebar:not(.collapsed) {
    transform: translateX(0);
  }

  /* Overlay séparé (idéal) */
  .sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 999;          /* juste sous la sidebar */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }

  body.sidebar-open .sidebar-overlay {
    opacity: 1;
    pointer-events: auto;
  }

  body.sidebar-open {
    overflow: hidden;
    touch-action: none;
  }
}
.fr-program-badge {
  margin-left: 6px;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  opacity: 0.8;
}

.fr-program-badge:hover {
  opacity: 1;
}
