/* --- Variables --- */
:root {
    /* Couleurs */
    --primary: #4263eb;
    --primary-light: #5c7cfa;
    --primary-dark: #3b5bdb;
    --secondary: #edf2ff;
    --success: #40c057;
    --warning: #fd7e14;
    --danger: #e03131;
    --light: #f8f9fa;
    --dark: #343a40;
    --white: #ffffff;
    
    /* Nuances de gris */
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
    
    /* Typographie */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    
    /* Espacements */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    
    /* Bordures */
    --border-radius-sm: 0.25rem;
    --border-radius: 0.375rem;
    --border-radius-lg: 0.5rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 6px rgba(0, 0, 0, 0.1);
    
    /* Layout */
    --sidebar-width: 240px;
    --header-height: 60px;
}

/* --- Reset & Base --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.5;
    color: var(--gray-800);
    background-color: var(--gray-100);
    min-height: 100vh;
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    cursor: pointer;
    background: none;
    border: none;
    font-family: inherit;
    font-size: inherit;
}

/* --- Layout --- */
.app-container {
    display: flex;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

/* --- Sidebar --- */
.sidebar {
    position: fixed;
    width: var(--sidebar-width);
    height: 100vh;
    background-color: var(--white);
    border-right: 1px solid var(--gray-200);
    overflow-y: auto;
    z-index: 100;
}

.sidebar-header {
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--gray-200);
}

.sidebar .logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary);
}

.sidebar-section {
    padding: var(--space-md) 0;
}

.sidebar-heading {
    padding: 0 var(--space-lg);
    margin-bottom: var(--space-sm);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nav-items .nav-item a {
    display: flex;
    align-items: center;
    padding: var(--space-sm) var(--space-lg);
    color: var(--gray-700);
    transition: background-color 0.2s;
}

.nav-items .nav-item a svg {
    margin-right: var(--space-sm);
    color: var(--gray-600);
}

.nav-items .nav-item a:hover {
    background-color: var(--gray-100);
}

.nav-items .nav-item.active a {
    color: var(--primary);
    background-color: var(--secondary);
}

.nav-items .nav-item.active a svg {
    color: var(--primary);
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 var(--space-xs);
    border-radius: 10px;
    background-color: var(--gray-300);
    color: var(--gray-700);
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: auto;
}

.badge.warning {
    background-color: var(--warning);
    color: var(--white);
}

/* --- Header --- */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
    padding: 0 var(--space-lg);
    background-color: var(--white);
    border-bottom: 1px solid var(--gray-200);
}

.search-box {
    display: flex;
    align-items: center;
    width: 300px;
    padding: var(--space-sm) var(--space-md);
    background-color: var(--gray-100);
    border-radius: var(--border-radius);
}

.search-box svg {
    margin-right: var(--space-sm);
    color: var(--gray-500);
}

.search-box input {
    flex: 1;
    border: none;
    background: none;
    font-size: 0.875rem;
    color: var(--gray-700);
}

.search-box input:focus {
    outline: none;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: var(--gray-700);
    transition: background-color 0.2s;
    position: relative;
}

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

.badge.notification {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 16px;
    height: 16px;
    background-color: var(--danger);
    color: var(--white);
    font-size: 0.625rem;
}

.profile-button {
    display: flex;
    align-items: center;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--border-radius);
    transition: background-color 0.2s;
}

.profile-button:hover {
    background-color: var(--gray-100);
}

.avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--primary);
    color: var(--white);
    font-weight: 600;
    margin-right: var(--space-sm);
}

.user-name {
    font-size: 0.875rem;
    font-weight: 500;
    margin-right: var(--space-sm);
}

.dropdown-menu {
    position: absolute;
    top: calc(var(--header-height) - 10px);
    right: var(--space-lg);
    width: 240px;
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s;
    z-index: 1000;
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.menu-header {
    padding: var(--space-md);
    border-bottom: 1px solid var(--gray-200);
}

.user-role {
    font-size: 0.75rem;
    color: var(--gray-600);
}

.dropdown-menu ul {
    padding: var(--space-xs) 0;
}

.dropdown-menu li a {
    display: flex;
    align-items: center;
    padding: var(--space-sm) var(--space-md);
    color: var(--gray-700);
    transition: background-color 0.2s;
}

.dropdown-menu li a:hover {
    background-color: var(--gray-100);
}

.dropdown-menu li a svg {
    margin-right: var(--space-sm);
    color: var(--gray-600);
}

.dropdown-menu li.divider {
    height: 1px;
    background-color: var(--gray-200);
    margin: var(--space-xs) 0;
}

.text-danger {
    color: var(--danger);
}

.text-danger svg {
    color: var(--danger) !important;
}

/* --- Dashboard Content --- */
.dashboard-content {
    padding: var(--space-lg);
}

.welcome-section {
    margin-bottom: var(--space-xl);
}

.welcome-section h2 {
    font-size: 1rem;
    font-weight: 500;
    color: var(--gray-600);
    margin-bottom: var(--space-xs);
}

.welcome-section h1 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: var(--space-sm);
}

.welcome-section p {
    max-width: 800px;
    margin-bottom: var(--space-lg);
    color: var(--gray-700);
}

.action-buttons {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

.btn {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: all 0.2s;
}

.btn.primary {
    background-color: var(--primary);
    color: var(--white);
}

.btn.primary:hover {
    background-color: var(--primary-dark);
}

.btn.secondary {
    background-color: var(--secondary);
    color: var(--primary);
}

.btn.secondary:hover {
    background-color: var(--gray-200);
}

.btn i {
    margin-right: var(--space-sm);
}

/* --- Quick Actions --- */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.action-card {
    position: relative;
    background-color: var(--white);
    border-radius: var(--border-radius);
    padding: var(--space-lg);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
}

.action-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.action-card i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--secondary);
    color: var(--primary);
    font-size: 1.25rem;
    margin-bottom: var(--space-md);
}

.action-card h3 {
    font-size: 1rem;
    font-weight: 500;
}

.action-card a {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* --- Stats Overview --- */
.stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.stat-card {
    display: flex;
    align-items: center;
    background-color: var(--white);
    border-radius: var(--border-radius);
    padding: var(--space-lg);
    box-shadow: var(--shadow-sm);
}

.stat-card i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--secondary);
    color: var(--primary);
    margin-right: var(--space-md);
}

.stat-info {
    flex: 1;
}

.stat-info h4 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.stat-info p {
    font-size: 0.875rem;
    color: var(--gray-600);
}

.stat-trend {
    font-size: 0.75rem;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.stat-trend.positive {
    color: var(--success);
}

.stat-trend.negative {
    color: var(--danger);
}

.stat-trend i {
    width: auto;
    height: auto;
    background: none;
    margin-right: var(--space-xs);
}

/* --- Recent Activity --- */
.recent-activity {
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--gray-200);
}

.section-header h3 {
    font-size: 1rem;
    font-weight: 600;
}

.tabs {
    display: flex;
    gap: var(--space-xs);
}

.tab {
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--border-radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--gray-700);
    transition: background-color 0.2s;
}

.tab:hover {
    background-color: var(--gray-100);
}

.tab.active {
    background-color: var(--secondary);
    color: var(--primary);
}

.activity-list {
    padding: var(--space-lg);
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl) 0;
    color: var(--gray-500);
}

.empty-state i {
    font-size: 2rem;
    margin-bottom: var(--space-md);
}

.empty-state p {
    font-size: 0.875rem;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .sidebar {
        left: -var(--sidebar-width);
        transition: left 0.3s;
    }
    
    .sidebar.show {
        left: 0;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .header {
        padding: 0 var(--space-md);
    }
    
    .search-box {
        width: 200px;
    }
    
    .welcome-section h1 {
        font-size: 1.5rem;
    }
    
    .dropdown-menu {
        right: var(--space-md);
    }
}

@media (max-width: 576px) {
    .stats-overview, .quick-actions {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: var(--space-sm);
    }
    
    .search-box {
        width: 150px;
    }
} 