/* ============================================================
   LOGO ANIMÉ — le logo officiel prend vie sur l'accueil
   ============================================================
   Règle de la charte : formes et couleurs du logo INCHANGÉES.
   On anime uniquement transform et opacity, par groupe du SVG
   (brand/escapade-logo-officiel.svg) :
     #nom → #campsas → #accueil-de-loisirs → #virgule,
     puis les cinq .enfant sautillent en décalé et se posent
     sur le nom. Survol d'un enfant (une fois posé) : petit saut.
   Animations réduites : logo statique, rien ne bouge.
   ============================================================ */
.animated-logo { width: 100%; max-width: 520px; margin: 0 auto; aspect-ratio: 2030 / 1665; }
.animated-logo > img, .animated-logo > svg { width: 100%; height: 100%; display: block; overflow: visible; }
.animated-logo g { transform-box: fill-box; }

.animated-logo .enfant { transform-origin: 50% 100%; }
.animated-logo #nom { transform-origin: 50% 60%; }
.animated-logo #campsas { transform-origin: 50% 50%; }
.animated-logo #virgule { transform-origin: 30% 0%; }

/* --- Intro --- */
.animated-logo.is-playing #nom { animation: esc-pop .7s var(--ease) both; }
.animated-logo.is-playing #campsas { animation: esc-rise .6s var(--ease) .25s both; }
.animated-logo.is-playing #accueil-de-loisirs { animation: esc-fade .7s ease-out .45s both; }
.animated-logo.is-playing #virgule { animation: esc-swoosh .6s var(--ease) .6s both; }
.animated-logo.is-playing .enfant { animation: esc-hop 1.5s cubic-bezier(.3, .7, .4, 1) both; }
.animated-logo.is-playing #enfant-vert    { animation-delay: .70s; }
.animated-logo.is-playing #enfant-jaune   { animation-delay: .84s; }
.animated-logo.is-playing #enfant-magenta { animation-delay: .98s; }
.animated-logo.is-playing #enfant-orange  { animation-delay: 1.12s; }
.animated-logo.is-playing #enfant-bleu    { animation-delay: 1.26s; }

/* --- Une fois posés : un enfant survolé fait un petit saut --- */
@media (hover: hover) {
  .animated-logo.is-ready .enfant { cursor: pointer; }
  .animated-logo.is-ready .enfant.is-jumping { animation: esc-jump .65s cubic-bezier(.3, .7, .4, 1); }
}

@keyframes esc-pop {
  0% { opacity: 0; transform: scale(.82); }
  60% { opacity: 1; transform: scale(1.04); }
  100% { opacity: 1; transform: none; }
}
@keyframes esc-rise {
  0% { opacity: 0; transform: translateY(35%); }
  100% { opacity: 1; transform: none; }
}
@keyframes esc-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes esc-swoosh {
  0% { opacity: 0; transform: scale(.2) rotate(-25deg); }
  100% { opacity: 1; transform: none; }
}
@keyframes esc-hop {
  0%   { opacity: 0; transform: translateY(-120%) scale(.7) rotate(-10deg); }
  15%  { opacity: 1; }
  36%  { transform: translateY(0) scale(1.08, .86); }
  52%  { transform: translateY(-34%) scale(.96, 1.05) rotate(5deg); }
  66%  { transform: translateY(0) scale(1.05, .92); }
  78%  { transform: translateY(-12%) rotate(-2deg); }
  90%  { transform: translateY(0) scale(1.02, .97); }
  100% { opacity: 1; transform: none; }
}
@keyframes esc-jump {
  0%, 100% { transform: none; }
  25% { transform: translateY(2%) scale(1.05, .93); }
  55% { transform: translateY(-26%) rotate(-4deg); }
  80% { transform: translateY(0) scale(1.03, .96); }
}

@media (prefers-reduced-motion: reduce) {
  .animated-logo *, .animated-logo.is-playing * { animation: none !important; }
}
