/* ============================================================
   AFERV MOTION · 03/08/2026
   Animations sobres (parité Espace Yazid, transposée charte verte) :
   1. Entrée du hero en CSS pur (aucun flash de contenu)
   2. Reveal au scroll (.aferv-reveal, ajouté par aferv-motion.js
      uniquement SOUS le pli)
   3. Lift des cartes au survol
   4. Filet d'eyebrow animé (balayage vert)
   Tout est coupé par prefers-reduced-motion.
   ============================================================ */

@keyframes afervRise {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}
@keyframes afervSweep {
  0%   { background-position: 0% 0; }
  100% { background-position: 200% 0; }
}

/* 1 · Entrée hero (s'applique au premier rendu, pas de FOUC) */
.aferv-home__hero .aferv-home__container > *,
section.hero .wrap > *,
.aferv-offres__hero > *,
.aferv-contact__hero > * {
  animation: afervRise 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.aferv-home__hero .aferv-home__container > *:nth-child(2),
section.hero .wrap > *:nth-child(2),
.aferv-offres__hero > *:nth-child(2),
.aferv-contact__hero > *:nth-child(2) { animation-delay: 0.08s; }
.aferv-home__hero .aferv-home__container > *:nth-child(3),
section.hero .wrap > *:nth-child(3),
.aferv-offres__hero > *:nth-child(3),
.aferv-contact__hero > *:nth-child(3) { animation-delay: 0.16s; }
.aferv-home__hero .aferv-home__container > *:nth-child(4),
section.hero .wrap > *:nth-child(4),
.aferv-offres__hero > *:nth-child(4),
.aferv-contact__hero > *:nth-child(4) { animation-delay: 0.24s; }
.aferv-home__hero .aferv-home__container > *:nth-child(5),
section.hero .wrap > *:nth-child(5),
.aferv-offres__hero > *:nth-child(5),
.aferv-contact__hero > *:nth-child(5) { animation-delay: 0.32s; }
.aferv-home__hero .aferv-home__container > *:nth-child(n+6),
section.hero .wrap > *:nth-child(n+6),
.aferv-offres__hero > *:nth-child(n+6),
.aferv-contact__hero > *:nth-child(n+6) { animation-delay: 0.4s; }

/* 2 · Reveal au scroll (classe posée par aferv-motion.js) */
.aferv-reveal {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.65s cubic-bezier(0.2, 0.8, 0.2, 1),
    transform 0.65s cubic-bezier(0.2, 0.8, 0.2, 1);
  transition-delay: var(--aferv-d, 0s);
}
.aferv-reveal.aferv-in {
  opacity: 1;
  transform: none;
}

/* 3 · Lift des cartes au survol */
.aferv-home__pillar,
.studio-page .card,
.mcard {
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.aferv-home__pillar:hover,
.studio-page .card:hover,
.mcard:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 48px rgba(8, 8, 8, 0.10);
}

/* 4 · Filet d'eyebrow animé (balayage vert discret) */
.aferv-home__eyebrow-text::before {
  background: linear-gradient(90deg, #01D662, #7ff0b4, #01D662);
  background-size: 200% 100%;
  animation: afervSweep 5.5s linear infinite;
}

/* Accessibilité : tout est coupé si l'utilisateur refuse le mouvement */
@media (prefers-reduced-motion: reduce) {
  .aferv-home__hero .aferv-home__container > *,
  section.hero .wrap > *,
  .aferv-offres__hero > *,
  .aferv-contact__hero > *,
  .aferv-home__eyebrow-text::before {
    animation: none !important;
  }
  .aferv-reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .aferv-home__pillar,
  .studio-page .card,
  .mcard {
    transition: none !important;
  }
  .aferv-home__pillar:hover,
  .studio-page .card:hover,
  .mcard:hover {
    transform: none !important;
  }
}
