/* ===========================================================================
   DAIRIA — socle de MOUVEMENT commun (rapport A, § 5.1).
   Règles : on n'anime que transform et opacity (clip-path pour le comparateur).
   L'état FINAL est l'état par défaut du HTML/CSS : le mouvement s'ajoute, il ne cache rien.
   Deux coupe-circuits : la préférence système (prefers-reduced-motion) et l'interrupteur
   du site (html[data-motion="off"], posé par js/motion.js).
   =========================================================================== */
:root{
  /* durées — Apple 100-400 ms, INP ≤ 200 ms, WCAG 2.2.2 : boucle ≤ 5 s ou bouton pause */
  --ds-dur-instant:100ms;  /* retour d'état : appui, coche */
  --ds-dur-micro:180ms;    /* survol, focus, popover */
  --ds-dur-base:280ms;     /* transition d'état, filtre, retour d'inclinaison */
  --ds-dur-page:400ms;     /* View Transition entre pages */
  --ds-dur-reveal:600ms;   /* apparition déclenchée hors scroll-driven */
  --ds-dur-count:1200ms;   /* compteur, décodage : jamais plus de 1,2 s */
  --ds-dur-sortie:120ms;   /* sortie d'un état d'interface : plus vive que l'entrée (1,5 à 2 fois) */
  --ds-ease-out-franc:cubic-bezier(.23,1,.32,1); /* micro-interactions : réponse nette (compétence 2.2, § 10.2) */
  /* courbes */
  --ds-ease-out:cubic-bezier(0,0,.5,1);        /* relevée chez Apple */
  --ds-ease-in-out:cubic-bezier(.65,0,.35,1);
  --ds-ease-spring:cubic-bezier(.34,1.56,.64,1); /* rebond discret, survol seulement */
  /* familles graduées — valeurs reprises d'Open Props (props.easing, MIT © Adam Argyle, voir NOTICE) */
  --ds-ease-out-1:cubic-bezier(0,0,.75,1);   --ds-ease-out-2:cubic-bezier(0,0,.5,1);   --ds-ease-out-3:cubic-bezier(0,0,.3,1);
  --ds-ease-in-out-1:cubic-bezier(.3,0,.7,1); --ds-ease-in-out-2:cubic-bezier(.5,0,.5,1); --ds-ease-in-out-3:cubic-bezier(.7,0,.3,1);
  --ds-ease-spring-1:cubic-bezier(.5,.75,.75,1.25); --ds-ease-spring-2:cubic-bezier(.5,1,.75,1.25); --ds-ease-spring-3:cubic-bezier(.5,1.25,.75,1.25);
  /* amplitudes */
  --ds-shift-reveal:24px;
  --ds-tilt-max:6deg;
  --ds-parallax-max:8%;    /* au-delà : interdit */
}
@media (prefers-reduced-motion:reduce){
  :root{--ds-dur-sortie:0ms;--ds-dur-micro:0ms;--ds-dur-base:0ms;--ds-dur-page:0ms;--ds-dur-reveal:0ms;--ds-dur-count:0ms;
        --ds-shift-reveal:0px;--ds-tilt-max:0deg;--ds-parallax-max:0%;}
  *,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important;}
  ::view-transition-group(*),::view-transition-old(*),::view-transition-new(*){animation:none!important;}
}
/* Une action déclenchée au CLAVIER ne s'anime jamais (menus, dépliants, transitions de page) :
   js/motion.js pose html[data-entree="clavier"] à la première touche de navigation, le retire au pointeur. */
html[data-entree="clavier"]{--ds-dur-instant:0ms;--ds-dur-micro:0ms;--ds-dur-base:0ms;--ds-dur-page:0ms;--ds-dur-sortie:0ms;}
html[data-motion="off"]{--ds-dur-sortie:0ms;--ds-dur-micro:0ms;--ds-dur-base:0ms;--ds-dur-page:0ms;--ds-dur-reveal:0ms;--ds-dur-count:0ms;
        --ds-shift-reveal:0px;--ds-tilt-max:0deg;--ds-parallax-max:0%;scroll-behavior:auto;}
html[data-motion="off"] *,html[data-motion="off"] *::before,html[data-motion="off"] *::after{animation:none!important;transition:none!important;}
html[data-motion="off"]::view-transition-group(*),html[data-motion="off"]::view-transition-old(*),html[data-motion="off"]::view-transition-new(*){animation:none!important;}

/* Mouvement autorisé = préférence système « no-preference » ET interrupteur non coupé.
   Les composants écrivent leurs effets ainsi :
   @media (prefers-reduced-motion:no-preference){ html:not([data-motion="off"]) .x{…} }
   et, pour le défilement :
   @supports (animation-timeline:view()){ … } */
