/* 
   NEXA - Styles pour le défilement fluide
   Animations et transitions pour améliorer l'expérience utilisateur
*/

/* Indicateur de progression de défilement - désactivé */
.scroll-progress {
    display: none;
}

/* Bouton retour en haut */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--color-accent-gradient);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2), 0 0 15px rgba(154, 97, 255, 0.3);
    z-index: 900;
    animation: pulse-light 2s infinite alternate;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3), 0 0 20px rgba(154, 97, 255, 0.5);
}

.back-to-top.clicked {
    transform: scale(0.9);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.back-to-top i {
    font-size: 1.2rem;
}

/* Animations d'entrée pour les éléments */
.animate-ready {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Animation échelonnée pour les éléments en grille */
.feature-item.animate-ready {
    transition-delay: calc(var(--item-index, 0) * 100ms);
}

/* Animation spéciale pour les titres de section */
.section-header.animate-ready h2 {
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s ease;
    transition-delay: 0.1s;
}

.section-header.animate-in h2 {
    transform: translateY(0);
    opacity: 1;
}

.section-header.animate-ready p {
    transform: translateY(15px);
    opacity: 0;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s ease;
    transition-delay: 0.3s;
}

.section-header.animate-in p {
    transform: translateY(0);
    opacity: 1;
}

/* Animation pour les cartes */
.offer-card.animate-ready {
    transform: translateY(40px);
    opacity: 0;
    transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1), opacity 1s ease, box-shadow 0.3s ease;
}

.offer-card.animate-in {
    transform: translateY(0);
    opacity: 1;
}

/* Animation pour le contenu hero */
.hero-content.animate-ready h1 {
    transform: translateY(30px);
    opacity: 0;
    transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1), opacity 1s ease;
    transition-delay: 0.2s;
}

.hero-content.animate-in h1 {
    transform: translateY(0);
    opacity: 1;
}

.hero-content.animate-ready p {
    transform: translateY(20px);
    opacity: 0;
    transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1), opacity 1s ease;
    transition-delay: 0.4s;
}

.hero-content.animate-in p {
    transform: translateY(0);
    opacity: 1;
}

.hero-content.animate-ready .hero-cta {
    transform: translateY(15px);
    opacity: 0;
    transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1), opacity 1s ease;
    transition-delay: 0.6s;
}

.hero-content.animate-in .hero-cta {
    transform: translateY(0);
    opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .back-to-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
    }
}

@media (max-width: 480px) {
    .back-to-top {
        width: 40px;
        height: 40px;
        bottom: 15px;
        right: 15px;
    }
    
    .back-to-top i {
        font-size: 1rem;
    }
}

/* Animation de pulsation pour le bouton */
@keyframes pulse-light {
    0% {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2), 0 0 15px rgba(154, 97, 255, 0.3);
    }
    100% {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 0 0 25px rgba(154, 97, 255, 0.5);
    }
}
