:root {
    --primary-color: #e50914; /* Rouge style Netflix */
    --dark-bg: #141414;
    --darker-bg: #0b0b0b;
    --glass-bg: rgba(20, 20, 20, 0.7);
    --text-color: #ffffff;
    --text-muted: #b3b3b3;
    --card-radius: 8px;
    --transition-speed: 0.3s;
}

body {
    background-color: var(--dark-bg);
    color: var(--text-color);
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    overflow-x: hidden;
}

/* --- Scrollbar Personnalisée --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--darker-bg); 
}
::-webkit-scrollbar-thumb {
    background: #333; 
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color); 
}

/* --- Navigation effet Verre --- */
.navbar {
    padding: 15px 0;
    transition: background-color var(--transition-speed);
}
.glass-effect {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* --- Hero Section --- */
.hero-section {
    position: relative;
    height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.8);
    /* Assurez-vous d'avoir une image nommée hero-bg.jpg */
    background: linear-gradient(to top, var(--dark-bg) 0%, rgba(0,0,0,0) 60%, rgba(0,0,0,0.4) 100%), 
                url('../img/hero-bg.jpg') no-repeat center center/cover;
}

/* --- Cartes de Films --- */
.movie-card {
    background-color: #1f1f1f;
    border-radius: var(--card-radius);
    overflow: hidden;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    position: relative;
}

.movie-card:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    z-index: 2;
    border-color: var(--primary-color) !important;
}

.card-body {
    padding: 1rem;
    background: linear-gradient(to top, #141414, transparent);
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- Player & Locker --- */
#videoContainer {
    position: relative;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(229, 9, 20, 0.15);
}

#lockerOverlay {
    background: rgba(0, 0, 0, 0.96);
    backdrop-filter: blur(5px);
    display: none; /* Géré par JS */
    color: white;
    text-align: center;
    padding: 2rem;
}

/* Bouton style */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}
.btn-primary:hover {
    background-color: #bd000b;
    border-color: #bd000b;
}

/* --- Animations --- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.movie-item {
    animation: fadeIn 0.6s ease-out forwards;
}

/* --- NOUVEAU DESIGN CONTENT LOCKER (Style AI Studio) --- */

/* L'Overlay doit couvrir tout l'écran, même en mode plein écran vidéo */
#lockerOverlay {
    display: none; /* Caché par défaut */
    position: fixed; /* Fixe pour couvrir tout l'écran */
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 2147483647; /* Maximum Z-Index possible pour passer au dessus de Plyr Fullscreen */
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.5s;
    padding: 20px;
}

#lockerOverlay.active {
    display: flex !important;
    opacity: 1;
}

.modal {
    background: #0f0f12;
    border: 1px solid #2d2d35;
    width: 100%;
    max-width: 420px;
    border-radius: 24px;
    text-align: center;
    transform: scale(0.95);
    transition: transform 0.3s;
    box-shadow: 0 0 80px rgba(91, 95, 255, 0.15);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 85vh;
}

#lockerOverlay.active .modal {
    transform: scale(1);
}

.modal-header {
    padding: 25px 25px 15px 25px;
    background: #0f0f12;
    z-index: 2;
    border-bottom: 1px solid #1f1f25;
}

.modal h2 {
    margin: 0;
    font-size: 22px;
    color: #fff;
    margin-bottom: 8px;
    font-weight: 700;
}

.modal p {
    color: #999;
    font-size: 14px;
    margin: 0;
    line-height: 1.5;
}

.offer-container {
    padding: 20px;
    overflow-y: auto;
    background: #0a0a0c;
}

/* --- TIKTOK CARD DESIGN --- */
.tiktok-card {
    background: linear-gradient(135deg, #111 0%, #1a1a1f 100%);
    border: 1px solid rgba(255, 0, 80, 0.4);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    box-shadow: 0 10px 30px rgba(255, 0, 80, 0.15);
    transition: transform 0.2s;
    cursor: pointer;
}

.tiktok-card:hover { transform: scale(1.02); border-color: #ff0050; }
.tiktok-card:active { transform: scale(0.98); }

.tiktok-badge {
    position: absolute; top: 10px; right: 10px;
    background: #ff0050; color: #fff; font-size: 10px; font-weight: 800;
    padding: 3px 8px; border-radius: 10px; text-transform: uppercase;
}

.tiktok-logo-img { width: 50px; height: 50px; border-radius: 50%; margin-bottom: 12px; }
.tiktok-title { color: #fff; font-weight: 700; font-size: 16px; margin-bottom: 4px; }
.tiktok-desc { color: #aaa; font-size: 12px; margin-bottom: 15px; }

.tiktok-action {
    background: #ff0050; color: #fff; width: 100%; padding: 10px;
    border-radius: 10px; font-weight: 600; font-size: 14px;
    display: flex; justify-content: center; align-items: center; gap: 6px;
}

/* --- LIST APPS DESIGN --- */
.list-divider { display: flex; align-items: center; gap: 10px; color: #555; font-size: 12px; margin-bottom: 15px; font-weight: 500; }
.list-divider::before, .list-divider::after { content: ""; height: 1px; background: #333; flex: 1; }

.app-card {
    display: flex; align-items: center; gap: 12px; background: #16161a;
    border: 1px solid #25252b; padding: 12px; border-radius: 14px;
    margin-bottom: 10px; text-decoration: none; transition: background 0.2s;
    cursor: pointer;
}

.app-card:hover { background: #1f1f25; border-color: #5b5fff; }

.app-icon { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; background: #333; flex-shrink: 0; }
.app-info { flex: 1; text-align: left; }
.app-name { color: #fff; font-size: 13px; font-weight: 500; line-height: 1.3; white-space: normal; }

.app-get-btn {
    background: #2a2a33; color: #5b5fff; font-size: 12px; font-weight: 700;
    padding: 6px 14px; border-radius: 20px; text-transform: uppercase; flex-shrink: 0;
}

.popup-loader { color: #666; font-size: 13px; padding: 20px; text-align: center; }
/* --- FIX MOBILE LANDSCAPE (Plein écran horizontal) --- */
@media (max-height: 500px) and (orientation: landscape) {
    #lockerOverlay {
        align-items: flex-start; /* Colle la popup en haut */
        padding: 10px;
        overflow-y: scroll; /* Permet de scroller toute la page si besoin */
    }

    .modal {
        max-width: 600px; /* Plus large pour profiter de l'espace */
        display: flex;
        flex-direction: row; /* Met le Header à gauche et les offres à droite */
        height: auto;
        max-height: none;
        overflow: visible;
    }

    .modal-header {
        width: 35%;
        border-bottom: none;
        border-right: 1px solid #1f1f25;
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 15px;
    }

    .modal h2 { font-size: 18px; }
    .modal p { font-size: 12px; }

    .offer-container {
        width: 65%;
        padding: 15px;
        max-height: 300px; /* Force le scroll uniquement sur les offres */
        overflow-y: auto;
    }

    /* Réduit la taille de la carte TikTok */
    .tiktok-card {
        padding: 10px;
        margin-bottom: 10px;
        flex-direction: row; /* TikTok en horizontal */
        text-align: left;
    }
    .tiktok-logo-img { width: 40px; height: 40px; margin: 0 10px 0 0; }
    .tiktok-badge { display: none; } /* On cache le badge pour gagner de la place */
    .tiktok-action { width: auto; padding: 5px 15px; font-size: 11px; margin-left: auto; }
}