/* ========================================
   ANIMATIONS PREMIUM - XIRO STYLE
   Effets visuels haut de gamme pour Hero Section
   ======================================== */

/* ========== 1. BACKGROUND EFFECTS ========== */

/* Zoom subtil sur l'image au chargement */
.hero-slide-image {
    animation: heroZoomIn 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    transform-origin: center center;
}

@keyframes heroZoomIn {
    from {
        transform: scale(1.1);
    }

    to {
        transform: scale(1);
    }
}

/* Parallax léger au scroll */
.hero-slider {
    overflow: hidden;
}

.hero-slide.active .hero-slide-image {
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Overlay avec gradient premium */
.hero-slide-overlay {
    background: linear-gradient(180deg,
            rgba(0, 0, 0, 0.25) 0%,
            rgba(0, 0, 0, 0.45) 100%);
    backdrop-filter: blur(0.5px);
}


/* ========== 2. HERO TITLE ANIMATIONS ========== */

/* Animation d'entrée du titre principal */
.hero-title {
    opacity: 0;
    transform: translateY(40px);
    animation: heroTitleEnter 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
    letter-spacing: 0.02em;
}

@keyframes heroTitleEnter {
    0% {
        opacity: 0;
        transform: translateY(40px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animation italique (em) */
.hero-title em {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
    animation: heroTitleEmEnter 1s cubic-bezier(0.16, 1, 0.3, 1) 0.6s forwards;
}

@keyframes heroTitleEmEnter {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ========== 3. SUBTITLE ANIMATIONS ========== */

/* Sous-titre avec delay */
.hero-subtitle {
    opacity: 0;
    transform: translateY(30px);
    animation: heroSubtitleEnter 1s cubic-bezier(0.16, 1, 0.3, 1) 0.8s forwards;
}

@keyframes heroSubtitleEnter {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }

    100% {
        opacity: 0.95;
        transform: translateY(0);
    }
}


/* ========== 4. CTA BUTTON PREMIUM ========== */

/* Animation d'entrée du bouton */
.hero-content .btn {
    opacity: 0;
    transform: translateY(20px);
    animation: heroButtonEnter 0.8s cubic-bezier(0.16, 1, 0.3, 1) 1.2s forwards;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes heroButtonEnter {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hover effet premium */
.hero-content .btn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    background: rgba(255, 255, 255, 0.95);
}

.hero-content .btn:active {
    transform: translateY(-2px) scale(1.01);
    transition-duration: 0.1s;
}


/* ========== 5. NAVBAR PREMIUM SCROLL EFFECT ========== */

/* État initial transparent */
.header {
    background: transparent;
    backdrop-filter: none;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: none;
}

/* État scrollé avec backdrop blur */
.header.scrolled {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
}

/* Logo avec transition */
.header .logo {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.header.scrolled .logo {
    transform: scale(0.95);
}


/* ========== 6. SLIDER NAVIGATION PREMIUM ========== */

/* Flèches de navigation discrètes */
.slider-nav {
    opacity: 0.6;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.15);
}

.slider-nav:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.slider-nav:active {
    transform: translateY(-50%) scale(0.95);
}

/* Dots de navigation */
.slider-dot {
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0.5;
}

.slider-dot:hover {
    opacity: 0.8;
    transform: scale(1.3);
}

.slider-dot.active {
    opacity: 1;
    background: var(--color-white);
    transform: scaleX(3);
}


/* ========== 7. SLIDE TRANSITIONS PREMIUM ========== */

/* Transition fluide entre slides */
.hero-slide {
    transition: opacity 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hero-slide.active {
    opacity: 1;
    z-index: 2;
}

/* Effet de crossfade */
.hero-slide:not(.active) {
    opacity: 0;
    z-index: 1;
}

/* Animation de l'image lors du changement */
.hero-slide.entering .hero-slide-image {
    animation: heroZoomIn 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}


/* ========== 8. CONTENT STAGGER ANIMATION ========== */

/* Réinitialiser les animations lors du changement de slide */
.hero-slide:not(.active) .hero-title,
.hero-slide:not(.active) .hero-subtitle,
.hero-slide:not(.active) .btn {
    opacity: 0;
    transform: translateY(30px);
}

/* Déclencher les animations quand le slide devient actif */
.hero-slide.active .hero-title {
    animation: heroTitleEnter 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
}

.hero-slide.active .hero-subtitle {
    animation: heroSubtitleEnter 1s cubic-bezier(0.16, 1, 0.3, 1) 0.8s forwards;
}

.hero-slide.active .btn {
    animation: heroButtonEnter 0.8s cubic-bezier(0.16, 1, 0.3, 1) 1.2s forwards;
}


/* ========== 9. PARALLAX EFFECT (optional) ========== */

/* Parallax au scroll pour le hero */
@media (min-width: 64em) {
    .hero-slider.parallax-enabled .hero-slide-image {
        transition: transform 0.3s ease-out;
    }
}


/* ========== 10. PERFORMANCE OPTIMIZATIONS ========== */

/* GPU acceleration pour les animations */
.hero-slide,
.hero-slide-image,
.hero-title,
.hero-subtitle,
.btn,
.slider-nav,
.header {
    will-change: transform, opacity;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Retirer will-change après l'animation */
.hero-slide.active.animations-complete .hero-title,
.hero-slide.active.animations-complete .hero-subtitle,
.hero-slide.active.animations-complete .btn {
    will-change: auto;
}


/* ========== 11. RESPONSIVE ADJUSTMENTS ========== */

@media (max-width: 48em) {

    /* Réduire les animations sur mobile */
    .hero-title {
        animation-duration: 0.8s;
    }

    .hero-subtitle {
        animation-duration: 0.7s;
        animation-delay: 0.5s;
    }

    .btn {
        animation-duration: 0.6s;
        animation-delay: 0.8s;
    }

    /* Désactiver le parallax sur mobile */
    .hero-slide-image {
        transform: none !important;
    }
}


/* ========== 12. ACCESSIBILITÉ ========== */

/* Respecter la préférence reduced motion */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .hero-slide-image {
        animation: none;
    }
}