/* css/components/hero.css */

.hero-section {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center; /* Centrage vertical */
    justify-content: flex-start; /* Alignement à gauche (au lieu de center) */
    overflow: hidden;
    padding-top: 80px; /* Compense la hauteur de la navbar */
}

/* --- CAROUSEL BACKGROUND (100% CSS) --- */
.hero-bg-carousel {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    /* Animation de 24s au total (6s par slide * 4 images) */
    animation: crossfade 24s infinite ease-in-out;
}

/* Délais pour créer le roulement du Carousel */
.slide-1 { animation-delay: 0s; }
.slide-2 { animation-delay: 6s; }
.slide-3 { animation-delay: 12s; }
.slide-4 { animation-delay: 18s; }

/* L'animation : Fondu enchaîné + Léger Zoom "Premium" */
@keyframes crossfade {
    0% { opacity: 0; transform: scale(1); }
    5% { opacity: 1; transform: scale(1.02); }   /* Apparition rapide + début du zoom */
    25% { opacity: 1; transform: scale(1.05); }  /* Reste visible */
    30% { opacity: 0; transform: scale(1.06); }  /* Disparition */
    100% { opacity: 0; transform: scale(1); }    /* Reste caché jusqu'au prochain tour */
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.2);
    z-index: 1;
}

[data-theme="dark"] .hero-overlay {
    background: rgba(0, 0, 0, 0.5); /* Assombrit plus en mode Dark */
}

/* --- IMAGES LOCALES (MODE CLAIR) --- */
/* Modifiez avec les noms exacts de vos images dans le dossier /images/places/ */
.hero-slide.slide-1 { background-image: url('../../images/places/agadirOufla\ Light.png'); }
.hero-slide.slide-2 { background-image: url('../../images/places/chameaux\ light.png'); }
.hero-slide.slide-3 { background-image: url('../../images/places/Igoudar\ light.png'); }
.hero-slide.slide-4 { background-image: url('../../images/places/horse\ light.png'); }

/* --- IMAGES LOCALES (MODE SOMBRE) --- */
/* Modifiez avec les noms exacts de vos images dans le dossier /images/places/ */
[data-theme="dark"] .hero-slide.slide-1 { background-image: url('../../images/places/agadirOufla\ Dark.png'); }
[data-theme="dark"] .hero-slide.slide-2 { background-image: url('../../images/places/chameaux\ Dark.png'); }
[data-theme="dark"] .hero-slide.slide-3 { background-image: url('../../images/places/Igoudar\ Dark.png'); }
[data-theme="dark"] .hero-slide.slide-4 { background-image: url('../../images/places/horse\ Dark.png'); }


/* --- CONTENU & GLASSMORPHISM (ALIGNÉ À GAUCHE) --- */
.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    text-align: left; /* Aligne strictement à gauche */
}


.glass-panel-hero {
    background: rgba(255, 255, 255, 0.10); /* Verre très léger */
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    
    /* Élargissement vers la gauche */
    max-width: 850px;
    margin: 0px;
    padding: 40px 5px 5px 40px ;

    
    /* Le secret : Mask-Image pour fondre les 4 bords vers 1% */
    -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 40%, rgba(0,0,0,0.01) 100%);
    mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 40%, rgba(0,0,0,0.01) 100%);
    
    /* On enlève la bordure rigide pour ne pas casser le fondu */
    border: none;
    transition: all var(--transition-base);
}

[data-theme="dark"] .glass-panel-hero {
    background: rgba(11, 11, 11, 0.35); /* Verre sombre élégant */
}

.display-title {
    margin-bottom: var(--sp-3);
    /* Titre dompté : utilise clamp pour s'adapter sans être massif */
    font-size: clamp(3rem, 5vw, 4.5rem); 
    line-height: 1.1;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.subtitle {
    font-size: 1.15rem; /* Légèrement réduit pour équilibrer */
    margin-bottom: var(--sp-5);
    max-width: 500px;
    font-weight: 300;
    opacity: 0.9;
}

/* Bouton équilibré et élégant */
.glass-panel-hero .btn-primary {
    padding: 0.875rem 2rem; /* Plus fin */
    font-size: 1rem;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.glass-panel-hero .btn-primary:hover {
    /* Lueur jaune subtile au survol */
    box-shadow: 0 4px 20px rgba(228, 229, 27, 0.3);
}

/* --- RESPONSIVE MOBILE (Hero) --- */
@media (max-width: 992px) {
    .hero-section { 
        justify-content: center; 
        padding-top: 100px; /* Compense la navbar sur mobile */
    }
    .hero-content { 
        text-align: center; 
    }
    .glass-panel-hero {
        padding: var(--sp-4) var(--sp-3);
        margin: 0 var(--sp-2);
        max-width: 100%;
        /* Adoucit le masque pour que le texte reste lisible sur les bords */
        -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 70%, rgba(0,0,0,0.01) 100%);
        mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 70%, rgba(0,0,0,0.01) 100%);
    }
    .subtitle { 
        margin-inline: auto; /* Centre parfaitement le sous-titre */
        font-size: 1.05rem; 
    }
}