/* Effets visuels et animations */
@media (min-width: 1025px) {
  body {
    cursor: none;
  }

  .custom-cursor-dot,
  .custom-cursor-circle {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 99999;
    pointer-events: none;
    border-radius: 50%;
    transform: translate(-50%, -50%);
  }

  .custom-cursor-dot {
    width: 6px;
    height: 6px;
    background-color: var(--color-accent);
    box-shadow: 0 0 10px var(--color-accent);
    transition: width 0.3s var(--transition-fast), height 0.3s var(--transition-fast), opacity 0.3s var(--transition-fast);
  }

  .custom-cursor-circle {
    z-index: 99998;
    width: 30px;
    height: 30px;
    border: 1px solid rgba(30, 77, 59, 0.25);
    background-color: rgba(30, 77, 59, 0.002);
    transition: width 0.35s var(--transition-fast), height 0.35s var(--transition-fast), border-color var(--transition-fast), background-color var(--transition-fast), box-shadow var(--transition-fast);
  }

  body.cursor-hovering .custom-cursor-dot {
    width: 0;
    height: 0;
    opacity: 0;
  }

  body.cursor-hovering .custom-cursor-circle {
    width: 48px;
    height: 48px;
    border-color: var(--color-accent);
    background-color: rgba(13, 110, 110, 0.06);
    box-shadow: 0 0 20px rgba(13, 110, 110, 0.18);
  }
}

.glass-reflection-system,
.background-data-grid,
.ambient-glow-blob {
  pointer-events: none;
  z-index: 0;
}

.glass-reflection-system {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.glare-beam {
  position: absolute;
  left: -75%;
  width: 250%;
  height: 280px;
  background: linear-gradient(
    135deg,
    transparent 35%,
    rgba(255, 255, 255, 0) 42%,
    rgba(255, 255, 255, 0.16) 47%,
    rgba(255, 255, 255, 0.32) 50%,
    rgba(255, 255, 255, 0.16) 53%,
    rgba(255, 255, 255, 0) 58%,
    transparent 65%
  );
  filter: blur(15px);
  transform: rotate(-22deg);
  animation: glass-shimmer 16s infinite alternate ease-in-out;
}

.glare-1 { top: 8%; animation-delay: 0s; }
.glare-2 { top: 28%; animation-delay: 2s; }
.glare-3 { top: 48%; animation-delay: 4s; }
.glare-4 { top: 68%; animation-delay: 1s; }
.glare-5 { top: 88%; animation-delay: 3s; }

.background-data-grid {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

.background-data-grid::before,
.background-data-grid::after {
  content: "";
  position: absolute;
  inset: -20%;
  opacity: 0.32;
  transform: translate(var(--tech-drift-x, 0), var(--tech-drift-y, 0));
  transition: transform 0.6s ease-out;
}

.background-data-grid::before {
  background:
    linear-gradient(90deg, transparent 0 88%, rgba(13, 110, 110, 0.08) 89%, transparent 90%),
    linear-gradient(0deg, transparent 0 91%, rgba(30, 77, 59, 0.06) 92%, transparent 93%);
  background-size: 96px 96px, 96px 96px;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 82%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 82%, transparent);
  animation: tech-grid-drift 22s linear infinite;
}

.background-data-grid::after {
  background:
    repeating-linear-gradient(115deg, transparent 0 72px, rgba(166, 196, 162, 0.09) 73px, transparent 76px),
    repeating-linear-gradient(25deg, transparent 0 120px, rgba(30, 77, 59, 0.055) 121px, transparent 124px);
  filter: blur(0.2px);
  animation: tech-diagonal-flow 28s linear infinite;
}

.bg-pulse-emitter {
  position: absolute;
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  transform: translate(-50%, -50%);
}

.emitter-1 { top: 18%; left: 8%; }
.emitter-2 { top: 75%; left: 85%; }

.pulse-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border: 1px solid rgba(13, 110, 110, 0.015);
  border-radius: 50%;
  opacity: 0;
  box-shadow: inset 0 0 15px rgba(13, 110, 110, 0.005);
  transform: translate(-50%, -50%);
  animation: tech-grid-pulse 18s cubic-bezier(0.1, 0.8, 0.2, 1) infinite;
}

.ring-1 { animation-delay: 0s; }
.ring-2 { animation-delay: 6s; }
.ring-3 { animation-delay: 12s; }
.emitter-2 .ring-1 { animation-delay: 3s; }
.emitter-2 .ring-2 { animation-delay: 9s; }
.emitter-2 .ring-3 { animation-delay: 15s; }

.ambient-glow-blob {
  position: fixed;
  opacity: 0.08;
  filter: blur(150px);
  will-change: transform;
}

.ambient-glow-blob::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: -2;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  will-change: opacity;
}

.blob-1 {
  top: 5vh;
  left: 5vw;
  width: 750px;
  height: 750px;
  animation: tech-drift-1 31s infinite alternate ease-in-out;
}

.blob-1::before {
  background: radial-gradient(circle at center, rgba(166, 196, 162, 0.4) 0%, rgba(30, 77, 59, 0.2) 45%, transparent 70%);
  animation: tech-pulse-glow 9s infinite alternate ease-in-out;
}

.blob-2 {
  top: 35vh;
  left: 70vw;
  width: 650px;
  height: 650px;
  animation: tech-drift-2 29s infinite alternate ease-in-out;
}

.blob-2::before {
  background: radial-gradient(circle at center, rgba(13, 110, 110, 0.4) 0%, rgba(166, 196, 162, 0.2) 40%, transparent 70%);
  animation: tech-pulse-glow 11s infinite alternate-reverse ease-in-out;
}

.blob-3 {
  top: 65vh;
  left: -5vw;
  width: 800px;
  height: 800px;
  animation: tech-drift-3 43s infinite alternate ease-in-out;
}

.blob-3::before {
  background: radial-gradient(circle at center, rgba(30, 77, 59, 0.4) 0%, rgba(166, 196, 162, 0.15) 45%, transparent 70%);
  animation: tech-pulse-glow 13s infinite alternate ease-in-out;
}

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}

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

.delay-1 { transition-delay: 0.15s; }
.delay-2 { transition-delay: 0.3s; }
.delay-3 { transition-delay: 0.45s; }

@keyframes glass-shimmer {
  from {
    opacity: 0.7;
    transform: rotate(-22deg) translateY(-25px);
  }
  to {
    opacity: 1;
    transform: rotate(-22deg) translateY(25px);
  }
}

@keyframes tech-grid-pulse {
  0% { width: 0; height: 0; opacity: 0; }
  8% { opacity: 0.35; }
  60% { opacity: 0.1; }
  100% { width: 650px; height: 650px; opacity: 0; }
}

@keyframes tech-grid-drift {
  from { background-position: 0 0, 0 0; }
  to { background-position: 96px 96px, -96px 96px; }
}

@keyframes tech-diagonal-flow {
  from { background-position: 0 0, 0 0; }
  to { background-position: 220px 0, -180px 0; }
}

@keyframes tech-surface-scan {
  from { transform: translateX(-120%); }
  to { transform: translateX(120%); }
}

@keyframes tech-visual-sweep {
  0%, 52% { transform: translateX(-120%); opacity: 0; }
  58% { opacity: 0.72; }
  76% { opacity: 0.72; }
  88%, 100% { transform: translateX(120%); opacity: 0; }
}

@keyframes live-graph-sweep {
  0%, 38% { left: -35%; opacity: 0; }
  48% { opacity: 1; }
  72% { opacity: 0.55; }
  88%, 100% { left: 110%; opacity: 0; }
}

@keyframes tech-drift-1 {
  0% { transform: translate(0, 0); }
  50% { transform: translate(30vw, 10vh); }
  100% { transform: translate(15vw, -5vh); }
}

@keyframes tech-drift-2 {
  0% { transform: translate(0, 0); }
  50% { transform: translate(-25vw, 15vh); }
  100% { transform: translate(-10vw, -15vh); }
}

@keyframes tech-drift-3 {
  0% { transform: translate(0, 0); }
  50% { transform: translate(40vw, -10vh); }
  100% { transform: translate(20vw, 5vh); }
}

@keyframes tech-pulse-glow {
  from {
    opacity: 0.6;
    transform: translate(-50%, -50%) scale(0.9);
  }
  to {
    opacity: 0.9;
    transform: translate(-50%, -50%) scale(1.1);
  }
}

@keyframes neon-glow-pulse {
  0% { transform: scale(0.9); opacity: 0.5; }
  50% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.5; }
}

@keyframes svg-dash {
  to { stroke-dashoffset: -200; }
}

@keyframes svg-rotate {
  to { transform: rotate(360deg); }
}

@keyframes rotate-core {
  to { transform: rotate(360deg); }
}

@keyframes pulse-green {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

@keyframes led-flicker {
  from { opacity: 0.45; }
  to { opacity: 1; }
}

@keyframes leaf-glow-pulse {
  0%, 100% {
    transform: scale(1);
    filter: drop-shadow(0 0 0 var(--color-accent));
  }
  50% {
    transform: scale(1.1) rotate(5deg);
    filter: drop-shadow(0 0 6px rgba(13, 110, 110, 0.4));
  }
}

@keyframes status-glow-pulse {
  0%, 100% {
    opacity: 0.55;
    box-shadow: 0 0 6px var(--color-success);
  }
  50% {
    opacity: 1;
    box-shadow: 0 0 12px var(--color-success);
  }
}

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

@keyframes scale-up {
  from { transform: scale(0.6); }
  to { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
