/* ================================================================
   CMD STUDIO — ANIMATIONS PREMIUM
   Awwwards-level · sobre · fluide · haut de gamme
   ================================================================ */

/* ── Ease customs ── */
:root {
  --ease-expo:   cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-quart:  cubic-bezier(0.25, 1, 0.5, 1);
}

/* ================================================================
   1. PAGE FADE-IN
   ================================================================ */
body { animation: pageFadeIn 0.35s ease both; }
@keyframes pageFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ================================================================
   2. SCROLL REVEAL — variantes
   ================================================================ */
.reveal        { opacity: 0; transform: translateY(32px);  transition: opacity 0.55s var(--ease-expo), transform 0.55s var(--ease-expo); will-change: opacity, transform; }
.reveal-left   { opacity: 0; transform: translateX(-32px); transition: opacity 0.55s var(--ease-expo), transform 0.55s var(--ease-expo); }
.reveal-right  { opacity: 0; transform: translateX(32px);  transition: opacity 0.55s var(--ease-expo), transform 0.55s var(--ease-expo); }
.reveal-scale  { opacity: 0; transform: scale(0.94);       transition: opacity 0.55s var(--ease-expo), transform 0.55s var(--ease-expo); }

.reveal.visible, .reveal-left.visible, .reveal-right.visible, .reveal-scale.visible {
  opacity: 1; transform: none;
}

.reveal-delay-1 { transition-delay: 80ms;  }
.reveal-delay-2 { transition-delay: 160ms; }
.reveal-delay-3 { transition-delay: 240ms; }
.reveal-delay-4 { transition-delay: 320ms; }
.reveal-delay-5 { transition-delay: 400ms; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-left, .reveal-right, .reveal-scale {
    opacity: 1 !important; transform: none !important; transition: none !important;
  }
}

/* ================================================================
   3. HERO — cascade entrée
   ================================================================ */
.hero-copy .tag          { animation: heroUp 0.7s var(--ease-expo) 0.1s both; }
.hero-copy .display      { animation: heroUp 0.8s var(--ease-expo) 0.22s both; }
.hero-copy .lead         { animation: heroUp 0.8s var(--ease-expo) 0.36s both; }
.hero-copy .hero-actions { animation: heroUp 0.7s var(--ease-expo) 0.5s both; }
.hero-copy .hero-stats   { animation: heroUp 0.7s var(--ease-expo) 0.62s both; }
.hero-visual             { animation: heroUp 1s var(--ease-expo) 0.28s both; }

@keyframes heroUp {
  from { opacity:0; transform: translateY(28px); }
  to   { opacity:1; transform: none; }
}

/* Éléments flottants du hero */
.hero-badge {
  animation: heroBadge 1.2s var(--ease-expo) 0.9s both;
}
.hero-card {
  animation: heroCard 1.2s var(--ease-expo) 1.1s both;
}
@keyframes heroBadge {
  from { opacity:0; transform: translateX(-20px) scale(0.9); }
  to   { opacity:1; transform: none; }
}
@keyframes heroCard {
  from { opacity:0; transform: translateX(20px) scale(0.9); }
  to   { opacity:1; transform: none; }
}

/* Lévitation douce du badge */
.hero-badge {
  animation: heroBadge 1.2s var(--ease-expo) 0.9s both,
             float 4s ease-in-out 2s infinite alternate;
}
.hero-card {
  animation: heroCard 1.2s var(--ease-expo) 1.1s both,
             float 5s ease-in-out 2.2s infinite alternate;
}
@keyframes float {
  from { transform: translateY(0); }
  to   { transform: translateY(-8px); }
}

/* ================================================================
   4. FOND HERO — particules animées
   ================================================================ */
.hero-bg::before { animation: bgFloat1 12s ease-in-out infinite alternate; }
.hero-bg::after  { animation: bgFloat2 14s ease-in-out infinite alternate; }
@keyframes bgFloat1 {
  from { transform: translate(0,0) scale(1); opacity: 0.8; }
  to   { transform: translate(3%,5%) scale(1.1); opacity: 1; }
}
@keyframes bgFloat2 {
  from { transform: translate(0,0) scale(1); opacity: 0.7; }
  to   { transform: translate(-3%,-4%) scale(1.12); opacity: 1; }
}

/* ================================================================
   5. GRILLE HERO — parallax
   ================================================================ */
.hero-grid { will-change: transform; }

/* ================================================================
   6. NAV
   ================================================================ */
.nav-menu > a {
  transition: color 160ms ease;
}
.nav-menu > a::after {
  transition: width 0.3s var(--ease-expo);
}
.nav { transition: background 0.3s ease, padding 0.3s ease, box-shadow 0.3s ease; }

/* ================================================================
   7. BOUTONS
   ================================================================ */
.btn {
  transition:
    transform 280ms var(--ease-spring),
    box-shadow 160ms ease,
    background 160ms ease,
    color 160ms ease;
}
.btn:hover  { }
.btn:active { transform: scale(0.97) translateY(1px); }

/* ================================================================
   8. CARDS
   ================================================================ */
.card, .service-card, .realization-card, .testimonial-card {
  transition: transform 0.3s var(--ease-quart), box-shadow 0.3s var(--ease-quart), border-color 160ms ease, background 160ms ease;
}

/* ================================================================
   9. PHOTO STRIP — expansion au hover
   ================================================================ */
.photo-strip-img {
  transition: flex 0.5s var(--ease-expo);
}
.photo-strip-img img {
  transition: filter 0.5s ease, transform 0.5s var(--ease-quart);
}

/* ================================================================
   10. TAG — shimmer
   ================================================================ */
.tag { position: relative; overflow: hidden; }
.tag::before {
  content: '';
  position: absolute;
  top: 0; left: -120%;
  width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(245,158,11,0.15), transparent);
  animation: tagShimmer 4s ease-in-out infinite;
}
@keyframes tagShimmer {
  0%  { left: -120%; }
  40% { left: 150%;  }
  100%{ left: 150%;  }
}

/* ================================================================
   11. SECTION WARM — glow pulsant
   ================================================================ */
.section-warm { position: relative; overflow: hidden; }
.section-warm::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(37,99,235,0.06) 0%, transparent 70%);
  animation: sectionGlow 8s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes sectionGlow {
  from { opacity:0.5; transform: translate(-50%,-50%) scale(0.88); }
  to   { opacity:1;   transform: translate(-50%,-50%) scale(1.12); }
}

/* ================================================================
   12. CTA BOX — gradient animé
   ================================================================ */
.cta-box::before {
  animation: ctaGlow 8s ease-in-out infinite alternate;
}
@keyframes ctaGlow {
  from { opacity: 0.7; }
  to   { opacity: 1.3; }
}

/* ================================================================
   13. MARQUEE
   ================================================================ */
.marquee-track { animation: marqueeScroll 30s linear infinite; }
.marquee-section:hover .marquee-track { animation-play-state: paused; }
.marquee-item { transition: color 160ms ease; }

/* ================================================================
   14. FOOTER LINKS
   ================================================================ */
.footer-col ul li a {
  transition: color 160ms ease, padding-left 0.25s var(--ease-expo);
}

/* ================================================================
   15. FORMULAIRE — focus
   ================================================================ */
.form-group input,
.form-group textarea,
.form-group select {
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 0.25s var(--ease-spring);
}

/* ================================================================
   16. CONTACT METHODS
   ================================================================ */
.contact-method {
  transition: transform 200ms var(--ease-quart), border-color 160ms ease, background 160ms ease;
}
.contact-method-icon { transition: transform 0.3s var(--ease-spring); }

/* ================================================================
   17. LOGO — subtle hover
   ================================================================ */
.nav-logo { transition: opacity 160ms ease; }
.nav-logo-img { transition: transform 0.3s var(--ease-spring); }

/* ================================================================
   18. HIGHLIGHT BAR
   ================================================================ */
.highlight-bar {
  transition: transform 200ms var(--ease-quart), border-color 160ms ease, background 160ms ease;
}

/* ================================================================
   19. FAQ
   ================================================================ */
.faq-chevron { transition: transform 0.35s var(--ease-expo), color 160ms ease; }
.faq-answer  { transition: max-height 0.45s var(--ease-expo), padding 0.3s ease, opacity 0.3s ease; }
.faq-item    { transition: border-color 160ms ease, background 160ms ease; }

/* ================================================================
   20. CURSOR GLOW — lerp via JS
   ================================================================ */
.cursor-glow { transition: opacity 0.3s ease; }

/* ================================================================
   21. STAT NUMS — hover
   ================================================================ */
.hero-stat-num {
  display: inline-block;
  transition: transform 0.3s var(--ease-spring), color 160ms ease;
}
.hero-stat-num:hover { transform: scale(1.08); }

/* ================================================================
   22. CARD ICON
   ================================================================ */
.card-icon { transition: transform 0.3s var(--ease-spring), background 160ms ease; }
.card:hover .card-icon { transform: scale(1.1) rotate(-5deg); }

/* ================================================================
   23. RÉALISATION CARD — image zoom
   ================================================================ */
.realization-img img { transition: transform 0.55s var(--ease-quart); }
.realization-card:hover .realization-img img { transform: scale(1.06); }

/* ================================================================
   24. PROCESS STEP — num color
   ================================================================ */
.step-num { transition: color 0.4s var(--ease-expo); }

/* ================================================================
   25. TESTIMONIAL
   ================================================================ */
.testimonial-img img { transition: transform 0.4s var(--ease-quart); }
.testimonial-card:hover .testimonial-img img { transform: scale(1.06); }

/* ================================================================
   26. SPINNER FORM SUBMIT
   ================================================================ */
.btn-loading { position: relative; pointer-events: none; opacity: 0.8; }
.btn-loading::before {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  border: 2px solid rgba(0,0,0,0.2);
  border-top-color: var(--night);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  right: 18px; top: 50%; transform: translateY(-50%);
}
@keyframes spin { to { transform: translateY(-50%) rotate(360deg); } }
