/* ============================================
   DESIGN SYSTEM - Planning RH by Dentagram
   Style moderne, épuré avec couleurs stratégiques
   ============================================ */

/* ===== VARIABLES CSS ===== */
:root {
    /* Couleurs principales */
    --primary: #6366f1;          /* Indigo - accent principal */
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --primary-bg: rgba(99, 102, 241, 0.08);

    /* Couleurs sémantiques */
    --success: #10b981;          /* Vert émeraude */
    --success-light: #d1fae5;
    --warning: #f59e0b;          /* Ambre */
    --warning-light: #fef3c7;
    --danger: #ef4444;           /* Rouge */
    --danger-light: #fee2e2;
    --info: #0ea5e9;             /* Bleu ciel */
    --info-light: #e0f2fe;

    /* Neutres */
    --white: #ffffff;
    --gray-50: #fafbfc;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Typographie */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;

    /* Espacements */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;

    /* Effets */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.03);

    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;
}

/* ===== RESET & BASE ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--gray-800);
    background-color: var(--gray-50);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== TYPOGRAPHIE ===== */
h1, h2, h3, h4, h5, h6 {
    color: var(--gray-900);
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: var(--space-3);
}

h1 { font-size: var(--font-size-3xl); font-weight: 700; }
h2 { font-size: var(--font-size-2xl); }
h3 { font-size: var(--font-size-xl); }
h4 { font-size: var(--font-size-lg); }
h5 { font-size: var(--font-size-base); }
h6 { font-size: var(--font-size-sm); }

p {
    color: var(--gray-600);
    margin-bottom: var(--space-4);
}

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

a:hover {
    color: var(--primary-dark);
}

small, .text-small {
    font-size: var(--font-size-sm);
    color: var(--gray-500);
}

.text-muted {
    color: var(--gray-500) !important;
}

/* ===== LAYOUT ===== */
.wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
    background-color: var(--gray-50);
}

#content {
    width: calc(100% - 280px);
    margin-left: 280px;
    min-height: 100vh;
    transition: all var(--transition-slow);
    padding: var(--space-6);
    background-color: var(--gray-50);
}

#content.active {
    width: 100%;
    margin-left: 0;
}

/* ===== SIDEBAR MODERNE ===== */
#sidebar {
    width: 280px;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 999;
    transition: all var(--transition-slow);
    box-shadow: 4px 0 30px rgba(0, 0, 0, 0.12);
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

#sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: radial-gradient(ellipse at top, rgba(99, 102, 241, 0.12) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

#sidebar > * {
    position: relative;
    z-index: 1;
}

#sidebar.active {
    margin-left: -280px;
}

/* Sidebar Header */
#sidebar .sidebar-header {
    padding: 1.75rem 1.5rem 1.25rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(99, 102, 241, 0.05) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

#sidebar .sidebar-header h3 {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

#sidebar .sidebar-header .planning-title {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 0%, #e0e7ff 50%, #c7d2fe 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 8s ease-in-out infinite;
    line-height: 1.3;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

#sidebar .sidebar-header .cabinet-name {
    font-size: 0.85rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.65);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Badge AI */
#sidebar .ai-badge-sidebar {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.65rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: fit-content;
    margin-top: var(--space-2);
}

#sidebar .ai-sparkle {
    display: inline-block;
    animation: sparkleGlow 3s ease-in-out infinite;
}

@keyframes sparkleGlow {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.15); }
}

/* User Info */
#sidebar .user-info {
    padding: var(--space-5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(99, 102, 241, 0.03) 100%);
}

#sidebar .user-info .fw-bold {
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 600;
}

#sidebar .user-info small,
#sidebar .text-muted {
    color: rgba(255, 255, 255, 0.6) !important;
}

#sidebar .user-info .bi-person-circle {
    color: #ffffff !important;
    filter: drop-shadow(0 0 8px rgba(99, 102, 241, 0.4));
}

/* Menu Items */
#sidebar ul.components {
    padding: var(--space-2) 0;
}

#sidebar ul li a {
    padding: 0.875rem 1.5rem;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    transition: all var(--transition-base);
    border-left: 3px solid transparent;
    margin: 2px 0;
}

#sidebar ul li a:hover {
    color: #ffffff;
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.15) 0%, transparent 100%);
    border-left-color: var(--primary);
}

#sidebar ul li a:hover i {
    color: var(--primary-light);
    transform: scale(1.1);
}

#sidebar ul li.active > a {
    color: #ffffff;
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.2) 0%, rgba(99, 102, 241, 0.05) 100%);
    border-left-color: var(--primary);
    font-weight: 500;
}

#sidebar ul li.active > a i {
    color: var(--primary-light);
}

#sidebar ul li a i {
    margin-right: 12px;
    width: 22px;
    text-align: center;
    font-size: 1.1rem;
    transition: all var(--transition-base);
}

/* Sidebar Badges */
#sidebar ul li a .badge {
    margin-left: auto;
    padding: 0.3em 0.65em;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-sm);
}

/* ===== CARDS MODERNES ===== */
.card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--space-6);
    overflow: hidden;
    transition: all var(--transition-base);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--white) 100%);
    border-bottom: 1px solid var(--gray-200);
    padding: var(--space-4) var(--space-5);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h5,
.card-header .card-title {
    margin: 0;
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--gray-800);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.card-header h5 i,
.card-header .card-title i {
    font-size: 1.1rem;
}

/* Card header avec accent coloré à gauche */
.card-header-accent {
    border-left: 4px solid var(--primary);
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.06) 0%, var(--white) 100%);
}

.card-header-accent.accent-success {
    border-left-color: var(--success);
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.06) 0%, var(--white) 100%);
}

.card-header-accent.accent-warning {
    border-left-color: var(--warning);
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.06) 0%, var(--white) 100%);
}

.card-header-accent.accent-info {
    border-left-color: var(--info);
    background: linear-gradient(90deg, rgba(14, 165, 233, 0.06) 0%, var(--white) 100%);
}

.card-header-accent.accent-danger {
    border-left-color: var(--danger);
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.06) 0%, var(--white) 100%);
}

.card-body {
    padding: var(--space-6);
}

.card-footer {
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
    padding: var(--space-4) var(--space-6);
}

/* Card avec header coloré (pour sections importantes) */
.card-primary .card-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    border-bottom: none;
}

.card-primary .card-header h5,
.card-primary .card-header .card-title {
    color: var(--white);
}

.card-success .card-header {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: var(--white);
    border-bottom: none;
}

.card-success .card-header h5 { color: var(--white); }

.card-warning .card-header {
    background: linear-gradient(135deg, var(--warning) 0%, #d97706 100%);
    color: var(--white);
    border-bottom: none;
}

.card-warning .card-header h5 { color: var(--white); }

.card-info .card-header {
    background: linear-gradient(135deg, var(--info) 0%, #0284c7 100%);
    color: var(--white);
    border-bottom: none;
}

.card-info .card-header h5 { color: var(--white); }

/* ===== STAT CARDS ===== */
.stat-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    display: flex;
    align-items: center;
    gap: var(--space-4);
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    min-height: 100px;
    height: 100%;
}

/* Variantes de stat-cards avec fond teinté et bordure colorée */
.stat-card.stat-primary {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(99, 102, 241, 0.02) 100%);
    border-left: 4px solid var(--primary);
}

.stat-card.stat-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(16, 185, 129, 0.02) 100%);
    border-left: 4px solid var(--success);
}

.stat-card.stat-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(245, 158, 11, 0.02) 100%);
    border-left: 4px solid var(--warning);
}

.stat-card.stat-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08) 0%, rgba(239, 68, 68, 0.02) 100%);
    border-left: 4px solid var(--danger);
}

.stat-card.stat-info {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.08) 0%, rgba(14, 165, 233, 0.02) 100%);
    border-left: 4px solid var(--info);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.stat-card .stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.stat-card .stat-icon.primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
}

.stat-card .stat-icon.success {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: var(--white);
}

.stat-card .stat-icon.warning {
    background: linear-gradient(135deg, var(--warning) 0%, #d97706 100%);
    color: var(--white);
}

.stat-card .stat-icon.danger {
    background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
    color: var(--white);
}

.stat-card .stat-icon.info {
    background: linear-gradient(135deg, var(--info) 0%, #0284c7 100%);
    color: var(--white);
}

.stat-card .stat-content {
    flex: 1;
}

.stat-card .stat-label {
    font-size: var(--font-size-sm);
    color: var(--gray-600);
    margin-bottom: var(--space-1);
    font-weight: 500;
}

.stat-card .stat-value {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1;
}

/* ===== SECTION HEADERS ===== */
.section-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-5);
    padding-bottom: var(--space-3);
    border-bottom: 2px solid var(--gray-200);
}

.section-header h2,
.section-header h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.section-header .section-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.section-header .section-icon.primary {
    background: var(--primary-bg);
    color: var(--primary);
}

/* ===== BOUTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: 0.625rem 1.25rem;
    font-size: var(--font-size-sm);
    font-weight: 500;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

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

.btn-primary:hover {
    background: var(--primary-dark) !important;
    border-color: var(--primary-dark) !important;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-success {
    background: var(--success) !important;
    border-color: var(--success) !important;
    color: var(--white) !important;
}

.btn-success:hover {
    background: #059669 !important;
    border-color: #059669 !important;
}

.btn-warning {
    background: var(--warning) !important;
    border-color: var(--warning) !important;
    color: var(--white) !important;
}

.btn-danger {
    background: var(--danger) !important;
    border-color: var(--danger) !important;
    color: var(--white) !important;
}

.btn-info {
    background: var(--info) !important;
    border-color: var(--info) !important;
    color: var(--white) !important;
}

.btn-outline-primary {
    background: transparent !important;
    border-color: var(--primary) !important;
    color: var(--primary) !important;
}

.btn-outline-primary:hover {
    background: var(--primary) !important;
    color: var(--white) !important;
}

.btn-outline-secondary {
    background: transparent !important;
    border-color: var(--gray-300) !important;
    color: var(--gray-700) !important;
}

.btn-outline-secondary:hover {
    background: var(--gray-100) !important;
    border-color: var(--gray-400) !important;
}

.btn-light {
    background: var(--white) !important;
    border-color: var(--gray-200) !important;
    color: var(--gray-700) !important;
}

.btn-light:hover {
    background: var(--gray-50) !important;
    border-color: var(--gray-300) !important;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: var(--font-size-xs);
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: var(--font-size-base);
}

/* ===== FORMULAIRES ===== */
.form-label {
    display: block;
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: var(--space-2);
}

.form-control {
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: var(--font-size-base);
    color: var(--gray-800);
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.form-control::placeholder {
    color: var(--gray-400);
}

.form-select {
    padding-right: 2.5rem;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-size: 1.25em 1.25em;
    background-repeat: no-repeat;
}

.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

/* Input Groups */
.input-group {
    position: relative;
    display: flex;
}

.input-group .form-control {
    border-radius: var(--radius-sm);
}

.input-group .form-control:not(:first-child) {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.input-group .form-control:not(:last-child) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.input-group-text {
    display: flex;
    align-items: center;
    padding: 0.625rem 0.875rem;
    font-size: var(--font-size-base);
    color: var(--gray-600);
    background: var(--gray-100);
    border: 1px solid var(--gray-300);
}

/* ===== TABLES ===== */
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--font-size-sm);
}

.table th {
    background: var(--gray-50);
    color: var(--gray-600);
    font-weight: 600;
    text-transform: uppercase;
    font-size: var(--font-size-xs);
    letter-spacing: 0.05em;
    padding: var(--space-3) var(--space-4);
    border-bottom: 2px solid var(--gray-200);
    text-align: left;
}

.table td {
    padding: var(--space-4);
    border-bottom: 1px solid var(--gray-100);
    color: var(--gray-700);
    vertical-align: middle;
}

.table tbody tr:hover {
    background: var(--gray-50);
}

.table-striped tbody tr:nth-of-type(odd) {
    background: rgba(0, 0, 0, 0.02);
}

.table-container {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    border: 1px solid var(--gray-200);
}

/* ===== ALERTS ===== */
.alert {
    padding: var(--space-4) var(--space-5);
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    margin-bottom: var(--space-4);
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
}

.alert-success {
    background: var(--success-light);
    border-color: #a7f3d0;
    color: #065f46;
}

.alert-warning {
    background: var(--warning-light);
    border-color: #fde68a;
    color: #92400e;
}

.alert-danger {
    background: var(--danger-light);
    border-color: #fecaca;
    color: #991b1b;
}

.alert-info {
    background: var(--info-light);
    border-color: #bae6fd;
    color: #075985;
}

/* ===== BADGES ===== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25em 0.65em;
    font-size: 0.75em;
    font-weight: 600;
    border-radius: var(--radius-full);
}

.badge.bg-primary,
.badge-primary {
    background: var(--primary) !important;
    color: var(--white);
}

.badge.bg-success,
.badge-success {
    background: var(--success) !important;
    color: var(--white);
}

.badge.bg-warning,
.badge-warning {
    background: var(--warning) !important;
    color: var(--white);
}

.badge.bg-danger,
.badge-danger {
    background: var(--danger) !important;
    color: var(--white);
}

.badge.bg-info,
.badge-info {
    background: var(--info) !important;
    color: var(--white);
}

.badge-soft-primary {
    background: var(--primary-bg);
    color: var(--primary);
}

.badge-soft-success {
    background: var(--success-light);
    color: var(--success);
}

.badge-soft-warning {
    background: var(--warning-light);
    color: #b45309;
}

.badge-soft-danger {
    background: var(--danger-light);
    color: var(--danger);
}

/* ===== MODALS ===== */
.modal-content {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

.modal-header {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: var(--space-5) var(--space-6);
}

.modal-header.bg-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
    border-bottom: none;
}

.modal-header.bg-primary .modal-title {
    color: var(--white);
}

.modal-header.bg-primary .btn-close {
    filter: brightness(0) invert(1);
}

.modal-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--gray-900);
}

.modal-body {
    padding: var(--space-6);
}

.modal-footer {
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
    padding: var(--space-4) var(--space-6);
}

/* ===== NAV TABS ===== */
.nav-tabs {
    border-bottom: 2px solid var(--gray-200);
    gap: var(--space-1);
}

.nav-tabs .nav-link {
    color: var(--gray-600) !important;
    background: transparent !important;
    border: none !important;
    border-bottom: 2px solid transparent !important;
    padding: var(--space-3) var(--space-4);
    font-weight: 500;
    margin-bottom: -2px;
    transition: all var(--transition-fast);
}

.nav-tabs .nav-link:hover {
    color: var(--gray-900) !important;
    border-bottom-color: var(--gray-300) !important;
}

.nav-tabs .nav-link.active {
    color: var(--primary) !important;
    border-bottom-color: var(--primary) !important;
    background: transparent !important;
}

/* ===== PAGINATION ===== */
.pagination {
    gap: var(--space-1);
}

.page-link {
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    color: var(--gray-700);
    background: var(--white);
    font-weight: 500;
}

.page-link:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
    color: var(--gray-900);
}

.page-item.active .page-link {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

/* ===== EMPTY STATES ===== */
.empty-state {
    text-align: center;
    padding: var(--space-12) var(--space-6);
    color: var(--gray-500);
}

.empty-state-icon {
    font-size: 4rem;
    color: var(--gray-300);
    margin-bottom: var(--space-4);
}

.empty-state h3 {
    color: var(--gray-700);
    margin-bottom: var(--space-2);
}

.empty-state p {
    color: var(--gray-500);
    max-width: 400px;
    margin: 0 auto;
}

/* ===== NOTIFICATIONS ===== */
.notifications-container {
    position: fixed;
    top: var(--space-4);
    right: var(--space-4);
    z-index: 1050;
    width: 360px;
    max-width: calc(100vw - 2rem);
}

.notifications-container .alert {
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-md);
}

/* ===== PAGE HEADER ===== */
.page-header {
    margin-bottom: var(--space-6);
}

.page-header h1 {
    margin-bottom: var(--space-2);
}

.page-header .breadcrumb {
    margin-bottom: 0;
}

.page-header .page-description {
    color: var(--gray-500);
    margin: 0;
}

/* ===== WELCOME CARD (Page Accueil) ===== */
.welcome-card {
    background: linear-gradient(135deg, var(--primary) 0%, #4338ca 100%);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.welcome-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.welcome-card h2 {
    color: var(--white);
    font-size: var(--font-size-2xl);
    margin-bottom: var(--space-2);
}

.welcome-card p {
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
}

/* ===== QUICK ACTIONS ===== */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--space-3);
}

.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-4);
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    color: var(--gray-700);
    text-decoration: none;
    transition: all var(--transition-base);
}

.quick-action-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.quick-action-btn i {
    font-size: 1.5rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
    #content {
        padding: var(--space-4);
    }

    .stat-card {
        padding: var(--space-4);
    }
}

@media (max-width: 768px) {
    #sidebar {
        margin-left: -280px;
        position: fixed;
        z-index: 1000;
    }

    #sidebar.active {
        margin-left: 0;
    }

    #content {
        width: 100%;
        margin-left: 0;
        padding: var(--space-3);
    }

    .notifications-container {
        width: 100%;
        left: 0;
        right: 0;
        top: 0;
        padding: var(--space-3);
    }

    .welcome-card {
        padding: var(--space-5);
    }

    .card-body {
        padding: var(--space-4);
    }
}

/* ===== TOGGLE SIDEBAR ===== */
.global-sidebar-toggle {
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 1001;
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.global-sidebar-toggle:hover {
    background: var(--gray-50);
    box-shadow: var(--shadow-md);
}

#sidebarCollapse {
    display: none;
}

@media (max-width: 768px) {
    #sidebarCollapse {
        display: block;
    }
}

/* ===== UTILITAIRES ===== */
.cursor-pointer { cursor: pointer; }
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Animation fade-in */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* ===== SCROLLBAR CUSTOM ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

/* ===== HORLOGE ===== */
.clock-widget {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    text-align: center;
}

.clock-widget .clock-time {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--gray-900);
    font-variant-numeric: tabular-nums;
}

.clock-widget .clock-date {
    color: var(--gray-500);
    font-size: var(--font-size-sm);
}
