/* ===== GLOBAL ===== */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;900&family=Poppins:wght@300;400;600&display=swap');

body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #141414;
    color: #fff;
    
}

a {
    text-decoration: none;
    color: inherit;
}

/* ===== NAVBAR ===== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 25px;
    background-color: rgba(20,20,20,0.95);
    position: sticky;
    top: 0;
    z-index: 19;
}

.nav-left .logo {
    height: 90px;
}

.nav-center a {
    margin: 0 15px;

    font-size: 1rem;
    transition: color 0.3s;
}

.nav-center a:hover {
    color: #e50914;
}

.nav-right a {
   margin: 0 15px;

    font-size: 1rem;
    transition: color 0.3s;
}

.nav-right input {
    padding: 6px 10px;
    border-radius: 1px 0 0 1px;
    border: none;
    outline: none;
}

.nav-right button {
    background-color: #e50914;
    border: none;
    padding: 6px 10px;
    border-radius: 0 3px 3px 0;
    cursor: pointer;
}

.nav-right button img {
    width: 16px;
    height: 16px;
}
.hero {
    position: relative;
    height: 500px;
    background: url('../images/hero.webp') center/cover no-repeat;
    margin-bottom: 30px;
    display: flex;
    align-items: flex-end;
}

.hero-overlay {
    width: 100%;
    padding: 30px 50px;
    background: linear-gradient(to top, rgba(20,20,20,0.9), rgba(20,20,20,0));
    color: #fff;
}

.hero-overlay h1 {
    font-size: 3rem;
    margin: 0 0 15px 0;
}

.hero-overlay button {
    padding: 12px 25px;
    background-color: #e50914;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

.hero-overlay button:hover {
    background-color: #f6121d;
}

@media(max-width: 768px){
    .hero {
        height: 350px;
    }
    .hero-overlay {
        padding: 20px;
    }
    .hero-overlay h1 {
        font-size: 2rem;
    }
}


/* ===== FILMS ===== */
.section-title {
    font-size: 1.5rem;
    margin-left: 20px;
    margin-bottom: 15px;
}

#movies-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
    padding: 0 20px;
}

.movie {
    background-color: #222;
    border-radius: 2px;
    overflow: hidden;
    transition: transform 0.3s;
    text-align: center;
}

.movie:hover {
    transform: scale(1.05);
}

.movie img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.movie h3 {
    font-size: 1rem;
    margin: 10px 0 5px 0;
    padding: 0 5px;
}

.movie a {
    display: inline-block;
    margin: 5px 0 10px 0;
    padding: 5px 12px;
    background-color: #e50914;
    color: #fff;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.movie a:hover {
    background-color: #f6121d;
}

/* ===== BUTTON CHARGER PLUS ===== */
#load-more {
    display: block;
    margin: 30px auto;
    padding: 12px 25px;
    background-color: #e50914;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
}

#load-more:hover {
    background-color: #f6121d;
}



.movie-details-container {
    padding: 20px;
}

.movie-details {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    align-items: flex-start;
    justify-content: center;
}

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

.movie-info {
    max-width: 600px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.movie-info h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.movie-info p {
    font-size: 1rem;
    line-height: 1.5;
}

/* Responsive */
@media(max-width: 768px){
    .movie-details {
        flex-direction: column;
        align-items: center;
    }
    .movie-info {
        max-width: 100%;
        text-align: center;
    }
    .movie-info h2 {
        font-size: 1.5rem;
    }
}

/* Arrière-plan spécifique à la page movie */
body.movie-page {
    background: linear-gradient(180deg, #1c1c1c 0%, #141414 100%);

    color: #fff;
}

/* Survol des sections movie */
.movie-details .movie-poster img {
    transition: transform 0.3s, box-shadow 0.3s;
     border: 2px solid #e50914; /* contour rouge Netflix */
    border-radius: 8px; 
}


.movie-details .movie-poster img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0,0,0,0.7);
}

button {
    font-family: 'Poppins', sans-serif;
}



/* ===== Hero compact pour search.html ===== */
.hero.hero-small {
    position: relative;
    height: 250px; /* hauteur réduite */
    background: url('../images/hero2.jpg') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
}

/* Overlay minimaliste */
.hero.hero-small .hero-overlay {
    background: transparent; /* plus d'arrière-plan noir */
    padding: 0 20px;
    text-align: center;
    width: 90%;
    max-width: 600px;
}

/* Titre du hero */
.hero.hero-small h1 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: #fff;
}

/* Barre de recherche compacte et centrée */
.hero input#search-input {
    width: 80%;
    max-width: 400px;
    padding: 8px 15px;
    font-size: 0.95rem;
    border-radius: 25px;
    border: 2px solid #fff; /* contour blanc */
    background: rgba(255, 255, 255, 0.1); /* léger fond transparent */
    color: #fff;
    text-align: center;
    outline: none;
    box-shadow: 0 0 5px rgba(255,255,255,0.4);
    transition: all 0.3s ease;
}

.hero input#search-input::placeholder {
    color: #ddd; /* placeholder gris clair */
}

.hero input#search-input:focus {
    box-shadow: 0 0 10px rgba(255,255,255,0.7);
    border-color: #fff;
}
#hero-button {
    display: inline-block;
    padding: 12px 25px;
    background-color:  #e50914;
    color: white;
    font-weight: bold;
    text-decoration: none; /* enlève le soulignement */
    border-radius: 25px;
    transition: background-color 0.3s;
    margin-top: 15px;
}

#hero-button:hover {
    background-color: #f6121d; /* rouge plus clair au hover */
}

/* Grille de films */
.movies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
    padding: 0 20px 30px 20px;
}

/* Bouton charger plus */
#load-more {
    display: block;
    margin: 20px auto 50px auto;
    padding: 10px 20px;
    background-color: #e50914;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.95rem;
    transition: background-color 0.3s;
}

#load-more:hover {
    background-color: #f6121d;
}

/* ===== Responsive ===== */
@media(max-width: 768px){
    .hero.hero-small {
        height: 200px;
    }

    .hero.hero-small h1 {
        font-size: 1.5rem;
    }

    .hero input#search-input {
        font-size: 0.9rem;
        max-width: 300px;
        padding: 6px 12px;
    }
}

@media(max-width: 480px){
    .hero.hero-small {
        height: 180px;
    }

    .hero.hero-small h1 {
        font-size: 1.3rem;
    }

    .hero input#search-input {
        font-size: 0.85rem;
        max-width: 250px;
        padding: 5px 10px;
    }
}
/* Footer */
footer {
    text-align: center;
    padding: 15px;
    background-color: #111;
    color: #fff;
    margin-top: 50px;
    font-size: 0.9rem;
}
