:root {
  --netflix-red: #E50914;
  --netflix-dark-red: #B81D24;
  --bg-color: #141414;
  --card-bg: #181818;
  --text-primary: #FFFFFF;
  --text-secondary: #AAAAAA;
  --nav-height: 68px;
  --transition-smooth: all 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  overflow-x: hidden;
  user-select: none;
}

/* ================= HEADER / NAVBAR ================= */
.netflix-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4%;
  z-index: 100;
  transition: background-color 0.4s ease, box-shadow 0.4s ease;
  background: linear-gradient(180deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 100%);
}

.netflix-header.scrolled {
  background-color: #141414;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.7);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 30px;
}

.netflix-logo {
  height: 32px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.netflix-logo:hover {
  transform: scale(1.04);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 20px;
}

.nav-link {
  color: #e5e5e5;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 400;
  transition: color 0.2s ease;
  cursor: pointer;
}

.nav-link:hover, .nav-link.active {
  color: #ffffff;
  font-weight: 600;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 22px;
}

.search-box {
  display: flex;
  align-items: center;
  position: relative;
}

.search-input {
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid #444;
  color: #fff;
  padding: 6px 12px 6px 36px;
  border-radius: 4px;
  font-size: 0.85rem;
  outline: none;
  width: 220px;
  transition: var(--transition-smooth);
}

.search-input:focus {
  border-color: #ffffff;
  background: rgba(0, 0, 0, 0.95);
  width: 280px;
}

.search-icon {
  position: absolute;
  left: 10px;
  color: #aaa;
  pointer-events: none;
}

.profile-container {
  position: relative;
  cursor: pointer;
}

.profile-avatar {
  width: 34px;
  height: 34px;
  border-radius: 4px;
  border: 1.5px solid transparent;
  transition: border-color 0.2s ease;
  background: #333;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-avatar:hover {
  border-color: #fff;
}

.profile-dropdown {
  position: absolute;
  top: 45px;
  right: 0;
  background: rgba(20, 20, 20, 0.96);
  border: 1px solid #333;
  border-radius: 4px;
  width: 220px;
  display: none;
  flex-direction: column;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 101;
}

.profile-container:hover .profile-dropdown {
  display: flex;
}

.dropdown-item {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  color: #e5e5e5;
  text-decoration: none;
  transition: background-color 0.2s ease;
  border-bottom: 1px solid #222;
}

.dropdown-item:last-child {
  border-bottom: none;
}

.dropdown-item:hover {
  background-color: #2b2b2b;
  color: #fff;
}

.dropdown-item.admin-btn {
  color: #ff5555;
  font-weight: 600;
}

.dropdown-item.admin-btn:hover {
  background-color: var(--netflix-red);
  color: #fff;
}

/* ================= HERO BILLBOARD ================= */
.hero-banner {
  position: relative;
  height: 85vh;
  min-height: 550px;
  max-height: 900px;
  display: flex;
  align-items: center;
  padding: 0 4%;
  background-size: cover;
  background-position: center 20%;
  transition: background-image 0.7s ease-in-out;
}

.hero-vignette {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(77deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0) 85%),
              linear-gradient(180deg, rgba(20,20,20,0) 60%, rgba(20,20,20,0.9) 90%, #141414 100%);
  pointer-events: none;
}

.hero-video-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  pointer-events: none;
}

.hero-video-bg.active {
  opacity: 0.65;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 600px;
  margin-top: 50px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(229, 9, 20, 0.85);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 3px;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.05;
  margin-bottom: 14px;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.8);
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 0.9rem;
}

.match-score {
  color: #46d369;
  font-weight: 700;
}

.age-badge {
  border: 1px solid #777;
  padding: 1px 6px;
  border-radius: 2px;
  font-size: 0.75rem;
  color: #ccc;
}

.quality-badge {
  border: 1px solid #777;
  padding: 1px 6px;
  border-radius: 2px;
  font-size: 0.72rem;
  color: #eee;
}

.hero-synopsis {
  font-size: 1.05rem;
  line-height: 1.45;
  color: #e5e5e5;
  margin-bottom: 24px;
  text-shadow: 1px 1px 4px rgba(0,0,0,0.9);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-buttons {
  display: flex;
  align-items: center;
  gap: 14px;
}

.btn-netflix {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: 4px;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  outline: none;
}

.btn-netflix-primary {
  background-color: #FFFFFF;
  color: #000000;
}

.btn-netflix-primary:hover {
  background-color: rgba(255, 255, 255, 0.75);
  transform: scale(1.03);
}

.btn-netflix-secondary {
  background-color: rgba(109, 109, 110, 0.7);
  color: #FFFFFF;
}

.btn-netflix-secondary:hover {
  background-color: rgba(109, 109, 110, 0.4);
  transform: scale(1.03);
}

.hero-audio-toggle {
  position: absolute;
  right: 4%;
  bottom: 22%;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: all 0.2s ease;
}

.hero-audio-toggle:hover {
  background: rgba(0, 0, 0, 0.8);
  border-color: #fff;
  transform: scale(1.1);
}

/* ================= CATALOG CAROUSELS ================= */
.catalog-section {
  position: relative;
  margin-top: -80px;
  padding-bottom: 80px;
  z-index: 10;
}

.movie-row {
  margin-bottom: 42px;
  position: relative;
  content-visibility: auto;
  contain-intrinsic-size: 0 380px;
}

.row-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-left: 4%;
  margin-bottom: 12px;
  color: #e5e5e5;
  transition: color 0.2s ease;
}

.row-title:hover {
  color: #ffffff;
  cursor: pointer;
}

.row-slider-container {
  position: relative;
  padding: 0 4%;
}

.slider-arrow {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 4%;
  background: rgba(0, 0, 0, 0.6);
  border: none;
  color: #fff;
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s ease, background-color 0.2s ease;
  z-index: 20;
}

.row-slider-container:hover .slider-arrow {
  opacity: 1;
}

.slider-arrow:hover {
  background: rgba(0, 0, 0, 0.85);
}

.slider-arrow.left {
  left: 0;
  border-top-right-radius: 4px;
  border-bottom-right-radius: 4px;
}

.slider-arrow.right {
  right: 0;
  border-top-left-radius: 4px;
  border-bottom-left-radius: 4px;
}

.row-slider {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 20px 0;
  scrollbar-width: none;
}

.row-slider::-webkit-scrollbar {
  display: none;
}

/* CARTE DE FILM AVEC EFFET NETFLIX */
.movie-card {
  flex: 0 0 210px;
  height: 310px;
  position: relative;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.2s ease, border-color 0.2s ease;
  background-color: var(--card-bg);
  overflow: hidden;
  contain: layout paint;
  will-change: transform;
}

.movie-card:hover {
  transform: scale(1.04) translateY(-3px);
  z-index: 15;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.8);
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
  transition: filter 0.3s ease;
}

.card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px 12px 10px;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.95) 100%);
  opacity: 0;
  transition: opacity 0.25s ease;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.movie-card:hover .card-overlay {
  opacity: 1;
}

.card-title {
  font-size: 0.95rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.action-circle-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid #777;
  background: rgba(40, 40, 40, 0.8);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.action-circle-btn:hover {
  border-color: #fff;
  background: #fff;
  color: #000;
  transform: scale(1.1);
}

.action-circle-btn.play-btn {
  background: #fff;
  color: #000;
  border: none;
}

.action-circle-btn.play-btn:hover {
  background: rgba(255, 255, 255, 0.8);
}

.card-tags {
  font-size: 0.72rem;
  color: #aaa;
  display: flex;
  gap: 6px;
}

/* ================= MODAL DÉTAILS ================= */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
}

.modal-backdrop.active {
  display: flex;
}

.modal-container {
  background: #181818;
  width: 100%;
  max-width: 850px;
  max-height: 90vh;
  border-radius: 8px;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.95);
  animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #181818;
  border: none;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
}

.modal-close-btn:hover {
  background-color: #333;
}

.modal-banner {
  position: relative;
  height: 420px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  padding: 30px;
}

.modal-banner-vignette {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(24, 24, 24, 0.8) 80%, #181818 100%);
}

.modal-banner-content {
  position: relative;
  z-index: 2;
}

.modal-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.modal-body {
  padding: 24px 30px;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
}

.modal-synopsis {
  font-size: 1rem;
  line-height: 1.6;
  color: #e5e5e5;
  margin-bottom: 20px;
}

.modal-details-side {
  font-size: 0.85rem;
  color: #777;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.detail-line span {
  color: #fff;
}

.hidden {
  display: none !important;
}

/* ================= SECTION ÉPISODES MODAL (STYLE NETFLIX) ================= */
.modal-episodes-section {
  padding: 0 30px 32px;
}

.modal-episodes-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
  margin-bottom: 24px;
}

.modal-episodes-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 14px;
}

.modal-episodes-header-left {
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.modal-episodes-heading {
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  margin: 0;
}

.modal-episodes-subtitle {
  font-size: 0.95rem;
  color: #888;
  font-weight: 500;
}

.modal-season-select-wrapper {
  position: relative;
  display: inline-block;
}

.modal-season-select {
  appearance: none;
  -webkit-appearance: none;
  background-color: #242424;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 9px 38px 9px 16px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

.modal-season-select:hover {
  background-color: #303030;
  border-color: rgba(255, 255, 255, 0.4);
}

.modal-season-select:focus {
  border-color: #e50914;
  box-shadow: 0 0 0 2px rgba(229, 9, 20, 0.3);
}

.modal-episodes-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-episode-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 20px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: left;
}

.modal-episode-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateX(4px);
}

.modal-episode-num {
  font-size: 1.4rem;
  font-weight: 800;
  color: #777;
  min-width: 28px;
  text-align: center;
  transition: color 0.2s ease;
}

.modal-episode-card:hover .modal-episode-num {
  color: #fff;
}

.modal-episode-thumb-container {
  width: 136px;
  height: 76px;
  flex-shrink: 0;
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  background: #111;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.modal-episode-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.modal-episode-card:hover .modal-episode-thumb {
  transform: scale(1.06);
}

.modal-episode-play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.modal-episode-card:hover .modal-episode-play-overlay {
  opacity: 1;
}

.modal-episode-play-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  padding-left: 2px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.modal-episode-card:hover .modal-episode-play-icon {
  transform: scale(1.1);
  background: #e50914;
  border-color: #e50914;
}

.modal-episode-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.modal-episode-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.modal-episode-title {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modal-episode-duration {
  font-size: 0.85rem;
  font-weight: 600;
  color: #a3a3a3;
  white-space: nowrap;
}

.modal-episode-overview {
  font-size: 0.85rem;
  line-height: 1.45;
  color: #999;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

@media (max-width: 640px) {
  .modal-episodes-section {
    padding: 0 16px 24px;
  }
  .modal-episode-card {
    padding: 12px 14px;
    gap: 12px;
  }
  .modal-episode-thumb-container {
    width: 100px;
    height: 56px;
  }
  .modal-episode-num {
    font-size: 1.1rem;
    min-width: 20px;
  }
  .modal-episode-title {
    font-size: 0.9rem;
  }
  .modal-episode-duration {
    font-size: 0.75rem;
  }
  .modal-episode-overview {
    display: none;
  }
}


/* ================= LECTEUR VIDÉO NETFLIX PLEIN ÉCRAN ================= */
.netflix-player-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #000;
  z-index: 9999;
  display: none;
  overflow: hidden;
  margin: 0;
  padding: 0;
}

.netflix-player-overlay.active {
  display: block;
}

/* ================= BARRE SUPÉRIEURE FLOTTANTE NETFLIX (TOUJOURS ACCESSIBLE) ================= */
.player-top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 16px 28px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.6) 75%, transparent 100%);
  display: flex;
  align-items: center;
  gap: 20px;
  z-index: 999999;
  pointer-events: auto;
  transition: opacity 0.35s ease, visibility 0.35s ease, transform 0.35s ease;
}

.player-back-btn {
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 1.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.player-back-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.08);
  border-color: rgba(255, 255, 255, 0.4);
}

.player-header-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.player-title-display {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.3px;
}

.player-meta-display {
  font-size: 0.82rem;
  color: #aaa;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ================= SÉLECTEUR DE SERVEURS AVEC NAVIGATION & DÉFILEMENT ================= */
.player-server-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  position: relative;
  max-width: calc(100vw - 380px);
  min-width: 0;
  flex: 1 1 auto;
  justify-content: flex-end;
}

.server-nav-btn {
  background: rgba(22, 22, 22, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  font-weight: 700;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
  user-select: none;
  z-index: 5;
  padding: 0;
  padding-bottom: 2px;
}

.server-nav-btn:hover:not(:disabled) {
  background: var(--netflix-red);
  border-color: var(--netflix-red);
  transform: scale(1.12);
  box-shadow: 0 0 16px rgba(229, 9, 20, 0.7);
}

.server-nav-btn:active:not(:disabled) {
  transform: scale(0.95);
}

.server-nav-btn:disabled,
.server-nav-btn.is-disabled {
  opacity: 0.18;
  cursor: default;
  pointer-events: none;
}

.player-server-selector {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(18, 18, 18, 0.92);
  padding: 5px 8px;
  border-radius: 24px;
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.7);
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(229, 9, 20, 0.5) transparent;
  cursor: grab;
}

.player-server-selector.is-dragging {
  cursor: grabbing;
  user-select: none;
  scroll-behavior: auto;
}

.player-server-selector::-webkit-scrollbar {
  height: 4px;
}

.player-server-selector::-webkit-scrollbar-track {
  background: transparent;
}

.player-server-selector::-webkit-scrollbar-thumb {
  background: rgba(229, 9, 20, 0.5);
  border-radius: 4px;
}

.player-server-selector::-webkit-scrollbar-thumb:hover {
  background: var(--netflix-red);
}

.server-pill {
  background: transparent;
  border: none;
  color: #ccc;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 18px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
  user-select: none;
}

.server-pill:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
}

.server-pill.active {
  background: var(--netflix-red);
  color: #fff;
  box-shadow: 0 0 14px rgba(229, 9, 20, 0.7);
}

.server-pill .pill-badge {
  font-size: 0.68rem;
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.18);
  font-weight: 700;
  letter-spacing: 0.3px;
}

.server-pill.active .pill-badge {
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
}

.server-pill .pill-badge.vip {
  background: linear-gradient(135deg, #ffd700, #ff8c00);
  color: #111;
  font-weight: 800;
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
}

.server-pill.is-vip-server {
  border: 1px solid rgba(255, 215, 0, 0.35);
}

.server-pill.is-vip-server:hover {
  border-color: rgba(255, 215, 0, 0.7);
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
}

.pill-dot {
  color: #46d369;
  font-size: 0.65rem;
}

/* ================= SÉLECTEUR DE LANGUE VO / VF (SLIDER STYLE NETFLIX) ================= */
.lang-switch-capsule {
  display: inline-flex;
  align-items: center;
  position: relative;
  background: rgba(22, 22, 22, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 22px;
  padding: 3px;
  height: 34px;
  width: 136px;
  box-sizing: border-box;
  user-select: none;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  flex-shrink: 0;
}

.lang-switch-capsule:hover {
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.7);
}

.lang-switch-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 63px;
  height: calc(100% - 6px);
  background: var(--netflix-red, #e50914);
  border-radius: 17px;
  box-shadow: 0 2px 8px rgba(229, 9, 20, 0.55);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
  pointer-events: none;
}

/* Bascule VF : décalage vers la droite */
.lang-switch-capsule[data-active-lang="vf"] .lang-switch-thumb {
  transform: translateX(67px);
}

.lang-btn {
  flex: 1;
  z-index: 2;
  background: transparent;
  border: none;
  color: #bbb;
  font-size: 0.82rem;
  font-weight: 700;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  border-radius: 16px;
  transition: color 0.2s ease;
  padding: 0;
}

.lang-btn:hover {
  color: #fff;
}

.lang-btn.active {
  color: #fff;
  font-weight: 800;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

/* Style spécifique au lecteur vidéo */
.player-lang-box {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.player-lang-capsule {
  background: rgba(18, 18, 18, 0.92);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.75);
}

/* Style spécifique à la modal */
.modal-lang-selector {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.modal-lang-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: #aaa;
}

.player-episode-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.player-select {
  appearance: none;
  -webkit-appearance: none;
  background: rgba(20, 20, 24, 0.92);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 7px 32px 7px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  backdrop-filter: blur(8px);
}

.player-select:hover {
  background-color: rgba(35, 35, 42, 0.95);
  border-color: rgba(255, 255, 255, 0.4);
}

.player-select:focus {
  border-color: var(--netflix-red);
  box-shadow: 0 0 0 2px rgba(229, 9, 20, 0.4);
}

/* ================= CONTENEUR MÉDIA (PLEIN ÉCRAN RÉEL & ANTI-PUBS) ================= */
.player-media-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #000;
  overflow: hidden;
  margin: 0;
  padding: 0;
  z-index: 1;
}

/* Fond cinématographique anti-écran noir ultra-léger pendant le préchargement */
.player-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  z-index: 2;
  opacity: 1;
  transition: opacity 0.25s ease-out;
  pointer-events: none;
}

.player-backdrop.fade-out {
  opacity: 0;
  visibility: hidden;
  display: none !important;
}

.netflix-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  object-fit: contain;
  background: #000; /* Requis pour DirectScanout / Overlay matériel GPU zéro-copie sous Windows/Chrome */
  z-index: 2;
  display: block;
  transform: translateZ(0); /* Plan de composition GPU dédié */
  will-change: transform;
}

.netflix-iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  border: none;
  background: #000;
  z-index: 2;
  display: block;
}

/* Spinner & Timeline d'extraction progressive Netflix ultra-légers */
.player-loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  z-index: 20;
  pointer-events: none;
}

.player-loader.hidden {
  display: none !important;
}

.netflix-spinner {
  width: 46px;
  height: 46px;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--netflix-red);
  border-radius: 50%;
  animation: netflixSpin 0.7s linear infinite;
  box-shadow: none; /* Allégé : suppression du flou d'ombre gourmand en GPU */
}

@keyframes netflixSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loader-title {
  color: #fff;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
}

.loader-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(14, 14, 14, 0.92);
  padding: 18px 24px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(16px);
  min-width: 360px;
  max-width: 90vw;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.85);
}

.step-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.86rem;
  color: #777;
  transition: all 0.25s ease;
}

.step-item .step-icon {
  font-size: 1.05rem;
  width: 22px;
  text-align: center;
}

.step-item.active {
  color: #fff;
  font-weight: 600;
  transform: translateX(4px);
}

.step-item.active .step-icon {
  animation: stepPulse 0.8s ease-in-out infinite alternate;
}

.step-item.done {
  color: #46d369;
}

@keyframes stepPulse {
  from { transform: scale(1); filter: drop-shadow(0 0 2px #fff); }
  to { transform: scale(1.3); filter: drop-shadow(0 0 6px var(--netflix-red)); }
}

.player-status-banner {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(18, 18, 18, 0.95);
  border: 1px solid rgba(229, 9, 20, 0.6);
  padding: 14px 24px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 25;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
}

.status-banner-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-status-action {
  background: var(--netflix-red);
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-status-action:hover {
  background: #f40612;
}

.btn-status-action.secondary {
  background: rgba(255, 255, 255, 0.2);
}

.btn-status-action.secondary:hover {
  background: rgba(255, 255, 255, 0.35);
}

/* ================= CONTRÔLES LECTEUR OFFICIEL STYLE NETFLIX ================= */
.center-play-ripple {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.6);
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: rgba(15, 15, 15, 0.75);
  border: 2px solid rgba(255, 255, 255, 0.85);
  color: #fff;
  font-size: 2.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  z-index: 50;
  backdrop-filter: blur(6px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.7);
}

.center-play-ripple.pulse {
  animation: netflixRippleAnim 0.55s cubic-bezier(0.2, 0.9, 0.3, 1) forwards;
}

@keyframes netflixRippleAnim {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.6); }
  25% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
  75% { opacity: 0.8; transform: translate(-50%, -50%) scale(1.18); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.35); }
}

.netflix-bottom-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 36px 28px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.96) 0%, rgba(0, 0, 0, 0.7) 60%, transparent 100%);
  display: flex;
  flex-direction: column;
  gap: 14px;
  z-index: 100;
  transition: opacity 0.35s ease, transform 0.35s ease;
  pointer-events: auto;
}

.netflix-bottom-controls.iframe-mode {
  display: none !important;
}

/* Inactivité utilisateur : Masquage fluide des contrôles et du curseur */
.netflix-player-overlay.user-idle {
  cursor: none;
}

.netflix-player-overlay.user-idle .player-top-bar,
.netflix-player-overlay.user-idle .netflix-bottom-controls {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
}

.netflix-player-overlay.user-idle .player-top-bar {
  transform: translateY(-8px);
}

/* Scrubber Timeline Netflix */
.netflix-scrubber-container {
  position: relative;
  width: 100%;
  height: 18px;
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.scrubber-track {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 2px;
  position: relative;
  transition: height 0.15s ease;
}

.netflix-scrubber-container:hover .scrubber-track,
.netflix-scrubber-container.dragging .scrubber-track {
  height: 8px;
}

.scrubber-buffered {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: rgba(255, 255, 255, 0.45);
  border-radius: 2px;
  width: 0%;
  pointer-events: none;
  transition: width 0.2s ease;
}

.scrubber-played {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: var(--netflix-red);
  border-radius: 2px;
  width: 0%;
  pointer-events: none;
}

.scrubber-thumb {
  position: absolute;
  top: 50%;
  left: 0%;
  transform: translate(-50%, -50%) scale(0);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--netflix-red);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.8), 0 0 4px rgba(229, 9, 20, 0.8);
  pointer-events: none;
  transition: transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.netflix-scrubber-container:hover .scrubber-thumb,
.netflix-scrubber-container.dragging .scrubber-thumb {
  transform: translate(-50%, -50%) scale(1);
}

.scrubber-tooltip {
  position: absolute;
  bottom: 24px;
  left: 0;
  transform: translateX(-50%);
  background: rgba(18, 18, 18, 0.96);
  color: #ffffff;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  pointer-events: none;
  display: none;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.25);
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.9);
  z-index: 1000;
}

.scrubber-tooltip::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px 5px 0 5px;
  border-style: solid;
  border-color: rgba(18, 18, 18, 0.96) transparent transparent transparent;
  display: block;
  width: 0;
  height: 0;
}

.netflix-scrubber-container:hover .scrubber-tooltip,
.netflix-scrubber-container.dragging .scrubber-tooltip,
.scrubber-tooltip.visible {
  display: flex !important;
}

/* Ligne des Contrôles */
.netflix-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.controls-left, .controls-center, .controls-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.ctrl-btn {
  background: transparent;
  border: none;
  color: #e5e5e5;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: 50%;
  transition: all 0.2s ease;
  user-select: none;
}

.ctrl-btn:hover {
  color: #fff;
  transform: scale(1.15);
}

.play-pause-btn {
  width: 44px;
  height: 44px;
}

/* Boutons de saut ±10s avec flèches et 10 aérés */
.jump-btn {
  width: 42px;
  height: 42px;
  padding: 6px;
}

.icon-jump {
  display: block;
  transition: transform 0.18s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.jump-btn:hover .icon-jump {
  transform: scale(1.15);
}

.jump-btn:active .icon-jump {
  transform: scale(0.92);
}

/* Volume Slider avec Petit Rond Visible et Actif */
.volume-container {
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
}

.volume-slider-wrapper {
  width: 82px;
  display: flex;
  align-items: center;
  padding: 4px 0;
}

.netflix-volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 5px;
  border-radius: 3px;
  outline: none;
  cursor: pointer;
  background: linear-gradient(to right, var(--netflix-red) 100%, rgba(255, 255, 255, 0.3) 100%);
  transition: height 0.15s ease;
}

.netflix-volume-slider:hover {
  height: 6px;
}

/* Le petit rond bien visible pour Webkit (Chrome, Safari, Edge) */
.netflix-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffffff;
  cursor: pointer;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.6), 0 0 2px rgba(0, 0, 0, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.15);
  transition: transform 0.15s ease, background 0.15s ease;
}

.netflix-volume-slider::-webkit-slider-thumb:hover,
.netflix-volume-slider:active::-webkit-slider-thumb {
  transform: scale(1.25);
  background: #ffffff;
  box-shadow: 0 0 10px rgba(229, 9, 20, 0.9), 0 0 4px rgba(0, 0, 0, 0.8);
}

/* Le petit rond pour Firefox */
.netflix-volume-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffffff;
  cursor: pointer;
  border: 1px solid rgba(0, 0, 0, 0.15);
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.6);
  transition: transform 0.15s ease;
}

.netflix-volume-slider::-moz-range-thumb:hover,
.netflix-volume-slider:active::-moz-range-thumb {
  transform: scale(1.25);
}

.netflix-volume-slider::-moz-range-track {
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.3);
}

/* Temps de Lecture */
.time-readout {
  color: #ccc;
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-left: 4px;
}

.time-sep {
  color: #666;
}

/* Centre : Titre & Prochain Épisode */
.ctrl-media-title {
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  max-width: 380px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.3px;
}

/* Bouton Épisode Suivant à côté de la qualité */
.next-ep-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.next-ep-btn:hover {
  background: rgba(229, 9, 20, 0.85);
  border-color: #e50914;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(229, 9, 20, 0.4);
}

.next-ep-btn:active {
  transform: scale(0.96);
}

.next-ep-btn svg {
  display: block;
  flex-shrink: 0;
  fill: currentColor;
}

.next-ep-btn.hidden {
  display: none !important;
}

.btn-netflix-subtle {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  padding: 6px 14px;
  border-radius: 4px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-netflix-subtle:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.04);
}

/* Vitesse de Lecture Menu */
.speed-control-wrapper {
  position: relative;
}

.speed-btn {
  font-size: 0.82rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.speed-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.speed-menu {
  position: absolute;
  bottom: 48px;
  right: 0;
  background: rgba(18, 18, 18, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  padding: 6px 0;
  min-width: 140px;
  backdrop-filter: blur(14px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.85);
  z-index: 120;
}

.speed-item {
  padding: 8px 16px;
  font-size: 0.84rem;
  color: #ccc;
  cursor: pointer;
  transition: all 0.15s ease;
}

.speed-item:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.speed-item.active {
  color: var(--netflix-red);
  font-weight: 700;
}

/* Sélecteur de Qualité Vidéo (Style Netflix) */
.quality-control-wrapper {
  position: relative;
}

.quality-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  transition: all 0.2s ease;
}

.quality-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
}

.quality-badge {
  background: var(--netflix-red);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 3px;
  letter-spacing: 0.5px;
}

.quality-label {
  font-size: 0.8rem;
  color: #eee;
}

.quality-menu {
  position: absolute;
  bottom: 48px;
  right: 0;
  background: rgba(18, 18, 18, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  padding: 8px 0;
  min-width: 210px;
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.9);
  z-index: 120;
}

.quality-menu-header {
  padding: 6px 16px 8px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 4px;
}

.quality-item {
  padding: 8px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.quality-item:hover {
  background: rgba(255, 255, 255, 0.15);
}

.quality-item .quality-name {
  font-size: 0.84rem;
  font-weight: 600;
  color: #ccc;
}

.quality-item .quality-sub {
  font-size: 0.72rem;
  color: #777;
}

.quality-item.active .quality-name {
  color: var(--netflix-red);
  font-weight: 700;
}

.quality-item.active .quality-sub {
  color: rgba(229, 9, 20, 0.75);
}

/* ================= FOOTER ================= */
.netflix-footer {
  padding: 60px 10% 40px;
  color: #757575;
  font-size: 0.85rem;
  border-top: 1px solid #222;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin-top: 20px;
  list-style: none;
}

.footer-links a {
  color: #757575;
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

.rust-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #222;
  color: #f74c00;
  padding: 4px 10px;
  border-radius: 4px;
  margin-top: 20px;
  font-weight: 600;
}

/* ================= CHAÎNES TV & DIRECT SPORTS ================= */
.live-dot-nav {
  color: #e50914;
  font-size: 0.75rem;
  margin-right: 4px;
  display: inline-block;
  animation: pulse-live-dot 1.5s infinite;
}

@keyframes pulse-live-dot {
  0% { transform: scale(0.95); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; filter: drop-shadow(0 0 5px #e50914); }
  100% { transform: scale(0.95); opacity: 0.7; }
}

.live-badge-card {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(229, 9, 20, 0.9);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  z-index: 5;
}

.live-badge-card::before {
  content: '';
  width: 6px;
  height: 6px;
  background: #fff;
  border-radius: 50%;
  animation: blink-dot 1s infinite;
}

@keyframes blink-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.channel-num-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.75);
  color: #eee;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  z-index: 5;
}

.channel-program-title {
  font-size: 0.75rem;
  color: #aaa;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   NETFLIX CLONE - ADAPTATION TÉLÉVISION & TÉLÉCOMMANDE (10-FOOT TV UI)
   ========================================================================== */

/* Surbrillance ultra-visible pour télécommande (Focus Ring Netflix) */
.tv-focused,
:focus-visible {
  outline: 3px solid #ffffff !important;
  outline-offset: 2px !important;
  box-shadow: 0 0 25px rgba(229, 9, 20, 0.95), 0 0 45px rgba(255, 255, 255, 0.5) !important;
  transform: scale(1.12) translateY(-6px) !important;
  z-index: 99 !important;
  transition: transform 0.2s cubic-bezier(0.2, 0, 0.2, 1), box-shadow 0.2s ease !important;
}

/* Carte de Chaîne TV avec Logo PNG Haute Définition */
.movie-card.channel-card {
  background: radial-gradient(circle at 50% 45%, #222232 0%, #13131c 70%, #0c0c14 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  padding: 16px 12px 14px !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  will-change: transform;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.movie-card.channel-card .card-image {
  object-fit: contain !important;
  width: auto !important;
  max-width: 82% !important;
  max-height: 58% !important;
  margin: auto !important;
}

.movie-card.channel-card:hover,
.movie-card.channel-card.tv-focused {
  transform: scale(1.04) translateY(-3px) !important;
  border-color: #e50914 !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.8), 0 0 14px rgba(229, 9, 20, 0.4) !important;
}

/* Badges TV et indicateurs directs */
.channel-card .live-badge-card {
  background: rgba(229, 9, 20, 0.95);
  font-size: 0.72rem;
  letter-spacing: 0.5px;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(229, 9, 20, 0.5);
}

.channel-card .channel-num-badge {
  background: rgba(0, 0, 0, 0.85);
  font-size: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

/* Optimisation pour les écrans de TV 1080p / 4K (TV Safe Zone) */
@media (min-width: 1200px) {
  body.tv-experience-active {
    font-size: 17px;
  }
  body.tv-experience-active .netflix-header {
    padding: 18px 48px;
  }
  body.tv-experience-active .hero-banner {
    min-height: 68vh;
    padding: 0 48px;
  }
  body.tv-experience-active .hero-title {
    font-size: 3.4rem;
  }
  body.tv-experience-active .movie-card {
    min-width: 220px;
    height: 330px;
  }
  body.tv-experience-active .server-btn {
    padding: 10px 18px;
    font-size: 0.95rem;
  }
}

/* ================= ONGLET & OUTILS XTREAM VIP ================= */
.xtream-badge-nav {
  display: inline-block;
  color: #00d2ff;
  filter: drop-shadow(0 0 6px rgba(0, 210, 255, 0.8));
  margin-right: 4px;
}

.xtream-toolbar {
  position: relative;
  margin: -60px 4% 30px 4%;
  z-index: 20;
  background: rgba(18, 18, 22, 0.88);
  border: 1px solid rgba(0, 210, 255, 0.25);
  border-radius: 12px;
  padding: 20px 24px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.7), 0 0 20px rgba(0, 210, 255, 0.08);
  backdrop-filter: blur(14px);
}

.xtream-toolbar-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.xtream-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.xtream-search-icon {
  position: absolute;
  left: 16px;
  font-size: 1.2rem;
  pointer-events: none;
  opacity: 0.9;
}

.xtream-search-input {
  width: 100%;
  background: rgba(30, 30, 36, 0.9);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 14px 44px 14px 50px;
  font-size: 1.05rem;
  color: #fff;
  font-weight: 500;
  outline: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.xtream-search-input:focus,
.xtream-search-input.tv-focused {
  border-color: #00d2ff;
  background: rgba(40, 40, 50, 0.98);
  box-shadow: 0 0 0 3px rgba(0, 210, 255, 0.35), 0 4px 16px rgba(0, 210, 255, 0.2);
}

.xtream-search-clear {
  position: absolute;
  right: 14px;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #ccc;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.xtream-search-clear:hover,
.xtream-search-clear.tv-focused {
  background: rgba(229, 9, 20, 0.8);
  color: #fff;
}

.xtream-filter-row {
  display: flex;
  align-items: center;
  gap: 14px;
  overflow: hidden;
}

.xtream-filter-label {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.5px;
  white-space: nowrap;
  min-width: 85px;
}

.xtream-chips-scroll {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.xtream-chips-scroll::-webkit-scrollbar {
  display: none;
}

.xtream-chip {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e0e0e0;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
}

.xtream-chip:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

.xtream-chip.active {
  background: #00d2ff;
  color: #000;
  border-color: #00d2ff;
  font-weight: 800;
  box-shadow: 0 0 12px rgba(0, 210, 255, 0.6);
}

.xtream-chip.quality-chip[data-quality="4k"].active {
  background: #ffaa00;
  border-color: #ffaa00;
  box-shadow: 0 0 12px rgba(255, 170, 0, 0.6);
}

.xtream-chip.quality-chip[data-quality="hevc"].active {
  background: #00e676;
  border-color: #00e676;
  box-shadow: 0 0 12px rgba(0, 230, 118, 0.6);
}

.xtream-chip.quality-chip[data-quality="sd"].active {
  background: #b0bec5;
  border-color: #b0bec5;
  box-shadow: 0 0 12px rgba(176, 190, 197, 0.6);
}

.xtream-chip.tv-focused {
  outline: 2px solid #fff;
  transform: scale(1.08);
  box-shadow: 0 0 14px #00d2ff;
}

/* ================= PERSONNALISATION TÉLÉ-RÉALITÉ (STYLE NETFLIX RED GLASS) ================= */
.telerealite-toolbar {
  background: rgba(14, 14, 18, 0.88);
  border: 1px solid rgba(229, 9, 20, 0.35);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.8), 0 0 25px rgba(229, 9, 20, 0.12);
  backdrop-filter: blur(18px);
}

.telerealite-search-input {
  background: rgba(22, 22, 26, 0.95);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  color: #fff;
}

.telerealite-search-input:focus,
.telerealite-search-input.tv-focused {
  border-color: #e50914;
  background: rgba(28, 28, 34, 0.98);
  box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.35), 0 4px 18px rgba(229, 9, 20, 0.25);
}

.telerealite-chip {
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.telerealite-chip:hover {
  border-color: rgba(229, 9, 20, 0.6);
  color: #fff;
  background: rgba(229, 9, 20, 0.15);
}

.telerealite-chip.active {
  background: linear-gradient(135deg, #e50914, #b20710) !important;
  color: #fff !important;
  border-color: #e50914 !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 16px rgba(229, 9, 20, 0.55) !important;
}

.telerealite-chip.tv-focused {
  outline: 2px solid #fff;
  transform: scale(1.08);
  box-shadow: 0 0 16px rgba(229, 9, 20, 0.85);
}

.xtream-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.xtream-count-display {
  font-size: 0.82rem;
  color: #00d2ff;
  font-weight: 600;
}

/* Badge de qualité directement sur la carte de la chaîne */
.xtream-card-quality-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 7px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  z-index: 5;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
}

.xtream-card-quality-badge.badge-4k {
  background: linear-gradient(135deg, #ff9900, #ff5500);
  color: #fff;
}

.xtream-card-quality-badge.badge-fhd {
  background: linear-gradient(135deg, #00d2ff, #0077ff);
  color: #fff;
}

.xtream-card-quality-badge.badge-hevc {
  background: linear-gradient(135deg, #00e676, #00a152);
  color: #000;
}

.xtream-card-quality-badge.badge-hd {
  background: rgba(33, 150, 243, 0.85);
  color: #fff;
}

.xtream-card-quality-badge.badge-sd {
  background: rgba(120, 144, 156, 0.85);
  color: #fff;
}

/* Grille de résultats de recherche Xtream */
.xtream-grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  padding: 10px 4% 40px 4%;
}

@media (min-width: 1200px) {
  .xtream-grid-container {
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 20px;
  }
}

/* ================= COMPOSANTS MOBILES DÉDIÉS (CACHÉS SUR DESKTOP) ================= */
.mobile-sub-nav {
  display: none;
}
.mobile-bottom-nav {
  display: none;
}

/* ================= RESPONSIVE & MOBILE DESIGN ULTIME (SMARTPHONES & TABLETTES) ================= */

@media (max-width: 768px) {
  /* 0. Règles Générales & Empêchement Défilement Horizontal */
  html, body {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
    -webkit-overflow-scrolling: touch;
  }

  body {
    padding-bottom: 74px !important;
  }

  body.modal-open {
    overflow: hidden !important;
  }

  /* 1. Header & Navigation Mobile Épurée */
  .netflix-header {
    height: 54px !important;
    padding: 0 14px !important;
    background: rgba(20, 20, 20, 0.95) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5) !important;
  }

  .header-left {
    gap: 12px !important;
    flex: 0 0 auto !important;
  }

  .netflix-logo {
    height: 24px !important;
    width: auto !important;
  }

  /* Masquer les liens textuels desktop dans le header pour éviter l'écrasement */
  .header-left .nav-links {
    display: none !important;
  }

  .header-right {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    margin-left: auto !important;
  }

  /* Capsule langue VO/VF ultra compacte pour mobile */
  .lang-switch-capsule {
    display: inline-flex !important;
    height: 28px !important;
    padding: 2px !important;
    border-radius: 14px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
  }

  .lang-switch-capsule .lang-btn {
    padding: 2px 8px !important;
    font-size: 0.72rem !important;
    height: 24px !important;
    line-height: 24px !important;
    border-radius: 12px !important;
  }

  /* Boîte de recherche compacte et fluide */
  .search-box {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
  }

  .search-input {
    width: 82px !important;
    height: 30px !important;
    font-size: 0.75rem !important;
    padding: 4px 8px 4px 26px !important;
    border-radius: 15px !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    background: rgba(0, 0, 0, 0.6) !important;
    transition: width 0.28s cubic-bezier(0.4, 0, 0.2, 1) !important;
  }

  .search-input:focus {
    width: 135px !important;
    background: rgba(0, 0, 0, 0.92) !important;
    border-color: #e50914 !important;
  }

  .search-icon {
    left: 8px !important;
    font-size: 0.8rem !important;
  }

  .profile-avatar {
    width: 30px !important;
    height: 30px !important;
    border-radius: 4px !important;
  }

  .profile-dropdown {
    right: 0 !important;
    top: 44px !important;
    width: 210px !important;
  }

  /* 2. Barre de Sous-Navigation Mobile Défilante (Pills) */
  .mobile-sub-nav {
    display: block !important;
    position: sticky !important;
    top: 54px !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 90 !important;
    background: rgba(20, 20, 20, 0.94) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    padding: 8px 12px !important;
  }

  .mobile-sub-nav-scroll {
    display: flex !important;
    gap: 8px !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    padding: 2px 0 !important;
  }

  .mobile-sub-nav-scroll::-webkit-scrollbar {
    display: none !important;
  }

  .mobile-sub-pill {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    padding: 6px 13px !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 20px !important;
    color: #cccccc !important;
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    flex-shrink: 0 !important;
    transition: all 0.2s ease !important;
    user-select: none !important;
    -webkit-tap-highlight-color: transparent !important;
  }

  .mobile-sub-pill:active,
  .mobile-sub-pill.active {
    background: #e50914 !important;
    border-color: #e50914 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 10px rgba(229, 9, 20, 0.4) !important;
  }

  /* 3. Barre de Navigation Inférieure Mobile (Style App Netflix) */
  .mobile-bottom-nav {
    display: flex !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: auto !important;
    padding: 6px 0 calc(6px + env(safe-area-inset-bottom)) 0 !important;
    background: rgba(18, 18, 22, 0.96) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    z-index: 1000 !important;
    justify-content: space-around !important;
    align-items: center !important;
    transition: transform 0.3s ease !important;
  }

  .mobile-nav-item {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 3px !important;
    text-decoration: none !important;
    color: #888888 !important;
    flex: 1 !important;
    padding: 4px 0 !important;
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: transparent !important;
    transition: color 0.2s ease !important;
  }

  .mobile-nav-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 24px !important;
    transition: transform 0.2s ease !important;
  }

  .mobile-nav-label {
    font-size: 0.65rem !important;
    font-weight: 500 !important;
    letter-spacing: 0.02em !important;
  }

  .mobile-nav-item.active {
    color: #ffffff !important;
  }

  .mobile-nav-item.active .mobile-nav-icon {
    color: #e50914 !important;
    transform: scale(1.08) !important;
  }

  .mobile-nav-item.active .mobile-nav-label {
    font-weight: 700 !important;
    color: #ffffff !important;
  }

  /* Masquer automatiquement la barre inférieure quand le lecteur ou l'admin est actif */
  #netflixPlayer.active ~ .mobile-bottom-nav,
  .admin-overlay.active ~ .mobile-bottom-nav,
  body.player-active .mobile-bottom-nav {
    display: none !important;
  }

  /* 4. Hero Billboard Banner sur Mobile */
  .hero-banner {
    height: 56vh !important;
    min-height: 380px !important;
    max-height: 480px !important;
    padding: 0 16px 20px 16px !important;
    background-position: center top !important;
  }

  .hero-vignette {
    background: linear-gradient(180deg, rgba(20,20,20,0.3) 0%, rgba(20,20,20,0.65) 50%, #141414 100%) !important;
  }

  .hero-content {
    max-width: 100% !important;
    width: 100% !important;
  }

  .hero-badge {
    font-size: 0.68rem !important;
    letter-spacing: 1.5px !important;
    margin-bottom: 6px !important;
  }

  .hero-title {
    font-size: clamp(1.4rem, 5.5vw, 2.1rem) !important;
    line-height: 1.15 !important;
    margin-bottom: 8px !important;
    font-weight: 800 !important;
    word-break: break-word !important;
  }

  .hero-meta {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 6px 8px !important;
    font-size: 0.78rem !important;
    margin-bottom: 10px !important;
    width: 100% !important;
  }

  #heroBadges {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 5px !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .quality-badge {
    font-size: 0.68rem !important;
    padding: 2px 6px !important;
  }

  .hero-synopsis {
    font-size: 0.8rem !important;
    line-height: 1.4 !important;
    -webkit-line-clamp: 3 !important;
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    margin-bottom: 14px !important;
    max-width: 100% !important;
  }

  .hero-buttons {
    display: flex !important;
    gap: 10px !important;
    width: 100% !important;
  }

  .hero-buttons .btn-netflix {
    flex: 1 !important;
    justify-content: center !important;
    padding: 10px 14px !important;
    font-size: 0.85rem !important;
    border-radius: 6px !important;
    min-height: 42px !important;
  }

  /* 5. Toolbars de Recherche & Filtres (Xtream & Télé-Réalité) */
  .xtream-toolbar {
    padding: 12px 14px !important;
    margin-top: 0 !important;
  }

  .xtream-search-wrap {
    width: 100% !important;
    margin-bottom: 8px !important;
  }

  .xtream-search-input {
    font-size: 0.82rem !important;
    padding: 9px 34px 9px 36px !important;
    width: 100% !important;
    border-radius: 8px !important;
  }

  .xtream-filter-row {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 6px !important;
  }

  .xtream-filter-label {
    font-size: 0.72rem !important;
    color: #999 !important;
  }

  .xtream-chips-scroll {
    width: 100% !important;
    gap: 6px !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    padding-bottom: 2px !important;
  }

  .xtream-chip {
    font-size: 0.74rem !important;
    padding: 5px 11px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }

  .xtream-status-bar {
    font-size: 0.75rem !important;
    padding: 4px 0 !important;
  }

  /* 6. Carrousels & Cartes du Catalogue sur Mobile */
  .catalog-section {
    padding-top: 8px !important;
  }

  .movie-row {
    margin-bottom: 22px !important;
  }

  .row-title {
    font-size: 1.05rem !important;
    margin-left: 14px !important;
    margin-bottom: 8px !important;
    font-weight: 700 !important;
  }

  .slider-arrow {
    display: none !important;
  }

  .row-slider {
    padding: 0 14px 10px !important;
    gap: 10px !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scroll-snap-type: x proximity !important;
    scrollbar-width: none !important;
  }

  .row-slider::-webkit-scrollbar {
    display: none !important;
  }

  .movie-card {
    flex: 0 0 115px !important;
    width: 115px !important;
    min-width: 115px !important;
    max-width: 115px !important;
    height: 172px !important;
    border-radius: 6px !important;
    scroll-snap-align: start !important;
  }

  @media (hover: none) {
    .movie-card:hover {
      transform: none !important;
      box-shadow: none !important;
    }
  }

  .card-title {
    font-size: 0.72rem !important;
  }

  .action-circle-btn {
    width: 28px !important;
    height: 28px !important;
    font-size: 0.75rem !important;
  }

  .xtream-grid-container {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
    padding: 10px 14px 40px 14px !important;
  }

  /* Optimisation badges cartes Chaînes TV sur Mobile (Zéro superposition) */
  .movie-card.channel-card {
    position: relative !important;
  }
  .channel-card .live-badge-card {
    top: 6px !important;
    left: 6px !important;
    font-size: 0.6rem !important;
    padding: 2px 5px !important;
    border-radius: 3px !important;
  }
  .channel-card .live-badge-card::before {
    width: 4px !important;
    height: 4px !important;
  }
  .channel-card .channel-num-badge {
    top: auto !important;
    bottom: 6px !important;
    right: 6px !important;
    font-size: 0.62rem !important;
    padding: 1px 5px !important;
    border-radius: 3px !important;
  }

  /* 7. Modal de Détails (Mode Bottom-Sheet Moderne) */
  .modal-backdrop {
    padding: 0 !important;
    align-items: flex-end !important;
    z-index: 1200 !important;
  }

  .modal-container {
    width: 100% !important;
    max-width: 100% !important;
    height: 92vh !important;
    max-height: 92vh !important;
    margin: 0 !important;
    border-radius: 20px 20px 0 0 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.9) !important;
    padding-bottom: calc(24px + env(safe-area-inset-bottom)) !important;
    animation: modalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }

  @keyframes modalSlideUp {
    from { transform: translateY(100%); opacity: 0.5; }
    to { transform: translateY(0); opacity: 1; }
  }

  .modal-close-btn {
    position: sticky !important;
    top: 12px !important;
    right: 12px !important;
    float: right !important;
    margin-bottom: -40px !important;
    z-index: 1210 !important;
    width: 36px !important;
    height: 36px !important;
    background: rgba(30, 30, 30, 0.85) !important;
    backdrop-filter: blur(8px) !important;
    border-radius: 50% !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6) !important;
  }

  .modal-banner {
    height: 230px !important;
    padding: 20px 16px 14px !important;
    align-items: flex-end !important;
  }

  .modal-title {
    font-size: 1.35rem !important;
    line-height: 1.2 !important;
    margin-bottom: 10px !important;
  }

  .modal-banner .hero-buttons {
    flex-wrap: wrap !important;
    gap: 8px !important;
  }

  #modalPlayBtn {
    width: 100% !important;
    justify-content: center !important;
    min-height: 42px !important;
    font-size: 0.9rem !important;
  }

  #modalListBtn {
    flex: 1 !important;
    min-height: 38px !important;
    justify-content: center !important;
    font-size: 0.82rem !important;
  }

  #modalLangSwitch {
    height: 36px !important;
  }

  .modal-body {
    grid-template-columns: 1fr !important;
    padding: 16px !important;
    gap: 14px !important;
  }

  .modal-synopsis {
    font-size: 0.85rem !important;
    line-height: 1.5 !important;
    margin-bottom: 14px !important;
  }

  .modal-details-side {
    font-size: 0.78rem !important;
    gap: 8px !important;
  }

  .modal-episodes-section {
    padding: 0 16px 24px !important;
  }

  .modal-episodes-header {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }

  .modal-episodes-heading {
    font-size: 1.25rem !important;
  }

  .modal-season-select-wrapper {
    width: 100% !important;
  }

  .modal-season-select {
    width: 100% !important;
    font-size: 0.9rem !important;
    padding: 10px 38px 10px 14px !important;
    box-sizing: border-box !important;
  }

  .modal-episode-card {
    grid-template-columns: 20px 80px 1fr !important;
    gap: 10px !important;
    padding: 10px 8px !important;
  }

  .modal-episode-thumb-container {
    width: 80px !important;
    height: 48px !important;
  }

  .modal-episode-title {
    font-size: 0.82rem !important;
  }

  .modal-episode-overview {
    font-size: 0.75rem !important;
    -webkit-line-clamp: 2 !important;
  }

  /* 8. Lecteur Vidéo Mobile (Commandes Épurées & Ergonomiques) */
  .player-top-bar {
    padding: calc(8px + env(safe-area-inset-top)) 12px 8px 12px !important;
    gap: 10px !important;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.7) 80%, transparent 100%) !important;
    z-index: 100 !important;
  }

  .player-back-btn {
    width: 42px !important;
    height: 42px !important;
    font-size: 1.4rem !important;
    flex-shrink: 0 !important;
    background: rgba(255, 255, 255, 0.12) !important;
    border-radius: 50% !important;
  }

  .player-header-info {
    flex: 1 !important;
    min-width: 0 !important;
  }

  .player-title-display {
    font-size: 0.88rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: block !important;
    max-width: calc(100vw - 160px) !important;
  }

  .player-meta-display {
    display: none !important;
  }

  .player-lang-box {
    display: none !important;
  }

  .player-server-wrapper {
    display: none !important;
  }

  .player-episode-box {
    gap: 4px !important;
    flex-shrink: 0 !important;
  }

  .player-select {
    padding: 5px 20px 5px 6px !important;
    font-size: 0.72rem !important;
    max-width: 100px !important;
  }

  .netflix-bottom-controls {
    padding: 8px 12px calc(10px + env(safe-area-inset-bottom)) 12px !important;
    gap: 6px !important;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.96) 0%, rgba(0, 0, 0, 0.75) 75%, transparent 100%) !important;
  }

  .netflix-scrubber-container {
    height: 26px !important;
    padding: 10px 0 !important;
  }

  .scrubber-track {
    height: 4px !important;
  }

  .scrubber-thumb {
    width: 16px !important;
    height: 16px !important;
  }

  .netflix-controls-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
  }

  .controls-left {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
  }

  .play-pause-btn {
    width: 44px !important;
    height: 44px !important;
    padding: 8px !important;
  }

  .jump-btn {
    width: 40px !important;
    height: 40px !important;
    padding: 6px !important;
  }

  .volume-container {
    display: none !important;
  }

  .time-readout {
    font-size: 0.72rem !important;
    font-weight: 600 !important;
    margin-left: 2px !important;
    white-space: nowrap !important;
  }

  .controls-center {
    display: none !important;
  }

  .controls-right {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    margin-left: auto !important;
  }

  .speed-control-wrapper {
    display: none !important;
  }

  .next-ep-btn {
    height: 36px !important;
    padding: 6px 10px !important;
    font-size: 0.72rem !important;
  }

  .quality-btn {
    padding: 5px 8px !important;
    font-size: 0.72rem !important;
    height: 36px !important;
  }

  #ctrlFullscreenBtn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    padding: 10px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.18) !important;
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: transparent !important;
  }

  /* 9. Footer sur Mobile */
  .netflix-footer {
    padding: 30px 16px 40px !important;
    font-size: 0.78rem !important;
  }

  .footer-links {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
}

@media (max-width: 480px) {
  .next-ep-btn .next-ep-label {
    display: none !important;
  }
  .next-ep-btn {
    width: 36px !important;
    padding: 0 !important;
    justify-content: center !important;
  }
  .time-readout {
    font-size: 0.68rem !important;
  }
}

/* Optimisation pour téléphones en mode Paysage (Landscape) */
@media (max-height: 500px) and (orientation: landscape) {
  .player-top-bar {
    padding: 6px calc(14px + env(safe-area-inset-right)) 6px calc(14px + env(safe-area-inset-left)) !important;
  }
  .netflix-bottom-controls {
    padding: 6px calc(14px + env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) calc(14px + env(safe-area-inset-left)) !important;
  }
  .mobile-bottom-nav,
  .mobile-sub-nav {
    display: none !important;
  }
  .hero-banner {
    height: 90vh !important;
    min-height: 280px !important;
  }
}

/* Optimisation Mobile du Studio Admin */
@media (max-width: 768px) {
  .admin-navbar {
    height: auto !important;
    padding: 10px 14px !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }
  .admin-brand {
    gap: 8px !important;
  }
  .admin-badge {
    display: none !important;
  }
  .admin-rust-tag {
    font-size: 0.68rem !important;
    padding: 2px 6px !important;
  }
  .admin-actions {
    width: 100% !important;
    justify-content: space-between !important;
    gap: 6px !important;
  }
  .admin-actions .btn-admin {
    flex: 1 !important;
    padding: 7px 10px !important;
    font-size: 0.75rem !important;
    justify-content: center !important;
  }
  .admin-container {
    padding: 14px !important;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }
  .stat-card {
    padding: 12px !important;
  }
  .stat-value {
    font-size: 1.3rem !important;
  }
  .admin-modal-card {
    width: 95% !important;
    max-width: 95% !important;
    margin: 15px auto !important;
    padding: 18px 14px !important;
  }
}


