/**
 * Composant Sidebar — Barre latérale de navigation.
 *
 * Styles pour le menu gauche, les items, sous-menus accordéon,
 * l'en-tête et le pied de page de la sidebar.
 *
 * @component sidebar
 */

/* ─── Conteneur principal sidebar ─── */
.sidebar {
  width: 280px;
  height: 100vh;
  background: var(--sidebar-bg);
  color: var(--text-white);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  box-shadow: var(--shadow-lg);
  z-index: 10;
}

.sidebar-header {
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 20px;
  color: var(--text-white);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.sidebar-logo-text h1 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.5px;
}

.sidebar-logo-text p {
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  font-weight: 500;
}

.sidebar-menu {
  flex: 1;
  overflow-y: auto;
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* ─── Groupes de menu ─── */
.menu-group-title {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  font-weight: 600;
  padding-left: 12px;
  margin: 16px 0 8px 0;
  letter-spacing: 1px;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.menu-item:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text-white);
}

.menu-item.active {
  background: var(--primary);
  color: var(--text-white);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.menu-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ─── Sous-menus accordéon ─── */
.menu-submenu {
  overflow: hidden;
  transition: max-height var(--transition-normal);
}

.menu-submenu .menu-item {
  padding-left: 40px;
  font-size: 13px;
}

/* ─── Pied de sidebar ─── */
.sidebar-footer {
  padding: 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  background: hsl(222, 20%, 30%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--text-white);
}

.user-info h4 {
  font-size: 13px;
  font-weight: 600;
}

.user-info p {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
}
