:root {
    --tm-marine: #1a233a;
    --tm-yellow: #ffc93c;
    --tm-orange: #ff9a3c;
    --tm-gradient: linear-gradient(135deg, #ffc93c 0%, #ff9a3c 100%);
}

body, html {
    margin: 0; padding: 0; height: 100%;
    
    /* Texture Mousse Légère Blanc/Gris */
    background-color: #f6f8fa; /* Gris très clair */
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(255,255,255,0.8) 5%, transparent 6%),
        radial-gradient(circle at 70% 60%, rgba(255,255,255,0.8) 8%, transparent 9%),
        radial-gradient(circle at 40% 80%, rgba(255,255,255,0.8) 4%, transparent 5%),
        radial-gradient(circle at 80% 20%, rgba(255,255,255,0.8) 6%, transparent 7%),
        radial-gradient(circle at 10% 80%, rgba(255,255,255,0.8) 7%, transparent 8%),
        radial-gradient(circle at 50% 10%, rgba(255,255,255,0.8) 3%, transparent 4%);
    background-size: 150px 150px;
    background-attachment: fixed;
    
    font-family: 'Poppins', sans-serif;
    overflow-y: auto; 
    overflow-x: hidden;
}


/* --- INTRO ANIMÉE --- */
#intro-overlay {
    position: fixed; inset: 0; background: #fff;
    display: flex; align-items: center; justify-content: center;
    z-index: 10000; animation: fadeOut 0.6s forwards 1.8s;
}

#intro-logo {
    width: 280px; transition: all 1s ease-in-out;
    animation: shrinkMove 1s forwards 1s;
}

@keyframes shrinkMove {
    to { width: 120px; transform: translateY(-44vh); }
}

@keyframes fadeOut {
    to { opacity: 0; visibility: hidden; }
}

/* --- HEADER ÉPURÉ --- */
header {
    position: fixed;
    top: 0;
    width: 100%;
    height: 70px; /* Hauteur fixe */
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center; /* Centre verticalement le contenu */
    justify-content: center; /* Centre horizontalement le logo */
    padding: 0 20px;
    box-sizing: border-box;
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden; /* Empêche tout dépassement */
}

.header-logo {
    height: 40px !important; /* On réduit un peu pour laisser respirer */
    width: auto;
    display: block;
    
    /* Supprime le cadre blanc */
    mix-blend-mode: multiply; 
    
    /* Correction du décalage vertical */
    margin: 0 auto; 
    vertical-align: middle;
    
    /* Boost des couleurs pour compenser le multiply */
    filter: contrast(110%) brightness(105%); 
}

.hamburger {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%); /* Centre parfaitement l'icône menu */
    font-size: 28px;
    cursor: pointer;
    color: var(--tm-marine);
}

.header-logo, #header-logo-placeholder {
    height: 50px !important; /* Taille fixe pour ne pas déborder */
    width: auto;
    mix-blend-mode: multiply; /* Supprime le blanc */
    filter: contrast(110%);
    display: block;
    margin: 0 auto;
}
/* --- SIDEBAR --- */
.sidebar {
    height: 100%; width: 0; position: fixed;
    top: 0; left: 0; background: var(--tm-marine);
    overflow-x: hidden; transition: 0.4s; z-index: 2000;
    padding-top: 60px;
}
.sidebar a {
    padding: 15px 30px; text-decoration: none; font-size: 20px;
    color: #eee; display: block; transition: 0.2s;
    white-space: nowrap;
}
.sidebar a:hover { color: var(--tm-yellow); padding-left: 40px; }

/* --- CONTAINER VIDÉO (SNAP SCROLL) --- */
.video-container {
    height: 100vh;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    box-sizing: border-box; 
    padding-top: 0; 
    -webkit-overflow-scrolling: touch;
}

.video-card {
    /* On retire les 60px du header pour que la carte fasse la taille RESTANTE de l'écran */
    height: calc(100vh - 60px); 
    scroll-snap-align: start;
    scroll-snap-stop: always;    
    scroll-margin-top: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin: 0;
    padding: 0;
}
.video-wrapper {
    position: relative; /* Indispensable pour que le bouton soit ancré dedans */
    z-index: 10;
    width: 90%; max-width: 380px;
    height: 85%; /* Hauteur fixe pour uniformiser la taille des tuiles sur mobile */
    max-height: 90vh; /* Empêche de dépasser de l'écran et de chevaucher */
    display: flex;
    flex-direction: column;
    background: #fff; border-radius: 25px; overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

video { 
    width: 100%; 
    display: block; 
    min-height: 0; /* Permet à la vidéo de se rétrécir si l'écran est petit */
    flex: 1 1 auto;
    object-fit: cover;
}

.video-info { 
    padding: 20px; 
    text-align: center; 
    color: var(--tm-marine);
    flex: 0 0 auto; /* Empêche le texte de se faire écraser */
}

.btn-buy {
    display: inline-block; padding: 12px 35px;
    background: var(--tm-gradient); color: #fff;
    text-decoration: none; border-radius: 50px; font-weight: bold;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 154, 60, 0.7); }
    70% { transform: scale(1.03); box-shadow: 0 0 0 10px rgba(255, 154, 60, 0); }
    100% { transform: scale(1); }
}
.logo, #intro-logo, #header-logo-placeholder {
    mix-blend-mode: multiply; /* Supprime le fond blanc de l'image */
    filter: contrast(110%);    /* Donne un peu de peps aux couleurs */
}
.don-link {
    background: rgba(255, 201, 60, 0.1);
    border-radius: 8px;
    margin: 10px 20px !important;
    border: 1px solid rgba(255, 201, 60, 0.3);
}
.don-link:hover {
    background: var(--tm-gradient) !important;
    color: var(--tm-marine) !important;
    box-shadow: 0 0 15px rgba(255, 154, 60, 0.4);
}
/* Nettoyage du logo */
header img, #intro-logo {
    mix-blend-mode: multiply; /* Rend le blanc transparent instantanément */
    filter: multiply(1.1);    /* Renforce un peu les couleurs */
}

header {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(10px); /* Effet verre dépoli très moderne */
}
/* Bouton de son flottant */
.mute-control {
    position: absolute; /* Force le bouton à ignorer l'empilement classique */
    top: 15px;         /* Se place à 15px du haut du wrapper */
    right: 15px;       /* Se place à 15px de la droite du wrapper */
    z-index: 100;      /* Passe au-dessus de la vidéo */
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    color: white;
}

/* --- VERSION PC : AFFICHAGE EN GRILLE --- */
@media (min-width: 1024px) {
    .video-container {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 40px;
        padding: 100px 50px 50px 50px; /* Espace pour le header et sur les côtés */
        height: auto;
        overflow-y: visible;
        scroll-snap-type: none; /* Désactive le scroll magnétique façon TikTok */
    }
    
    .video-card {
        height: auto; /* La carte prend sa propre hauteur */
        scroll-snap-align: none;
        align-items: flex-start; /* Aligne les cartes en haut */
    }
    
    .video-wrapper {
        width: 100%;
        max-width: 100%; /* Remplit la colonne de la grille */
        height: 650px; /* Hauteur fixe pour que toutes les cartes soient uniformes */
        margin: 0 auto;
    }
}

/* --- SÉCURITÉ MOBILE : DÉSACTIVER L'INTRO POUR ÉVITER LES ÉCRANS BLANCS --- */
@media (max-width: 768px) {
    #intro-overlay {
        display: none !important;
    }
    #header-logo-placeholder {
        visibility: visible !important;
    }
}

