/* =========================================
   1. VARIABLES & THÈMES
   ========================================= */
:root {
    /* --- MODE SOMBRE (Par défaut) --- */
    --bg-body: #121212;
    --bg-card: #1e1e1e;
    --text-main: #f0f0f0;
    --text-muted: #aaaaaa;
    --border-color: #333333;
    --accent: #FFD700;
    --accent-hover: #ffea00;
    --shadow: 0 10px 30px rgba(0,0,0,0.5);
    
    --nav-height: 80px; 
    --footer-height: 0px; 
}

/* --- MODE CLAIR (Via classe) --- */
body.light-mode {
    --bg-body: #f4f4f9;        
    --bg-card: #ffffff;
    --text-main: #2c3e50;      
    --text-muted: #666666;
    --border-color: #e0e0e0;
    --accent: #d4af37;
    --accent-hover: #b5952f;
    --shadow: 0 5px 15px rgba(0,0,0,0.08);
}

/* =========================================
   2. CONFIGURATION GÉNÉRALE
   ========================================= */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', sans-serif; transition: background-color 0.3s, color 0.3s; }

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    overflow: hidden;
    height: 100vh;
    height: 100dvh;
    display: flex; flex-direction: column;
}

/* =========================================
   3. BARRE DE NAVIGATION (STYLE NETFLIX/OVERLAY)
   ========================================= */
nav {
    height: var(--nav-height);
    background: linear-gradient(to bottom, rgba(0,0,0,0.95) 0%, transparent 100%);
    border: none;
    position: fixed; top: 0; left: 0; width: 100%; 
    z-index: 10000;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 2rem;
    transition: opacity 0.5s ease; opacity: 1;
}

.logo { 
    font-size: 1.1rem; font-weight: 800; letter-spacing: 1px; color: var(--accent); 
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    display: flex; align-items: center; gap: 12px; flex-shrink: 0;
}

.nav-links { display: flex; gap: 20px; align-items: center; }
.nav-item { 
    cursor: pointer; text-transform: uppercase; font-size: 0.9rem; font-weight: 600; 
    color: rgba(255, 255, 255, 0.9); text-shadow: 0 1px 3px rgba(0,0,0,0.8);
    white-space: nowrap;
}
.nav-item:hover, .nav-item.active { color: var(--accent); }

.nav-right { display: flex; align-items: center; gap: 15px; flex-shrink: 0; }

.nav-theme-btn, .nav-icon-btn, .burger-btn {
    background: rgba(255, 255, 255, 0.1); 
    border: 1px solid rgba(255, 255, 255, 0.2); 
    color: white;
    width: 35px; height: 35px; border-radius: 50%; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: 0.3s;
    backdrop-filter: blur(5px);
}
.nav-theme-btn:hover, .nav-icon-btn:hover, .burger-btn:hover { background: var(--accent); color: black; border-color: var(--accent); }

/* Burger caché par défaut sur PC */
.burger-btn { display: none; }

.search-box { 
    display: flex; align-items: center; background: rgba(255, 255, 255, 0.15); 
    border: 1px solid rgba(255, 255, 255, 0.3); padding: 5px 10px; border-radius: 20px; 
    position: relative; backdrop-filter: blur(5px);
}
.search-box input { background: transparent; border: none; color: white; outline: none; width: 140px; }
.search-box input::placeholder { color: rgba(255, 255, 255, 0.7); }
.search-box button { background: none; border: none; color: var(--accent); cursor: pointer; }

.search-suggestions {
    position: absolute; top: 110%; right: 0; width: 300px; background: var(--bg-card); 
    border: 1px solid var(--border-color); border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5); display: none; flex-direction: column; z-index: 1000; overflow: hidden;
}
.suggestion-item {
    padding: 12px 15px; border-bottom: 1px solid rgba(128,128,128,0.1);
    cursor: pointer; font-size: 0.9rem; color: var(--text-main);
    display: flex; justify-content: space-between; align-items: center;
}
.suggestion-item:hover { background: rgba(212, 175, 55, 0.1); color: var(--accent); }
.suggestion-type { font-size: 0.7rem; opacity: 0.6; text-transform: uppercase; font-weight: bold; border: 1px solid var(--border-color); padding: 2px 5px; border-radius: 4px; }

/* =========================================
   4. CONTENU PRINCIPAL & BENTO GRID
   ========================================= */
main { flex: 1; position: relative; overflow: hidden; }

.page {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    display: none; overflow-y: auto; padding-top: 100px; padding-bottom: 20px;
    -webkit-overflow-scrolling: touch;
}
.active-page { display: block; animation: fadeIn 0.5s ease; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px 40px 20px; }

/* --- STYLE BENTO GRID --- */
.bento-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); 
    gap: 20px; margin-bottom: 40px; grid-auto-rows: minmax(150px, auto);
}

.bento-item {
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: 15px; padding: 25px; box-shadow: var(--shadow);
    display: flex; flex-direction: column; justify-content: center;
    transition: transform 0.3s ease;
}
.bento-item:hover { transform: translateY(-2px); border-color: var(--accent); }

.bento-item h2, .bento-item h3 { color: var(--accent); margin-bottom: 15px; }
.bento-item p { color: var(--text-main); line-height: 1.5; }

/* Classes de taille */
.span-3 { grid-column: span 3; } 
.span-2 { grid-column: span 2; } 
.span-1 { grid-column: span 1; } 

.intro-block { text-align: center; } 

.video-links-block .links-row { display: flex; flex-direction: column; gap: 10px; height: 100%; justify-content: center; }
.bento-btn { 
    flex: 1; padding: 12px; text-align: center; border-radius: 8px; 
    text-decoration: none; font-weight: bold; color: white; display: flex; 
    align-items: center; justify-content: center; gap: 8px; transition: transform 0.2s;
}
.bento-btn:hover { transform: scale(1.02); }
.yt { background: #FF0000; }
.yt-dark { background: #282828; }
.linkedin-sm { background: #0077b5; }
.rights-sm { background: transparent; border: 1px solid var(--border-color); color: var(--text-main); cursor: pointer; }
.rights-sm:hover { border-color: var(--accent); color: var(--accent); }

.interviewee-block .mini-profile { display: flex; gap: 20px; align-items: center; margin-bottom: 20px; }
.interviewee-block .mini-img { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; border: 2px solid var(--accent); }
.interviewee-block h4 { font-size: 1.3rem; margin: 0; }
.interviewee-block .job { font-size: 1rem; color: var(--text-muted); }
.interviewee-block .action-buttons { display: flex; gap: 15px; }

/* GRILLE ET CARTES ÉQUIPE */
.team-block-full .team-grid-inner { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); 
    gap: 30px; 
    text-align: center; 
    align-items: stretch;
}

.member-card { 
    display: flex; flex-direction: column; align-items: center; 
    height: 100%; justify-content: flex-start;
}
.member-card img { width: 90px; height: 90px; border-radius: 50%; object-fit: cover; margin-bottom: 10px; border: 3px solid rgba(255,255,255,0.1); }
.member-card h4 { margin: 5px 0; font-size: 1.2rem; }
.member-card .role { font-size: 0.9rem; color: var(--accent); font-weight: bold; margin-bottom: 10px; display: block; }
.member-desc { 
    font-size: 0.85rem; color: var(--text-muted); 
    margin-bottom: 20px; line-height: 1.4; 
    flex-grow: 1; 
}

.member-links { display: flex; flex-direction: row; gap: 10px; width: 100%; margin-top: auto; }
.member-btn {
    flex: 1; padding: 8px; font-size: 0.8rem; border-radius: 5px;
    text-align: center; text-decoration: none; font-weight: 600;
    transition: 0.2s; border: 1px solid transparent;
    display: flex; align-items: center; justify-content: center; gap: 5px;
}
.btn-linkedin { background: #0077b5; color: white; }
.btn-linkedin:hover { background: #005a8b; }
.btn-webdoc { background: transparent; border-color: var(--border-color); color: var(--text-main); }
.btn-webdoc:hover { border-color: var(--accent); color: var(--accent); }

.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags span { background: rgba(212, 175, 55, 0.1); border: 1px solid var(--accent); color: var(--accent); padding: 5px 12px; border-radius: 15px; font-size: 0.8rem; font-weight: bold; }

.music-block p { font-size: 0.85rem; color: var(--text-muted); }
.music-block a { color: var(--accent); text-decoration: none; }
.music-block a:hover { text-decoration: underline; }

.copyright-block { text-align: center; border-top: 4px solid var(--accent); padding-top: 15px; }

/* =========================================
   5. LECTEUR VIDÉO
   ========================================= */
.full-screen-page { background: black; overflow: hidden; padding-top: 0 !important; padding-bottom: 0 !important; } 

.video-wrapper { width: 100%; height: 100%; position: relative; overflow: hidden; display: flex; justify-content: center; align-items: center; background: #000; }
.youtube-player { position: relative; width: 100%; height: 100%; max-width: 100%; max-height: 100%; pointer-events: none; }

.overlay-chapters {
    position: absolute; top: 25%; right: 80px; background: rgba(0, 0, 0, 0.85); color: white;
    padding: 25px; border-radius: 12px; width: 320px; border-left: 4px solid var(--accent); 
    backdrop-filter: blur(8px); z-index: 20; box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transition: opacity 0.5s ease; opacity: 1;
}
.overlay-chapters h3 { margin-bottom: 15px; font-size: 1.3rem; color: var(--accent); text-transform: uppercase; letter-spacing: 1px; }
.overlay-chapters ul { list-style: none; }
.overlay-chapters li { padding: 12px 10px; cursor: pointer; border-bottom: 1px solid rgba(255,255,255,0.1); font-size: 1.05rem; transition: 0.2s; display: flex; justify-content: space-between; }
.overlay-chapters li:hover { background: rgba(255,255,255,0.05); color: var(--accent); padding-left: 15px; }
.chapter-active { color: var(--accent) !important; font-weight: bold; padding-left: 15px !important; background: rgba(212, 175, 55, 0.1); }

/* Bouton pour Mobile Accordéon */
.mobile-chap-btn { display: none; width: 100%; background: var(--accent); color: #000; border: none; padding: 15px; font-weight: bold; text-transform: uppercase; cursor: pointer; border-radius: 8px; margin-bottom: 10px; }
.chapter-list-wrapper { display: block; }

.custom-controls-container {
    position: absolute; bottom: 0; left: 0; width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.7) 60%, transparent 100%);
    padding: 20px 40px 10px 40px; z-index: 30; display: flex; flex-direction: column; gap: 10px;
    transition: opacity 0.5s ease; opacity: 1;
}

/* --- AMÉLIORATION SCROLLBAR PC --- */
.top-hotspots { 
    display: flex; gap: 15px; margin-bottom: 10px; overflow-x: auto; padding-bottom: 15px;
    scrollbar-width: auto; 
}

/* Style de scrollbar personnalisé et plus propre */
.top-hotspots::-webkit-scrollbar { height: 8px; }
.top-hotspots::-webkit-scrollbar-track { background: rgba(255,255,255,0.05); border-radius: 4px; }
.top-hotspots::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 4px; border: 2px solid transparent; background-clip: content-box; }
.top-hotspots::-webkit-scrollbar-thumb:hover { background-color: var(--accent-hover); }

.top-hotspots button {
    background: rgba(255, 255, 255, 0.1); border: 1px solid var(--accent); color: var(--accent);
    padding: 10px 20px; border-radius: 25px; cursor: pointer; font-size: 0.95rem; transition: 0.3s;
    white-space: nowrap; display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}
.top-hotspots button:hover, .active-hotspot { background: var(--accent) !important; color: black !important; font-weight: bold; transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,0.3); }

.progress-area { position: relative; width: 100%; height: 20px; display: flex; align-items: center; }
.progress-bar {
    width: 100%; height: 5px; -webkit-appearance: none; appearance: none; background: rgba(255, 255, 255, 0.3); border-radius: 5px; cursor: pointer; outline: none; position: relative; z-index: 2;
}
.progress-bar::-webkit-slider-thumb {
    -webkit-appearance: none; width: 15px; height: 15px; background: var(--accent);
    border-radius: 50%; cursor: pointer; transition: 0.2s; box-shadow: 0 0 10px rgba(0,0,0,0.5);
}
.progress-bar::-webkit-slider-thumb:hover { transform: scale(1.3); }

.bar-marker {
    position: absolute; top: 50%; transform: translateY(-50%); width: 8px; height: 8px; background: white; border-radius: 50%;
    z-index: 1; pointer-events: none; opacity: 0.9; box-shadow: 0 0 5px black;
}

.controls-row { display: flex; align-items: center; gap: 20px; color: white; padding-bottom: 10px; }
.play-btn { background: none; border: none; color: white; font-size: 1.2rem; cursor: pointer; width: 30px; }
.play-btn:hover { color: var(--accent); }
.time-display { font-size: 0.9rem; font-family: monospace; min-width: 100px; color: #ddd; }

.volume-control { display: flex; align-items: center; width: 80px; }
.volume-slider { width: 100%; height: 4px; cursor: pointer; accent-color: var(--accent); }

.ui-hidden { opacity: 0 !important; pointer-events: none; }

/* =========================================
   6. MODALES & NOTIFICATIONS
   ========================================= */
.modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); z-index: 2000;
    display: flex; justify-content: center; align-items: center; backdrop-filter: blur(5px);
}
.modal-content {
    background: var(--bg-card); padding: 30px; border-radius: 10px; width: 90%; max-width: 500px; position: relative;
    border: 1px solid var(--accent); color: var(--text-main); box-shadow: 0 0 20px rgba(0,0,0,0.5);
}
.close-btn { position: absolute; top: 10px; right: 15px; font-size: 1.5rem; cursor: pointer; color: var(--text-muted); }

.glass-modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px); z-index: 2500; display: flex; justify-content: center; align-items: center;
}
.glass-content { position: relative; max-width: 90%; max-height: 90%; }
.rights-img { max-width: 100%; max-height: 80vh; border-radius: 10px; box-shadow: 0 10px 40px rgba(0,0,0,0.3); }
.close-glass {
    position: absolute; top: 15px; right: 15px; font-size: 1.5rem; color: white; cursor: pointer; font-weight: bold; background: rgba(0,0,0,0.6);
    width: 35px; height: 35px; border-radius: 50%; display: flex; justify-content: center; align-items: center; z-index: 10; transition: 0.3s;
}

.close-glass:hover {
    background: var(--accent);
    color: black;
}

.toast-notification {
    position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%); background: var(--accent); color: #000; font-weight: bold;
    padding: 10px 20px; border-radius: 25px; box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    opacity: 0; transition: opacity 0.3s, bottom 0.3s; z-index: 3000; pointer-events: none;
}
.toast-notification.show { opacity: 1; bottom: 100px; }

.share-options { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.share-options button {
    padding: 12px; border: 1px solid var(--border-color); background: var(--bg-body); color: var(--text-main); cursor: pointer;
    border-radius: 5px; text-align: left; display: flex; align-items: center; gap: 10px; font-size: 1rem;
}
.share-options button:hover { border-color: var(--accent); color: var(--accent); background: rgba(212, 175, 55, 0.05); }

.journey-item, .journey-chap, .journey-q {
    padding: 10px; margin-bottom: 5px; background: var(--bg-card); border-radius: 5px; border: 1px solid var(--border-color); cursor: pointer;
}
.journey-item.seen, .journey-chap.seen { border-left: 4px solid #4caf50; }
.journey-q { margin-left: 20px; font-size: 0.9rem; color: var(--text-muted); }
.journey-q:hover, .journey-chap:hover { color: var(--accent); }

/* =========================================================
   MEDIA QUERIES MOBILE (NAVIGATION & AFFICHAGE PAGES)
   ========================================================= */

@media (max-width: 1024px) {

    /* 1. RESET GLOBAL & NAVIGATION */
    html, body {
        overflow-y: auto !important;
        height: auto !important;
        position: static !important;
        background: var(--bg-body) !important;
    }

    nav {
        position: sticky !important;
        top: 0;
        width: 100%;
        height: 60px !important;
        background: var(--bg-body) !important;
        border-bottom: 1px solid var(--border-color);
        z-index: 5000;
        padding: 0 10px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
    }

    body.light-mode nav {
        background: var(--bg-card) !important;
    }

    body.light-mode .search-box {
        background: rgba(0, 0, 0, 0.08) !important;
        border: 1px solid var(--border-color) !important;
    }

    body.light-mode .search-box input {
        color: var(--text-main) !important;
    }

    body.light-mode .search-box input::placeholder {
        color: var(--text-muted) !important;
    }

    body.light-mode .nav-icon-btn, 
    body.light-mode .nav-theme-btn,
    body.light-mode .burger-btn {
        background: rgba(0, 0, 0, 0.1) !important;
        border: 1px solid var(--border-color) !important;
        color: var(--text-main) !important;
        display: flex !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    body.light-mode .nav-icon-btn i, 
    body.light-mode .nav-theme-btn i,
    body.light-mode .burger-btn i {
        color: var(--text-main) !important;
    }

    .burger-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, 0.1);
        color: white;
        border: 1px solid rgba(255, 255, 255, 0.2);
    }

    .logo span { display: none !important; }
    .nav-links { display: none !important; }

    /* Menu déroulant actif */
    .nav-links.active {
        display: flex !important;
        position: fixed !important;
        top: 60px;
        left: 0;
        width: 100% !important;
        height: calc(100vh - 60px) !important;
        background: var(--bg-card) !important;
        flex-direction: column !important;
        padding: 20px !important;
        z-index: 9999;
        overflow-y: auto;
    }

    .nav-links.active .nav-item {
        color: var(--text-main) !important;
        padding: 15px !important;
        font-size: 1.2rem;
        border-bottom: 1px solid var(--border-color);
        text-align: left;
    }

    /* 2. STRUCTURE DES PAGES */
    .page { 
        padding-top: 20px !important; 
        position: relative !important; 
        width: 100% !important; 
        height: auto !important;
        min-height: 100vh;
        display: none !important; 
        overflow-x: hidden;
    }

    .active-page { 
        display: block !important; 
    }

    .container {
        padding: 0 15px 100px 15px !important;
    }

    /* 3. STRUCTURE VIDÉO */
    #interview.active-page {
        display: flex !important;
        flex-direction: column;
    }

    .video-wrapper {
        flex-direction: column !important;
        width: 100% !important;
        background: black;
        position: relative !important;
    }

    .youtube-player {
        position: relative !important;
        width: 100% !important;
        aspect-ratio: 16 / 9 !important;
        height: auto !important;
    }

    /* 4. CONTRÔLES VIDÉO */
    .custom-controls-container {
        position: relative !important;
        width: 100% !important;
        background: var(--bg-card) !important;
        padding: 20px 15px !important;
        z-index: 10;
        border-bottom: 1px solid var(--border-color);
        margin-top: -5px;
    }

    body.light-mode .play-btn, 
    body.light-mode .time-display {
        color: var(--text-main) !important;
    }

    body.light-mode .progress-bar {
        background: rgba(0, 0, 0, 0.2) !important;
    }

    /* 5. CHAPITRAGE MOBILE */
    .overlay-chapters {
        display: block !important;
        position: relative !important;
        width: 100% !important;
        right: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        background: var(--bg-body) !important;
        border-left: none !important;
        z-index: 100;
    }

    .mobile-chap-btn {
        display: block !important;
        width: 100% !important;
        background: var(--accent) !important;
        color: #000 !important;
        padding: 15px;
        font-weight: bold;
        text-transform: uppercase;
        border: none;
    }

    .chapter-list-wrapper {
        display: none;
        background: var(--bg-card) !important;
        width: 100% !important;
    }

    .chapter-list-wrapper.show {
        display: block !important;
    }

    .chapter-list-wrapper ul li {
        padding: 15px !important;
        border-bottom: 1px solid var(--border-color);
        color: var(--text-main) !important;
        text-align: center !important;
    }

    /* 6. BENTO GRID MOBILE */
    .bento-grid { 
        grid-template-columns: 1fr !important; 
        gap: 15px !important; 
    }
    .span-1, .span-2, .span-3 { grid-column: auto !important; }
}

/* --- MOBILE PAYSAGE --- */
@media (max-height: 500px) and (orientation: landscape) {
    nav { display: none !important; }
    .video-wrapper { height: 100vh !important; }
    .custom-controls-container { position: absolute !important; bottom: 0; background: rgba(0,0,0,0.8) !important; }
    .overlay-chapters { display: none !important; }
}