/* ─────────────────────────────────────────
   EMS TRAVAUX — animations.css
   Animations CSS premium : keyframes, reveal, transitions
───────────────────────────────────────── */

/* ═══════════════ HERO ANIMATIONS ═══════════════ */

/* Zoom lent image hero */
@keyframes hero-zoom {
  from { transform: scale(1.08); }
  to   { transform: scale(1); }
}

.hero__bg-img {
  animation: hero-zoom 2.8s var(--ease-smooth) forwards;
}

/* Scroll indicator pulse */
@keyframes scroll-pulse {
  0%, 100% { opacity: 0.4; transform: scaleY(1); }
  50%       { opacity: 0.8; transform: scaleY(0.6); }
}

.hero__scroll-line {
  animation: scroll-pulse 2.2s ease-in-out infinite;
}

/* ═══════════════ HERO CONTENT REVEAL ═══════════════ */
/* État initial — sera piloté par JS */
.reveal-up {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity var(--t-slow) var(--ease-out),
    transform var(--t-slow) var(--ease-out);
}

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

/* Délais en cascade pour groupes d'éléments */
.reveal-up:nth-child(1) { transition-delay: 0ms; }
.reveal-up:nth-child(2) { transition-delay: 80ms; }
.reveal-up:nth-child(3) { transition-delay: 160ms; }
.reveal-up:nth-child(4) { transition-delay: 240ms; }
.reveal-up:nth-child(5) { transition-delay: 320ms; }
.reveal-up:nth-child(6) { transition-delay: 400ms; }

/* Reveal par clip-path pour les images */
.reveal-clip {
  clip-path: inset(0 0 100% 0);
  transition: clip-path 1.1s var(--ease-out);
}

.reveal-clip.is-visible {
  clip-path: inset(0 0 0% 0);
}

/* ═══════════════ REVEAL HERO SÉQUENTIEL ═══════════════ */
.hero__eyebrow.reveal-up { transition-delay: 300ms; }
.hero__title.reveal-up   { transition-delay: 500ms; }
.hero__baseline.reveal-up { transition-delay: 700ms; }
.hero__text.reveal-up    { transition-delay: 850ms; }
.hero__actions.reveal-up { transition-delay: 1000ms; }

/* ═══════════════ MARQUEE RÉFÉRENCES ═══════════════ */
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.references__track {
  animation: marquee 28s linear infinite;
}

@media (hover: hover) {
  .references__marquee:hover .references__track {
    animation-play-state: paused;
  }
}

/* ═══════════════ MÉTHODE — LINE DRAW ═══════════════ */
@keyframes line-draw {
  from { transform-origin: left; transform: scaleX(0); }
  to   { transform-origin: left; transform: scaleX(1); }
}

.methode__timeline::before {
  animation: line-draw 1.4s var(--ease-out) both;
  animation-play-state: paused;
}

.methode__timeline.is-visible::before {
  animation-play-state: running;
}

/* Étapes méthode — état initial géré par style.css (opacity: 0.28 → 1 via is-active) */

/* ═══════════════ GALLERY ITEMS ═══════════════ */
.gallery-item {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.55s var(--ease-out),
    transform 0.55s var(--ease-out);
}

.gallery-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Délais en cascade pour la grille */
.gallery-item:nth-child(1)  { transition-delay: 0ms; }
.gallery-item:nth-child(2)  { transition-delay: 60ms; }
.gallery-item:nth-child(3)  { transition-delay: 120ms; }
.gallery-item:nth-child(4)  { transition-delay: 80ms; }
.gallery-item:nth-child(5)  { transition-delay: 140ms; }
.gallery-item:nth-child(6)  { transition-delay: 200ms; }
.gallery-item:nth-child(7)  { transition-delay: 100ms; }
.gallery-item:nth-child(8)  { transition-delay: 160ms; }
.gallery-item:nth-child(9)  { transition-delay: 220ms; }
.gallery-item:nth-child(10) { transition-delay: 180ms; }
.gallery-item:nth-child(11) { transition-delay: 240ms; }

/* ═══════════════ EQUIPE CARDS ═══════════════ */
.equipe__card {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.5s var(--ease-out),
    transform 0.5s var(--ease-out),
    background-color var(--t-base) var(--ease-smooth);
}

.equipe__card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.equipe__card:nth-child(1) { transition-delay: 0ms; }
.equipe__card:nth-child(2) { transition-delay: 80ms; }
.equipe__card:nth-child(3) { transition-delay: 160ms; }
.equipe__card:nth-child(4) { transition-delay: 240ms; }
.equipe__card:nth-child(5) { transition-delay: 320ms; }

/* expertise-item — activation pilotée par scroll-lock (JS + style.css) */


/* ═══════════════ PARALLAX ═══════════════ */
.hero__bg-img,
.cta-section__bg-img {
  will-change: transform;
}

/* ═══════════════ FILTER TRANSITION GALLERY ═══════════════ */
.gallery-item.is-hiding {
  animation: item-hide 0.3s var(--ease-smooth) forwards;
}

.gallery-item.is-showing {
  animation: item-show 0.4s var(--ease-out) forwards;
}

@keyframes item-hide {
  from { opacity: 1; transform: scale(1); }
  to   { opacity: 0; transform: scale(0.96); }
}

@keyframes item-show {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}

/* ═══════════════ NAV ENTRANCE ═══════════════ */
/* Géré dans style.css — ne pas redéfinir ici pour éviter de bloquer
   la propriété transform qui pilote le glissement bas → haut */

/* ═══════════════ CTA BG PARALLAX ═══════════════ */
.cta-section__bg-img {
  transform-origin: center;
  transition: transform 0.1s linear;
}

/* ═══════════════ SCROLL HINT ═══════════════ */
@keyframes hint-bob-down {
  0%, 100% { opacity: 0.3; transform: rotate(45deg) translate(0, 0); }
  50%       { opacity: 1;   transform: rotate(45deg) translate(2px, 2px); }
}

@keyframes hint-bob-up {
  0%, 100% { opacity: 0.3; transform: rotate(-135deg) translate(0, 0); }
  50%       { opacity: 1;   transform: rotate(-135deg) translate(-2px, -2px); }
}

.scroll-hint__icon {
  animation: hint-bob-down 1.6s ease-in-out infinite;
}

.scroll-hint.is-up .scroll-hint__icon {
  animation: hint-bob-up 1.6s ease-in-out infinite;
}


/* ═══════════════ REDUCED MOTION ═══════════════ */
@media (prefers-reduced-motion: reduce) {
  .hero__bg-img { animation: none; transform: scale(1); }
  .hero__scroll-line { animation: none; }
  .methode__timeline::before { animation: none; }
  .intro__image { animation: none; }

  .reveal-up,
  .gallery-item,
  .equipe__card,
  .expertise-item {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .methode__step { opacity: 1 !important; transform: none !important; }
  .expertise-item__desc { transition: none !important; }
  .scroll-hint__icon { animation: none; }
}
