/**
 * X'Press Formalités — Espace Pro (pro.xpformalites.fr)
 * Charte alignée sur xpformalites.fr : bleu marine #0d2c62, bleu ciel #5ab1df,
 * fonds bleu pâle #ecf5fc, titres géométriques (Jost ≈ Futura), texte en Hind.
 * Toutes les couleurs de marque passent par les variables ci-dessous.
 */

@import url('https://fonts.googleapis.com/css2?family=Jost:wght@500;600;700&family=Hind:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    /* ── Marque X'Press ─────────────────────────────── */
    --xp-navy: #0d2c62;            /* bandeau, titres, boutons d'action */
    --xp-navy-dark: #081d42;
    --xp-navy-light: #1d4282;
    --xp-sky: #5ab1df;             /* CTA "Contact", "Accéder à l'espace…" */
    --xp-sky-dark: #3d98c9;
    --xp-sky-light: #7fc3e8;
    --xp-sky-line: #89c1eb;        /* filet sous les titres */
    --xp-sky-text: #2a76a6;        /* texte bleu ciel lisible sur blanc ("Frais de gestion") */
    --xp-pale: #ecf5fc;            /* sections bleu pâle */

    /* Alias utilisés par l'application */
    --primary: var(--xp-navy);
    --primary-light: var(--xp-navy-light);
    --primary-dark: var(--xp-navy-dark);
    --primary-soft: var(--xp-pale);
    --secondary: var(--xp-sky);
    --secondary-light: var(--xp-sky-light);
    --secondary-dark: var(--xp-sky-dark);
    --secondary-line: var(--xp-sky-line);
    --accent: var(--xp-sky-text);

    /* Statuts (sémantiques, indépendants de la marque) */
    --status-pending: #f59e0b;
    --status-pending-bg: #fef3c7;
    --status-ok: #10b981;
    --status-ok-bg: #d1fae5;
    --status-incomplete: #ef4444;
    --status-incomplete-bg: #fee2e2;
    --status-ants: var(--xp-sky);
    --status-ants-bg: var(--xp-pale);
    --status-done: #6b7280;
    --status-done-bg: #f3f4f6;

    /* Neutres (repris du site : gris neutres, pas d'ardoise bleutée) */
    --bg: var(--xp-pale);
    --bg-card: #ffffff;
    --bg-subtle: #f5f5f5;          /* fond des champs de saisie */
    --text: #1f2a3d;
    --text-light: #545454;
    --text-muted: #8a8f98;
    --border: #e6e9ee;
    --border-card: #f1f1f1;

    /* Typo */
    --font-title: 'Jost', 'Futura', 'Century Gothic', sans-serif;
    --font-body: 'Hind', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Effets : ombres légères, angles nets comme sur le site */
    --shadow-sm: 0 1px 2px rgba(13, 44, 98, 0.05);
    --shadow: 0 2px 10px rgba(13, 44, 98, 0.06);
    --shadow-lg: 0 10px 24px -8px rgba(13, 44, 98, 0.16);
    --shadow-xl: 0 24px 48px -12px rgba(13, 44, 98, 0.25);

    --radius: 6px;
    --radius-sm: 4px;
    --radius-lg: 8px;

    --transition: all 0.2s ease;
}

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

html {
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

h1, h2, h3, h4, h5,
.dashboard-title, .modal-header h2 {
    font-family: var(--font-title);
    color: var(--primary);
    letter-spacing: -0.01em;
}

a { color: var(--accent); }

:focus-visible {
    outline: 2px solid var(--xp-sky);
    outline-offset: 2px;
}

/* ===== BANDEAU SUPÉRIEUR (identique au site public) ===== */
.topbar {
    background: var(--xp-navy);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.55rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}
.topbar a { color: #fff; text-decoration: none; white-space: nowrap; }
.topbar a:hover { text-decoration: underline; }

/* ===== HEADER ===== */
.header {
    background: white;
    padding: 0.75rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 14px rgba(13, 44, 98, 0.07);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
}

.logo-img {
    height: 56px;
    width: auto;
    display: block;
    flex-shrink: 0;
}

.logo-text {
    line-height: 1.2;
    padding-left: 1rem;
    border-left: 2px solid var(--xp-sky-line);
}
.logo-text:empty { display: none; }

.logo-text h1 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--primary);
}

.logo-text > span {
    display: block;
    font-size: 0.8rem;
    color: var(--text-light);
    font-weight: 500;
}

.admin-badge {
    display: inline-block;
    background: var(--xp-navy);
    color: #fff;
    font-family: var(--font-title);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    padding: 0.15rem 0.55rem;
    border-radius: var(--radius-sm);
    vertical-align: middle;
    margin-left: 0.4rem;
}

.header-actions {
    display: flex;
    gap: .75rem;
    align-items: center;
}

/* ===== THÈME ADMIN : orange, pour distinguer immédiatement la console de l'espace pro ===== */
.theme-admin {
    --admin: #c2560c;              /* orange lisible sur blanc (texte, badge) */
    --admin-bright: #f28c28;       /* orange vif (filets, soulignements) */
    --admin-soft: #fff4ea;         /* fond orange clair */
    --admin-line: #fdd3ad;
    --bg: var(--admin-soft);
    --primary-soft: #ffe9d6;
    --secondary-line: var(--admin-line);
}
.theme-admin .header { border-bottom: 3px solid var(--admin-bright); }
.theme-admin .logo-text { border-left-color: var(--admin-bright); }
.theme-admin .logo-text h1 { color: var(--admin); }
.theme-admin .admin-badge { background: var(--admin); }
.theme-admin .tab-btn.active { color: var(--admin); }
.theme-admin .tab-btn.active::after { background: var(--admin-bright); }
.theme-admin .tab-btn.active .tab-count { background: #ffe9d6; color: var(--admin); }
.theme-admin .btn-ghost:hover { border-color: var(--admin-line); }

/* ===== BUTTONS (angles nets, capitales espacées comme sur le site) ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.3rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-title);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-decoration: none;
    white-space: nowrap;
}
.btn-primary {
    background: var(--secondary);
    color: white;
}
.btn-primary:hover {
    background: var(--secondary-dark);
}
.btn-navy {
    background: var(--primary);
    color: white;
}
.btn-navy:hover {
    background: var(--primary-light);
}
.btn-secondary {
    background: white;
    color: var(--primary);
    border: 1px solid var(--primary);
}
.btn-secondary:hover {
    background: var(--primary-soft);
}
.btn-success {
    background: var(--status-ok);
    color: white;
}
.btn-success:hover {
    background: #059669;
}
.btn-ghost {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--border);
    text-transform: none;
    letter-spacing: 0;
    font-family: var(--font-body);
}
.btn-ghost:hover {
    background: var(--primary-soft);
    border-color: var(--secondary-line);
}
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ===== MAIN CONTENT ===== */
.main {
    padding: 2rem;
    max-width: 1800px;
    margin: 0 auto;
}

/* ===== DASHBOARD ===== */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.dashboard-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.15;
}
/* Filet bleu ciel sous le titre : signature des pages de xpformalites.fr */
.dashboard-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background: var(--xp-sky-line);
    margin-top: 0.75rem;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 2px solid var(--border-card);
    box-shadow: none;
    display: flex;
    align-items: center;
    gap: 1rem;
}

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

.stat-info h3 {
    font-family: var(--font-title);
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
}

.stat-info span {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* ===== DOSSIERS LIST ===== */
.dossiers-list {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 2px solid var(--border-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.dossier-row {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 0.85rem 1.5rem;
    cursor: pointer;
    transition: background 0.15s;
    border-left: 3px solid transparent;
    border-bottom: 1px solid var(--border);
    background: white;
}

.dossier-row:last-child {
    border-bottom: none;
}

.dossier-row:hover {
    background: var(--primary-soft);
}

.dossier-row.souffrance {
    background: #fef2f2;
    border-left-color: #ef4444;
}

.dossier-row[data-status="attente_documents"] { border-left-color: var(--status-pending); }
.dossier-row[data-status="ok"] { border-left-color: var(--status-ok); }
.dossier-row[data-status="a_completer"] { border-left-color: var(--status-incomplete); }
.dossier-row[data-status="attente_ants"] { border-left-color: var(--status-ants); }
.dossier-row[data-status="attente_xp"] { border-left-color: #8b5cf6; }
.dossier-row[data-status="attente_retour_mail"] { border-left-color: #ec4899; }

.row-numero {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
    min-width: 110px;
}

.row-client {
    font-weight: 600;
    font-size: 1rem;
    min-width: 180px;
    flex: 1;
}

.row-demarche {
    font-size: 0.9rem;
    color: var(--text-light);
    min-width: 160px;
}

.row-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.row-docs {
    font-size: 0.85rem;
    color: var(--text-light);
    min-width: 40px;
    text-align: center;
}

.souffrance-tag {
    background: #ef4444;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 50px;
}

.btn-accuse-small {
    background: var(--secondary);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s;
}

.btn-accuse-small:hover {
    transform: scale(1.1);
    background: var(--secondary-dark);
}

/* Legacy - kept for compatibility */
.dossier-card[data-status="attente_documents"] { border-left-color: var(--status-pending); }
.dossier-card[data-status="ok"] { border-left-color: var(--status-ok); }
.dossier-card[data-status="a_completer"] { border-left-color: var(--status-incomplete); }
.dossier-card[data-status="attente_ants"] { border-left-color: var(--status-ants); }
.dossier-card[data-status="traite"] { border-left-color: var(--status-done); }

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 2px solid var(--border-card);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.5rem;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

/* ===== MODAL ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(8, 29, 66, 0.55);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    transform: translateY(20px);
    transition: var(--transition);
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

.modal-header {
    padding: 1.5rem 2rem;
    background: var(--primary);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 1.3rem;
    font-weight: 600;
    color: white;
}

.modal-close {
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.25rem;
    transition: var(--transition);
}

.modal-close:hover {
    background: rgba(255,255,255,0.2);
}

.modal-body {
    padding: 2rem;
    overflow-y: auto;
    max-height: calc(90vh - 200px);
}

.modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* ===== FORMS ===== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--primary);
}

.form-label .required {
    color: var(--status-incomplete);
}

.form-input,
.form-select {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1px solid var(--primary);
    border-radius: 2px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--primary);
    transition: var(--transition);
    background: var(--bg-subtle);
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--secondary);
    background: white;
    box-shadow: 0 0 0 3px rgba(90, 177, 223, 0.25);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-select {
    cursor: pointer;
}

/* ===== STEPPER ===== */
.stepper {
    display: flex;
    margin-bottom: 2rem;
    position: relative;
}

.stepper::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 40px;
    right: 40px;
    height: 2px;
    background: var(--border);
}

.step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--border);
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-bottom: 0.5rem;
    transition: var(--transition);
}

.step.active .step-number {
    background: var(--secondary);
    color: white;
}

.step.completed .step-number {
    background: var(--status-ok);
    color: white;
}

.step-label {
    font-size: 0.85rem;
    color: var(--text-light);
    text-align: center;
}

.step.active .step-label {
    color: var(--primary);
    font-weight: 600;
}

/* ===== DOCUMENT UPLOAD ===== */
.docs-list {
    display: grid;
    gap: 1rem;
}

.doc-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg);
    border-radius: var(--radius-sm);
    border: 2px dashed var(--border);
    transition: var(--transition);
}

.doc-item.uploaded {
    border-style: solid;
    border-color: var(--status-ok);
    background: var(--status-ok-bg);
}

.doc-item.required {
    border-color: var(--status-pending);
}

.doc-item:hover {
    border-color: var(--primary);
}

.doc-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.doc-item.uploaded .doc-icon {
    background: var(--status-ok);
    color: white;
}

.doc-info {
    flex: 1;
}

.doc-info h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.doc-info span {
    font-size: 0.8rem;
    color: var(--text-light);
}

.doc-info .optional {
    color: var(--text-muted);
    font-style: italic;
}

.doc-actions {
    display: flex;
    gap: 0.5rem;
}

.doc-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

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

.doc-btn-upload:hover {
    background: var(--primary-light);
}

.doc-btn-view {
    background: var(--border);
    color: var(--text);
}

.doc-btn-view:hover {
    background: #dfe3e8;
}

/* ===== LOADING ===== */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== TOAST ===== */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideIn 0.3s ease;
    min-width: 300px;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast-success {
    background: var(--status-ok);
    color: white;
}

.toast-error {
    background: var(--status-incomplete);
    color: white;
}

.toast-info {
    background: var(--status-ants);
    color: white;
}

.toast-warning {
    background: #f59e0b;
    color: white;
}

/* ===== PASTILLE SOLDE (toutes les pages partenaire) ===== */
.solde-chip { display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .5rem .45rem .85rem; border: 2px solid var(--status-ok); background: var(--status-ok-bg); color: #065f46; border-radius: 50px; font-family: var(--font-body); font-size: .85rem; cursor: pointer; white-space: nowrap; transition: var(--transition); }
.solde-chip strong { font-family: 'JetBrains Mono', monospace; font-size: .95rem; }
.solde-chip .solde-chip-cta { background: var(--primary); color: #fff; border-radius: 50px; padding: .2rem .6rem; font-size: .75rem; font-weight: 600; }
.solde-chip:hover { box-shadow: 0 4px 12px rgba(13, 44, 98, .15); transform: translateY(-1px); }
.solde-chip.bas { border-color: #f59e0b; background: #fef3c7; color: #92400e; }
.solde-chip.negatif { border-color: #dc2626; background: #fee2e2; color: #991b1b; }
.solde-chip.negatif .solde-chip-cta { background: #dc2626; }

/* ===== ENCART SOLDE (tableau de bord partenaire) ===== */
.compte-strip { background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: .55rem 1rem; margin-bottom: 1rem; box-shadow: var(--shadow); }
.compte-grid { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1.75rem; }
.compte-item { display: flex; align-items: baseline; gap: .45rem; }
.compte-label { font-size: .7rem; color: var(--text-light); text-transform: uppercase; letter-spacing: .5px; }
.compte-val { font-size: .95rem; font-family: 'JetBrains Mono', monospace; }
.compte-actions { display: flex; gap: .4rem; margin-left: auto; }
.btn.btn-sm { padding: .35rem .7rem; font-size: .75rem; white-space: nowrap; }

/* ===== ESPACE CLIENT (lien à distance) ===== */
.remote-box { display: flex; justify-content: space-between; align-items: center; gap: .75rem 1rem; flex-wrap: wrap; background: #f0f9ff; border: 1px solid var(--secondary-line); border-radius: var(--radius); padding: .8rem 1rem; margin-bottom: 1rem; font-size: .9rem; }
.remote-box > div:first-child { flex: 1 1 280px; }
.remote-actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.remote-etat { margin-top: .4rem; font-size: .82rem; font-weight: 600; color: #065f46; }
.client-badge { background: #e0f2fe; color: #075985; padding: .15rem .45rem; border-radius: 50px; font-size: .7rem; font-weight: 700; white-space: nowrap; }
.dossier-actions-bar { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: 1rem; padding-top: .9rem; border-top: 1px solid var(--border); }

/* ===== MESSAGERIE DOSSIER ===== */
.msg-section { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; margin-bottom: 1.5rem; }
.msg-section h4 { margin: 0 0 .6rem; color: var(--primary); font-size: .95rem; }
.msg-thread { max-height: 260px; overflow-y: auto; display: flex; flex-direction: column; gap: .5rem; padding: .25rem 0 .75rem; }
.msg { max-width: 85%; padding: .55rem .8rem; border-radius: 10px; font-size: .88rem; }
.msg.eux { align-self: flex-start; background: var(--primary-soft); border-bottom-left-radius: 2px; }
.msg.moi { align-self: flex-end; background: #fef3c7; border-bottom-right-radius: 2px; }
.msg-meta { font-size: .7rem; color: var(--text-light); margin-bottom: .15rem; }
.msg-txt { white-space: pre-wrap; word-break: break-word; }
.msg-empty { font-size: .85rem; color: var(--text-light); }
.msg-form { display: flex; gap: .5rem; align-items: flex-end; }
.msg-form textarea { flex: 1; resize: vertical; min-height: 2.6rem; }
.msg-badge { background: #c2560c; color: #fff; padding: .15rem .45rem; border-radius: 50px; font-size: .7rem; font-weight: 700; white-space: nowrap; }

/* ===== LISTES ADMIN : numéros lisibles ===== */
.numero-cell { white-space: nowrap; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    /* En-tête compact et non collant : l'écran sert au contenu */
    .header {
        padding: 0.5rem 0.75rem;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
        position: static;
    }
    .logo-img { height: 38px !important; }
    .logo-text { padding-left: .6rem; }
    .logo-text h1 { font-size: .9rem; }
    .header-actions { width: 100%; justify-content: space-between; gap: .4rem; flex-wrap: nowrap; }
    .header-actions .btn { padding: .5rem .7rem; font-size: .72rem; margin-right: 0 !important; }
    .hide-mobile { display: none !important; }
    /* Solde toujours visible : barre fixe en bas de l'écran */
    .solde-chip { position: fixed; left: .5rem; right: .5rem; bottom: .5rem; z-index: 900; justify-content: space-between; padding: .6rem .6rem .6rem 1rem; font-size: .9rem; box-shadow: 0 6px 20px rgba(13, 44, 98, .25); }
    .solde-chip .solde-chip-cta { padding: .35rem .8rem; font-size: .8rem; }
    body.has-solde-chip { padding-bottom: 4.25rem; }
    body.has-solde-chip .toast-container { bottom: 4.5rem; }
    .modal-overlay.active ~ .solde-chip, body:has(.modal-overlay.active) .solde-chip { display: none !important; }
    .dashboard-title { font-size: 1.3rem; }
    /* Bandeau solde : montants sur une ligne, boutons côte à côte */
    .compte-strip { padding: .5rem .75rem; }
    .compte-grid { gap: .3rem 1rem; }
    .compte-val { font-size: .85rem; }
    .compte-actions { margin-left: 0; width: 100%; }
    .compte-actions .btn { flex: 1; justify-content: center; white-space: normal; text-align: center; line-height: 1.25; }
    /* Compteurs : 4 petites tuiles sur une ligne */
    .stats-row { grid-template-columns: repeat(4, 1fr); gap: .4rem; margin-bottom: 1rem; }
    .stat-card { padding: .6rem .3rem; flex-direction: column; gap: .2rem; text-align: center; }
    .stat-card .stat-icon { display: none; }
    .stat-card h3 { font-size: 1.2rem; }
    .stat-card span { font-size: .65rem; line-height: 1.1; display: block; }
    /* Fenêtres plein écran */
    .modal-overlay { align-items: stretch; }
    .modal { width: 100% !important; max-width: 100% !important; max-height: 100vh; height: 100%; margin: 0 !important; border-radius: 0; display: flex; flex-direction: column; }
    .modal-body { max-height: none; flex: 1; padding: 1rem; }
    .modal-header { padding: .9rem 1rem; }
    .modal-footer { padding: .75rem 1rem; flex-wrap: wrap; }
    .modal-footer .btn { flex: 1; justify-content: center; }
    .topbar {
        padding: 0.5rem 1rem;
        font-size: 0.72rem;
    }
    .topbar-legal { display: none; }
    .logo-img { height: 46px; }
    .header-actions { flex-wrap: wrap; justify-content: center; }
    
    .main {
        padding: 1rem;
    }
    
    .dashboard-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .dossier-row {
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 0.75rem;
    }
    
    .row-numero { min-width: auto; }
    .row-client { min-width: auto; flex: none; width: 100%; order: -1; font-weight: 600; }
    .row-demarche { min-width: auto; font-size: 0.75rem; }
    
    
    .stepper {
        overflow-x: auto;
    }
    
    .step-label {
        font-size: 0.75rem;
    }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
}
