/* --- Variables & Reset --- */
:root {
    /* Palette */
    --bg-dark: #02010A;
    --bg-gradient: linear-gradient(135deg, #02010A 0%, #050816 50%, #0A0F1F 100%);
    --accent-red: #E50914;
    --accent-blue: #007AFF;
    --accent-green: #46d369;
    --text-white: #F5F5F7;
    --text-gray: #A1A1A6;

    /* Liquid Glass Variables (iOS 26 Concept) */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: 1px solid rgba(255, 255, 255, 0.12);
    --glass-border-highlight: 1px solid rgba(255, 255, 255, 0.3);
    --glass-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    --blur-strength: 25px;
    --radius-l: 24px;
    --radius-pill: 999px;
}

/* --- SCROLLBAR HIDING (Requested) --- */
::-webkit-scrollbar {
    width: 0px;
    background: transparent;
}

html, body {
    scrollbar-width: none; /* Firefox */
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg-dark);
    color: var(--text-white);
    overflow-x: hidden;
    min-height: 100vh;
}

/* --- Intro Animation Container --- */
#intro-container {
    position: absolute; /* Fixed scroll behavior changed to absolute */
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #000000;
    z-index: 99999;
    opacity: 1;
    transition: opacity 1s ease-out;
    overflow: hidden;
}

/* --- Ambient Background --- */
.ambient-background {
    position: absolute; /* Fixed scroll behavior changed to absolute */
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--bg-gradient);
    z-index: -2;
}

.ambient-background::before {
    content: '';
    position: absolute;
    top: -20%; left: -10%;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(0, 122, 255, 0.15) 0%, transparent 70%);
    filter: blur(80px);
    z-index: -1;
    animation: floatBlob 20s infinite alternate;
}

.ambient-background::after {
    content: '';
    position: absolute;
    bottom: -20%; right: -10%;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(229, 9, 20, 0.1) 0%, transparent 70%);
    filter: blur(80px);
    z-index: -1;
    animation: floatBlobReverse 25s infinite alternate;
}

@keyframes floatBlob {
    0% { transform: translate(0, 0); }
    100% { transform: translate(100px, 50px); }
}

@keyframes floatBlobReverse {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-80px, -40px); }
}

/* --- Utility Classes : Liquid Glass --- */
.liquid-glass {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur-strength));
    -webkit-backdrop-filter: blur(var(--blur-strength));
    border: var(--glass-border);
    border-top: var(--glass-border-highlight);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.liquid-glass-inset {
    background: rgba(0, 0, 0, 0.2);
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.05);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
}

.liquid-glass-card {
    background: linear-gradient(145deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.01) 100%);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: var(--glass-border);
    border-radius: var(--radius-l);
    box-shadow: var(--glass-shadow);
    position: relative;
    overflow: hidden;
}

.liquid-glass-card::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 50%; height: 100%;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.05), transparent);
    transform: skewX(-25deg);
    transition: 0.5s;
    pointer-events: none;
}
.liquid-glass-card:hover::before {
    left: 150%;
    transition: 0.7s;
}

.hidden { display: none !important; }

/* =========================================
   NOUVELLE NAVIGATION (SIDEBAR)
   ========================================= */

/* Hamburger Button */
#hamburger-btn {
    position: fixed;
    top: 25px;
    left: 25px;
    z-index: 2000;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
#hamburger-btn:hover {
    background: var(--accent-red);
    border-color: var(--accent-red);
    transform: scale(1.1);
}

/* Sidebar Overlay */
#sidebar-overlay {
    position: fixed;
    inset: 0; /* top, right, bottom, left = 0 */
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 2001; /* Above hamburger, below sidebar */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
#sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Sidebar Container */
#main-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px; /* Largeur de la sidebar */
    height: 100vh;
    background: rgba(5, 5, 10, 0.85); /* Fond très sombre mais transparent */
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 2002;
    transform: translateX(-100%); /* Cachée par défaut */
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); /* Slide fluide */
    display: flex;
    flex-direction: column;
    padding: 30px 20px;
    box-shadow: 10px 0 30px rgba(0,0,0,0.5);
}

#main-sidebar.active {
    transform: translateX(0); /* Visible */
}

/* Sidebar Header (Logo + Close) */
.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.logo-text {
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -1px;
    text-shadow: 0 0 20px rgba(229, 9, 20, 0.5);
    cursor: pointer;
}
.accent { color: var(--accent-red); }

#close-sidebar-btn {
    background: transparent;
    border: none;
    color: var(--text-gray);
    font-size: 1.2rem;
    cursor: pointer;
    transition: 0.3s;
    width: 35px; height: 35px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
}
#close-sidebar-btn:hover {
    color: white;
    background: rgba(255,255,255,0.1);
}

/* Sidebar Links */
.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1; /* Prend l'espace disponible */
    overflow-y: auto;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--text-gray);
    text-decoration: none;
    padding: 14px 15px;
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.sidebar-link i {
    width: 24px;
    text-align: center;
    font-size: 1.1rem;
    transition: 0.2s;
}

.sidebar-link:hover, .sidebar-link.active {
    background: rgba(229, 9, 20, 0.15);
    color: white;
    border-color: rgba(229, 9, 20, 0.3);
}

.sidebar-link:hover i {
    color: var(--accent-red);
    transform: scale(1.1);
}

/* Sidebar Footer (Search + Profile) */
.sidebar-footer {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sidebar-search {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-radius: 12px;
    gap: 10px;
    transition: 0.3s;
}
.sidebar-search i { color: var(--text-gray); font-size: 0.9rem; }
.sidebar-search input {
    background: transparent;
    border: none;
    outline: none;
    color: white;
    width: 100%;
    font-family: inherit;
    font-size: 0.9rem;
}
.sidebar-search:focus-within {
    border-color: var(--accent-blue);
    background: rgba(0,0,0,0.4);
}

.mb-10 { margin-bottom: 10px; }

.user-profile-sidebar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 12px;
    cursor: pointer;
    transition: 0.3s;
}
.user-profile-sidebar:hover { background: rgba(255,255,255,0.1); }
.user-profile-sidebar img {
    width: 40px; height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.2);
}
.user-info { display: flex; flex-direction: column; }
.username { font-weight: 600; font-size: 0.9rem; color: white; }
.user-status { font-size: 0.75rem; color: #2ecc71; display: flex; align-items: center; gap: 4px; }

/* --- FIN NOUVELLE NAVIGATION --- */

/* --- Hero Section --- */
#hero-section {
    position: relative; /* Normal flow, NOT fixed */
    height: 85vh;
    width: 100%;
    display: flex;
    align-items: center;
    padding-left: 4%;
    overflow: hidden; /* Ensures bg image stays inside */
    z-index: 1; /* Context */
}

/* CORRECTION SCROLL HERO : Absolute + Scroll + No Transform */
#hero-bg, .hero-bg-image {
    position: absolute !important; /* Relative to #hero-section, NOT fixed */
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-attachment: scroll !important; /* Forces normal scrolling, no parallax/fixed effect */
    z-index: -1;
    transform: none !important; /* CRITIQUE : Désactive le parallax JS */
    transition: opacity 0.5s ease-in-out; /* Pas de transition sur transform pour éviter lag */
}

/* Fallback image initiale si JS pas chargé */
.hero-bg-image {
    background: url('https://images.unsplash.com/photo-1536440136628-849c177e76a1?q=80&w=2525&auto=format&fit=crop');
}

.hero-overlay-gradient {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to right, #02010A 10%, rgba(2,1,10,0.6) 60%, transparent 100%),
                linear-gradient(to top, #02010A 0%, transparent 40%);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 650px;
    padding: 50px;
    margin-top: 60px;
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
}

.hero-fade-out {
    opacity: 0;
    transform: scale(0.98);
}
#hero-bg.hero-fade-out {
    opacity: 0;
    /* Transformation annulée par !important dans #hero-bg, on garde juste l'opacité */
}

.hero-tag {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--accent-red);
    text-transform: uppercase;
    margin-bottom: 15px;
    display: block;
    text-shadow: 0 0 10px rgba(229, 9, 20, 0.4);
}

#hero-title {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    background: linear-gradient(to bottom right, #fff, #a1a1a6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.5));
}

.hero-description {
    font-size: 1.1rem;
    line-height: 1.6;
    color: rgba(255,255,255,0.9);
    margin-bottom: 30px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    max-width: 90%;
}

/* =========================================
   STYLE PRIME VIDEO - BANDES ANNONCES
   ========================================= */

.trailers-prime-block {
    padding: 40px 4%;
    margin-top: 20px;
    margin-bottom: 40px;
    position: relative;
    z-index: 10;
}

.trailers-hero-layout {
    display: flex;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    overflow: hidden;
    height: 500px;
    margin-bottom: 20px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.5);
}

.trailers-hero-text {
    flex: 1;
    padding: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(to right, rgba(2,1,10,0.8) 0%, transparent 100%);
}

.trailers-rank-badge {
    color: var(--accent-green);
    font-weight: 800;
    font-size: 0.9rem;
    text-transform: uppercase;
    margin-bottom: 15px;
    display: block;
    letter-spacing: 1px;
}

.trailers-hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 20px;
    cursor: pointer;
    transition: color 0.3s;
}

.trailers-hero-badges {
    display: flex;
    gap: 12px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.badge-prime {
    background: var(--accent-blue);
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.75rem;
}

.badge-age, .badge-quality {
    border: 1px solid rgba(255,255,255,0.4);
    color: var(--text-white);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-rating {
    color: #FFD700;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 5px;
}

.trailers-hero-desc {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.8);
    line-height: 1.5;
    margin-bottom: 35px;
    max-width: 90%;
}

.trailers-hero-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.trailers-hero-banner {
    flex: 1.2;
    position: relative;
    cursor: pointer;
}

.trailers-hero-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.banner-overlay-fade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, #02010A 0%, transparent 30%);
}

.trailers-hero-banner:hover img {
    transform: scale(1.05);
}

/* Rail mini vignettes */
.trailers-mini-carousel {
    padding: 10px 0;
}

.rail-mini {
    gap: 15px !important;
}

.trailers-mini-card {
    flex: 0 0 150px;
    height: 220px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    border: 3px solid transparent;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.trailers-mini-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
    transition: opacity 0.3s;
}

.trailers-mini-card.active {
    border-color: var(--accent-blue);
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 122, 255, 0.4);
}

.trailers-mini-card.active img, .trailers-mini-card:hover img {
    opacity: 1;
}

.card-progress {
    position: absolute;
    bottom: 0; left: 0; width: 0;
    height: 4px;
    background: var(--accent-blue);
    transition: width 0.3s ease;
}
.trailers-mini-card.active .card-progress {
    width: 100%;
}

/* Media Queries Trailers */
@media (max-width: 1024px) {
    .trailers-hero-layout {
        flex-direction: column-reverse;
        height: auto;
    }
    .trailers-hero-text {
        padding: 30px;
    }
    .trailers-hero-banner {
        height: 300px;
    }
    .trailers-hero-title {
        font-size: 2.2rem;
    }
}

/* =========================================
   SPOTLIGHT SECTION (NEW - ISO 26 STYLE)
   ========================================= */

.spotlight-container {
    margin: 40px 4%;
    height: 550px;
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: 280px 1fr;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 30px 60px rgba(0,0,0,0.6);
    background: #000;
}

/* Left Sidebar (Playlist) */
.spotlight-sidebar {
    background: rgba(5, 8, 20, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    padding: 20px;
    z-index: 2;
    overflow-y: auto;
    gap: 15px;
}

.spotlight-header-text {
    font-family: 'Brush Script MT', cursive; /* Fallback for script font */
    font-size: 2.5rem;
    color: rgba(255,255,255,0.1);
    position: absolute;
    top: -20px;
    left: 20px;
    pointer-events: none;
    z-index: 0;
    white-space: nowrap;
}

.spotlight-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    height: 140px;
    border: 2px solid transparent;
    opacity: 0.6;
}

.spotlight-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.spotlight-item-overlay {
    position: absolute;
    bottom: 0; left: 0; width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    padding: 10px;
    transform: translateY(100%);
    transition: transform 0.3s;
}

.spotlight-item-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: white;
}

.spotlight-item:hover {
    opacity: 1;
    transform: scale(1.02);
}

.spotlight-item:hover .spotlight-item-overlay {
    transform: translateY(0);
}

.spotlight-item.active {
    opacity: 1;
    border-color: var(--accent-red);
    box-shadow: 0 0 20px rgba(229, 9, 20, 0.4);
    transform: scale(1.05);
    z-index: 2;
}

/* Right Content (Preview) */
.spotlight-content {
    position: relative;
    display: flex;
    align-items: center;
    padding: 60px;
}

.spotlight-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    transition: opacity 0.5s ease-in-out;
    opacity: 0.5; /* Darken bg image */
}

/* Gradient Overlay for Text Readability */
.spotlight-gradient {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to right, #000 0%, rgba(0,0,0,0.6) 40%, transparent 100%);
    z-index: 1;
}

.spotlight-info {
    position: relative;
    z-index: 2;
    max-width: 600px;
    animation: slideInRight 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

.spotlight-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 15px;
    text-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.spotlight-meta {
    font-size: 1rem;
    color: rgba(255,255,255,0.8);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.spotlight-desc {
    font-size: 1rem;
    line-height: 1.6;
    color: rgba(255,255,255,0.7);
    margin-bottom: 30px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.spotlight-btn {
    background: var(--accent-red);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 4px; /* More rectangular like the image */
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.spotlight-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(229, 9, 20, 0.4);
}

/* Mobile Responsive for Spotlight */
@media (max-width: 900px) {
    .spotlight-container {
        grid-template-columns: 1fr;
        height: auto;
        min-height: 700px;
    }
    
    .spotlight-sidebar {
        flex-direction: row;
        overflow-x: auto;
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        order: 2; /* Sidebar at bottom on mobile */
        padding: 15px;
    }
    
    .spotlight-item {
        flex: 0 0 120px;
        height: 180px;
    }
    
    .spotlight-content {
        order: 1;
        padding: 40px 20px;
        min-height: 400px;
    }
    
    .spotlight-gradient {
        background: linear-gradient(to top, #000 0%, transparent 100%);
    }
    
    .spotlight-title {
        font-size: 2.5rem;
    }
}

/* --- Boutons --- */
.btn {
    padding: 14px 35px;
    border: none;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    font-family: inherit;
    white-space: nowrap;
}

.btn-primary {
    background: var(--text-white);
    color: black;
    box-shadow: 0 0 20px rgba(255,255,255,0.2);
}
.btn-primary:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 10px 30px rgba(255,255,255,0.4);
    background: #fff;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    color: white;
    border: 1px solid rgba(255,255,255,0.2);
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-3px);
    border-color: rgba(255,255,255,0.4);
}
.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}
.btn-circle {
    width: 45px; height: 45px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    cursor: pointer;
    font-size: 1.2rem;
    transition: 0.3s;
}
.btn-circle:hover { background: rgba(255,255,255,0.2); transform: scale(1.1); }

/* --- Carrousels --- */
.content-padding {
    padding: 20px 0 60px 4%;
    position: relative;
    z-index: 5;
    margin-top: -50px;
}

.category-section {
    margin-bottom: 50px;
    position: relative;
}

.category-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 20px;
    padding-left: 15px;
    border-left: 3px solid var(--accent-blue);
    display: inline-block;
    text-shadow: 0 0 20px rgba(0, 122, 255, 0.3);
    color: var(--text-white);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.carousel-container {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 20px 0;
    gap: 20px;
    scrollbar-width: none;
    scroll-behavior: smooth;
    width: 100%;
    -webkit-overflow-scrolling: touch;
}
.carousel-container::-webkit-scrollbar { display: none; }

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    opacity: 0;
    pointer-events: none;
}

.carousel-wrapper:hover .carousel-btn {
    opacity: 1;
    pointer-events: auto;
}

.carousel-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
    border-color: rgba(255,255,255,0.4);
}

.prev-btn { left: 10px; }
.next-btn { right: 10px; }

/* Movie Card */
.movie-card {
    flex: 0 0 240px;
    height: 360px;
    border-radius: 16px;
    position: relative;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    scroll-snap-align: start;
    overflow: hidden;
    background: #111;
}

/* Landscape Cards (Action & Animation Genre) - REFINED */
.movie-card.landscape {
    flex: 0 0 300px; /* Reduced slightly for standard 16:9 ratio in list */
    height: 169px;   /* 300 * 9 / 16 approx */
    border-radius: 8px; /* Slightly sharper radius for landscape UI */
}

.movie-card img {
    width: 100%; height: 100%;
    object-fit: cover;
    border-radius: 16px;
    transition: transform 0.5s ease;
}

/* Special styling for landscape image radius */
.movie-card.landscape img {
    border-radius: 8px;
}

.card-overlay {
    position: absolute;
    bottom: 0; left: 0; width: 100%;
    padding: 20px 15px;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    transform: translateY(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

/* Adjusted Overlay for Landscape */
.movie-card.landscape .card-overlay {
    padding: 15px;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.5) 60%, transparent 100%);
}

.movie-card:hover {
    transform: scale(1.05) translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
    z-index: 10;
    border: 1px solid rgba(255,255,255,0.3);
}

.movie-card:hover img { filter: brightness(0.6); }
.movie-card:hover .card-overlay { transform: translateY(0); }

.card-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: white;
}

/* Smaller title for landscape */
.movie-card.landscape .card-title {
    font-size: 0.95rem;
}

.card-meta {
    font-size: 0.8rem;
    color: #ccc;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.genre-badge {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(229, 9, 20, 0.2);
  border: 1px solid rgba(229, 9, 20, 0.4);
  border-radius: 20px;
  font-size: 11px;
  color: #ff4757;
  font-weight: 600;
  text-transform: uppercase;
  margin-right: 8px;
  letter-spacing: 0.5px;
}

.card-play-btn {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.2s, color 0.2s;
    padding: 0;
    display: flex;
    align-items: center;
}
.card-play-btn:hover {
    color: var(--accent-red);
    transform: scale(1.2);
}

/* Glass Tooltip */
.glass-tooltip {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    opacity: 0;
    transform: translateY(-10px) scale(0.9);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 15;
    pointer-events: none;
}
.movie-card:hover .glass-tooltip {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.tooltip-year { color: rgba(255, 255, 255, 0.9); }
.tooltip-sep { color: rgba(255, 255, 255, 0.3); font-size: 0.7rem; }
.text-yellow { color: #FFD700; margin-right: 4px; }
.dimmed { opacity: 0.1; pointer-events: none; filter: grayscale(100%); }

/* --- Modals / Overlays --- */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(15px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity 0.3s;
    padding: 20px;
}

.modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    width: 90%;
    max-width: 500px;
    padding: 40px;
    position: relative;
    animation: modalPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-height: 90vh;
    overflow-y: auto;
}
.modal-content h2 { margin-bottom: 10px; }
.modal-content p { color: var(--text-gray); margin-bottom: 25px; line-height: 1.5; }

@keyframes modalPop {
    from { transform: scale(0.9) translateY(40px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

.close-modal {
    position: absolute;
    top: 20px; right: 20px;
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    width: 30px; height: 30px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 5;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
}
.close-modal:hover { background: rgba(255,255,255,0.3); }

/* --- Detail Overlay --- */
.detail-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 3000;
    overflow-y: auto;
    background: var(--bg-dark);
    opacity: 1;
    transition: opacity 0.3s;
    -webkit-overflow-scrolling: touch;
}
.detail-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.detail-backdrop {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 70vh;
    background-size: cover;
    background-position: center;
    z-index: -1;
    opacity: 0.5;
    mask-image: linear-gradient(to bottom, black 0%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 0%, transparent 100%);
}

.detail-gradient {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to top, var(--bg-dark) 20%, transparent 100%);
    z-index: -1;
    pointer-events: none;
}

.detail-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 100px 4% 60px 4%;
    position: relative;
    z-index: 10;
}

.close-detail-btn {
    position: fixed;
    top: 24px; left: 24px;
    padding: 12px 24px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 30px;
    color: white;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    z-index: 3001;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    white-space: nowrap;
    min-width: fit-content;
}
.close-detail-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(-3px);
}
.close-detail-btn::before { content: none; }

.detail-header {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 50px;
    margin-bottom: 60px;
}

.detail-poster-wrapper {
    height: 450px;
    border-radius: 12px;
}
.detail-poster-wrapper img {
    width: 100%; height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.detail-meta-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#detail-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 15px;
    text-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.detail-badges {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.meta-badge {
    color: rgba(255,255,255,0.8);
    font-weight: 500;
}
.accent-badge {
    color: #46d369;
    font-weight: 700;
}

.genre-list {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.genre-tag {
    font-size: 0.9rem;
    color: var(--text-gray);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 4px 12px;
    border-radius: 20px;
}

#detail-overview {
    font-size: 1.1rem;
    line-height: 1.6;
    color: rgba(255,255,255,0.9);
    margin-bottom: 30px;
    max-width: 800px;
}

.detail-actions {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}
.like-actions {
    display: flex;
    gap: 10px;
}

.detail-tabs-nav {
    display: flex;
    gap: 20px;
    padding: 10px 20px;
    border-radius: var(--radius-pill);
    margin-bottom: 30px;
    width: fit-content;
}
.tab-btn {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.6);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 15px;
    transition: 0.3s;
    position: relative;
    white-space: nowrap;
}
.tab-btn:hover { color: white; }
.tab-btn.active { color: white; }
.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -5px; left: 50%;
    transform: translateX(-50%);
    width: 20px; height: 3px;
    background: var(--accent-red);
    border-radius: 2px;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.4s ease;
}
.tab-pane.active { display: block; }

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

.cast-layout {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}
.cast-card { text-align: center; }
.cast-img {
    width: 100px; height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;
    border: 2px solid rgba(255,255,255,0.1);
}
.cast-name { font-weight: 600; font-size: 0.95rem; margin-bottom: 2px; }
.cast-role { font-size: 0.85rem; color: var(--text-gray); }

.grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
}

/* Trailers */
.trailer-card {
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: transform 0.3s;
}
.trailer-card:hover { transform: scale(1.03); }
.trailer-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
}
.trailer-info { padding: 10px; }
.trailer-title { font-size: 0.9rem; font-weight: 600; }
.trailer-type { font-size: 0.8rem; color: var(--text-gray); text-transform: uppercase; margin-top: 5px; }

/* Form Styles */
.input-group { margin-bottom: 20px; }
.input-group label { display: block; margin-bottom: 8px; font-size: 0.9rem; color: var(--text-gray); }
.liquid-input {
    width: 100%;
    padding: 14px;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    color: white;
    outline: none;
    font-family: inherit;
    transition: 0.3s;
    margin-bottom: 10px;
}
.small-input { width: 100px; }
.liquid-input:focus {
    background: rgba(0,0,0,0.5);
    border-color: var(--accent-blue);
    box-shadow: 0 0 15px rgba(0,122,255,0.2);
}
.full-width { width: 100%; justify-content: center; }
textarea.liquid-input { resize: vertical; font-family: inherit; }

/* Trailer Modal */
.trailer-modal-content {
    width: 90%;
    max-width: 900px;
    background: transparent;
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.trailer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}
.close-trailer-btn {
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    width: 35px; height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: 0.2s;
}
.close-trailer-btn:hover { background: rgba(255,255,255,0.3); }

.iframe-container {
    width: 100%;
    aspect-ratio: 16/9;
    background: black;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    z-index: 2;
}

#modal-trailer-player { z-index: 3500 !important; }
#modal-player { z-index: 10000 !important; background: rgba(0,0,0,0.95); }

/* Player Modal */
.player-wrapper {
    width: 90%; height: 80%;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.video-placeholder {
    width: 100%; height: 100%;
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
    border: 1px solid rgba(255,255,255,0.1);
    background: black;
    position: relative;
    overflow: hidden;
}
.video-placeholder video { width: 100%; height: 100%; object-fit: contain; }

.close-player {
    align-self: flex-start;
    background: rgba(255,255,255,0.1);
    padding: 10px 20px;
    border-radius: 30px;
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    font-size: 0.9rem;
    margin-bottom: 15px;
    cursor: pointer;
    display: flex; align-items: center; gap: 8px;
    backdrop-filter: blur(10px);
    z-index: 10001;
}

/* Footer */
footer {
    padding: 40px 4%;
    margin-top: 50px;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.05);
}
.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.footer-links a { color: var(--text-gray); text-decoration: none; font-size: 0.9rem; transition: color 0.3s; }
.footer-links a:hover { color: white; }
.copyright { color: rgba(255,255,255,0.3); font-size: 0.8rem; }

/* Catalog Styles */
.catalog-container { padding: 100px 4% 40px; display: grid; grid-template-columns: 280px 1fr; gap: 30px; min-height: 100vh; }
.catalog-sidebar { padding: 25px; height: fit-content; position: sticky; top: 90px; }
.filter-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; padding-bottom: 15px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.btn-text { background: none; border: none; color: var(--accent-blue); cursor: pointer; font-size: 0.9rem; }
.filter-group { margin-bottom: 30px; }
.filter-group h4 { font-size: 0.9rem; color: var(--text-gray); text-transform: uppercase; margin-bottom: 15px; letter-spacing: 1px; }
.checkbox-list { display: flex; flex-direction: column; gap: 12px; }
.custom-checkbox { display: flex; align-items: center; gap: 12px; cursor: pointer; user-select: none; padding: 5px 0; transition: 0.2s; }
.custom-checkbox input { display: none; }
.checkmark { width: 20px; height: 20px; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); border-radius: 6px; position: relative; transition: all 0.2s; }
.custom-checkbox input:checked ~ .checkmark { background: var(--accent-red); border-color: var(--accent-red); box-shadow: 0 0 10px rgba(229, 9, 20, 0.4); }
.checkmark::after { content: ''; position: absolute; display: none; left: 6px; top: 2px; width: 5px; height: 10px; border: solid white; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.custom-checkbox input:checked ~ .checkmark::after { display: block; }
.filter-search { display: flex; align-items: center; padding: 8px 12px; border-radius: 8px; margin-bottom: 15px; }
.filter-search input { background: transparent; border: none; outline: none; color: white; width: 100%; font-size: 0.9rem; font-family: inherit; }
.scrollable-list { max-height: 250px; overflow-y: auto; padding-right: 5px; scrollbar-width: thin; }
.catalog-content { display: flex; flex-direction: column; gap: 20px; }
.catalog-header { display: flex; justify-content: space-between; align-items: center; padding: 20px 30px; flex-wrap: wrap; gap: 15px; }
.sort-buttons { display: flex; gap: 10px; }
.sort-btn { background: transparent; border: 1px solid rgba(255,255,255,0.1); color: var(--text-gray); padding: 6px 16px; border-radius: 20px; cursor: pointer; font-size: 0.9rem; transition: 0.2s; }
.sort-btn:hover, .sort-btn.active { background: rgba(255,255,255,0.1); color: white; border-color: rgba(255,255,255,0.3); }
.catalog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 25px; }

.catalog-grid .movie-card { flex: unset; width: 100%; height: 320px; }

/* Admin Styles */
.admin-container { max-width: 1000px; margin: 100px auto 40px; padding: 0 20px; position: relative; z-index: 10; }
.admin-header { display: flex; justify-content: space-between; align-items: center; padding: 25px 30px; margin-bottom: 30px; flex-wrap: wrap; gap: 20px; }
.admin-tabs { display: flex; gap: 10px; background: rgba(0, 0, 0, 0.2); padding: 5px; border-radius: var(--radius-pill); border: 1px solid rgba(255,255,255,0.05); }
.admin-tabs .tab-btn { border-radius: var(--radius-pill); padding: 8px 20px; font-size: 0.9rem; color: var(--text-gray); position: static; }
.admin-tabs .tab-btn:hover { color: white; background: rgba(255,255,255,0.05); }
.admin-tabs .tab-btn.active { background: rgba(255,255,255,0.15); color: white; backdrop-filter: blur(10px); }
.admin-tabs .tab-btn.active::after { display: none; }
.admin-section { padding: 30px; min-height: 200px; }
.search-wrapper { display: flex; gap: 15px; margin-bottom: 30px; flex-wrap: wrap; }
.search-wrapper .liquid-input { margin-bottom: 0; }
.admin-grid-results { display: flex; flex-direction: column; gap: 20px; }
.admin-movie-card-horizontal { display: flex; gap: 20px; padding: 20px; align-items: start; text-align: left; flex-wrap: wrap; }
.admin-movie-card-horizontal img { width: 120px; height: 180px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.movie-info { flex: 1; display: flex; flex-direction: column; gap: 10px; min-width: 200px; }
.movie-synopsis { font-size: 0.85rem; color: var(--text-gray); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 5px; }
.stream-link { font-size: 0.8rem; color: var(--accent-blue); word-break: break-all; }
.genre-select { width: 100%; padding: 10px; background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; color: white; outline: none; font-family: inherit; margin-bottom: 10px; }
.genre-select option { background: #02010A; color: white; }
.admin-list-container { display: flex; flex-direction: column; gap: 10px; }
.movie-item-admin { display: flex; align-items: center; justify-content: space-between; padding: 12px; background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.08); border-radius: 12px; transition: 0.2s; }
.movie-item-admin:hover { background: rgba(255,255,255,0.05); }
.movie-item-admin img { width: 50px; height: 75px; object-fit: cover; border-radius: 6px; margin-right: 15px; }
.movie-details { flex: 1; }
.movie-details h4 { font-size: 1rem; margin-bottom: 4px; }
.movie-details p { font-size: 0.8rem; color: var(--text-gray); }
.btn-danger { background: rgba(229, 9, 20, 0.2); color: #ff6b6b; border: 1px solid rgba(229, 9, 20, 0.3); padding: 8px 16px; border-radius: 8px; cursor: pointer; font-size: 0.9rem; transition: 0.2s; }
.btn-danger:hover { background: rgba(229, 9, 20, 0.8); color: white; }
.btn-edit { background: rgba(0, 122, 255, 0.2); color: #4dabf7; border: 1px solid rgba(0, 122, 255, 0.3); padding: 8px 16px; border-radius: 8px; cursor: pointer; font-size: 0.9rem; transition: 0.2s; }
.btn-edit:hover { background: rgba(0, 122, 255, 0.8); color: white; }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.setting-card { padding: 25px; }
.login-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(2, 1, 10, 0.95); backdrop-filter: blur(15px); display: flex; justify-content: center; align-items: center; z-index: 9999; opacity: 1; transition: opacity 0.3s ease; }
.login-overlay.hidden { opacity: 0; pointer-events: none; display: none; }
.login-box { width: 400px; padding: 40px; border: 1px solid rgba(255, 255, 255, 0.2); box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.9); }
.error-message { color: #ff4757; margin-top: 15px; font-size: 0.9rem; text-align: center; min-height: 20px; }

/* =========================================
   DASHBOARD STATS (NOUVEAU)
   ========================================= */

.dashboard-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.stat-card {
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
}

.stat-icon {
    width: 60px; height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
    color: var(--text-white);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.top-movies-table {
    width: 100%;
    border-collapse: collapse;
}

.top-movies-table tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.top-movies-table td {
    padding: 15px;
    vertical-align: middle;
}

.views-progress-bg {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    margin-top: 8px;
    overflow: hidden;
}

.views-progress-bar {
    height: 100%;
    background: var(--accent-blue);
    border-radius: 3px;
    box-shadow: 0 0 10px rgba(0, 122, 255, 0.5);
}

.fade-in-row {
    animation: fadeInRow 0.5s ease backwards;
}

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


/* =========================================
   WATCH PARTY STYLES
   ========================================= */

/* Icone sur Carte Film */
.wp-card-icon {
    position: absolute;
    top: 10px; right: 10px;
    width: 35px; height: 35px;
    border-radius: 50%;
    background: rgba(0, 122, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 122, 255, 0.4);
    display: flex; align-items: center; justify-content: center;
    color: white;
    font-size: 0.9rem;
    cursor: pointer;
    z-index: 20;
    opacity: 0;
    transform: translateY(-5px);
    transition: 0.3s;
}
.wp-card-icon:hover {
    background: var(--accent-blue);
    transform: scale(1.1) translateY(0) !important;
    box-shadow: 0 0 15px rgba(0, 122, 255, 0.6);
}
.movie-card:hover .wp-card-icon { opacity: 1; transform: translateY(0); }

/* Pages Watch Party */
.wp-container {
    padding: 100px 4% 40px;
    min-height: 100vh;
}
.wp-header {
    margin-bottom: 40px;
    display: flex; justify-content: space-between; align-items: flex-end;
}
.wp-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px;
}

/* Session Card */
.wp-session-card {
    padding: 20px;
    display: flex; gap: 15px; align-items: center;
    transition: 0.3s;
}
.wp-session-card:hover { transform: translateY(-3px); background: rgba(255,255,255,0.08); }
.wp-poster { width: 60px; height: 90px; object-fit: cover; border-radius: 8px; }
.wp-info { flex: 1; }
.wp-info h3 { font-size: 1rem; margin-bottom: 5px; }
.wp-host { font-size: 0.85rem; color: var(--text-gray); margin-bottom: 10px; }
.wp-badge { font-size: 0.75rem; padding: 2px 8px; border-radius: 10px; background: rgba(0, 255, 0, 0.1); color: #46d369; border: 1px solid rgba(0, 255, 0, 0.2); }

/* Room Layout */
.room-container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 20px;
    height: calc(100vh - 120px);
    margin-top: 20px;
    overflow: hidden; /* Desktop keeps hidden to use inner scrolling */
}

.room-player {
    border-radius: 16px;
    overflow: hidden;
    background: black;
    position: relative;
    display: flex; align-items: center; justify-content: center;
    height: 100%;
}
.room-player video { width: 100%; height: 100%; object-fit: contain; }

/* Sidebar Room */
.room-sidebar {
    display: flex; flex-direction: column;
    gap: 15px;
    height: 100%;
}
.participants-list {
    flex: 1;
    overflow-y: auto;
    max-height: 200px;
    padding: 15px;
}
.participant-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.05);
}
.p-name { font-weight: 500; font-size: 0.9rem; }
.p-badge { font-size: 0.7rem; padding: 2px 6px; background: var(--accent-red); border-radius: 4px; }
/* Ban Button Styles */
.ban-btn {
    background: transparent;
    border: 1px solid rgba(229, 9, 20, 0.4);
    color: var(--accent-red);
    border-radius: 50%;
    width: 24px; height: 24px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.7rem;
    cursor: pointer;
    transition: 0.2s;
    margin-left: 10px;
}
.ban-btn:hover { background: rgba(229, 9, 20, 0.2); }


/* Chat */
.chat-box {
    flex: 2;
    display: flex; flex-direction: column;
    padding: 0;
    overflow: hidden;
}
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex; flex-direction: column; gap: 8px;
}
.chat-msg { font-size: 0.9rem; word-wrap: break-word; }
.chat-msg .user { color: var(--accent-blue); font-weight: 600; margin-right: 5px; }
.chat-msg.system { color: var(--text-gray); font-style: italic; font-size: 0.8rem; text-align: center; margin: 5px 0; }
.chat-input-area {
    padding: 10px;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex; gap: 10px;
}
.chat-input-area input { margin-bottom: 0; }

/* Block controls for guests */
.no-controls { pointer-events: none; }
.video-overlay-blocker {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    z-index: 10; cursor: default;
}

/* WP Movie Search Results (Modal) */
.wp-search-results {
    margin-top: 10px;
    max-height: 200px;
    overflow-y: auto;
    background: rgba(0,0,0,0.3);
    border-radius: 8px;
    padding: 10px;
    display: none;
}
.wp-search-results.active { display: block; }
.wp-search-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: background 0.2s;
}
.wp-search-item:hover { background: rgba(255,255,255,0.1); }
.wp-search-item img { width: 30px; height: 45px; object-fit: cover; border-radius: 4px; }
.wp-search-item span { font-size: 0.9rem; }

/* Admin Active Rooms Table */
.active-rooms-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}
.active-rooms-table th, .active-rooms-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.active-rooms-table th { color: var(--text-gray); font-weight: 500; font-size: 0.85rem; }
.active-rooms-table td { font-size: 0.9rem; }
.room-join-btn {
    background: rgba(0, 122, 255, 0.2);
    color: var(--accent-blue);
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s;
}
.room-join-btn:hover { background: rgba(0, 122, 255, 0.4); color: white; }

/* =========================================
   MEDIA QUERIES (TABLETS & MOBILE)
   ========================================= */

@media (max-width: 1024px) {
    /* Tablet Portrait & smaller Laptops */
    .catalog-container { padding-top: 80px; grid-template-columns: 1fr; }
    .catalog-sidebar { display: none; } /* Hide sidebar on tablets to save space */
    
    /* Room: Stack layout but allow scrolling */
    .room-container { 
        grid-template-columns: 1fr; 
        height: auto; 
        overflow: visible; 
        padding-bottom: 40px; 
        display: flex;
        flex-direction: column;
    }
    .room-player { 
        height: 50vh; 
        min-height: 300px;
        width: 100%;
    }
    .room-sidebar { 
        height: 500px; 
        width: 100%;
        margin-top: 20px;
    }
}

@media (max-width: 768px) {
    /* Mobile */
    /* Hamburger Adjustments */
    #hamburger-btn { top: 15px; left: 15px; width: 40px; height: 40px; font-size: 1rem; }

    #hero-title { font-size: 2.5rem; }
    .hero-content { padding: 20px; margin-top: 20px; width: 100%; }
    .hero-description { font-size: 1rem; }
    
    .content-padding { padding-left: 20px; padding-right: 20px; }
    
    /* Adjust Cards */
    .movie-card { flex: 0 0 160px; height: 240px; }
    .movie-card.landscape { flex: 0 0 240px; height: 135px; }

    .catalog-grid { grid-template-columns: repeat(2, 1fr); gap: 15px; }
    .catalog-grid .movie-card { height: 260px; }
    
    /* Detail View */
    .detail-header { grid-template-columns: 1fr; gap: 20px; }
    .detail-poster-wrapper { height: 350px; }
    #detail-title { font-size: 2rem; }
    .detail-container { padding-top: 80px; }
    
    /* Room Mobile */
    .room-player { height: 300px; }
    .room-sidebar { height: 400px; }
}

@media (max-width: 480px) {
    .catalog-grid { grid-template-columns: 1fr; }
    .admin-movie-card-horizontal { flex-direction: column; }
    .admin-movie-card-horizontal img { width: 100%; height: 250px; }
}

/* Touch Device Optimizations */
@media (hover: none) {
    /* Always show overlay partially or ensure tap works well */
    .card-overlay {
        transform: translateY(0);
        background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.6) 50%, transparent 100%);
    }
    .carousel-btn { opacity: 1; pointer-events: auto; background: rgba(0,0,0,0.3); }
    .glass-tooltip { display: none; } /* Hide tooltip on touch to avoid sticky stuck */
}

/* =========================================
   ISO 26 CUSTOM VIDEO PLAYER STYLES
   ========================================= */

.iso-player-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000;
    border-radius: var(--radius-l);
    font-family: 'Inter', monospace;
}

/* Control Bar Floating Glass */
.iso-controls {
    position: absolute;
    bottom: 25px;
    left: 25px;
    right: 25px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 50;
    pointer-events: auto;
}

/* Show controls on hover or active */
.iso-player-wrapper:hover .iso-controls,
.iso-controls.active {
    opacity: 1;
    transform: translateY(0);
}

.iso-controls-hidden {
    opacity: 0 !important;
    transform: translateY(20px) !important;
    pointer-events: none;
}

/* Progress Bar 3D */
.iso-progress-container {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.5);
    transition: height 0.2s;
}

.iso-progress-container:hover {
    height: 12px;
}

.iso-progress-filled {
    height: 100%;
    width: 0%;
    background: var(--accent-red);
    border-radius: 4px;
    position: relative;
    box-shadow: 0 0 12px var(--accent-red); /* Neon glow */
    transition: width 0.1s linear;
}

/* Prism Thumb */
.iso-progress-thumb {
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    width: 14px;
    height: 14px;
    background: #fff;
    box-shadow: 0 0 10px rgba(255,255,255,0.8), 0 0 20px var(--accent-red);
    z-index: 2;
    pointer-events: none;
    transition: transform 0.2s;
}

.iso-progress-container:hover .iso-progress-thumb {
    transform: translateY(-50%) rotate(225deg) scale(1.2);
}

/* Controls Row */
.iso-controls-row {
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: space-between;
}

/* Isometric 3D Buttons */
.iso-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    position: relative;
    /* Isometric Shadow Effect */
    box-shadow: 
        3px 3px 0px rgba(0,0,0,0.3),
        inset 1px 1px 0px rgba(255,255,255,0.1);
    transition: all 0.1s ease;
}

.iso-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.iso-btn:active {
    transform: translate(3px, 3px);
    box-shadow: 0px 0px 0px rgba(0,0,0,0.3);
}

.iso-timer {
    font-family: 'Menlo', 'Consolas', 'Courier New', monospace;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 1px;
    text-shadow: 0 0 5px rgba(0,0,0,0.5);
    min-width: 120px;
    text-align: center;
}

/* Volume Slider */
.iso-volume-container {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 120px;
}
.iso-volume-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}
.iso-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 5px rgba(0,0,0,0.5);
}

.iso-spacer { flex: 1; }

/* --- TOAST NOTIFICATION (NEW) --- */
.player-toast {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 25px 40px;
    border-radius: 24px;
    color: white;
    font-size: 1.5rem;
    display: flex; flex-direction: column; align-items: center; gap: 15px;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    pointer-events: none;
    z-index: 60;
    border: 1px solid rgba(255,255,255,0.15);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.player-toast.visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

.player-toast i {
    font-size: 2.5rem;
    color: var(--text-white);
    text-shadow: 0 0 15px rgba(255,255,255,0.3);
}

.player-toast span {
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 1px;
}

/* =========================================
   MAINTENANCE MODE STYLES
   ========================================= */

/* Body Lock */
.maintenance-body {
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    background: #000;
}

/* 1. Marquee Background */
#bg-marquee {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 1;
    opacity: 0.4;
    transform: rotate(-5deg) scale(1.1);
}

.marquee-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.marquee-row {
    display: flex;
    gap: 20px;
    width: 200%;
    animation: scrollMarquee 40s linear infinite;
}

.marquee-row.reverse {
    animation: scrollMarqueeReverse 45s linear infinite;
    transform: translateX(-50%);
}

.marquee-row img {
    width: 200px;
    height: 300px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    opacity: 0.7;
    filter: grayscale(40%);
}

.marquee-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(2, 1, 10, 0.85);
    backdrop-filter: blur(8px);
    z-index: 2;
}

@keyframes scrollMarquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes scrollMarqueeReverse {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(0); }
}

/* 2. ISO 26 3D Scene */
.iso-scene {
    position: relative;
    z-index: 10;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1200px;
}

.iso-card {
    width: 90%;
    max-width: 500px;
    padding: 40px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(25px);
    border-radius: 30px;
    box-shadow: 
        20px 20px 50px rgba(0,0,0,0.5),
        -5px -5px 30px rgba(255,255,255,0.02);
    transform-style: preserve-3d;
    transform: rotateX(10deg) rotateY(-10deg);
    transition: transform 0.1s ease-out;
    text-align: center;
}

/* Elements inside card */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 15px;
}

.neon-logo {
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: -1px;
}

.status-badge {
    background: rgba(229, 9, 20, 0.1);
    color: var(--accent-red);
    border: 1px solid rgba(229, 9, 20, 0.3);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
    box-shadow: 0 0 10px rgba(229, 9, 20, 0.2);
}

.neon-title {
    font-size: 2.5rem;
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 30px;
    background: linear-gradient(to right, #fff, #ccc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(255,255,255,0.3);
}

/* Countdown */
.countdown-grid {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
}

.time-box {
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 10px;
    border-radius: 12px;
    min-width: 60px;
}

.time-box span {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-blue);
}

.time-box label {
    font-size: 0.6rem;
    color: var(--text-gray);
    letter-spacing: 1px;
}

/* Video */
.maintenance-video-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 30px;
    border: 1px solid rgba(255,255,255,0.1);
}

.maintenance-video-wrapper iframe {
    width: 100%;
    height: 100%;
    pointer-events: none; /* Empeche interaction pour style passif */
}

.video-overlay-text {
    position: absolute;
    bottom: 10px; right: 10px;
    background: black;
    padding: 4px 8px;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 4px;
    color: white;
}

/* Socials 3D */
.social-links-3d {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.social-btn {
    width: 50px; height: 50px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
    color: white;
    text-decoration: none;
    transition: transform 0.2s;
    box-shadow: 
        5px 5px 0px rgba(0,0,0,0.3),
        inset 1px 1px 0px rgba(255,255,255,0.2);
}

.social-btn:hover { transform: translateY(-3px); }
.social-btn:active { transform: translate(2px, 2px); box-shadow: none; }

.discord { background: #5865F2; }
.instagram { background: linear-gradient(45deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%); }
.snapchat { background: #FFFC00; color: black; }

.footer-note {
    font-size: 0.8rem;
    color: var(--text-gray);
    margin-top: 10px;
}

/* --- AMÉLIORATION RESPONSIVE MAINTENANCE --- */
@media (max-width: 768px) {
    .iso-scene {
        perspective: none; 
        height: auto;
        min-height: 100vh;
        padding: 80px 0 40px 0; 
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .iso-card {
        transform: none !important; 
        width: 90%; 
        max-width: 400px;
        margin: 0 auto;
        padding: 30px 20px;
        backdrop-filter: blur(15px); 
        -webkit-backdrop-filter: blur(15px);
    }

    .neon-title { font-size: 1.8rem; margin-bottom: 25px; line-height: 1.2; }
    .neon-logo { font-size: 1rem; }
    .countdown-grid { gap: 8px; margin-bottom: 25px; }
    .time-box { min-width: unset; flex: 1; padding: 8px 4px; }
    .time-box span { font-size: 1.2rem; }
    .time-box label { font-size: 0.5rem; }
    .maintenance-video-wrapper { margin-bottom: 25px; }
    .social-btn { width: 45px; height: 45px; font-size: 1.2rem; }
    .marquee-overlay { background: rgba(2, 1, 10, 0.9); backdrop-filter: blur(10px); }
    .marquee-row img { width: 90px; height: 135px; opacity: 0.5; }
}

/* --- Intro Start Screen & PIN Interface (NEW) --- */
#intro-start-screen {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 100000;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    transition: opacity 0.8s ease-out;
}

.poster-grid-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: url('https://assets.nflxext.com/ffe/siteui/vlv3/f841d4c7-10e1-40af-bcae-07a3f8dc141a/f6d7434e-d6de-4185-a6d4-c77a2d08737b/US-en-20220502-popsignuptwoweeks-perspective_alpha_website_medium.jpg') center/cover;
    opacity: 0.2;
    z-index: -1;
    filter: blur(5px);
}

/* PIN Container */
.pin-interface-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    transform: scale(1);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.pin-header {
    text-align: center;
    margin-bottom: 20px;
}

.pin-subtitle {
    display: block;
    font-size: 0.75rem;
    letter-spacing: 3px;
    color: var(--accent-red);
    margin-bottom: 8px;
    font-weight: 700;
}

.pin-title {
    font-size: 1.5rem;
    font-weight: 300;
    letter-spacing: 1px;
    color: white;
}

/* Dots */
.pin-dots-wrapper {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.pin-dot {
    width: 14px; height: 14px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: transparent;
    transition: all 0.2s ease;
}

.pin-dot.filled {
    background: white;
    border-color: white;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Pin Pad Grid */
.pin-pad-grid {
    display: grid;
    grid-template-columns: repeat(3, 80px);
    gap: 20px;
    justify-content: center;
}

.pin-key {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1.8rem;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
    user-select: none;
}

.pin-key:active {
    background: rgba(255, 255, 255, 0.3);
}

.pin-key:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* =========================================
   DONATION WALL (ISO 26 GLASSMORPHISM)
   ========================================= */
.donation-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85); /* Fond sombre opaque */
    backdrop-filter: blur(20px); /* Flou intense */
    -webkit-backdrop-filter: blur(20px);
    z-index: 200000; /* Max Z-Index pour bloquer */
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.5s ease-out;
}

.donation-card {
    width: 90%;
    max-width: 450px;
    padding: 40px;
    text-align: center;
    /* Glassmorphism ISO 26 overrides */
    background: linear-gradient(145deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.01) 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 50px 100px -20px rgba(0, 0, 0, 0.8);
}

.donation-header h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 15px;
    background: linear-gradient(to right, #fff, #a1a1a6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.donation-icon {
    font-size: 3.5rem;
    color: var(--accent-red);
    margin-bottom: 25px;
    filter: drop-shadow(0 0 20px rgba(229, 9, 20, 0.4));
}

.donation-progress-container {
    margin: 30px 0;
}

.donation-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: white;
    margin-bottom: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.donation-progress-bg {
    width: 100%;
    height: 12px;
    background: rgba(255,255,255,0.1);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.05);
}

.donation-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-blue), #2ecc71);
    border-radius: 6px;
    box-shadow: 0 0 15px rgba(46, 204, 113, 0.4);
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.donation-form {
    margin-top: 30px;
}

.donation-input {
    width: 100%;
    padding: 16px;
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 12px;
    color: white;
    font-size: 1.1rem;
    text-align: center;
    letter-spacing: 2px;
    font-family: monospace;
    outline: none;
    transition: all 0.3s;
    text-transform: uppercase;
}

.donation-input:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 20px rgba(0, 122, 255, 0.2);
    background: rgba(0,0,0,0.6);
}

.shake-anim {
    animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}

.donation-footer {
    margin-top: 25px;
    font-size: 0.85rem;
    color: var(--text-gray);
}

/* =========================================
   TOP 20 SECTION (NEW)
   ========================================= */

.top20-container {
    position: relative;
    width: 100%;
    padding: 60px 0;
    margin-bottom: 40px;
    overflow: hidden;
}

/* Background dynamique avec flou */
.top20-bg-layer {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center top;
    transition: background-image 0.5s ease-in-out, opacity 0.5s;
    opacity: 0.25; /* Sombre pour lisibilité */
    filter: blur(40px); /* Effet Liquid Glass diffus */
    z-index: 0;
    mask-image: linear-gradient(to bottom, transparent, black 20%, black 80%, transparent);
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 20%, black 80%, transparent);
}

.top20-content {
    position: relative;
    z-index: 2;
    padding-left: 4%;
}

.top20-list {
    display: flex;
    gap: 40px; /* Espace pour les chiffres */
    overflow-x: auto;
    padding: 20px 0 40px 0;
    scrollbar-width: none;
    scroll-behavior: smooth;
    align-items: center;
}
.top20-list::-webkit-scrollbar { display: none; }

.top20-item {
    flex: 0 0 auto;
    position: relative;
    display: flex;
    align-items: center; /* Chiffre à gauche de la carte */
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.top20-item:hover {
    transform: scale(1.05) translateX(10px);
}

/* Le gros chiffre style Netflix/Apple */
.top20-number {
    font-size: 10rem;
    font-weight: 900;
    line-height: 1;
    color: #02010A; /* Couleur du fond pour effet découpe */
    -webkit-text-stroke: 4px rgba(255,255,255,0.4);
    position: relative;
    right: -25px; /* Chevauchement */
    z-index: 1;
    font-family: 'Inter', sans-serif;
    letter-spacing: -10px;
    text-shadow: 0 0 30px rgba(0,0,0,0.5);
    pointer-events: none;
}

.top20-card-wrapper {
    width: 160px;
    height: 240px;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    z-index: 2;
    box-shadow: 0 15px 40px rgba(0,0,0,0.6);
    border: 1px solid rgba(255,255,255,0.15);
    transition: 0.3s;
}

.top20-card-wrapper img {
    width: 100%; height: 100%;
    object-fit: cover;
}

/* Hover effects */
.top20-item:hover .top20-number {
    -webkit-text-stroke: 4px var(--accent-blue);
    color: rgba(0, 122, 255, 0.1);
}

.top20-item:hover .top20-card-wrapper {
    box-shadow: 0 0 30px rgba(0, 122, 255, 0.4);
    border-color: var(--accent-blue);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .top20-number { font-size: 6rem; -webkit-text-stroke: 2px rgba(255,255,255,0.4); right: -15px; }
    .top20-card-wrapper { width: 120px; height: 180px; }
}

/* ========================================
   ADMIN TABS WRAPPER WITH SCROLL
   ======================================== */
.admin-tabs-wrapper {
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-blue) rgba(255,255,255,0.1);
}

.admin-tabs-wrapper::-webkit-scrollbar {
  height: 6px;
}

.admin-tabs-wrapper::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.05);
  border-radius: 3px;
}

.admin-tabs-wrapper::-webkit-scrollbar-thumb {
  background: var(--accent-blue);
  border-radius: 3px;
}

.admin-tabs-wrapper::-webkit-scrollbar-thumb:hover {
  background: var(--glow-blue);
}


/* ========================================
   SITE NOTIFICATION BANNER
   ======================================== */
.site-notification {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: #111827;
  color: #e5e7eb;
  padding: 12px 20px;
  border-radius: 999px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5), 0 0 20px rgba(0,122,255,0.3);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 10000;
  font-size: 14px;
  max-width: 90%;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.site-notification.warning {
  background: #854d0e;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5), 0 0 20px rgba(251,191,36,0.3);
}

.site-notification.error {
  background: #7f1d1d;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5), 0 0 20px rgba(239,68,68,0.3);
}

.site-notification.info {
  background: #111827;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5), 0 0 20px rgba(0,122,255,0.3);
}

#site-notification-close {
  background: transparent;
  border: none;
  color: inherit;
  font-size: 18px;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s;
}

#site-notification-close:hover {
  background: rgba(255,255,255,0.1);
}

/* =================== MINIATURES AU SURVOL (STYLE LIQUID GLASS) =================== */
.iso-preview-tooltip {
    position: absolute;
    bottom: 125px; /* Position au-dessus de la barre */
    width: 160px;
    height: 90px;

    /* --- STYLE LIQUID GLASS --- */
    background: rgba(0, 0, 0, 0.4); /* Fond sombre semi-transparent */
    backdrop-filter: blur(12px);   /* L'effet de flou magique */
    -webkit-backdrop-filter: blur(12px); /* Compatibilité Safari */
    border: 1px solid rgba(255, 255, 255, 0.25); /* Bordure fine et subtile */
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37); /* Ombre douce et profonde */
    /* -------------------------- */

    border-radius: 8px; /* Coins un peu plus arrondis */
    display: none;
    pointer-events: none;
    z-index: 200;
    overflow: hidden;
    transform: translateX(-50%);
}

.iso-preview-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Légère transparence sur la vidéo elle-même pour renforcer l'effet glass */
    opacity: 0.9; 
    background: transparent;
}

.iso-preview-time {
    position: absolute;
    bottom: 0;
    width: 100%;
    text-align: center;
    /* On enlève la barre noire de fond pour que ce soit plus épuré */
    background: transparent;
    color: white;
    font-size: 13px;
    font-weight: 700;
    padding: 6px 0;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    /* Ombre portée forte sur le texte pour qu'il soit lisible sur n'importe quelle image */
    text-shadow: 0 2px 4px rgba(0,0,0,0.9);
}

/* =================== BOUTON PASSER L'INTRO =================== */
.iso-skip-btn {
    position: absolute;
    bottom: 120px; /* Au-dessus de la barre */
    right: 40px;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: white;
    padding: 10px 22px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    z-index: 55;
    display: none; /* Caché par défaut */
    align-items: center;
    gap: 10px;
    transition: all 0.2s ease;
    backdrop-filter: blur(5px);
    z-index: 9999 !important; /* On le force tout en haut de la pile */
}

.iso-skip-btn:hover {
    background: white;
    color: black;
    transform: scale(1.05);
}

.iso-skip-btn.visible {
    display: flex;
    animation: fadeIn 0.5s ease;
}

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

/* =========================================
   ADAPTATION MOBILE & TABLETTE (CINEPRIMEE)
   ========================================= */

@media (max-width: 768px) {
    /* 1. GRILLES DE FILMS : Passage en 2 colonnes pour éviter les cartes minuscules */
    .catalog-grid, .admin-grid-results, .wp-grid, .grid-layout {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
        padding: 10px !important;
    }

    /* 2. HERO SECTION : Réduction de la taille pour petits écrans */
    #hero-title {
        font-size: 2.2rem !important; /* Moins agressif sur mobile */
    }
    .hero-content {
        padding: 20px !important;
        width: 100% !important;
        margin-top: 40px !important;
    }
    .hero-description {
        font-size: 0.95rem !important;
        max-width: 100% !important;
    }

    /* 3. SIDEBAR MOBILE : Elle doit couvrir plus de surface pour le confort tactile */
    #main-sidebar {
        width: 85% !important; 
    }

    /* 4. WATCH PARTY / LECTEUR : Empilement Vidéo/Chat */
    .room-container {
        grid-template-columns: 1fr !important; /* On empile au lieu de mettre côte à côte */
        height: auto !important;
        display: flex;
        flex-direction: column;
    }
    .room-player {
        height: 30vh !important; /* Hauteur fixe pour la vidéo */
        min-height: 250px !important;
    }
    .room-sidebar {
        height: 450px !important; /* Espace dédié pour le chat en dessous */
        width: 100% !important;
    }

/* 5. LECTEUR MOBILE : On cache la barre personnalisée pour laisser place au lecteur natif */
    .iso-controls {
        display: none !important; /* C'est cette ligne qui va supprimer ta barre rouge sur mobile */
    }

    /* On garde le bouton "Passer l'intro" mais on le remonte un peu pour pas qu'il soit sur les boutons du téléphone */
    .iso-skip-btn.visible {
        display: flex !important;
        bottom: 60px !important; 
    }

    /* 6. MODALS : On s'assure qu'elles prennent toute la place */
    .modal-content {
        width: 95% !important;
        padding: 20px !important;
    }
}

/* Optimisation pour les très petits écrans (iPhone SE, etc.) */
@media (max-width: 480px) {
    .catalog-grid {
        grid-template-columns: 1fr !important; /* 1 seul film par ligne pour la clarté */
    }
    #hero-title {
        font-size: 1.8rem !important;
    }
}

/* Désactive Play, Skip et la Barre de temps */
.guest-mode .iso-progress-container,
.guest-mode .iso-play-btn,
.guest-mode .iso-skip-btn {
    pointer-events: none !important;
    opacity: 0.5;
    filter: grayscale(1);
}

/* Force l'activation du Volume et Plein écran */
.guest-mode .iso-volume-container,
.guest-mode .iso-fullscreen-btn {
    pointer-events: auto !important;
    opacity: 1;
    cursor: pointer;
}