/* Styles pour les animations parallax et scroll */

/* Élément avec data-reveal - caché par défaut */
[data-reveal] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

/* Élément révélé */
[data-reveal].revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Effet parallax - transition fluide */
[data-parallax],
[data-mouse-parallax] {
    transition: transform 0.1s ease-out;
    will-change: transform;
}

/* Background parallax */
[data-parallax-bg] {
    background-attachment: scroll;
    background-size: cover;
    background-repeat: no-repeat;
}

/* Animations personnalisées supplémentaires */
.fade-in-up {
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-left {
    animation: fadeInLeft 1s ease-out;
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-in-right {
    animation: fadeInRight 1s ease-out;
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.scale-in {
    animation: scaleIn 0.8s ease-out;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.rotate-in {
    animation: rotateIn 1s ease-out;
}

@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-10deg) scale(0.9);
    }
    to {
        opacity: 1;
        transform: rotate(0) scale(1);
    }
}

/* Effet de flottement */
.float-animation {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Effet de pulsation */
.pulse-animation {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Effet de balancement */
.swing-animation {
    animation: swing 2s ease-in-out infinite;
    transform-origin: top center;
}

@keyframes swing {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(3deg);
    }
    75% {
        transform: rotate(-3deg);
    }
}

/* Effet de rebond */
.bounce-animation {
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

/* Effet de glissement horizontal */
.slide-animation {
    animation: slide 20s linear infinite;
}

@keyframes slide {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Optimisation des performances */
[data-parallax],
[data-mouse-parallax],
[data-parallax-bg],
[data-reveal] {
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Transitions fluides pour les hovers */
.smooth-transition {
    transition: all 0.3s ease-in-out;
}

/* Effet de zoom au hover */
.zoom-hover {
    transition: transform 0.3s ease-in-out;
}

.zoom-hover:hover {
    transform: scale(1.05);
}

/* Effet de brillance */
.shine-effect {
    position: relative;
    overflow: hidden;
}

.shine-effect::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.shine-effect:hover::before {
    left: 100%;
}

/* Effet de surbrillance */
.glow-on-hover {
    transition: box-shadow 0.3s ease-in-out;
}

.glow-on-hover:hover {
    box-shadow: 0 0 20px rgba(0, 149, 64, 0.6);
}

/* Désactiver les animations pour les utilisateurs qui préfèrent réduire les mouvements */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    [data-parallax],
    [data-mouse-parallax],
    [data-parallax-bg] {
        transform: none !important;
    }
}
