/* ========================================
   NAVIGATION PREMIUM - LA BULLE APPLE SIGNATURE
   ======================================== */

.navigation {
  position: fixed;
  top: var(--spacing-lg);
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-navigation);
  will-change: transform;
}

.nav-container {
  position: relative;
  width: 60px;
  height: 60px;
  background: var(--color-surface);
  backdrop-filter: blur(24px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-pill);
  transition: all 0.7s var(--ease-natural);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: navGlow 3s ease-in-out infinite alternate;
}

.nav-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  animation: navShine 3s ease-in-out infinite;
  pointer-events: none;
}

/* Navigation Expanded State */
.navigation.expanded .nav-container {
  width: min(2500px, 95vw);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(24px) saturate(200%);
}

/* Supprimer limites mobiles et élargir */
.navigation.expanded .nav-container {
  width: 95vw !important;
  max-width: 2600px !important;
}

@media (max-width: 768px) {
  .navigation.expanded .nav-container {
    width: 95vw !important;
    max-width: 2400px !important;
  }
}

@media (max-width: 480px) {
  .navigation.expanded .nav-container {
    width: 95vw !important;
    max-width: 2200px !important;
  }
}

/* Logo */
.nav-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.7s var(--ease-natural);
  z-index: 2;
}

.navigation.expanded .nav-logo {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.8);
}

.logo-text {
  font-family: var(--font-family);
  font-size: 28px;
  font-weight: var(--font-weight-black);
  color: var(--color-text-primary);
  line-height: 1;
}

/* Menu Items */
.nav-menu {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  opacity: 0;
  transition: all 0.7s var(--ease-natural);
  transition-delay: 0.1s;
}

.navigation.expanded .nav-menu {
  opacity: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  padding: var(--spacing-sm) var(--spacing-sm);
  border-radius: var(--radius-pill);
  color: var(--color-text-secondary);
  font-size: 14px;
  font-weight: var(--font-weight-medium);
  transition: all 0.3s var(--ease-natural);
  position: relative;
  overflow: hidden;
  min-width: 44px;
  min-height: 44px;
  justify-content: center;
  flex-shrink: 0;
}

.nav-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-surface-hover);
  opacity: 0;
  transition: opacity 0.3s var(--ease-natural);
  border-radius: var(--radius-pill);
}

.nav-item:hover::before {
  opacity: 1;
}

.nav-item:hover {
  color: var(--color-text-primary);
  transform: scale(1.1);
}

.nav-item.active {
  color: var(--color-accent);
  background: rgba(255, 215, 0, 0.1);
}

.nav-item.active::before {
  opacity: 1;
  background: rgba(255, 215, 0, 0.15);
}

.nav-item i {
  width: 18px;
  height: 18px;
  transition: transform 0.3s var(--ease-spring);
}

.nav-item:hover i {
  transform: scale(1.1);
}

.nav-item span {
  transition: all 0.3s var(--ease-natural);
  white-space: nowrap;
}

/* Active Indicator */
.nav-indicator {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  background: var(--color-accent);
  border-radius: 50%;
  transition: all 0.5s var(--ease-spring);
  opacity: 0;
}

.navigation.expanded .nav-indicator {
  opacity: 1;
}

/* Stagger Animation for Menu Items */
.nav-item:nth-child(1) { transition-delay: 0.08s; }
.nav-item:nth-child(2) { transition-delay: 0.16s; }
.nav-item:nth-child(3) { transition-delay: 0.24s; }
.nav-item:nth-child(4) { transition-delay: 0.32s; }
.nav-item:nth-child(5) { transition-delay: 0.40s; }

/* Ripple Effect */
.nav-item::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s var(--ease-natural), height 0.6s var(--ease-natural);
}

.nav-item:active::after {
  width: 100px;
  height: 100px;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
  .navigation {
    top: var(--spacing-md);
  }
  
  .nav-container {
    width: 56px;
    height: 56px;
  }
  
  .navigation.expanded .nav-container {
    width: 95vw;
    max-width: 1200px;
  }
  
  .logo-text {
    font-size: 24px;
  }
  
  .nav-item {
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: 13px;
  }
  
  .nav-item span {
    display: none;
  }
  
  .nav-item i {
    width: 20px;
    height: 20px;
  }
}

@media (max-width: 480px) {
  .navigation.expanded .nav-container {
    width: 280px;
  }
  
  .nav-menu {
    gap: var(--spacing-xs);
  }
}

/* Auto-collapse Animation */
.navigation.auto-collapse .nav-container {
  width: 60px;
}

.navigation.auto-collapse .nav-logo {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.navigation.auto-collapse .nav-menu {
  opacity: 0;
}

.navigation.auto-collapse .nav-indicator {
  opacity: 0;
}

/* Scroll Sync Indicator */
.nav-indicator[data-section="hero"] {
  left: 20%;
}

.nav-indicator[data-section="player"] {
  left: 35%;
}

.nav-indicator[data-section="discography"] {
  left: 50%;
}

.nav-indicator[data-section="about"] {
  left: 65%;
}

.nav-indicator[data-section="contact"] {
  left: 80%;
}

/* Performance Optimizations */
.navigation {
  will-change: transform;
  transform: translateX(-50%) translateZ(0);
}

.nav-container {
  will-change: width, background;
}

.nav-item {
  will-change: transform, color;
}

/* Focus States for Accessibility */
.nav-item:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

@keyframes navGlow {
  0% {
    box-shadow: var(--shadow-lg);
  }
  100% {
    box-shadow: 
      var(--shadow-lg),
      0 0 20px rgba(255, 255, 255, 0.1);
  }
}

@keyframes navShine {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

/* Les boutons d'achat et profil utilisent maintenant le style standard des nav-item */

/* High Contrast Mode */
@media (prefers-contrast: high) {
  .nav-container {
    border: 2px solid var(--color-text-primary);
    background: var(--color-background);
  }
  
  .nav-item {
    color: var(--color-text-primary);
  }
  
  .nav-item.active {
    background: var(--color-accent);
    color: var(--color-secondary);
  }
}

/* Responsive Design */
@media (min-width: 1920px) {
  .navigation.expanded .nav-container {
    width: min(3000px, 95vw);
  }
}
  
  .nav-item span {
    font-size: 0.8rem;
  }
  
  .nav-item i {
    width: 16px;
    height: 16px;
  }
}

@media (max-width: 480px) {
  .navigation.expanded .nav-container {
    width: 95vw;
  }
  
  .nav-item span {
    display: none;
  }
  
  .nav-item i {
    width: 18px;
    height: 18px;
  }
  
  .nav-item {
    padding: var(--spacing-sm);
    border-radius: var(--radius-sm);
  }
}

/* Desktop nav width sane */
.navigation.expanded .nav-container {
  width: min(1600px, 95vw) !important;
}

@media (min-width: 1920px) {
  .navigation.expanded .nav-container {
    width: min(2000px, 95vw) !important;
  }
}
