/* =============================================================================
   N2M SÉCURITÉ — Animations CSS
   Version: 1.0.0 | P1
   ============================================================================= */

/* ── Curseur typewriter ───────────────────────────────────────────────────── */

.n2m-tw-cursor {
  display: inline-block;
  width: 2px;
  height: 0.85em;
  background: var(--n2m-gold);
  vertical-align: middle;
  margin-left: 3px;
  border-radius: 1px;
  animation: twBlink 0.65s step-end infinite;
}

@keyframes twBlink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ── Keyframes ────────────────────────────────────────────────────────────── */

@keyframes radarSweep {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes particleRise {
  0%   { transform: translateY(0);      opacity: 0; }
  8%   { opacity: 0.7; }
  100% { transform: translateY(-100vh); opacity: 0; }
}

@keyframes floatA {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-7px); }
}

@keyframes floatB {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-10px); }
}

@keyframes pulseRing {
  0%,100% { opacity: 0.6; transform: scale(1); }
  50%     { opacity: 0.1; transform: scale(1.06); }
}

@keyframes blink {
  0%,100% { opacity: 1; }
  50%     { opacity: 0.2; }
}

@keyframes goldGlow {
  0%,100% { box-shadow: 0 0 16px rgba(245, 194, 0, 0.15); }
  50%     { box-shadow: 0 0 36px rgba(245, 194, 0, 0.35); }
}

@keyframes countUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes revealLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes revealUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes revealRight {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes shimmer {
  from { background-position: -200% center; }
  to   { background-position: 200% center; }
}

@keyframes progressBar {
  from { width: 0; }
  to   { width: var(--progress-w, 100%); }
}

@keyframes certifScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@keyframes whatsappPulse {
  0%   { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5); }
  70%  { box-shadow: 0 0 0 14px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

@keyframes urgencePulse {
  0%   { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5); }
  70%  { box-shadow: 0 0 0 14px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* ── Classes d'animation utilitaires ─────────────────────────────────────── */

.anim-reveal-left  { animation: revealLeft  0.7s cubic-bezier(.4,0,.2,1) both; }
.anim-reveal-up    { animation: revealUp    0.7s cubic-bezier(.4,0,.2,1) both; }
.anim-reveal-right { animation: revealRight 0.7s cubic-bezier(.4,0,.2,1) both; }
.anim-fade-in      { animation: fadeIn      0.5s ease both; }
.anim-scale-in     { animation: scaleIn     0.5s cubic-bezier(.4,0,.2,1) both; }
.anim-float-a      { animation: floatA      3.5s ease-in-out infinite; }
.anim-float-b      { animation: floatB      4.5s ease-in-out infinite; }
.anim-gold-glow    { animation: goldGlow    3s ease-in-out infinite; }
.anim-blink        { animation: blink       2s ease-in-out infinite; }
.anim-spin-slow    { animation: spinSlow    20s linear infinite; }

/* Stagger helpers */
.anim-delay-1 { animation-delay: 0.1s; }
.anim-delay-2 { animation-delay: 0.2s; }
.anim-delay-3 { animation-delay: 0.3s; }
.anim-delay-4 { animation-delay: 0.4s; }
.anim-delay-5 { animation-delay: 0.5s; }
.anim-delay-6 { animation-delay: 0.6s; }
.anim-delay-8 { animation-delay: 0.8s; }
.anim-delay-10 { animation-delay: 1s; }
.anim-delay-12 { animation-delay: 1.2s; }

/* Shimmer sur textes gold */
.anim-shimmer {
  background: linear-gradient(
    90deg,
    var(--n2m-gold) 0%,
    #fff9d6 40%,
    var(--n2m-gold) 60%,
    var(--n2m-gold-dim) 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 3s linear infinite;
}

/* Pas d'animations si préférence réduite */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
