/* ============================= */
/* ANIMATIONS AVANCÉES ET EFFETS MODERNES */
/* ============================= */

/* Particules animées en arrière-plan - Optimisé */
.particles-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  will-change: contents;
  contain: layout style paint;
}

.particle {
  position: absolute;
  width: 3px; /* Réduit de 4px à 3px */
  height: 3px;
  background: rgba(255, 255, 255, 0.2); /* Réduit l'opacité */
  border-radius: 50%;
  animation: float-particle 20s infinite ease-in-out; /* Plus lent */
  will-change: transform;
  transform: translateZ(0);
  /* Supprimé box-shadow pour meilleures performances */
}

@keyframes float-particle {
  0%, 100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.3;
  }
  25% {
    transform: translate(100px, -100px) scale(1.2);
    opacity: 0.6;
  }
  50% {
    transform: translate(-50px, -200px) scale(0.8);
    opacity: 0.4;
  }
  75% {
    transform: translate(-100px, -50px) scale(1.1);
    opacity: 0.7;
  }
}

/* Gradient animé */
.animated-gradient {
  background: linear-gradient(-45deg, 
    rgba(255, 255, 255, 0.05), 
    rgba(255, 255, 255, 0.02),
    rgba(255, 255, 255, 0.05),
    rgba(255, 255, 255, 0.02));
  background-size: 400% 400%;
  animation: gradient-shift 15s ease infinite;
}

@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Effet de morphing glass */
.morphing-glass {
  position: relative;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  overflow: hidden;
}

.morphing-glass::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, 
    rgba(255, 255, 255, 0.1) 0%, 
    transparent 50%);
  animation: morph 8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes morph {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(30px, -30px) scale(1.1);
  }
  66% {
    transform: translate(-30px, 30px) scale(0.9);
  }
}

/* Effet de lumière qui suit la souris - Optimisé */
.cursor-light {
  position: fixed;
  width: 300px; /* Réduit de 400px */
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, 
    rgba(255, 255, 255, 0.08) 0%, 
    transparent 70%);
  pointer-events: none;
  transform: translate(-50%, -50%) translateZ(0);
  transition: opacity 0.3s ease;
  z-index: 9999;
  filter: blur(30px); /* Réduit de 40px */
  will-change: transform;
  contain: layout style paint;
}

/* Effet de texte avec dégradé animé */
.text-gradient-animated {
  background: linear-gradient(90deg, 
    #ffffff 0%, 
    rgba(255, 255, 255, 0.8) 25%,
    #ffffff 50%,
    rgba(255, 255, 255, 0.8) 75%,
    #ffffff 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: text-shimmer 3s linear infinite;
}

@keyframes text-shimmer {
  to {
    background-position: 200% center;
  }
}

/* Effet de vague animée */
.wave-effect {
  position: relative;
  overflow: hidden;
}

.wave-effect::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(255, 255, 255, 0.1), 
    transparent);
  animation: wave 3s infinite;
}

@keyframes wave {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Effet de glitch moderne */
.glitch-effect {
  position: relative;
  animation: glitch 0.3s infinite;
}

.glitch-effect::before,
.glitch-effect::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.glitch-effect::before {
  left: 2px;
  text-shadow: -2px 0 #ff00c1;
  clip: rect(44px, 450px, 56px, 0);
  animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch-effect::after {
  left: -2px;
  text-shadow: -2px 0 #00fff9, 2px 2px #ff00c1;
  clip: rect(44px, 450px, 56px, 0);
  animation: glitch-anim2 1s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
  0% { clip: rect(10px, 9999px, 85px, 0); }
  20% { clip: rect(33px, 9999px, 20px, 0); }
  40% { clip: rect(10px, 9999px, 78px, 0); }
  60% { clip: rect(2px, 9999px, 14px, 0); }
  80% { clip: rect(78px, 9999px, 52px, 0); }
  100% { clip: rect(65px, 9999px, 11px, 0); }
}

@keyframes glitch-anim2 {
  0% { clip: rect(65px, 9999px, 100px, 0); }
  20% { clip: rect(25px, 9999px, 5px, 0); }
  40% { clip: rect(50px, 9999px, 30px, 0); }
  60% { clip: rect(8px, 9999px, 60px, 0); }
  80% { clip: rect(90px, 9999px, 10px, 0); }
  100% { clip: rect(30px, 9999px, 80px, 0); }
}

/* Effet de parallaxe 3D */
.parallax-3d {
  transform-style: preserve-3d;
  transition: transform 0.1s ease-out;
}

/* Effet de zoom au scroll */
.scroll-zoom {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

/* Effet de blur progressif */
.blur-on-scroll {
  transition: filter 0.3s ease-out;
  will-change: filter;
}

/* Effet de révélation au scroll */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-on-scroll.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Effet de rotation 3D au hover */
.hover-3d {
  transform-style: preserve-3d;
  transition: transform 0.3s ease-out;
}

.hover-3d:hover {
  transform: perspective(1000px) rotateY(5deg) rotateX(-5deg);
}

/* Effet de liquide */
.liquid-effect {
  position: relative;
  overflow: hidden;
}

.liquid-effect::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.liquid-effect:hover::before {
  width: 300px;
  height: 300px;
}

/* Effet de néon */
.neon-glow {
  text-shadow: 
    0 0 5px rgba(255, 255, 255, 0.5),
    0 0 10px rgba(255, 255, 255, 0.5),
    0 0 15px rgba(255, 255, 255, 0.5),
    0 0 20px rgba(255, 255, 255, 0.3);
  animation: neon-pulse 2s ease-in-out infinite alternate;
}

@keyframes neon-pulse {
  from {
    text-shadow: 
      0 0 5px rgba(255, 255, 255, 0.5),
      0 0 10px rgba(255, 255, 255, 0.5),
      0 0 15px rgba(255, 255, 255, 0.5),
      0 0 20px rgba(255, 255, 255, 0.3);
  }
  to {
    text-shadow: 
      0 0 10px rgba(255, 255, 255, 0.8),
      0 0 20px rgba(255, 255, 255, 0.8),
      0 0 30px rgba(255, 255, 255, 0.8),
      0 0 40px rgba(255, 255, 255, 0.5);
  }
}

/* Effet de split text */
.split-text {
  display: inline-block;
  overflow: hidden;
}

.split-text span {
  display: inline-block;
  transform: translateY(100%);
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.split-text.revealed span {
  transform: translateY(0);
}

/* Effet de magnetic hover */
.magnetic {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Smooth scroll indicator */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: linear-gradient(90deg, 
    rgba(255, 255, 255, 0.8),
    rgba(255, 255, 255, 0.4));
  z-index: 10000;
  transition: width 0.1s ease-out;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Effet de curtain reveal */
.curtain-reveal {
  position: relative;
  overflow: hidden;
}

.curtain-reveal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  transform: translateX(-100%);
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}

.curtain-reveal.revealed::before {
  transform: translateX(100%);
}

/* Optimisations de performance */
.gpu-accelerated {
  transform: translateZ(0);
  will-change: transform;
  backface-visibility: hidden;
  perspective: 1000px;
}

/* Réduction des animations pour les préférences utilisateur */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

