/* =========================================
   RESET ET VARIABLES GLOBALES
========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #0b0b0b;
    color: #ffffff;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    overflow-x: hidden;
}

/* =========================================
   NAVIGATION ET RECHERCHE
========================================= */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 4% 20px 4%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to bottom, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 100%);
    z-index: 100;
    transition: background 0.3s;
}

.logo {
    color: #e50914; /* Rouge type SVOD */
    font-size: 28px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.search-container {
    position: relative;
}

#searchInput {
    padding: 10px 15px;
    width: 300px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    font-size: 14px;
    transition: width 0.3s;
}

#searchInput:focus {
    width: 350px;
    outline: none;
    border-color: #e50914;
}

.search-dropdown {
    position: absolute;
    top: 110%;
    left: 0;
    width: 100%;
    background: #141414;
    border: 1px solid #333;
    border-radius: 4px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 101;
}

.search-dropdown.hidden {
    display: none;
}

/* =========================================
   HERO BANNER (AFFICHE PRINCIPALE)
========================================= */
.hero {
    position: relative;
    height: 80vh;
    background-size: cover;
    background-position: center top;
    display: flex;
    align-items: center;
    padding-left: 4%;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Double dégradé pour assombrir le bas et la gauche */
    background: linear-gradient(to right, rgba(11, 11, 11, 0.9) 0%, rgba(11, 11, 11, 0.2) 50%, rgba(11, 11, 11, 0) 100%),
                linear-gradient(to top, #0b0b0b 0%, rgba(11, 11, 11, 0) 30%);
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 650px;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: bold;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-content p {
    font-size: 1.2rem;
    line-height: 1.5;
    margin-bottom: 25px;
    color: #e5e5e5;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* Boutons */
.play-btn {
    padding: 10px 25px;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 4px;
    background: #ffffff;
    color: #000000;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.play-btn:hover {
    background: #c3c3c3;
}

.small-btn {
    font-size: 1rem;
    padding: 8px 15px;
}

/* =========================================
   CARROUSELS DE CONTENUS
========================================= */
main {
    padding: 0 4%;
    margin-top: -60px; /* Fait remonter les carrousels sur le dégradé du hero */
    position: relative;
    z-index: 20;
}

.carousel-section {
    margin-bottom: 40px;
}

.carousel-section h2 {
    font-size: 1.4vw;
    margin-bottom: 10px;
    color: #e5e5e5;
}

.carousel {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 20px 0;
    scroll-behavior: smooth;
}

/* Masquer la scrollbar pour un effet natif */
.carousel::-webkit-scrollbar {
    display: none;
}
.carousel {
    -ms-overflow-style: none; 
    scrollbar-width: none;
}

.movie-card {
    flex: 0 0 calc(100% / 6); /* Affiche 6 cartes par ligne environ */
    min-width: 150px;
    cursor: pointer;
    transition: transform 0.3s ease;
    border-radius: 4px;
}

.movie-card:hover {
    transform: scale(1.08);
    z-index: 10;
}

.movie-card img {
    width: 100%;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

/* =========================================
   LECTEUR VIDÉO ET INTERFACE TV
========================================= */
#playerSection {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000000;
    z-index: 200;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hidden {
    display: none !important;
}

.btn-close {
    position: absolute;
    top: 30px;
    left: 4%;
    background: none;
    color: #fff;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 210;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.btn-close:hover {
    opacity: 1;
}

.player-wrapper {
    width: 90%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Sélecteurs Séries */
.tv-selectors {
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
    padding: 15px;
    background: #141414;
    border-radius: 8px;
}

select {
    padding: 10px;
    border-radius: 4px;
    background: #333;
    color: white;
    border: 1px solid #555;
    font-size: 1rem;
    cursor: pointer;
}

select:focus {
    outline: none;
    border-color: #e50914;
}

/* Zone Vidéo */
.video-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #111;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0,0,0,0.8);
}

video {
    outline: none;
}

/* Spinner de chargement (Scraping en cours) */
.spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #e50914;
    font-size: 1.2rem;
    font-weight: bold;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}
