/* ======================================== */
/*     STYLES PERSONNALISÉS POUR LA SIDEBAR*/
/*      ======================================== */
/* Sidebar moderne - Fond sombre */
.sidebar-modern {
  background: linear-gradient(180deg, #092635 0%, #1a4d5e 100%);
  width: 300px !important;
}

/* En-tête élégante */
.sidebar-header {
  background: rgba(9, 38, 53, 0.95);
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
  padding: 1.5rem 1.25rem;
}

.sidebar-title {
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* Corps de la sidebar */
.sidebar-body {
  display: flex;
  flex-direction: column;
  background: transparent;
}

.sidebar-nav {
  overflow-y: auto;
}

/* Liens de navigation */
.sidebar-link {
  background: transparent !important;
  border: none !important;
  color: rgba(255, 255, 255, 0.85) !important;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
  font-size: 0.95rem;
  font-weight: 500;
  text-transform: capitalize;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.sidebar-link i:first-child {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.7);
  transition: all 0.3s ease;
}

.sidebar-link i:last-child {
  font-size: 0.9rem;
  opacity: 0;
  transition: all 0.3s ease;
}

/* Effet hover */
.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #ffffff !important;
  padding-left: 1.5rem;
}

.sidebar-link:hover i:first-child {
  color: #ffffff;
  transform: scale(1.1);
}

.sidebar-link:hover i:last-child {
  opacity: 1;
  transform: translateX(5px);
}

/* Lien actif */
.sidebar-link.active {
  background: rgba(255, 255, 255, 0.15) !important;
  color: #ffffff !important;
  border-left: 3px solid #28a745 !important;
  padding-left: calc(1.25rem - 3px);
}

/* Séparateur */
.sidebar-divider {
  margin: 0.5rem 1.25rem;
  border-color: rgba(255, 255, 255, 0.1);
}

/* Footer de la sidebar */
.sidebar-footer {
  margin-top: auto;
  padding-bottom: 1rem;
  background: rgba(0, 0, 0, 0.2);
  border-top: 2px solid rgba(255, 255, 255, 0.1);
}

/* Lien mis en évidence (Panier) */
.sidebar-link-highlight {
  background: rgba(40, 167, 69, 0.15) !important;
}

.sidebar-link-highlight:hover {
  background: rgba(40, 167, 69, 0.25) !important;
}

.sidebar-link-highlight .badge {
  font-size: 0.75rem;
  padding: 0.35em 0.65em;
}

/* Lien primaire (Connexion) */
.sidebar-link-primary {
  background: rgba(13, 110, 253, 0.15) !important;
  font-weight: 600;
}

.sidebar-link-primary:hover {
  background: rgba(13, 110, 253, 0.25) !important;
}

/* Animation d'ouverture */
.offcanvas.showing,
.offcanvas.show {
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
}

/* Scrollbar personnalisée (WebKit) */
.sidebar-nav::-webkit-scrollbar {
  width: 6px;
}

.sidebar-nav::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Responsive */
@media (max-width: 576px) {
  .sidebar-modern {
    width: 280px !important;
  }
  
  .sidebar-link {
    padding: 0.875rem 1rem;
    font-size: 0.9rem;
  }
  
  .sidebar-link i:first-child {
    font-size: 1.1rem;
  }
}

/* Animation du badge panier */
@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.sidebar-link-highlight .badge {
  animation: pulse 2s infinite;
}