/* --- VARIABLES & BASE --- */
:root {
    --brand-red: #A62D17;
    --white: #ffffff;
    --black: #000000;
    --bg-page: #F5F5DC;
    --nav-bg-box: #052b1e;
}

[data-theme="dark"] {
    --bg-page: #000000;
    --nav-bg-box: var(--brand-red);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { 
    font-family: 'Unbounded', sans-serif; 
    background-color: var(--bg-page); 
    color: white;
    overflow: hidden; 
    scroll-behavior: smooth; 
    transition: background-color 0.8s ease;
}

/* --- UI ELEMENTS (Header, Footer, Theme) --- */
#theme-toggle {
    position: fixed; top: 40px; right: 40px; z-index: 20000;
    background: none; border: 2px solid var(--brand-red); color: var(--brand-red);
    padding: 8px 15px; font-family: 'Unbounded'; font-weight: 900; font-size: 0.7rem;
    cursor: pointer; text-transform: uppercase; border-radius: 50px;
    transition: all 0.3s ease;
}
#theme-toggle:hover { background: var(--brand-red); color: var(--bg-page); }

#logo-link {
    position: fixed; top: 40px; left: 40px; width: 50px; z-index: 10001;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
#logo-link:hover { transform: scale(1.1) rotate(-5deg); }
#master-icon { width: 50px; display: block; }

#main-header { 
    position: fixed; top: 55px; left: 40px; width: calc(100% - 80px);
    z-index: 10000; display: flex; align-items: center;
    pointer-events: none; transition: opacity 0.4s ease;
}
.header-text { margin-left: 65px; font-weight: 900; text-transform: uppercase; font-size: 0.9rem; color: var(--brand-red); }

#main-footer {
    position: fixed; bottom: 25px; left: 0; width: 100%;
    display: flex; justify-content: center; gap: 60px;
    z-index: 10000; transition: opacity 0.4s ease;
}
.nav-link { color: var(--brand-red); text-decoration: none; font-size: 1.3rem; font-weight: 900; text-transform: uppercase; position: relative; }
.nav-link::after { content: ''; position: absolute; width: 0; height: 4px; bottom: -5px; left: 0; background-color: var(--brand-red); transition: width 0.3s ease; }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

/* --- FILTRES --- */
.filter-menu { position: fixed; top: 110px; left: 105px; z-index: 1000; display: flex; gap: 25px; transition: opacity 0.4s ease; }
.filter-btn { background: none; border: none; color: rgba(255, 255, 255, 0.4); font-family: 'Unbounded'; font-weight: 400; font-size: 0.7rem; text-transform: uppercase; cursor: pointer; transition: all 0.3s ease; border-bottom: 2px solid transparent; padding-bottom: 4px; }
.filter-btn.active { color: var(--white); border-bottom: 2px solid var(--brand-red); }

.ui-hidden { opacity: 0 !important; visibility: hidden; pointer-events: none; }

/* --- VIEWPORT & SECTIONS --- */
.viewport { height: 100vh; width: 100vw; overflow-y: scroll; scroll-snap-type: y mandatory; scrollbar-width: none; }
.viewport::-webkit-scrollbar { display: none; }

section { 
    position: relative; height: 100vh; width: 100vw; 
    scroll-snap-align: start; display: flex; 
    align-items: center; justify-content: center; overflow: hidden; 
}

.bg-title { 
    position: absolute; inset: 0; z-index: 1; pointer-events: none; 
    display: flex; flex-direction: column; align-items: center; justify-content: center; 
    line-height: 0.75; opacity: 0; transition: transform 1.2s cubic-bezier(0.2, 1, 0.3, 1), opacity 1s ease; 
    transform: scale(0.9) translateY(60px); 
}
section.is-visible .bg-title { opacity: 0.8; transform: scale(1) translateY(0); }

h1 { margin: 0; font-size: 22vw; text-transform: uppercase; letter-spacing: -0.05em; display: flex; flex-direction: column; align-items: center; }
h1 span { display: block; text-align: center; }

.content-wrapper { 
    position: relative; z-index: 10; display: flex; align-items: center; justify-content: center;
    transition: transform 1s cubic-bezier(0.2, 1, 0.3, 1), opacity 1s ease; 
    transform: translateY(60px); opacity: 0;
}
section.is-visible .content-wrapper { transform: translateY(0); opacity: 1; }

/* --- CONTAINERS (Posters & Vidéos) --- */
.poster-container { 
    height: 70vh; aspect-ratio: 21 / 29.7; border: 4px solid currentColor; 
    background-color: #000; cursor: pointer; transition: transform 0.6s ease; 
    box-shadow: 0 40px 100px rgba(0,0,0,0.8); 
}
.video-format { height: 50vh; aspect-ratio: 16 / 9; }

.poster-container img, .poster-container video { 
    width: 100%; height: 100%; object-fit: cover; display: block;
}

/* --- BOUTONS LATERAUX & HOVERS (Fix Noir) --- */
.btn-side { 
    position: absolute; right: -80px; writing-mode: vertical-rl; 
    padding: 30px 15px; background: transparent; border: 2px solid currentColor; 
    color: currentColor; font-family: 'Unbounded'; font-weight: 900; 
    font-size: 0.9rem; text-transform: uppercase; cursor: pointer; 
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
    transform: rotate(180deg); 
}

.btn-side:hover {
    background-color: white !important;
    color: black !important;
    border-color: white !important;
    transform: rotate(180deg) scale(1.1);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.5);
}

/* --- TOUTES LES COULEURS DE SECTIONS --- */
.st { background: radial-gradient(circle, #2b0000 0%, #000000 100%); color: #ff0000; }
.sv { background: radial-gradient(circle, #1a0033 0%, #000000 100%); color: #8a2be2; }
.Frankenstein{ background: radial-gradient(circle, #1a1a1a 0%, #000000 100%); color: #d1d1d1; }
.Superman { background: radial-gradient(circle, #09377c 0%, #000000 100%); color: #df080f; }
.TLW { background: radial-gradient(circle, #800404 0%, #020202 100%); color: #ffffff; }
.mib { background: radial-gradient(circle, #1a1a1a 0%, #000000 100%); color: #ffffff; }

.video-tg { background: radial-gradient(circle, #d16d0f 0%, #000000 100%); color: #2ce3e9; } /* Top Gun */
.video-foret { background: radial-gradient(circle, #0f460d 0%, #000000 100%); color: #61341a; } /* Forêt */

.motion1 { background: radial-gradient(circle, #8a0000 0%, #5c1d1d 100%); color: #000000; }
.motion2 { background: radial-gradient(circle, #2d0edd 0%, #050505 100%); color: #ffffff; }

.logo-sec1 { background: radial-gradient(circle, #e62867 0%, #000000 100%); color: #f83375; }
.logo-sec2 { background: radial-gradient(circle, #ecda75 0%, #000000 100%); color: #ffffff; }

/* --- LIGHTBOX --- */
#lightbox {
    position: fixed; inset: 0; background: rgba(0, 0, 0, 0.95); 
    backdrop-filter: blur(25px); z-index: 2000; display: none; 
    align-items: center; justify-content: center; cursor: pointer; 
    opacity: 0; transition: opacity 0.4s ease;
}
.modal-content { 
    display: flex; align-items: center; gap: 50px; 
    max-width: 1200px; width: 90%; cursor: default;
}
#media-container { flex: 1.5; display: flex; justify-content: center; align-items: center; }


.info-block { flex: 1; color: white; max-width: 400px; }
#info-title { font-weight: 900; text-transform: uppercase; margin-bottom: 15px; font-size: 2rem; }
#info-desc { line-height: 1.6; font-size: 1rem; opacity: 0.8; }

/* --- NAVIGATION LATERALE (DOTS) --- */
.nav-container { position: fixed; left: 40px; top: 50%; transform: translateY(-50%); z-index: 500; display: flex; flex-direction: column; gap: 20px;}
.nav-cursor { 
    position: absolute; left: 0; top: 0; width: 55px; height: 45px; 
    background: var(--nav-bg-box); border-radius: 4px; z-index: 1; 
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1); pointer-events: none; 
}
.nav-item { 
    position: relative; width: 55px; height: 45px; color: rgba(255, 255, 255, 0.3); 
    font-weight: 900; font-size: 0.9rem; display: flex; align-items: center; 
    justify-content: center; z-index: 2; cursor: pointer; transition: color 0.3s;
}
.nav-item.active { color: var(--white); }





























@media (max-width: 1024px) {
    /* 1. BLOCAGE DU REBOND GLOBAL */
    html, body {
        position: fixed !important;
        overflow: hidden !important;
        width: 100% !important;
        height: 100% !important;
        touch-action: none !important;
    }

    /* 2. UI : HEADER, LOGO ET THEME */
    #logo-link { top: 20px !important; left: 20px !important; width: 35px !important; }
    #master-icon { width: 35px !important; }
    
    #main-header { top: 32px !important; left: 20px !important; width: auto !important; }
    .header-text { margin-left: 48px !important; font-size: 0.6rem !important; }

    #theme-toggle { 
        top: 20px !important; right: 20px !important; 
        padding: 6px 12px !important; font-size: 0.55rem !important; 
    }

    /* 3. FILTRES */
    .filter-menu { 
        top: 85px !important; left: 20px !important; 
        gap: 15px !important; width: calc(100% - 40px);
        overflow-x: auto; padding-bottom: 10px;
    }
    .filter-btn { font-size: 0.55rem !important; white-space: nowrap; }

    /* 4. NAVIGATION LATERALE (DOTS) */
    .nav-container { display: none !important; } /* Masqué pour éviter les clics fantômes */

    /* 5. VIEWPORT & SECTIONS (Scroll vertical uniquement) */
    .viewport {
        height: 100vh !important;
        width: 100vw !important;
        overflow-y: scroll !important;
        touch-action: pan-y !important;
        -webkit-overflow-scrolling: touch;
    }

    h1 { font-size: 28vw !important; } 

    /* 6. CONTAINERS (Posters & Vidéos) */
    .content-wrapper { 
        width: 90% !important; 
        flex-direction: column !important; 
        gap: 15px !important;
    }

    .poster-container { 
        height: 55vh !important; 
        border-width: 2px !important; 
        box-shadow: 0 20px 50px rgba(0,0,0,0.5) !important;
    }
    .video-format { height: 30vh !important; width: 90vw !important; }

    /* 7. BOUTON LATÉRAL (Voir Projet) */
    .btn-side {
        position: relative !important;
        right: auto !important;
        writing-mode: horizontal-tb !important; 
        transform: none !important;
        margin-top: 15px !important;
        padding: 12px 25px !important;
        font-size: 0.7rem !important;
        width: fit-content;
    }

    /* 8. LIGHTBOX (Correction déformation logos) */
    #lightbox { padding: 10px !important; }

    .modal-content {
        flex-direction: column !important;
        width: 95% !important;
        max-height: 90vh !important;
        gap: 15px !important;
    }

    #media-container {
        flex: 1 !important; 
        width: 100% !important;
        max-height: 50vh !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

 #media-container img, 
#media-container video {
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important; /* Laisse l'aspect ratio naturel */
    height: auto !important;
    object-fit: contain !important;
    padding: 10px; /* Réduit le padding pour gagner de la place */
}

    .info-block {
        flex: 0.8 !important;
        padding: -50 !important;
        text-align: center;
    }

    #info-title { font-size: 1.1rem !important; margin-top: 30px !important ;margin-bottom: 5px !important; }
    #info-desc { 
        font-size: 0.75rem !important; 
        max-height: 150px !important; 
        overflow-y: auto !important; 
    }

    /* 9. FOOTER */
    #main-footer { bottom: 15px !important; gap: 25px !important; }
    .nav-link { font-size: 0.8rem !important; }
}


