/* ==========================================================================
   1. VARIABLES & CONFIGURATION DE BASE
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600&family=Manrope:wght@200;300;400;500&display=swap');

:root {
    --bg-color: #050505;
    --glass-bg: rgba(20, 20, 20, 0.75);
    --text-main: #F0E6D2;
    --text-muted: rgba(240, 230, 210, 0.6);
    --accent: #d4af37;
    --border-color: rgba(240, 230, 210, 0.15);
    --font-title: 'Cinzel', serif;
    --font-body: 'Manrope', sans-serif;
}

/* Fix pour éviter le flash blanc et le saut de page */
html {
    background-color: #050505;
    scrollbar-gutter: stable; /* Réserve la place du scroll */
    scrollbar-width: thin;
    scrollbar-color: var(--accent) #050505;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: transparent;
    color: var(--text-main);
    font-family: var(--font-body);
    font-weight: 300;
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    min-height: 100vh;
}

/* ==========================================================================
   2. SCROLLBAR PERSONNALISÉE (Webkit)
   ========================================================================== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #050505;
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 5px;
    border: 2px solid #050505;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* ==========================================================================
   3. VIDÉO D'ARRIÈRE-PLAN
   ========================================================================== */
#bg-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    z-index: -2;
    transform: scale(1.05);
    filter: contrast(1.3) brightness(0.5) saturate(1.1);
}

/* ==========================================================================
   4. NAVIGATION & MENU
   ========================================================================== */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 4rem;
    position: fixed;
    width: 100%;
    top: 0;
    background: linear-gradient(to bottom, rgba(5,5,5,0.95) 80%, transparent);
    z-index: 1000;
}

.logo {
    font-family: var(--font-title);
    font-size: 1.2rem;
    letter-spacing: 2px;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
    flex-wrap: wrap;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: 0.4s;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -5px;
    left: 0;
    background-color: var(--accent);
    transition: width 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-main);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.btn-film {
    border: 1px solid var(--accent);
    padding: 6px 18px;
    border-radius: 2px;
    color: var(--accent) !important;
}

.btn-film:hover,
.btn-film.active {
    background: var(--accent);
    color: #000 !important;
}

/* ==========================================================================
   5. BARRE DE RECHERCHE (NOUVEAU DESIGN)
   ========================================================================== */
.search-box {
    position: relative;
    margin-left: 1rem;
}

.search-input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-main);
    padding: 8px 15px;
    width: 180px;
    font-size: 0.85rem;
    font-family: var(--font-body);
    transition: all 0.3s ease;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.search-input:focus {
    outline: none;
    background: rgba(0, 0, 0, 0.8);
    border-color: var(--accent);
    width: 220px;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
}

.search-results {
    position: absolute;
    top: 120%;
    right: 0;
    width: 250px;
    background: #0a0a0a;
    border: 1px solid var(--accent);
    border-radius: 4px;
    list-style: none;
    display: none;
    z-index: 2000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
}

.search-results li a {
    display: block;
    padding: 12px 15px;
    color: #ccc;
    text-decoration: none;
    border-bottom: 1px solid #222;
    font-size: 0.85rem;
}

.search-results li a:hover {
    background: var(--accent);
    color: #000;
}

/* ==========================================================================
   6. ACCUEIL (HERO SCREEN)
   ========================================================================== */
.hero-screen {
    height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.hero-title {
    font-family: var(--font-title);
    font-size: 5rem;
    line-height: 1.1;
    margin-bottom: 1rem;
    text-align: center;
    text-shadow: 0 10px 40px rgba(0,0,0,0.8);
    text-transform: uppercase;
    letter-spacing: 4px;
    opacity: 0;
    animation: fadeUp 1.5s ease-out forwards 0.5s;
}

.hero-subtitle {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 6px;
    color: var(--text-muted);
    margin-bottom: 3rem;
    text-align: center;
    opacity: 0;
    animation: fadeUp 1.5s ease-out forwards 1s;
}

.cta-button {
    display: inline-block;
    padding: 1rem 3rem;
    background: transparent;
    border: 2px solid var(--text-main);
    color: var(--text-main);
    font-family: var(--font-title);
    text-transform: uppercase;
    letter-spacing: 3px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: 0.4s;
    cursor: pointer;
    opacity: 0;
    animation: fadeUp 1.5s ease-out forwards 1.5s;
}

.cta-button:hover {
    background: var(--text-main);
    color: var(--bg-color);
    box-shadow: 0 0 25px rgba(240, 230, 210, 0.4);
    transform: translateY(-3px);
}

/* ==========================================================================
   7. STRUCTURE GÉNÉRALE DES PAGES
   ========================================================================== */
.page-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 80px 0;
    width: 100%;
}

.container {
    width: 85%;
    max-width: 1100px;
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border: 1px solid var(--border-color);
    padding: 3rem;
    animation: fadeUp 1s ease-out forwards;
}

h1 {
    font-family: var(--font-title);
    font-size: 2.5rem;
    font-weight: 400;
    margin-bottom: 2rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    letter-spacing: 3px;
}

/* ==========================================================================
   8. PAGE ÉQUIPE (CORRECTION : SOULIGNEMENT & RÔLE EN DESSOUS)
   ========================================================================== */
.container.team-container {
    width: 90%;
    max-width: 1250px;
    padding: 3rem;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4rem 2rem;
    width: 100%;
    justify-items: center;
}

/* --- CORRECTION DU SOULIGNEMENT BLEU --- */
/* C'est ce bloc qui enlève le trait sous les liens */
.team-link {
    text-decoration: none !important; /* Force la suppression du soulignement */
    color: inherit; /* Hérite de la couleur de base (doré/beige), pas le bleu */
    display: block; /* Important pour la structure */
}

.team-member {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    position: relative;
}

/* PHOTO DE PROFIL */
.pp-wrapper {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--border-color);
    position: relative;
    transition: all 0.4s ease;
    margin-bottom: 1.2rem;
}

.team-member img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
    filter: grayscale(100%) contrast(1.1);
    transition: 0.5s;
    display: block;
}

.team-member:hover .pp-wrapper {
    border-color: var(--accent);
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}

.team-member:hover img {
    filter: grayscale(0%);
}

/* BLOC TEXTE (NOM + RÔLE EN DESSOUS) */
.member-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 5px;
}

.member-name {
    display: block;
    font-family: var(--font-title);
    font-size: 1.2rem;
    color: var(--text-main);
    margin: 0;
    line-height: 1.2;
    /* Sécurité supplémentaire */
    text-decoration: none !important;
}

.member-role {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 2px;
    margin-top: 2px;
    font-weight: 400;
    /* Sécurité supplémentaire */
    text-decoration: none !important;
}

/* ICÔNE LINKEDIN */
.linkedin-icon {
    position: absolute;
    bottom: 15px;
    right: 25%;
    transform: translateX(50%);
    font-size: 1.2rem;
    color: white;
    background: #0077b5;
    width: 30px;
    height: 30px;
    line-height: 30px;
    border-radius: 50%;
    opacity: 0;
    transition: 0.4s;
    z-index: 5;
}

.team-member:hover .linkedin-icon {
    opacity: 1;
    bottom: 20px;
}

/* ==========================================================================
   9. PAGE PODCAST & INTERVIEW (LAYOUT SPLIT)
   ========================================================================== */
.container.podcast-wide {
    max-width: 1400px;
    padding: 2rem;
    width: 95%;
}

.podcast-layout {
    display: flex;
    flex-direction: row;
    gap: 40px;
    align-items: flex-start;
    margin-top: 2rem;
}

.podcast-video-side {
    flex: 2;
    width: 100%;
}

/* Wrapper pour ratio 16:9 et éviter l'écrasement */
.video-ratio-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* Ratio 16/9 */
    height: 0;
    overflow: hidden;
    background: #000;
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* On ajoute ", .video-ratio-wrapper iframe" pour cibler YouTube */
.video-ratio-wrapper video, 
.video-ratio-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border: none;
}

.podcast-list-side {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    max-height: 60vh;
    overflow-y: auto;
}

.podcast-list-side h2 {
    margin-top: 0;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

/* Sommaire Interactif */
.chapter-list {
    list-style: none;
    margin-top: 2rem;
    text-align: left;
}

.chapter-list li {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    transition: all 0.3s;
    font-family: var(--font-title);
    font-size: 0.9rem;
}

.chapter-list li:hover {
    background: rgba(212, 175, 55, 0.1);
    color: var(--accent);
    padding-left: 1.5rem;
}

.chapter-list .time {
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.chapter-list li.active-chapter {
    background: rgba(212, 175, 55, 0.15);
    border-left: 4px solid var(--accent);
    color: #fff;
    padding-left: 1.5rem;
    font-weight: 600;
}

.chapter-list li.active-chapter::before {
    content: "▶";
    margin-right: 10px;
    font-size: 0.8rem;
    color: var(--accent);
}

/* ==========================================================================
   10. PAGE PROJET (ABOUT) - MODE ONE PAGE HARMONIEUX (AVEC ANIMATION)
   ========================================================================== */
body.about-page {
    overflow: hidden !important;
    height: 100vh;
    width: 100vw;
    position: fixed;
}

.about-fullscreen-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 100px;
    padding-bottom: 80px;
    z-index: 10;
}

.project-content-wrapper {
    width: 90%;
    max-width: 1200px;
    max-height: 90%;
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border: 1px solid var(--border-color);
    padding: 4rem;
    border-radius: 2px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    
    /* C'est cette ligne qui ajoute l'animation douce */
    opacity: 0; /* On cache au début */
    animation: fadeUp 1s ease-out forwards; /* On lance l'animation */
}

.project-content-wrapper h1 {
    font-size: 2.2rem;
    margin-bottom: 2rem;
    color: var(--text-main);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.project-content-wrapper h2 {
    font-family: var(--font-title);
    font-size: 1.4rem;
    color: var(--accent);
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    display: inline-block;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    padding-bottom: 3px;
}

.project-content-wrapper p {
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: rgba(240, 230, 210, 0.9);
    max-width: 950px;
    margin-left: auto;
    margin-right: auto;
}
/* ==========================================================================
   11. PAGES CINÉMA PLEIN ÉCRAN (FILM & PLAYER INTERVIEW)
   ========================================================================== */
body.film-page,
body.interview-page {
    overflow: hidden !important;
    height: 100vh;
    width: 100vw;
    position: fixed;
}

.cinema-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 80px;
    padding-bottom: 60px;
    z-index: 10;
    box-sizing: border-box;
}

.video-wrapper-film {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.video-wrapper-film video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-width: none;
    max-height: none;
    box-shadow: 0 0 50px rgba(0,0,0,0.8);
    background: #000;
}

/* ==========================================================================
   12. PAGE PLAN DU SITE (ARBORESCENCE)
   ========================================================================== */
.sitemap-tree ul {
    list-style: none;
    padding-left: 20px;
    position: relative;
}

.sitemap-tree ul::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    height: 100%;
    background: var(--border-color);
}

.sitemap-tree li {
    margin: 0;
    padding: 15px 20px;
    position: relative;
}

.sitemap-tree li::before {
    content: '';
    position: absolute;
    top: 30px;
    left: -20px;
    width: 20px;
    height: 1px;
    background: var(--border-color);
}

.sitemap-tree a {
    text-decoration: none;
    color: var(--text-main);
    font-family: var(--font-title);
    font-size: 1.1rem;
    transition: 0.3s;
    display: inline-block;
}

.sitemap-tree a:hover {
    color: var(--accent);
    transform: translateX(10px);
}

.sitemap-tree li:last-child > ul::before {
    display: none;
}

.root-node {
    font-size: 1.5rem !important;
    color: var(--accent) !important;
    font-weight: bold;
    border-bottom: 1px solid var(--accent);
    padding-bottom: 5px;
}

/* ==========================================================================
   13. FOOTER
   ========================================================================== */
footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1rem 4rem;
    background: #050505;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

.footer-text {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.social-links a {
    color: var(--text-main);
    margin-left: 20px;
    text-decoration: none;
    font-size: 0.7rem;
}

.social-links a:hover {
    color: var(--accent);
}

/* ==========================================================================
   14. ANIMATIONS
   ========================================================================== */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   15. VERSION MOBILE (PORTRAIT - RESPONSIVE)
   ========================================================================== */
@media (max-width: 768px) {
    html, body {
        overflow-y: scroll !important;
        height: auto !important;
        position: relative !important;
    }

    .page-content {
        display: block !important;
        /* Plus d'espace car le menu est vertical */
        padding-top: 240px !important;
        padding-bottom: 150px !important;
        height: auto !important;
    }

    /* 1. Navigation */
    nav {
        padding: 1rem;
        flex-direction: column;
        background: #050505; /* Noir uni pour lisibilité */
        gap: 1rem;
        height: auto;
        max-height: none;
    }

    .nav-links {
        justify-content: center;
        width: 100%;
        gap: 1rem;
        flex-direction: column;
    }

    .btn-film {
        order: -1;
        width: 100%;
        text-align: center;
    }

    /* 2. Barre de recherche Mobile */
    .search-box {
        margin: 10px 0 0 0;
        width: 100%;
    }

    .search-input {
        width: 100%;
        text-align: center;
    }

    .search-input:focus {
        width: 100%;
    }

    .search-results {
        width: 100%;
        left: 0;
    }

    /* 3. Accueil */
    .hero-screen {
        height: auto !important;
        min-height: 80vh;
        padding-top: 120px;
        padding-bottom: 50px;
    }

    .hero-title {
        font-size: 2.5rem;
        padding: 0 10px;
    }

    /* 4. Équipe (Correction: 1 Colonne) */
    .container.team-container {
        padding: 2rem 1rem;
    }

    .team-grid {
        grid-template-columns: 1fr; /* Une seule colonne */
        gap: 3rem;
    }

    .pp-wrapper {
        width: 140px;
        height: 140px;
    }

    /* 5. Podcast & Interview */
    .podcast-layout {
        flex-direction: column;
    }

    .podcast-video-side,
    .podcast-list-side {
        width: 100%;
        flex: none;
    }

    .podcast-list-side {
        max-height: none;
    }

    /* 6. Projet (About) Mobile */
    .about-fullscreen-container {
        padding-top: 240px;
        padding-bottom: 80px;
    }

    .project-content-wrapper {
        display: block;
        overflow-y: auto;
        padding: 2rem 1.5rem;
    }

    /* 7. Footer Mobile */
    footer {
        padding: 15px;
        flex-direction: row;
        gap: 0;
    }

    .footer-text {
        font-size: 0.6rem;
        max-width: 50%;
    }
}

/* ==========================================================================
   16. VERSION MOBILE PAYSAGE (LANDSCAPE)
   ========================================================================== */
@media (max-width: 915px) and (orientation: landscape) {
    html, body {
        overflow-y: scroll !important;
        height: auto !important;
    }

    .page-content {
        padding-top: 120px !important;
        padding-bottom: 60px !important;
    }

    nav {
        flex-direction: row;
        background: rgba(5,5,5,0.95);
    }
    
    .nav-links {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    /* Mode Cinéma Mobile Landscape */
    body.film-page nav, body.film-page footer,
    body.interview-page nav, body.interview-page footer {
        display: none !important;
    }

    body.film-page .cinema-container,
    body.interview-page .cinema-container {
        padding: 0 !important;
        background: black;
    }
}