/**
 * animations.css — EPP
 * États finaux CSS + classes d'animation
 * WP0 v1.0 — 2026-06-08
 * UI conforme à la charte du dispositif EPP — voir WP0.
 *
 * Règle ALF : chaque élément animé a son état final défini ici.
 * GSAP part de `from` — si Config.animate() ne s'exécute pas,
 * l'élément est immédiatement visible dans son état final.
 */

/* ── États finaux GSAP ────────────────────────────────────────────────────── */
[data-gsap-from] { opacity: 1; transform: none; }

/* ── Fade in ──────────────────────────────────────────────────────────────── */
@keyframes alf-fade-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.alf-fade-in { animation: alf-fade-in 420ms cubic-bezier(0.4,0,0.2,1) both; }
.alf-fade-in.alf-anim-done { animation: none; opacity: 1; transform: none; }

/* ── Fade in up ───────────────────────────────────────────────────────────── */
@keyframes alf-fade-in-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.alf-fade-in-up { animation: alf-fade-in-up 400ms cubic-bezier(0.4,0,0.2,1) both; }

/* ── Scale in ─────────────────────────────────────────────────────────────── */
@keyframes alf-scale-in {
  from { opacity: 0; transform: scale(0.94); }
  to   { opacity: 1; transform: scale(1); }
}
.alf-scale-in { animation: alf-scale-in 340ms cubic-bezier(0.34,1.56,0.64,1) both; }

/* ── Stagger ──────────────────────────────────────────────────────────────── */
.alf-stagger > *:nth-child(1) { animation-delay:   0ms; }
.alf-stagger > *:nth-child(2) { animation-delay:  70ms; }
.alf-stagger > *:nth-child(3) { animation-delay: 140ms; }
.alf-stagger > *:nth-child(4) { animation-delay: 210ms; }
.alf-stagger > *:nth-child(5) { animation-delay: 280ms; }
.alf-stagger > *:nth-child(6) { animation-delay: 350ms; }

/* ── Shake erreur ─────────────────────────────────────────────────────────── */
@keyframes alf-shake {
  0%,100% { transform: translateX(0); }
  15%     { transform: translateX(-7px); }
  30%     { transform: translateX(7px); }
  45%     { transform: translateX(-5px); }
  60%     { transform: translateX(5px); }
  75%     { transform: translateX(-3px); }
  90%     { transform: translateX(3px); }
}
.alf-shake { animation: alf-shake 440ms ease; }

/* ── Pop succès ───────────────────────────────────────────────────────────── */
@keyframes alf-pop {
  0%   { transform: scale(0.7) rotate(-8deg); opacity: 0; }
  60%  { transform: scale(1.08) rotate(2deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}
.alf-pop { animation: alf-pop 500ms cubic-bezier(0.34,1.56,0.64,1) both; }

/* ── Reveal progressif ────────────────────────────────────────────────────── */
@keyframes alf-reveal {
  from { opacity: 0; clip-path: inset(8px 0 0 0); }
  to   { opacity: 1; clip-path: inset(0 0 0 0); }
}
.alf-reveal { animation: alf-reveal 380ms cubic-bezier(0.4,0,0.2,1) both; }

/* ── Pulse bouton ─────────────────────────────────────────────────────────── */
@keyframes alf-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(157,97,79,0.45); }
  70%  { box-shadow: 0 0 0 14px rgba(157,97,79,0); }
  100% { box-shadow: 0 0 0 0 rgba(157,97,79,0); }
}
.alf-btn--pulse { animation: alf-pulse 2.2s cubic-bezier(0.4,0,0.6,1) infinite; }
