/* ============================================
   Groupe GestiV – V1 Modern Animation Layer
   S'ajoute par-dessus style.css sans le modifier
   ============================================ */

/* ========== SCROLL PROGRESS BAR ========== */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  z-index: 200;
  background: linear-gradient(90deg, var(--green-600), var(--green-400), var(--green-300));
  box-shadow: 0 0 12px rgba(74,222,128,0.6);
  transition: width 0.1s linear;
}

/* ========== HERO : GRILLE ANIMÉE + ORBES ========== */
.hero-grid-bg {
  animation: grid-pan 24s linear infinite;
  background-size: 4rem 4rem;
}
@keyframes grid-pan {
  from { background-position: 0 0; }
  to   { background-position: 4rem 4rem; }
}

.hero-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.hero-inner { z-index: 1; }

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  opacity: 0.55;
  animation: orb-float 14s ease-in-out infinite alternate;
}
.hero-orb.orb-1 {
  width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(34,197,94,0.22), transparent 70%);
  top: -10%; left: -8%;
}
.hero-orb.orb-2 {
  width: 340px; height: 340px;
  background: radial-gradient(circle, rgba(74,222,128,0.16), transparent 70%);
  bottom: -5%; right: -6%;
  animation-delay: -7s;
  animation-duration: 18s;
}
@keyframes orb-float {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(60px, 40px) scale(1.15); }
}

/* ========== TYPING (mot rotatif du hero) ========== */
.type-word { color: inherit; }
.type-caret {
  display: inline-block;
  width: 3px;
  margin-left: 2px;
  background: var(--green-400);
  animation: caret-blink 0.9s step-end infinite;
  border-radius: 2px;
  vertical-align: baseline;
  height: 0.9em;
  transform: translateY(0.12em);
  -webkit-text-fill-color: initial;
}
@keyframes caret-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ========== BADGE SHIMMER ========== */
.hero-badge {
  position: relative;
  overflow: hidden;
}
.hero-badge::after {
  content: '';
  position: absolute;
  top: 0; left: -80%;
  width: 60%; height: 100%;
  background: linear-gradient(105deg, transparent, rgba(134,239,172,0.14), transparent);
  animation: shimmer 3.5s ease-in-out infinite;
}
@keyframes shimmer {
  0%   { left: -80%; }
  55%, 100% { left: 130%; }
}

/* ========== CARTES : SPOTLIGHT + TILT 3D ========== */
.service-hub-card,
.card-hover-lift,
.mini-card,
.stat-card {
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
  will-change: transform;
}

/* Halo qui suit la souris (variables --mx/--my posées par JS) */
.spotlight::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(280px circle at var(--mx, 50%) var(--my, 50%),
              rgba(34,197,94,0.12), transparent 65%);
  opacity: 0;
  transition: opacity 0.35s;
  pointer-events: none;
  z-index: 0;
}
.spotlight:hover::before { opacity: 1; }
.spotlight > * { position: relative; z-index: 1; }

/* Tilt : transition douce au retour */
[data-tilt] {
  transition: transform 0.25s ease, border-color 0.3s, box-shadow 0.3s;
}
[data-tilt]:hover {
  border-color: rgba(34,197,94,0.55);
  box-shadow: 0 24px 48px rgba(5,46,22,0.35), 0 0 0 1px rgba(34,197,94,0.15);
}

/* Icônes des cartes services : pop au survol */
.service-hub-card .card-icon {
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s;
}
.service-hub-card:hover .card-icon {
  transform: scale(1.12) rotate(-4deg);
  box-shadow: 0 0 24px rgba(34,197,94,0.35);
}

/* Flèche qui glisse */
.arrow-link { transition: color 0.2s, transform 0.25s ease; }
.service-hub-card:hover .arrow-link,
.card-hover-lift:hover .arrow-link { transform: translateX(6px); }

/* ========== STATS : GLOW + COMPTEURS ========== */
.stat-card {
  transition: transform 0.3s ease, border-color 0.3s, box-shadow 0.3s;
}
.stat-card:hover {
  transform: translateY(-4px) scale(1.03);
  border-color: rgba(34,197,94,0.5);
  box-shadow: 0 12px 32px rgba(5,46,22,0.4);
}
.stat-value {
  text-shadow: 0 0 18px rgba(74,222,128,0.35);
}

/* ========== BOUTONS : SHINE + MAGNÉTIQUE ========== */
.btn {
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease-out, box-shadow 0.3s, background 0.3s, border-color 0.3s;
  will-change: transform;
}
.btn::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,0.18), transparent);
  transition: left 0.5s ease;
  pointer-events: none;
}
.btn:hover::after { left: 140%; }
.btn-primary:hover { box-shadow: 0 8px 32px rgba(34,197,94,0.45); }

/* ========== REVEALS ÉCHELONNÉS ========== */
.fade-in { transition-duration: 0.8s; }
.stagger > * {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.stagger.visible > * { opacity: 1; transform: translateY(0); }
.stagger.visible > *:nth-child(1) { transition-delay: 0.00s; }
.stagger.visible > *:nth-child(2) { transition-delay: 0.09s; }
.stagger.visible > *:nth-child(3) { transition-delay: 0.18s; }
.stagger.visible > *:nth-child(4) { transition-delay: 0.27s; }
.stagger.visible > *:nth-child(5) { transition-delay: 0.36s; }
.stagger.visible > *:nth-child(6) { transition-delay: 0.45s; }

/* ========== SECTION CTA : GLOW PULSANT ========== */
.cta-section {
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 80% at 50% 100%, rgba(34,197,94,0.10), transparent);
  animation: cta-pulse 5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes cta-pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* ========== ACCESSIBILITÉ : MOUVEMENT RÉDUIT ========== */
@media (prefers-reduced-motion: reduce) {
  .hero-grid-bg, .hero-orb, .hero-badge::after,
  .cta-section::before, .type-caret { animation: none !important; }
  [data-tilt], .btn, .stat-card { transition: none !important; }
  .stagger > *, .fade-in { transition: opacity 0.3s ease; transform: none; }
  .hero-particles { display: none; }
}
