/* ========================================
   MOBILE BOTTOM NAVIGATION - BS Custom
   Style moderne en pastilles pour mobile/tablette
   ======================================== */

/* Bottom Navigation Container */
.mobile-bottom-nav {
  display: none; /* Caché par défaut sur desktop */
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(15, 15, 15, 0.95);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-top: 1px solid rgba(198, 169, 109, 0.15);
  padding: 12px 16px max(12px, env(safe-area-inset-bottom));
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.4);
}

.mobile-bottom-nav-inner {
  display: flex;
  justify-content: space-around;
  align-items: center;
  max-width: 600px;
  margin: 0 auto;
  gap: 8px;
}

/* Navigation Item (Pastille) */
.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 1;
  max-width: 80px;
  padding: 8px 4px;
  border-radius: 16px;
  background: transparent;
  border: 1px solid transparent;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  text-decoration: none;
  position: relative;
}

.mobile-nav-item:active {
  transform: scale(0.95);
}

/* Icon Container */
.mobile-nav-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(24, 24, 24, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.mobile-nav-icon::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(198, 169, 109, 0.15) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-nav-icon svg {
  width: 24px;
  height: 24px;
  color: rgba(248, 248, 248, 0.7);
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
}

/* Label */
.mobile-nav-label {
  font-size: 10px;
  font-weight: 500;
  color: rgba(248, 248, 248, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: all 0.3s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Active State */
.mobile-nav-item.active {
  background: rgba(198, 169, 109, 0.12);
  border-color: rgba(198, 169, 109, 0.3);
}

.mobile-nav-item.active .mobile-nav-icon {
  background: linear-gradient(135deg, rgba(198, 169, 109, 0.25) 0%, rgba(198, 169, 109, 0.15) 100%);
  border-color: rgba(198, 169, 109, 0.4);
  box-shadow: 0 4px 12px rgba(198, 169, 109, 0.2), inset 0 1px 2px rgba(255, 255, 255, 0.1);
}

.mobile-nav-item.active .mobile-nav-icon::before {
  opacity: 1;
}

.mobile-nav-item.active .mobile-nav-icon svg {
  color: var(--gold);
  transform: scale(1.1);
}

.mobile-nav-item.active .mobile-nav-label {
  color: var(--gold);
  font-weight: 600;
}

/* Hover Effect (for tablets with mouse) */
@media (hover: hover) {
  .mobile-nav-item:hover:not(.active) .mobile-nav-icon {
    background: rgba(24, 24, 24, 0.8);
    border-color: rgba(198, 169, 109, 0.2);
    transform: translateY(-2px);
  }

  .mobile-nav-item:hover:not(.active) .mobile-nav-icon svg {
    color: rgba(248, 248, 248, 0.9);
  }

  .mobile-nav-item:hover:not(.active) .mobile-nav-label {
    color: rgba(248, 248, 248, 0.8);
  }
}

/* Badge pour notifications */
.mobile-nav-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background: linear-gradient(135deg, #ff4444 0%, #cc0000 100%);
  color: white;
  font-size: 9px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid rgba(15, 15, 15, 0.95);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  z-index: 2;
}

/* Afficher la navigation mobile uniquement sur tablette et mobile */
@media (max-width: 980px) {
  .mobile-bottom-nav {
    display: block;
  }

  /* Ajouter du padding en bas du body pour éviter que le contenu soit caché */
  body {
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
  }

  /* Cacher la navigation desktop */
  .nav .menu {
    display: none !important;
  }
}

/* Responsive - Ajustements pour très petits écrans */
@media (max-width: 380px) {
  .mobile-nav-icon {
    width: 44px;
    height: 44px;
  }

  .mobile-nav-icon svg {
    width: 22px;
    height: 22px;
  }

  .mobile-nav-label {
    font-size: 9px;
  }

  .mobile-bottom-nav-inner {
    gap: 4px;
  }
}

/* Animation d'entrée */
@keyframes slideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.mobile-bottom-nav {
  animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Support pour notch/safe-area sur iPhone */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .mobile-bottom-nav {
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }
}
