/* ===============================
   GLOBAL THEME
=============================== */
:root {
    --bg: #0c0f14;
    --panel: #121820;
    --panel-light: #18222f;
    --text: #f2f2f2;
    --muted: #9aa3b2;
    --accent: #ffc933;
    --accent-light: rgba(255, 201, 51, 0.15);
    --radius: 12px;
    --max-width: 1100px;
    --transition: 0.2s ease;
    font-size: 16px;
}

body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    font-family: "Inter", "Roboto", sans-serif;
    color: var(--text);
    line-height: 1.6;
}

/* ===============================
   HEADER / TOP NAV
=============================== */
.site-header {
    background: var(--panel);
    padding: 18px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #1a2533;
    position: relative;
    z-index: 10;
}

.logo {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent);
    text-decoration: none;
    letter-spacing: 0.5px;
}

.top-nav {
    display: flex;
    gap: 18px;
}

.nav-link {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--accent);
}

/* fallback pour d'anciens templates qui utilisent <header> directement */
header {
    background: var(--panel);
}

/* ===============================
   MAIN STRUCTURE
=============================== */
.home-main,
main {
    max-width: var(--max-width);
    margin: 30px auto 50px;
    padding: 0 20px;
}

/* ===============================
   TITLES
=============================== */
h1, h2, h3 {
    margin-top: 0;
    font-weight: 700;
}

h1 {
    font-size: 2rem;
    margin-bottom: 20px;
}

h2 {
    font-size: 1.5rem;
    margin-top: 40px;
}

/* ===============================
   MOVIE PAGE
=============================== */
.movie-page {
    display: flex;
    gap: 30px;
    margin-top: 20px;
}

.poster-large {
    width: 280px;
    max-width: 100%;
    border-radius: var(--radius);
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.movie-info {
    flex: 1;
}

.details-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.details-list li {
    margin-bottom: 8px;
    color: var(--muted);
}

.details-list strong {
    color: var(--text);
}

.external-links a {
    display: inline-block;
    padding: 8px 14px;
    background: var(--accent-light);
    color: var(--accent);
    border-radius: var(--radius);
    margin-right: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.external-links a:hover {
    background: var(--accent);
    color: #000;
}

/* ===============================
   SIMILAR SECTION
=============================== */
.similar-section {
    margin-top: 60px;
}

.carousel {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 18px;
    margin-top: 20px;
}

/* ===============================
   DOCUMENTARY CARD
=============================== */
.doc-card {
    text-decoration: none;
    color: var(--text);
    background: var(--panel-light);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    display: block;
}

.doc-card:hover {
    transform: translateY(-4px);
    background: #1f2a3a;
}

.doc-card-thumb img {
    width: 100%;
    display: block;
}

.doc-card-meta {
    padding: 12px;
}

.doc-card-meta h3 {
    margin: 0 0 6px;
    font-size: 1rem;
}

.doc-card-meta p {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
}

/* ===============================
   GRID PAGES (genre, year, country)
=============================== */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

/* ================================
   HERO DOCUFLIX — MUR D'AFFICHES
   ================================ */

.hero-docuflix {
    position: relative;
    width: 100%;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    color: #fff;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 1;
}

.hero-poster-grid {
    z-index: 1;
}

.hero-poster-tile {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 4px;
}

.hero-gradient {
    background: linear-gradient(to top, rgba(0,0,0,0.75), rgba(0,0,0,0.20));
}

.hero-inner {
    position: relative;
    z-index: 3;
    max-width: 900px;
    text-align: center;
    padding: 20px;
}

.hero-inner h1 {
    font-size: 2.4rem;
    margin-bottom: 10px;
}

.hero-inner p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.hero-actions {
    margin-top: 20px;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-cta {
    padding: 12px 22px;
    border-radius: 8px;
    font-weight: bold;
    text-decoration: none;
    transition: 0.2s;
}

.hero-cta.primary {
    background: #ffcc33;
    color: #000;
}

.hero-cta.secondary {
    border: 2px solid #fff;
    color: #fff;
}

.hero-stats {
    margin-top: 25px;
    font-size: 1rem;
    opacity: 0.85;
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===============================
   HOMEPAGE SECTIONS
=============================== */
.home-section {
    margin-top: 40px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 16px;
}

.section-header h2 {
    margin: 0;
}

.section-link {
    font-size: 0.9rem;
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

.section-link:hover {
    text-decoration: underline;
}

.cards-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 18px;
}

/* ===============================
   PILL CAROUSEL (genres / years / countries)
=============================== */
.pill-carousel {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.pill-card {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--panel-light);
    color: var(--text);
    text-decoration: none;
    font-size: 0.9rem;
    border: 1px solid rgba(255,255,255,0.05);
    transition: var(--transition);
}

.pill-card:hover {
    background: var(--accent-light);
    color: var(--accent);
}

/* ===============================
   FOOTER
=============================== */
footer {
    text-align: center;
    padding: 40px 0;
    margin-top: 40px;
    color: var(--muted);
    background: var(--panel);
    border-top: 1px solid #1a2533;
}

/* ===============================
   RESPONSIVE
=============================== */
@media (max-width: 800px) {
    .movie-page {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .poster-large {
        width: 200px;
    }

    .hero-docuflix {
        padding: 60px 16px;
        min-height: 60vh;
    }

    .hero-inner h1 {
        font-size: 2rem;
    }

    .cards-row {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}
/* FIX VISIBILITÉ DES AFFICHES HERO */
.hero-poster-grid {
    opacity: 0.9 !important;
    grid-auto-rows: 350px !important;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)) !important;
}

.hero-gradient {
    background: linear-gradient(to top, rgba(0,0,0,0.30), rgba(0,0,0,0.05)) !important;
}
/* ===============================
   NETFLIX-STYLE POSTER CARDS
=============================== */
.poster-carousel {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 18px;
    margin-top: 15px;
}

.poster-card {
    display: block;
    text-decoration: none;
    color: var(--text);
    background: var(--panel-light);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.poster-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.4);
}

.poster-img {
    width: 100%;
    height: 190px;
    background-size: cover;
    background-position: center;
}

.poster-title {
    padding: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    background: var(--panel);
}
.poster-tile {
    display: inline-block;
    width: 110px;
    margin: 8px;
    text-align: center;
    color: #fff;
}

.poster-thumb img {
    width: 110px;
    height: 165px;
    object-fit: cover;
    border-radius: 8px;
}

.poster-meta {
    font-size: 13px;
    margin-top: 4px;
    opacity: 0.85;
}
/* HERO SECTION */
.hero-taxo {
    background:#05060a;
    color:white;
    padding:40px 20px;
    text-align:center;
}

.hero-taxo h1 {
    margin:0;
    font-size:32px;
}

.taxo-container {
    max-width:1150px;
    margin:auto;
    padding:20px;
}

.taxo-toolbar {
    display:flex;
    gap:10px;
    margin-bottom:20px;
}

.taxo-btn {
    background:#151a24;
    padding:10px 16px;
    border-radius:8px;
    text-decoration:none;
    border:1px solid #2a3242;
    color:white;
}

.taxo-btn:hover {
    background:#ffcc33;
    color:#000;
}

/* FOOTER */
.site-footer {
    background:#05060a;
    color:#9aa0b2;
    text-align:center;
    padding:20px;
    margin-top:40px;
}
