/* ==========================================================================
   1. VARIABLES GLOBALES
   ========================================================================== */
:root {
    --primary-color: #ff0033;
    --primary-hover: #cc0029;
    --glass-bg: rgba(0, 0, 0, 0.45);
    --overlay-bg: rgba(0, 0, 0, 0.2); 
    --transition-speed: 0.3s;
}

/* ==========================================================================
   2. RESET & BASE
   ========================================================================== */
html, body {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    font-family: "Source Sans Pro", sans-serif;
    background-color: #000;
    color: #fff;
    overflow-x: hidden; 
}

/* ==========================================================================
   3. SYSTEME DE COUCHES (CORRIGÉ & STABILISÉ)
   ========================================================================== */

/* NIVEAU 1 : La vidéo */
.bg-video-container {
	background-color: #000; /* Fond noir en attendant le chargement */
    transition: opacity 1s ease-in-out;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0; 
    overflow: hidden;
    pointer-events: none;
}

.bg-video-container video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    transform: translate(-50%, -50%);
    object-fit: cover;
}

/* NIVEAU 1 : L'effet de flou global */
.blue-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--overlay-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1;
    pointer-events: none;
}

/* NIVEAU 2 : Le contenu principal (Augmenté pour passer devant la vidéo) */
.masthead {
    position: relative;
    height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    z-index: 2; 
}

/* Le panneau sombre incliné - Correction du décalage bas */
.masthead:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0; /* Force l'ancrage en bas */
    width: 100%;
    background: var(--glass-bg);
    z-index: -1; 
}

@media (min-width: 992px) {
    .masthead { width: 65vw; }
    .masthead:before {
        transform: skewX(-9deg);
        transform-origin: top right;
        width: 120%;
        height: 110%; /* S'assure que le panneau couvre toute la hauteur */
    }
}

/* ==========================================================================
   4. ÉLÉMENTS DE CONTENU
   ========================================================================== */
.masthead-content {
    padding: 3rem;
    width: 100%;
    position: relative;
    z-index: 3;
}

.logo-mcec {
    width: 200px;
    margin-bottom: 2rem;
}

.masthead-content h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    text-shadow: 0 2px 15px rgba(0,0,0,0.8);
    margin-bottom: 1.5rem;
}

.input-group-newsletter {
    max-width: 500px;
    display: flex;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.input-group-newsletter input {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
 border-radius: 5px !important; /* Force l'arrondi complet sur mobile */
    border-right: 1px solid rgba(255, 255, 255, 0.2); /* Restaure la bordure droite */
}
    color: white;
    padding: 1rem;
    border-radius: 5px 0 0 5px;
    outline: none;
    transition: var(--transition-speed);
}

.input-group-newsletter input:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary-color);
}

.input-group-newsletter input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.btn-mcec {
    background-color: var(--primary-color);
    border: 1px solid var(--primary-color);
    color: white;
    padding: 0 2rem;
    border-radius: 5px !important;
}
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition-speed);
}

.btn-mcec:hover { 
    background-color: var(--primary-hover); 
    border-color: var(--primary-hover);
}

/* ==========================================================================
   5. COMPTE À REBOURS & SOCIAUX
   ========================================================================== */
.countdown-wrapper { 
    display: flex; 
    gap: 1rem; 
    margin-bottom: 2.5rem; 
    flex-wrap: wrap; 
}

.countdown-item {
    text-align: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    min-width: 90px;
    backdrop-filter: blur(5px);
}

.social-icons {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 10;
    display: flex;
    gap: 1rem;
}

.social-icons a {
    width: 45px; 
    height: 45px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--transition-speed);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-icons a:hover { 
    background: var(--primary-color); 
    transform: translateY(-3px);
}

/* ==========================================================================
   6. RESPONSIVE
   ========================================================================== */
@media (max-width: 991.98px) {
    .masthead { 
        width: 100%; 
        height: auto; 
        min-height: 100vh; 
        padding: 6rem 1rem 3rem 1rem; 
    }
    
    .masthead:before { 
        transform: none; 
        width: 100%; 
        bottom: 0;
    }
    
    .masthead-content { 
        text-align: center; 
        padding: 1.5rem;
    }
    
    .countdown-wrapper { 
        justify-content: center; 
    }
    
    .input-group-newsletter { 
        flex-direction: column; 
        gap: 10px; 
        margin: 0 auto;
    }
    
    .input-group-newsletter input, 
    .btn-mcec { 
        border-radius: 5px; 
        width: 100%; 
        height: 55px; 
        border: 1px solid rgba(255, 255, 255, 0.2);
    }
    
    .social-icons { 
        top: 1.5rem; 
        right: 50%; 
        transform: translateX(50%); 
    }
}
