/* ============================================================
   main.css — Variables globales & thème clair/sombre
   ============================================================ */

:root {
    --brand-primary: #4f46e5;
    --brand-primary-dark: #4338ca;
    --brand-secondary: #06b6d4;
    --brand-success: #16a34a;
    --brand-warning: #d97706;
    --brand-danger: #dc2626;

    --bg-body: #f4f5fb;
    --bg-surface: #ffffff;
    --bg-sidebar: #171a2b;
    --text-main: #1e2130;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;

    --sidebar-width: 260px;
    --sidebar-width-collapsed: 78px;
    --navbar-height: 68px;

    --radius-md: 12px;
    --radius-lg: 18px;
    --shadow-soft: 0 4px 20px rgba(17, 24, 39, 0.06);
    --shadow-medium: 0 10px 30px rgba(17, 24, 39, 0.10);
}

[data-bs-theme="dark"] {
    --bg-body: #12131c;
    --bg-surface: #1b1d2b;
    --bg-sidebar: #0e0f18;
    --text-main: #eef0f7;
    --text-muted: #9ca3af;
    --border-color: #2a2d40;
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.35);
    --shadow-medium: 0 10px 30px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }

body {
    background: var(--bg-body);
    color: var(--text-main);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    transition: background-color .25s ease, color .25s ease;
}

a { text-decoration: none; }

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

/* Cartes modernes réutilisables */
.card-modern {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    transition: transform .2s ease, box-shadow .2s ease;
}
.card-modern:hover {
    box-shadow: var(--shadow-medium);
}

.gradient-primary {
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    color: #fff;
}
.gradient-success {
    background: linear-gradient(135deg, #16a34a, #22c55e);
    color: #fff;
}
.gradient-warning {
    background: linear-gradient(135deg, #d97706, #f59e0b);
    color: #fff;
}
.gradient-danger {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    color: #fff;
}

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

/* Statut de commande "Prête" — couleur distincte des autres badges Bootstrap */
.bg-prete {
    background-color: #0ea5e9 !important;
    color: #fff !important;
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #c7c9d9; border-radius: 4px; }
[data-bs-theme="dark"] ::-webkit-scrollbar-thumb { background: #3a3d55; }
