/* ===== ANIMATIONS SPECTACULAIRES ET DIVERTISSANTES ===== */

/* ===== VARIABLES POUR LES ANIMATIONS ===== */
:root {
  --animation-duration-spectacular: 1.2s;
  --animation-duration-slow: 2s;
  --easing-spectacular: cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --easing-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --easing-elastic: cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --easing-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ===== ANIMATIONS DE SCROLL SPECTACULAIRES ===== */

/* Wave Reveal - Les éléments apparaissent comme des vagues */
.wave-reveal {
  opacity: 0;
  transform: translateY(100px) scale(0.8);
  transition: all var(--animation-duration-spectacular) var(--easing-spectacular);
}

.wave-reveal.revealed {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.wave-reveal:nth-child(1).revealed { transition-delay: 0.1s; }
.wave-reveal:nth-child(2).revealed { transition-delay: 0.2s; }
.wave-reveal:nth-child(3).revealed { transition-delay: 0.3s; }
.wave-reveal:nth-child(4).revealed { transition-delay: 0.4s; }
.wave-reveal:nth-child(5).revealed { transition-delay: 0.5s; }
.wave-reveal:nth-child(6).revealed { transition-delay: 0.6s; }

/* Staggered Reveal - Apparition échelonnée avec rotation */
.staggered-reveal {
  opacity: 0;
  transform: translateY(80px) rotateX(90deg);
  transition: all var(--animation-duration-spectacular) var(--easing-elastic);
}

.staggered-reveal.revealed {
  opacity: 1;
  transform: translateY(0) rotateX(0deg);
}

.staggered-reveal:nth-child(1).revealed { transition-delay: 0.1s; }
.staggered-reveal:nth-child(2).revealed { transition-delay: 0.3s; }
.staggered-reveal:nth-child(3).revealed { transition-delay: 0.5s; }
.staggered-reveal:nth-child(4).revealed { transition-delay: 0.7s; }

/* Morphing Icons - Les icônes se transforment */
.morphing-icon {
  transition: all var(--animation-duration-spectacular) var(--easing-spectacular);
  display: inline-block;
}

.morphing-icon:hover {
  transform: scale(1.3) rotate(360deg);
  filter: hue-rotate(90deg);
}

/* Text Reveal - Le texte se révèle lettre par lettre */
.text-reveal {
  overflow: hidden;
  position: relative;
}

.text-reveal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
  transform: translateX(-100%);
  animation: textReveal 2s var(--easing-smooth) both;
}

@keyframes textReveal {
  0% { transform: translateX(-100%); }
  50% { transform: translateX(0%); }
  100% { transform: translateX(100%); }
}

/* Card Flip 3D */
.card-flip {
  perspective: 1000px;
  transition: all var(--animation-duration-spectacular) var(--easing-spectacular);
}

.card-flip .card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform var(--animation-duration-spectacular);
  transform-style: preserve-3d;
}

.card-flip:hover .card-inner {
  transform: rotateY(180deg);
}

.card-front, .card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 2rem;
}

.card-back {
  transform: rotateY(180deg);
  background: var(--gradient-primary);
  color: white;
}

/* ===== INTERACTIONS MOUSE DIVERTISSANTES ===== */

/* Magnetic Buttons - Les boutons attirent le curseur */
.magnetic-btn {
  position: relative;
  transition: all 0.3s var(--easing-smooth);
  cursor: pointer;
}

.magnetic-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Floating Particles - Particules qui flottent */
.particle-container {
  position: relative;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--primary-color);
  border-radius: 50%;
  opacity: 0;
  animation: floatParticle 3s infinite;
}

@keyframes floatParticle {
  0% {
    opacity: 0;
    transform: translateY(0) scale(0);
  }
  50% {
    opacity: 1;
    transform: translateY(-100px) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-200px) scale(0);
  }
}

/* Hover Explosion - Effet d'explosion au survol */
.hover-explosion {
  position: relative;
  overflow: hidden;
}

.hover-explosion::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  transition: all 0.6s var(--easing-spectacular);
}

.hover-explosion:hover::before {
  width: 300px;
  height: 300px;
}

/* Cursor Trail - Traînée derrière le curseur */
.cursor-trail {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--primary-color-rgb), 0.8) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  animation: cursorTrail 0.5s ease-out forwards;
}

@keyframes cursorTrail {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0);
  }
}

/* Element Following - Éléments qui suivent la souris */
.follow-mouse {
  transition: all 0.1s ease-out;
  will-change: transform;
}

/* ===== ANIMATIONS DE CHARGEMENT SPECTACULAIRES ===== */

/* Loading Screen */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  transition: opacity 1s ease-out;
}

.loading-screen.hidden {
  opacity: 0;
  pointer-events: none;
}

.loading-logo {
  font-size: 3rem;
  font-weight: bold;
  color: var(--primary-color);
  animation: logoPulse 2s ease-in-out infinite;
}

@keyframes logoPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.7;
  }
}

.loading-progress {
  width: 300px;
  height: 6px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 2rem;
}

.loading-progress-bar {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 3px;
  width: 0%;
  transition: width 0.3s ease;
  position: relative;
}

.loading-progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: progressShine 2s ease-in-out infinite;
}

@keyframes progressShine {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Page Transitions */
.page-transition {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--primary-color);
  z-index: 9999;
  transform: translateY(100%);
  transition: transform 0.8s var(--easing-spectacular);
}

.page-transition.active {
  transform: translateY(0);
}

/* Content Reveal Progressif */
.content-reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: all 1s var(--easing-spectacular);
}

.content-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Skeleton Loading */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeletonLoading 1.5s infinite;
  border-radius: 8px;
}

@keyframes skeletonLoading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ===== EFFETS DE PARALLAXE ET PROFONDEUR ===== */

/* Background Parallax */
.parallax-bg {
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  transform: translateZ(0);
}

/* Card Depth 3D */
.card-3d {
  perspective: 1000px;
  transform-style: preserve-3d;
  transition: all 0.6s var(--easing-smooth);
}

.card-3d:hover {
  transform: rotateX(10deg) rotateY(10deg);
}

.card-3d .card-content {
  transform: translateZ(20px);
  transition: all 0.6s var(--easing-smooth);
}

/* Floating Elements */
.floating-element {
  animation: floatingElement 4s ease-in-out infinite;
}

@keyframes floatingElement {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  25% {
    transform: translateY(-20px) rotate(2deg);
  }
  50% {
    transform: translateY(-10px) rotate(0deg);
  }
  75% {
    transform: translateY(-30px) rotate(-2deg);
  }
}

/* Perspective Shifts */
.perspective-shift {
  perspective: 1000px;
  transition: all 0.8s var(--easing-spectacular);
}

.perspective-shift:hover {
  perspective: 500px;
}

.perspective-shift .element {
  transform: translateZ(0);
  transition: all 0.8s var(--easing-spectacular);
}

.perspective-shift:hover .element {
  transform: translateZ(50px) rotateX(5deg);
}

/* ===== ANIMATIONS SPÉCIALES ===== */

/* Typewriter Effect Amélioré */
.typewriter-enhanced {
  overflow: hidden;
  border-right: 3px solid var(--primary-color);
  white-space: nowrap;
  animation: typewriterEnhanced 4s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typewriterEnhanced {
  from { width: 0; }
  to { width: 100%; }
}

/* Glitch Effect Amélioré */
.glitch-enhanced {
  position: relative;
  animation: glitchEnhanced 3s infinite;
}

.glitch-enhanced::before,
.glitch-enhanced::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.glitch-enhanced::before {
  animation: glitch-1-enhanced 0.6s infinite;
  color: #ff0000;
  z-index: -1;
}

.glitch-enhanced::after {
  animation: glitch-2-enhanced 0.6s infinite;
  color: #00ff00;
  z-index: -2;
}

@keyframes glitchEnhanced {
  0%, 100% { transform: translate(0); }
  20% { transform: translate(-3px, 3px); }
  40% { transform: translate(-3px, -3px); }
  60% { transform: translate(3px, 3px); }
  80% { transform: translate(3px, -3px); }
}

@keyframes glitch-1-enhanced {
  0%, 100% { transform: translate(0); }
  20% { transform: translate(3px, -3px); }
  40% { transform: translate(-3px, 3px); }
  60% { transform: translate(-3px, -3px); }
  80% { transform: translate(3px, 3px); }
}

@keyframes glitch-2-enhanced {
  0%, 100% { transform: translate(0); }
  20% { transform: translate(-3px, -3px); }
  40% { transform: translate(3px, -3px); }
  60% { transform: translate(3px, 3px); }
  80% { transform: translate(-3px, 3px); }
}

/* Matrix Rain Effect */
.matrix-rain {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  opacity: 0.1;
}

.matrix-column {
  position: absolute;
  top: -100px;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  color: var(--primary-color);
  animation: matrixFall linear infinite;
}

@keyframes matrixFall {
  0% {
    transform: translateY(-100px);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh);
    opacity: 0;
  }
}

/* ===== ANIMATION DE REBOND POUR LES ÉLÉMENTS ===== */
@keyframes elementBounce {
  0% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-10px) scale(1.05);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}

/* ===== MASQUAGE INITIAL DES ÉLÉMENTS ===== */
.scroll-reveal {
  opacity: 0 !important;
  transform: translateY(50px) !important;
  transition: all 1s var(--easing-spectacular) !important;
}

.scroll-reveal.revealed {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* ===== PROTECTION DU HEADER ===== */
.header {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 1000 !important;
  background-color: var(--bg-white) !important;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1) !important;
  transition: none !important;
}

.header .nav-link {
  opacity: 1 !important;
  transform: none !important;
  pointer-events: auto !important;
}

.header .logo {
  opacity: 1 !important;
  transform: none !important;
  pointer-events: auto !important;
}

.header .nav-toggle {
  opacity: 1 !important;
  transform: none !important;
  pointer-events: auto !important;
}

/* ===== STYLES POUR LES ICÔNES PROFESSIONNELLES ===== */
.icon-container {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

.icon-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
  border-radius: 16px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.icon-container:hover::before {
  opacity: 1;
}

.icon-container svg {
  color: white;
  width: 24px;
  height: 24px;
  z-index: 1;
  position: relative;
  transition: all 0.3s ease;
}

.service-card:hover .icon-container {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
}

.service-card:hover .icon-container svg {
  transform: scale(1.1);
}

/* ===== STYLES POUR LES IMAGES HERO ===== */
.hero-image-container {
  position: relative;
  width: 100%;
  height: 400px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-large);
  transition: all 0.3s ease;
}

.hero-image-container:hover {
  transform: scale(1.02);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: all 0.3s ease;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.1));
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 2rem;
}

.hero-badge {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 1rem 1.5rem;
  border-radius: 50px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--primary-color);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  animation: heroBadgeFloat 3s ease-in-out infinite;
}

@keyframes heroBadgeFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

/* ===== RESPONSIVE ET PERFORMANCE ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .scroll-reveal {
    opacity: 1 !important;
    transform: none !important;
  }
  
  .hero-badge {
    animation: none !important;
  }
}

/* Optimisations GPU */
.gpu-accelerated {
  transform: translateZ(0);
  backface-visibility: hidden;
  will-change: transform;
}

/* Classes utilitaires pour les animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(50px);
  transition: all 1s var(--easing-spectacular);
}

.animate-on-scroll.revealed {
  opacity: 1;
  transform: translateY(0);
}

.animate-on-hover {
  transition: all 0.3s var(--easing-smooth);
}

.animate-on-hover:hover {
  transform: translateY(-5px) scale(1.05);
}

/* ===== SYSTÈME D'ICÔNES SVG PROFESSIONNELLES ===== */
.professional-icon {
  width: 24px;
  height: 24px;
  color: var(--primary-color);
  transition: all 0.3s ease;
  display: inline-block;
  vertical-align: middle;
  margin-right: 8px;
  flex-shrink: 0;
}

.professional-icon-large {
  width: 48px;
  height: 48px;
  color: var(--primary-color);
  transition: all 0.3s ease;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.professional-icon-container {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  box-shadow: 0 12px 30px rgba(102, 126, 234, 0.3);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.professional-icon-container svg {
  color: white;
  width: 32px;
  height: 32px;
  transition: all 0.3s ease;
}

.professional-icon-container:hover {
  transform: translateY(-8px) scale(1.1);
  box-shadow: 0 20px 50px rgba(102, 126, 234, 0.4);
}

.professional-icon-container:hover svg {
  transform: scale(1.2);
}

/* Icônes dans les titres */
.title-icon {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.title-icon .professional-icon {
  margin-right: 0;
}

/* Icônes dans les cartes */
.card-icon {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1rem;
}

.card-icon .professional-icon {
  margin-right: 0;
}

/* ===== MENU DESKTOP DE NIVEAU SUPÉRIEUR ===== */

/* Header height removed - now controlled by style.css */

/* Force le logo à être collé à gauche */
.header .nav .logo {
  margin-left: 0 !important;
  margin-right: auto !important;
  position: absolute;
  left: 2rem;
  z-index: 1001;
}

/* Uniformise la taille du menu */
.header .nav-menu {
  min-width: 400px !important;
  width: auto !important;
}

/* Override container class for nav - SOLUTION ULTRA-SPÉCIFIQUE */
html body .header .nav.container,
html body header .nav.container,
html body .header nav.container,
html body header nav.container {
  max-width: none !important;
  width: 100% !important;
  padding: 1.5rem 2rem !important;
  /* Height rules removed - controlled by style.css */
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin: 0 !important;
}

/* Ultra-specific height rules removed - now controlled by style.css */

/* Force l'alignement parfait sur PC */
@media (min-width: 769px) {
  html body .header .nav {
    justify-content: flex-start !important;
    position: relative !important;
  }
  
  html body .header .nav .logo {
    position: relative !important;
    left: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    z-index: 1002 !important;
  }
  
  html body .header .nav .nav-menu {
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translateX(-50%) translateY(-50%) !important;
    z-index: 1001 !important;
  }
}

/* Force l'alignement parfait sur mobile */
@media (max-width: 768px) {
  html body .header,
  html body .header .nav,
  html body .header .nav.container {
    /* Height rules removed - controlled by style.css */
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-direction: row !important;
  }
  
  html body .header .nav .logo {
    height: 50px !important;
    min-height: 50px !important;
    max-height: 50px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    margin: 0 !important;
    margin-right: auto !important;
    padding: 0 !important;
    /* Line-height rule removed - controlled by style.css */
    order: 1 !important;
  }
  
  html body .header .nav .nav-toggle {
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
    width: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    margin-left: auto !important;
    padding: 0 !important;
    line-height: 40px !important;
    order: 2 !important;
  }
}
.nav {
  position: relative;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1.5rem 2rem;
  /* Height rule removed - controlled by style.css */
}

.nav-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
  gap: 0.5rem;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  min-width: 400px;
  justify-content: center;
}

.nav-menu li {
  position: relative;
  margin: 0;
}

.nav-link {
  display: block;
  padding: 0.75rem 1.25rem;
  color: var(--text-dark);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  border-radius: 25px;
  background: transparent;
  overflow: hidden;
  min-height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border-radius: 25px;
  z-index: -1;
}

.nav-link::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: -1;
}

.nav-link:hover {
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.nav-link:hover::before {
  opacity: 1;
}

.nav-link:hover::after {
  width: 300px;
  height: 300px;
}

.nav-link.active {
  color: white;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
  transform: translateY(-1px);
}

.nav-link.active::before {
  opacity: 1;
}

/* Effet de vague sur hover */
.nav-link {
  position: relative;
  overflow: hidden;
}

.nav-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.6s ease;
  z-index: 1;
}

.nav-link:hover::before {
  left: 100%;
}

/* Animation de pulsation pour le lien actif */
.nav-link.active {
  animation: activePulse 2s ease-in-out infinite;
}

@keyframes activePulse {
  0%, 100% { 
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
    transform: translateY(-1px);
  }
  50% { 
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.6);
    transform: translateY(-2px);
  }
}

/* Logo avec effet hover */
.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary-color);
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  padding: 0.5rem 0;
  margin-left: 0 !important;
  margin-right: auto !important;
  min-height: 45px;
  display: flex;
  align-items: center;
}

.logo:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 5px 15px rgba(102, 126, 234, 0.3));
}

/* ===== BURGER MENU MOBILE ULTRA-STYLÉ ===== */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  width: 48px;
  height: 48px;
  position: relative;
  z-index: 1001;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.nav-toggle:hover {
  transform: scale(1.1);
}

.hamburger {
  width: 30px;
  height: 24px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.hamburger-line {
  width: 100%;
  height: 3px;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
  border-radius: 2px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform-origin: center;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.hamburger-line:nth-child(1) {
  transform-origin: top left;
}

.hamburger-line:nth-child(3) {
  transform-origin: bottom left;
}

/* Animation d'ouverture burger */
.nav-toggle.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
  background: linear-gradient(135deg, #ff6b6b 0%, #ff8e8e 100%);
  box-shadow: 0 2px 8px rgba(255, 107, 107, 0.4);
}

.nav-toggle.active .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: translateX(-20px);
}

.nav-toggle.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
  background: linear-gradient(135deg, #ff6b6b 0%, #ff8e8e 100%);
  box-shadow: 0 2px 8px rgba(255, 107, 107, 0.4);
}

/* Menu mobile plein écran */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.98) 0%, rgba(118, 75, 162, 0.98) 100%);
  backdrop-filter: blur(20px);
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 999;
  padding: 2rem;
  box-shadow: 0 0 50px rgba(102, 126, 234, 0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateX(100%);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: none;
}

.mobile-menu.active {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  display: flex;
}

.mobile-menu::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.05"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.3;
  pointer-events: none;
}

.mobile-menu li {
  margin: 0;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.mobile-menu.active li {
  opacity: 1;
  transform: translateY(0);
}

.mobile-menu.active li:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu.active li:nth-child(2) { transition-delay: 0.2s; }
.mobile-menu.active li:nth-child(3) { transition-delay: 0.3s; }
.mobile-menu.active li:nth-child(4) { transition-delay: 0.4s; }
.mobile-menu.active li:nth-child(5) { transition-delay: 0.5s; }

.mobile-menu.active li:hover {
  transform: translateY(-5px) scale(1.05);
}

.mobile-menu .nav-link {
  display: block;
  padding: 1.5rem 2rem;
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.2rem;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  margin: 0.5rem 0;
  min-width: 200px;
  text-align: center;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.mobile-menu .nav-link:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.mobile-menu .nav-link.active {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.1) 100%);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Responsive - Desktop First */
@media (min-width: 769px) {
  .nav-toggle {
    display: none !important;
  }
  
  .mobile-menu {
    display: none !important;
  }
  
  .nav-menu {
    display: flex !important;
    position: absolute !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    gap: 0.5rem;
    top: 50% !important;
    transform: translateX(-50%) translateY(-50%) !important;
  }
  
  .nav {
    justify-content: flex-start !important;
    padding: 1.5rem 2rem !important;
    /* Height rule removed - controlled by style.css */
    position: relative !important;
  }
  
  .logo {
    flex-shrink: 0;
    margin-right: 0 !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
    position: relative !important;
    left: 0 !important;
    z-index: 1002 !important;
  }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
  .nav {
    justify-content: space-between !important;
    padding: 1.5rem 2rem !important;
    /* Height rule removed - controlled by style.css */
    display: flex !important;
    align-items: center !important;
    position: relative !important;
  }
  
  /* Child element height rules removed - now controlled by style.css */
  
  .nav-toggle {
    display: flex !important;
    position: relative !important;
    z-index: 1001 !important;
    background: rgba(102, 126, 234, 0.1) !important;
    border: 1px solid rgba(102, 126, 234, 0.2) !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2) !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 8px !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 0 !important;
    vertical-align: middle !important;
  }
  
  .nav-toggle .hamburger {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
  }
  
  .nav-toggle .hamburger-line {
    width: 18px !important;
    height: 2px !important;
    background: var(--primary-color) !important;
    border-radius: 1px !important;
    display: block !important;
  }
  
  .nav-menu {
    display: none !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100vh !important;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.98) 0%, rgba(118, 75, 162, 0.98) 100%) !important;
    backdrop-filter: blur(20px) !important;
    z-index: 999 !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    transform: none !important;
    min-width: auto !important;
  }
  
  .nav-menu.active {
    display: flex !important;
  }
  
  .nav-menu li {
    margin: 1rem 0 !important;
  }
  
  .nav-menu .nav-link {
    padding: 1rem 2rem !important;
    font-size: 1.2rem !important;
    color: white !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border-radius: 15px !important;
    min-width: 200px !important;
    text-align: center !important;
  }
  
  .mobile-menu {
    display: flex !important;
  }
  
  .mobile-menu:not(.active) {
    display: none !important;
  }
  
  .logo {
    flex-shrink: 0;
    position: relative !important;
    left: auto !important;
    margin-left: 0 !important;
    margin-right: auto !important;
    z-index: 1002;
    order: 1;
    align-self: center !important;
    display: flex !important;
    align-items: center !important;
    height: 50px !important;
    /* Line-height rule removed - controlled by style.css */
  }
  
  .nav-toggle {
    order: 2;
    margin-left: auto !important;
    margin-right: 0 !important;
    align-self: center !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 50px !important;
    width: 50px !important;
  }
}

/* ===== ANIMATIONS SPECTACULAIRES BURGER MENU ===== */
@keyframes burgerPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

@keyframes hamburgerGlow {
  0% { box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3); }
  50% { box-shadow: 0 2px 20px rgba(102, 126, 234, 0.6), 0 0 30px rgba(102, 126, 234, 0.3); }
  100% { box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3); }
}

@keyframes menuSlideIn {
  0% { 
    transform: translateX(100%); 
    opacity: 0; 
  }
  100% { 
    transform: translateX(0); 
    opacity: 1; 
  }
}

@keyframes linkBounce {
  0% { transform: translateY(30px) scale(0.8); opacity: 0; }
  50% { transform: translateY(-10px) scale(1.05); opacity: 0.8; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes menuBackground {
  0% { background-position: 0% 0%; }
  50% { background-position: 100% 100%; }
  100% { background-position: 0% 0%; }
}

/* Effets spéciaux pour le burger menu */
.nav-toggle:hover .hamburger-line {
  animation: hamburgerGlow 2s ease-in-out infinite;
}

.nav-toggle.active .hamburger {
  animation: burgerPulse 0.6s ease-in-out;
}

.nav-menu.active {
  animation: menuSlideIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.98) 0%, rgba(118, 75, 162, 0.98) 100%);
  background-size: 200% 200%;
  animation: menuBackground 3s ease infinite;
}

.nav-menu.active li {
  animation: linkBounce 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* Effet de particules flottantes dans le menu */
.nav-menu.active::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="floatingParticles" width="50" height="50" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="2" fill="white" opacity="0.1"><animate attributeName="cy" values="25;15;25" dur="3s" repeatCount="indefinite"/></circle><circle cx="10" cy="40" r="1.5" fill="white" opacity="0.08"><animate attributeName="cy" values="40;30;40" dur="4s" repeatCount="indefinite"/></circle><circle cx="40" cy="10" r="1" fill="white" opacity="0.06"><animate attributeName="cy" values="10;0;10" dur="5s" repeatCount="indefinite"/></circle></pattern></defs><rect width="100" height="100" fill="url(%23floatingParticles)"/></svg>');
  opacity: 0.4;
  pointer-events: none;
  animation: menuBackground 8s ease infinite;
}

/* Effet de brillance sur les liens */
.nav-link::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.nav-link:hover::after {
  left: 100%;
}

/* Animation de rotation pour le logo dans le menu */
.nav-menu.active .logo {
  animation: rotateLogo 2s ease-in-out;
}

@keyframes rotateLogo {
  0% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.1); }
  100% { transform: rotate(360deg) scale(1); }
}

/* Effet de vague sur les liens */
.nav-link {
  position: relative;
  overflow: hidden;
}

.nav-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.nav-link:hover::before {
  transform: translateX(100%);
}

/* Animation de fermeture du menu */
.nav-menu.closing {
  animation: menuSlideOut 0.3s cubic-bezier(0.55, 0.085, 0.68, 0.53) forwards;
}

@keyframes menuSlideOut {
  0% { 
    transform: translateX(0); 
    opacity: 1; 
  }
  100% { 
    transform: translateX(100%); 
    opacity: 0; 
  }
}
