/* ===== CUSTOM CURSOR ===== */
.cursor-dot {
  position: fixed;
  width: 8px;
  height: 8px;
  background-color: var(--color-green);
  border-radius: 50%;
  pointer-events: none;
  z-index: var(--z-cursor);
  transform: translate(-50%, -50%);
  transition: transform 0.1s ease, width 0.2s ease, height 0.2s ease, opacity 0.2s ease;
  will-change: left, top;
}

.cursor-ring {
  position: fixed;
  width: 36px;
  height: 36px;
  border: 1.5px solid rgba(0, 255, 178, 0.5);
  border-radius: 50%;
  pointer-events: none;
  z-index: var(--z-cursor);
  transform: translate(-50%, -50%);
  transition: left 0.12s ease, top 0.12s ease, width 0.2s ease, height 0.2s ease, border-color 0.2s ease;
  will-change: left, top;
}

.cursor-ring.hovering {
  width: 56px;
  height: 56px;
  border-color: rgba(0, 255, 178, 0.25);
}

.cursor-dot.hovering {
  width: 6px;
  height: 6px;
}

.cursor-ring.clicking {
  width: 28px;
  height: 28px;
}

/* ===== LOGO SVG ANIMATION ===== */
.logo-w-path {
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
  animation: draw-logo 1s ease forwards;
}

.logo-signal-1 {
  stroke-dasharray: 60;
  stroke-dashoffset: 60;
  animation: draw-logo 0.6s ease 0.7s forwards;
  opacity: 0;
}

.logo-signal-2 {
  stroke-dasharray: 50;
  stroke-dashoffset: 50;
  animation: draw-logo 0.5s ease 0.9s forwards;
  opacity: 0;
}

.logo-dot {
  opacity: 0;
  animation: fade-in-scale 0.4s ease 1.1s forwards;
}

@keyframes draw-logo {
  to {
    stroke-dashoffset: 0;
    opacity: 1;
  }
}

@keyframes fade-in-scale {
  from {
    opacity: 0;
    transform: scale(0);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ===== PAGE LOAD ANIMATIONS ===== */
.fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Sequential delays */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }
.delay-6 { transition-delay: 0.6s; }

/* Hero entrance */
.hero-animate {
  animation: hero-entrance 0.8s ease forwards;
  opacity: 0;
}

.hero-animate:nth-child(1) { animation-delay: 0.1s; }
.hero-animate:nth-child(2) { animation-delay: 0.25s; }
.hero-animate:nth-child(3) { animation-delay: 0.4s; }
.hero-animate:nth-child(4) { animation-delay: 0.55s; }
.hero-animate:nth-child(5) { animation-delay: 0.7s; }

@keyframes hero-entrance {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== SCROLL-TRIGGERED ===== */
.scroll-reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Cards stagger */
.stagger-children > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Tous les enfants deviennent visibles quand le parent est révélé */
.stagger-children.revealed > * {
  opacity: 1;
  transform: none;
}

/* Délais individuels pour l'effet cascade */
.stagger-children.revealed > *:nth-child(1)  { transition-delay: 0s;   }
.stagger-children.revealed > *:nth-child(2)  { transition-delay: 0.1s; }
.stagger-children.revealed > *:nth-child(3)  { transition-delay: 0.2s; }
.stagger-children.revealed > *:nth-child(4)  { transition-delay: 0.3s; }
.stagger-children.revealed > *:nth-child(5)  { transition-delay: 0.4s; }
.stagger-children.revealed > *:nth-child(6)  { transition-delay: 0.5s; }
.stagger-children.revealed > *:nth-child(7)  { transition-delay: 0.6s; }
.stagger-children.revealed > *:nth-child(8)  { transition-delay: 0.7s; }
.stagger-children.revealed > *:nth-child(9)  { transition-delay: 0.8s; }
.stagger-children.revealed > *:nth-child(10) { transition-delay: 0.9s; }

/* ===== COUNTER ===== */
.counter-value {
  display: inline-block;
  min-width: 2ch;
}

/* ===== CTA PULSE ===== */
.btn--primary.pulse {
  animation: pulse-green 2.5s ease-in-out infinite;
}

@keyframes pulse-green {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 255, 178, 0); }
  50%       { box-shadow: 0 0 0 10px rgba(0, 255, 178, 0); }
  25%       { box-shadow: 0 0 0 6px rgba(0, 255, 178, 0.12); }
}

/* ===== GLOW HALO (background decoration) ===== */
.halo {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

.halo--green {
  background: radial-gradient(circle, rgba(0, 255, 178, 0.12) 0%, transparent 70%);
}

.halo--purple {
  background: radial-gradient(circle, rgba(124, 58, 237, 0.12) 0%, transparent 70%);
}

/* ===== SHIMMER (loading state) ===== */
@keyframes shimmer {
  from { background-position: -200% 0; }
  to   { background-position:  200% 0; }
}

.shimmer-loading {
  background: linear-gradient(90deg, var(--color-night2) 25%, rgba(255,255,255,0.04) 50%, var(--color-night2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

/* ===== PROGRESS BAR (scroll) ===== */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--color-green), var(--color-purple));
  z-index: calc(var(--z-nav) + 1);
  transition: width 0.1s linear;
}

/* ===== PAGE TRANSITION ===== */
.page-transition {
  animation: page-fade-in 0.4s ease forwards;
}

@keyframes page-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
