/* ============================================================
   OUVRIA : ANIMATIONS UNIVERSELLES (desktop + mobile)
   Apple-grade · Visible sur TOUS les écrans dès le chargement
   ============================================================ */

:root {
  --oa-amber:  #F59E0B;
  --oa-amber2: #FBBF24;
  --oa-spring: cubic-bezier(0.34, 1.2, 0.64, 1);
  --oa-ease:   cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── 1. BARRE PROGRESSION (toujours visible) ────────────────── */
.oa-progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #F59E0B, #FBBF24, #F59E0B);
  background-size: 200% auto;
  animation: oa-progress-shimmer 2s linear infinite;
  z-index: 9999;
  pointer-events: none;
  transition: width 80ms linear;
}
@keyframes oa-progress-shimmer {
  to { background-position: 200% center; }
}

/* ── 2. SCROLL REVEAL ───────────────────────────────────────── */
[data-oa-reveal] {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.6s var(--oa-ease), transform 0.6s var(--oa-ease);
  will-change: opacity, transform;
}
[data-oa-reveal].oa-visible,
[data-oa-reveal].oa-fallback {
  opacity: 1 !important;
  transform: none !important;
}

/* ── 3. BADGE SOCIAL PROOF (bas-gauche, fixe) ───────────────── */
#oa-badge {
  position: fixed;
  bottom: 28px;
  left: 24px;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 50px;
  padding: 10px 18px 10px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  z-index: 8888;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3), 0 0 0 1px rgba(245,158,11,0.15);
  animation: oa-badge-enter 0.7s var(--oa-spring) 1s both;
  cursor: default;
  user-select: none;
}
@keyframes oa-badge-enter {
  from { opacity: 0; transform: translateY(20px) scale(0.88); }
  to   { opacity: 1; transform: none; }
}
.oa-badge-avatars { display: flex; }
.oa-badge-av {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid #0F172A;
  margin-left: -8px;
  font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  flex-shrink: 0;
}
.oa-badge-av:first-child { margin-left: 0; }
.oa-badge-av:nth-child(1) { background: linear-gradient(135deg,#F59E0B,#EA580C); }
.oa-badge-av:nth-child(2) { background: linear-gradient(135deg,#8B5CF6,#6D28D9); }
.oa-badge-av:nth-child(3) { background: linear-gradient(135deg,#10B981,#047857); }
.oa-badge-av:nth-child(4) { background: linear-gradient(135deg,#3B82F6,#1D4ED8); }
.oa-badge-info { line-height: 1.3; }
.oa-badge-count { font-weight: 700; color: #FBBF24; }
.oa-badge-sub   { font-size: 11px; opacity: 0.55; margin-top: 1px; }
.oa-badge-live  {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #22C55E;
  flex-shrink: 0;
  animation: oa-live-pulse 1.8s ease infinite;
}
@keyframes oa-live-pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(34,197,94,0.5); }
  50%      { box-shadow: 0 0 0 5px rgba(34,197,94,0); }
}

/* ── 4. NAVBAR GLASS AU SCROLL ──────────────────────────────── */
.oa-nav-glass {
  background: rgba(255,255,255,0.88) !important;
  backdrop-filter: blur(24px) saturate(1.8) !important;
  -webkit-backdrop-filter: blur(24px) saturate(1.8) !important;
  box-shadow: 0 1px 0 rgba(0,0,0,0.06), 0 4px 20px rgba(0,0,0,0.06) !important;
  transition: background 0.3s, box-shadow 0.3s !important;
}

/* ── 5. HOVER LIFT SUR CARDS ────────────────────────────────── */
.oa-lift {
  transition: transform 0.25s var(--oa-ease), box-shadow 0.25s var(--oa-ease) !important;
  cursor: default;
}
.oa-lift:hover {
  transform: translateY(-5px) !important;
  box-shadow: 0 16px 40px rgba(0,0,0,0.10), 0 4px 12px rgba(245,158,11,0.08) !important;
}

/* ── 6. BOUTON CTA : GLOW PULSANT ───────────────────────────── */
a[href*="signup"], a[href*="essai"],
.btn-primary, [class*="btn-primary"],
[href*="app#/login"] {
  position: relative !important;
}
/* Anneau pulsant autour du bouton principal */
.oa-cta-glow {
  animation: oa-cta-pulse 2.5s ease-in-out infinite !important;
}
@keyframes oa-cta-pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(245,158,11,0.4), 0 4px 16px rgba(245,158,11,0.3); }
  50%      { box-shadow: 0 0 0 8px rgba(245,158,11,0), 0 4px 24px rgba(245,158,11,0.5); }
}

/* ── 7. RIPPLE sur clic ─────────────────────────────────────── */
.oa-ripple-origin { overflow: hidden !important; }
.oa-ripple-wave {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  pointer-events: none;
  transform: scale(0);
  animation: oa-ripple-anim 0.55s ease-out forwards;
}
@keyframes oa-ripple-anim {
  to { transform: scale(4); opacity: 0; }
}

/* ── 8. MOTS H1 : ENTRÉE UN PAR UN ─────────────────────────── */
.oa-w {
  display: inline-block;
  opacity: 0;
  transform: translateY(18px);
  animation: oa-word 0.45s var(--oa-spring) forwards;
}
@keyframes oa-word {
  to { opacity: 1; transform: none; }
}

/* ── 9. AURORA HERO (blobs colorés) ────────────────────────── */
.oa-aurora {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.oa-blob {
  position: absolute;
  border-radius: 50%;
  animation: oa-blob-float 9s ease-in-out infinite;
  will-change: transform;
}
.oa-blob-1 {
  width: 600px; height: 600px;
  top: -200px; left: -100px;
  background: radial-gradient(circle, rgba(245,158,11,0.25) 0%, transparent 65%);
  filter: blur(60px);
  animation-delay: 0s;
}
.oa-blob-2 {
  width: 450px; height: 450px;
  top: 0; right: -80px;
  background: radial-gradient(circle, rgba(251,146,60,0.2) 0%, transparent 65%);
  filter: blur(70px);
  animation-delay: -3.5s;
}
.oa-blob-3 {
  width: 350px; height: 350px;
  bottom: -100px; left: 30%;
  background: radial-gradient(circle, rgba(251,191,36,0.18) 0%, transparent 65%);
  filter: blur(80px);
  animation-delay: -6s;
}
@keyframes oa-blob-float {
  0%,100% { transform: translate(0,0) scale(1); }
  33%      { transform: translate(30px,-25px) scale(1.06); }
  66%      { transform: translate(-20px,15px) scale(0.96); }
}

/* ── 10. COMPTEURS STAT : UNDERLINE ANIMÉ ───────────────────── */
.oa-counted [class*="stat-value"],
.oa-counted .stat-value {
  position: relative;
}
.oa-counted [class*="stat-value"]::after,
.oa-counted .stat-value::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 100%; height: 2px;
  background: var(--oa-amber);
  transform: scaleX(0);
  transform-origin: left;
  animation: oa-underline 0.5s var(--oa-ease) 0.8s forwards;
}
@keyframes oa-underline { to { transform: scaleX(1); } }

/* ── 11. REDUCED MOTION ─────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .oa-w, .oa-blob, .oa-badge-live,
  [data-oa-reveal], .oa-cta-glow {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  #oa-badge { animation: none; }
}
