/* ========================================
   MENU BAS MODERNE ET DYNAMIQUE - LP AUTOMOBILE
   ======================================== */

.modern-bottom-nav {
  position: fixed;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 1200;
  pointer-events: none;
}

.nav-container {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 30px;
  padding: 12px 18px calc(12px + env(safe-area-inset-bottom, 0px));
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.1),
    0 2px 8px rgba(0, 0, 0, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
  pointer-events: auto;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.1) 0%, 
    rgba(255, 255, 255, 0.05) 100%);
  pointer-events: none;
}

.nav-container:hover {
  animation: containerPulse 0.6s ease-in-out;
  box-shadow: 
    0 15px 50px rgba(34, 197, 94, 0.2),
    0 8px 25px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
  position: relative;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 20px;
  text-decoration: none;
  color: #64748b;
  border-radius: 22px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  min-width: 75px;
  cursor: pointer;
}

.nav-link:hover {
  color: #1e293b;
  text-decoration: none;
  transform: translateY(-3px) scale(1.05);
  background: rgba(34, 197, 94, 0.08);
  box-shadow: 0 8px 25px rgba(34, 197, 94, 0.15);
}

.nav-link.active {
  color: #22c55e;
  background: rgba(34, 197, 94, 0.12);
}

.nav-link.active .nav-icon svg {
  stroke: #22c55e;
}

/* Icônes SVG */
.nav-icon {
  width: 28px;
  height: 28px;
  margin-bottom: 6px;
  position: relative;
  z-index: 2;
}

.nav-icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover .nav-icon svg {
  transform: scale(1.15) rotate(5deg);
  stroke-width: 2.5;
  stroke: #22c55e;
  filter: drop-shadow(0 0 8px rgba(34, 197, 94, 0.3));
  animation: iconFloat 2s ease-in-out infinite;
}

.nav-link.active .nav-icon svg {
  transform: scale(1.05);
  stroke-width: 2.5;
}

/* Labels */
.nav-label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.025em;
  opacity: 0.8;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 2;
}

.nav-link:hover .nav-label {
  opacity: 1;
  transform: translateY(-2px);
  color: #22c55e;
  font-weight: 600;
}

.nav-link.active .nav-label {
  opacity: 1;
  font-weight: 600;
}

/* Effet ripple au clic */
.nav-ripple {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.3);
  transform: translate(-50%, -50%);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  z-index: 1;
}

.nav-link:active .nav-ripple {
  width: 100px;
  height: 100px;
  opacity: 0;
}

/* Bouton CTA spécial */
.nav-cta .nav-link {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: white;
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4);
  position: relative;
  overflow: hidden;
}

.nav-cta .nav-link::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(255, 255, 255, 0.4) 50%, 
    transparent 100%);
  background-size: 200% 100%;
  animation: shine 3s ease-in-out infinite;
}

.nav-cta .nav-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(255, 255, 255, 0.2) 50%, 
    transparent 100%);
  transition: left 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-cta .nav-link:hover::before {
  left: 100%;
}

.nav-cta .nav-link:hover {
  transform: translateY(-4px) scale(1.08);
  box-shadow: 0 10px 30px rgba(34, 197, 94, 0.5);
  color: white;
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
}

.nav-cta .nav-icon svg {
  stroke: white;
}

.nav-cta .nav-label {
  color: white;
  opacity: 1;
}

/* Effet de lueur pour le CTA */
.nav-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 140%;
  height: 140%;
  background: radial-gradient(circle, rgba(34, 197, 94, 0.4) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 0;
}

.nav-cta .nav-link:hover .nav-glow {
  opacity: 1;
}

/* Indicateur de sélection animé */
.nav-indicator {
  position: absolute;
  bottom: -2px;
  left: 18px;
  width: 75px;
  height: 4px;
  background: linear-gradient(90deg, #22c55e, #16a34a);
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.5);
}

.nav-link.active ~ .nav-indicator,
.nav-item:has(.nav-link.active) ~ .nav-indicator {
  opacity: 1;
}

/* Effet de vague au survol */
.nav-wave {
  position: absolute;
  top: 50%;
  left: 0;
  width: 0;
  height: 0;
  background: radial-gradient(circle, rgba(34, 197, 94, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  transform: translateY(-50%);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  opacity: 0;
}

.nav-container:hover .nav-wave {
  width: 250px;
  height: 250px;
  opacity: 1;
}

/* Tooltips au survol */
.nav-link::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  margin-bottom: 8px;
}

.nav-link::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: rgba(0, 0, 0, 0.8);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin-bottom: 4px;
}

.nav-link:hover::after,
.nav-link:hover::before {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-4px);
}

/* Animations d'entrée */
@keyframes navSlideUp {
  from {
    transform: translateX(-50%) translateY(100px);
    opacity: 0;
  }
  to {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
}

/* Animation de pulsation au survol du conteneur */
@keyframes containerPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

/* Animation de rotation des icônes */
@keyframes iconFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-2px) rotate(2deg); }
  50% { transform: translateY(-1px) rotate(-1deg); }
  75% { transform: translateY(-3px) rotate(1deg); }
}

/* Animation de brillance */
@keyframes shine {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.modern-bottom-nav {
  animation: navSlideUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.nav-item {
  animation: navItemFadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.nav-item:nth-child(1) { animation-delay: 0.1s; }
.nav-item:nth-child(2) { animation-delay: 0.15s; }
.nav-item:nth-child(3) { animation-delay: 0.2s; }
.nav-item:nth-child(4) { animation-delay: 0.25s; }
.nav-item:nth-child(5) { animation-delay: 0.3s; }

@keyframes navItemFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .modern-bottom-nav {
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  }
  
  .nav-container {
    padding: 6px 8px calc(8px + env(safe-area-inset-bottom, 0px));
    border-radius: 20px;
  }
  
  .nav-link {
    padding: 10px 12px;
    min-width: 50px;
  }
  
  .nav-icon {
    width: 20px;
    height: 20px;
    margin-bottom: 3px;
  }
  
  .nav-label {
    font-size: 10px;
  }
  
  .nav-indicator {
    width: 50px;
    left: 12px;
  }
}

@media (max-width: 480px) {
  .nav-menu {
    gap: 2px;
  }
  
  .nav-link {
    padding: 8px 10px;
    min-width: 45px;
  }
  
  .nav-icon {
    width: 18px;
    height: 18px;
  }
  
  .nav-label {
    font-size: 9px;
  }
}

/* Accessibilité */
@media (prefers-reduced-motion: reduce) {
  .nav-container,
  .nav-link,
  .nav-icon svg,
  .nav-label,
  .nav-ripple,
  .nav-indicator,
  .nav-wave,
  .nav-link::after,
  .nav-link::before {
    transition: none;
  }
  
  .modern-bottom-nav,
  .nav-item {
    animation: none;
  }
}

/* Mode sombre */
@media (prefers-color-scheme: dark) {
  .nav-container {
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .nav-link {
    color: #94a3b8;
  }
  
  .nav-link:hover {
    color: #e2e8f0;
  }
  
  .nav-link.active {
    color: #60a5fa;
    background: rgba(96, 165, 250, 0.1);
  }
}
