/* UDCShare v2 — mouvement sobre et cohérent.
   Les animations servent la hiérarchie et le retour d'action ; elles ne déplacent jamais la mise en page.
   Pas de dépendance JS/GSAP : les interactions essentielles restent natives et rapides. */
@keyframes v2-rise-in {
  from { opacity: 0; transform: translate3d(0, 16px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}
@keyframes v2-item-in {
  from { opacity: 0; transform: translate3d(0, 7px, 0) scale(.99); }
  to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}
@keyframes v2-attention-ring {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--color-brand) 38%, transparent); }
  100% { box-shadow: 0 0 0 12px transparent; }
}
@keyframes v2-attention-nudge {
  0%, 100% { transform: translate3d(0, 0, 0); }
  30% { transform: translate3d(-3px, 0, 0); }
  70% { transform: translate3d(3px, 0, 0); }
}
@keyframes v2-logo-hover {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -2px, 0); }
}

/* Entrée de l'accueil : progression courte, sans retarder l'accès au formulaire. */
.v2-home .v2-hero > * {
  animation: v2-rise-in 440ms cubic-bezier(.22, 1, .36, 1) both;
}
.v2-home .v2-hero > :nth-child(2) { animation-delay: 70ms; }
.v2-home .v2-hero > :nth-child(3) { animation-delay: 140ms; }

/* Apparition des nouveaux éléments et confirmation non bloquante. */
.v2-files .file-item { animation: v2-item-in 220ms cubic-bezier(.22, 1, .36, 1) both; }
.v2-toast { animation: v2-rise-in 220ms cubic-bezier(.22, 1, .36, 1) both; }

/* Micro-interaction du logo : uniquement au survol ou au focus clavier. */
.v2-header__brand:hover .udc-logo-mark path,
.v2-header__brand:focus-visible .udc-logo-mark path {
  animation: v2-logo-hover 460ms ease both;
  transform-box: fill-box;
}
.v2-header__brand:hover .udc-logo-mark path:nth-child(2) { animation-delay: 55ms; }
.v2-header__brand:hover .udc-logo-mark path:nth-child(1) { animation-delay: 110ms; }

/* Retour tactile immédiat ; aucun changement de taille de zone cliquable. */
.v2-btn {
  transition:
    transform var(--motion-fast, 120ms) ease,
    filter var(--motion-fast, 120ms) ease,
    background-color var(--motion-base, 200ms) ease,
    border-color var(--motion-base, 200ms) ease;
  touch-action: manipulation;
}
.v2-btn:active:not(:disabled) { transform: scale(.985); }
@media (hover: hover) and (pointer: fine) {
  .v2-btn:hover:not(:disabled) { filter: brightness(1.035); }
  .v2-card { transition: transform var(--motion-base, 200ms) ease, border-color var(--motion-base, 200ms) ease; }
  .v2-card:hover { transform: translateY(-2px); border-color: var(--color-brand); }
}

/* Le bloc d'inscription invité attire l'attention une seule fois, sans secousse excessive. */
.v2-guest.is-attention {
  animation: v2-attention-nudge 360ms ease 1, v2-attention-ring 760ms ease-out 1;
}

/* Scroll reveal : seuls les éléments hors écran sont masqués par motion.js. */
.v2-reveal {
  opacity: 0;
  transform: translate3d(0, 16px, 0);
  transition:
    opacity 440ms ease,
    transform 520ms cubic-bezier(.22, 1, .36, 1);
  transition-delay: var(--v2-reveal-delay, 0ms);
  will-change: opacity, transform;
}
.v2-reveal.is-in { opacity: 1; transform: translate3d(0, 0, 0); }
.v2-reveal.is-in { will-change: auto; }

@media (prefers-reduced-motion: reduce) {
  .v2-home .v2-hero > *,
  .v2-files .file-item,
  .v2-toast,
  .v2-guest.is-attention,
  .v2-header__brand:hover .udc-logo-mark path,
  .v2-header__brand:focus-visible .udc-logo-mark path {
    animation: none !important;
  }
  .v2-reveal { opacity: 1; transform: none; transition: none; will-change: auto; }
  .v2-btn, .v2-card { transition: none; }
  .v2-btn:active:not(:disabled), .v2-card:hover { transform: none; filter: none; }
}
@media print {
  .v2-reveal { opacity: 1; transform: none; transition: none; }
}
