/* ============================================================
   COURSE EXPRESS — Design System
   Phase 1.5 — Étape 1 (tokens, app shell, composants)
   ============================================================ */

/* ---------- 1. DESIGN TOKENS ---------- */
:root {
    /* Raw palette */
    --navy-900: #0B092B;   /* navy principal */
    --navy-800: #11103D;   /* navy secondaire */
    --navy-700: #171642;   /* navy surface */
    --navy-600: #1D1B4D;   /* navy card */
    --orange: #FF6B00;
    --orange-hover: #E85D00;
    --white: #FFFFFF;
    --light-secondary: #D9D8E8;  /* texte blanc secondaire */
    --muted: #9A98AE;            /* texte gris */
    --bg-desktop: #F7F7FA;
    --card-desktop: #FFFFFF;
    --success: #16B364;
    --info: #2878F0;
    --error: #EF233C;
    --warning: #F59E0B;
    --teal: #0D9488;
    --purple: #8B5CF6;

    /* Radii */
    --radius-xs: 8px;
    --radius-sm: 10px;
    --radius-md: 12px;
    --radius-lg: 14px;

    /* Shadows (très légères) */
    --shadow-sm: 0 2px 10px rgba(15, 15, 40, 0.06);
    --shadow-md: 0 4px 16px rgba(15, 15, 40, 0.09);
    --shadow-fab: 0 6px 18px rgba(255, 107, 0, 0.35);

    /* Spacing scale */
    --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
    --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px;

    /* Semantic tokens — MOBILE (dark shell) */
    --bg-app: var(--navy-900);
    --surface-card: var(--navy-600);
    --surface-soft: var(--navy-700);
    --surface-strong: var(--navy-800);
    --text-main: #FFFFFF;
    --text-sub: #B8B6C8;
    --text-faint: #8E8CA3;
    --border-soft: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.16);
    --input-bg: var(--navy-700);
    --input-border: rgba(255, 255, 255, 0.13);
    --input-text: #FFFFFF;
    --header-bg: var(--navy-900);
    --bottombar-bg: var(--navy-900);
    --font-mono: 'SF Mono', 'Cascadia Code', Consolas, monospace;
}

/* Desktop >= 1024px — light content, navy sidebar */
@media (min-width: 1024px) {
    :root {
        --bg-app: var(--bg-desktop);
        --surface-card: var(--card-desktop);
        --surface-soft: #F2F3F8;
        --surface-strong: var(--card-desktop);
        --text-main: #191A2E;
        --text-sub: #55546B;
        --text-faint: #9A98AE;
        --border-soft: #ECEDF4;
        --border-strong: #E2E3EF;
        --input-bg: #FFFFFF;
        --input-border: #E2E3EF;
        --input-text: #191A2E;
        --header-bg: #FFFFFF;
        --bottombar-bg: var(--navy-900);
    }
}

/* ---------- 2. BASE ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-app);
    color: var(--text-main);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    transition: background .25s ease, color .25s ease;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
img { max-width: 100%; }
svg { display: block; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

/* Pages publiques — toujours claires */
body.public { background: #FFFFFF; color: #18181B; }

/* Pages d'authentification — fond navy */
.auth-page {
    background: var(--navy-900) !important;
    color: #FFFFFF !important;
}
.auth-page .form-label { color: #B8B6C8; }
.auth-page .form-input,
.auth-page .form-select,
.auth-page .form-textarea {
    background: var(--navy-700);
    border-color: rgba(255, 255, 255, 0.13);
    color: #FFFFFF;
}
.auth-page .form-input::placeholder,
.auth-page .form-textarea::placeholder { color: #8E8CA3; }
.auth-page .form-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238E8CA3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}
.auth-page .form-check input[type="checkbox"] { accent-color: var(--orange); }
.auth-page .form-error { color: #FF8A84; }

/* ---------- MOBILE: contraste sur fond navy ---------- */
/* Sur mobile (<1024px), les pages internes ont un fond navy.
   Les classes text-navy, text-zinc-600, bg-gray-100 etc. deviennent illisibles.
   On les remplace par des couleurs claires. */
@media (max-width: 1023px) {
    body.app .text-navy,
    body.app h1.text-navy,
    body.app h2.text-navy,
    body.app h3.text-navy { color: #FFFFFF !important; }
    body.app .text-zinc-600 { color: #B8B6C8 !important; }
    body.app .text-zinc-400 { color: #8E8CA3 !important; }
    body.app .text-sm.font-medium:not(.text-white) { color: #E8E7F0 !important; }
    body.app .section-title { color: #FFFFFF !important; }
    body.app .page-title { color: #FFFFFF !important; }
    body.app .card { background: var(--navy-600); border-color: var(--border-soft); }
    body.app .card .bg-gray-100 { background: rgba(255,255,255,0.08) !important; }
    body.app .card .bg-gray-100 svg { color: #B8B6C8 !important; }
    body.app .btn-outline { border-color: rgba(255,255,255,0.15); color: #E8E7F0; }
    body.app .btn-outline:hover { border-color: var(--orange); color: var(--orange); }
    body.app .form-input,
    body.app .form-select,
    body.app .form-textarea {
        background: var(--navy-700); border-color: rgba(255,255,255,0.13); color: #FFFFFF;
    }
    body.app .form-label { color: #B8B6C8; }
    body.app .form-input::placeholder { color: #8E8CA3; }
    body.app .empty-state { color: #B8B6C8; }
    body.app .empty-state svg { color: #8E8CA3 !important; }
    /* Bottom nav padding — éviter que le contenu soit masqué */
    body.app .max-w-lg { padding-bottom: 140px !important; }
    body.app .app-content { padding-bottom: 140px !important; }
    body.app .detail-grid { scroll-margin-bottom: 140px; }
    body.app .order-list { scroll-margin-bottom: 140px; }
}

/* Police mono pour références */
.font-mono { font-family: var(--font-mono); }

/* ---------- 3. TYPOGRAPHIE ---------- */
.page-title { font-size: 20px; font-weight: 800; letter-spacing: -0.01em; color: var(--text-main); }
.section-title { font-size: 15px; font-weight: 700; color: var(--text-main); }
.card-title { font-size: 14px; font-weight: 600; color: var(--text-main); }

.text-xs { font-size: 12px; } .text-sm { font-size: 14px; } .text-base { font-size: 15px; }
.text-lg { font-size: 17px; } .text-xl { font-size: 19px; } .text-2xl { font-size: 22px; }
.text-3xl { font-size: 26px; } .text-4xl { font-size: 30px; }
.font-light { font-weight: 300; } .font-normal { font-weight: 400; }
.font-medium { font-weight: 500; } .font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; } .font-extrabold { font-weight: 800; }
.leading-tight { line-height: 1.25; } .leading-relaxed { line-height: 1.625; }
.text-center { text-align: center; } .text-left { text-align: left; } .text-right { text-align: right; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.whitespace-nowrap { white-space: nowrap; }
.whitespace-pre-line { white-space: pre-line; }

/* ---------- 4. COULEURS ---------- */
.text-main { color: var(--text-main); }
.text-sub { color: var(--text-sub); }
.text-faint { color: var(--text-faint); }
.text-white { color: #FFFFFF; }
.text-orange { color: var(--orange); }
.text-navy { color: var(--navy-900); }
.text-success { color: var(--success); }
.text-info { color: var(--info); }
.text-danger { color: var(--error); }
.text-warning { color: var(--warning); }
.text-zinc-400 { color: var(--text-faint); }
.text-zinc-600 { color: var(--text-sub); }
.text-zinc-900 { color: var(--text-main); }
.text-green-600 { color: var(--success); }
.text-blue-600 { color: var(--info); }
.text-red-600 { color: var(--error); }
.text-yellow-600 { color: var(--warning); }
.text-orange-600 { color: var(--orange); }

.bg-navy { background: var(--navy-900); }
.bg-orange { background: var(--orange); }
.bg-orange-dark { background: var(--orange-hover); }
.bg-white { background: #FFFFFF; }
.bg-transparent { background: transparent; }
/* Tints translucides (lisibles sur fond clair ET sombre) */
.bg-orange-50 { background: rgba(255, 107, 0, 0.10); }
.bg-green-50  { background: rgba(22, 179, 100, 0.10); }
.bg-blue-50   { background: rgba(40, 120, 240, 0.10); }
.bg-red-50    { background: rgba(239, 35, 60, 0.10); }
.bg-yellow-50 { background: rgba(245, 158, 11, 0.10); }
.bg-gray-50   { background: rgba(154, 152, 174, 0.10); }

/* Hommes publics (page d'accueil) */
.bg-gradient-to-b { background: linear-gradient(180deg, var(--navy-900) 0%, var(--navy-800) 100%); }
.text-white\/80 { color: rgba(255, 255, 255, 0.8); }
.text-white\/60 { color: rgba(255, 255, 255, 0.6); }
.text-white\/50 { color: rgba(255, 255, 255, 0.5); }

/* ---------- 5. FLEX / GRID / ESPACEMENTS ---------- */
.flex { display: flex; } .inline-flex { display: inline-flex; }
.flex-col { flex-direction: column; } .flex-row { flex-direction: row; }
.flex-1 { flex: 1 1 0%; } .flex-shrink-0 { flex-shrink: 0; }
.items-center { align-items: center; } .items-start { align-items: flex-start; } .items-end { align-items: flex-end; }
.justify-center { justify-content: center; } .justify-between { justify-content: space-between; }
.justify-around { justify-content: space-around; } .justify-end { justify-content: flex-end; }
.gap-1 { gap: 4px; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; } .gap-5 { gap: 20px; } .gap-6 { gap: 24px; }
.space-y-1 > * + * { margin-top: 4px; } .space-y-2 > * + * { margin-top: 8px; }
.space-y-3 > * + * { margin-top: 12px; } .space-y-4 > * + * { margin-top: 16px; }

.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

.w-full { width: 100%; } .w-auto { width: auto; }
.w-4 { width: 16px; } .w-5 { width: 20px; } .w-6 { width: 24px; } .w-8 { width: 32px; } .w-10 { width: 40px; } .w-12 { width: 48px; } .w-14 { width: 56px; } .w-16 { width: 64px; } .w-20 { width: 80px; }
.h-4 { height: 16px; } .h-5 { height: 20px; } .h-6 { height: 24px; } .h-8 { height: 32px; } .h-10 { height: 40px; } .h-12 { height: 48px; } .h-14 { height: 56px; } .h-16 { height: 64px; } .h-20 { height: 80px; }
.max-w-lg { max-width: 32rem; } .max-w-md { max-width: 28rem; } .max-w-sm { max-width: 24rem; } .max-w-xs { max-width: 20rem; }
.min-h-screen { min-height: 100vh; }

.p-1 { padding: 4px; } .p-2 { padding: 8px; } .p-3 { padding: 12px; } .p-4 { padding: 16px; } .p-5 { padding: 20px; } .p-6 { padding: 24px; }
.px-2 { padding: 0 8px; } .px-3 { padding: 0 12px; } .px-4 { padding: 0 16px; } .px-5 { padding: 0 20px; } .px-6 { padding: 0 24px; }
.py-2 { padding: 8px 0; } .py-3 { padding: 12px 0; } .py-4 { padding: 16px 0; }
.pt-4 { padding-top: 16px; } .pt-6 { padding-top: 24px; } .pb-4 { padding-bottom: 16px; }
.m-0 { margin: 0; }
.mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; }
.mt-5 { margin-top: 20px; } .mt-6 { margin-top: 24px; } .mt-8 { margin-top: 32px; } .mt-10 { margin-top: 40px; }
.mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; }
.ml-auto { margin-left: auto; } .mr-2 { margin-right: 8px; } .mx-auto { margin-left: auto; margin-right: auto; }
.my-3 { margin: 12px 0; }

.rounded { border-radius: var(--radius-xs); }
.rounded-lg { border-radius: var(--radius-sm); }
.rounded-xl { border-radius: var(--radius-md); }
.rounded-2xl { border-radius: var(--radius-lg); }
.rounded-full { border-radius: 9999px; }

.relative { position: relative; } .absolute { position: absolute; }
.fixed { position: fixed; } .sticky { position: sticky; }
.inset-0 { inset: 0; } .top-0 { top: 0; } .right-0 { right: 0; } .left-0 { left: 0; } .bottom-0 { bottom: 0; }
.top-1\/2 { top: 50%; } .right-3 { right: 12px; }
.-translate-y-1\/2 { transform: translateY(-50%); }
.z-10 { z-index: 10; } .z-50 { z-index: 50; } .z-60 { z-index: 60; } .z-70 { z-index: 70; } .z-100 { z-index: 100; }
.hidden { display: none !important; }
.opacity-50 { opacity: .5; } .opacity-100 { opacity: 1; }
.overflow-hidden { overflow: hidden; } .overflow-auto { overflow: auto; }
.shadow-sm { box-shadow: var(--shadow-sm); } .shadow-md { box-shadow: var(--shadow-md); }
.cursor-pointer { cursor: pointer; } .cursor-not-allowed { cursor: not-allowed; }
.pointer-events-none { pointer-events: none; }

/* ---------- 6. ICÔNES (Lucide-style, SVG) ---------- */
.ico { width: 18px; height: 18px; }
.ico-sm { width: 16px; height: 16px; }
.ico-lg { width: 24px; height: 24px; }
.ico-xl { width: 28px; height: 28px; }

/* ---------- 7. BOUTONS ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 44px; padding: 0 20px; border: none; border-radius: var(--radius-sm);
    font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap;
    transition: background .15s ease, border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.btn:active { transform: scale(0.98); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 13px; border-radius: var(--radius-xs); }
.btn-lg { height: 52px; padding: 0 26px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-icon { width: 40px; height: 40px; padding: 0; border-radius: var(--radius-xs); }

.btn-primary { background: var(--orange); color: #FFFFFF; }
.btn-primary:hover { background: var(--orange-hover); }
.btn-navy { background: var(--navy-900); color: #FFFFFF; }
.btn-navy:hover { background: var(--navy-800); }
.btn-outline {
    background: transparent; color: var(--text-main);
    border: 1px solid var(--border-strong);
}
.btn-outline:hover { border-color: var(--orange); color: var(--orange); }
.btn-ghost { background: transparent; color: var(--text-sub); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.07); color: var(--text-main); }
.btn-danger { background: var(--error); color: #FFFFFF; }
.btn-danger:hover { background: #D81B33; }
/* Sur desktop, le ghost hover redevient gris clair */
@media (min-width: 1024px) {
    .btn-ghost:hover { background: #F2F3F8; }
}

/* ---------- 8. FORMULAIRES ---------- */
.form-group { margin-bottom: 16px; }
.form-label {
    display: block; font-size: 12px; font-weight: 600; letter-spacing: .01em;
    color: var(--text-sub); margin-bottom: 6px;
}
.form-input, .form-select, .form-textarea {
    width: 100%; border: 1px solid var(--input-border); border-radius: var(--radius-sm);
    background: var(--input-bg); color: var(--input-text);
    font-size: 14px; font-family: inherit; outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.form-input, .form-select { height: 44px; padding: 0 14px; }
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-faint); }
.form-input:focus, .form-select:focus, .form-textarea:focus {
    border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.15);
}
.form-input.error { border-color: var(--error); }
.form-select {
    appearance: none; -webkit-appearance: none; padding-right: 36px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239A98AE' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center;
}
.form-textarea { min-height: 84px; padding: 12px 14px; resize: vertical; }
.form-error { font-size: 12px; color: var(--error); margin-top: 4px; }
.form-check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.form-check input[type="checkbox"] {
    width: 18px; height: 18px; accent-color: var(--orange); cursor: pointer; flex-shrink: 0;
}
.input-icon-wrap { position: relative; }
.input-icon-wrap .input-icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--text-faint); pointer-events: none; }
.input-icon-wrap .form-input { padding-left: 42px; }

.password-field { position: relative; }
.password-field .form-input { padding-right: 42px; }
.password-toggle {
    position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
    width: 34px; height: 34px; border: none; background: transparent; cursor: pointer;
    display: flex; align-items: center; justify-content: center; color: var(--text-faint);
}
.password-toggle svg { width: 19px; height: 19px; }
.password-toggle.is-visible { color: var(--orange); }

/* ---------- 9. CARTES ---------- */
.card {
    background: var(--surface-card); border: 1px solid var(--border-soft);
    border-radius: var(--radius-md); box-shadow: var(--shadow-sm);
    padding: 16px;
}
.card-p0 { padding: 0; }
.card-flat { background: var(--surface-soft); border: 1px solid var(--border-soft); border-radius: var(--radius-md); }
.card-hover { transition: box-shadow .2s ease, transform .2s ease; }
.card-hover:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }

/* En-tête de section dans une carte */
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.section-head .section-title { margin: 0; }
.section-link { font-size: 13px; font-weight: 600; color: var(--orange); }
.section-link:hover { text-decoration: underline; }

/* ---------- 10. BADGES / STATUTS ---------- */
.badge {
    display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 9px;
    border-radius: 9999px; font-size: 11px; font-weight: 600; letter-spacing: .02em; white-space: nowrap;
}
.badge-warning { background: rgba(255, 107, 0, 0.14); color: var(--orange); }
.badge-info    { background: rgba(40, 120, 240, 0.16); color: var(--info); }
.badge-success { background: rgba(22, 179, 100, 0.14); color: var(--success); }
.badge-danger  { background: rgba(239, 35, 60, 0.16); color: var(--error); }
.badge-secondary { background: rgba(154, 152, 174, 0.16); color: var(--text-faint); }
.badge-teal    { background: rgba(13, 148, 136, 0.16); color: var(--teal); }
.badge-purple  { background: rgba(139, 92, 246, 0.16); color: var(--purple); }

.status-dot { width: 8px; height: 8px; border-radius: 9999px; display: inline-block; flex-shrink: 0; }
.status-pending { background: var(--warning); }
.status-picked_up { background: var(--teal); }
.status-in_delivery, .status-in_progress { background: var(--info); }
.status-delivered { background: var(--success); }
.status-cancelled { background: var(--error); }
.status-returned { background: var(--purple); }

/* ---------- 11. STAT CARD ---------- */
.stat-card {
    background: var(--surface-card); border: 1px solid var(--border-soft);
    border-radius: var(--radius-md); padding: 16px;
    box-shadow: var(--shadow-sm);
    display: flex; flex-direction: column; gap: 10px;
}
.stat-icon {
    width: 36px; height: 36px; border-radius: var(--radius-xs);
    display: flex; align-items: center; justify-content: center;
}
.stat-icon svg { width: 18px; height: 18px; }
.si-orange  { background: rgba(255, 107, 0, 0.14); color: var(--orange); }
.si-blue    { background: rgba(40, 120, 240, 0.15); color: var(--info); }
.si-green   { background: rgba(22, 179, 100, 0.14); color: var(--success); }
.si-red     { background: rgba(239, 35, 60, 0.15); color: var(--error); }
.si-yellow  { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.si-navy    { background: rgba(23, 22, 66, 0.9); color: #FFFFFF; }
.stat-value { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; color: var(--text-main); line-height: 1.1; }
.stat-label { font-size: 12px; font-weight: 500; color: var(--text-sub); }

/* ---------- 12. APP SHELL (DESKTOP) ---------- */
.sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; width: 220px;
    background: var(--navy-900); z-index: 60;
    display: none; flex-direction: column;
    padding: 22px 14px;
}
@media (min-width: 1024px) { .sidebar { display: flex; } }

.sidebar-logo { display: flex; align-items: center; gap: 10px; padding: 0 6px 16px; margin-bottom: 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.sidebar-logo-badge { width: 36px; height: 36px; border-radius: 9px; background: var(--orange); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sidebar-logo-badge svg { width: 20px; height: 20px; color: #FFFFFF; }
.sidebar-logo-text { font-size: 13px; font-weight: 800; letter-spacing: .02em; color: #FFFFFF; line-height: 1.2; }
.sidebar-tagline { font-size: 9.5px; font-weight: 500; color: var(--muted); margin-top: 2px; }

.sidebar-nav { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.sidebar-link {
    display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 10px;
    border-radius: var(--radius-xs); font-size: 13px; font-weight: 500; color: var(--light-secondary);
    transition: background .15s ease, color .15s ease;
}
.sidebar-link svg { width: 17px; height: 17px; flex-shrink: 0; }
.sidebar-link:hover { background: rgba(255, 255, 255, 0.06); color: #FFFFFF; }
.sidebar-link.active { color: var(--orange); font-weight: 600; }
.sidebar-link.logout { color: #FF8A84; margin-top: auto; }
.sidebar-link-cta { background: var(--orange); color: #FFFFFF; font-weight: 600; }
.sidebar-link-cta:hover { background: var(--orange-hover); color: #FFFFFF; }
.sidebar-link-cta.active { color: #FFFFFF; }

.admin-mobile-title { padding: 16px 16px 0; font-size: 18px; font-weight: 800; color: var(--text-main); }
@media (min-width: 1024px) { .admin-mobile-title { display: none; } }
.sidebar-link.logout:hover { background: rgba(239, 35, 60, 0.12); color: #FF6B78; }

/* ---------- 13. HEADERS ---------- */
.mobile-header {
    /* Chaque écran a déjà son propre en-tête (salutation, titre + retour) ;
       cette barre générique faisait doublon avec eux (cf. maquette). */
    display: none;
}
.mobile-header-logo { display: flex; align-items: center; gap: 8px; }
.mobile-header-logo .mark {
    width: 30px; height: 30px; border-radius: 8px; background: var(--orange);
    display: flex; align-items: center; justify-content: center;
}
.mobile-header-logo .mark svg { width: 16px; height: 16px; color: #FFF; }
.mobile-header-title { font-size: 15px; font-weight: 700; color: var(--text-main); }
.mobile-header-actions { display: flex; align-items: center; gap: 10px; }
.mobile-header-title { font-size: 15px; font-weight: 700; color: var(--text-main); flex: 1; text-align: center; }
.mobile-back { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; color: var(--text-main); }
.mobile-back svg { width: 20px; height: 20px; }
.header-btn {
    width: 34px; height: 34px; border-radius: var(--radius-xs); border: none; cursor: pointer;
    background: transparent; color: var(--text-sub);
    display: flex; align-items: center; justify-content: center;
    transition: background .15s ease, color .15s ease;
}
.header-btn:hover { background: rgba(255, 255, 255, 0.08); color: var(--text-main); }

.desktop-header {
    display: none; position: sticky; top: 0; z-index: 40;
    height: 68px; padding: 0 40px; align-items: center; justify-content: space-between;
    background: #FFFFFF; border-bottom: 1px solid var(--border-soft);
}
@media (min-width: 1024px) { .desktop-header { display: flex; } }
.desktop-greeting { line-height: 1.3; }
.desktop-greeting .name { font-size: 15px; font-weight: 700; color: var(--text-main); }
.desktop-greeting .date { font-size: 12px; font-weight: 500; color: var(--text-faint); }
.desktop-header-right { display: flex; align-items: center; gap: 20px; }
.notif-btn {
    position: relative; width: 38px; height: 38px; border-radius: 10px; border: none; cursor: pointer;
    background: transparent; color: var(--text-sub);
    display: flex; align-items: center; justify-content: center;
    transition: background .15s ease;
}
.notif-btn:hover { background: rgba(154, 152, 174, 0.12); }
.avatar-wrap { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.avatar {
    width: 36px; height: 36px; border-radius: 9999px;
    background: linear-gradient(135deg, var(--orange), var(--orange-hover));
    color: #FFF; font-size: 13px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.avatar-meta { line-height: 1.25; }
.avatar-meta .an { font-size: 13px; font-weight: 600; color: var(--text-main); }
.avatar-meta .ar { font-size: 11px; color: var(--text-faint); }

/* Dropdowns — notifications & compte (header) */
.notif-wrap, .avatar-menu-wrap { position: relative; }
.dropdown-panel {
    position: absolute; top: calc(100% + 10px); right: 0; z-index: 70;
    width: 260px; background: var(--surface-card); border: 1px solid var(--border-soft);
    border-radius: var(--radius-md); box-shadow: var(--shadow-md); padding: 8px;
}
.dropdown-title { font-size: 12.5px; font-weight: 700; color: var(--text-main); padding: 8px 10px 4px; }
.dropdown-empty { font-size: 12.5px; color: var(--text-faint); text-align: center; padding: 16px 10px; margin: 0; }
.dropdown-item {
    display: block; padding: 10px 12px; border-radius: var(--radius-xs);
    font-size: 13.5px; font-weight: 500; color: var(--text-main);
    transition: background .15s ease;
}
.dropdown-item:hover { background: rgba(154, 152, 174, 0.12); }
.dropdown-item.danger { color: #FF6B78; }
.dropdown-item.danger:hover { background: rgba(239, 35, 60, 0.12); }

/* ---------- 14. BOTTOM NAVIGATION (MOBILE) ---------- */
.bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
    height: 62px; padding: 0 8px;
    display: flex; align-items: center; justify-content: space-around;
    background: var(--bottombar-bg); border-top: 1px solid var(--border-soft);
}
@media (min-width: 1024px) { .bottom-nav { display: none; } }
.nav-item {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    flex: 1; height: 100%; color: var(--text-faint);
    font-size: 10px; font-weight: 500;
    transition: color .15s ease;
}
.nav-item svg { width: 20px; height: 20px; }
.nav-item.active { color: var(--orange); }
.nav-item:hover { color: var(--orange); }

/* FAB central — orange, dépasse de la barre */
.nav-fab-slot { position: relative; flex: 1; display: flex; align-items: flex-start; justify-content: center; }
.nav-fab {
    width: 56px; height: 56px; border-radius: 9999px; border: 2px solid var(--bottombar-bg); cursor: pointer;
    background: var(--orange); color: #FFFFFF;
    display: flex; align-items: center; justify-content: center;
    margin-top: -30px; box-shadow: var(--shadow-fab);
    transition: transform .15s ease, background .15s ease;
    outline: none;
}
.nav-fab:hover { background: var(--orange-hover); }
.nav-fab:active { transform: scale(0.94); }
.nav-fab svg { width: 24px; height: 24px; }
.nav-fab-label { position: absolute; bottom: -4px; font-size: 10px; font-weight: 600; color: var(--text-faint); text-align: center; width: 100%; }

/* ---------- 15. APP MAIN ---------- */
.app-main {
    margin-left: 0; min-height: 100vh;
    padding: 16px 16px 96px;
    transition: margin-left .25s ease;
}
.app-content { max-width: 100%; margin: 0 auto; }
@media (min-width: 768px) and (max-width: 1023px) {
    .app-main { padding: 20px 24px 100px; }
    .app-content { max-width: 900px; }
}
@media (min-width: 1024px) {
    .app-main { margin-left: 220px; width: calc(100% - 220px); padding: 0; }
    .app-content { max-width: 1440px; margin: 0 auto; padding: 28px 40px 64px; }
}

/* ---------- 16. DASHBOARD SPECIFIQUE (composants) ---------- */
.dash-greeting { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 20px; }
.dash-greeting h1 { font-size: 20px; font-weight: 800; letter-spacing: -0.01em; }
.dash-greeting .date { font-size: 12.5px; color: var(--text-faint); margin-top: 2px; }
@media (min-width: 1024px) { .dash-greeting { display: none; } }

.stats-hero { margin-bottom: 20px; }
.stats-hero-title { display: none; }
.stats-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
@media (max-width: 767px) {
    /* Regroupement 2 + 3 + 1, comme dans la maquette */
    .stats-grid > *:nth-child(1), .stats-grid > *:nth-child(2) { grid-column: span 3; }
    .stats-grid > *:nth-child(3), .stats-grid > *:nth-child(4),
    .stats-grid > *:nth-child(5), .stats-grid > *:nth-child(6) { grid-column: span 2; }
}
@media (min-width: 768px) and (max-width: 1023px) {
    .stats-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; }
}
@media (min-width: 1024px) {
    .stats-hero {
        background: var(--navy-900); border-radius: var(--radius-lg);
        padding: 24px; margin-bottom: 24px; box-shadow: var(--shadow-md);
    }
    .stats-hero-title {
        display: block; color: #FFFFFF; font-size: 16px; font-weight: 700; margin-bottom: 16px;
    }
    .stats-grid { grid-template-columns: repeat(6, 1fr); gap: 14px; }
    .stats-hero .stat-card {
        background: transparent;
        border: none;
        box-shadow: none;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 10px;
        padding: 0;
    }
    .stats-hero .stat-icon { border-radius: 10px; }
    .stats-hero .stat-value { color: #FFFFFF; }
    .stats-hero .stat-label { color: #B8B6C8; }
}

/* Cartes de course */
.order-card {
    display: flex; align-items: center; gap: 12px;
    padding: 12px; border-radius: var(--radius-md);
    background: var(--surface-card); border: 1px solid var(--border-soft);
    transition: box-shadow .2s ease, border-color .2s ease;
}
a.order-card:hover { border-color: rgba(255, 107, 0, 0.4); box-shadow: var(--shadow-sm); }
.order-badge-icon {
    width: 38px; height: 38px; border-radius: var(--radius-xs); flex-shrink: 0;
    background: rgba(255, 107, 0, 0.13); color: var(--orange);
    display: flex; align-items: center; justify-content: center;
}
.order-badge-icon svg { width: 18px; height: 18px; }
.order-main { flex: 1; min-width: 0; }
.order-ref { font-size: 11px; font-family: var(--font-mono); color: var(--text-faint); font-weight: 600; letter-spacing: .02em; }
.order-name { font-size: 14px; font-weight: 600; color: var(--text-main); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.order-addr { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-sub); }
.order-addr svg { width: 12px; height: 12px; flex-shrink: 0; }
.order-tail { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.order-amount { font-size: 15px; font-weight: 700; color: var(--text-main); }
.order-meta { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text-faint); }

/* Colonnes dashboard (2 zones) */
.dash-cols { display: grid; grid-template-columns: 1fr; gap: 16px; margin-bottom: 16px; }
@media (min-width: 1024px) { .dash-cols { grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 24px; } }

/* Triptyque bas */
.dash-trio { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 1024px) { .dash-trio { grid-template-columns: repeat(3, 1fr); gap: 20px; } }

/* ---------- 16b. PAGES — largeur de contenu ---------- */
/* Pages "liste/tableau" (Clients, Statistiques, Messagerie…) : utilisent toute la largeur
   disponible de .app-content, avec leurs propres grilles responsives ci-dessous. */
.page-wide { padding-top: 8px; }

/* Pages "formulaire" (Nouvelle course, Nouveau client, Notifications, Aide…) : restent
   une colonne lisible, mais centrée dans TOUTE la largeur de .app-content — pas seulement
   la largeur mobile — pour ne pas rester collées au bord sur desktop. */
.form-page { max-width: 640px; margin: 0 auto; padding-top: 8px; }

/* Grille des 4 indicateurs principaux (page Statistiques) */
.stats-kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 640px) { .stats-kpis { grid-template-columns: repeat(4, 1fr); } }

/* Grille des cartes client (page Clients) */
.client-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 640px) { .client-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .client-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; } }

/* Lignes statut */
.status-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-left: 4px solid transparent; }
.status-row + .status-row { border-top: 1px solid var(--border-soft); }
.status-row .count { font-size: 16px; font-weight: 700; color: var(--text-main); }
.status-row.sr-pending { border-left-color: var(--warning); }
.status-row.sr-in_progress { border-left-color: var(--info); }
.status-row.sr-delivered { border-left-color: var(--success); }
.status-row.sr-cancelled { border-left-color: var(--error); }

/* Accès rapide */
.qa-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.qa-item {
    display: flex; align-items: center; gap: 10px; padding: 12px;
    border-radius: var(--radius-md); border: 1px solid var(--border-soft);
    background: var(--surface-soft);
    font-size: 13px; font-weight: 600; color: var(--text-main);
    transition: border-color .15s ease, transform .15s ease;
}
.qa-item:hover { border-color: rgba(255, 107, 0, 0.45); transform: translateY(-1px); }
.qa-item svg { width: 18px; height: 18px; color: var(--orange); flex-shrink: 0; }

/* Informations */
.info-list { display: flex; flex-direction: column; gap: 12px; }
.info-item { display: flex; align-items: center; gap: 10px; }
.info-item .k { font-size: 12px; color: var(--text-faint); min-width: 40%; }
.info-item .v { font-size: 13px; font-weight: 600; color: var(--text-main); text-align: right; flex: 1; }
.info-item svg { width: 16px; height: 16px; color: var(--orange); flex-shrink: 0; }

/* Graphiques */
.chart-wrap { position: relative; width: 100%; }
.chart-wrap svg { width: 100%; height: auto; }
.chart-pill {
    display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px;
    border-radius: 9999px; border: 1px solid var(--border-strong);
    font-size: 12px; font-weight: 600; color: var(--text-sub); background: transparent; cursor: default;
}
.chart-pill svg { width: 14px; height: 14px; }
.chart-divider { height: 1px; background: var(--border-soft); margin: 20px 0; }
.donut-legend { display: flex; flex-direction: column; gap: 8px; }
.donut-item { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-sub); }
.donut-item .swatch { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.donut-item .lv { margin-left: auto; font-weight: 600; color: var(--text-main); }
.chart-title { font-size: 13px; font-weight: 700; color: var(--text-main); margin-bottom: 12px; }

/* ---------- 17. ÉTATS (empty/loading) ---------- */
.empty-state {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 40px 16px; text-align: center; color: var(--text-faint);
}
.empty-state svg { width: 40px; height: 40px; margin-bottom: 12px; color: var(--text-faint); opacity: .5; }
.empty-state p { font-size: 13px; }
.loading-state { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 40px 16px; color: var(--text-faint); }
.loader {
    width: 28px; height: 28px; border-radius: 9999px;
    border: 3px solid var(--border-strong); border-top-color: var(--orange);
    animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 18. TOAST ---------- */
.toast-container {
    position: fixed; top: 16px; left: 16px; right: 16px; z-index: 100;
    display: flex; justify-content: center; pointer-events: none;
}
.toast-container .toast { pointer-events: auto; width: 100%; max-width: 420px; }
@media (min-width: 1024px) {
    .toast-container { left: auto; right: 24px; justify-content: flex-end; }
}
.toast {
    display: flex; align-items: center; gap: 10px;
    background: var(--surface-card); border: 1px solid var(--border-soft);
    border-radius: var(--radius-md); box-shadow: var(--shadow-md);
    padding: 12px 14px; font-size: 13px; font-weight: 500; color: var(--text-main);
    animation: toastIn .3s ease;
}
.toast svg { width: 18px; height: 18px; flex-shrink: 0; }
.toast .t-close { margin-left: auto; background: none; border: none; color: var(--text-faint); cursor: pointer; font-size: 16px; line-height: 1; }
.toast-success svg { color: var(--success); }
.toast-error svg { color: var(--error); }
.toast-info svg { color: var(--info); }
.toast-warning svg { color: var(--warning); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- 19. MODAL ---------- */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(9, 7, 43, 0.6); z-index: 90;
    display: flex; align-items: flex-end; justify-content: center;
    opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.modal-overlay.active { opacity: 1; pointer-events: all; }
.modal-content {
    background: var(--surface-card); border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    width: 100%; max-width: 480px; max-height: 80vh; overflow-y: auto;
    padding: 20px; transform: translateY(100%); transition: transform .3s ease;
}
.modal-overlay.active .modal-content { transform: translateY(0); }
@media (min-width: 1024px) {
    .modal-overlay { align-items: center; }
    .modal-content { border-radius: var(--radius-lg); }
}

/* ---------- 21. PAGE HEAD ---------- */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.page-head h1 { margin: 0; }
.page-head .subtitle { font-size: 13px; font-weight: 500; color: var(--text-faint); margin-top: 2px; }
.page-head-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

/* ---------- 22. FILTRES (chips) ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
    height: 30px; padding: 0 14px; border-radius: 9999px;
    border: 1px solid var(--border-strong); background: transparent;
    font-size: 12px; font-weight: 600; color: var(--text-sub); white-space: nowrap;
    cursor: pointer; transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.chip:hover { border-color: var(--orange); color: var(--orange); }
.chip.active { background: var(--orange); border-color: var(--orange); color: #FFFFFF; }

/* ---------- 23. RECHERCHE ---------- */
.search-box { position: relative; }
.search-box > svg {
    position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
    width: 16px; height: 16px; color: var(--text-faint); pointer-events: none;
}
.search-box input {
    width: 100%; height: 40px; border: 1px solid var(--input-border); border-radius: var(--radius-sm);
    background: var(--input-bg); color: var(--input-text);
    font-size: 13.5px; font-family: inherit; padding: 0 14px 0 38px; outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.search-box input::placeholder { color: var(--text-faint); }
.search-box input:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.15); }

/* ---------- 24. LISTE DES COURSES ---------- */
.orders-toolbar { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
@media (min-width: 768px) {
    .orders-toolbar { flex-direction: row; align-items: center; justify-content: space-between; }
    .orders-toolbar .search-box { flex: 1; max-width: 320px; }
}

.order-list { display: flex; flex-direction: column; gap: 12px; }

.course-card {
    display: grid; grid-template-columns: 34px 1fr; gap: 4px 12px;
    background: var(--surface-card); border: 1px solid var(--border-soft);
    border-radius: var(--radius-md); box-shadow: var(--shadow-sm);
    padding: 14px;
    transition: box-shadow .2s ease, border-color .2s ease, transform .2s ease;
}
a.course-card:hover { border-color: rgba(255, 107, 0, 0.45); box-shadow: var(--shadow-md); transform: translateY(-1px); }

.course-ic {
    width: 34px; height: 34px; border-radius: var(--radius-xs); flex-shrink: 0;
    background: rgba(255, 107, 0, 0.13); color: var(--orange);
    display: flex; align-items: center; justify-content: center; grid-row: span 2;
}
.course-ic svg { width: 17px; height: 17px; }

.course-body { min-width: 0; }
.course-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.course-ref { font-family: var(--font-mono); font-size: 12px; font-weight: 700; letter-spacing: .02em; color: var(--text-faint); }
.course-ts { font-size: 11.5px; font-weight: 600; color: var(--text-faint); white-space: nowrap; }
.course-name { font-size: 15px; font-weight: 700; color: var(--text-main); margin-top: 3px; }
.course-loc { display: flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--text-sub); margin-top: 2px; }
.course-loc svg { width: 12px; height: 12px; flex-shrink: 0; }
.course-phone { display: none; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-sub); margin-top: 3px; }
.course-phone svg { width: 12px; height: 12px; flex-shrink: 0; }

.course-side {
    grid-column: 1 / -1;
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    border-top: 1px solid var(--border-soft); padding-top: 10px; margin-top: 8px;
}
.course-amount { font-size: 16px; font-weight: 800; letter-spacing: -0.01em; color: var(--text-main); }
.course-fees { display: none; }

@media (min-width: 768px) {
    .order-list { gap: 14px; }
    .course-card { grid-template-columns: 38px 1fr auto; align-items: center; gap: 8px 16px; padding: 16px 18px; }
    .course-ic { grid-row: span 3; width: 38px; height: 38px; }
    .course-phone { display: flex; }
    .course-side {
        grid-column: auto; flex-direction: column; align-items: flex-end; justify-content: center; gap: 5px;
        border-top: none; padding-top: 0; margin-top: 0;
    }
    .course-fees { display: block; font-size: 11.5px; color: var(--text-faint); }
}

@media (min-width: 1024px) {
    .order-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
}

/* ---------- 25. DÉTAIL D'UNE COURSE ---------- */
.detail-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.back-btn {
    width: 38px; height: 38px; border-radius: var(--radius-xs); flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: transparent; border: 1px solid var(--border-strong); color: var(--text-sub);
    cursor: pointer; transition: border-color .15s ease, color .15s ease;
}
.back-btn:hover { border-color: var(--orange); color: var(--orange); }
.back-btn svg { width: 18px; height: 18px; }
.detail-head-titles { flex: 1; min-width: 0; }
.detail-head-titles .page-title { font-size: 17px; }
.detail-head .subtitle { font-size: 12.5px; font-weight: 500; color: var(--text-faint); margin-top: 2px; }

.detail-grid { display: grid; grid-template-columns: 1fr; gap: 16px; align-items: start; margin-bottom: 16px; }
@media (min-width: 768px) { .detail-grid { grid-template-columns: 1fr 1fr; gap: 20px; } }
.detail-col { display: flex; flex-direction: column; gap: 16px; }

.kv-list { display: flex; flex-direction: column; }
.kv-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 9px 0; }
.kv-row + .kv-row { border-top: 1px solid var(--border-soft); }
.kv-row .k { font-size: 12.5px; color: var(--text-faint); flex-shrink: 0; }
.kv-row .v { font-size: 13.5px; font-weight: 600; color: var(--text-main); text-align: right; }
.kv-row .v.text-left { text-align: left; }
.kv-total .v { color: var(--orange); font-size: 16px; font-weight: 800; letter-spacing: -0.01em; }
.link-orange { color: var(--orange); }

.detail-actions { display: flex; flex-direction: column; gap: 12px; }
@media (min-width: 768px) {
    .detail-actions { flex-direction: row; }
    .detail-actions .btn { flex: 1; }
}

/* Confirmation de création (flash) */
.confirm-card {
    background: rgba(22, 179, 100, 0.12); border: 1px solid rgba(22, 179, 100, 0.35);
    border-radius: var(--radius-lg); padding: 24px 20px; text-align: center; margin-bottom: 18px;
}
.confirm-ic {
    width: 56px; height: 56px; border-radius: 9999px; margin: 0 auto 12px;
    background: rgba(22, 179, 100, 0.22); color: var(--success);
    display: flex; align-items: center; justify-content: center;
}
.confirm-ic svg { width: 28px; height: 28px; }
.confirm-ref {
    font-family: var(--font-mono); font-size: 15px; font-weight: 800; letter-spacing: .02em;
    color: var(--orange); margin-top: 8px;
}

/* ---------- 26. ACCUEIL PUBLIC (landing) ---------- */
@media (min-width: 1024px) {
    .home-screen { padding: 64px; }
    .home-icon { width: 112px; height: 112px; border-radius: 32px; }
    .home-icon svg { width: 56px; height: 56px; }
    .home-title { font-size: 48px; margin-bottom: 16px; }
    .home-subtitle { font-size: 22px; max-width: 32rem; }
    .home-tagline { font-size: 16px; margin-top: 12px; max-width: 28rem; }
    .home-intro { margin-bottom: 48px; }
    .home-actions { max-width: 26rem; gap: 16px; margin-bottom: 56px; }
    .home-actions .btn { height: 54px; font-size: 16px; }
    .home-features { max-width: 34rem; gap: 56px; font-size: 14px; }
}

/* ---------- 27. MESSAGERIE ---------- */
.chat-thread { display: flex; flex-direction: column; gap: 12px; padding: 4px 0; }
.chat-row { display: flex; }
.chat-row.mine { justify-content: flex-end; }
.chat-bubble {
    max-width: 78%; padding: 10px 14px; border-radius: var(--radius-md);
    background: var(--surface-soft); border: 1px solid var(--border-soft);
    font-size: 13.5px; line-height: 1.45; color: var(--text-main);
}
.chat-row.mine .chat-bubble { background: var(--orange); border-color: var(--orange); color: #FFFFFF; }
.chat-meta { font-size: 10.5px; margin-top: 4px; color: var(--text-faint); }
.chat-row.mine .chat-meta { text-align: right; }
.chat-sender { font-weight: 700; margin-right: 6px; }
.chat-empty { text-align: center; padding: 32px 16px; color: var(--text-faint); font-size: 13px; }
.chat-form { display: flex; gap: 8px; margin-top: 16px; }
.chat-form .form-input { flex: 1; }
.chat-conv-item { display: flex; align-items: center; gap: 12px; padding: 14px; }
.chat-conv-item .preview { font-size: 12.5px; color: var(--text-sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.whatsapp-emergency {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    height: 40px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600;
    background: rgba(37, 211, 102, 0.14); color: #1FA855; margin-top: 10px;
    border: 1px solid rgba(37, 211, 102, 0.3); transition: background .15s ease;
}
.whatsapp-emergency:hover { background: rgba(37, 211, 102, 0.22); }
.whatsapp-emergency svg { width: 18px; height: 18px; }
.confirm-total { font-size: 22px; font-weight: 800; color: var(--text-main); margin-top: 8px; letter-spacing: -0.01em; }