/* ==========================================================================
   ANIMATIONS — keyframes, apparitions au scroll, bandeau défilant
   ========================================================================== */

@keyframes pulse    { 50% { opacity: .35; } }
@keyframes shine    { to { background-position: -200% center; } }
@keyframes sweep    { 0%, 60% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
@keyframes spin     { to { transform: rotate(1turn); } }
@keyframes gridpan  { to { background-position: 56px 56px; } }
@keyframes inup     { to { opacity: 1; transform: none; filter: none; } }
@keyframes duoin    { from { opacity: 0; transform: translateY(40px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes float    { 50% { transform: scale(1.04) translateY(-6px); } }
@keyframes vidGlow  { 0%, 100% { opacity: .5; transform: translate(-50%,-50%) scale(1); } 50% { opacity: 1; transform: translate(-50%,-50%) scale(1.08); } }
@keyframes marq     { to { transform: translateX(-50%); } }
@keyframes swoosh   { to { stroke-dashoffset: 0; } }
@keyframes resIn    { from { opacity: 0; transform: translateY(10px); } }

/* Barre de progression de lecture en haut de page */
#prog { position: fixed; top: 0; left: 0; height: 2px; width: 100%; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--acc), var(--blue)); z-index: 100; box-shadow: 0 0 12px var(--acc); }

/* Entrée du hero au chargement (délai via --d) */
.in-up {
  opacity: 0; transform: translateY(22px); filter: blur(6px);
  animation: inup .9s cubic-bezier(.2,.8,.2,1) forwards; animation-delay: var(--d, 0s);
}

/* Apparition au scroll (classe .in ajoutée en JS, délai via --rd) */
.rv { opacity: 0; transform: translateY(24px); transition: opacity .8s, transform .8s cubic-bezier(.2,.8,.2,1); transition-delay: var(--rd, 0s); }
.rv.in { opacity: 1; transform: none; }

/* Bandeau défilant */
.marq {
  border-block: 1px solid var(--line); background: var(--bg2); overflow: hidden; white-space: nowrap; padding: 16px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marq-in {
  display: inline-flex; gap: 44px; animation: marq 32s linear infinite;
  font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: .06em; text-transform: uppercase; color: var(--mut);
}
.marq-in span { display: inline-flex; align-items: center; gap: 44px; }
.marq-in span::after { content: '✦'; color: var(--acc); font-size: 12px; }
@media (max-width: 640px) {
  .marq { padding: 12px 0; }
  .marq-in, .marq-in span { gap: 28px; }
  .marq-in { font-size: 12.5px; animation-duration: 26s; }
}

/* Accessibilité : on coupe tout si l'utilisateur préfère moins d'animations */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .in-up, .duo, .rv { opacity: 1 !important; transform: none !important; filter: none !important; }
  html { scroll-behavior: auto; }
  .h1-swoosh path { stroke-dashoffset: 0; }
}
