/* =================================================================
   ANIMATIONS — Keyframes, scroll reveals, micro-interactions
   Source : Maquette approuvée Simplement Vous
   ================================================================= */

/* ----- Hero fade up on load ----- */

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

.hero-content {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 1s var(--ease-out) forwards 0.2s;
}

/* ----- Signature Handwriting Effect ----- */

@keyframes writeSignature {
    0% { clip-path: inset(0 100% 0 0); opacity: 0; }
    5% { opacity: 1; }
    100% { clip-path: inset(0 -10% 0 0); opacity: 1; }
}

.signature {
    clip-path: inset(0 100% 0 0);
}
.reveal-on-scroll.is-visible .signature, /* Inside philosophy reveal */
.signature.is-visible {
    animation: writeSignature 2.5s cubic-bezier(0.5, 0, 0.2, 1) forwards 0.5s;
}

/* ----- Scroll reveal ----- */

.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity var(--t-reveal) var(--ease-out),
                transform var(--t-reveal) var(--ease-out);
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered delays for card grids */

.reveal-on-scroll:nth-child(2) {
    transition-delay: 0.1s;
}

.reveal-on-scroll:nth-child(3) {
    transition-delay: 0.2s;
}

.reveal-on-scroll:nth-child(4) {
    transition-delay: 0.3s;
}

.reveal-on-scroll:nth-child(5) {
    transition-delay: 0.4s;
}

/* ----- Continuous subtle animations (movement) ----- */

@keyframes scaleSlowZoom {
    0% { scale: 1; }
    50% { scale: 1.05; }
    100% { scale: 1; }
}

@keyframes translateFloat {
    0% { translate: 0 0; }
    50% { translate: 0 -8px; }
    100% { translate: 0 0; }
}

@keyframes translateFloatBadge {
    0% { translate: 0 0; }
    50% { translate: 0 -12px; }
    100% { translate: 0 0; }
}

@keyframes twinkleStar {
    0%, 100% { opacity: 1; scale: 1; }
    50% { opacity: 0.7; scale: 0.95; }
}

@keyframes pulseButton {
    0%, 100% { scale: 1; }
    50% { scale: 1.01; }
}

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

@keyframes expandLine {
    0%, 100% { transform: scaleX(1); opacity: 0.6; }
    50% { transform: scaleX(1.3); opacity: 1; }
}

@keyframes breathSpacing {
    0%, 100% { letter-spacing: 0.1em; }
    50% { letter-spacing: 0.12em; }
}

@keyframes floatReview {
    0%, 100% { translate: 0 0; }
    50% { translate: 0 -4px; }
}



/* Applications */
.btn {
    animation: pulseButton 6s ease-in-out infinite;
}

.serif-italic {
    display: inline-block;
    animation: waveItalic 7s ease-in-out infinite;
    transform-origin: center center;
}

.uppercase-track {
    animation: breathSpacing 5s ease-in-out infinite;
}

.service-decorative-line {
    animation: expandLine 4s ease-in-out infinite;
    transform-origin: left center;
}

.review-card {
    animation: floatReview 8s ease-in-out infinite;
}
.review-card:nth-child(even) {
    animation-delay: -4s;
}



.hero-bg-wrapper img {
    animation: scaleSlowZoom 25s ease-in-out infinite;
    transform-origin: center center;
}

.philo-img-main,
.gallery-item img {
    animation: scaleSlowZoom 20s ease-in-out infinite alternate-reverse;
}

.philo-badge {
    animation: translateFloatBadge 8s ease-in-out infinite alternate;
}

.service-icon-box {
    animation: translateFloat 6s ease-in-out infinite;
}
.service-list .service-card:nth-child(2n) .service-icon-box {
    animation-delay: -2s;
}
.service-list .service-card:nth-child(3n) .service-icon-box {
    animation-delay: -4s;
}

.review-stars i {
    animation: twinkleStar 4s ease-in-out infinite;
}
.review-stars i:nth-child(1) { animation-delay: 0.1s; }
.review-stars i:nth-child(2) { animation-delay: 0.3s; }
.review-stars i:nth-child(3) { animation-delay: 0.5s; }
.review-stars i:nth-child(4) { animation-delay: 0.7s; }
.review-stars i:nth-child(5) { animation-delay: 0.9s; }

@keyframes beatNumbers {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); color: var(--c-primary-dark); }
}

.stat-item h4 {
    animation: beatNumbers 5s ease-in-out infinite;
}
.stat-item:nth-child(2) h4 { animation-delay: 1s; }
.stat-item:nth-child(3) h4 { animation-delay: 2s; }

@keyframes socialFloat {
    0%, 100% { transform: translateY(0) rotate(0); }
    50% { transform: translateY(-3px) rotate(3deg); }
}

.info-socials a {
    animation: socialFloat 6s ease-in-out infinite alternate;
}

.footer-nav a[href*="instagram"], .footer-nav a[href*="facebook"] {
    display: inline-block;
    animation: socialFloat 6s ease-in-out infinite alternate;
}
.info-socials a:nth-child(even), .footer-nav a:nth-child(even) {
    animation-direction: alternate-reverse;
}



/* ----- Reduced motion ----- */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms;
        animation-iteration-count: 1;
        transition-duration: 0.01ms;
        scroll-behavior: auto;
    }

    .hero-content {
        opacity: 1;
        transform: none;
        animation: none;
    }

    .reveal-on-scroll {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

