/* Sidebar overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 3500;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100vh;
    background: white;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 3600;
    transition: left 0.3s ease;
    overflow-y: auto;
}

.sidebar.active {
    left: 0;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid #e0e0e0;
    background: #1976D2;
    color: white;
}

.sidebar-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.2;
}

.close-btn {
    background: transparent;
    border: none;
    color: white;
    font-size: 32px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: transform 0.2s;
}

.close-btn:hover {
    transform: scale(1.1);
}

.sidebar-content {
    padding: 20px;
}

.sidebar-content nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-content nav li {
    margin-bottom: 10px;
}

.sidebar-content nav a {
    display: block;
    padding: 12px 15px;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.2s;
}

.sidebar-content nav a:hover {
    background: #e3f2fd;
    color: #1976D2;
}

@media (prefers-color-scheme: dark) {
    .sidebar {
        background: #2d2d2d;
    }
    
    .sidebar-header {
        background: #1565C0;
        border-bottom-color: #404040;
    }
    
    .sidebar-content nav a {
        color: #e0e0e0;
    }
    
    .sidebar-content nav a:hover {
        background: #1e3a5f;
        color: #64B5F6;
    }
}

/* (Overrides forcés light supprimés pour suivre la préférence du navigateur) */
