/* nav_menu.css - Styles pour le menu de navigation */

:root {
  --nav-primary: #8BC34A;
  --nav-primary-dark: #7CAC3A;
  --nav-admin: linear-gradient(135deg, #ff6b6b, #ff9f40);
  --nav-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
  --nav-shadow-hover: 0 4px 25px rgba(139, 195, 74, 0.25);
}

.modern-navbar {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  box-shadow: var(--nav-shadow);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 1030;
  transition: all 0.3s ease;
}

.modern-navbar:hover {
  box-shadow: var(--nav-shadow-hover);
}

.navbar-brand-custom {
  font-weight: 800;
  font-size: 1.3rem;
  color: #2c3e50;
  letter-spacing: -0.5px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 12px;
}

.navbar-brand-custom:hover {
  color: var(--nav-primary);
  transform: translateY(-1px);
}

.logo-img {
  height: 45px;
  width: auto;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.navbar-brand-custom:hover .logo-img {
  transform: scale(1.05);
}

.nav-link-custom {
  position: relative;
  color: #2c3e50;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 10px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link-custom:hover {
  background: rgba(139, 195, 74, 0.1);
  color: var(--nav-primary);
  transform: translateY(-2px);
}

.nav-link-custom::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 80%;
  height: 2px;
  background: var(--nav-primary);
  transition: transform 0.3s ease;
}

.nav-link-custom:hover::after {
  transform: translateX(-50%) scaleX(1);
}

/* === PANIER === */
.cart-btn {
  position: relative;
  background: transparent;
  border: none;
  padding: 10px 16px;
  border-radius: 12px;
  transition: all 0.3s ease;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: #2c3e50;
}

.cart-btn:hover {
  background: rgba(139, 195, 74, 0.1);
  color: var(--nav-primary);
  transform: translateY(-2px);
}

.cart-btn i {
  font-size: 1.5rem;
}

.cart-badge {
  position: absolute;
  top: 4px;
  right: 8px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.cart-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 400px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1050;
  max-height: 500px;
  display: flex;
  flex-direction: column;
}

.cart-btn:hover .cart-dropdown,
.cart-dropdown:hover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.cart-header {
  padding: 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-header h6 {
  margin: 0;
  font-weight: 700;
  font-size: 1.1rem;
  color: #2c3e50;
}

.cart-items {
  overflow-y: auto;
  max-height: 300px;
  padding: 16px;
}

.cart-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: rgba(139, 195, 74, 0.05);
  border-radius: 12px;
  margin-bottom: 12px;
  transition: all 0.3s ease;
}

.cart-item:hover {
  background: rgba(139, 195, 74, 0.1);
  transform: translateX(4px);
}

.cart-item-img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.cart-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cart-item-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: #2c3e50;
  margin: 0;
  line-height: 1.3;
}

.cart-item-details {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: #6b7280;
}

.cart-item-price {
  font-weight: 700;
  color: var(--nav-primary);
  font-size: 0.95rem;
}

.cart-item-remove {
  background: transparent;
  border: none;
  color: #ef4444;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s ease;
  font-size: 1.2rem;
  line-height: 1;
}

.cart-item-remove:hover {
  background: rgba(239, 68, 68, 0.1);
  transform: scale(1.1);
}

.cart-empty {
  padding: 40px 20px;
  text-align: center;
  color: #9ca3af;
}

.cart-empty i {
  font-size: 3rem;
  margin-bottom: 12px;
  opacity: 0.5;
}

.cart-footer {
  padding: 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(139, 195, 74, 0.05);
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  font-size: 1.1rem;
  font-weight: 700;
  color: #2c3e50;
}

.cart-total-amount {
  color: var(--nav-primary);
  font-size: 1.3rem;
}

.btn-view-cart {
  width: 100%;
  background: linear-gradient(135deg, var(--nav-primary), var(--nav-primary-dark));
  color: white;
  border: none;
  padding: 12px;
  border-radius: 10px;
  font-weight: 700;
  transition: all 0.3s ease;
  text-decoration: none;
  display: block;
  text-align: center;
}

.btn-view-cart:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139, 195, 74, 0.4);
  color: white;
}

.btn-login {
  background: transparent;
  color: #2c3e50;
  border: 2px solid #2c3e50;
  font-weight: 600;
  padding: 10px 24px;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.btn-login:hover {
  background: #2c3e50;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(44, 62, 80, 0.3);
}

.btn-register {
  background: linear-gradient(135deg, var(--nav-primary), var(--nav-primary-dark));
  color: white;
  border: none;
  font-weight: 600;
  padding: 10px 24px;
  border-radius: 12px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(139, 195, 74, 0.3);
}

.btn-register:hover {
  background: linear-gradient(135deg, var(--nav-primary-dark), var(--nav-primary));
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139, 195, 74, 0.4);
  color: white;
}

.btn-contact {
  background: transparent;
  color: #5206f6ff;
  border: 2px solid #5206f6ff;
  font-weight: 600;
  padding: 10px 24px;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.btn-contact:hover {
  background: #5206f6ff;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(82, 6, 246, 0.3);
}

.user-dropdown-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: rgba(139, 195, 74, 0.1);
  border: 2px solid transparent;
  border-radius: 25px;
  transition: all 0.3s ease;
  cursor: pointer;
  font-weight: 600;
}

.user-dropdown-btn:hover {
  background: rgba(139, 195, 74, 0.15);
  border-color: var(--nav-primary);
  transform: translateY(-2px);
}

.user-dropdown-btn.admin-user {
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.15), rgba(255, 159, 64, 0.15));
  border: 2px solid rgba(255, 107, 107, 0.3);
}

.user-dropdown-btn.admin-user:hover {
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.25), rgba(255, 159, 64, 0.25));
  border-color: #ff6b6b;
}

.user-avatar {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--nav-primary), var(--nav-primary-dark));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: white;
  font-size: 1rem;
  box-shadow: 0 2px 8px rgba(139, 195, 74, 0.3);
}

.user-avatar.admin {
  background: var(--nav-admin);
  box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

.admin-badge {
  background: var(--nav-admin);
  color: white;
  font-size: 0.65rem;
  padding: 3px 8px;
  border-radius: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 6px rgba(255, 107, 107, 0.3);
}

.dropdown-menu-modern {
  border: none;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  padding: 12px;
  margin-top: 12px;
  min-width: 280px;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dropdown-header-custom {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #999;
  padding: 12px 16px 8px;
  letter-spacing: 0.5px;
}

.dropdown-item-modern {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 10px;
  transition: all 0.2s ease;
  font-weight: 500;
  color: #2c3e50;
}

.dropdown-item-modern:hover {
  background: rgba(139, 195, 74, 0.1);
  color: var(--nav-primary);
  transform: translateX(4px);
}

.dropdown-item-modern i {
  font-size: 1.2rem;
  width: 24px;
  text-align: center;
}

.admin-section {
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.08), rgba(255, 159, 64, 0.08));
  border-radius: 12px;
  padding: 8px;
  margin: 8px 0;
}

.admin-section .dropdown-item-modern {
  color: #dc2626;
}

.admin-section .dropdown-item-modern:hover {
  background: rgba(255, 107, 107, 0.15);
  color: #b91c1c;
}

.dropdown-divider-modern {
  margin: 8px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.logout-item {
  color: #dc2626 !important;
}

.logout-item:hover {
  background: rgba(220, 38, 38, 0.1) !important;
  color: #b91c1c !important;
}

/* Animations pour les toasts */
@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideOutRight {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(100px);
  }
}

/* === RESPONSIVE === */
@media (max-width: 991.98px) {
  .navbar-brand-custom {
    font-size: 1.1rem;
  }
  
  .logo-img {
    height: 38px;
  }
  
  .nav-link-custom {
    padding: 10px 16px;
    width: 100%;
    justify-content: flex-start;
  }
  
  .btn-login, .btn-contact, .btn-register {
    width: 100%;
    justify-content: center;
  }
  
  .cart-dropdown {
    position: fixed;
    top: 70px;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    width: calc(100% - 32px);
    max-width: 400px;
  }
  
  .cart-btn:hover .cart-dropdown,
  .cart-dropdown:hover {
    transform: translateX(-50%) translateY(0);
  }
}

@media (max-width: 575.98px) {
  .cart-dropdown {
    width: calc(100% - 16px);
  }
  
  .cart-items {
    max-height: 250px;
  }
}