/* =====================================================================
   ZENIX � Premium Anime Streaming Theme
   Style: Netflix x Crunchyroll � Dark Mode, Red Accents
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* =====================================================================
   KILL THE BLUE GLOWS � Anime-Sama uses body::before/after
   with animated blue radial gradients. We override them.
   ===================================================================== */
body.zenix-body {
  background-color: #000000 !important;
}

body.zenix-body::before,
body.zenix-body::after {
  background: none !important;
  animation: none !important;
  opacity: 0 !important;
  display: none !important;
}

/* Fallback sans classe */
body::before, body::after {
  background: none !important;
  animation: none !important;
  opacity: 0 !important;
}

html { background-color: #000000 !important; }

/* =====================================================================
   VARIABLES
   ===================================================================== */
:root {
  --red:        #e50914;
  --red-dim:    rgba(229, 9, 20, 0.18);
  --red-glow:   rgba(229, 9, 20, 0.45);
  --bg:         #000000;
  --bg-card:    #0f0f0f;
  --bg-card2:   #1a1a1a;
  --border:     rgba(255,255,255,0.08);
  --text:       #e5e5e5;
  --muted:      #a3a3a3;
  --white:      #ffffff;
  --radius:     8px;
}

/* =====================================================================
   RESET BASE
   ===================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  background: var(--bg) !important;
  color: var(--text) !important;
  font-family: 'Inter', system-ui, sans-serif !important;
  -webkit-font-smoothing: antialiased;
}

/* =====================================================================
   NAVBAR � Glassmorphism premium
   ===================================================================== */
.asn-navbar {
  background: #000000 !important;
  border-bottom: 1px solid rgba(229, 9, 20, 0.12) !important;
  box-shadow: 0 2px 40px rgba(0,0,0,0.5) !important;
}


.asn-nav-link, .asn-nav-link span {
  font-weight: 500 !important;
  letter-spacing: 0.02em !important;
  transition: color 0.2s !important;
}
.asn-nav-link:hover, .asn-nav-link:hover span { color: var(--red) !important; }

/* Search */
.asn-desktop-search {
  background: rgba(255,255,255,0.07) !important;
  border: 1px solid var(--border) !important;
  border-radius: 8px !important;
  transition: border-color 0.2s !important;
}
.asn-desktop-search:focus-within {
  border-color: var(--red) !important;
  box-shadow: 0 0 0 2px var(--red-dim) !important;
}
.asn-desktop-search input {
  background: transparent !important;
  color: var(--white) !important;
}
.asn-desktop-search input::placeholder { color: var(--muted) !important; }

/* Mobile menu */
.asn-menu-panel {
  background: #1a1a1a !important;
  border-right: 1px solid var(--border) !important;
}

/* =====================================================================
   SECTION HEADERS  ("Reprenez votre visionnage", etc.)
   ===================================================================== */
/* Target the h2-like text nodes at start of sections */
.section-title, [class*="section-title"],
div > h2, div > h3 {
  font-weight: 800 !important;
  letter-spacing: 0.03em !important;
  color: var(--white) !important;
}

/* The red left dot before section headers */
svg.text-red-600, svg[class*="text-red"] {
  color: var(--red) !important;
}

/* Horizontal bar next to section title */
.border-b, hr {
  border-color: rgba(255,255,255,0.1) !important;
}

/* Arrow nav buttons ? ? */
button[onclick*="prev"], button[onclick*="next"],
button[id*="Prev"], button[id*="Next"] {
  background: var(--bg-card2) !important;
  border: 1px solid var(--border) !important;
  color: var(--white) !important;
  border-radius: 6px !important;
  transition: background 0.2s, border-color 0.2s !important;
}
button[onclick*="prev"]:hover, button[onclick*="next"]:hover,
button[id*="Prev"]:hover, button[id*="Next"]:hover {
  background: var(--red) !important;
  border-color: var(--red) !important;
}

/* =====================================================================
   CARDS � Full Overlay Style (Title ON image, Netflix style)
   ===================================================================== */

/* -- Container -- */
.card-base, .anime-card-premium, .scan-card-premium, .catalog-card {
  width: 11rem !important;
  border-radius: var(--radius) !important;
  overflow: hidden !important;
  background: transparent !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5) !important;
  transition:
    transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.28s ease !important;
  contain: layout style paint !important;
  margin: 0.5rem 0.75rem !important;
}

@media (min-width: 768px) {
  .card-base, .anime-card-premium, .scan-card-premium, .catalog-card {
    width: 14.5rem !important;
    margin: 0.5rem 1rem !important;
  }
}

.card-base:hover, .anime-card-premium:hover,
.scan-card-premium:hover, .catalog-card:hover {
  transform: translateY(-8px) scale(1.025) !important;
  box-shadow: 0 20px 50px rgba(0,0,0,0.7), 0 0 0 2px var(--red) !important;
  z-index: 20 !important;
  position: relative !important;
}

/* -- Link wrapper becomes the relative container -- */
.card-base a {
  display: block !important;
  position: relative !important;
  text-decoration: none !important;
  height: 100% !important;
  border-radius: var(--radius) !important;
  overflow: hidden !important;
}

/* -- Image container (set tall, landscape feel) -- */
.card-image-container {
  position: relative !important;
  width: 100% !important;
  height: 8rem !important;
  overflow: hidden !important;
  background: #0d0d0d !important;
  border-radius: var(--radius) !important;
}

@media (min-width: 768px) {
  .card-image-container {
    height: 11rem !important;
  }
}

/* -- Image -- */
.card-image {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  border-radius: 0 !important;
  transition: transform 0.4s ease !important;
}

.card-base:hover .card-image,
.anime-card-premium:hover .card-image {
  transform: scale(1.08) !important;
}

/* -- Gradient overlay on image -- */
.image-overlay {
  position: absolute !important;
  inset: 0 !important;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.95) 0%,
    rgba(0,0,0,0.5) 45%,
    rgba(0,0,0,0.05) 100%
  ) !important;
  z-index: 2 !important;
  pointer-events: none !important;
  transition: opacity 0.3s !important;
}

.card-base:hover .image-overlay {
  background: linear-gradient(
    to top,
    rgba(0,0,0,1) 0%,
    rgba(0,0,0,0.6) 45%,
    rgba(0,0,0,0.1) 100%
  ) !important;
}

/* =====================================================================
   ?? PREMIUM CARDS (Netflix / Disney+ Style Glow Up)
   ===================================================================== */
.catalog-card, .anime-card-premium, .card-base {
  position: relative !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease !important;
  border: 1px solid rgba(229, 9, 20, 0.15) !important;
  box-shadow: 0 4px 15px rgba(0,0,0,0.5) !important;
  background: #111 !important;
  cursor: pointer !important;
  min-height: 160px !important; /* Force minimum height to prevent overlapping info items and badges on mobile */
}

.catalog-card:hover, .card-base:hover {
  transform: scale(1.08) translateY(-5px) !important;
  z-index: 50 !important;
  box-shadow: 0 15px 30px rgba(0,0,0,0.8), 0 0 0 2px rgba(229,9,20,0.8) !important;
}

/* Image container */
.card-image-container {
  position: relative !important;
  width: 100% !important;
  height: 100% !important;
}
.card-image-container::after {
  content: '' !important;
  position: absolute !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 70% !important;
  background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.6) 40%, transparent 100%) !important;
  z-index: 1 !important;
  pointer-events: none !important;
}

/* 
   CARD CONTENT � overlaid ON the image
*/
.card-content {
  position: absolute !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 3 !important;
  padding: 15px 12px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-end !important;
  background: none !important;
  border: none !important;
  height: auto !important;
  pointer-events: none !important;
}

/* HIDE EVERYTHING EXCEPT THE TITLE IN THE OVERLAY */
.card-content > p,
.card-content > ul,
.card-content > span,
.card-content .content-divider,
.card-content .catalog-info,
.card-content .synopsis-tooltip,
.card-content .alternate-titles { 
    display: none !important; 
}

/* -- Title Styling -- */
.card-title {
  font-size: 14px !important;
  font-weight: 800 !important;
  color: #ffffff !important;
  text-align: left !important;
  line-height: 1.3 !important;
  letter-spacing: 0.02em !important;
  margin: 0 !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  display: -webkit-box !important;
  overflow: hidden !important;
  text-shadow: 0 2px 10px rgba(0,0,0,0.9), 0 1px 3px rgba(0,0,0,0.8) !important;
  text-transform: uppercase !important;
  transition: color 0.3s !important;
}

.catalog-card:hover .card-title, .card-base:hover .card-title {
  color: #e50914 !important;
}

@media (min-width: 768px) {
  .card-title { font-size: 16px !important; }
}





/* -- Info items (episode, saison, heure) -- */
.card-info {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  justify-content: flex-start !important;
  margin-top: 6px !important;
}

.info-item {
  position: static !important; /* Force static to prevent native absolute positioning overlaps */
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  background: rgba(229, 9, 20, 0.9) !important;
  border: none !important;
  border-radius: 4px !important;
  padding: 4px 8px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  justify-content: center !important;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5) !important;
  width: fit-content !important; /* Prevent taking full width */
  margin: 0 !important;
  flex-shrink: 0 !important; /* Prevent shrinking so text stays readable */
}

@media (min-width: 768px) {
  .info-item { font-size: 12px !important; }
}

.info-item.episode {
  background: rgba(229, 9, 20, 0.9) !important;
}

.info-item.release-time {
  background: rgba(255,255,255,0.15) !important;
  backdrop-filter: blur(4px) !important;
}


.planning-problem-red {
  background: rgba(229, 9, 20, 0.3) !important;
  border-color: rgba(229, 9, 20, 0.5) !important;
  color: #ff8080 !important;
}

.info-text { font-size: inherit !important; color: inherit !important; }

.info-icon-svg, .time-icon-svg {
  width: 10px !important;
  height: 10px !important;
  stroke: rgba(255,255,255,0.7) !important;
  flex-shrink: 0 !important;
}

/* =====================================================================
   BADGES (Anime / Scan / Langue) � stays on top corner
   ===================================================================== */
.badge {
  position: absolute !important;
  z-index: 10 !important;
  background: rgba(10,10,10,0.65) !important;
  backdrop-filter: blur(4px) !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  border-radius: 5px !important;
  padding: 2px 6px !important;
}

.anime-badge {
  top: 8px !important;
  left: 8px !important;
  background: rgba(229, 9, 20, 0.75) !important;
  border-color: rgba(229, 9, 20, 0.4) !important;
}

.scan-badge {
  top: 8px !important;
  left: 8px !important;
  background: rgba(109, 40, 217, 0.8) !important;
  border-color: rgba(139, 92, 246, 0.4) !important;
}

.language-badge-top {
  top: 8px !important;
  right: 8px !important;
  padding: 3px 5px !important;
}

.badge-text {
  font-size: 8px !important;
  font-weight: 800 !important;
  color: #fff !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
}

.badge-glow { display: none !important; }

.flag-icon {
  width: 20px !important;
  height: 14px !important;
  object-fit: contain !important;
  border-radius: 2px !important;
}

@media (max-width: 1024px) {
  .anime-badge, .scan-badge {
    transform: scale(0.8) !important;
    transform-origin: top left !important;
  }
  .language-badge-top {
    transform: scale(0.8) !important;
    transform-origin: top right !important;
  }
}

/* =====================================================================
   SCROLL TO TOP
   ===================================================================== */
.ak-scrollToTop {
  background: var(--red) !important;
  color: #fff !important;
  border-radius: 50% !important;
  box-shadow: 0 4px 15px var(--red-glow) !important;
}
.ak-scrollToTop:hover {
  transform: translateY(-5px) !important;
  box-shadow: 0 8px 25px var(--red-glow) !important;
}

/* =====================================================================
   Zenix Premium Hero Mobile Banner (Zenix.best style for Mobile)
   ===================================================================== */
@media (max-width: 767px) {
  /* Adapter le conteneur du carrousel */
  .ak-carousel {
    border-radius: 12px !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4), inset 0 -2px 0 rgba(229, 9, 20, 0.34) !important;
    border: none !important;
    height: 180px !important; /* Force la hauteur en banner */
    max-height: 180px !important;
  }
  
  /* Restyler chaque slide comme la carte mobile de zenix */
  .ak-slide {
    position: relative !important;
    display: block !important;
    height: 180px !important; /* Hauteur fixe pour un effet banner (ancien: min-height 260px) */
    min-height: unset !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    isolation: isolate !important;
    background: linear-gradient(180deg, rgba(14, 16, 24, 0.58), rgba(10, 12, 18, 0.34)) !important;
  }

  /* La barre lumineuse en bas */
  .ak-slide::before,
  .ak-slide::after {
    content: "" !important;
    position: absolute !important;
    left: 14px !important;
    bottom: 0 !important;
    width: 62px !important;
    height: 2px !important;
    border-radius: 999px !important;
    background: linear-gradient(90deg, rgba(229, 9, 20, 0.92), rgba(229, 9, 20, 0)) !important;
    z-index: 2 !important;
    pointer-events: none !important;
  }
  .ak-slide::after {
    left: auto !important;
    right: 14px !important;
    transform: scaleX(-1) !important;
  }

  /* Image de fond */
  .ak-slide-bg img {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center 30% !important;
    filter: saturate(1.08) brightness(0.78) !important; /* Retrait du blur demandé par l'utilisateur */
    z-index: -2 !important;
  }

  /* Overlay complexe Zenix */
  .ak-slide-overlay {
    position: absolute !important;
    inset: 0 !important;
    z-index: -1 !important;
    pointer-events: none !important;
    background:
        linear-gradient(180deg, rgba(6, 8, 13, 0.36) 0%, rgba(6, 8, 13, 0.18) 34%, rgba(6, 8, 13, 0.62) 78%, rgba(6, 8, 13, 0.9) 100%),
        linear-gradient(90deg, rgba(6, 8, 13, 0.82) 0%, rgba(6, 8, 13, 0.34) 42%, rgba(6, 8, 13, 0.14) 74%, rgba(6, 8, 13, 0.28) 100%),
        radial-gradient(circle at 8% 0%, rgba(229, 9, 20, 0.12), transparent 36%) !important;
  }

  /* Contenu principal de la slide */
  .ak-slide-content {
    position: relative !important;
    z-index: 1 !important;
    display: grid !important;
    gap: 6px !important;
    min-height: 100px !important;
    min-width: 0 !important;
    align-content: end !important;
    padding: 10px 12px 12px !important;
    background: transparent !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
  }

  /* Kicker (ex: Anime, Scans, etc) */
  .ak-badge {
    position: static !important; /* Retire le placement absolu */
    display: inline-flex !important;
    align-items: center !important;
    align-self: flex-start !important;
    width: fit-content !important;
    margin: 0 0 2px !important;
    padding: 3px 9px 3px 7px !important;
    border-radius: 999px !important;
    border: 1px solid rgba(229, 9, 20, 0.5) !important;
    background: rgba(229, 9, 20, 0.22) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    color: #ffb5b5 !important;
    font-size: 0.55rem !important;
    font-weight: 900 !important;
    letter-spacing: 0.2em !important;
    text-transform: uppercase !important;
    box-shadow: 0 2px 14px rgba(229, 9, 20, 0.2) !important;
    transform: none !important;
  }

  /* Animation du point rouge du kicker */
  .ak-badge::before {
    content: "" !important;
    display: inline-block !important;
    width: 5px !important;
    height: 5px !important;
    border-radius: 50% !important;
    background: #e50914 !important;
    animation: heroBadgePulse 2s ease infinite !important;
    margin-right: 6px !important;
  }

  /* Titre de l'anime */
  .ak-slide-title {
    margin: 0 !important;
    color: #fff !important;
    font-size: 1.05rem !important; /* Réduit pour mobile */
    font-weight: 800 !important;
    line-height: 1.1 !important;
    letter-spacing: 0 !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9) !important; /* Moins agressif pour limiter l'effet crénelé */
    white-space: normal !important;
    text-align: left !important;
    transform: none !important;
  }

  /* Synopsis / Sous-titre - On le cache sur mobile pour l'effet banner */
  .ak-slide-synopsis {
    display: none !important;
  }

  /* Rendre toute la slide cliquable via le premier bouton (VF/VOSTFR) et cacher les genres */
  .ak-slide-genres {
    display: none !important;
  }
  .ak-slide-ctas {
    position: absolute !important;
    inset: 0 !important;
    z-index: 10 !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
  }
  .ak-slide-cta {
    display: none !important;
  }
  .ak-slide-cta:first-child {
    display: block !important;
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    opacity: 0 !important;
    font-size: 0 !important;
  }

  /* Hide the dots navigation on mobile if we want to save space? Let's keep them if space allows. */
  .ak-dots {
    bottom: -5px !important;
    transform: scale(0.8) !important;
  }
}

@keyframes heroBadgePulse {
  0% { opacity: 0.4; }
  50% { opacity: 1; }
  100% { opacity: 0.4; }
}

/* =====================================================================
   PAGE CATALOGUE (D�tails de l'�uvre)
   ===================================================================== */
/* Media container (Cover image) */
.media-container {
  box-shadow: 0 10px 40px rgba(0,0,0,0.8), 0 0 0 1px rgba(229,9,20,0.1) !important;
  border-radius: 12px !important;
  position: relative !important;
}
.media-container::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 50%;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 100%) !important;
  pointer-events: none;
}

/* Info card (Synopsis, Stats) */
.info-card {
  background: rgba(10,10,10,0.8) !important;
  border: 1px solid rgba(229,9,20,0.15) !important;
  border-radius: 12px !important;
  backdrop-filter: blur(10px) !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5) !important;
}

/* Info labels */
.info-lbl {
  color: #e50914 !important;
  font-weight: 700 !important;
}
.info-val {
  color: #ffffff !important;
  font-weight: 500 !important;
}

/* Synopsis text */
.synopsis-text {
  color: #e2e8f0 !important;
  font-size: 15px !important;
  line-height: 1.8 !important;
  text-shadow: 0 1px 2px rgba(0,0,0,0.8) !important;
}

/* Genre Pills */
.genre-pill { background: transparent !important; color: #f3f4f6 !important; border: 1px solid #e50914 !important; border-radius: 99px !important; font-weight: 600 !important; letter-spacing: 0.5px !important; text-transform: uppercase !important; padding: 0.35rem 1rem !important; font-size: 0.75rem !important; transition: all 0.3s ease !important; display: inline-block; transform: translateY(-2px); box-shadow: 0 4px 10px rgba(229,9,20,0.1) !important; }

/* Action Buttons (Watchlist, Vu, etc.) */
.action-btn {
  background: rgba(20,20,20,0.9) !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  color: #ffffff !important;
  border-radius: 8px !important;
  text-transform: uppercase !important;
  font-size: 12px !important;
  letter-spacing: 0.05em !important;
}
.action-btn:hover {
  border-color: #e50914 !important;
  box-shadow: 0 0 15px rgba(229,9,20,0.2) !important;
}
/* Force specific buttons to red theme */
.btn-watchlist, .btn-favoris, .btn-vu { background: transparent !important; color: #f3f4f6 !important; border: 1px solid #e50914 !important; }
.btn-watchlist:hover, .btn-favoris:hover, .btn-vu:hover { background: rgba(229,9,20,0.15) !important; color: #ffffff !important; border-color: #e50914 !important; }

/* Actu Banner */
.actu-banner {
  background: rgba(229,9,20,0.08) !important;
  border: 1px solid rgba(229,9,20,0.2) !important;
  border-radius: 8px !important;
}
.actu-text {
  color: #ffcccc !important;
}

/* Grand Titre (h1) */
h1.text-2xl, h1.text-3xl {
  font-weight: 900 !important;
  text-transform: uppercase !important;
  letter-spacing: -0.02em !important;
  color: #ffffff !important;
  text-shadow: 0 2px 10px rgba(0,0,0,0.8) !important;
}

/* =====================================================================
   HERO CAROUSEL
   ===================================================================== */
.ak-carousel {
  border-radius: 14px !important;
  overflow: hidden !important;
  box-shadow: 0 8px 40px rgba(0,0,0,0.7) !important;
  -webkit-mask-image: -webkit-radial-gradient(white, black); /* Force overflow:hidden sur les coins arrondis */
}

/* Fix pour éviter de voir l'image précédente sur les bords (bleeding) */
.ak-slide {
  margin: 0 !important;
  width: 100% !important;
  transform: scaleX(1.01) translateZ(0);
  backface-visibility: hidden;
}

/* Barre de progression du Carousel */
#akProgress, .ak-progress, .ak-progress-fill {
  background-color: #e50914 !important;
  background-image: none !important;
}

/* Arrow buttons in carousel */
.ak-prev, .ak-next {
  background: rgba(229, 9, 20, 0.8) !important;
  border: none !important;
  border-radius: 6px !important;
}
.ak-prev:hover, .ak-next:hover {
  background: var(--red) !important;
  box-shadow: 0 4px 16px var(--red-glow) !important;
}

/* Dots */
.ak-dot { background: rgba(255,255,255,0.25) !important; transition: background 0.2s !important; }
.ak-dot.active, .ak-dot--active { background: var(--red) !important; }

/* Play buttons */
.ak-play-btn, .ak-play-btn-vf {
  background: var(--red) !important;
  border-color: var(--red) !important;
  border-radius: 8px !important;
  font-weight: 700 !important;
  transition: all 0.2s !important;
}
.ak-play-btn:hover, .ak-play-btn-vf:hover {
  background: #ff2020 !important;
  box-shadow: 0 4px 20px var(--red-glow) !important;
  transform: scale(1.03) !important;
}

/* Badge "En cours" / "SAISON X" in carousel */
.ak-badge {
  background: var(--red) !important;
  color: #fff !important;
  font-weight: 700 !important;
  border-radius: 4px !important;
}

/* =====================================================================
   BUTTONS � global
   ===================================================================== */
/* Only target real call-to-action buttons, not icon buttons */
.btn-primary, a.btn, input[type="submit"],
[class~="bg-blue-600"], [class~="bg-blue-500"] {
  background: var(--red) !important;
  border-color: var(--red) !important;
  color: #fff !important;
  border-radius: 6px !important;
  font-weight: 600 !important;
  transition: all 0.2s !important;
}
.btn-primary:hover, a.btn:hover {
  background: #ff2020 !important;
  box-shadow: 0 4px 16px var(--red-glow) !important;
}

/* =====================================================================
   TEXT � blue -> red
   ===================================================================== */
[class~="text-blue-500"], [class~="text-blue-600"],
[class~="text-cyan-500"], [class~="text-blue-400"] {
  color: var(--red) !important;
}

/* =====================================================================
   BACKGROUNDS � dark overrides (avoid touching everything)
   ===================================================================== */
/* Large page sections background */
#blocEntier, #sousBlocCenter, #sousBlocLeft, #sousBlocRight,
[class~="bg-slate-900"], [class~="bg-gray-900"] {
  background: var(--bg) !important;
}

/* Card content area (old blue dark) */
.anime-card-premium .card-content { background: transparent !important; }

.bg-white { background: #1e1e1e !important; }

/* =====================================================================
   FOOTER
   ===================================================================== */
footer, .asn-footer, #footer, .footer {
  background: #000000 !important;
  border-top: 1px solid var(--border) !important;
}


/* =====================================================================
   SCROLL TO TOP
   ===================================================================== */
#scrollProgressWrapper #topBtn {
  background: var(--red) !important;
  border: none !important;
}

/* =====================================================================
   SCROLLBAR
   ===================================================================== */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: #0d0d0d; }
::-webkit-scrollbar-thumb { background: var(--red); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: #ff2020; }

/* =====================================================================
   TEXT SELECTION
   ===================================================================== */
::selection { background: var(--red); color: #fff; }

/* =====================================================================
   PAGE PLANNING (Design Premium)
   ===================================================================== */
/* Titre Planning et Icone */
h4:has(svg), h4:contains("Planning") {
  color: #ffffff !important;
  font-weight: 900 !important;
  letter-spacing: -0.02em !important;
  text-shadow: 0 2px 10px rgba(0,0,0,0.8) !important;
}
h4 svg {
  fill: #e50914 !important;
  color: #e50914 !important;
}

/* Notes en dessous du titre */
h3.text-base, p.text-xs {
  color: #cbd5e1 !important;
}
p.text-xs b {
  color: #e50914 !important;
}

/* Bloc Heure Actuelle */
#currentTime {
  color: #e50914 !important;
  text-shadow: 0 0 15px rgba(229,9,20,0.4) !important;
}
.flex.items-center.justify-center.my-6.p-4.bg-slate-900 {
  background: rgba(10,10,10,0.8) !important;
  border: 1px solid rgba(229,9,20,0.15) !important;
  border-radius: 12px !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4) !important;
}
.flex.items-center.justify-center.my-6.p-4.bg-slate-900 svg {
  color: #e50914 !important;
}

/* Filtres */
.filters-container {
  background: rgba(10,10,10,0.6) !important;
  border: 1px solid rgba(255,255,255,0.05) !important;
  border-radius: 12px !important;
  padding: 15px !important;
}
.filter-btn {
  background: rgba(30,30,30,0.8) !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  color: #94a3b8 !important;
  border-radius: 99px !important;
  transition: all 0.2s ease !important;
}
.filter-btn:hover {
  background: rgba(229,9,20,0.1) !important;
  border-color: rgba(229,9,20,0.4) !important;
  color: #fff !important;
}
.filter-btn.active, .filter-btn-reset:hover {
  background: #e50914 !important;
  border-color: #e50914 !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(229,9,20,0.4) !important;
}

/* Barre de recherche dans les filtres */
.planning-search-icon {
  fill: #e50914 !important;
}
#planningSearchInput {
  color: #fff !important;
}

/* Wrapper principal du planning */
.outline-sky-800 {
  outline: 1px solid rgba(229,9,20,0.3) !important;
  background: rgba(0,0,0,0.5) !important;
}

/* Scrollbar du planning */
#planningScrollTrack {
  background: rgba(255,255,255,0.05) !important;
}
#planningScrollThumb {
  background: #e50914 !important;
}

/* =====================================================================
   PAGE PLANNING (Design Premium)
   ===================================================================== */
/* ... existing code ... */
/* Colonnes des jours */
.titreJours {
  color: #ffffff !important;
  border-bottom: 2px solid rgba(255,255,255,0.1) !important;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8) !important;
}

/* On retire l'effet rouge sur toutes les colonnes par d�faut */
.selectedRow {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  flex: 1 1 0% !important;
  min-width: 0 !important;
  width: 14.28% !important; /* Force 1/7 de la largeur */
}

/* On cible UNIQUEMENT la colonne du jour ACTUEL (qui a .bg-sky-900 ou .bg-opacity-70) */
.selectedRow.bg-sky-900, .selectedRow.bg-opacity-70 {
  background: rgba(229,9,20,0.1) !important;
  border-radius: 8px !important;
  border: 1px solid rgba(229,9,20,0.2) !important;
  box-shadow: 0 0 20px rgba(229,9,20,0.05) inset !important;
}
.selectedRow.bg-sky-900 .titreJours, .selectedRow.bg-opacity-70 .titreJours {
  color: #e50914 !important;
  border-bottom-color: #e50914 !important;
}

/* Grille du Planning Responsive (Lundi -> Dimanche visibles sur Desktop) */
#planningClass {
  display: flex !important;
  flex-wrap: nowrap !important;
  width: 100% !important;
  gap: 8px !important;
  padding-bottom: 15px !important;
  overflow-x: hidden !important; /* Force no scroll on desktop */
}

/* Force les cartes � l'int�rieur � s'adapter */
.selectedRow .anime-card-premium, 
.selectedRow .catalog-card {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}
.selectedRow .card-title {
  font-size: 11px !important; /* R�duire un peu la police pour que �a rentre */
}

/* Si l'�cran est vraiment trop petit, on remet le scroll */
@media (max-width: 1200px) {
  #planningClass { 
    overflow-x: auto !important; 
    scroll-snap-type: x mandatory !important;
  }
  .selectedRow {
    min-width: 140px !important;
    width: 140px !important; /* Force fixed width on mobile */
    flex: 0 0 auto !important; /* Prevent flex-grow or shrink */
  }
  #planningScrollTrack { display: block !important; }
}
@media (min-width: 1201px) {
  #planningScrollTrack { display: none !important; }
}


/* Force centering of cards in planning */
#planningClass .categorieHome { width: 100% !important; display: flex !important; flex-direction: column !important; align-items: center !important; }
#planningClass .categorieHome > div, #planningClass .categorieHome > .card-base, #planningClass .categorieHome > .anime-card-premium { margin: 0 auto !important; max-width: 180px !important; }

/* --- AMELIORATION MOBILE DU PLANNING --- */
@media (max-width: 1024px) {
  #planningClass {
    scroll-snap-type: x mandatory !important;
    gap: 15px !important;
    padding: 0 10px !important;
  }
  .selectedRow {
    min-width: 88vw !important;
    width: 88vw !important;
    scroll-snap-align: center !important;
    background: rgba(20, 20, 20, 0.6) !important;
    padding: 15px 10px !important;
    border-radius: 12px !important;
    border: 1px solid rgba(255,255,255,0.05) !important;
  }
  #planningClass .categorieHome {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
    width: 100% !important;
  }
  #planningClass .categorieHome > div, 
  #planningClass .categorieHome > .card-base, 
  #planningClass .categorieHome > .anime-card-premium {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    height: auto !important;
    aspect-ratio: 2/3 !important;
  }
  .selectedRow .card-title, .anime-card-premium .card-title {
    font-size: 12px !important;
    white-space: normal !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }
  .titreJours {
    font-size: 1.6rem !important;
    margin-bottom: 15px !important;
  }
}






}











/* ================= PAGE EPISODE / LECTEUR ================= */

/* Conteneur principal de l'en-tête (Image + Titre) */
.zenix-titre-container {
    position: relative !important;
    display: block !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    background: #050505 !important;
    margin-bottom: 24px !important;
    border: 1px solid rgba(229, 9, 20, 0.15) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
    text-decoration: none !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}
.zenix-titre-container:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 15px 40px rgba(229, 9, 20, 0.15) !important;
    opacity: 1 !important;
}

/* Image de fond de l'en-tête */
.zenix-titre-container #imgOeuvre {
    height: 180px !important; /* Plus grand */
    width: 100% !important;
    object-fit: cover !important;
    object-position: center 25% !important;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 10%, rgba(0,0,0,0) 100%);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 10%, rgba(0,0,0,0) 100%);
    opacity: 0.7 !important;
    border-radius: 0 !important;
}

/* Titre par-dessus l'image */
#titreOeuvre {
    position: absolute !important;
    bottom: 20px !important;
    left: 24px !important;
    margin: 0 !important;
    font-size: clamp(1.5rem, 4vw, 2.5rem) !important;
    font-weight: 900 !important;
    color: #fff !important;
    text-shadow: 0 4px 15px rgba(0,0,0,0.9), 0 2px 5px rgba(0,0,0,0.8) !important;
    line-height: 1.1 !important;
    max-width: 90% !important;
}

/* Boutons de langues (VOSTFR, VF, etc.) */
a[id^="switch"] {
    outline: none !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 999px !important;
    padding: 6px 16px 6px 6px !important;
    height: auto !important;
    background: #111 !important;
    color: #999 !important;
    text-decoration: none !important;
    align-items: center !important;
    gap: 8px !important;
    transition: all 0.3s ease !important;
    margin-right: 10px !important;
    margin-bottom: 10px !important;
}
/* Forcer le inline-flex UNIQUEMENT si le bouton n'est pas caché */
a[id^="switch"]:not(.hidden) {
    display: inline-flex !important;
}
a[id^="switch"]:hover {
    background: #1a1a1a !important;
    border-color: rgba(229, 9, 20, 0.4) !important;
    color: #fff !important;
}
/* Style du bouton actif */
a[id^="switch"].opacity-100 {
    background: rgba(229, 9, 20, 0.15) !important;
    border-color: #e50914 !important;
    color: #fff !important;
    opacity: 1 !important;
    box-shadow: 0 0 15px rgba(229, 9, 20, 0.2) !important;
}
/* Style du bouton inactif */
a[id^="switch"].opacity-20 {
    opacity: 0.7 !important; /* Plus lisible que 0.2 */
}
/* Drapeaux dans les boutons */
a[id^="switch"] img {
    height: 24px !important;
    width: 34px !important;
    border-radius: 999px !important; /* Rendre le drapeau ovale/rond */
    object-fit: cover !important;
    margin: 0 !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5) !important;
}
/* Texte dans les boutons */
a[id^="switch"] p.absolute {
    position: static !important;
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    margin: 0 !important;
}

/* Conteneurs secondaires (barres grises) -> Style verre/sombre */
.bg-slate-900.bg-opacity-70 {
    background: rgba(15, 15, 18, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-radius: 12px !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    padding: 6px !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3) !important;
    margin-top: 15px !important;
    margin-bottom: 15px !important;
}

/* Selecteurs / Dropdowns (Episodes & Serveurs) */
#selectEpisodes, #selectLecteurs {
    background: #000 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 8px !important;
    color: #fff !important;
    padding: 8px 16px !important;
    font-size: 0.95rem !important;
    outline: none !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23e50914%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px top 50% !important;
    background-size: 10px auto !important;
    padding-right: 32px !important;
}
#selectEpisodes:hover, #selectLecteurs:hover, #selectEpisodes:focus, #selectLecteurs:focus {
    border-color: #e50914 !important;
    box-shadow: 0 0 10px rgba(229, 9, 20, 0.15) !important;
}

/* Boutons de navigation (Episode Precedent/Suivant) */
.nav-episode-btn {
    background: transparent !important;
    border: 1px solid transparent !important;
    border-radius: 8px !important;
    color: #aaa !important;
    transition: all 0.2s ease !important;
    padding: 8px 16px !important;
}
.nav-episode-btn:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.05) !important;
}
.nav-episode-btn svg {
    color: #e50914 !important;
    transition: transform 0.2s ease !important;
}
#prevEpisode:hover svg { transform: translateX(-3px) !important; }
#nextEpisode:hover svg { transform: translateX(3px) !important; }

/* Lecteur Video (Iframe) */
#playerDF {
    aspect-ratio: 16 / 9 !important;
    height: auto !important;
    min-height: 250px !important;
    border-radius: 12px !important;
    border: 1px solid rgba(229, 9, 20, 0.2) !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(229, 9, 20, 0.15) !important;
    margin-top: 20px !important;
    margin-bottom: 20px !important;
    background: #000 !important;
}
