/*
 * Acionna — animations d'apparition (thème 1.1.0)
 * Chargé uniquement sur l'écran de garde, la page « Accueil » et l'accueil des adhérents.
 * Tout est conditionné par la classe html.acionna-anim, posée dans le <head> seulement si
 * le visiteur n'a pas demandé à réduire les animations. Sans cette classe (ou à
 * l'impression), la page s'affiche exactement comme avant.
 */
:root{
  --acn-ressort: cubic-bezier(.22, 1, .36, 1);      /* arrivée douce, façon « spring » */
  --acn-rebond:  cubic-bezier(.34, 1.56, .64, 1);   /* léger dépassement */
}

@media screen and (prefers-reduced-motion: no-preference){

  @keyframes acn-monte{
    from{ opacity:0; transform: translate3d(0, 26px, 0); }
    to  { opacity:1; transform: none; }
  }
  @keyframes acn-ecusson{
    0%  { opacity:0; transform: scale(.55) rotate(-16deg); filter: blur(6px); }
    60% { opacity:1; transform: scale(1.04) rotate(2deg); filter: blur(0); }
    100%{ opacity:1; transform: none; }
  }
  @keyframes acn-lettre{
    from{ opacity:0; transform: translate3d(0, .55em, 0) rotate(8deg); }
    to  { opacity:1; transform: none; }
  }
  @keyframes acn-trait{
    from{ width:0; }
    to  { width:28px; }
  }
  @keyframes acn-halo{
    0%, 100%{ box-shadow: var(--shadow), 0 0 0 6px color-mix(in srgb, var(--accent) 30%, transparent); }
    50%     { box-shadow: var(--shadow), 0 0 0 6px color-mix(in srgb, var(--accent) 55%, transparent), 0 0 46px 4px color-mix(in srgb, var(--accent) 28%, transparent); }
  }
  @keyframes acn-sortie{
    to{ opacity:0; transform: scale(1.04); filter: blur(4px); }
  }

  /* ---------- page Accueil (visiteurs) ---------- */
  .acionna-anim .hero-badge{
    animation:
      acn-ecusson 1s var(--acn-ressort) .05s backwards,
      acn-halo 5s ease-in-out 1.4s infinite;
    transition: transform .35s var(--acn-ressort);
    will-change: transform;
  }
  .acionna-anim .acn-lettre{
    animation: acn-lettre .7s var(--acn-rebond) backwards;
    animation-delay: calc(.35s + var(--i, 0) * .06s);
  }
  .acionna-anim .hero-info .eyebrow{ animation: acn-monte .7s var(--acn-ressort) .6s backwards; }
  .acionna-anim .hero-info .eyebrow::before{ animation: acn-trait .6s var(--acn-ressort) .85s backwards; }
  .acionna-anim .hero-info .tagline{ animation: acn-monte .8s var(--acn-ressort) .75s backwards; }
  .acionna-anim .hero-ctas > *{ animation: acn-monte .7s var(--acn-ressort) backwards; }
  .acionna-anim .hero-ctas > :nth-child(1){ animation-delay: .95s; }
  .acionna-anim .hero-ctas > :nth-child(2){ animation-delay: 1.05s; }
  .acionna-anim .hero-ctas > :nth-child(n+3){ animation-delay: 1.15s; }

  /* ---------- écran de garde ---------- */
  .acionna-anim .splash-logo{
    animation:
      acn-ecusson 1.1s var(--acn-ressort) .05s backwards,
      acn-halo 5s ease-in-out 1.5s infinite;
  }
  .acionna-anim .splash-sub  { animation: acn-monte .7s var(--acn-ressort) .9s backwards; }
  .acionna-anim .splash-enter{ animation: acn-monte .7s var(--acn-ressort) 1.1s backwards; }
  .acionna-anim .splash-page.acn-part{ animation: acn-sortie .38s ease-in forwards; }

  /* ---------- accueil des adhérents (shortcode [acionna_accueil_membre]) ---------- */
  .acionna-anim .acionna-am-logo{ animation: acn-ecusson .9s var(--acn-ressort) .05s backwards; }
  .acionna-anim .acionna-am-bandeau > div{ animation: acn-monte .7s var(--acn-ressort) .3s backwards; }

  /* ---------- apparition au défilement (pilotée par animations.js) ---------- */
  .acionna-anim :is(
    .acionna-am-historien, .acionna-am-sortie, .acionna-am-liens > a, .acionna-am-archives li,
    .card, .section-head, .value-row, .step, .join-cta, .members-panel
  ):not(.acn-ok){
    opacity: 0;
    transform: translate3d(0, 28px, 0);
  }
  .acionna-anim .acn-entre{
    transition:
      opacity .7s ease var(--acn-d, 0ms),
      transform .9s var(--acn-ressort) var(--acn-d, 0ms) !important;
  }
}

