/* =========================================================================
   1AI TRADER — Couche « effets » de l'accueil (additive, CSS)
     - apparition au défilement, échelonnée (classes posées par algo-fx.js)
     - étapes : le trait lumineux se dessine, le numéro « pop »
     - boutons : léger relief au survol, enfoncement au clic
   Le contenu reste VISIBLE par défaut : on ne masque que si algo-fx.js a posé html.fx-on.
   Tout est coupé avec « réduire les animations ». Compatible clair / sombre / arabe (RTL).
   ========================================================================= */

html.fx-on .fx {
  opacity: 0; transform: translate3d(0, 22px, 0) scale(.985);
  transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1);
  transition-delay: var(--fx-d, 0ms);
  will-change: opacity, transform;
}
html.fx-on .fx.fx-in { opacity: 1; transform: none; }
html.fx-on .fx.fx-done { will-change: auto; transition-delay: 0ms; }

/* ---- étapes : trait qui se dessine, numéro qui apparaît ---- */
html.fx-on .neo-step::after { transform: scaleX(0); transform-origin: left center; transition: transform .9s cubic-bezier(.16,1,.3,1) .25s; }
html[dir="rtl"].fx-on .neo-step::after { transform-origin: right center; }
html.fx-on .neo-step.fx-in::after { transform: scaleX(1); }
html.fx-on .neo-step .neo-num { transform: scale(.7); opacity: 0; transition: transform .6s cubic-bezier(.34,1.56,.64,1) .15s, opacity .5s ease .15s; }
html.fx-on .neo-step.fx-in .neo-num { transform: none; opacity: .9; }

/* ---- icônes de cartes : petit rebond à l'apparition ---- */
html.fx-on .fx .algo-card__icon { transform: scale(.8); transition: transform .6s cubic-bezier(.34,1.56,.64,1) .2s; }
html.fx-on .fx.fx-in .algo-card__icon { transform: none; }

/* ---- boutons : relief et enfoncement ---- */
.algo .algo-btn { transition: transform .2s cubic-bezier(.16,1,.3,1), box-shadow .25s ease, background-color .25s ease, border-color .25s ease; }
@media (hover: hover) { .algo .algo-btn:hover { transform: translateY(-2px); } }
.algo .algo-btn:active { transform: translateY(0) scale(.97); }
.algo .algo-btn:focus-visible { outline: 2px solid var(--algo-accent); outline-offset: 3px; }

/* ---- réduire les animations : tout est visible et immobile ---- */
@media (prefers-reduced-motion: reduce) {
  html.fx-on .fx, html.fx-on .fx .algo-card__icon, html.fx-on .neo-step .neo-num { opacity: 1; transform: none; transition: none; }
  html.fx-on .neo-step::after { transform: none; transition: none; }
  .algo .algo-btn, .algo .algo-btn:hover, .algo .algo-btn:active { transform: none; transition: none; }
}
