/* === Sidebar Layout === */
.sidebar-fixed {
  width: 250px;
  background-color: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  color: var(--sidebar-text);
  transition: width 0.3s ease;
  overflow-y: auto;
  height: calc(100vh - 56px - 40px); /* header (56px) + footer (40px) */
  min-height: 0;
  padding: 1rem 0.5rem;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.05);
  z-index: 1020;
  flex-shrink: 0;
}

/* === Navigation Links === */
.sidebar-fixed .nav-link {
  display: flex;
  align-items: center;
  padding: 0.6rem 1rem;
  color: var(--sidebar-text);
  font-weight: 500;
  border-radius: 0.375rem;
  transition: all 0.2s ease;
  position: relative;
}

.sidebar-fixed .nav-link i {
  font-size: 1.1rem;
  margin-right: 0.75rem;
  color: var(--sidebar-icon);
  width: 1.5rem;
  text-align: center;
}

.sidebar-fixed .nav-link span {
  display: inline;
}

/* === Hover & Active === */
.sidebar-fixed .nav-link:hover {
  background-color: var(--sidebar-hover-bg);
  color: var(--sidebar-hover-color);
}

.sidebar-fixed .nav-link.active {
  background-color: var(--sidebar-active-bg);
  color: var(--sidebar-active-color);
  font-weight: 600;
}

/* Barre latérale pour lien actif */
.sidebar-fixed .nav-link.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 4px;
  background-color: var(--sidebar-active-bar);
  border-radius: 0 4px 4px 0;
}

/* === Flèche rotation dropdown === */
.nav-link[aria-expanded="true"] .bi-chevron-down {
  transform: rotate(180deg);
  transition: transform 0.2s ease;
}
.nav-link[aria-expanded="false"] .bi-chevron-down {
  transition: transform 0.2s ease;
}

/* === Sous-menu === */
.sidebar-fixed .collapse .nav-link {
  padding-left: 2rem;
  font-size: 0.9rem;
  color: var(--sidebar-sub-link);
}
.sidebar-fixed .collapse .nav-link:hover {
  color: var(--sidebar-hover-color);
}

/* === Scrollbar === */
.sidebar-fixed::-webkit-scrollbar {
  width: 6px;
}
.sidebar-fixed::-webkit-scrollbar-thumb {
  background-color: var(--sidebar-scrollbar-thumb);
  border-radius: 3px;
}
