/* ===== NOUVELLE SIDEBAR MODERNE ===== */

.modern-sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: 80px;
  height: 100vh;
  background: linear-gradient(180deg, rgba(10, 10, 10, 0.98) 0%, rgba(5, 5, 5, 0.98) 100%);
  backdrop-filter: blur(20px);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 24px 0;
  transition: width 0.3s ease;
}

/* Dépliement au survol */
.modern-sidebar:hover {
  width: 280px;
}

/* Scrollbar personnalisée */
.modern-sidebar::-webkit-scrollbar {
  width: 6px;
}

.modern-sidebar::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

.modern-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.modern-sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Header Sidebar */
.sidebar-header {
  padding: 0 24px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 24px;
}

.sidebar-logo {
  margin-bottom: 8px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.logo-initials {
  font-size: 28px;
  font-weight: 700;
  color: #3b82f6;
  letter-spacing: -0.5px;
  position: absolute;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.modern-sidebar:hover .logo-initials {
  opacity: 0;
  pointer-events: none;
}

.logo-text {
  font-size: 24px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.5px;
  transition: opacity 0.3s ease;
  opacity: 0;
}

.modern-sidebar:hover .logo-text {
  opacity: 1;
}

.logo-accent {
  color: #3b82f6;
}

.sidebar-subtitle {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 500;
  margin: 0;
  transition: opacity 0.3s ease;
  text-align: center;
}

.modern-sidebar:not(:hover) .sidebar-subtitle {
  opacity: 0;
  pointer-events: none;
}

/* Navigation */
.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.nav-section {
  padding: 0 12px;
}

.nav-section-title {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 0 12px;
  margin: 0 0 12px 0;
  transition: opacity 0.3s ease;
  white-space: nowrap;
}

.modern-sidebar:not(:hover) .nav-section-title {
  opacity: 0;
  pointer-events: none;
}

.nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-item {
  margin-bottom: 4px;
}

.modern-sidebar .nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  border-radius: 12px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.modern-sidebar .nav-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: 100%;
  background: #3b82f6;
  transform: scaleY(0);
  transition: transform 0.2s ease;
}

.modern-sidebar .nav-link:hover {
  background: rgba(59, 130, 246, 0.1);
  color: rgba(255, 255, 255, 0.9);
}

.modern-sidebar .nav-link.active {
  background: rgba(59, 130, 246, 0.15);
  color: #ffffff;
}

.modern-sidebar .nav-link.active::before {
  transform: scaleY(1);
}

.nav-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.nav-icon svg {
  width: 100%;
  height: 100%;
  stroke-width: 2;
}

.nav-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
}

.nav-label {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: opacity 0.3s ease;
}

.modern-sidebar:not(:hover) .nav-label {
  opacity: 0;
  pointer-events: none;
}

.nav-badge {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 8px;
  border-radius: 12px;
  letter-spacing: 0.5px;
  white-space: nowrap;
  transition: opacity 0.3s ease;
}

.modern-sidebar:not(:hover) .nav-badge {
  opacity: 0;
  pointer-events: none;
}

.modern-sidebar .nav-link:hover .nav-badge,
.modern-sidebar .nav-link.active .nav-badge {
  background: rgba(59, 130, 246, 0.3);
  color: #ffffff;
}

/* Section Bottom */
.nav-section-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 16px;
  margin-top: 16px;
}

.modern-sidebar .nav-section-bottom .nav-link {
  gap: 12px;
}

.nav-section-bottom .nav-label {
  flex: 1;
}

/* Responsive */
@media (max-width: 768px) {
  .modern-sidebar {
    width: 240px;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  .modern-sidebar.open {
    transform: translateX(0);
  }
}

/* Ajuster le main content pour la nouvelle sidebar */
.dashboard-container {
  display: flex;
  min-height: 100vh;
}

.main-content {
  flex: 1;
  margin-left: 80px;
  padding: 40px;
  min-height: 100vh;
  transition: margin-left 0.3s ease;
}

.modern-sidebar:hover ~ .main-content {
  margin-left: 280px;
}

@media (max-width: 768px) {
  .main-content {
    margin-left: 0;
  }
}
