/**
 * Animations pour la Hero Section - EarthKingdoms
 * Background animé, CTA pulsant, effets modernes
 */

/* Hero Section améliorée */
.hero {
    position: relative;
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, #0a0f0b 0%, #1a2820 100%);
}

/* Background animé avec image + gradient dynamique */
.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    background-image: url('/assets/img/hero-background-new.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    animation: hero-gradient-shift 15s ease-in-out infinite;
}

/* Overlay avec gradient dynamique par-dessus l'image */
.hero-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(10, 15, 11, 0.75) 0%,
        rgba(26, 40, 32, 0.65) 50%,
        rgba(10, 15, 11, 0.8) 100%
    );
    animation: hero-overlay-pulse 10s ease-in-out infinite;
}

@keyframes hero-overlay-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.9;
    }
}

@keyframes hero-gradient-shift {
    0%, 100% {
        background-position: 0% 50%;
        transform: scale(1);
    }
    50% {
        background-position: 100% 50%;
        transform: scale(1.1);
    }
}



/* Contenu Hero */
.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 900px;
    padding: 2rem;
    animation: hero-content-fade-in 1s ease-out;
}

@keyframes hero-content-fade-in {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Titre Hero avec effet typewriter */
.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 900;
    margin-bottom: 1.5rem;
    background: linear-gradient(
        135deg,
        #ffffff 0%,
        var(--primary-color) 50%,
        #ffffff 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: hero-title-gradient 3s linear infinite;
    letter-spacing: -1px;
    line-height: 1.1;
    text-shadow: 0 0 40px rgba(255, 255, 255, 0.3);
    filter: drop-shadow(0 2px 8px rgba(236, 150, 0, 0.4));
}

@keyframes hero-title-gradient {
    0% {
        background-position: 0% center;
    }
    100% {
        background-position: 200% center;
    }
}

/* Sous-titre */
.hero-subtitle {
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 0 20px rgba(236, 150, 0, 0.5);
    animation: hero-subtitle-pulse 2s ease-in-out infinite;
}

@keyframes hero-subtitle-pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.9;
        transform: scale(1.02);
    }
}

/* Description */
.hero-description {
    font-size: clamp(1rem, 1.5vw, 1.3rem);
    color: white;
    margin-bottom: 2.5rem;
    line-height: 1.6;
    animation: hero-description-fade 1.2s ease-out 0.3s both;
}

@keyframes hero-description-fade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Bouton CTA amélioré */
.btn-primary.btn-large {
    position: relative;
    font-size: 1.2rem;
    padding: 1.2rem 3rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    overflow: hidden;
    box-shadow:
        0 10px 30px rgba(236, 150, 0, 0.4),
        0 0 0 0 rgba(236, 150, 0, 0.5);
    animation:
        hero-cta-pulse 2s ease-in-out infinite,
        hero-cta-fade 1.5s ease-out 0.6s both;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

@keyframes hero-cta-pulse {
    0%, 100% {
        box-shadow:
            0 10px 30px rgba(236, 150, 0, 0.4),
            0 0 0 0 rgba(236, 150, 0, 0.5);
    }
    50% {
        box-shadow:
            0 10px 40px rgba(236, 150, 0, 0.6),
            0 0 0 15px rgba(236, 150, 0, 0);
    }
}

@keyframes hero-cta-fade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Effet de brillance qui passe sur le bouton */
.btn-primary.btn-large::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transition: left 0.5s;
}

.btn-primary.btn-large:hover::before {
    left: 100%;
}

.btn-primary.btn-large:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow:
        0 15px 40px rgba(236, 150, 0, 0.6),
        0 0 30px rgba(236, 150, 0, 0.4);
}

.btn-primary.btn-large:active {
    transform: translateY(-1px) scale(1.02);
}

/* Stats en temps réel sous le CTA */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 3rem;
    flex-wrap: wrap;
    animation: hero-stats-fade 1.8s ease-out 0.9s both;
}

@keyframes hero-stats-fade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.hero-stat-value {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--primary-color);
    text-shadow: 0 0 20px rgba(236, 150, 0, 0.5);
    font-family: 'Roboto', sans-serif;
    animation: hero-stat-count 2s ease-out;
}

@keyframes hero-stat-count {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.hero-stat-label {
    font-size: 0.9rem;
    color: white;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.hero-stat-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
    animation: hero-stat-icon-bounce 2s ease-in-out infinite;
}

@keyframes hero-stat-icon-bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* Indicateur de scroll en bas */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    animation: scroll-indicator-bounce 2s ease-in-out infinite;
}

@keyframes scroll-indicator-bounce {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
    50% {
        transform: translateX(-50%) translateY(10px);
        opacity: 0.5;
    }
}

.scroll-indicator i {
    font-size: 2rem;
    color: var(--primary-color);
    opacity: 0.7;
}

/* Responsive */
@media (max-width: 768px) {
    .hero {
        min-height: calc(100vh - 60px);
    }

    .hero-content {
        padding: 1.5rem;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .btn-primary.btn-large {
        font-size: 1rem;
        padding: 1rem 2rem;
    }

    .hero-stats {
        gap: 2rem;
    }

    .hero-stat-value {
        font-size: 2rem;
    }

    .hero-stat-label {
        font-size: 0.8rem;
    }
}

/* Mode sombre - ajustements si nécessaire */
[data-theme="dark"] .hero {
    background: linear-gradient(135deg, #050806 0%, #0f1410 100%);
}

/* Effet de parallaxe léger au scroll */
@media (prefers-reduced-motion: no-preference) {
    .hero-background {
        transition: transform 0.1s ease-out;
    }
}
