/* ============================================================
   ARS — Système de design
   Inspiré des interfaces Apple : typographie système, surfaces claires,
   verre dépoli, coins arrondis, couleurs sobres et une seule couleur d'action.
   Toutes les couleurs passent par les variables ci-dessous.
   ============================================================ */

:root {
    /* Surfaces */
    --bg: #f5f5f7;
    --surface: #ffffff;
    --surface-glass: rgba(255, 255, 255, 0.72);
    --fill: #f5f5f7;
    --fill-strong: #e8e8ed;
    --separator: #d2d2d7;
    --separator-soft: #e8e8ed;

    /* Texte */
    --text: #1d1d1f;
    --text-secondary: #6e6e73;
    --text-tertiary: #86868b;

    /* Couleur d'action unique + couleurs sémantiques */
    --accent: #0071e3;
    --accent-hover: #0077ed;
    --accent-pressed: #006edb;
    --accent-soft: #e8f2fc;
    --accent-text: #0066cc;
    --success: #34c759;
    --success-text: #1d7d3a;
    --success-soft: #e9f8ee;
    --warning: #ff9f0a;
    --warning-text: #a85d00;
    --warning-soft: #fff4e5;
    --danger: #ff3b30;
    --danger-text: #c9251c;
    --danger-soft: #ffeceb;
    --purple: #af52de;
    --purple-soft: #f6ecfb;

    /* Nuances d'interaction (survol, lignes de tableau, barres translucides) */
    --hover: rgba(0, 0, 0, 0.045);
    --fill-hover: #dcdce1;
    --row-hover: #fafafc;
    --row-alt: #fbfbfd;
    --input-border-hover: #b8b8bf;
    --glass-strong: rgba(255, 255, 255, 0.92);
    --topbar-glass: rgba(245, 245, 247, 0.8);
    --scrollbar: rgba(0, 0, 0, 0.12);
    --selection: rgba(0, 113, 227, 0.18);
    --success-hover: #2fb350;
    --warning-hover: #f29400;
    --danger-hover: #ec3329;
    --tuile-logo: transparent;
    --onglet-hover: rgba(255, 255, 255, 0.6);
    --jaune-text: #8a6d00;
    --jaune-soft: #fff8d6;
    color-scheme: light;

    /* Forme et profondeur */
    --radius-sm: 10px;
    --radius: 14px;
    --radius-lg: 20px;
    --radius-pill: 980px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.06), 0 2px 6px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.12);
    --focus-ring: 0 0 0 4px rgba(0, 113, 227, 0.22);
    --ease: cubic-bezier(0.25, 0.1, 0.25, 1);

    --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --sidebar-width: 340px;

    /* Alias des anciens noms (écrans existants) */
    --primary: var(--text);
    --primary-light: #3a3a3c;
    --info: var(--accent);
    --border: var(--separator-soft);
    --text-light: var(--text-secondary);
    --text-muted: var(--text-tertiary);
}

/* ---------- Mode sombre (choix de l'utilisateur, ou réglage de l'appareil en mode automatique) ----------
   Écran seulement : l'impression reste toujours claire. La page de connexion n'a pas de data-theme. */
@media screen {
    :root[data-theme="dark"] {
        --bg: #111214;
        --surface: #1c1c1e;
        --surface-glass: rgba(28, 28, 30, 0.78);
        --fill: #2c2c2e;
        --fill-strong: #3a3a3c;
        --separator: #48484a;
        --separator-soft: #2e2e31;
        --text: #f5f5f7;
        --text-secondary: #a1a1a6;
        --text-tertiary: #8e8e93;
        --accent: #0a84ff;
        --accent-hover: #409cff;
        --accent-pressed: #0071e3;
        --accent-soft: rgba(10, 132, 255, 0.18);
        --accent-text: #6cb2ff;
        --success: #30d158;
        --success-text: #5fdc7f;
        --success-soft: rgba(48, 209, 88, 0.16);
        --warning: #ff9f0a;
        --warning-text: #ffb84d;
        --warning-soft: rgba(255, 159, 10, 0.16);
        --danger: #ff453a;
        --danger-text: #ff7a71;
        --danger-soft: rgba(255, 69, 58, 0.17);
        --purple: #bf5af2;
        --purple-soft: rgba(191, 90, 242, 0.18);
        --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
        --shadow: 0 2px 8px rgba(0, 0, 0, 0.35), 0 1px 2px rgba(0, 0, 0, 0.3);
        --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45), 0 2px 6px rgba(0, 0, 0, 0.3);
        --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.6);
        --focus-ring: 0 0 0 4px rgba(10, 132, 255, 0.35);
        --primary-light: #d1d1d6;
        --hover: rgba(255, 255, 255, 0.06);
        --fill-hover: #48484a;
        --row-hover: rgba(255, 255, 255, 0.035);
        --row-alt: rgba(255, 255, 255, 0.02);
        --input-border-hover: #636366;
        --glass-strong: rgba(28, 28, 30, 0.94);
        --topbar-glass: rgba(17, 18, 20, 0.8);
        --scrollbar: rgba(255, 255, 255, 0.18);
        --selection: rgba(10, 132, 255, 0.35);
        --success-hover: #28b84c;
        --warning-hover: #e08c00;
        --danger-hover: #e63b31;
        --tuile-logo: #ffffff;
        --onglet-hover: rgba(255, 255, 255, 0.08);
        --jaune-text: #e6c34d;
        --jaune-soft: rgba(230, 195, 77, 0.16);
        color-scheme: dark;
    }
}

/* Mode automatique : même palette, quand l'appareil est lui-même en mode sombre (copie du bloc ci-dessus). */
@media screen and (prefers-color-scheme: dark) {
    :root[data-theme="auto"] {
        --bg: #111214;
        --surface: #1c1c1e;
        --surface-glass: rgba(28, 28, 30, 0.78);
        --fill: #2c2c2e;
        --fill-strong: #3a3a3c;
        --separator: #48484a;
        --separator-soft: #2e2e31;
        --text: #f5f5f7;
        --text-secondary: #a1a1a6;
        --text-tertiary: #8e8e93;
        --accent: #0a84ff;
        --accent-hover: #409cff;
        --accent-pressed: #0071e3;
        --accent-soft: rgba(10, 132, 255, 0.18);
        --accent-text: #6cb2ff;
        --success: #30d158;
        --success-text: #5fdc7f;
        --success-soft: rgba(48, 209, 88, 0.16);
        --warning: #ff9f0a;
        --warning-text: #ffb84d;
        --warning-soft: rgba(255, 159, 10, 0.16);
        --danger: #ff453a;
        --danger-text: #ff7a71;
        --danger-soft: rgba(255, 69, 58, 0.17);
        --purple: #bf5af2;
        --purple-soft: rgba(191, 90, 242, 0.18);
        --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
        --shadow: 0 2px 8px rgba(0, 0, 0, 0.35), 0 1px 2px rgba(0, 0, 0, 0.3);
        --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45), 0 2px 6px rgba(0, 0, 0, 0.3);
        --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.6);
        --focus-ring: 0 0 0 4px rgba(10, 132, 255, 0.35);
        --primary-light: #d1d1d6;
        --hover: rgba(255, 255, 255, 0.06);
        --fill-hover: #48484a;
        --row-hover: rgba(255, 255, 255, 0.035);
        --row-alt: rgba(255, 255, 255, 0.02);
        --input-border-hover: #636366;
        --glass-strong: rgba(28, 28, 30, 0.94);
        --topbar-glass: rgba(17, 18, 20, 0.8);
        --scrollbar: rgba(255, 255, 255, 0.18);
        --selection: rgba(10, 132, 255, 0.35);
        --success-hover: #28b84c;
        --warning-hover: #e08c00;
        --danger-hover: #e63b31;
        --tuile-logo: #ffffff;
        --onglet-hover: rgba(255, 255, 255, 0.08);
        --jaune-text: #e6c34d;
        --jaune-soft: rgba(230, 195, 77, 0.16);
        color-scheme: dark;
    }
}

/* ---------- Base ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.47;
    letter-spacing: -0.01em;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
button { font-family: inherit; }
img { max-width: 100%; }
/* L'attribut hidden l'emporte sur les display des composants (grilles de formulaires…) */
[hidden] { display: none !important; }
:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: 8px; }
::selection { background: var(--selection); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- Mise en page ---------- */
.layout { display: flex; min-height: 100vh; }

.sidebar {
    position: fixed; inset: 0 auto 0 0; width: var(--sidebar-width);
    display: flex; flex-direction: column; z-index: 40;
    background: var(--surface-glass);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-right: 1px solid var(--separator-soft);
}
.sidebar-header { padding: 22px 20px 14px; }
.brand { display: block; }
.brand:hover { text-decoration: none; }
.brand-logo { background: var(--tuile-logo); border-radius: 12px; padding: 4px 6px; width: 100%; }
.brand-logo img { display: block; width: 100%; height: auto; max-height: 64px; object-fit: contain; }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 6px 14px 18px; scrollbar-width: thin; }
.sidebar-nav::-webkit-scrollbar { width: 6px; }
#recherche-globale { font-size: 15px; padding: 10px 12px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: var(--scrollbar); border-radius: 3px; }
.nav-section {
    margin: 20px 12px 8px; font-size: 12.5px; font-weight: 600; letter-spacing: 0.02em;
    color: var(--text-tertiary);
}
.nav-link {
    display: flex; align-items: center; gap: 13px;
    padding: 10px 12px; margin: 2px 0; border-radius: 10px;
    color: var(--text); font-size: 15.5px; font-weight: 450;
    transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.nav-link:hover { background: var(--hover); text-decoration: none; }
.nav-link.active { background: var(--accent); color: #fff; }
.nav-link.active svg { color: #fff; }
.nav-link:not(:has(svg)) { padding-left: 45px; }
.nav-link svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--accent); stroke-width: 1.8; }

.sidebar-footer { padding: 14px 16px 18px; border-top: 1px solid var(--separator-soft); }
.user-mini { display: flex; align-items: center; gap: 10px; }
.user-avatar {
    width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
    display: grid; place-items: center; font-weight: 600; font-size: 16px; color: #fff;
    background: linear-gradient(135deg, #5ac8fa, var(--accent));
}
.user-details { min-width: 0; }
.user-name { font-size: 14.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-role { font-size: 12.5px; color: var(--text-secondary); }
.btn-logout {
    width: 100%; padding: 10px; border: 0; border-radius: var(--radius-pill); cursor: pointer;
    background: var(--fill-strong); color: var(--text); font-size: 14.5px; font-weight: 500;
    transition: background 0.15s var(--ease);
}
.btn-logout:hover { background: var(--fill-hover); }

/* Choix du thème, fixé en haut à droite : Clair / Sombre / Auto */
.theme-choix {
    position: fixed; top: 22px; right: 28px; z-index: 50; display: flex; gap: 2px; padding: 3px;
    border-radius: var(--radius-pill); background: var(--surface-glass); border: 1px solid var(--separator-soft);
    box-shadow: var(--shadow); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
}
.theme-choix button {
    display: grid; place-items: center; width: 32px; height: 32px; padding: 0;
    border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--text-secondary);
    cursor: pointer; transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.theme-choix button svg { width: 16px; height: 16px; }
.theme-choix button:hover { color: var(--text); background: var(--hover); }
.theme-choix button[aria-pressed="true"] { background: var(--accent); color: #fff; }
.theme-choix button:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media print { .theme-choix { display: none; } }

.main { flex: 1; min-width: 0; margin-left: var(--sidebar-width); }

.topbar {
    position: sticky; top: 0; z-index: 30;
    display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
    padding: 22px 160px 18px 40px; min-height: 76px;
    background: var(--topbar-glass);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid transparent;
}
.topbar-title {
    font-family: var(--font-display); font-size: 28px; font-weight: 700;
    letter-spacing: -0.025em; line-height: 1.15; color: var(--text);
}
.topbar-sub { margin-top: 3px; font-size: 14px; color: var(--text-secondary); }
.topbar-actions { margin-left: auto; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.content { padding: 8px 40px 56px; max-width: 1440px; }
/* Écrans sans barre de titre : le premier titre fait office de titre de page */
.content > h1, .main > .content > h1 {
    font-family: var(--font-display); font-size: 32px; font-weight: 700;
    letter-spacing: -0.03em; line-height: 1.12; margin: 26px 0 6px; color: var(--text);
}
.content > h2 { font-size: 21px; font-weight: 600; letter-spacing: -0.02em; margin: 28px 0 12px; }
.content > .sub, .sub { color: var(--text-secondary); font-size: 15px; margin-bottom: 26px; }
.section-title { font-size: 21px; font-weight: 600; letter-spacing: -0.02em; margin: 34px 0 14px; color: var(--text); }

/* ---------- Indicateurs ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin-bottom: 26px; }
.stat-card {
    position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 22px 22px 20px; background: var(--surface); border-radius: var(--radius-lg);
    box-shadow: var(--shadow); transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-label { font-size: 13px; font-weight: 500; color: var(--text-secondary); }
.stat-value {
    font-family: var(--font-display); font-size: 34px; font-weight: 700; letter-spacing: -0.03em;
    line-height: 1.1; margin-top: 6px; color: var(--text); font-variant-numeric: tabular-nums;
}
.stat-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; flex-shrink: 0; }
.stat-icon svg { width: 22px; height: 22px; }
.stat-blue .stat-icon { background: var(--accent-soft); color: var(--accent); }
.stat-green .stat-icon { background: var(--success-soft); color: var(--success-text); }
.stat-orange .stat-icon { background: var(--warning-soft); color: var(--warning-text); }
.stat-red .stat-icon { background: var(--danger-soft); color: var(--danger-text); }
.stat-purple .stat-icon { background: var(--purple-soft); color: var(--purple); }

/* ---------- Cartes de navigation ---------- */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-bottom: 28px; }
.card {
    display: flex; align-items: flex-start; gap: 16px; padding: 22px; border: 0;
    background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow);
    color: var(--text); transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
a.card:hover, .card:hover { transform: translateY(-3px) scale(1.005); box-shadow: var(--shadow-md); text-decoration: none; }
.card-icon {
    width: 46px; height: 46px; border-radius: 14px; flex-shrink: 0; display: grid; place-items: center;
    background: var(--accent-soft); color: var(--accent); font-size: 22px;
}
.card-icon svg { width: 22px; height: 22px; }
.card-content { min-width: 0; }
.card-title { font-size: 16px; font-weight: 600; letter-spacing: -0.015em; color: var(--text); }
.card-desc { margin-top: 3px; font-size: 13px; color: var(--text-secondary); line-height: 1.45; }
.card-link { color: var(--accent-text); font-weight: 500; }

/* ---------- Panneaux ---------- */
.panel {
    background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow);
    margin-bottom: 22px; overflow: hidden;
}
.panel-header {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    padding: 18px 24px; border-bottom: 1px solid var(--separator-soft);
}
.panel-title { font-size: 17px; font-weight: 600; letter-spacing: -0.015em; color: var(--text); }
.panel-link { font-size: 13px; font-weight: 500; color: var(--accent-text); }
.panel > p, .panel > .panel-body { padding: 18px 24px; }

/* ---------- Tableaux ---------- */
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
thead th {
    text-align: left; padding: 12px 18px; white-space: nowrap;
    font-size: 12px; font-weight: 600; color: var(--text-secondary); text-transform: none; letter-spacing: normal;
    background: var(--surface); border-bottom: 1px solid var(--separator-soft);
}
tbody td { padding: 13px 18px; border-bottom: 1px solid var(--separator-soft); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background 0.12s var(--ease); }
tbody tr:hover { background: var(--row-hover); }
.table-striped tbody tr:nth-child(even) { background: var(--row-alt); }
td.num, th.num, .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- Pastilles d'état ---------- */
.badge, .pill {
    display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px;
    border-radius: var(--radius-pill); font-size: 12px; font-weight: 500; line-height: 1.5;
    background: var(--fill-strong); color: var(--text-secondary); white-space: nowrap;
}
.badge-success, .pill-ok { background: var(--success-soft); color: var(--success-text); }
.badge-warning, .pill-wait { background: var(--warning-soft); color: var(--warning-text); }
.badge-danger, .pill-late { background: var(--danger-soft); color: var(--danger-text); }
.badge-info { background: var(--accent-soft); color: var(--accent-text); }
.badge-neutral, .pill-off { background: var(--fill-strong); color: var(--text-secondary); }
.badge-purple { background: var(--purple-soft); color: var(--purple); }

/* ---------- Boutons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 9px 18px; min-height: 36px; border: 0; border-radius: var(--radius-pill);
    font-size: 14px; font-weight: 500; letter-spacing: -0.01em; line-height: 1.2;
    cursor: pointer; text-decoration: none; white-space: nowrap;
    transition: background 0.18s var(--ease), color 0.18s var(--ease), transform 0.1s var(--ease), box-shadow 0.18s var(--ease);
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(0.97); }
.btn:disabled, .btn[disabled] { opacity: 0.4; cursor: not-allowed; transform: none; }
.btn-primary, .btn-accent { background: var(--accent); color: #fff; }
.btn-primary:hover, .btn-accent:hover { background: var(--accent-hover); color: #fff; }
.btn-ghost { background: var(--fill-strong); color: var(--text); }
.btn-ghost:hover { background: var(--fill-hover); color: var(--text); }
.btn-success, .btn-green, .btn-approve { background: var(--success); color: #fff; }
.btn-success:hover, .btn-green:hover, .btn-approve:hover { background: var(--success-hover); color: #fff; }
.btn-warning, .btn-orange, .btn-renvoyer { background: var(--warning); color: #fff; }
.btn-warning:hover, .btn-orange:hover, .btn-renvoyer:hover { background: var(--warning-hover); color: #fff; }
.btn-danger, .btn-red, .btn-refuse { background: var(--danger); color: #fff; }
.btn-danger:hover, .btn-red:hover, .btn-refuse:hover { background: var(--danger-hover); color: #fff; }
.btn-sm { padding: 6px 13px; min-height: 30px; font-size: 13px; }

/* ---------- Messages ---------- */
.alert, .alert-success, .alert-error, .alert-danger, .alert-warning, .alert-info {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 13px 18px; margin-bottom: 18px; border-radius: var(--radius);
    font-size: 14px; line-height: 1.45; border: 0;
}
.alert-success { background: var(--success-soft); color: var(--success-text); }
.alert-warning { background: var(--warning-soft); color: var(--warning-text); }
.alert-danger, .alert-error { background: var(--danger-soft); color: var(--danger-text); }
.alert-info { background: var(--accent-soft); color: var(--accent-text); }

/* ---------- Formulaires ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 24px; padding: 26px; }
.form-group { display: flex; flex-direction: column; gap: 7px; }
.form-group.full, .form-group.full-width { grid-column: 1 / -1; }
label { font-size: 13px; font-weight: 500; color: var(--text); text-transform: none; letter-spacing: normal; }
label .req, .req { color: var(--danger); }
input, select, textarea {
    width: 100%; padding: 10px 14px; min-height: 40px;
    font-family: inherit; font-size: 14px; color: var(--text);
    background: var(--surface); border: 1px solid var(--separator); border-radius: var(--radius-sm);
    transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
    -webkit-appearance: none; appearance: none;
}
select {
    padding-right: 36px; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2386868b' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 14px center;
}
input[type="checkbox"], input[type="radio"] {
    width: 18px; height: 18px; min-height: 0; padding: 0; accent-color: var(--accent);
    -webkit-appearance: auto; appearance: auto; vertical-align: middle;
}
input[type="file"] { padding: 7px 10px; cursor: pointer; }
input[type="file"]::file-selector-button {
    margin-right: 10px; padding: 5px 12px; border: 0; border-radius: var(--radius-pill);
    background: var(--fill-strong); color: var(--text); font: inherit; font-size: 13px; cursor: pointer;
}
input::placeholder, textarea::placeholder { color: var(--text-tertiary); }
input:hover, select:hover, textarea:hover { border-color: var(--input-border-hover); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus-ring); }
input[readonly], input:disabled, select:disabled, textarea:disabled { background: var(--fill); color: var(--text-secondary); }
textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.form-actions {
    grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 10px;
    padding-top: 20px; border-top: 1px solid var(--separator-soft);
}

/* Barre de filtres */
.filtres-bar {
    display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px;
    padding: 18px 22px; margin-bottom: 20px; background: var(--surface);
    border-radius: var(--radius-lg); box-shadow: var(--shadow);
}
.filtres-search { position: relative; flex: 1 1 260px; }
.filtres-search input { padding-left: 38px; border-radius: var(--radius-pill); background: var(--fill); border-color: transparent; }
.filtres-search input:focus { background: var(--surface); }
.filtres-search::before {
    content: ""; position: absolute; left: 14px; top: 50%; width: 15px; height: 15px; transform: translateY(-50%);
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2386868b' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") no-repeat center / contain;
}
.filtres-group { display: flex; flex-direction: column; gap: 6px; min-width: 160px; }
.filtres-group label { font-size: 12px; color: var(--text-secondary); }
.filtres-actions { display: flex; gap: 8px; }
.btn-filtrer, .btn-reset {
    display: inline-flex; align-items: center; padding: 9px 18px; min-height: 40px; border: 0;
    border-radius: var(--radius-pill); font-size: 14px; font-weight: 500; cursor: pointer;
}
.btn-filtrer { background: var(--accent); color: #fff; }
.btn-filtrer:hover { background: var(--accent-hover); }
.btn-reset { background: var(--fill-strong); color: var(--text); }
.btn-reset:hover { background: var(--fill-hover); text-decoration: none; }

/* ---------- Grilles utilitaires ---------- */
.grid { display: grid; gap: 16px; }
.grid-2, .grid-3, .grid-4, .grid-5 { display: grid; gap: 16px 20px; padding: 22px 24px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grid-2 > div, .grid-3 > div, .grid-4 > div, .grid-5 > div, .grid-2 > form, .grid-3 > form { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.full-width { grid-column: 1 / -1; }
.grid-4 > div > strong, .grid-3 > div > strong { font-size: 12px; font-weight: 500; color: var(--text-secondary); }

/* Lignes d'information (fiches) */
.info-row { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--separator-soft); }
.info-row:last-child { border-bottom: 0; }
.info-label { color: var(--text-secondary); font-size: 13px; }

/* ---------- Notifications ---------- */
.notif-bell-wrapper { position: relative; }
.notif-bell-btn {
    position: relative; width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer;
    display: grid; place-items: center; background: var(--surface); color: var(--text); box-shadow: var(--shadow);
    transition: background 0.15s var(--ease);
}
.notif-bell-btn:hover { background: var(--fill-strong); }
.notif-bell-btn svg { width: 18px; height: 18px; }
.notif-badge {
    position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; padding: 0 5px;
    display: none; align-items: center; justify-content: center;
    border-radius: 9px; background: var(--danger); color: #fff; font-size: 10.5px; font-weight: 600;
    box-shadow: 0 0 0 2px var(--bg);
}
.notif-dropdown {
    position: absolute; right: 0; top: calc(100% + 10px); width: 380px; max-height: 480px;
    display: none; flex-direction: column; overflow: hidden; z-index: 60;
    background: var(--glass-strong); border-radius: var(--radius-lg);
    backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
    box-shadow: var(--shadow-lg); border: 1px solid var(--separator-soft);
}
.notif-dropdown.open { display: flex; animation: apparition 0.18s var(--ease); }
@keyframes apparition { from { opacity: 0; transform: translateY(-4px) scale(0.98); } to { opacity: 1; transform: none; } }
.notif-dropdown-header { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; font-weight: 600; border-bottom: 1px solid var(--separator-soft); }
.notif-dropdown-header .link-tout-lire { font-size: 12.5px; font-weight: 500; color: var(--accent-text); background: none; border: 0; padding: 0; cursor: pointer; font-family: inherit; }
.notif-dropdown-list { overflow-y: auto; flex: 1; }
.notif-item { display: block; padding: 12px 18px; border-bottom: 1px solid var(--separator-soft); color: var(--text); }
.notif-item:hover { background: var(--hover); text-decoration: none; }
.notif-item.unread { background: var(--accent-soft); }
.notif-item-title { font-size: 13.5px; font-weight: 600; }
.notif-item-meta { margin-top: 2px; font-size: 12px; color: var(--text-secondary); }
.notif-empty { padding: 32px; text-align: center; color: var(--text-tertiary); font-size: 13px; }
.notif-dropdown-footer { padding: 12px 18px; text-align: center; font-size: 13px; }

/* ---------- En-tête de document imprimable (BR, BC, RE, OD) ---------- */
.doc-entete { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 12px; margin-bottom: 16px; border-bottom: 2px solid #000; }
.doc-entete img { height: 56px; }
.doc-entete .doc-titre { text-align: right; }
.doc-entete .doc-titre h1 { font-size: 18px; letter-spacing: 0.02em; }
.doc-entete .doc-titre .doc-numero { font-size: 13px; color: #333; }

/* ---------- Vides et chargements ---------- */
.empty, .visa-vide { padding: 40px 24px; text-align: center; color: var(--text-tertiary); }

/* ---------- Adaptatif ---------- */
@media (max-width: 1100px) {
    .grid-4, .grid-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Barre du haut et tiroir de menu : téléphones et tablettes seulement */
.barre-mobile, .menu-voile { display: none; }
.table-defile { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-defile > table { min-width: 100%; }

@media (max-width: 1100px) and (min-width: 901px) {
    .content { padding: 8px 28px 48px; }
    .topbar { padding-left: 28px; }
}
@media (max-width: 900px) {
    .barre-mobile {
        display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 45;
        height: 60px; padding: 0 140px 0 10px;
        background: var(--topbar-glass); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
        border-bottom: 1px solid var(--separator-soft);
    }
    .menu-bouton {
        display: grid; place-items: center; width: 44px; height: 44px; flex: none; padding: 0; border: 0; border-radius: 12px;
        background: transparent; color: var(--text); cursor: pointer;
    }
    .menu-bouton:hover, .menu-bouton[aria-expanded="true"] { background: var(--hover); }
    .menu-bouton svg { width: 24px; height: 24px; }
    .barre-mobile-logo { display: block; min-width: 0; background: var(--tuile-logo); border-radius: 10px; padding: 3px 6px; }
    .barre-mobile-logo img { display: block; height: 34px; width: auto; max-width: 150px; object-fit: contain; }

    .sidebar {
        width: min(340px, 90vw); z-index: 60; box-shadow: var(--shadow-lg);
        background: var(--surface); transform: translateX(-105%); transition: transform 0.25s var(--ease);
    }
    .menu-ouvert .sidebar { transform: none; }
    .menu-voile { position: fixed; inset: 0; z-index: 55; background: rgba(0, 0, 0, 0.38); }
    .menu-ouvert .menu-voile { display: block; }
    .menu-ouvert { overflow: hidden; }

    .layout { display: block; }
    .main { margin-left: 0; }
    .topbar { position: static; padding: 16px; min-height: 0; gap: 10px; }
    .topbar-title { font-size: 22px; }
    .topbar-actions { margin-left: 0; width: 100%; }
    .theme-choix { position: fixed; top: 9px; right: 10px; padding: 2px; }
    .theme-choix button { width: 38px; height: 38px; }
    .content { padding: 8px 16px 40px; }
    .form-grid, .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: 1fr; }
    .panel { border-radius: var(--radius); }
}
/* Lignes de saisie (montants, tronçons) : sur téléphone, chaque champ reprend son intitulé de colonne */
@media (max-width: 760px) {
    td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 4px; font-size: 12px; font-weight: 600; color: var(--text-secondary); }
}
@media (max-width: 600px) {
    /* Grilles écrites dans les pages : une colonne sur téléphone */
    .content [style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
    .content .row, .content .form-grid, .content .roles-grid, .content .cards, .content .info-row,
    .content .fiche-identite, .content .natures { grid-template-columns: 1fr !important; }
    .content .info-row { gap: 2px; }
    .content [style*="min-width"] { min-width: 0 !important; }
    /* Champs à 16 px : le téléphone ne zoome pas à la saisie */
    input, select, textarea { font-size: 16px; }
    .content img { max-width: 100%; height: auto; }
    .topbar > div[style*="margin-left"], .topbar > a[style*="margin-left"] { margin-left: 0 !important; }
    .btn { min-height: 40px; }
}

/* Fil d'Ariane des écrans secondaires (« ‹ Finance ») */
.fil { display: flex; gap: 18px; flex-wrap: wrap; margin: 22px 0 -10px; font-size: 14px; }
.fil a { color: var(--accent-text); font-weight: 400; }
.fil a::before { content: "‹ "; font-size: 17px; line-height: 1; }

/* ---------- Pages d'accès (connexion, mot de passe, erreur) ---------- */
.acces {
    min-height: 100vh; display: grid; place-items: center; padding: 24px;
    background:
        radial-gradient(1100px 600px at 15% -10%, rgba(0, 113, 227, 0.10), transparent 60%),
        radial-gradient(900px 520px at 100% 110%, rgba(52, 199, 89, 0.08), transparent 60%),
        var(--bg);
}
.acces-carte {
    width: 100%; max-width: 420px; padding: 44px 40px 36px; text-align: center;
    background: var(--surface-glass); border-radius: 28px; box-shadow: var(--shadow-lg);
    backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.6);
}
.acces-logo { width: 190px; max-width: 70%; height: auto; margin: 0 auto 22px; display: block; }
.acces-titre { font-family: var(--font-display); font-size: 30px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.acces-sous-titre { margin: 8px 0 26px; color: var(--text-secondary); font-size: 15px; line-height: 1.45; }
.acces form { display: grid; gap: 14px; text-align: left; }
.acces .champ { display: grid; gap: 6px; }
.acces input { min-height: 46px; padding: 12px 16px; font-size: 15px; border-radius: 12px; }
.acces .btn { width: 100%; min-height: 46px; font-size: 15px; margin-top: 6px; }
.acces .alert, .acces .alert-error, .acces .alert-success, .acces .alert-warning { text-align: left; }
.acces-pied { margin-top: 22px; font-size: 12px; color: var(--text-tertiary); }
.acces-icone { width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 20px; display: grid; place-items: center; background: var(--danger-soft); color: var(--danger-text); }
.acces-icone svg { width: 30px; height: 30px; }

/* ---------- Connexion : volet de marque aux couleurs du logo ARS + formulaire ---------- */
.connexion {
    --ars-marine: #0d2257; --ars-marine-clair: #1a3a85; --ars-jaune: #e0c000; --ars-vert: #008050; --ars-rouge: #c00000;
    min-height: 100vh; display: grid; grid-template-columns: minmax(380px, 46%) 1fr; background: var(--bg);
}
.connexion-marque {
    position: relative; display: flex; flex-direction: column; gap: 40px; padding: 56px 56px 64px; overflow: hidden;
    color: #fff; background:
        radial-gradient(700px 420px at 110% -10%, rgba(224, 192, 0, 0.16), transparent 60%),
        radial-gradient(640px 420px at -20% 110%, rgba(0, 128, 80, 0.22), transparent 60%),
        linear-gradient(160deg, var(--ars-marine-clair), var(--ars-marine) 62%);
}
.connexion-motif {
    position: absolute; inset: 0; pointer-events: none;
    background-image: radial-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1.4px);
    background-size: 22px 22px;
    -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 75%); mask-image: linear-gradient(180deg, #000 0%, transparent 75%);
}
.connexion-motif::before, .connexion-motif::after {
    content: ""; position: absolute; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.08);
}
.connexion-motif::before { width: 560px; height: 560px; right: -200px; top: -180px; border-color: rgba(255, 255, 255, 0.10); }
.connexion-motif::after { width: 340px; height: 340px; right: -90px; top: -70px; border-color: rgba(224, 192, 0, 0.18); }
.connexion-tuile, .connexion-accroche, .connexion-adresse { position: relative; }
.connexion-marque { gap: 32px; }
.connexion-tuile {
    align-self: flex-start; display: inline-flex; padding: 14px 18px; background: #fff; border-radius: 16px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
}
.connexion-tuile img { height: 58px; width: auto; display: block; }
.connexion-accroche { margin-top: auto; max-width: 520px; }
.connexion-accroche h2 {
    font-family: var(--font-display); font-size: 36px; font-weight: 700; line-height: 1.12; letter-spacing: -0.03em;
}
.connexion-accroche p { margin-top: 14px; font-size: 16px; line-height: 1.55; color: rgba(255, 255, 255, 0.78); }
.connexion-groupe { position: relative; max-width: 520px; }
.connexion-groupe-titre {
    margin-bottom: 12px; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
}
.connexion-diapos { display: grid; }
.connexion-diapo {
    grid-area: 1 / 1; display: flex; gap: 18px; align-items: center; padding: 16px; border-radius: 18px;
    background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    opacity: 0; visibility: hidden; transform: translateY(8px);
    transition: opacity 0.6s var(--ease), transform 0.6s var(--ease), visibility 0s linear 0.6s;
}
.connexion-diapo.active { opacity: 1; visibility: visible; transform: none; transition: opacity 0.6s var(--ease), transform 0.6s var(--ease), visibility 0s; }
.connexion-diapo-logo {
    flex: none; width: 120px; height: 80px; display: grid; place-items: center; padding: 10px;
    background: #fff; border-radius: 12px; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}
.connexion-diapo-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.connexion-diapo-texte h3 { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.connexion-diapo-texte p { margin-top: 4px; font-size: 14px; line-height: 1.45; color: rgba(255, 255, 255, 0.78); }
.connexion-points { display: flex; gap: 8px; margin-top: 14px; }
.connexion-points button {
    width: 8px; height: 8px; padding: 0; border: 0; border-radius: var(--radius-pill); cursor: pointer;
    background: rgba(255, 255, 255, 0.3); transition: width 0.3s var(--ease), background 0.3s var(--ease);
}
.connexion-points button:hover { background: rgba(255, 255, 255, 0.55); }
.connexion-points button.active { width: 26px; background: var(--ars-jaune); }
.connexion-points button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .connexion-diapo, .connexion-diapo.active { transition: none; transform: none; } }
.connexion-adresse { margin-top: auto; font-size: 13px; color: rgba(255, 255, 255, 0.6); }
.connexion-bande { position: absolute; left: 0; right: 0; bottom: 0; display: flex; height: 6px; }
.connexion-bande span { flex: 1; }
.connexion-bande span:nth-child(1) { background: var(--ars-marine-clair); }
.connexion-bande span:nth-child(2) { background: var(--ars-jaune); }
.connexion-bande span:nth-child(3) { background: var(--ars-vert); }
.connexion-bande span:nth-child(4) { background: var(--ars-rouge); }

.connexion-zone {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; padding: 40px 24px;
    background: radial-gradient(600px 400px at 100% 0%, rgba(26, 58, 133, 0.06), transparent 70%), var(--bg);
}
.connexion-carte {
    width: 100%; max-width: 440px; padding: 40px 40px 32px; background: var(--surface); border-radius: 24px;
    border: 1px solid var(--separator-soft); box-shadow: 0 30px 70px rgba(13, 34, 87, 0.10), 0 4px 14px rgba(13, 34, 87, 0.05);
    animation: connexion-entree 0.5s var(--ease) both;
}
@keyframes connexion-entree { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .connexion-carte { animation: none; } }
.connexion-salut {
    display: inline-block; margin-bottom: 10px; padding: 4px 10px; border-radius: var(--radius-pill);
    font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
    color: var(--ars-vert); background: rgba(0, 128, 80, 0.09);
}
.connexion-logo-mobile { display: none; }
.connexion-carte h1 { font-family: var(--font-display); font-size: 32px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.connexion-intro { margin: 8px 0 28px; color: var(--text-secondary); font-size: 15px; line-height: 1.45; }
.connexion-carte .alert { margin-bottom: 18px; }
.connexion-carte form { display: grid; gap: 18px; }
.connexion-carte .champ { display: grid; gap: 7px; }
.connexion-carte label { font-size: 13px; font-weight: 600; color: var(--text); }
.connexion-saisie { position: relative; }
.connexion-icone {
    position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 19px; height: 19px;
    color: var(--text-tertiary); pointer-events: none; transition: color 0.2s var(--ease);
}
.connexion-carte input {
    width: 100%; min-height: 50px; padding: 12px 16px 12px 46px; font-size: 15px; border-radius: 12px;
    background: var(--fill); border: 1px solid transparent; transition: background 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.connexion-carte input:hover { background: var(--fill-strong); }
.connexion-carte input:focus { background: var(--surface); border-color: var(--ars-marine-clair); box-shadow: 0 0 0 4px rgba(26, 58, 133, 0.14); }
.connexion-saisie:focus-within .connexion-icone { color: var(--ars-marine-clair); }
.connexion-mdp input { padding-right: 52px; }
.connexion-oeil {
    position: absolute; top: 50%; right: 6px; transform: translateY(-50%); width: 40px; height: 40px;
    display: grid; place-items: center; border: 0; border-radius: 10px; background: transparent;
    color: var(--text-tertiary); cursor: pointer;
}
.connexion-oeil:hover { color: var(--text); background: var(--fill); }
.connexion-oeil:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.connexion-oeil svg { width: 20px; height: 20px; }
.connexion-oeil .oeil-ferme, .connexion-oeil[aria-pressed="true"] .oeil-ouvert { display: none; }
.connexion-oeil[aria-pressed="true"] .oeil-ferme { display: block; }
.connexion-majuscules { font-size: 12px; font-weight: 500; color: var(--warning-text); }
.connexion-bouton {
    width: 100%; min-height: 50px; margin-top: 6px; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    font-size: 15px; font-weight: 600; color: #fff; border-radius: 12px;
    background: linear-gradient(135deg, var(--ars-marine-clair), var(--ars-marine));
    box-shadow: 0 10px 24px rgba(13, 34, 87, 0.28); transition: transform 0.15s var(--ease), box-shadow 0.2s var(--ease), filter 0.2s var(--ease);
}
.connexion-bouton svg { width: 18px; height: 18px; transition: transform 0.2s var(--ease); }
.connexion-bouton:hover { filter: brightness(1.08); box-shadow: 0 14px 30px rgba(13, 34, 87, 0.34); }
.connexion-bouton:hover svg { transform: translateX(3px); }
.connexion-bouton:active { transform: translateY(1px); }
.connexion-bouton:focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(26, 58, 133, 0.25); }
.connexion-bouton:disabled { opacity: 0.7; cursor: progress; }
.connexion-aide {
    display: flex; gap: 10px; align-items: flex-start; margin-top: 24px; padding: 12px 14px; border-radius: 12px;
    font-size: 13px; line-height: 1.5; color: var(--text-secondary); background: var(--fill);
}
.connexion-aide svg { flex: none; width: 18px; height: 18px; margin-top: 1px; color: var(--ars-marine-clair); }
.connexion-copyright { font-size: 12px; color: var(--text-tertiary); }

@media (max-width: 900px) {
    .connexion { grid-template-columns: 1fr; }
    .connexion-marque { display: none; }
    .connexion-zone { justify-content: flex-start; padding: 40px 16px 32px; border-top: 6px solid var(--ars-marine); }
    .connexion-carte { padding: 32px 22px 26px; }
    .connexion-logo-mobile { display: block; height: 52px; width: auto; margin-bottom: 28px; }
}

/* ---------- Pagination ---------- */
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
              padding: 14px 24px; border-top: 1px solid var(--separator-soft); font-size: 13px; }
.pagination-resume { color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.pagination-pages { display: flex; gap: 4px; align-items: center; }
.pagination-lien { min-width: 32px; height: 32px; padding: 0 8px; display: inline-grid; place-items: center;
                   border-radius: var(--radius-pill); color: var(--text); font-variant-numeric: tabular-nums; }
a.pagination-lien:hover { background: var(--fill-strong); text-decoration: none; }
.pagination-lien.courant { background: var(--accent); color: #fff; font-weight: 600; }
.pagination-lien.inactif { color: var(--text-tertiary); }
.pagination-ellipse { color: var(--text-tertiary); padding: 0 4px; }

/* ---------- Accueil : dossiers visa par étape ---------- */
.etapes-visa { padding: 10px 14px 14px; display: grid; gap: 2px; }
.etape-visa {
    display: grid; grid-template-columns: minmax(150px, 280px) minmax(80px, 1fr) 92px; gap: 16px; align-items: center;
    padding: 9px 10px; border-radius: 10px; color: var(--text); text-decoration: none;
}
.etape-visa:hover { background: rgba(0, 113, 227, .07); }
.etape-nom { font-size: 14px; font-weight: 500; }
.etape-barre { height: 10px; border-radius: 999px; background: var(--separator-soft); overflow: hidden; }
.etape-barre span { display: block; height: 100%; min-width: 4px; border-radius: 999px; background: var(--accent); }
.etape-nombre { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.etape-nombre b { font-size: 15px; }
.etape-nombre small { color: var(--text-secondary); margin-left: 4px; }
@media (max-width: 640px) {
    .etape-visa { grid-template-columns: 1fr auto; gap: 6px 12px; }
    .etape-barre { grid-column: 1 / -1; grid-row: 2; }
}
