﻿/**
 * Institut Belle Harmonie - Animations CSS
 * Animations subtiles et élégantes
 * Version AAA+ optimisée performance
 */

/* ============================================
   SCROLL ANIMATIONS - SYSTÈME COMPLET
   ============================================ */

/* États de base pour scroll animations */
.scroll-animate-ready {
    opacity: 0;
    will-change: opacity, transform;
}

.scroll-animated {
    opacity: 1 !important;
}

/* Optimisation performance - GPU acceleration */
[data-animate] {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* ============================================
   ANIMATIONS GÉNÉRALES
   ============================================ */

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

.fade-in-down {
    animation: fadeInDown 0.6s ease forwards;
}

.fade-in-left {
    animation: fadeInLeft 0.6s ease forwards;
}

.fade-in-right {
    animation: fadeInRight 0.6s ease forwards;
}

.scale-in {
    animation: scaleIn 0.4s ease forwards;
}

.slide-in-up {
    animation: slideInUp 0.5s ease forwards;
}

/* ============================================
   KEYFRAMES
   ============================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

/* ============================================
   ANIMATIONS DE SCROLL
   ============================================ */

[data-scroll] {
    opacity: 0;
    transition: all 0.6s ease;
}

[data-scroll].visible {
    opacity: 1;
}

[data-scroll="fade"] {
    transform: translateY(30px);
}

[data-scroll="fade"].visible {
    transform: translateY(0);
}

[data-scroll="slide-left"] {
    transform: translateX(-50px);
}

[data-scroll="slide-left"].visible {
    transform: translateX(0);
}

[data-scroll="slide-right"] {
    transform: translateX(50px);
}

[data-scroll="slide-right"].visible {
    transform: translateX(0);
}

[data-scroll="zoom"] {
    transform: scale(0.8);
}

[data-scroll="zoom"].visible {
    transform: scale(1);
}

/* ============================================
   ANIMATIONS DE HOVER
   ============================================ */

.hover-grow {
    transition: transform 0.3s ease;
}

.hover-grow:hover {
    transform: scale(1.05);
}

.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.hover-shine {
    position: relative;
    overflow: hidden;
}

.hover-shine::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 ease;
}

.hover-shine:hover::before {
    left: 100%;
}

/* ============================================
   PULSE EFFECT (pour nouveautés)
   ============================================ */

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

/* ============================================
   SHIMMER EFFECT (pour loading)
   ============================================ */

.shimmer {
    background: linear-gradient(
        90deg,
        #f0f0f0 25%,
        #e0e0e0 50%,
        #f0f0f0 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ============================================
   ANIMATIONS STAGGER (échelonnées)
   ============================================ */

.stagger-fade > * {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.stagger-fade > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-fade > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-fade > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-fade > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-fade > *:nth-child(5) { animation-delay: 0.5s; }
.stagger-fade > *:nth-child(6) { animation-delay: 0.6s; }
.stagger-fade > *:nth-child(7) { animation-delay: 0.7s; }
.stagger-fade > *:nth-child(8) { animation-delay: 0.8s; }
.stagger-fade > *:nth-child(9) { animation-delay: 0.9s; }
.stagger-fade > *:nth-child(10) { animation-delay: 1s; }

/* ============================================
   FLOATING ANIMATION
   ============================================ */

.floating {
    animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* ============================================
   GLOW EFFECT
   ============================================ */

.glow {
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(212, 175, 55, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(212, 175, 55, 0.8);
    }
}


