/* ========================================
   VARIABLES CSS
   ======================================== */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #059669;
    --warning-color: #d97706;
    --danger-color: #dc2626;
    --light-bg: #f8fafc;
    --dark-text: #1e293b;
    --border-color: #e2e8f0;
}

/* ========================================
   STYLES GÉNÉRAUX
   ======================================== */
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--light-bg);
    color: var(--dark-text);
    margin: 0;
    padding: 0;
}

/* ========================================
   NAVBAR
   ======================================== */
.navbar {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.1);
    padding: 1rem 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 2.5rem;
    color: white !important;
}

.nav-link {
    font-weight: 600;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ========================================
   CARDS
   ======================================== */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* ========================================
   BOUTONS
   ======================================== */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

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

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

/* ========================================
   ALERTS
   ======================================== */
.alert {
    border-radius: 8px;
    border: none;
}

/* ========================================
   FORMULAIRES
   ======================================== */
.form-control,
.form-select {
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: border-color 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
}

/* ========================================
   SIDEBAR
   ======================================== */
.sidebar {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* ========================================
   STAT CARDS
   ======================================== */
.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 16px;
}

/* ========================================
   FEATURE ICONS
   ======================================== */
.feature-icon {
    width: 60px;
    height: 60px;
    background: rgba(37, 99, 235, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

/* ========================================
   TABLES
   ======================================== */
.table {
    background: white;
    border-radius: 12px;
    overflow: hidden;
}

/* ========================================
   BADGES
   ======================================== */
.badge {
    font-weight: 500;
    padding: 0.5rem 0.75rem;
}

/* ========================================
   MAIN CONTENT
   ======================================== */
main.container-fluid {
    padding: 0 !important;
}

/* ========================================
   PAGES COMPACTES (UNE SEULE VUE)
   ======================================== */
.compact-page {
    max-height: calc(100vh - 80px);
    overflow-y: auto;
}

.compact-card {
    max-height: calc(100vh - 120px);
}

.compact-card .card-body {
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

/* Formulaires compacts */
.compact-form .mb-4 {
    margin-bottom: 1rem !important;
}

.compact-form .mb-3 {
    margin-bottom: 0.75rem !important;
}

.compact-form .form-control,
.compact-form .form-select {
    padding: 0.375rem 0.75rem;
    font-size: 0.9rem;
}

.compact-form label {
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.compact-form .card {
    margin-bottom: 0.75rem !important;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.5rem;
    }

    .search-modern {
        width: 100%;
        margin: 1rem 0;
    }
}