/**
 * N'ZI GROUP BUSINESS — High-Performance Scroll & Micro-Interactions System
 * "Tout part d'un plan"
 * Standards: 60fps GPU acceleration (transform & opacity only), responsive, subtle luxury easing
 */

:root {
  --ease-luxury: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-bounce-soft: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ==================================================
   KEYFRAMES ACCÉLÉRÉES SUR COMPOSITEUR GPU
================================================== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes propCardEntrance {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes pulseGlow {
  0% {
    box-shadow: 0 0 0 0 rgba(201, 151, 36, 0.4);
  }
  70% {
    box-shadow: 0 0 0 16px rgba(201, 151, 36, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(201, 151, 36, 0);
  }
}

@keyframes pulseWhatsApp {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5);
  }
  70% {
    box-shadow: 0 0 0 16px rgba(37, 211, 102, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

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

/* ==================================================
   SÉQUENCE D'ENTRÉE DU HERO (ON LOAD)
================================================== */
.hero-anim-1 {
  animation: fadeInUp 0.75s var(--ease-luxury) 0.08s both;
}

.hero-anim-2 {
  animation: fadeInUp 0.85s var(--ease-luxury) 0.22s both;
}

.hero-anim-3 {
  animation: fadeInUp 0.85s var(--ease-luxury) 0.36s both;
}

.hero-anim-4 {
  animation: fadeInUp 0.85s var(--ease-luxury) 0.50s both;
}

.hero-anim-5 {
  animation: scaleIn 0.9s var(--ease-luxury) 0.65s both;
}

/* ==================================================
   MOTEUR SCROLL REVEAL (INTERSECTION OBSERVER)
================================================== */
/* 1. Révélation standard : Fondu vers le haut */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.75s var(--ease-luxury), transform 0.75s var(--ease-luxury);
  will-change: opacity, transform;
}

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

/* 2. Révélation échelle douce (cartes, visuels bento) */
.reveal-scale {
  opacity: 0;
  transform: scale(0.97);
  transition: opacity 0.75s var(--ease-luxury), transform 0.75s var(--ease-luxury);
  will-change: opacity, transform;
}

.reveal-scale.is-revealed {
  opacity: 1;
  transform: scale(1);
}

/* 3. Révélation latérale gauche (portraits, split layouts) */
.reveal-left {
  opacity: 0;
  transform: translateX(-24px);
  transition: opacity 0.8s var(--ease-luxury), transform 0.8s var(--ease-luxury);
  will-change: opacity, transform;
}

.reveal-left.is-revealed {
  opacity: 1;
  transform: translateX(0);
}

/* 4. Révélation latérale droite */
.reveal-right {
  opacity: 0;
  transform: translateX(24px);
  transition: opacity 0.8s var(--ease-luxury), transform 0.8s var(--ease-luxury);
  will-change: opacity, transform;
}

.reveal-right.is-revealed {
  opacity: 1;
  transform: translateX(0);
}

/* 5. Révélation fondu pur */
.reveal-fade {
  opacity: 0;
  transition: opacity 0.75s var(--ease-luxury);
  will-change: opacity;
}

.reveal-fade.is-revealed {
  opacity: 1;
}

/* ==================================================
   SYSTÈME DE DÉLAIS CASCADES (STAGGER)
================================================== */
.stagger-1 { transition-delay: 0.08s; }
.stagger-2 { transition-delay: 0.16s; }
.stagger-3 { transition-delay: 0.24s; }
.stagger-4 { transition-delay: 0.32s; }
.stagger-5 { transition-delay: 0.40s; }
.stagger-6 { transition-delay: 0.48s; }

/* ==================================================
   ANIMATION DYNAMIQUE DES CARTES DU CATALOGUE, TÉMOIGNAGES & BLOG
================================================== */
.nzi-property-card-outer {
  animation: propCardEntrance 0.65s var(--ease-luxury) both;
  animation-delay: var(--stagger-delay, 0ms);
}

.nzi-testimonial-card,
.nzi-blog-card {
  opacity: 1;
  animation: propCardEntrance 0.6s var(--ease-luxury) both;
}

.nzi-testimonial-card.stagger-1,
.nzi-blog-card.stagger-1 {
  animation-delay: 0.08s;
}

.nzi-testimonial-card.stagger-2,
.nzi-blog-card.stagger-2 {
  animation-delay: 0.16s;
}

.nzi-testimonial-card.stagger-3,
.nzi-blog-card.stagger-3 {
  animation-delay: 0.24s;
}

/* ==================================================
   BARRE DE PROGRESSION DE LECTURE DU DÉFILEMENT
================================================== */
.nzi-scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #C99724 0%, #D4AF37 50%, #315A18 100%);
  transform-origin: 0% 50%;
  transform: scaleX(0);
  z-index: 10001;
  pointer-events: none;
  transition: transform 0.08s linear;
  will-change: transform;
}

/* ==================================================
   ACCESSIBILITÉ : MOUVEMENT RÉDUIT (WCAG 2.2)
================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal-on-scroll,
  .reveal-scale,
  .reveal-left,
  .reveal-right,
  .reveal-fade,
  .nzi-property-card-outer {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    animation: none !important;
  }
  .nzi-scroll-progress-bar {
    display: none !important;
  }
}
