/* ==========================================================================
   DONPLAYER ULTRA - ÉDITION LUXE ROSE PERLE & VERT CYAN
   Design Haute Couture OLED : Rose Perle Nacré & Vert Cyan Émeraude
   Avec Mini-Lecteur en diffusion direct intégrée (Prévisualisation Live)
   ========================================================================== */

:root {
  --bg-dark: #060810;
  --bg-gradient: radial-gradient(circle at 50% 0%, #0d1629 0%, #060912 60%, #020307 100%);
  --surface-card: rgba(14, 20, 36, 0.75);
  --surface-card-hover: rgba(22, 32, 58, 0.9);
  --surface-glass: rgba(10, 15, 28, 0.88);

  /* Thème Principal : Vert Cyan & Rose Perle */
  --accent-cyan: #06b6d4;
  --accent-cyan-rgb: 6, 182, 212;
  --accent-cyan-light: #67e8f9;
  --accent-cyan-bright: #38bdf8;
  --accent-cyan-bright-rgb: 56, 189, 248;
  --accent-deep: #0284c7;
  --accent-cyan-mint: #10b981;
  --accent-series: #a855f7;
  --cyan-glow: rgba(var(--accent-cyan-rgb), 0.45);

  --accent-rose: #f472b6;
  --accent-rose-rgb: 244, 114, 182;
  --accent-rose-hot: #ec4899;
  --accent-rose-hot-rgb: 236, 72, 153;
  --accent-rose-pearl: #fb7185;
  --accent-rose-light: #fce7f3;
  --rose-glow: rgba(var(--accent-rose-rgb), 0.45);

  --border-glass: rgba(255, 255, 255, 0.09);
  --border-focus: var(--accent-cyan);
  --border-glow: rgba(var(--accent-cyan-rgb), 0.5);

  --text-primary: #ffffff;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  --font-main: 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
  --transition-fast: 0.16s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

html[data-theme="gold-obsidian"] {
  --bg-dark: #090602;
  --bg-gradient: radial-gradient(circle at 50% 0%, #241908 0%, #0d0904 60%, #030201 100%);
  --surface-card: rgba(26, 19, 9, 0.78);
  --surface-card-hover: rgba(44, 31, 14, 0.92);
  --surface-glass: rgba(17, 12, 6, 0.90);
  --accent-cyan: #f59e0b;
  --accent-cyan-rgb: 245, 158, 11;
  --accent-cyan-light: #fde68a;
  --accent-cyan-bright: #fbbf24;
  --accent-cyan-bright-rgb: 251, 191, 36;
  --accent-deep: #d97706;
  --accent-cyan-mint: #facc15;
  --accent-series: #fb7185;
  --accent-rose: #fb923c;
  --accent-rose-rgb: 251, 146, 60;
  --accent-rose-hot: #ea580c;
  --accent-rose-hot-rgb: 234, 88, 12;
  --accent-rose-pearl: #fdba74;
  --accent-rose-light: #ffedd5;
}

html[data-theme="emerald-neon"] {
  --bg-dark: #030a07;
  --bg-gradient: radial-gradient(circle at 50% 0%, #072318 0%, #04110c 60%, #010504 100%);
  --surface-card: rgba(10, 28, 22, 0.78);
  --surface-card-hover: rgba(16, 44, 34, 0.92);
  --surface-glass: rgba(7, 19, 15, 0.90);
  --accent-cyan: #10b981;
  --accent-cyan-rgb: 16, 185, 129;
  --accent-cyan-light: #6ee7b7;
  --accent-cyan-bright: #34d399;
  --accent-cyan-bright-rgb: 52, 211, 153;
  --accent-deep: #059669;
  --accent-cyan-mint: #2dd4bf;
  --accent-series: #38bdf8;
  --accent-rose: #22d3ee;
  --accent-rose-rgb: 34, 211, 238;
  --accent-rose-hot: #06b6d4;
  --accent-rose-hot-rgb: 6, 182, 212;
  --accent-rose-pearl: #a7f3d0;
  --accent-rose-light: #ecfdf5;
}

html[data-theme="cyber-violet"] {
  --bg-dark: #06030e;
  --bg-gradient: radial-gradient(circle at 50% 0%, #1d1035 0%, #0c0618 60%, #040208 100%);
  --surface-card: rgba(22, 14, 42, 0.78);
  --surface-card-hover: rgba(36, 22, 68, 0.92);
  --surface-glass: rgba(14, 9, 28, 0.90);
  --accent-cyan: #a855f7;
  --accent-cyan-rgb: 168, 85, 247;
  --accent-cyan-light: #d8b4fe;
  --accent-cyan-bright: #c084fc;
  --accent-cyan-bright-rgb: 192, 132, 252;
  --accent-deep: #7e22ce;
  --accent-cyan-mint: #38bdf8;
  --accent-series: #38bdf8;
  --accent-rose: #f43f5e;
  --accent-rose-rgb: 244, 63, 94;
  --accent-rose-hot: #e879f9;
  --accent-rose-hot-rgb: 232, 121, 249;
  --accent-rose-pearl: #fda4af;
  --accent-rose-light: #fae8ff;
}

html[data-theme="crimson-fire"] {
  --bg-dark: #090204;
  --bg-gradient: radial-gradient(circle at 50% 0%, #270a11 0%, #120408 60%, #050102 100%);
  --surface-card: rgba(32, 12, 18, 0.78);
  --surface-card-hover: rgba(52, 18, 28, 0.92);
  --surface-glass: rgba(22, 8, 12, 0.90);
  --accent-cyan: #f43f5e;
  --accent-cyan-rgb: 244, 63, 94;
  --accent-cyan-light: #fda4af;
  --accent-cyan-bright: #fb7185;
  --accent-cyan-bright-rgb: 251, 113, 133;
  --accent-deep: #e11d48;
  --accent-cyan-mint: #fb923c;
  --accent-series: #f59e0b;
  --accent-rose: #fb923c;
  --accent-rose-rgb: 251, 146, 60;
  --accent-rose-hot: #f59e0b;
  --accent-rose-hot-rgb: 245, 158, 11;
  --accent-rose-pearl: #fecdd3;
  --accent-rose-light: #fff1f2;
}

html[data-theme="ice-cobalt"] {
  --bg-dark: #02050c;
  --bg-gradient: radial-gradient(circle at 50% 0%, #0a1e3d 0%, #040b18 60%, #010409 100%);
  --surface-card: rgba(10, 22, 46, 0.78);
  --surface-card-hover: rgba(16, 36, 72, 0.92);
  --surface-glass: rgba(7, 15, 32, 0.90);
  --accent-cyan: #3b82f6;
  --accent-cyan-rgb: 59, 130, 246;
  --accent-cyan-light: #93c5fd;
  --accent-cyan-bright: #60a5fa;
  --accent-cyan-bright-rgb: 96, 165, 250;
  --accent-deep: #2563eb;
  --accent-cyan-mint: #22d3ee;
  --accent-series: #818cf8;
  --accent-rose: #38bdf8;
  --accent-rose-rgb: 56, 189, 248;
  --accent-rose-hot: #818cf8;
  --accent-rose-hot-rgb: 129, 140, 248;
  --accent-rose-pearl: #bae6fd;
  --accent-rose-light: #eff6ff;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

body {
  background: var(--bg-dark);
  background-image: var(--bg-gradient);
  color: var(--text-primary);
  font-family: var(--font-main);
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Background Ambient Glows : Couleurs Thème Dynamique */
.ambient-glow-1 {
  position: fixed;
  top: -15%;
  left: 15%;
  width: 750px;
  height: 550px;
  background: radial-gradient(circle, rgba(var(--accent-cyan-rgb), 0.17) 0%, transparent 65%);
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
  transition: background 1.35s cubic-bezier(0.22, 1, 0.36, 1), transform 1.35s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.ambient-glow-2 {
  position: fixed;
  bottom: -15%;
  right: 15%;
  width: 750px;
  height: 550px;
  background: radial-gradient(circle, rgba(var(--accent-rose-rgb), 0.16) 0%, transparent 65%);
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
  transition: background 1.35s cubic-bezier(0.22, 1, 0.36, 1), transform 1.35s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

html.is-theme-shifting .ambient-glow-1 {
  transform: scale(1.16) translate3d(28px, 14px, 0);
}

html.is-theme-shifting .ambient-glow-2 {
  transform: scale(1.18) translate3d(-28px, -14px, 0);
}

/* ==========================================================================
   NAVIGATION FOCUS STATES (REMOTE CONTROL / D-PAD & KEYBOARD)
   ========================================================================== */
.focusable {
  outline: none;
  transition: all var(--transition-fast);
}

.focusable:focus,
.focusable.focused {
  outline: none;
  border-color: var(--accent-cyan) !important;
  box-shadow: 0 0 0 3px var(--cyan-glow), 0 12px 35px rgba(0, 0, 0, 0.8) !important;
  transform: translateY(-4px) scale(1.03);
  z-index: 10;
}

/* ==========================================================================
   HEADER BAR (ÉDITION THÈMES FUTURISTES)
   ========================================================================== */
.smarters-header {
  position: relative;
  height: 80px;
  padding: 0 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(6, 9, 18, 0.8);
  backdrop-filter: blur(25px);
  border-bottom: 1px solid var(--border-glass);
  z-index: 30;
  flex-shrink: 0;
}

.smarters-header::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-cyan), var(--accent-rose), transparent);
  opacity: 0.25;
  transform: scaleX(0.35);
  transition: opacity 0.55s ease, transform 1.15s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

html.is-theme-shifting .smarters-header::after {
  opacity: 1;
  transform: scaleX(1);
  box-shadow: 0 0 18px var(--accent-cyan), 0 0 28px rgba(var(--accent-rose-rgb), 0.7);
}

.header-brand-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-crest {
  width: 52px;
  height: 52px;
  background: rgba(14, 20, 36, 0.85);
  border: 1.5px solid var(--accent-cyan);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px var(--cyan-glow);
  padding: 4px;
  overflow: hidden;
}

.brand-crest-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-titles h1 {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.5px;
  color: #fff;
}

.brand-titles h1 span {
  background: linear-gradient(135deg, var(--accent-rose), var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-titles p {
  font-size: 11px;
  color: var(--accent-cyan-light);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 700;
}

/* Header Center: Real-Time DateTime */
.header-center-info {
  display: flex;
  align-items: center;
  gap: 24px;
}

.clock-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.clock-time {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 1px;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.3);
}

.clock-date {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-rose-light);
  text-transform: capitalize;
}

/* Header Right: Quick Tools */
.header-actions-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.account-status-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(var(--accent-cyan-rgb), 0.12);
  border: 1px solid rgba(var(--accent-cyan-rgb), 0.35);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-cyan-light);
  box-shadow: 0 0 14px rgba(var(--accent-cyan-rgb), 0.2);
}

.header-now-playing-pill {
  display: none !important;
  align-items: center;
  gap: 8px;
  max-width: 340px;
  padding: 7px 14px;
  background: linear-gradient(135deg, rgba(var(--accent-rose-rgb), 0.16), rgba(var(--accent-cyan-rgb), 0.16));
  border: 1px solid rgba(var(--accent-rose-rgb), 0.45);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-now-playing-pill span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (min-width: 951px) {
  .header-now-playing-pill.has-live {
    display: inline-flex !important;
  }
}

.live-green-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan);
}

.icon-btn-header {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
}

.icon-btn-header:hover {
  background: rgba(var(--accent-cyan-rgb), 0.15);
  border-color: var(--accent-cyan);
}

/* ==========================================================================
   APP SCREENS CONTAINER
   ========================================================================== */
.app-screen {
  position: absolute;
  top: 80px;
  left: 0;
  right: 0;
  bottom: 0;
  display: none;
  overflow: hidden;
}

.app-screen.active {
  display: flex;
}

/* ==========================================================================
   SMARTERS PRO MAIN DASHBOARD SCREEN (ROSE PERLE & CYAN)
   ========================================================================== */
.smarters-dashboard-wrap {
  flex: 1;
  padding: 30px 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  max-width: 95%;
  margin: 0 auto;
  width: 100%;
}

/* Top 3 Iconic Hero Cards */
.smarters-hero-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  margin-top: 10px;
}

.hero-smarters-card {
  position: relative;
  height: 290px;
  border-radius: var(--radius-xl);
  border: 1.5px solid var(--border-glass);
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
  background: var(--surface-card);
  backdrop-filter: blur(20px);
}

.hero-smarters-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 100% 0%, var(--hero-glow), transparent 60%);
  opacity: 0.35;
  transition: opacity var(--transition-smooth);
  pointer-events: none;
}

.hero-smarters-card:hover::after,
.hero-smarters-card.focused::after {
  opacity: 0.75;
}

/* Card Themes : Thème Dynamique Actif */
.card-live-tv {
  --hero-glow: var(--accent-rose-pearl);
  border-bottom: 4px solid var(--accent-rose);
}
.card-movies {
  --hero-glow: var(--accent-cyan);
  border-bottom: 4px solid var(--accent-cyan);
}
.card-series {
  --hero-glow: var(--accent-series);
  border-bottom: 4px solid var(--accent-series);
}

.hero-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  z-index: 2;
}

.hero-badge-tag {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-full);
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
}

.hero-icon-3d {
  width: 90px;
  height: 90px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45);
  transition: transform var(--transition-smooth);
}

.hero-smarters-card:hover .hero-icon-3d,
.hero-smarters-card.focused .hero-icon-3d {
  transform: scale(1.1) rotate(4deg);
}

.hero-card-bottom {
  z-index: 2;
}

.hero-card-bottom h2 {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 0.5px;
  color: #fff;
  margin-bottom: 6px;
}

.hero-card-bottom p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.hero-action-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 800;
  color: var(--accent-cyan-light);
  margin-top: 14px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

/* Bottom 6 Smarters Navigation Cards */
.smarters-sub-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  margin-bottom: 10px;
}

.sub-smarters-card {
  background: var(--surface-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
}

.sub-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 10px;
}

.sub-card-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.sub-card-desc {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ==========================================================================
   LIVE TV & CHANNELS SCREEN (3 COLUMNS) - 100% FLUIDE ET COMPATIBLE SOURIS TV
   ========================================================================== */
.live-tv-container {
  display: flex;
  flex: 1;
  overflow: hidden;
  width: 100%;
  height: 100%;
  min-height: 0;
}

/* Colonne Catégories Stable & Directe */
.tv-categories-col {
  width: 270px;
  background: rgba(8, 12, 24, 0.95);
  border-right: 1px solid var(--border-glass);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  min-height: 0;
  z-index: 20;
}

.tv-col-header {
  padding: 18px 20px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  white-space: nowrap;
}

.tv-col-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
}

.cat-header-icon {
  font-size: 16px;
}

.header-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  margin-right: 8px;
}
.header-back-btn:hover,
.header-back-btn:active,
.header-back-btn:focus {
  background: var(--accent-cyan);
  color: #030712;
  border-color: var(--accent-cyan);
}

.tv-col-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-shutter-toggle {
  background: rgba(var(--accent-cyan-rgb), 0.12);
  border: 1px solid rgba(var(--accent-cyan-rgb), 0.35);
  color: var(--accent-cyan);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  transition: all 0.25s ease;
}

.btn-shutter-toggle:hover {
  background: var(--accent-cyan);
  color: #060810;
  box-shadow: 0 0 10px var(--accent-cyan);
}

.shutter-icon {
  display: inline-block;
  transition: transform 0.35s ease;
}

/* Mode volet replié sans distorsion 3D pour la souris */
.live-tv-container.shutter-cat-collapsed .tv-categories-col {
  width: 72px;
}

.live-tv-container.shutter-cat-collapsed .tv-categories-col:hover {
  width: 270px;
}

.live-tv-container.shutter-cat-collapsed .tv-categories-col:not(:hover) .cat-header-text,
.live-tv-container.shutter-cat-collapsed .tv-categories-col:not(:hover) .cat-text-wrap {
  display: none !important;
}

.live-tv-container.shutter-cat-collapsed .tv-categories-col:not(:hover) .tv-cat-btn {
  justify-content: center;
  padding: 6px 0;
  border-color: transparent;
  background: transparent;
}

.live-tv-container.shutter-cat-collapsed .tv-categories-col:not(:hover) .cat-badge-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  transform: scale(1);
}

.live-tv-container.shutter-cat-collapsed .tv-categories-col:not(:hover) .tv-col-header {
  padding: 18px 8px;
  justify-content: center;
}

.tv-categories-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Category Buttons with Rich 3D Badges */
.tv-cat-btn {
  padding: 8px 12px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  gap: 12px;
}

.tv-cat-btn:hover,
.tv-cat-btn.active,
.tv-cat-btn.focused {
  background: rgba(var(--accent-cyan-rgb), 0.12);
  color: #fff;
  border-color: rgba(var(--accent-cyan-rgb), 0.45);
  box-shadow: 0 4px 18px rgba(var(--accent-cyan-rgb), 0.18);
  transform: translateX(4px);
}

/* 3D Glowing Category Badge Box */
.cat-badge-box {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.25);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.cat-badge-box::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
  border-radius: 9px 9px 0 0;
}

.tv-cat-btn:hover .cat-badge-box,
.tv-cat-btn.active .cat-badge-box {
  transform: scale(1.08);
}

.cat-badge-icon {
  font-size: 19px;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.cat-text-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cat-title-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cat-btn-label {
  font-size: 12.5px;
  font-weight: 800;
  color: #f1f5f9;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.2px;
}

.tv-cat-btn.active .cat-btn-label {
  color: var(--accent-cyan-light);
}

.cat-sub-label {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--text-muted);
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tv-cat-btn.active .cat-sub-label {
  color: rgba(255, 255, 255, 0.7);
}

.cat-btn-count {
  font-size: 10.5px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.85);
  padding: 1px 7px;
  border-radius: 10px;
  flex-shrink: 0;
}

.tv-cat-btn.active .cat-btn-count {
  background: var(--accent-cyan);
  color: #0b0f19;
}

/* Réajustement dynamique des proportions (Volet) */
.tv-channels-col {
  width: 420px;
  background: rgba(6, 9, 18, 0.92);
  border-right: 1px solid var(--border-glass);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  min-height: 0;
  transition: width 0.65s cubic-bezier(0.25, 1, 0.5, 1);
}

.live-tv-container.shutter-cat-collapsed .tv-channels-col {
  width: 480px;
}

@media (min-width: 2200px) {
  .live-tv-container.shutter-cat-collapsed .tv-channels-col {
    width: 620px;
  }
}

.search-input-wrap {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-glass);
}

.search-field {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  color: #fff;
  padding: 10px 14px 10px 38px;
  font-size: 13px;
  outline: none;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%23cbd5e1" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></svg>');
  background-repeat: no-repeat;
  background-position: 12px center;
}

.search-field:focus {
  border-color: var(--accent-cyan);
}

.tv-channels-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tv-easy-scroll-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 8px 10px;
  background: rgba(10, 15, 28, 0.96);
  border-top: 1px solid var(--border-glass);
  flex-shrink: 0;
  opacity: 0.85;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.tv-categories-col:hover .tv-easy-scroll-bar,
.tv-channels-col:hover .tv-easy-scroll-bar {
  opacity: 1;
}

.btn-tv-scroll {
  background: rgba(var(--accent-cyan-rgb), 0.14);
  border: 1.5px solid rgba(var(--accent-cyan-rgb), 0.45);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  padding: 10px 8px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-tv-scroll:hover,
.btn-tv-scroll:focus {
  background: var(--accent-cyan);
  color: #060810;
  box-shadow: 0 0 14px var(--accent-cyan);
}

.live-tv-container.shutter-cat-collapsed .tv-categories-col:not(:hover) .tv-easy-scroll-bar {
  display: none !important;
}

.channel-item-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  cursor: pointer;
}

.channel-item-row:hover,
.channel-item-row.focused {
  background: var(--surface-card-hover);
  border-color: var(--accent-cyan);
}

.channel-item-row.active {
  background: linear-gradient(90deg, rgba(var(--accent-rose-rgb), 0.2), rgba(var(--accent-cyan-rgb), 0.2));
  border-color: var(--accent-rose);
  box-shadow: 0 0 14px rgba(var(--accent-rose-rgb), 0.25);
}

.channel-item-row.is-offline {
  opacity: 0.55;
}

.channel-item-row.is-offline .ch-program-text {
  color: #f87171 !important;
}

.ch-number {
  font-size: 12px;
  font-family: monospace;
  font-weight: 700;
  color: var(--text-muted);
  width: 26px;
}

.ch-logo-box {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: #000;
  border: 1px solid var(--border-glass);
  padding: 4px;
  object-fit: contain;
}

.ch-info-box {
  flex: 1;
  overflow: hidden;
}

.ch-name-text {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ch-program-text {
  font-size: 11px;
  color: var(--accent-cyan-light);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ch-epg-bar {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  margin-top: 4px;
  overflow: hidden;
}

.ch-epg-progress {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-rose));
  border-radius: 2px;
}

.ch-fav-btn {
  background: transparent;
  border: none;
  font-size: 16px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
}

.ch-fav-btn.is-fav {
  color: #fbbf24 !important;
  opacity: 1 !important;
  filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.75));
  transform: scale(1.1);
}

/* TV Preview Stage : MINI-LECTEUR EN DIRECT */
.tv-preview-stage {
  flex: 1;
  background: #000;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  min-width: 0;
  min-height: 0;
}

.stage-video-box {
  flex: 1 1 auto;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  overflow: hidden;
  min-height: 0;
}

/* Splash when no channel is selected */
.stage-splash-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
}

/* Mini Player Viewport when channel is active */
.stage-live-active {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #000;
  overflow: hidden;
  cursor: pointer;
}

#miniPreviewVideo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  transition: none;
}

#miniPreviewVideo.fit-contain { object-fit: contain !important; transform: none !important; }
#miniPreviewVideo.fit-cover { object-fit: cover !important; transform: none !important; }
#miniPreviewVideo.fit-cinema { object-fit: cover !important; transform: scale(1.2) !important; transform-origin: center center !important; }
#miniPreviewVideo.fit-fill { object-fit: fill !important; transform: none !important; }

.cinema-enhance-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.cinema-enhance-overlay.mode-dynamic {
  opacity: 1;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.035) 0%, transparent 72%);
}

.cinema-enhance-overlay.mode-cinema {
  opacity: 1;
  background: radial-gradient(ellipse at center, transparent 58%, rgba(0, 0, 0, 0.28) 100%);
}

.cinema-enhance-overlay.mode-ai {
  opacity: 1;
  background: radial-gradient(ellipse at center, transparent 64%, rgba(2, 10, 28, 0.16) 100%);
}

.cinema-enhance-overlay.mode-ai-plus {
  opacity: 1;
  background: radial-gradient(ellipse at center, rgba(180, 235, 255, 0.035) 0%, transparent 56%, rgba(0, 4, 18, 0.24) 100%);
}

.cinema-enhance-overlay.mode-hdr {
  opacity: 1;
  background: radial-gradient(ellipse at center, rgba(255, 224, 178, 0.03) 0%, transparent 58%, rgba(16, 6, 0, 0.26) 100%);
}

.mini-overlay-bar {
  position: absolute;
  top: 14px;
  left: 16px;
  max-width: min(76%, 560px);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 5px;
  background: rgba(6, 9, 18, 0.88);
  padding: 8px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.65);
  z-index: 5;
  pointer-events: none;
}

.mini-overlay-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.mini-overlay-program {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  line-height: 1.25;
  color: #e2e8f0;
  min-width: 0;
}

.mini-prog-label {
  color: var(--accent-cyan-light);
  font-size: 10px;
  flex-shrink: 0;
}

.mini-prog-title {
  font-weight: 700;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-prog-time {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-cyan-light);
  white-space: nowrap;
  flex-shrink: 0;
}

.mini-epg-progress-track {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 2px;
  overflow: hidden;
}

.mini-epg-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-rose));
  border-radius: 2px;
  transition: width 0.4s ease;
}

.stage-bottom-bar {
  position: relative !important;
  z-index: 50 !important;
  pointer-events: auto !important;
  padding: 12px 18px;
  background: rgba(10, 15, 28, 0.95);
  border-top: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 14px;
  flex-shrink: 0;
}

.stage-now-playing {
  flex: 1 1 200px;
  min-width: 140px;
}

.btn-launch-fullscreen {
  position: relative !important;
  z-index: 60 !important;
  pointer-events: auto !important;
  background: linear-gradient(135deg, var(--accent-rose), var(--accent-cyan));
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  padding: 12px 24px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer !important;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 20px var(--rose-glow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-launch-fullscreen:hover {
  transform: scale(1.04);
  box-shadow: 0 6px 25px rgba(244, 63, 94, 0.55);
}

.btn-launch-fullscreen:active {
  transform: scale(0.98);
}

/* ==========================================================================
   MINI-LECTEUR : CONTRÔLES HAUTE TECHNOLOGIE & INDICATEURS
   ========================================================================== */

/* Indicateur Central Pause Flottant (Cockpit Neon) */
.mini-center-pause-indicator {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(5, 10, 24, 0.65);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 25;
  cursor: pointer;
  pointer-events: auto;
  transition: all 0.25s ease;
}

.mini-center-pause-indicator .pause-glow-disc {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-rose-hot));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 28px rgba(var(--accent-cyan-rgb), 0.75), 0 0 50px rgba(var(--accent-rose-hot-rgb), 0.4);
  transform: scale(1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mini-center-pause-indicator:hover .pause-glow-disc {
  transform: scale(1.12);
  box-shadow: 0 0 36px rgba(var(--accent-cyan-rgb), 0.95), 0 0 60px rgba(var(--accent-rose-hot-rgb), 0.6);
}

.mini-center-pause-indicator .pause-text-label {
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2.5px;
  margin-top: 10px;
  text-shadow: 0 0 12px rgba(var(--accent-cyan-rgb), 0.9);
}

/* État de Connexion & Diagnostic Erreur Flux (Mini-Lecteur + Plein Écran) */
.mini-stream-overlay,
.fs-stream-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 26;
  pointer-events: none;
  background: rgba(5, 10, 24, 0.45);
  transition: background 0.25s ease;
}

.fs-stream-overlay {
  z-index: 120;
}

.mini-stream-overlay.is-error,
.fs-stream-overlay.is-error {
  pointer-events: auto !important;
  background: radial-gradient(circle at center, rgba(15, 23, 42, 0.88) 0%, rgba(2, 6, 23, 0.95) 100%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: default !important;
}

body.fullscreen-mode.hide-cursor .fs-stream-overlay.is-error,
body.fullscreen-mode.hide-cursor .fs-stream-overlay.is-error *,
body.fullscreen-mode #videoPlayerScreen.hide-cursor .fs-stream-overlay.is-error,
body.fullscreen-mode #videoPlayerScreen.hide-cursor .fs-stream-overlay.is-error * {
  cursor: auto !important;
}

body.fullscreen-mode #videoPlayerScreen.hide-cursor .fs-stream-overlay.is-error button {
  cursor: pointer !important;
}

.mini-stream-status-card {
  max-width: 440px;
  width: 92%;
  padding: 20px 24px;
  border-radius: 18px;
  background: rgba(11, 18, 35, 0.88);
  border: 1px solid rgba(var(--accent-cyan-rgb), 0.35);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.65), 0 0 24px rgba(var(--accent-cyan-rgb), 0.16);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}

.mini-stream-overlay.is-error .mini-stream-status-card,
.fs-stream-overlay.is-error .mini-stream-status-card {
  border-color: rgba(244, 63, 94, 0.5);
  box-shadow: 0 16px 46px rgba(0, 0, 0, 0.78), 0 0 28px rgba(244, 63, 94, 0.2);
}

.mini-stream-spinner {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid rgba(var(--accent-cyan-rgb), 0.22);
  border-top-color: var(--accent-cyan);
  border-right-color: var(--accent-rose-hot);
  animation: donStreamSpin 0.85s linear infinite;
  margin-bottom: 4px;
}

@keyframes donStreamSpin {
  to { transform: rotate(360deg); }
}

.mini-stream-icon {
  font-size: 32px;
  line-height: 1.1;
  margin-bottom: 2px;
}

.mini-stream-title {
  color: #ffffff;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.3;
}

.mini-stream-desc {
  color: #94a3b8;
  font-size: 12.5px;
  line-height: 1.45;
  max-width: 380px;
}

.mini-stream-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
}

.btn-stream-action {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: #fff;
  padding: 8px 15px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-stream-action:hover,
.btn-stream-action:focus {
  background: rgba(var(--accent-cyan-rgb), 0.28);
  border-color: var(--accent-cyan);
  transform: translateY(-1px);
  outline: none;
}

.btn-stream-action.primary {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-deep));
  border-color: transparent;
  box-shadow: 0 4px 16px rgba(var(--accent-cyan-rgb), 0.4);
}

/* Pupitre d'actions rapides du Mini-Lecteur */
.stage-mini-actions-deck {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex-shrink: 0;
  max-width: 100%;
}

.btn-mini-ctrl {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(var(--accent-cyan-rgb), 0.35);
  color: #ffffff;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  user-select: none;
}

.btn-mini-ctrl:hover,
.btn-mini-ctrl:focus {
  background: rgba(var(--accent-cyan-rgb), 0.25);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan-bright);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(var(--accent-cyan-rgb), 0.45);
}

.btn-mini-ctrl:active {
  transform: scale(0.96);
}

.btn-mini-ctrl .ctrl-icon {
  font-size: 14px;
  line-height: 1;
}

.btn-mini-ctrl .btn-text-label {
  font-size: 12px;
  font-weight: 700;
}

/* ==========================================================================
   CONTRÔLEUR DE VOLUME INTERACTIF (OPTIMISÉ NAVIGATEUR INTERNET)
   ========================================================================== */
.mini-volume-deck {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(var(--accent-cyan-rgb), 0.35);
  border-radius: var(--radius-md);
  padding: 5px 12px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  user-select: none;
}

.mini-volume-deck:hover,
.mini-volume-deck:focus-within {
  background: rgba(var(--accent-cyan-rgb), 0.20);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 16px rgba(var(--accent-cyan-rgb), 0.45);
}

.btn-mini-vol-icon {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 15px;
  cursor: pointer;
  padding: 2px 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: transform 0.15s ease, color 0.15s ease;
}

.btn-mini-vol-icon:hover {
  transform: scale(1.22);
  color: var(--accent-cyan-bright);
}

.mini-volume-bar-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mini-volume-range {
  -webkit-appearance: none;
  appearance: none;
  width: 92px;
  height: 6px;
  background: rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  outline: none;
  cursor: pointer;
  pointer-events: auto !important;
  touch-action: manipulation;
  position: relative;
  z-index: 65;
  transition: filter 0.2s ease, transform 0.15s ease;
}

.mini-volume-range:hover {
  filter: brightness(1.15);
}

.mini-volume-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-rose-hot));
  cursor: pointer;
  box-shadow: 0 0 8px rgba(var(--accent-cyan-rgb), 0.85);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.mini-volume-range::-webkit-slider-thumb:hover {
  transform: scale(1.25);
  box-shadow: 0 0 14px rgba(var(--accent-cyan-rgb), 1);
}

.mini-volume-range::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-rose-hot));
  border: none;
  cursor: pointer;
  box-shadow: 0 0 8px rgba(var(--accent-cyan-rgb), 0.85);
}

.mini-vol-percent {
  font-size: 11px;
  font-weight: 800;
  color: var(--accent-cyan-bright);
  min-width: 32px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.5px;
}



.auto-fs-icon {
  font-size: 18px;
  color: var(--accent-cyan);
}

.auto-fs-text {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.auto-fs-text strong {
  color: var(--accent-rose);
  font-size: 16px;
  font-weight: 900;
}

.btn-cancel-autofs {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  cursor: pointer;
  margin-left: 4px;
  transition: background 0.2s ease;
}

.btn-cancel-autofs:hover {
  background: var(--accent-rose);
}

/* ==========================================================================
   THE CINEMA FULLSCREEN VIDEO PLAYER ("COMMANDES DE OUF")
   Mode Unifié 100% Compatible Samsung Tizen TV (Décodeur Matériel Unique)
   ========================================================================== */
body.fullscreen-mode .smarters-header,
body.fullscreen-mode .tv-categories-col,
body.fullscreen-mode .tv-channels-col,
body.fullscreen-mode .stage-bottom-bar,
body.fullscreen-mode .mini-overlay-bar,
body.fullscreen-mode .mini-top-actions,
body.fullscreen-mode #stageSplashEmpty,
body.fullscreen-mode #centerActionOverlay,
body.fullscreen-mode .mini-stream-overlay,
body.fullscreen-mode #appToast {
  display: none !important;
}

/* Mode Plein Écran : Masquage du curseur uniquement lors de l'inactivité (.hide-cursor) */
body.fullscreen-mode.hide-cursor,
body.fullscreen-mode.hide-cursor * {
  cursor: none !important;
}

body.fullscreen-mode #liveTvScreen {
  display: flex !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 90 !important;
}

body.fullscreen-mode .live-tv-container {
  perspective: none !important;
  width: 100% !important;
  height: 100% !important;
}

body.fullscreen-mode .tv-preview-stage,
body.fullscreen-mode #stageVideoBox,
body.fullscreen-mode #stageLiveActive {
  display: flex !important;
  width: 100% !important;
  height: 100% !important;
  flex: 1 !important;
}

/* Sécurité absolue : En mode normal, l'écran plein écran ne peut JAMAIS bloquer les clics */
body:not(.fullscreen-mode) .video-player-screen,
body:not(.fullscreen-mode) #videoPlayerScreen {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
  z-index: -9999 !important;
}

.video-player-screen {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent;
  z-index: -1;
  display: none;
  opacity: 0;
  pointer-events: none !important;
  visibility: hidden;
  overflow: hidden !important;
}

body.fullscreen-mode .video-player-screen.active {
  display: block !important;
  z-index: 100 !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  visibility: visible !important;
}

/* Plein écran PC Desktop : occuper 100% du moniteur sans bordure, ombre ni barre résiduelle (n'affecte pas le mode smartphone <= 950px) */
@media (min-width: 951px) {
  html:fullscreen,
  body:fullscreen,
  html:-webkit-full-screen,
  body:-webkit-full-screen,
  body.fullscreen-mode {
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #000 !important;
    overflow: hidden !important;
  }

  body.fullscreen-mode .ambient-glow-1,
  body.fullscreen-mode .ambient-glow-2 {
    display: none !important;
  }

  body.fullscreen-mode #liveTvScreen,
  body.fullscreen-mode .live-tv-container,
  body.fullscreen-mode .tv-preview-stage,
  body.fullscreen-mode #stageVideoBox,
  body.fullscreen-mode #stageLiveActive {
    position: fixed !important;
    inset: 0 !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: #000 !important;
  }

  body.fullscreen-mode #miniPreviewVideo {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    border-radius: 0 !important;
  }
}

#mainVideoPlayer {
  display: none !important;
}

/* ==========================================================================
   MODE SMART TV DÉDIÉ (Samsung Tizen, Android TV, Google TV)
   Pilotage Hybride : Télécommande Physique ET Souris / Pointeur TV
   ========================================================================== */
body.smart-tv-mode {
  user-select: none !important;
  -webkit-user-select: none !important;
}

body.smart-tv-mode #mobileBottomNav,
body.smart-tv-mode #pwaInstallBanner,
body.smart-tv-mode #btnHeaderInstallApp {
  display: none !important;
}

body.smart-tv-mode .focusable:focus {
  outline: 3px solid var(--accent-cyan) !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 25px rgba(var(--accent-cyan-rgb), 0.9), 0 0 50px rgba(var(--accent-cyan-rgb), 0.4) !important;
  transform: scale(1.03) !important;
}

body.smart-tv-mode #miniPreviewVideo,
body.smart-tv-mode video.video-ai-enhanced,
body.smart-tv-mode video.video-ai-hdr {
  filter: none !important;
}

.brightness-overlay {
  position: absolute;
  inset: 0;
  background: #000;
  opacity: 0;
  pointer-events: none;
  z-index: 102;
  transition: opacity 0.1s linear;
}

/* ==========================================================================
   RÈGLE UNIVERSELLE DE VISIBILITÉ DU CURSEUR (SOURIS / AIR MOUSE / POINTEUR TV)
   Le curseur ne s'efface JAMAIS lors des déplacements
   ========================================================================== */
html,
body,
body.smart-tv-mode,
body.smart-tv-mode * {
  cursor: default !important;
}

/* Curseur pointeur hautement réactif sur TOUS les éléments cliquables et leurs enfants */
button,
button *,
a,
a *,
input,
select,
textarea,
.tv-cat-btn,
.tv-cat-btn *,
.channel-item-row,
.channel-item-row *,
.tv-category-item,
.tv-category-item *,
.btn-tv-scroll,
.btn-tv-scroll *,
.header-action-btn,
.header-action-btn *,
.btn-launch-fullscreen,
.btn-launch-fullscreen *,
.btn-mini-cast,
.btn-mini-cast *,
.stage-live-active,
.stage-video-box,
.channel-fav-btn,
.channel-fav-btn *,
.quick-drawer-toggle-btn,
.quick-drawer-toggle-btn *,
.clickable,
[role="button"] {
  cursor: pointer !important;
  pointer-events: auto !important;
}

/* En mode normal (liste / catalogue / prévisualisation), la souris est TOUJOURS visible et active */
body:not(.fullscreen-mode),
body:not(.fullscreen-mode) * {
  cursor: default !important;
}

body:not(.fullscreen-mode) button,
body:not(.fullscreen-mode) button *,
body:not(.fullscreen-mode) a,
body:not(.fullscreen-mode) input,
body:not(.fullscreen-mode) .tv-cat-btn,
body:not(.fullscreen-mode) .tv-cat-btn *,
body:not(.fullscreen-mode) .channel-item-row,
body:not(.fullscreen-mode) .channel-item-row *,
body:not(.fullscreen-mode) .tv-category-item,
body:not(.fullscreen-mode) .tv-category-item *,
body:not(.fullscreen-mode) .btn-tv-scroll,
body:not(.fullscreen-mode) .header-action-btn,
body:not(.fullscreen-mode) .btn-launch-fullscreen,
body:not(.fullscreen-mode) .btn-mini-cast,
body:not(.fullscreen-mode) .stage-live-active,
body:not(.fullscreen-mode) .stage-video-box {
  cursor: pointer !important;
  pointer-events: auto !important;
}

/* Masquage STRICTEMENT limité au plein écran cinéma après 5s d'inactivité totale */
body.fullscreen-mode.hide-cursor,
body.fullscreen-mode.hide-cursor *,
body.fullscreen-mode #videoPlayerScreen.hide-cursor,
body.fullscreen-mode #videoPlayerScreen.hide-cursor * {
  cursor: none !important;
}

/* Halo Lumineux TV Haute Visibilité (Suit le curseur en temps réel sans aucun décalage) */
#tvCursorHalo {
  position: fixed;
  top: 0;
  left: 0;
  width: 24px;
  height: 24px;
  /* Centrage optique parfait sur le corps de la flèche du curseur TV */
  margin-top: -6px;
  margin-left: -5px;
  border-radius: 50%;
  pointer-events: none !important;
  z-index: 2147483647 !important;
  background: radial-gradient(circle, rgba(var(--accent-cyan-rgb), 0.5) 0%, rgba(var(--accent-cyan-rgb), 0.15) 60%, transparent 80%);
  border: 2px solid rgba(var(--accent-cyan-rgb), 0.95);
  box-shadow: 0 0 14px rgba(var(--accent-cyan-rgb), 0.9), inset 0 0 6px rgba(255, 255, 255, 0.8);
  opacity: 0;
  transform: translate3d(-100px, -100px, 0);
  /* TRANSITION STRICTEMENT LIMITÉE À L'OPACITÉ : ZÉRO RETARD SUR LE DÉPLACEMENT */
  transition: opacity 0.15s ease-out !important;
  transition-property: opacity !important;
  will-change: transform, opacity;
}

#tvCursorHalo.active {
  opacity: 1;
}

#tvCursorHalo.hover-clickable {
  border-color: var(--accent-cyan-bright);
  background: radial-gradient(circle, rgba(var(--accent-cyan-bright-rgb), 0.6) 0%, rgba(var(--accent-cyan-bright-rgb), 0.22) 65%, transparent 85%);
  box-shadow: 0 0 22px rgba(var(--accent-cyan-bright-rgb), 1), inset 0 0 8px rgba(255, 255, 255, 0.95);
}

#tvCursorHalo.clicking {
  background: radial-gradient(circle, rgba(234, 179, 8, 0.75) 0%, transparent 80%);
  border-color: #eab308;
  box-shadow: 0 0 24px rgba(234, 179, 8, 1);
}

body.fullscreen-mode.hide-cursor #tvCursorHalo {
  opacity: 0 !important;
}

/* ÉCRAN TACTILE & SMARTPHONE : DÉSACTIVATION TOTALE DU CURSEUR ET DU HALO TV */
@media (hover: none) and (pointer: coarse), (max-width: 860px) {
  #tvCursorHalo {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
}
.is-mobile-device #tvCursorHalo {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.player-osd-layer {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  z-index: 105;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 28px 36px;
  background: linear-gradient(180deg, rgba(6,8,16,0.9) 0%, transparent 22%, transparent 75%, rgba(6,8,16,0.95) 100%);
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.player-osd-layer.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
}

.player-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.player-channel-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-player-back {
  min-height: 44px;
  height: 44px;
  padding: 0 16px;
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  transition: all 0.2s ease;
}

.btn-player-back:active {
  transform: scale(0.95);
  background: rgba(var(--accent-cyan-rgb), 0.85);
}

.player-channel-logo {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: #000;
  padding: 6px;
  border: 1.5px solid var(--accent-rose);
  object-fit: contain;
  box-shadow: 0 0 14px var(--rose-glow);
}

.player-channel-text h2 {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.badge-res {
  background: var(--accent-cyan);
  color: #060810;
  font-size: 11px;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
}

.badge-live-tag {
  background: var(--accent-rose);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  box-shadow: 0 0 8px var(--accent-rose);
}

.badge-fav-tag {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 9px;
  border-radius: var(--radius-sm);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.7);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  letter-spacing: 0.5px;
  animation: pulse-fav-badge 2.5s infinite ease-in-out;
}

/* Correcteur de Qualité IA 4K / Remastering */
.badge-ai-enhance {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.25), rgba(99, 102, 241, 0.35));
  border: 1px solid rgba(236, 72, 153, 0.6);
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 800;
  color: #f472b6;
  letter-spacing: 0.5px;
  box-shadow: 0 0 10px rgba(236, 72, 153, 0.35);
  transition: all 0.3s ease;
}

.badge-ai-enhance.mode-dynamic {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.28), rgba(59, 130, 246, 0.38));
  border-color: rgba(56, 189, 248, 0.75);
  color: #38bdf8;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.4);
}

.badge-ai-enhance.mode-cinema {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.28), rgba(99, 102, 241, 0.35));
  border-color: rgba(192, 132, 252, 0.7);
  color: #d8b4fe;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.35);
}

.badge-ai-enhance.mode-ai-plus {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.28), rgba(6, 182, 212, 0.4));
  border-color: rgba(52, 211, 153, 0.75);
  color: #34d399;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.45);
}

.badge-ai-enhance.mode-hdr {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(239, 68, 68, 0.35));
  border-color: rgba(245, 158, 11, 0.7);
  color: #fbbf24;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.35);
}

.badge-ai-enhance.mode-vivid {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.3), rgba(244, 63, 94, 0.38));
  border-color: rgba(244, 114, 182, 0.8);
  color: #f9a8d4;
  box-shadow: 0 0 12px rgba(236, 72, 153, 0.45);
}

.badge-ai-enhance.mode-off {
  display: none !important;
}

/* Profils Image Single-Pass GPU ColorMatrix (Pas de convolution/blur => zéro perte de frame et zéro désynchro A/V) */
video,
#miniPreviewVideo {
  image-rendering: auto !important;
  transition: none !important;
}

video.video-clean-source,
#miniPreviewVideo.video-clean-source,
video.video-mode-standard,
#miniPreviewVideo.video-mode-standard {
  filter: none !important;
}

video.video-mode-dynamic,
#miniPreviewVideo.video-mode-dynamic {
  filter: brightness(1.04) contrast(1.13) saturate(1.18) !important;
}

video.video-mode-cinema,
#miniPreviewVideo.video-mode-cinema {
  filter: brightness(0.99) contrast(1.08) saturate(1.03) sepia(0.05) !important;
}

video.video-mode-ai4k,
#miniPreviewVideo.video-mode-ai4k,
video.video-ai-enhanced,
#miniPreviewVideo.video-ai-enhanced {
  filter: brightness(1.02) contrast(1.10) saturate(1.10) !important;
}

video.video-mode-ai4k-plus,
#miniPreviewVideo.video-mode-ai4k-plus {
  filter: brightness(1.03) contrast(1.16) saturate(1.15) !important;
}

video.video-mode-ai4k-hdr,
#miniPreviewVideo.video-mode-ai4k-hdr,
video.video-ai-hdr,
#miniPreviewVideo.video-ai-hdr {
  filter: brightness(1.01) contrast(1.18) saturate(1.14) sepia(0.03) !important;
}

video.video-mode-ai4k-vivid,
#miniPreviewVideo.video-mode-ai4k-vivid {
  filter: brightness(1.05) contrast(1.14) saturate(1.22) !important;
}

@keyframes pulse-fav-badge {
  0%, 100% { transform: scale(1); box-shadow: 0 0 10px rgba(245, 158, 11, 0.6); }
  50% { transform: scale(1.05); box-shadow: 0 0 18px rgba(245, 158, 11, 0.95); }
}

.player-channel-text p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 3px;
}

.player-epg-live-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 5px;
  min-width: 280px;
  max-width: 520px;
}

.epg-main-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.epg-live-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

.epg-live-time {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-cyan);
  white-space: nowrap;
  background: rgba(var(--accent-cyan-rgb), 0.15);
  padding: 1px 7px;
  border-radius: 4px;
  border: 1px solid rgba(var(--accent-cyan-rgb), 0.3);
}

.epg-progress-track {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 2px;
  overflow: hidden;
}

.epg-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-rose));
  border-radius: 2px;
  box-shadow: 0 0 6px var(--accent-cyan);
  transition: width 0.4s ease;
}

.epg-next-line {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.epg-next-tag {
  font-size: 9px;
  font-weight: 800;
  color: var(--accent-rose);
  background: rgba(var(--accent-rose-rgb), 0.15);
  padding: 1px 5px;
  border-radius: 3px;
  letter-spacing: 0.5px;
}

.epg-next-title {
  color: var(--text-secondary);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-top-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Fullscreen Player Favorite Button */
#playerFavBtn {
  font-weight: 700;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 6px;
}

#playerFavBtn.is-fav {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(234, 179, 8, 0.38)) !important;
  border: 1px solid #f59e0b !important;
  color: #fbbf24 !important;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.45) !important;
  font-weight: 800 !important;
}

#playerFavBtn.is-fav:hover {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.25), rgba(244, 63, 94, 0.35)) !important;
  border-color: var(--accent-rose) !important;
  color: #fff !important;
  box-shadow: 0 0 18px rgba(244, 63, 94, 0.45) !important;
}

/* Gesture HUDs */
.gesture-hud {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(10, 15, 28, 0.92);
  border: 1.5px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  z-index: 110;
  backdrop-filter: blur(16px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.gesture-hud.active { opacity: 1; }
.gesture-hud.hud-left { left: 40px; }
.gesture-hud.hud-right { right: 40px; }

.hud-slider-track {
  width: 6px;
  height: 140px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
  position: relative;
  overflow: hidden;
}

.hud-slider-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 50%;
  background: linear-gradient(180deg, var(--accent-cyan), var(--accent-rose));
  border-radius: var(--radius-full);
}

.hud-val-text {
  font-size: 12px;
  font-weight: 800;
  font-family: monospace;
}

/* Soft Floating Action Feedback Pill (Non-intrusive, douce et élégante en haut de l'écran) */
.center-action-feedback {
  position: absolute;
  top: 14%;
  left: 50%;
  transform: translate(-50%, -10px) scale(0.96);
  padding: 8px 22px;
  border-radius: var(--radius-full);
  background: rgba(10, 15, 28, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(var(--accent-cyan-rgb), 0.35);
  color: #fff;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1), transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 112;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(var(--accent-cyan-rgb), 0.2);
}

.center-action-feedback.show {
  transform: translate(-50%, 0) scale(1);
  opacity: 1;
}

.center-action-feedback .hud-icon {
  font-size: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 0 6px rgba(var(--accent-cyan-rgb), 0.5));
}

.center-action-feedback .hud-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: #f1f5f9;
  white-space: nowrap;
}

.center-action-feedback.is-gold {
  border-color: rgba(245, 158, 11, 0.8) !important;
  box-shadow: 0 10px 32px rgba(245, 158, 11, 0.45) !important;
  background: rgba(18, 14, 6, 0.88) !important;
}

.center-action-feedback.is-gold .hud-icon {
  filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.9)) !important;
  color: #fbbf24 !important;
}

.center-action-feedback.is-gold .hud-label {
  color: #fef3c7 !important;
  font-weight: 800 !important;
}

/* Bouton Reculer maintenu (> 2s pour 1 minute) */
#btnSeekBack.holding {
  background: rgba(244, 63, 94, 0.3) !important;
  border-color: var(--accent-rose) !important;
  color: var(--accent-rose) !important;
  transform: scale(0.92);
  box-shadow: 0 0 22px rgba(244, 63, 94, 0.6) !important;
}

/* Bottom Controls */
.player-bottom-bar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}

.seekbar-container {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
}

.time-label {
  font-size: 12px;
  font-family: monospace;
  font-weight: 600;
  color: var(--text-secondary);
  min-width: 50px;
}

.seek-track-wrapper {
  flex: 1;
  height: 18px;
  display: flex;
  align-items: center;
  cursor: pointer;
  position: relative;
}

.seek-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
  position: relative;
  overflow: hidden;
}

.seek-buffer-bar {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0%;
  background: rgba(255, 255, 255, 0.3);
}

.seek-progress-bar {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-rose), var(--accent-cyan));
  box-shadow: 0 0 10px var(--cyan-glow);
}

.controls-buttons-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.controls-group-left,
.controls-group-center,
.controls-group-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ctrl-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  color: #fff;
  border-radius: var(--radius-md);
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  backdrop-filter: blur(12px);
}

.ctrl-btn:hover,
.ctrl-btn.active,
.ctrl-btn.focused {
  background: linear-gradient(135deg, var(--accent-rose), var(--accent-cyan));
  border-color: var(--accent-cyan-light);
  color: #fff;
  transform: scale(1.05);
  box-shadow: 0 0 18px var(--cyan-glow);
}

.ctrl-btn-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.ctrl-btn-play-pause {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--accent-rose), var(--accent-cyan));
  color: #fff;
  font-size: 22px;
  box-shadow: 0 4px 22px var(--cyan-glow);
}

/* Quick Drawer Side Overlay (Volet Rapide & Recherche à Droite) - Zéro Débordement Horizontal */
.quick-channel-drawer {
  position: absolute !important;
  top: 0 !important;
  bottom: 0 !important;
  right: 0 !important;
  width: 400px !important;
  max-width: 90vw !important;
  background: rgba(8, 12, 24, 0.97);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-left: 1.5px solid var(--border-glass);
  z-index: 120;
  display: none !important;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transform: translate3d(100%, 0, 0);
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.45s;
  box-shadow: -10px 0 35px rgba(0, 0, 0, 0.7);
}

.quick-channel-drawer.open {
  display: flex !important;
  transform: translate3d(0, 0, 0) !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  visibility: visible !important;
}

.drawer-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.drawer-search-wrap {
  width: 100%;
}

.drawer-search-wrap .search-field {
  width: 100%;
  box-sizing: border-box;
}

@media (min-width: 2200px) {
  .quick-channel-drawer {
    width: 520px !important;
  }
}

.drawer-channels-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Category Pills in Fullscreen Drawer */
.drawer-cat-pills {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 0 6px 0;
  scrollbar-width: none;
}

.drawer-cat-pills::-webkit-scrollbar {
  display: none;
}

.drawer-cat-pill {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.drawer-cat-pill:hover {
  background: rgba(var(--accent-cyan-rgb), 0.15);
  color: #fff;
  border-color: rgba(var(--accent-cyan-rgb), 0.3);
}

.drawer-cat-pill.active {
  background: var(--accent-cyan);
  color: #060810;
  font-weight: 800;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(var(--accent-cyan-rgb), 0.4);
}

/* Current Channel Highlight in Drawer */
.drawer-channel-row.is-current {
  border-color: var(--accent-cyan) !important;
  background: rgba(var(--accent-cyan-rgb), 0.18) !important;
  box-shadow: 0 0 14px rgba(var(--accent-cyan-rgb), 0.25) !important;
}

.drawer-current-badge {
  font-size: 9px;
  font-weight: 800;
  background: var(--accent-rose);
  color: #fff;
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: 6px;
  box-shadow: 0 0 8px rgba(244, 63, 94, 0.5);
  letter-spacing: 0.5px;
}

/* Cinema Live Subtitles & Super Traducteur Overlay */
.cinema-subtitles-container {
  position: absolute;
  bottom: 12%;
  left: 50%;
  transform: translateX(-50%);
  max-width: 85%;
  z-index: 105;
  pointer-events: none;
  display: flex;
  justify-content: center;
  transition: opacity 0.25s ease;
}

.subtitles-pill {
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  padding: 8px 24px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.85), 0 0 20px rgba(0, 0, 0, 0.5);
}

.subtitles-flag {
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
}

.subtitles-text {
  font-size: 22px;
  font-weight: 700;
  color: #ffeb3b;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.95);
  line-height: 1.4;
  text-align: center;
  letter-spacing: 0.3px;
}



/* ==========================================================================
   MODALS
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(14px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-backdrop:not(.open) {
  display: none !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

.modal-backdrop.open { display: flex; }

.modal-card {
  width: 100%;
  max-width: 620px;
  background: #0c1122;
  border: 1.5px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85);
  overflow: hidden;
}

.modal-header {
  padding: 20px 24px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-close-modal {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 20px;
  cursor: pointer;
}

.modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  color: #fff;
  font-size: 14px;
  outline: none;
}

.form-input:focus {
  border-color: var(--accent-cyan);
}

.btn-modal-action {
  background: linear-gradient(135deg, var(--accent-rose), var(--accent-cyan));
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  padding: 13px 20px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 18px var(--cyan-glow);
}

.btn-modal-action.secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  box-shadow: none;
}

/* Toast */
.toast-msg {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(30px);
  background: rgba(12, 17, 34, 0.96);
  border: 1.5px solid var(--accent-cyan);
  border-radius: var(--radius-full);
  padding: 12px 28px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px var(--cyan-glow);
}

.toast-msg.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--accent-cyan); }

/* ==========================================================================
   CAST / PROJECTION SANS FIL & EXPAND ACTIONS
   ========================================================================== */
.mini-top-actions {
  position: absolute;
  bottom: 18px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 6;
}

.btn-mini-cast {
  background: rgba(10, 15, 28, 0.88);
  backdrop-filter: blur(12px);
  color: var(--accent-cyan);
  border: 1.5px solid var(--accent-cyan);
  border-radius: var(--radius-full);
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 16px var(--cyan-glow);
  transition: all var(--transition-fast);
}

.btn-mini-cast:hover,
.btn-mini-cast.focused {
  transform: scale(1.06);
  background: var(--accent-cyan);
  color: #060810;
  box-shadow: 0 6px 20px var(--cyan-glow);
}

.btn-cast-accent {
  background: rgba(var(--accent-cyan-rgb), 0.18) !important;
  border-color: var(--accent-cyan) !important;
  color: var(--accent-cyan-light) !important;
}

.btn-cast-accent:hover {
  background: var(--accent-cyan) !important;
  color: #060810 !important;
}

.btn-cast-circle {
  border-color: var(--accent-cyan) !important;
  color: var(--accent-cyan-light) !important;
}

.btn-cast-circle:hover {
  background: var(--accent-cyan) !important;
  color: #060810 !important;
}

/* ==========================================================================
   COMPOSANTS SPÉCIFIQUES ANDROID & SMARTPHONE PWA
   ========================================================================== */
.btn-install-android {
  background: linear-gradient(135deg, #10b981, var(--accent-cyan));
  color: #fff;
  border: none;
  border-radius: var(--radius-full);
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
  animation: pulseInstall 2.4s infinite ease-in-out;
}

@keyframes pulseInstall {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

.android-install-banner {
  position: fixed;
  bottom: 68px;
  left: 12px;
  right: 12px;
  background: rgba(12, 17, 34, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid var(--accent-cyan);
  border-radius: 16px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 150;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(var(--accent-cyan-rgb), 0.3);
  animation: slideUpBanner 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUpBanner {
  from { transform: translateY(100px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.banner-content {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.banner-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(var(--accent-cyan-rgb), 0.6));
}

.banner-text strong {
  font-size: 13px;
  color: #fff;
  display: block;
}

.banner-text p {
  font-size: 11px;
  color: var(--accent-cyan-light);
  margin-top: 2px;
  line-height: 1.3;
}

.banner-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-banner-install {
  background: linear-gradient(135deg, var(--accent-rose), var(--accent-cyan));
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.btn-banner-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  padding: 4px 6px;
  cursor: pointer;
}

/* Barre de navigation basse pour smartphone Android */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: rgba(8, 12, 24, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-glass);
  z-index: 95;
  justify-content: space-around;
  align-items: center;
}

.mob-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 6px 0;
  cursor: pointer;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.mob-nav-icon {
  font-size: 18px;
  line-height: 1;
  margin-bottom: 3px;
}

.mob-nav-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.mob-nav-item.active {
  color: var(--accent-cyan);
}

.mob-nav-item.active .mob-nav-icon {
  transform: scale(1.15);
  filter: drop-shadow(0 0 8px rgba(var(--accent-cyan-rgb), 0.6));
}

body.fullscreen-mode .mobile-bottom-nav,
body.fullscreen-mode .android-install-banner {
  display: none !important;
}

/* ==========================================================================
   RESPONSIVE DESIGN SMARTPHONE & TABLETTE (SMARTPHONE CINEMA ANDROID / CHROME)
   ========================================================================== */
@media (max-width: 860px) {
  body {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: manipulation;
  }

  .mobile-bottom-nav {
    display: flex;
  }

  .smarters-header {
    height: 54px;
    padding: 0 8px;
    padding-top: env(safe-area-inset-top, 0px);
    gap: 5px;
  }

  .header-back-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    justify-content: center;
    border-radius: 9px;
    margin-right: 0;
    flex-shrink: 0;
  }

  .header-back-btn span {
    display: none;
  }

  .header-brand-wrap {
    gap: 6px;
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
  }

  .brand-crest {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    padding: 3px;
    flex-shrink: 0;
  }

  .brand-titles {
    min-width: 0;
    overflow: hidden;
  }

  .brand-titles h1 {
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.15;
  }

  .header-actions-wrap {
    gap: 4px;
    flex-shrink: 0;
  }

  .icon-btn-header {
    width: 32px;
    height: 32px;
    font-size: 14px;
    border-radius: 9px;
    flex-shrink: 0;
  }

  .desktop-theme-btn {
    display: flex !important;
  }

  .desktop-theme-btn::after {
    width: 7px;
    height: 7px;
    bottom: 3px;
    right: 3px;
  }

  .brand-titles p,
  .header-center-info,
  .account-status-pill,
  #screenPairingBadge,
  .header-pairing-badge,
  #btnHeaderHome,
  #btnHeaderMobileRemote,
  #btnInstallAndroid,
  #fsPermanentTvCode,
  #btnFullscreenPairingCode,
  #btnTopCast,
  #btnMiniCast {
    display: none !important;
  }

  .app-screen {
    top: calc(54px + env(safe-area-inset-top, 0px));
    bottom: env(safe-area-inset-bottom, 0px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Dashboard mobile : Cartes empilées */
  .smarters-dashboard-wrap {
    padding: 14px;
    padding-bottom: 24px;
  }

  .smarters-hero-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .hero-smarters-card {
    height: 150px;
    padding: 16px;
  }

  .hero-icon-3d {
    width: 52px;
    height: 52px;
    font-size: 24px;
  }

  .hero-card-bottom h2 {
    font-size: 17px;
  }

  .hero-card-bottom p {
    font-size: 11px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .smarters-sub-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 12px;
  }

  .sub-smarters-card {
    padding: 12px;
  }

  /* ========================================================================
     LIVE TV SMARTPHONE : LECTEUR ÉPINGLÉ EN HAUT (STYLE YOUTUBE & MYCANAL)
     ======================================================================== */
  #liveTvScreen {
    overflow: hidden !important;
    height: 100% !important;
  }

  .live-tv-container {
    flex-direction: column !important;
    height: 100% !important;
    overflow: hidden !important;
  }

  .tv-preview-stage {
    position: relative !important;
    top: 0 !important;
    z-index: 70 !important;
    width: 100% !important;
    aspect-ratio: unset !important;
    height: auto !important;
    order: -1 !important;
    flex-shrink: 0 !important;
    background: #000 !important;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.95) !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .stage-video-box {
    width: 100% !important;
    aspect-ratio: 16 / 9 !important;
    height: auto !important;
    background: #000 !important;
  }

  .stage-live-active {
    width: 100% !important;
    height: 100% !important;
  }

  #miniPreviewVideo,
  video {
    width: 100% !important;
    height: 100% !important;
    background: #000 !important;
  }

  #miniPreviewVideo.fit-contain,
  video.fit-contain {
    object-fit: contain !important;
  }

  #miniPreviewVideo.fit-fill,
  video.fit-fill {
    object-fit: fill !important;
  }

  #miniPreviewVideo.fit-cover,
  video.fit-cover {
    object-fit: cover !important;
  }

  .stage-bottom-bar {
    padding: 8px 12px !important;
    flex-shrink: 0 !important;
    background: rgba(10, 15, 28, 0.98) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
  }

  .stage-info-meta {
    flex: 1 1 auto !important;
    min-width: 140px !important;
  }

  .stage-bottom-bar h3 {
    font-size: 13.5px !important;
    font-weight: 800 !important;
    color: #ffffff !important;
  }

  .stage-bottom-bar p {
    font-size: 11px !important;
    color: var(--accent-cyan-bright) !important;
    font-weight: 600 !important;
  }

  .stage-mini-actions-deck {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 5px !important;
    width: 100% !important;
    flex-wrap: wrap !important;
  }

  .btn-mini-ctrl {
    padding: 5px 8px !important;
    font-size: 11px !important;
    border-radius: 12px !important;
    gap: 3px !important;
    flex-shrink: 0 !important;
  }

  .btn-mini-ctrl .ctrl-icon {
    font-size: 12.5px !important;
  }

  .mini-volume-deck {
    padding: 4px 7px !important;
    gap: 4px !important;
    flex-shrink: 0 !important;
  }

  .mini-volume-range {
    width: 44px !important;
  }

  .mini-vol-percent {
    font-size: 10px !important;
    min-width: 24px !important;
  }

  .btn-launch-fullscreen {
    padding: 6px 10px !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    border-radius: 14px !important;
    margin-left: auto !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-rose-hot)) !important;
    border: none !important;
    box-shadow: 0 4px 14px rgba(var(--accent-cyan-rgb), 0.4) !important;
  }

  /* Sur smartphone : Les boutons de défilement TV sont totalement masqués */
  .tv-easy-scroll-bar {
    display: none !important;
  }

  .tv-categories-col {
    width: 100% !important;
    flex-shrink: 0 !important;
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    border-right: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    background: rgba(8, 12, 24, 0.98) !important;
    display: flex !important;
    align-items: center !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    padding: 0 !important;
  }

  .tv-col-header {
    display: none !important;
  }

  .tv-categories-list {
    display: flex !important;
    flex-direction: row !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 0 10px !important;
    gap: 8px !important;
    scrollbar-width: none !important;
    align-items: center !important;
    width: 100% !important;
    height: 100% !important;
    box-sizing: border-box !important;
  }

  .tv-categories-list::-webkit-scrollbar {
    display: none !important;
  }

  .tv-cat-btn {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    height: 34px !important;
    padding: 0 10px 0 6px !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    border-radius: 17px !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #e2e8f0 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25) !important;
    overflow: hidden !important;
  }

  .tv-cat-btn .cat-badge-box {
    width: 22px !important;
    height: 22px !important;
    border-radius: 6px !important;
    flex-shrink: 0 !important;
  }

  .tv-cat-btn .cat-badge-icon {
    font-size: 13px !important;
  }

  .tv-cat-btn .cat-sub,
  .tv-cat-btn .cat-sub-label {
    display: none !important;
  }

  .tv-cat-btn .cat-name,
  .tv-cat-btn .cat-btn-label {
    font-size: 12px !important;
    white-space: nowrap !important;
  }

  .tv-cat-btn.active {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-rose-hot)) !important;
    color: #ffffff !important;
    border-color: transparent !important;
    box-shadow: 0 4px 16px rgba(var(--accent-cyan-rgb), 0.5) !important;
  }

  .tv-cat-btn.active .cat-btn-label {
    color: #ffffff !important;
  }

  .tv-cat-btn.active .cat-btn-count {
    background: rgba(0, 0, 0, 0.32) !important;
    color: #ffffff !important;
  }

  .theme-hud-badge {
    top: auto !important;
    bottom: calc(70px + env(safe-area-inset-bottom, 0px)) !important;
    transform: translate3d(-50%, 14px, 0) scale(0.94);
  }

  .theme-hud-badge.show {
    transform: translate3d(-50%, 0, 0) scale(1);
  }

  .tv-channels-col {
    flex: 1 !important;
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    padding: 0 !important;
    background: transparent !important;
    min-height: 0 !important;
  }

  .search-input-wrap {
    padding: 6px 10px !important;
    background: rgba(10, 15, 28, 0.98) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    flex-shrink: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .search-field {
    width: 100% !important;
    height: 38px !important;
    font-size: 13px !important;
    border-radius: 10px !important;
    padding: 6px 12px 6px 36px !important;
    background-color: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-sizing: border-box !important;
  }

  .tv-channels-scroll {
    flex: 1 !important;
    width: 100% !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 6px 8px calc(24px + env(safe-area-inset-bottom, 0px)) 8px !important;
    display: flex !important;
    flex-direction: column !important;
    box-sizing: border-box !important;
    background: transparent !important;
    min-height: 0 !important;
  }

  /* CARTE DE CHAÎNE ULTRA-LISIBLE ET ÉPURÉE SUR SMARTPHONE */
  .channel-item-row {
    min-height: 68px !important;
    margin: 4px 0 6px 0 !important;
    padding: 8px 12px !important;
    border-radius: 14px !important;
    background: rgba(15, 23, 42, 0.85) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35) !important;
    gap: 10px !important;
    flex-shrink: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    -webkit-tap-highlight-color: transparent !important;
    touch-action: pan-y !important;
    transition: transform 0.15s ease, background 0.15s ease !important;
  }

  .channel-item-row:active {
    background: rgba(var(--accent-cyan-rgb), 0.22) !important;
    transform: scale(0.98) !important;
  }

  .channel-item-row.active {
    background: linear-gradient(90deg, rgba(var(--accent-cyan-rgb), 0.24), rgba(var(--accent-rose-rgb), 0.24)) !important;
    border: 1.5px solid var(--accent-cyan) !important;
    box-shadow: 0 0 20px rgba(var(--accent-cyan-rgb), 0.45) !important;
  }

  /* LOGO ULTRA-NET AVEC FOND BLANC PUR CONTRASTÉ */
  .ch-logo-box {
    width: 60px !important;
    height: 48px !important;
    min-width: 60px !important;
    border-radius: 12px !important;
    background: #ffffff !important; /* FOND BLANC PUR : Révèle tous les logos (même foncés) avec éclat */
    padding: 4px 6px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    overflow: hidden !important;
  }

  .ch-logo-box img {
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
  }

  /* TYPOGRAPHIE GRAND FORMAT LISIBLE */
  .ch-number {
    font-size: 13px !important;
    font-weight: 900 !important;
    color: var(--accent-cyan-bright) !important;
    background: rgba(var(--accent-cyan-rgb), 0.16) !important;
    border: 1px solid rgba(var(--accent-cyan-rgb), 0.32) !important;
    border-radius: 8px !important;
    padding: 3px 7px !important;
    min-width: 32px !important;
    text-align: center !important;
  }

  .ch-name-text {
    font-size: 15.5px !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    letter-spacing: -0.2px !important;
    line-height: 1.25 !important;
    white-space: normal !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }

  .ch-program-text {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #94a3b8 !important;
    margin-top: 3px !important;
  }

  .ch-fav-btn {
    font-size: 18px !important;
    min-width: 38px !important;
    min-height: 38px !important;
    padding: 6px !important;
  }

  /* OSD Plein Écran Mobile */
  .player-top-bar {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    box-sizing: border-box;
    gap: 8px;
    padding: 12px 14px;
  }

  .player-top-actions {
    width: 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 6px;
  }

  .controls-buttons-row {
    flex-wrap: wrap;
    gap: 8px;
  }

  .controls-group-center {
    display: none;
  }

  .player-channel-text h2 {
    font-size: 16px;
  }

  /* ========================================================================
     MODALS SMARTPHONE : PARFAITEMENT CENTRÉES DANS L'ENCADREMENT DU MOBILE
     ======================================================================== */
  .modal-backdrop {
    padding: 12px !important;
    align-items: center !important;
    justify-content: center !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .modal-card {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    max-height: 90vh !important;
    display: flex !important;
    flex-direction: column !important;
    box-sizing: border-box !important;
    border-radius: 18px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.95) !important;
  }

  .modal-header {
    padding: 14px 18px !important;
    flex-shrink: 0 !important;
  }

  .modal-header h3 {
    font-size: 15px !important;
  }

  .modal-body {
    padding: 14px !important;
    gap: 14px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    max-height: calc(90vh - 60px) !important;
    box-sizing: border-box !important;
  }

  .form-group {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 14px !important;
  }

  .form-input {
    width: 100% !important;
    box-sizing: border-box !important;
    font-size: 14px !important;
  }

  .btn-modal-action {
    width: 100% !important;
    box-sizing: border-box !important;
    justify-content: center !important;
    text-align: center !important;
    font-size: 13.5px !important;
    padding: 13px !important;
  }
}

/* Mode paysage automatique smartphone : Immersion 100% plein écran sans bord */
@media (max-width: 950px) and (max-height: 480px) and (orientation: landscape) {
  .smarters-header {
    display: none !important;
  }

  .mobile-bottom-nav,
  .android-install-banner {
    display: none !important;
  }

  .app-screen {
    top: 0 !important;
    bottom: 0 !important;
  }

  #liveTvScreen .live-tv-container {
    height: 100vh !important;
  }

  #liveTvScreen .tv-preview-stage {
    width: 100vw !important;
    height: 100vh !important;
    max-height: 100vh !important;
    position: fixed !important;
    inset: 0 !important;
    z-index: 100 !important;
  }

  #liveTvScreen .tv-categories-col,
  #liveTvScreen .tv-channels-col,
  #liveTvScreen .stage-bottom-bar {
    display: none !important;
  }
}

/* ==========================================================================
   4K ULTRA-HD EXPANSION (3840x2160 & Grand Écran)
   Suppression des grandes marges et remplissage bord à bord
   ========================================================================== */
/* Badge TV Code permanent & interactif en plein écran */
.fs-permanent-tv-code {
  position: absolute;
  top: 14px;
  right: 18px;
  background: rgba(11, 17, 32, 0.78);
  border: 1.5px solid rgba(var(--accent-cyan-rgb), 0.55);
  color: #fff;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 800;
  z-index: 40;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0.85;
  transition: opacity 0.35s ease, transform 0.35s ease, visibility 0.35s ease;
  user-select: none;
}
.fs-permanent-tv-code:hover, .fs-permanent-tv-code:focus {
  opacity: 1;
  transform: scale(1.06);
  border-color: var(--accent-cyan);
  background: rgba(11, 17, 32, 0.95);
  box-shadow: 0 4px 20px rgba(var(--accent-cyan-rgb), 0.5);
}

/* S'efface automatiquement avec l'OSD en plein écran pour une immersion cinéma 100% pure */
.fs-permanent-tv-code.hidden,
.video-player-screen.hide-cursor #fsPermanentTvCode,
body.hide-cursor #fsPermanentTvCode {
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
  transform: translateY(-8px) !important;
}

@media (min-width: 2200px) {
  .smarters-dashboard-wrap {
    max-width: 96%;
    padding: 40px 60px;
  }
  .hero-smarters-card {
    height: 360px;
    padding: 36px;
  }
  .hero-card-title {
    font-size: 32px;
  }
  .hero-card-desc {
    font-size: 16px;
  }
  .tv-categories-col {
    width: 360px;
  }
  .tv-cat-btn {
    font-size: 16px;
    padding: 16px 20px;
  }
  .tv-channel-card {
    height: 75px;
  }
  .tv-channel-name {
    font-size: 16px;
  }
}

/* ==========================================================================
   SMART TV CAST & NETWORK PAIRING STYLES (DONPLAYER ULTRA DIRECT CAST)
   ========================================================================== */
.tv-connected-card {
  background: linear-gradient(135deg, rgba(var(--accent-cyan-rgb), 0.15), rgba(16, 185, 129, 0.10));
  border: 1.5px solid var(--accent-cyan);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 8px 32px rgba(var(--accent-cyan-rgb), 0.15);
}

.tv-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tv-icon-glow {
  font-size: 28px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--accent-cyan-rgb), 0.2);
  border-radius: 12px;
  border: 1px solid rgba(var(--accent-cyan-rgb), 0.4);
}

.tv-card-info {
  flex: 1;
  min-width: 0;
}

.tv-card-title {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tv-card-status {
  font-size: 12px;
  color: #34d399;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  font-weight: 600;
}

.status-dot-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
  animation: tvDotPulse 1.8s infinite;
}

@keyframes tvDotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.btn-tv-unpair {
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.4);
  color: #f43f5e;
  border-radius: 8px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  transition: all 0.2s;
}

.btn-tv-unpair:hover {
  background: rgba(244, 63, 94, 0.3);
  transform: scale(1.05);
}

.btn-cast-primary {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-deep));
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 14px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 16px rgba(var(--accent-cyan-rgb), 0.4);
  transition: all 0.2s;
}

.btn-cast-primary:hover, .btn-cast-primary:focus {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(var(--accent-cyan-rgb), 0.6);
}

.btn-cast-primary:active {
  transform: scale(0.98);
}

.tv-autocast-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px 14px;
}

.switch-container {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.switch-container input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.15);
  transition: .3s;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.switch-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

.switch-container input:checked + .switch-slider {
  background-color: var(--accent-cyan);
  border-color: var(--accent-cyan);
}

.switch-container input:checked + .switch-slider:before {
  transform: translateX(20px);
}

.autocast-text strong {
  font-size: 13px;
  color: #fff;
  display: block;
}

.autocast-text p {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.tv-quick-remote {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.tv-remote-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  border-radius: 10px;
  padding: 10px 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s;
}

.tv-remote-btn:hover, .tv-remote-btn:focus {
  background: rgba(var(--accent-cyan-rgb), 0.2);
  border-color: var(--accent-cyan);
}

.tv-remote-btn:active {
  transform: scale(0.95);
}

.tv-remote-btn.tv-btn-accent {
  grid-column: span 3;
  background: rgba(var(--accent-cyan-rgb), 0.15);
  border-color: rgba(var(--accent-cyan-rgb), 0.5);
  color: var(--accent-cyan-light);
  font-weight: 800;
}

.btn-sync-playlist-tv {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
  border-radius: 10px;
  padding: 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
}

.btn-sync-playlist-tv:hover {
  background: rgba(245, 158, 11, 0.25);
}

.tv-pairing-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pairing-box-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
}

.pairing-box-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

.pairing-box-desc code {
  background: rgba(var(--accent-cyan-rgb), 0.18);
  color: var(--accent-cyan-light);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 800;
}

.tv-code-input-row {
  display: flex;
  gap: 8px;
}

.tv-code-input {
  flex: 1;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-align: center;
  color: var(--accent-cyan-light) !important;
}

.btn-pair-submit {
  background: var(--accent-cyan);
  color: #060913;
  border: none;
  border-radius: 10px;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.btn-pair-submit:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-qr-scan {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  border-radius: 10px;
  padding: 0 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.btn-qr-scan:hover {
  background: rgba(255, 255, 255, 0.16);
}

.detected-screens-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  margin-top: 4px;
}

.btn-refresh-screens {
  background: transparent;
  border: none;
  color: var(--accent-cyan-light);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.detected-screens-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
}

.detected-screen-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px 12px;
  transition: all 0.2s;
}

.detected-screen-item:hover {
  background: rgba(var(--accent-cyan-rgb), 0.1);
  border-color: rgba(var(--accent-cyan-rgb), 0.4);
}

.detected-screen-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.detected-screen-text {
  min-width: 0;
}

.detected-screen-name {
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.detected-screen-sub {
  font-size: 11px;
  color: var(--text-muted);
}

.btn-pair-item {
  background: rgba(var(--accent-cyan-rgb), 0.2);
  border: 1px solid var(--accent-cyan);
  color: var(--accent-cyan-light);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.btn-pair-item:hover {
  background: var(--accent-cyan);
  color: #060913;
}


/* ==========================================================================
   DONPLAYER ULTRA - 2026 CYBER FUTURISTIC OLED UPGRADE
   Cockpit Verre Fumé, Balises Néon Pulsantes, Égaliseur Audio & Radar TV
   ========================================================================== */

/* 1. Égaliseur Audio & Indicateur Live sur la Chaîne Active */
.ch-live-indicator {
  display: none;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  margin-right: 8px;
  flex-shrink: 0;
}

.channel-item-row.active .ch-live-indicator {
  display: flex !important;
}

.cyber-eq {
  display: flex;
  align-items: flex-end;
  gap: 2.5px;
  height: 16px;
  padding: 2px 4px;
}

.cyber-eq-bar {
  width: 3px;
  background: linear-gradient(180deg, var(--accent-cyan-light), var(--accent-cyan));
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(var(--accent-cyan-rgb), 0.85);
  animation: cyberEqAnim 0.85s infinite ease-in-out alternate;
}

.cyber-eq-bar:nth-child(1) { height: 6px; animation-delay: 0.1s; animation-duration: 0.75s; }
.cyber-eq-bar:nth-child(2) { height: 16px; animation-delay: 0.25s; animation-duration: 0.6s; }
.cyber-eq-bar:nth-child(3) { height: 10px; animation-delay: 0.4s; animation-duration: 0.9s; }

@keyframes cyberEqAnim {
  0% { height: 3px; opacity: 0.6; }
  100% { height: 16px; opacity: 1; }
}

/* 2. Balise DIRECT Pulsante Haute Technologie */
.badge-live-tag {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  background: linear-gradient(135deg, var(--accent-rose-hot), var(--accent-rose-hot)) !important;
  color: #fff !important;
  font-size: 10px !important;
  font-weight: 900 !important;
  padding: 3px 9px !important;
  border-radius: 6px !important;
  letter-spacing: 0.8px !important;
  box-shadow: 0 0 14px rgba(var(--accent-rose-hot-rgb), 0.65) !important;
  text-transform: uppercase !important;
}

.badge-live-tag::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 8px #ffffff;
  animation: liveBeaconPulse 1.2s infinite ease-in-out;
}

@keyframes liveBeaconPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.6); opacity: 0.35; }
}

/* 3. Badge Technologique 4K HDR Monospace */
.badge-tech-tag {
  display: inline-flex !important;
  align-items: center !important;
  background: rgba(var(--accent-cyan-rgb), 0.16) !important;
  border: 1px solid rgba(var(--accent-cyan-rgb), 0.45) !important;
  color: var(--accent-cyan-light) !important;
  font-size: 10px !important;
  font-weight: 900 !important;
  font-family: 'Consolas', 'Courier New', monospace, sans-serif !important;
  padding: 2.5px 7px !important;
  border-radius: 5px !important;
  letter-spacing: 0.6px !important;
  box-shadow: 0 0 10px rgba(var(--accent-cyan-rgb), 0.25) !important;
}

/* 4. Scanner Radar Balayage Laser pour Caméra QR Code */
.radar-sweep-line {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent-cyan), var(--accent-rose), transparent);
  box-shadow: 0 0 16px var(--accent-cyan);
  animation: radarSweep 2s infinite linear;
  z-index: 5;
  pointer-events: none;
}

@keyframes radarSweep {
  0% { top: 0%; opacity: 0.8; }
  50% { opacity: 1; }
  100% { top: 100%; opacity: 0.8; }
}

/* 5. Cartes Dashboard Futuristes avec Liseré Néon */
.hero-smarters-card {
  position: relative !important;
  overflow: hidden !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(18px) !important;
  -webkit-backdrop-filter: blur(18px) !important;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s ease, border-color 0.22s ease !important;
}

.hero-smarters-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(var(--accent-cyan-rgb), 0.9), rgba(var(--accent-rose-rgb), 0.9), transparent);
  opacity: 0.8;
}

.hero-smarters-card:hover,
.hero-smarters-card:focus {
  transform: translateY(-4px) scale(1.02) !important;
  border-color: var(--accent-cyan) !important;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.75), 0 0 25px rgba(var(--accent-cyan-rgb), 0.4) !important;
}

/* 6. Dock Bas Mobile Futuriste (Glow & Flou Profond) */
@media (max-width: 950px) {
  .mobile-bottom-nav {
    background: rgba(4, 7, 18, 0.95) !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 -4px 25px rgba(0, 0, 0, 0.8), 0 -1px 0 rgba(var(--accent-cyan-rgb), 0.25) !important;
  }

  .mob-nav-item.active {
    color: var(--accent-cyan) !important;
    text-shadow: 0 0 12px rgba(var(--accent-cyan-rgb), 0.65) !important;
  }

  .mob-nav-item.active .mob-nav-icon {
    transform: scale(1.18) !important;
    filter: drop-shadow(0 0 8px rgba(var(--accent-cyan-rgb), 0.85)) !important;
  }
}

/* ==========================================================================
   DESKTOP WEB : CONTRÔLES AFFICHAGE, MODES IMAGE & POPOVER 4K IA (+ DE MODES)
   (Strictement isolé sur bureau min-width: 951px, smartphone intact)
   ========================================================================== */
.desktop-only-ctrl {
  display: none !important;
}

@media (min-width: 951px) {
  .desktop-only-ctrl {
    display: inline-flex !important;
  }

  .controls-buttons-row {
    flex-wrap: wrap;
    gap: 10px 14px;
  }

  .controls-group-left,
  .controls-group-center,
  .controls-group-right {
    gap: 8px;
    flex-wrap: wrap;
  }

  #audioTrackSelect,
  #subTrackSelect {
    max-width: 175px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

.ctrl-btn-aspect,
.ctrl-btn-quality,
.btn-mini-quality {
  white-space: nowrap;
}

.ctrl-btn-aspect.is-custom-fit,
#btnMiniAspect.is-custom-fit {
  background: rgba(var(--accent-cyan-rgb), 0.22);
  border-color: rgba(var(--accent-cyan-bright-rgb), 0.72);
  color: var(--accent-cyan-light);
}

.ctrl-btn-quality {
  min-width: 118px;
  justify-content: center;
  border-radius: 12px;
  padding: 8px 13px;
}

.ctrl-btn-quality.is-ai-active,
.btn-mini-quality.is-ai-active {
  background: linear-gradient(135deg, rgba(var(--accent-rose-hot-rgb), 0.22), rgba(var(--accent-cyan-rgb), 0.24));
  border-color: rgba(var(--accent-rose-rgb), 0.72);
  color: #f8fafc;
  box-shadow: 0 0 14px rgba(var(--accent-rose-hot-rgb), 0.3);
}

.picture-mode-menu {
  position: fixed;
  width: min(390px, calc(100vw - 24px));
  max-height: min(82vh, 620px);
  overflow-y: auto;
  background: rgba(8, 13, 28, 0.97);
  border: 1px solid rgba(var(--accent-cyan-bright-rgb), 0.42);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.85), 0 0 28px rgba(var(--accent-cyan-rgb), 0.22);
  z-index: 260;
  color: #f8fafc;
}

.pic-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 10px;
}

.pic-menu-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.pic-menu-title {
  font-size: 14px;
  font-weight: 800;
  color: #ffffff;
}

.pic-menu-sync-pill {
  font-size: 11px;
  font-weight: 700;
  color: #34d399;
}

.pic-menu-close {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #cbd5e1;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.pic-menu-close:hover {
  background: rgba(244, 63, 94, 0.25);
  color: #fff;
}

.pic-menu-section-label {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.9px;
  color: #94a3b8;
  margin: 8px 0 6px;
}

.pic-menu-section-label.pic-section-ai {
  color: var(--accent-rose);
  margin-top: 12px;
}

.pic-menu-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pic-mode-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 11px;
  padding: 8px 11px;
  color: #e2e8f0;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.pic-mode-option:hover {
  background: rgba(var(--accent-cyan-rgb), 0.14);
  border-color: rgba(var(--accent-cyan-bright-rgb), 0.45);
}

.pic-mode-option.active {
  background: linear-gradient(90deg, rgba(var(--accent-cyan-rgb), 0.24), rgba(var(--accent-rose-hot-rgb), 0.22));
  border-color: var(--accent-cyan-bright);
  box-shadow: 0 0 14px rgba(var(--accent-cyan-rgb), 0.25);
}

.pic-opt-icon {
  font-size: 18px;
  width: 26px;
  text-align: center;
  flex-shrink: 0;
}

.pic-opt-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.pic-opt-meta strong {
  font-size: 12.5px;
  font-weight: 800;
  color: #fff;
}

.pic-opt-meta small {
  font-size: 11px;
  color: #94a3b8;
}

.pic-menu-footer {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.pic-resync-btn {
  width: 100%;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(52, 211, 153, 0.45);
  color: #6ee7b7;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.15s ease;
}

.pic-resync-btn:hover {
  background: rgba(16, 185, 129, 0.26);
  color: #fff;
}

/* ==========================================================================
   THÈMES DYNAMIQUES (MODE 2 AUTO + MODE 1 MANUEL AU CHOIX)
   Transition Futuriste "Quantum HUD" GPU (zéro impact vidéo/audio)
   ========================================================================== */
body,
.smarters-header,
.brand-crest,
.icon-btn-header,
.account-status-pill,
.header-now-playing-pill,
.hero-smarters-card,
.hero-action-link,
.sub-smarters-card,
.tv-categories-col,
.tv-cat-btn,
.tv-channels-col,
.channel-item-row,
.ch-number,
.stage-bottom-bar,
.btn-mini-ctrl,
.btn-launch-fullscreen,
.mini-epg-progress-fill,
.epg-fill,
.badge-live-tag,
.badge-tech-tag,
.modal-card,
.theme-settings-card,
.mobile-bottom-nav {
  transition:
    background 1.35s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 1.1s ease,
    box-shadow 1.35s ease,
    color 0.85s ease;
}

.theme-shift-wave {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9990;
  opacity: 0;
  transform: translate3d(-115%, 0, 0) skewX(-16deg);
  background: linear-gradient(
    110deg,
    transparent 12%,
    rgba(var(--accent-cyan-rgb), 0.14) 36%,
    rgba(var(--accent-rose-rgb), 0.22) 50%,
    rgba(var(--accent-cyan-rgb), 0.14) 64%,
    transparent 88%
  );
  will-change: transform, opacity;
}

.theme-shift-wave.active {
  animation: quantumThemeSweep 1.15s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes quantumThemeSweep {
  0% {
    opacity: 0;
    transform: translate3d(-115%, 0, 0) skewX(-16deg);
  }
  25% {
    opacity: 0.95;
  }
  70% {
    opacity: 0.7;
  }
  100% {
    opacity: 0;
    transform: translate3d(115%, 0, 0) skewX(-16deg);
  }
}

.theme-hud-badge {
  position: fixed;
  top: 64px;
  left: 50%;
  transform: translate3d(-50%, -14px, 0) scale(0.94);
  opacity: 0;
  pointer-events: none;
  z-index: 9992;
  padding: 6px 14px;
  border-radius: 9999px;
  background: rgba(6, 10, 22, 0.88);
  border: 1px solid rgba(var(--accent-cyan-rgb), 0.7);
  color: #f8fafc;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.4px;
  white-space: nowrap;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.65), 0 0 18px rgba(var(--accent-cyan-rgb), 0.35);
  transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease, border-color 0.8s ease;
  will-change: transform, opacity;
}

.theme-hud-badge.show {
  opacity: 1;
  transform: translate3d(-50%, 0, 0) scale(1);
}

@media (min-width: 951px) {
  .theme-hud-badge {
    top: 88px;
  }
}

body.fullscreen-mode .theme-shift-wave,
body.fullscreen-mode .theme-hud-badge {
  display: none !important;
}

.desktop-theme-btn {
  display: flex;
  position: relative;
}

.desktop-theme-btn::after {
  content: '';
  position: absolute;
  bottom: 5px;
  right: 5px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-rose));
  border: 1px solid #fff;
  box-shadow: 0 0 8px rgba(var(--accent-cyan-rgb), 0.9);
}

@media (min-width: 951px) {
  .desktop-theme-btn {
    display: flex;
  }
}

#settingsModal .modal-card {
  max-height: 88vh;
  overflow-y: auto;
}

.theme-settings-card {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(var(--accent-cyan-rgb), 0.35);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.theme-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.theme-card-title {
  font-size: 13.5px;
  font-weight: 800;
  color: #fff;
  display: block;
}

.theme-status-pill {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-cyan-light);
  margin-top: 2px;
}

.theme-btn-next {
  background: rgba(var(--accent-cyan-rgb), 0.16);
  border: 1px solid rgba(var(--accent-cyan-rgb), 0.45);
  color: #fff;
  border-radius: 9px;
  padding: 6px 11px;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, transform 0.12s ease;
}

.theme-btn-next:hover,
.theme-btn-next:focus {
  background: rgba(var(--accent-cyan-rgb), 0.32);
  border-color: var(--accent-cyan);
  transform: scale(1.03);
}

.theme-mode2-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 11px;
  padding: 9px 12px;
}

.theme-mode2-info strong {
  font-size: 12.5px;
  color: #f8fafc;
  display: block;
}

.theme-mode2-info small {
  font-size: 11px;
  color: #94a3b8;
  display: block;
  margin-top: 2px;
}

.theme-mode1-header {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-secondary);
  letter-spacing: 0.4px;
  margin-top: 2px;
}

.theme-presets-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.theme-swatch-card {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid rgba(255, 255, 255, 0.09);
  color: #e2e8f0;
  cursor: pointer;
  text-align: left;
  transition: transform 0.14s ease, border-color 0.18s ease, background 0.18s ease;
}

.theme-swatch-card:hover,
.theme-swatch-card:focus {
  border-color: var(--accent-cyan);
  background: rgba(var(--accent-cyan-rgb), 0.14);
}

.theme-swatch-card.active {
  border-color: var(--accent-cyan);
  background: linear-gradient(135deg, rgba(var(--accent-cyan-rgb), 0.22), rgba(var(--accent-rose-rgb), 0.18));
  box-shadow: 0 0 14px rgba(var(--accent-cyan-rgb), 0.3);
  color: #fff;
}

.theme-swatch-dots {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
}

.theme-swatch-label {
  font-size: 11.5px;
  font-weight: 800;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* ==========================================================================
   DESKTOP LIVE TV POLISH (SAFE SCOPED >= 951px, MOBILE UNTOUCHED)
   ========================================================================== */
@media (min-width: 951px) {
  html, body {
    height: 100dvh;
  }

  .app-screen,
  .live-tv-container,
  .tv-categories-col,
  .tv-channels-col,
  .tv-preview-stage,
  .stage-video-wrapper {
    min-height: 0;
  }

  .live-tv-container {
    height: 100%;
    overflow: hidden;
  }

  .tv-categories-col,
  .tv-channels-col,
  .tv-preview-stage {
    height: 100%;
    overflow: hidden;
  }

  .tv-preview-stage {
    display: flex;
    flex-direction: column;
  }

  body:not(.fullscreen-mode) .stage-video-wrapper {
    flex: 1 1 0%;
    min-height: 0;
    overflow: hidden;
  }

  /* Compact vertical scroll dock at bottom of categories & channels */
  .tv-easy-scroll-bar {
    padding: 6px 8px;
    gap: 6px;
  }

  .tv-easy-scroll-bar .btn-tv-scroll {
    padding: 6px 8px;
    font-size: 11.5px;
    line-height: 1.15;
    min-height: 30px;
    border-radius: 8px;
    white-space: nowrap;
  }

  /* Sleek non-wrapping control deck under live stage */
  body:not(.fullscreen-mode) .stage-bottom-bar {
    padding: 8px 14px;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 6px;
  }

  body:not(.fullscreen-mode) .stage-bottom-bar .stage-info-meta {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    width: 100%;
  }

  body:not(.fullscreen-mode) .stage-bottom-bar .stage-info-meta h3,
  body:not(.fullscreen-mode) .stage-bottom-bar #previewTitle {
    margin: 0;
    font-size: 14px;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    flex: 1 1 auto;
  }

  body:not(.fullscreen-mode) .stage-bottom-bar #previewSub {
    margin: 0;
    font-size: 11.5px;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    max-width: 50%;
    text-align: right;
  }

  body:not(.fullscreen-mode) .stage-mini-actions-deck {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    width: 100%;
    min-width: 0;
  }

  body:not(.fullscreen-mode) .stage-mini-actions-deck .btn-mini-ctrl {
    padding: 6px 10px;
    font-size: 11.5px;
    line-height: 1.15;
    gap: 5px;
    white-space: nowrap;
    flex: 0 0 auto;
    border-radius: 9px;
  }

  body:not(.fullscreen-mode) #miniVolumeDeck {
    padding: 4px 9px;
    gap: 6px;
    flex: 1 1 118px;
    min-width: 96px;
    max-width: 176px;
    display: inline-flex;
    align-items: center;
  }

  body:not(.fullscreen-mode) #miniVolumeDeck input[type="range"] {
    flex: 1 1 50px;
    min-width: 44px;
    width: 100%;
  }

  body:not(.fullscreen-mode) #btnLaunchFsBar {
    margin-left: auto;
  }
}

/* Reclaim width on 951px..1480px laptops so the Live TV stage stays generous */
@media (min-width: 951px) and (max-width: 1480px) {
  .smarters-header {
    gap: 10px;
  }

  .header-brand-wrap {
    gap: 10px;
    flex-shrink: 0;
  }

  .brand-titles h1 {
    font-size: 18px;
  }

  .brand-titles p {
    font-size: 9.5px;
    letter-spacing: 0.7px;
    white-space: nowrap;
  }

  .header-center-info {
    gap: 12px;
    min-width: 0;
  }

  .clock-panel {
    flex-shrink: 0;
    white-space: nowrap;
  }

  .clock-date {
    font-size: 10.5px;
    white-space: nowrap;
  }

  .header-now-playing-pill {
    max-width: 180px;
  }

  .tv-categories-col {
    width: 224px;
    min-width: 224px;
    flex: 0 0 224px;
  }

  .tv-channels-col {
    width: 340px;
    min-width: 340px;
    flex: 0 0 340px;
  }

  body:not(.fullscreen-mode) .stage-mini-actions-deck {
    gap: 5px;
  }

  body:not(.fullscreen-mode) .stage-mini-actions-deck .btn-mini-ctrl {
    padding: 6px 8px;
    font-size: 11px;
  }
}

/* Tighter columns on compact desktop windows (951px..1180px) */
@media (min-width: 951px) and (max-width: 1180px) {
  .tv-categories-col {
    width: 196px;
    min-width: 196px;
    flex: 0 0 196px;
  }

  .tv-channels-col {
    width: 292px;
    min-width: 292px;
    flex: 0 0 292px;
  }

  body:not(.fullscreen-mode) .stage-mini-actions-deck .btn-mini-ctrl {
    padding: 5px 6px;
    font-size: 10.5px;
    gap: 3px;
  }

  body:not(.fullscreen-mode) #miniVolumeDeck {
    min-width: 82px;
    padding: 4px 6px;
  }
}

/* Compact header on short laptop viewports (e.g. 1366x636 inside Chrome + taskbar) */
@media (min-width: 951px) and (max-height: 760px) {
  .smarters-header {
    height: 64px;
    padding: 0 20px;
  }

  .brand-crest {
    width: 42px;
    height: 42px;
  }

  .brand-titles h1 {
    font-size: 19px;
  }

  .app-screen {
    top: 64px;
  }

  body:not(.fullscreen-mode) .stage-bottom-bar {
    padding: 6px 12px;
    gap: 5px;
  }
}

/* Smartphone portrait (Google Play / Mobile) : retrait fluide de la barre basse pour libérer l'écran */
@media (max-width: 860px) {
  body .mobile-bottom-nav {
    transition:
      transform 0.6s cubic-bezier(0.22, 1, 0.36, 1),
      opacity 0.45s ease,
      background 1.35s cubic-bezier(0.22, 1, 0.36, 1),
      border-color 1.1s ease,
      box-shadow 1.35s ease,
      color 0.85s ease !important;
    will-change: transform, opacity;
    transform: translate3d(0, 0, 0);
    opacity: 1;
  }

  body.mobile-nav-retracted .mobile-bottom-nav {
    transform: translate3d(0, calc(100% + env(safe-area-inset-bottom, 0px) + 14px), 0) !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  body.mobile-nav-retracted .theme-hud-badge {
    bottom: calc(18px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

/* Modal confirmation de sortie Smart TV Tizen + focus visible haute visibilité dans les modales */
.exit-confirm-card {
  max-width: 480px;
}

.exit-confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 4px;
}

.modal-backdrop .focusable:focus,
.modal-backdrop button:focus {
  outline: 3px solid var(--accent-cyan) !important;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.28), 0 8px 24px rgba(0, 0, 0, 0.45) !important;
  transform: scale(1.02);
}


/* ==========================================================================
   CHROMECAST / ANDROID TV / SMART TV — RECADRAGE MODALE M3U & CLAVIER TV
   ========================================================================== */
.modal-backdrop {
  overflow-y: auto !important;
}
.modal-card {
  max-height: 92vh !important;
  display: flex !important;
  flex-direction: column !important;
}
.modal-body {
  overflow-y: auto !important;
  max-height: calc(92vh - 54px) !important;
}
.form-input:focus {
  border: 2px solid #38bdf8 !important;
  background: #040814 !important;
  color: #ffffff !important;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.38) !important;
}
.modal-backdrop.input-focused,
body.smart-tv-mode .modal-backdrop {
  align-items: flex-start !important;
  padding-top: 10px !important;
}
@media (max-height: 760px) {
  .modal-backdrop {
    align-items: flex-start !important;
    padding: 10px 14px !important;
  }
  .modal-card {
    max-height: 95vh !important;
  }
  .modal-body {
    max-height: calc(95vh - 48px) !important;
    padding: 10px 14px !important;
    gap: 8px !important;
  }
}