:root {
    /* Thème Clair par défaut */
    --bg-color: #f3f4f6;
    --sidebar-bg: #1f2937;
    --sidebar-text: #f3f4f6;
    --sidebar-hover: #374151;
    --sidebar-active: #2563eb;
    
    --card-bg: #ffffff;
    --text-color: #111827;
    --text-muted: #6b7280;
    
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    
    --border-color: #e5e7eb;
    --input-bg: #ffffff;
    
    --header-height: 60px;
    --sidebar-width: 250px;
}

[data-theme="dark"] {
    /* Thème Sombre */
    --bg-color: #111827;
    --sidebar-bg: #1f2937;
    --sidebar-text: #f3f4f6;
    --sidebar-hover: #374151;
    --sidebar-active: #3b82f6;
    
    --card-bg: #1f2937;
    --text-color: #f9fafb;
    --text-muted: #9ca3af;
    
    --border-color: #374151;
    --input-bg: #374151;
}

body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    min-height: 100vh;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

/* Layout - Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
    transition: transform 0.3s ease;
}

.sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    font-weight: bold;
    font-size: 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-menu {
    list-style: none;
    padding: 1rem 0;
    margin: 0;
    flex: 1;
    overflow-y: auto;
}

.sidebar-menu li {
    margin-bottom: 0.25rem;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: var(--sidebar-text);
    text-decoration: none;
    transition: background-color 0.2s;
}

.sidebar-menu a:hover {
    background-color: var(--sidebar-hover);
}

.sidebar-menu a.active {
    background-color: var(--sidebar-active);
    font-weight: 600;
}

.sidebar-menu a i {
    margin-right: 0.75rem;
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.875rem;
}

/* Layout - Main Content */
.main-wrapper {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
}

.topbar {
    height: var(--header-height);
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 90;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-icon {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.btn-icon:hover {
    background-color: var(--border-color);
}

.content-area {
    padding: 2rem;
    flex: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .main-wrapper {
        margin-left: 0;
    }
}
