/*
 * New Tech Automotive — Espace clients (suivi2).
 * Feuille de style unique (CSP : aucun style en ligne). Langage visuel « poste de travail » :
 * bandeau sombre, fond gris clair, panneaux blancs, accent sarcelle, ambre pour ce qui attend le compte.
 */

/* ---------- Police (auto-hébergée, licence OFL : fonts/OFL-IBMPlexSans.txt) ---------- */

@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap;
    src: url("fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap;
    src: url("fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap;
    src: url("fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 700; font-display: swap;
    src: url("fonts/ibm-plex-sans-latin-700-normal.woff2") format("woff2"); }

/* ---------- Jetons ---------- */

:root {
    --ink: #14202b;            /* texte */
    --ink-soft: #556372;       /* texte secondaire (5,5:1 sur le fond) */
    --paper: #eef1f4;          /* fond de page */
    --paper-2: #f6f8fa;        /* fond discret : en-têtes de tableau, zones internes */
    --card: #fff;              /* panneaux */
    --line: #d9dfe5;
    --line-strong: #c5ced7;
    --line-soft: #edf0f3;
    --accent: #0b5d66;         /* boutons, sélection, étapes franchies */
    --accent-hover: #07434a;
    --accent-tint: #e3f0f1;
    --wait: #c2620e;           /* barres « en attente » */
    --wait-tx: #8a4606;
    --wait-strong: #6e3804;
    --wait-bg: #fbeedf;
    --wait-bd: #efcfa9;
    --gold: #c9a75f;           /* or du logo : pastille du compte, étoile de suivi */
    --gold-deep: #8a6a22;
    --green: #1f6b4a;
    --red: #a32a2a;
    --todo: #dde3e8;           /* étapes à venir */
    --sans: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;

    --band: #14202b;
    --band-2: #22303d;
    --on-band: #ffffff;
    --on-band-soft: #c3cdd7;
    --btn-bg: #0b5d66;
    --btn-bg-hover: #07434a;
    --btn-tx: #ffffff;
    --hover: #f3f6f8;
    --amber: #8a4606;
    --shadow: none;
    --shadow-up: 0 12px 32px rgba(20, 32, 43, 0.18);
    --chart-1: #14202b;
    --plate-bg: #fff;
    --overlay: rgba(20, 32, 43, 0.4);
    --rayon: 10px;
    --rayon-btn: 8px;

    /* États : fond / texte / bord / point */
    --st-vert-bg: #e2f1e8;   --st-vert-tx: #1b5a3e;   --st-vert-bd: #bcd9c8;   --st-vert-pt: #2f7a56;
    --st-orange-bg: #fbeedf; --st-orange-tx: #8a4606; --st-orange-bd: #efcfa9; --st-orange-pt: #c2620e;
    --st-rouge-bg: #f8e4e1;  --st-rouge-tx: #8b2a26;  --st-rouge-bd: #e6bdb6;  --st-rouge-pt: #b5473c;
    --st-bleu-bg: #e3ecf5;   --st-bleu-tx: #1f4672;   --st-bleu-bd: #bfd0e3;   --st-bleu-pt: #3f6fa3;
    --st-violet-bg: #ece6f3; --st-violet-tx: #54397a; --st-violet-bd: #d3c6e3; --st-violet-pt: #7a5ca8;
    --st-gris-bg: #e9edf0;   --st-gris-tx: #45525e;   --st-gris-bd: #cfd6dd;   --st-gris-pt: #7c8894;

    color-scheme: light;
}

/* Thème sombre : selon le système, sauf choix explicite (data-theme posé par app.js) */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --ink: #e8edf2; --ink-soft: #a7b3c0; --paper: #0e161d; --paper-2: #131d26; --card: #18242f;
        --line: #2a3947; --line-strong: #3d4f60; --line-soft: #223040;
        --accent: #6ccad3; --accent-hover: #93dbe2; --accent-tint: #12343a;
        --wait: #e08a3c; --wait-tx: #f0b27a; --wait-strong: #f6c698; --wait-bg: #36260f; --wait-bd: #5e4322;
        --gold: #c9a75f; --gold-deep: #c9a75f; --green: #7cbb98; --red: #ee8f84; --todo: #2f3f4e;
        --band: #0a1118; --band-2: #1b2732; --on-band: #ffffff; --on-band-soft: #b4c0cc;
        --btn-bg: #1a7882; --btn-bg-hover: #218d98; --btn-tx: #ffffff; --hover: #1e2c38; --amber: #f0b27a;
        --shadow-up: 0 16px 40px rgba(0, 0, 0, 0.5);
        --chart-1: #e8edf2; --plate-bg: #131d26; --overlay: rgba(2, 8, 16, 0.6);
        --st-vert-bg: #173a2e;  --st-vert-tx: #a3d6b9;  --st-vert-bd: #2b5a47; --st-vert-pt: #6fb592;
        --st-orange-bg: #36260f; --st-orange-tx: #f0b27a; --st-orange-bd: #5e4322; --st-orange-pt: #e08a3c;
        --st-rouge-bg: #3e1f23; --st-rouge-tx: #f2a99e; --st-rouge-bd: #66343b; --st-rouge-pt: #e07f72;
        --st-bleu-bg: #1a3150;  --st-bleu-tx: #adc6e8;  --st-bleu-bd: #2f4c74; --st-bleu-pt: #82a5d3;
        --st-violet-bg: #2d2442; --st-violet-tx: #cdb9e4; --st-violet-bd: #4a3a66; --st-violet-pt: #ab90cb;
        --st-gris-bg: #22303f;  --st-gris-tx: #c5cad1;  --st-gris-bd: #3a4757; --st-gris-pt: #8f99a6;
        color-scheme: dark;
    }
}
:root[data-theme="dark"] {
    --ink: #e8edf2; --ink-soft: #a7b3c0; --paper: #0e161d; --paper-2: #131d26; --card: #18242f;
        --line: #2a3947; --line-strong: #3d4f60; --line-soft: #223040;
        --accent: #6ccad3; --accent-hover: #93dbe2; --accent-tint: #12343a;
        --wait: #e08a3c; --wait-tx: #f0b27a; --wait-strong: #f6c698; --wait-bg: #36260f; --wait-bd: #5e4322;
        --gold: #c9a75f; --gold-deep: #c9a75f; --green: #7cbb98; --red: #ee8f84; --todo: #2f3f4e;
        --band: #0a1118; --band-2: #1b2732; --on-band: #ffffff; --on-band-soft: #b4c0cc;
        --btn-bg: #1a7882; --btn-bg-hover: #218d98; --btn-tx: #ffffff; --hover: #1e2c38; --amber: #f0b27a;
        --shadow-up: 0 16px 40px rgba(0, 0, 0, 0.5);
        --chart-1: #e8edf2; --plate-bg: #131d26; --overlay: rgba(2, 8, 16, 0.6);
        --st-vert-bg: #173a2e;  --st-vert-tx: #a3d6b9;  --st-vert-bd: #2b5a47; --st-vert-pt: #6fb592;
        --st-orange-bg: #36260f; --st-orange-tx: #f0b27a; --st-orange-bd: #5e4322; --st-orange-pt: #e08a3c;
        --st-rouge-bg: #3e1f23; --st-rouge-tx: #f2a99e; --st-rouge-bd: #66343b; --st-rouge-pt: #e07f72;
        --st-bleu-bg: #1a3150;  --st-bleu-tx: #adc6e8;  --st-bleu-bd: #2f4c74; --st-bleu-pt: #82a5d3;
        --st-violet-bg: #2d2442; --st-violet-tx: #cdb9e4; --st-violet-bd: #4a3a66; --st-violet-pt: #ab90cb;
        --st-gris-bg: #22303f;  --st-gris-tx: #c5cad1;  --st-gris-bd: #3a4757; --st-gris-pt: #8f99a6;
        color-scheme: dark;
}

/* Tons (points, barres, segments) */
.t-vert { --t: var(--st-vert-pt); }
.t-orange { --t: var(--st-orange-pt); }
.t-rouge { --t: var(--st-rouge-pt); }
.t-bleu { --t: var(--st-bleu-pt); }
.t-violet { --t: var(--st-violet-pt); }
.t-gris { --t: var(--st-gris-pt); }
.t-encre { --t: var(--chart-1); }

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--paper); }
body {
    margin: 0; min-height: 100vh; display: flex; flex-direction: column;
    background: var(--paper); color: var(--ink);
    font-family: var(--sans); font-size: 14px; line-height: 1.45; font-weight: 400;
    font-variant-numeric: lining-nums;
}
[hidden] { display: none !important; }

h1, h2, h3, h4 { margin: 0; color: var(--ink); line-height: 1.2; }
h1 { font-weight: 700; font-size: 28px; letter-spacing: -0.01em; }
h2 { font-weight: 600; font-size: 17px; }
h3 { font-weight: 600; font-size: 14px; }
p { margin: 0 0 0.75rem; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-hover); }
strong { font-weight: 600; }
kbd { font-family: var(--sans); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.sr-only {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; vertical-align: -0.2em; }
.ic-petit { width: 16px; height: 16px; stroke-width: 2; }
.muted { color: var(--ink-soft); }
.mono { font-variant-numeric: tabular-nums; white-space: nowrap; }

.lien-evitement {
    position: absolute; left: 0.75rem; top: -4rem; z-index: 60; padding: 0.5rem 0.9rem;
    background: var(--card); color: var(--ink); border-radius: var(--rayon-btn); box-shadow: var(--shadow-up);
}
.lien-evitement:focus { top: 0.75rem; }

/* ---------- Bandeau ---------- */

.bandeau { background: var(--band); color: var(--on-band); }
.bandeau-interne {
    max-width: 1288px; margin: 0 auto; padding: 10px 24px; min-height: 64px;
    display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px;
}
.page-dossiers .bandeau-interne { max-width: 1600px; }
.bandeau :focus-visible { outline-color: #fff; }

.marque { display: flex; flex: none; text-decoration: none; border-radius: 4px; }
.marque-logo { display: block; height: 34px; width: auto; }
.connexion-marque { margin: 0; font-size: clamp(34px, 3.6vw, 46px); font-weight: 600; line-height: 1.05; letter-spacing: -0.015em; color: var(--on-band); }
.connexion-marques { display: flex; align-items: center; gap: 24px; margin-top: 3rem; }
.connexion-v {
    width: 72px; height: 72px; flex: none; display: grid; place-items: center; border-radius: 16px;
    border: 1px solid rgba(201, 167, 95, 0.45); background: rgba(255, 255, 255, 0.03);
    font-family: Georgia, "Times New Roman", serif; font-weight: 700; font-size: 40px; line-height: 1; color: var(--gold);
}
.connexion-sep { width: 1px; height: 56px; background: rgba(201, 167, 95, 0.35); }
.connexion-marques img { display: block; height: 62px; width: auto; }
.connexion-filet { width: 56px; height: 3px; border-radius: 2px; background: var(--gold); margin: 1.5rem 0 1rem; }

.menu { display: contents; }
.nav { display: flex; gap: 4px; }
.nav a {
    display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; border-radius: 6px;
    color: var(--on-band-soft); text-decoration: none; font-weight: 500; white-space: nowrap;
}
.nav a:hover { color: #fff; background: rgba(255, 255, 255, 0.07); }
.nav a.actif { color: #fff; font-weight: 600; background: var(--band-2); }

.recherche-rapide {
    flex: 1 1 280px; min-width: 0; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px;
    border-radius: 8px; background: var(--band-2); color: var(--on-band-soft);
}
.recherche-rapide input[type="search"] {
    flex: 1; min-width: 0; min-height: 0; height: 38px; padding: 0; border: 0; border-radius: 0;
    background: transparent; color: #fff; font: inherit;
}
.recherche-rapide input[type="search"]::placeholder { color: var(--on-band-soft); opacity: 1; }
.recherche-rapide input[type="search"]:focus-visible { outline: none; background: transparent; }
.recherche-rapide:focus-within { outline: 2px solid #fff; outline-offset: 2px; }

.compte-menu { position: relative; flex: none; margin-left: auto; }
.compte-menu summary {
    list-style: none; display: flex; align-items: center; gap: 10px; cursor: pointer; min-height: 44px; padding: 0 4px 0 10px;
    border-radius: 8px; color: var(--on-band); font-weight: 500;
}
.compte-menu summary::-webkit-details-marker { display: none; }
.compte-menu summary:hover, .compte-menu[open] summary { background: var(--band-2); }
.compte-nom { max-width: 14rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compte-pastille {
    display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; flex: none;
    background: var(--gold); color: #14202b; font-weight: 700; font-size: 13px;
}
.compte-panneau {
    position: absolute; right: 0; top: calc(100% + 8px); z-index: 40; width: 270px; padding: 0.5rem;
    background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: var(--rayon); box-shadow: var(--shadow-up);
}
.compte-identite { display: flex; flex-direction: column; padding: 0.6rem 0.7rem 0.75rem; margin: 0 0 0.35rem; border-bottom: 1px solid var(--line); line-height: 1.35; }
.compte-identite strong { font-weight: 600; font-size: 15px; }
.compte-identite span { font-size: 13px; color: var(--ink-soft); overflow-wrap: anywhere; }
.compte-identite .compte-role { margin-top: 0.3rem; color: var(--accent); font-weight: 600; }
.compte-action {
    display: flex; width: 100%; align-items: center; gap: 0.65rem; min-height: 40px; padding: 0.5rem 0.7rem; border-radius: 6px;
    font: inherit; color: var(--ink); text-decoration: none; background: none; border: 0; cursor: pointer; text-align: left;
}
.compte-action:hover { background: var(--hover); color: var(--ink); }
.compte-action .ic { color: var(--ink-soft); }
.compte-panneau :focus-visible { outline-color: var(--accent); outline-offset: -2px; }
.ic-soleil { display: none; }
[data-theme-sombre] .ic-lune { display: none; }
[data-theme-sombre] .ic-soleil { display: inline; }
.form-simple { margin: 0; }

.nav-bascule {
    display: none; width: 44px; height: 44px; align-items: center; justify-content: center; cursor: pointer;
    background: transparent; border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 8px;
}
.nav-bascule-barres, .nav-bascule-barres::before, .nav-bascule-barres::after {
    display: block; width: 18px; height: 2px; background: var(--on-band); position: relative;
}
.nav-bascule-barres::before, .nav-bascule-barres::after { content: ""; position: absolute; left: 0; }
.nav-bascule-barres::before { top: -6px; }
.nav-bascule-barres::after { top: 6px; }

/* ---------- Mise en page ---------- */

.principal { width: 100%; max-width: 1288px; margin: 0 auto; padding: 28px 24px 48px; flex: 1; }
.page-dossiers .principal { max-width: 1600px; }
.principal-nu { flex: 1; display: flex; flex-direction: column; }
.pied {
    max-width: 1288px; width: 100%; margin: 0 auto; padding: 16px 24px 28px; display: flex; gap: 0.75rem; flex-wrap: wrap;
    align-items: baseline; color: var(--ink-soft); font-size: 13px; border-top: 1px solid var(--line);
}
.pied-marque { font-weight: 600; color: var(--ink); }

.entete-page { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem 1.5rem; flex-wrap: wrap; margin-bottom: 20px; }
.surtitre { font-size: 14px; font-weight: 500; color: var(--ink-soft); margin: 0 0 4px; }
.chapeau { margin: 6px 0 0; color: var(--ink-soft); max-width: 46rem; }

.carte {
    background: var(--card); border: 1px solid var(--line); border-radius: var(--rayon);
    padding: 16px 20px; margin-bottom: 16px;
}
.carte > h2 { margin-bottom: 0.3rem; }
.vide { color: var(--ink-soft); margin: 0.35rem 0 0.5rem; }

.retour { margin: -8px 0 12px; }
.retour a { display: inline-flex; align-items: center; gap: 0.3rem; min-height: 32px; text-decoration: none; color: var(--ink-soft); font-weight: 500; }
.retour a:hover { color: var(--ink); }

/* ---------- Messages ---------- */

.flashes { max-width: none; }
.flash { border-radius: var(--rayon); padding: 0.75rem 1rem; margin-bottom: 16px; border: 1px solid; }
.flash ul { margin: 0.4rem 0 0; padding-left: 1.2rem; }
.flash-ok { background: var(--st-vert-bg); border-color: var(--st-vert-bd); color: var(--st-vert-tx); }
.flash-erreur { background: var(--st-rouge-bg); border-color: var(--st-rouge-bd); color: var(--st-rouge-tx); }
.flash-info { background: var(--st-bleu-bg); border-color: var(--st-bleu-bd); color: var(--st-bleu-tx); }
.principal-nu .flashes { padding: 1rem 1rem 0; }

/* ---------- Boutons ---------- */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
    font: inherit; font-size: 14px; font-weight: 600; line-height: 1.2; text-decoration: none; cursor: pointer;
    min-height: 40px; padding: 0 14px; border-radius: var(--rayon-btn); border: 1px solid transparent; white-space: nowrap;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.btn-principal { background: var(--btn-bg); color: var(--btn-tx); border-color: var(--btn-bg); }
.btn-principal:hover { background: var(--btn-bg-hover); border-color: var(--btn-bg-hover); color: var(--btn-tx); }
.btn-contour { background: var(--card); color: var(--ink); border-color: var(--line-strong); font-weight: 500; }
.btn-contour:hover { background: var(--hover); color: var(--ink); border-color: var(--accent); }
.btn-danger { background: transparent; color: var(--red); border-color: var(--red); }
.btn-danger:hover { background: var(--red); color: #fff; }
.btn-petit { min-height: 36px; padding: 0 14px; font-size: 13px; }
.btn-large { width: 100%; min-height: 46px; }
.btn[disabled] { opacity: 0.6; cursor: default; }
.btn-icone {
    display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: var(--rayon-btn); cursor: pointer;
    background: transparent; border: 1px solid var(--line-strong); color: var(--ink); text-decoration: none;
}
.btn-icone:hover { background: var(--hover); border-color: var(--accent); color: var(--ink); }

/* ---------- Formulaires ---------- */

.formulaire { display: block; }
.champ { margin-bottom: 1rem; min-width: 0; }
.champ label, .etiquette { display: flex; align-items: center; gap: 0.4rem; font-size: 13px; font-weight: 600; margin-bottom: 0.35rem; color: var(--ink); }
.aide { font-size: 13px; color: var(--ink-soft); margin: 0.35rem 0 0; }

input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="date"], select, textarea {
    width: 100%; min-height: 42px; padding: 0.5rem 0.75rem; font: inherit; font-size: 14px; color: var(--ink);
    background: var(--card); border: 1px solid var(--line-strong); border-radius: var(--rayon-btn);
}
select {
    appearance: none; padding-right: 2.1rem; cursor: pointer;
    background-image: linear-gradient(45deg, transparent 50%, var(--ink-soft) 50%), linear-gradient(135deg, var(--ink-soft) 50%, transparent 50%);
    background-position: calc(100% - 17px) 52%, calc(100% - 12px) 52%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
input::placeholder { color: var(--ink-soft); opacity: 0.75; }
textarea { min-height: 4.5rem; resize: vertical; line-height: 1.45; font-variant-numeric: tabular-nums; }
input:hover, select:hover, textarea:hover { border-color: var(--accent); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
input[type="date"] { font-variant-numeric: tabular-nums; }

.case { display: flex !important; align-items: flex-start; gap: 0.6rem; font-weight: 400 !important; font-size: 14px !important; margin: 0 0 0.45rem !important; cursor: pointer; }
.case input { width: 18px; height: 18px; margin: 0.15rem 0 0; flex: none; accent-color: var(--accent); }

.groupe { border: 1px solid var(--line); border-radius: var(--rayon); padding: 1rem 1.1rem 0.7rem; margin: 0 0 1.2rem; min-width: 0; }
.groupe legend { font-weight: 600; padding: 0 0.4rem; font-size: 13px; }
.cases-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0.2rem 1rem; margin-top: 0.6rem; }
.grille-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.25rem; }
.champ-mdp { display: flex; gap: 0.6rem; }
.grille-2 .champ > .case { min-height: 42px; align-items: center; }
.grille-2 .champ > .case input { margin-top: 0; }
.champ-mdp input { flex: 1; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: 0.02em; }
.actions { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; margin: 0.5rem 0 0; }

/* ---------- Badges, plaques, natures ---------- */

.badge {
    display: inline-block; padding: 1px 8px; border-radius: 10px; border: 1px solid transparent;
    font-size: 12px; font-weight: 600; line-height: 1.45; vertical-align: middle; white-space: nowrap;
}
.badge-vert { background: var(--st-vert-bg); color: var(--st-vert-tx); border-color: var(--st-vert-bd); }
.badge-orange { background: var(--st-orange-bg); color: var(--st-orange-tx); border-color: var(--st-orange-bd); }
.badge-rouge { background: var(--st-rouge-bg); color: var(--st-rouge-tx); border-color: var(--st-rouge-bd); }
.badge-bleu { background: var(--st-bleu-bg); color: var(--st-bleu-tx); border-color: var(--st-bleu-bd); }
.badge-violet { background: var(--st-violet-bg); color: var(--st-violet-tx); border-color: var(--st-violet-bd); }
.badge-gris { background: var(--st-gris-bg); color: var(--st-gris-tx); border-color: var(--st-gris-bd); }
.badge-alerte { background: var(--st-orange-bg); color: var(--st-orange-tx); border-color: var(--st-orange-pt); }
.badge + .badge { margin-left: 0.3rem; }

.plaque {
    display: inline-block; padding: 2px 8px; border: 1.5px solid var(--ink); border-radius: 4px; background: var(--plate-bg); color: var(--ink);
    font-size: 13px; font-weight: 600; letter-spacing: 0.03em; font-variant-numeric: tabular-nums; white-space: nowrap; line-height: 1.4;
}
.plaque-petite { font-size: 12px; padding: 0 6px; }
.plaque-grande { border-width: 2px; border-radius: 5px; padding: 4px 10px; font-size: 16px; font-weight: 700; letter-spacing: 0.04em; }
.ww { display: block; font-size: 12px; color: var(--ink-soft); margin-top: 0.2rem; white-space: nowrap; }
.nature { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 13px; color: var(--ink-soft); }
.pastille { width: 9px; height: 9px; flex: none; }
.pastille circle { stroke: rgba(20, 32, 43, 0.25); stroke-width: 1; }
.sous-etat { display: block; font-size: 13px; color: var(--ink); margin-top: 0.25rem; }
.depuis-le { display: block; font-size: 12px; color: var(--ink-soft); margin-top: 0.15rem; }
.nouveau { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 12px; font-weight: 600; color: var(--accent); margin-left: 0.35rem; white-space: nowrap; }
.nouveau-point { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); display: inline-block; flex: none; }
.compteur {
    display: inline-grid; place-items: center; min-width: 26px; height: 24px; padding: 0 0.45rem; border-radius: 12px;
    font-size: 13px; font-weight: 600; background: var(--st-orange-bg); color: var(--st-orange-tx); border: 1px solid var(--st-orange-bd);
}

/* ---------- Tableau de bord ---------- */

.chiffres { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.chiffre {
    display: flex; flex-direction: column; padding: 14px 20px 16px; text-decoration: none; color: var(--ink);
    background: var(--card); border: 1px solid var(--line); border-radius: var(--rayon); transition: border-color 0.15s;
}
a.chiffre:hover { border-color: var(--accent); color: var(--ink); }
a.chiffre:hover .chiffre-libelle { text-decoration: underline; text-underline-offset: 3px; }
.chiffre-valeur { font-weight: 700; font-size: 34px; line-height: 1.1; letter-spacing: -0.01em; font-variant-numeric: lining-nums tabular-nums; }
.chiffre-libelle { font-weight: 600; margin-top: 4px; }
.chiffre-detail { font-size: 13px; color: var(--ink-soft); }
.chiffre-agir .chiffre-valeur { color: var(--wait-tx); }

.repartition { padding-bottom: 14px; }
.repartition h2 { margin-bottom: 12px; }
.repartition-barre { display: block; width: 100%; height: 8px; border-radius: 4px; }
.repartition-barre rect { fill: var(--t); }
.repartition-barre .nuance-2, .pastille-ton.nuance-2 { opacity: 0.55; }
.repartition-barre .nuance-3, .pastille-ton.nuance-3 { opacity: 0.3; }
.repartition-legende { list-style: none; margin: 0.85rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.35rem 1.6rem; }
.repartition-legende a { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 32px; text-decoration: none; color: var(--ink); }
.repartition-legende a:hover .rl-libelle { text-decoration: underline; text-decoration-color: var(--accent); }
.pastille-ton { width: 10px; height: 10px; border-radius: 2px; background: var(--t); flex: none; }
.rl-nombre { font-weight: 600; font-variant-numeric: tabular-nums; }

.accueil-grille { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 320px); gap: 16px 24px; align-items: start; }
.accueil-grille > :only-child { grid-column: 1 / -1; }
.lc-depuis.lc-ancien { color: var(--red); font-weight: 600; }
.panneau { padding: 16px 20px 14px; }
.panneau-tete { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.panneau-sous { color: var(--ink-soft); font-size: 14px; margin: 0.25rem 0 0.75rem; }
.panneau-action { border-top: 3px solid var(--wait); }

/* À vous d'agir : une carte par pièce manquante */
.panneau-action .panneau-sous { margin-bottom: 0.9rem; }
.agir-cartes { list-style: none; margin: 0 0 1.25rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(12.5rem, 1fr)); gap: 0.75rem; }
.agir-carte {
    display: flex; align-items: center; gap: 0.95rem; height: 100%; min-height: 5.4rem; padding: 0.85rem 1rem; border-radius: 10px;
    background: var(--paper-2); border: 1px solid var(--line); color: var(--ink); text-decoration: none; transition: border-color 0.15s, background-color 0.15s;
}
a.agir-carte:hover { border-color: var(--line-strong); background: var(--hover); color: var(--ink); }
a.agir-carte:hover .agir-libelle { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.agir-icone { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; flex: none; background: var(--tc); color: #fff; }
.agir-icone .ic { width: 20px; height: 20px; stroke-width: 1.8; }
.ton-bleu { --tc: var(--st-bleu-pt); }
.ton-rouge { --tc: var(--st-rouge-pt); }
.ton-violet { --tc: var(--st-violet-pt); }
.ton-orange { --tc: var(--st-orange-pt); }
.agir-texte { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.agir-libelle { font-size: 13px; font-weight: 600; line-height: 1.25; }
.agir-nombre { font-weight: 700; font-size: 26px; line-height: 1.05; font-variant-numeric: lining-nums tabular-nums; }
.agir-carte-vide .agir-icone { opacity: 0.45; }
.agir-carte-vide .agir-nombre { color: var(--ink-soft); opacity: 0.85; }
@media (max-width: 560px) {
    .agir-cartes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.55rem; }
    .agir-carte { flex-direction: column; align-items: flex-start; gap: 0.5rem; min-height: 0; padding: 0.75rem; }
    .agir-icone { width: 36px; height: 36px; }
    .agir-icone .ic { width: 17px; height: 17px; }
}

.agir-sous-titre { font-size: 13px; font-weight: 600; color: var(--ink-soft); margin: 0; }
.agir-liste-tete { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.4rem 1rem; margin: 0 0 0.25rem; scroll-margin-top: 5rem; }
.agir-ordre, .file-ordre { display: inline-flex; gap: 2px; margin: 0; padding: 3px; border-radius: 999px; background: var(--paper-2); border: 1px solid var(--line-strong); }
.agir-ordre a, .file-ordre a { padding: 0.26rem 0.85rem; border-radius: 999px; font-size: 13px; font-weight: 600; text-decoration: none; color: var(--ink-soft); }
.agir-ordre a:hover, .file-ordre a:hover { color: var(--ink); }
.agir-ordre a.actif, .file-ordre a.actif { color: var(--card); background: var(--ink); }
.panneau-pied { margin: 8px 0 0; padding-top: 10px; border-top: 1px solid var(--line-soft); font-size: 13px; display: flex; flex-wrap: wrap; gap: 4px 16px; justify-content: space-between; }
.panneau-pied a { font-weight: 600; }

.liste-courte { list-style: none; margin: 0; padding: 0; }
.liste-courte li + li { border-top: 1px solid var(--line-soft); }
.ligne-courte {
    display: grid; grid-template-columns: 8.5rem minmax(0, 1fr) auto; grid-template-areas: "ref assure etat" "ref detail depuis";
    gap: 0.15rem 1rem; padding: 10px 8px; margin: 0 -8px; border-radius: 6px; text-decoration: none; color: var(--ink); align-items: baseline;
}
.ligne-courte:hover { background: var(--hover); color: var(--ink); }
.lc-ref { grid-area: ref; font-weight: 600; font-variant-numeric: tabular-nums; }
.lc-assure { grid-area: assure; font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lc-etat { grid-area: etat; justify-self: end; white-space: nowrap; }
.lc-detail { grid-area: detail; font-size: 13px; color: var(--ink-soft); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lc-depuis { grid-area: depuis; justify-self: end; font-size: 12px; color: var(--ink-soft); white-space: nowrap; }
.accueil-cote .ligne-courte { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "ref depuis" "assure assure" "etat etat" "detail detail"; row-gap: 0.15rem; }
.accueil-cote .lc-etat { justify-self: start; margin: 0.15rem 0 0.1rem; }

/* ---------- Recherche (liste des dossiers) ---------- */

.recherche { padding: 16px 20px 4px; margin-bottom: 12px; }
.recherche-bascule { display: none; }
.recherche-ligne { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 1rem; align-items: end; }
.recherche-valider { grid-column: 1 / -1; justify-self: end; margin-bottom: 1rem; }

.champ-case { display: flex; align-items: flex-end; padding-bottom: 0.7rem; grid-column: span 2; }
.champ-case .case { margin: 0 !important; }

.criteres-actifs { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; margin: 0 0 0.9rem; }
.puces-titre { font-size: 13px; font-weight: 600; margin: 0; color: var(--ink-soft); }
.puces { list-style: none; margin: 0; padding: 0; display: contents; }
.puce {
    display: inline-flex; align-items: center; gap: 0.4rem; min-height: 32px; padding: 0 8px 0 12px; border-radius: 16px;
    background: var(--card); border: 1px solid var(--line-strong); font-size: 13px; text-decoration: none; color: var(--ink); max-width: 100%;
}
.puce span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.puce .ic { color: var(--ink-soft); }
.puce:hover { border-color: var(--red); }
.puce:hover .ic { color: var(--red); }
.puces-effacer { font-size: 13px; color: var(--ink-soft); }

.recherches-enr { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; margin: 0 0 16px; padding: 8px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.recherches-titre { font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.recherches-vide { margin: 0; font-size: 13px; color: var(--ink-soft); }
.recherches-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.recherche-enr { display: inline-flex; align-items: stretch; border: 1px solid var(--line-strong); border-radius: 16px; background: var(--card); overflow: hidden; }
.recherche-enr a { display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; font-size: 13px; font-weight: 500; text-decoration: none; color: var(--ink); }
.recherche-enr a:hover { background: var(--hover); }
.recherche-enr.active { border-color: var(--ink); background: var(--ink); }
.recherche-enr.active a, .recherche-enr.active .recherche-suppr { color: var(--card); font-weight: 600; background: transparent; }
.recherche-enr form { margin: 0; display: flex; }
.recherche-suppr { border: 0; border-left: 1px solid var(--line); background: transparent; color: var(--ink-soft); cursor: pointer; padding: 0 8px; min-width: 32px; display: grid; place-items: center; }
.recherche-suppr:hover { color: var(--red); background: var(--hover); }
.enregistrer { margin-left: auto; position: relative; }
.enregistrer summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 0.35rem; font-size: 13px; font-weight: 600; padding: 0.3rem 0; }
.enregistrer summary::-webkit-details-marker { display: none; }
.enregistrer summary:hover { color: var(--accent); }
.enregistrer-form {
    position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; width: 340px; display: flex; gap: 0.5rem; padding: 0.75rem;
    background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-up);
}
.enregistrer-form input { min-height: 36px; }

/* Résultats */
.resultats-tete { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 0.75rem; }
.compte-resultats { margin: 0; font-size: 15px; display: flex; align-items: baseline; gap: 0.5rem; flex-wrap: wrap; }
.compte-nombre { font-weight: 700; font-size: 20px; line-height: 1; }
.compte-page { color: var(--ink-soft); font-size: 13px; }
.tri-menu { display: none; position: relative; }
#resultats { transition: opacity 0.12s; }
#resultats.charge { opacity: 0.55; }

.carte-tableau { padding: 0; overflow: hidden; position: relative; }
.tableau-defilant { overflow-x: auto; position: relative; }
.tableau { width: 100%; border-collapse: collapse; font-size: 14px; }
.tableau th {
    text-align: left; font-size: 12px; font-weight: 600; color: var(--ink-soft); background: var(--card); padding: 10px 0.7rem;
    border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: bottom;
}
.tableau td { padding: 12px 0.7rem; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.tableau tbody tr:last-child td { border-bottom: 0; }
.tableau tbody tr:hover { background: var(--hover); }
.tableau tr[data-href] { cursor: pointer; }
.tableau .col-montant { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tableau .col-date { white-space: nowrap; font-variant-numeric: tabular-nums; }
.tableau .cellule-actions { text-align: right; white-space: nowrap; }
.tableau th:first-child, .tableau td:first-child { padding-left: 1.1rem; }
.tableau th:last-child, .tableau td:last-child { padding-right: 1.1rem; }

.tableau-dossiers td { font-size: 13px; padding-left: 0.55rem; padding-right: 0.55rem; }
.tableau-dossiers th { padding-left: 0.55rem; padding-right: 0.55rem; }
.tableau-dossiers .col-suivi { width: 2.5rem; padding-right: 0; }
.tableau-dossiers .cellule-ref { white-space: nowrap; }
.tableau-dossiers .ref { font-weight: 600; text-decoration: none; color: var(--ink); font-variant-numeric: tabular-nums; }
.tableau-dossiers .ref:hover { text-decoration: underline; }
.tableau-dossiers tr.ligne-choisie { background: var(--accent-tint); box-shadow: inset 4px 0 0 var(--accent); }
.tableau-dossiers .nature { display: flex; margin-top: 0.15rem; font-size: 12px; }
.tableau-dossiers .cellule-assure { font-weight: 500; min-width: 9rem; }
.tableau-dossiers .cellule-etat { min-width: 10rem; max-width: 14rem; }
.tableau-dossiers .cellule-etat .badge { white-space: normal; }
.tableau-dossiers .cellule-inter { font-size: 13px; color: var(--ink-soft); min-width: 9rem; }
.tableau-dossiers .col-apercu { width: 1%; text-align: right; }

a.tri { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 0.35rem; }
a.tri:hover { color: var(--ink); }
.tableau a.tri-actif { color: var(--ink); }
a.tri-actif::after { content: ""; border-left: 4px solid transparent; border-right: 4px solid transparent; display: inline-block; }
a.tri-asc::after { border-bottom: 5px solid var(--accent); }
a.tri-desc::after { border-top: 5px solid var(--accent); }

.form-suivre { margin: 0; }
.btn-etoile {
    display: grid; place-items: center; width: 32px; height: 32px; margin: -0.3rem 0 0 -0.4rem; border-radius: 7px; cursor: pointer;
    background: transparent; border: 1px solid transparent; color: #9aa6b2;
}
.btn-etoile:hover { color: var(--gold-deep); background: var(--card); border-color: var(--line); }
.btn-etoile[aria-pressed="true"] { color: var(--gold-deep); }
.btn-etoile[aria-pressed="true"] .ic, .btn-suivre[aria-pressed="true"] .ic { fill: var(--gold); stroke: var(--gold-deep); }
.btn-etoile .ic { width: 19px; height: 19px; }
.btn-apercu {
    display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.3rem 0.55rem; border-radius: 7px; white-space: nowrap;
    font-size: 13px; font-weight: 600; text-decoration: none; color: var(--ink-soft); border: 1px solid transparent; margin-top: -0.25rem;
}
.btn-apercu:hover, tr:hover .btn-apercu { color: var(--ink); border-color: var(--line-strong); background: var(--card); }

.pagination { display: flex; flex-wrap: wrap; gap: 0.35rem; justify-content: center; align-items: center; margin: 1.5rem 0 0.5rem; }
.pagination a, .pagination .page-courante {
    min-width: 40px; min-height: 40px; padding: 0.35rem 0.7rem; display: inline-flex; align-items: center; justify-content: center;
    border-radius: 8px; border: 1px solid var(--line-strong); background: var(--card); text-decoration: none; color: var(--ink);
    font-weight: 500; font-variant-numeric: tabular-nums;
}
.pagination a:hover { border-color: var(--accent); background: var(--hover); }
.pagination .page-courante { background: var(--btn-bg); border-color: var(--btn-bg); color: var(--btn-tx); font-weight: 600; }
.pagination-pas { padding: 0.35rem 1rem !important; }
.pagination-points { color: var(--ink-soft); padding: 0 0.2rem; }

.vide-grand { padding: 2.5rem 1.5rem; text-align: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--rayon); color: var(--ink-soft); }
.vide-titre { font-size: 17px; font-weight: 600; color: var(--ink); margin-bottom: 0.4rem; }

.toast {
    position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%); z-index: 90; max-width: calc(100% - 2rem);
    padding: 0.7rem 1.1rem; border-radius: var(--rayon); background: var(--btn-bg); color: var(--btn-tx); font-size: 14px; box-shadow: var(--shadow-up);
}

/* Parcours en bref (accueil des assurés) : une piste de segments, le libellé de l'étape en légende */
.parcours { list-style: none; margin: 0; padding: 0; display: flex; gap: 3px; max-width: 420px; }
.pe { flex: 1; height: 6px; border-radius: 3px; background: var(--todo); }
.pe-atteinte, .pe-courante { background: var(--accent); }
.pe-point { display: none; }
.pe-libelle { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.parcours-legende { margin: 4px 0 0; font-size: 13px; color: var(--ink-soft); }
.parcours-legende strong { color: var(--ink); }

.issue { padding: 12px 16px; border-radius: var(--rayon); border: 1px solid var(--st-gris-bd); background: var(--st-gris-bg); color: var(--st-gris-tx); }
.issue-titre { font-weight: 600; font-size: 15px; margin: 0 0 0.2rem; color: inherit; }
.issue-texte { margin: 0; }

.infos { margin: 0; }
.info { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--line-soft); }
.info dt { color: var(--ink-soft); }
.info dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }

.chronologie { list-style: none; margin: 0.25rem 0 0; padding: 0; }
.etape { position: relative; display: grid; grid-template-columns: 6.5rem 14px minmax(0, 1fr); gap: 0 1rem; padding-bottom: 1.15rem; }
.etape::before { content: ""; position: absolute; left: calc(6.5rem + 1rem + 6px); top: 14px; bottom: -4px; width: 2px; background: var(--line); }
.etape:last-child { padding-bottom: 0; }
.etape:last-child::before { display: none; }
.etape-date { font-size: 13px; color: var(--ink-soft); font-variant-numeric: tabular-nums; text-align: right; display: flex; flex-direction: column; line-height: 1.35; padding-top: 0.05rem; }
.etape-date span { font-size: 12px; opacity: 0.85; }
.etape-point { position: relative; z-index: 1; width: 14px; height: 14px; margin-top: 3px; border-radius: 50%; background: var(--t, var(--st-gris-pt)); box-shadow: 0 0 0 3px var(--card); }
.etape-derniere .etape-point { box-shadow: 0 0 0 3px var(--card), 0 0 0 5px var(--t); }
.etape-contenu p { margin: 0; }
.etape-libelle { font-weight: 600; }
.etape-derniere .etape-libelle { font-size: 15px; font-weight: 700; }
.etape-sous { font-size: 13px; color: var(--ink-soft); }
.etape-par { font-size: 13px; color: var(--ink-soft); }
.etape-message { margin-top: 0.3rem !important; padding: 0.4rem 0.7rem; font-size: 13px; background: var(--paper-2); border-left: 2px solid var(--line-strong); }

.montants { margin: 0; }
.montants { max-width: 520px; }
.montants div { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 8px 0; border-top: 1px solid var(--line-soft); }
.montants div:first-child { border-top: 0; }
.montants dt { color: var(--ink-soft); }
.montants dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.montants .montant-total { border-top: 1px solid var(--ink); margin-top: 0.25rem; padding-top: 0.75rem; }
.montants .montant-total dt { color: var(--ink); font-weight: 600; }
.montants .montant-total dd { font-size: 20px; font-weight: 700; line-height: 1.1; }

/* Photos et documents */
.documents-tete { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.5rem; }
.documents-compte { margin: 0; color: var(--ink-soft); font-size: 13px; }
.groupe-doc { margin-top: 20px; }
.documents-tete + .groupe-doc { margin-top: 8px; }
.groupe-doc-titre { display: flex; gap: 0.6rem; align-items: baseline; flex-wrap: wrap; font-weight: 600; font-size: 15px; padding-bottom: 6px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.groupe-doc-nb { font-size: 12px; font-weight: 600; color: var(--ink-soft); }
.groupe-doc-interne { background: var(--paper-2); border: 1px dashed var(--line-strong); border-radius: var(--rayon); padding: 0.9rem 1rem 0.4rem; }
.marque-interne { font-size: 12px; font-weight: 600; color: var(--st-orange-tx); background: var(--st-orange-bg); border: 1px solid var(--st-orange-bd); border-radius: 5px; padding: 0 0.45rem; }
.type-doc { margin-bottom: 1.1rem; }
.type-doc-titre { margin: 0 0 0.5rem; font-size: 13px; font-weight: 600; }
.vignettes { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.vignette { display: block; aspect-ratio: 4 / 3; border-radius: 6px; overflow: hidden; background: var(--line-soft); border: 1px solid var(--line); }
.vignette:hover { border-color: var(--accent); }
.vignette img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.2s; }
.vignette:hover img { transform: scale(1.03); }
.vignettes.replie .vignette:nth-child(n + 13) { display: none; }
.vignettes-plus { margin: 0.6rem 0 0; }
.fichiers { list-style: none; margin: 0; padding: 0; }
.fichier { display: flex; align-items: center; gap: 0.75rem; min-height: 44px; padding: 8px; margin: 0 -8px; text-decoration: none; color: var(--ink); border-radius: 6px; border-top: 1px solid var(--line-soft); }
.fichiers li:first-child .fichier { border-top: 0; }
.fichier:hover { background: var(--hover); }
.icone-fichier { width: 22px; height: 22px; color: var(--ink-soft); }
.fichier-nom { flex: 1; font-weight: 500; font-size: 14px; overflow-wrap: anywhere; }
.fichier-ext { font-size: 11px; font-weight: 600; color: var(--ink-soft); border: 1px solid var(--line); border-radius: 4px; padding: 0 0.35rem; }
.fichier-date { font-size: 13px; color: var(--ink-soft); white-space: nowrap; font-variant-numeric: tabular-nums; }
.impression-seulement { display: none; }

/* Visionneuse */
.lightbox { position: fixed; inset: 0; z-index: 100; display: none; flex-direction: column; background: rgba(10, 17, 24, 0.97); color: #fff; }
.lightbox.ouvert { display: flex; }
body.lightbox-ouverte { overflow: hidden; }
.lightbox-barre { display: flex; align-items: center; gap: 1rem; padding: 0.6rem 1rem; flex-wrap: wrap; }
.lightbox-legende { flex: 1; min-width: 0; font-size: 14px; }
.lightbox-compteur { color: #c3cdd7; font-size: 13px; font-variant-numeric: tabular-nums; }
.lightbox-original { color: #fff; font-size: 14px; }
.lightbox-scene { flex: 1; min-height: 0; position: relative; display: flex; align-items: center; justify-content: center; padding: 0 3.5rem 1rem; touch-action: pan-y; }
.lightbox-image { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; background: #000; }
.lightbox-btn { background: rgba(255, 255, 255, 0.1); color: #fff; border: 1px solid rgba(255, 255, 255, 0.35); border-radius: 8px; font: inherit; cursor: pointer; min-width: 44px; min-height: 44px; font-size: 1.4rem; line-height: 1; }
.lightbox-btn:hover { background: rgba(255, 255, 255, 0.22); }
.lightbox :focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.lightbox-prec, .lightbox-suiv { position: absolute; top: 50%; transform: translateY(-50%); }
.lightbox-prec { left: 0.5rem; }
.lightbox-suiv { right: 0.5rem; }
.lightbox-btn[disabled] { opacity: 0.3; cursor: default; }

/* ---------- Connexion ---------- */

.connexion { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; }
.connexion-bandeau {
    background: var(--band); color: var(--on-band); padding: 4rem clamp(2rem, 6vw, 6rem); display: flex; flex-direction: column; justify-content: center;
}

.connexion-sous { font-size: 17px; color: var(--on-band); margin: 0 0 1.5rem; font-weight: 500; }
.connexion-texte { color: var(--on-band-soft); max-width: 26rem; font-size: 15px; margin: 0; }
.connexion-corps { background: var(--card); }
.connexion-corps { display: flex; align-items: center; justify-content: center; padding: 3rem 1.5rem; }
.connexion-carte { width: 100%; max-width: 400px; }
.connexion-carte h1 { font-size: 28px; }
.connexion-aide { color: var(--ink-soft); margin: 0.4rem 0 1.75rem; }
.connexion-carte .formulaire { padding-top: 1.5rem; border-top: 1px solid var(--line); }
.connexion-carte .btn-large { margin-top: 0.5rem; }
.connexion-note { margin: 1.5rem 0 0; font-size: 13px; color: var(--ink-soft); }

/* ---------- Pages étroites, administration ---------- */

.feuille { background: var(--card); border: 1px solid var(--line); border-radius: var(--rayon); padding: 24px 28px; }
.feuille-etroite { max-width: 540px; margin: 1rem auto 0; }
.feuille h1 { font-size: 24px; margin-bottom: 1.25rem; }
.feuille .chapeau { margin: -0.5rem 0 1.5rem; }

.tableau-comptes td { font-size: 14px; }
.compte-ligne-nom { display: block; font-weight: 600; }
.compte-ligne-email { display: block; font-size: 13px; color: var(--ink-soft); }
.rattache { display: block; }
.rattache-cies { display: block; font-size: 13px; color: var(--ink-soft); margin-top: 0.15rem; }
.texte-alerte { color: var(--red); font-weight: 500; }
.statut-note { display: block; font-size: 12px; color: var(--ink-soft); margin-top: 0.25rem; }
.tableau-journal td { font-size: 13px; }
.tableau-journal .ligne-alerte td { color: var(--st-rouge-tx); }
.tableau-journal .cellule-detail { overflow-wrap: anywhere; max-width: 30rem; }

.formulaire-compte { max-width: 880px; padding: 1.75rem 2rem 1.5rem; }
.recherche-inter { position: relative; }
.propositions {
    list-style: none; margin: 4px 0 0; padding: 0.3rem; position: absolute; left: 0; right: 0; z-index: 20; background: var(--card);
    border: 1px solid var(--line-strong); border-radius: var(--rayon); box-shadow: var(--shadow-up); max-height: 320px; overflow-y: auto;
}
.proposition { padding: 0.5rem 0.7rem; border-radius: 6px; cursor: pointer; display: flex; flex-direction: column; }
.proposition:hover, .proposition.active { background: var(--hover); }
.proposition-nom { font-weight: 600; }
.proposition-detail { font-size: 13px; color: var(--ink-soft); }
.proposition-vide { padding: 0.5rem 0.7rem; color: var(--ink-soft); }
.inter-liste { list-style: none; margin: 0.75rem 0 0.5rem; padding: 0; }
.inter-ligne { display: flex; align-items: center; gap: 0.75rem; padding: 0.5rem 0; border-top: 1px solid var(--line); }
.inter-nom { font-weight: 600; flex: 1; min-width: 0; }
.inter-id { color: var(--ink-soft); font-size: 13px; font-variant-numeric: tabular-nums; }
.vide-inter { margin: 0.5rem 0; }
.regroupement { max-width: 880px; margin-top: 2rem; padding: 1.25rem 0 0; border-top: 1px solid var(--line-strong); }
.regroupement h2 { font-size: 17px; margin-bottom: 0.35rem; }
.regroupement h3 { font-size: 14px; margin: 1.4rem 0 0.5rem; }
.regroupement .chapeau-regroupement { color: var(--ink-soft); font-size: 14px; margin: 0 0 0.75rem; }
.regroupement-total { font-size: 15px; margin: 0.5rem 0 0.25rem; }
.regroupement-total strong { font-variant-numeric: tabular-nums; }
.regroupement .tableau td form { margin: 0; }
.regroupement .tableau td:last-child { text-align: right; white-space: nowrap; }
.zone-danger { max-width: 880px; margin-top: 2rem; padding: 1.25rem 0 0; border-top: 1px solid var(--line-strong); }
.zone-danger h2 { font-size: 17px; color: var(--red); margin-bottom: 0.35rem; }
.zone-danger p { color: var(--ink-soft); font-size: 14px; }

/* ---------- Écrans moyens ---------- */

@media (max-width: 1599px) {
    .col-xl { display: none; }
    .btn-apercu-texte { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
}
@media (max-width: 1380px) {
    .col-large { display: none; }
}
@media (max-width: 1180px) {
    .compte-nom { max-width: 10rem; }
    .accueil-grille { grid-template-columns: minmax(0, 1fr); }
    .recherche-ligne { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Mobile ---------- */

@media (max-width: 900px) {
    /* Bandeau : logo, compte et bouton du menu sur une ligne ; la recherche dessous ; le menu se déplie (avec JavaScript) */
    .bandeau-interne { padding: 8px 16px; gap: 8px 12px; }
    .marque-logo { height: 30px; }
    .compte-menu { order: 2; }
    .compte-nom { display: none; }
    .compte-menu summary { padding: 0 6px; }
    .js .nav-bascule { display: inline-flex; flex: none; order: 3; }
    .recherche-rapide { order: 4; flex-basis: 100%; height: 44px; }
    .menu { display: block; order: 5; flex-basis: 100%; }
    .js .menu { display: none; }
    .js .menu.ouvert { display: block; }
    .nav { flex-wrap: wrap; }
    .js .nav { flex-direction: column; padding-bottom: 6px; }
    .nav a { min-height: 44px; }

    .principal { padding: 20px 16px 40px; }
    h1 { font-size: 24px; }
    .entete-page { margin-bottom: 16px; align-items: flex-start; }
    .carte { padding: 14px 16px; }
    .btn { min-height: 44px; }
    .btn-petit { min-height: 40px; }

    .chiffres { gap: 8px; }
    .chiffre { padding: 10px 12px 12px; }
    .chiffre-valeur { font-size: 26px; }

    /* Recherche repliable (avec JavaScript) */
    .js .recherche-bascule {
        display: flex; width: 100%; align-items: center; gap: 0.6rem; padding: 0.15rem 0 0.9rem; margin: 0; font: inherit; font-size: 15px; font-weight: 600;
        color: var(--ink); background: none; border: 0; cursor: pointer; text-align: left;
    }
    .recherche-bascule-nb:not(:empty) { display: inline-grid; place-items: center; min-width: 22px; height: 22px; border-radius: 11px; font-size: 12px; background: var(--btn-bg); color: var(--btn-tx); }
    .recherche-bascule-chevron { margin-left: auto; transition: transform 0.15s; }
    .recherche-bascule[aria-expanded="true"] .recherche-bascule-chevron { transform: rotate(180deg); }
    .js .recherche-corps.replie { display: none; }
    .recherche { padding: 1rem 1.1rem 0.25rem; }
    .recherche-ligne { grid-template-columns: minmax(0, 1fr); }
    .recherche-valider { justify-self: stretch; }
    .recherche-valider .btn { width: 100%; }

    .recherche-valider .btn { width: 100%; }
    .enregistrer { margin-left: 0; width: 100%; }
    .enregistrer-form { position: static; width: 100%; box-shadow: none; margin-top: 0.4rem; }
    .entete-dossiers .btn { min-height: 38px; padding: 0.4rem 0.8rem; font-size: 13px; }

    .tri-menu { display: block; }
    .tri-menu summary { cursor: pointer; font-size: 13px; font-weight: 600; padding: 0.4rem 0.7rem; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--card); list-style: none; }
    .tri-menu summary::-webkit-details-marker { display: none; }
    .tri-menu ul { list-style: none; margin: 0; padding: 0.3rem; position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; min-width: 13rem; background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-up); }
    .tri-menu a { display: flex; justify-content: space-between; padding: 0.55rem 0.7rem; border-radius: 6px; }
    .tri-menu a:hover { background: var(--hover); }

    /* Tableaux en cartes */
    .carte-tableau { background: transparent; border: 0; box-shadow: none; overflow: visible; }
    .tableau, .tableau thead, .tableau tbody, .tableau tr, .tableau td { display: block; width: 100%; }
    .tableau caption { display: none; }
    .tableau thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
    .tableau tr { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--rayon); margin-bottom: 8px; padding: 12px 16px; }
    .tableau tbody tr:hover { background: var(--card); }
    .tableau td, .tableau th:first-child, .tableau td:first-child, .tableau td:last-child { border: 0; padding: 0.22rem 0; }
    .tableau td { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 0.75rem; align-items: baseline; }
    .tableau td::before { content: attr(data-label); color: var(--ink-soft); font-size: 12px; }
    .tableau td:empty { display: none; }
    .tableau .col-xl { display: grid; }
    .tableau .col-large { display: none; }
    .tableau-dossiers .cellule-etat { max-width: none; }
    .tableau td > * { justify-self: start; min-width: 0; }
    .btn-apercu-texte { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
    .tableau .col-montant { text-align: left; }
    .tableau td.cellule-actions { display: block; text-align: left; padding-top: 0.5rem; }
    .tableau td.cellule-actions::before { content: none; }
    .tableau-defilant { overflow: visible; }

    .tableau-dossiers tr { padding-top: 0.8rem; }
    .tableau-dossiers td.col-suivi { position: absolute; right: 0.6rem; top: 0.6rem; width: auto; display: block; padding: 0; }
    .tableau-dossiers td.col-suivi::before, .tableau-dossiers td.cellule-ref::before { content: none; }
    .tableau-dossiers .btn-etoile { margin: 0; }
    .tableau-dossiers td.cellule-ref { display: block; padding: 0 2.5rem 0.4rem 0; margin-bottom: 0.3rem; border-bottom: 1px solid var(--line); }
    .tableau-dossiers .ref { font-size: 16px; }
    .tableau-dossiers .nature { display: inline-flex; margin-left: 0.6rem; }
    .tableau-dossiers td.col-apercu { display: block; text-align: left; padding-top: 0.5rem; }
    .tableau-dossiers td.col-apercu::before { content: none; }
    .tableau-dossiers .btn-apercu { border-color: var(--line-strong); color: var(--ink); margin: 0; }
    .tableau-dossiers .cellule-etat .badge { white-space: normal; }

    .etape { grid-template-columns: 5.3rem 14px minmax(0, 1fr); gap: 0 0.75rem; }
    .etape::before { left: calc(5.3rem + 0.75rem + 6px); }
    .vignettes { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 0.4rem; }
    .lightbox-scene { padding: 0 0.4rem 0.8rem; }
    .lightbox-prec { left: 0.3rem; } .lightbox-suiv { right: 0.3rem; }

    .connexion { grid-template-columns: minmax(0, 1fr); min-height: 0; }
    .connexion-bandeau { padding: 2.25rem 1.5rem 2rem; }

    .connexion-marques { margin-top: 1.5rem; gap: 16px; }
    .connexion-v { width: 52px; height: 52px; border-radius: 12px; font-size: 28px; }
    .connexion-sep { height: 40px; }
    .connexion-marques img { height: 44px; }
    .connexion-filet { margin: 1rem 0 0.75rem; }

    .connexion-sous { margin-bottom: 0.75rem; }
    .connexion-corps { padding: 2rem 1.25rem 3rem; align-items: flex-start; }

    .feuille { padding: 1.4rem 1.2rem; }
    .grille-2 { grid-template-columns: minmax(0, 1fr); }
    .champ-mdp { flex-direction: column; }
    .formulaire-compte { padding: 1.2rem 1.1rem; }
}

@media (max-width: 420px) {
    .chiffre-valeur { font-size: 22px; }
    .chiffre-libelle { font-size: 13px; }
    .ligne-courte { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "ref depuis" "assure assure" "etat etat" "detail detail"; }
    .lc-etat { justify-self: start; margin-top: 0.15rem; }
    .accueil-cote .ligne-courte { grid-template-areas: "ref depuis" "assure assure" "etat etat" "detail detail"; grid-template-columns: minmax(0, 1fr) auto; }
    .tableau td { grid-template-columns: 6.5rem minmax(0, 1fr); }
}

@media (max-width: 370px) {
    .info { grid-template-columns: minmax(0, 1fr); gap: 0.05rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

@media (forced-colors: active) {
    .badge, .plaque, .puce { border: 1px solid CanvasText; }
    .etape-point, .seg, .etp-barre, .pe { forced-color-adjust: none; }
}

/* ---------- Espace assuré ---------- */
.assure-sans-dossier { margin: 0 0 16px; max-width: 56rem; }
.encours-liste { list-style: none; margin: 0.4rem 0 0; padding: 0; }
.encours { padding: 14px 0 16px; border-top: 1px solid var(--line-soft); }
.encours:first-child { border-top: 0; padding-top: 0.4rem; }
.encours-tete { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.4rem 1rem; }
.encours-titre { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.7rem; }
.encours-titre a { font-size: 16px; font-weight: 600; color: var(--ink); text-decoration: none; }
.encours-titre a:hover { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.encours-etat { margin: 0; }
.encours-ref { margin: 0.25rem 0 0; font-size: 13px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.encours-parcours { margin-top: 0.85rem; }
.encours .assure-note { margin-top: 0.85rem; padding: 0.6rem 0.85rem; font-size: 14px; }
.aide-contact p { margin: 0 0 0.6rem; color: var(--ink-soft); font-size: 14px; }
.contact-liste { margin: 0; display: grid; gap: 0.45rem; font-size: 14px; }
.contact-liste div { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 0.6rem; }
.contact-liste dt { color: var(--ink-soft); font-size: 13px; }
.contact-liste dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.entete-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.assure-note { margin: 1.1rem 0 0; padding: 0.8rem 1rem; border-radius: 8px; font-size: 14px; }
.assure-note p { margin: 0; }
.assure-note-agir { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.7rem 1.25rem; background: var(--st-orange-bg); border: 1px solid var(--st-orange-bd); color: var(--ink); }
.assure-note-ok { background: var(--st-vert-bg); border: 1px solid var(--st-vert-bd); color: var(--ink); }
.assure-rattaches { max-width: 880px; margin-top: 1.5rem; padding: 1.5rem 1.6rem; scroll-margin-top: 5rem; }
.assure-rattaches h2 { font-size: 17px; margin: 0 0 0.9rem; display: flex; align-items: center; gap: 0.6rem; }
.rattaches-liste { list-style: none; margin: 0 0 1.25rem; padding: 0; }
.rattaches-liste li { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 1rem; padding: 0.6rem 0; border-top: 1px solid var(--line); font-size: 14px; }
.rattaches-liste li:first-child { border-top: 0; }
.rattaches-liste form { margin-left: auto; }
.rattache-ref { font-weight: 600; font-size: 15px; font-variant-numeric: tabular-nums; }
.rattache-nom { font-weight: 600; font-size: 15px; overflow-wrap: anywhere; }
.assure-rattaches .panneau-sous { margin: -0.4rem 0 1rem; }
.rattacher-ligne.rattacher-ligne-2 { grid-template-columns: minmax(0, 1fr) auto; }
.noms-resultats { margin-top: 0.25rem; }
.noms-liste { list-style: none; margin: 0.6rem 0 1rem; padding: 0; border: 1px solid var(--line); border-radius: 8px; max-height: 24rem; overflow: auto; }
.noms-liste li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.2rem 1rem; padding: 0.55rem 0.85rem; border-top: 1px solid var(--line); }
.noms-liste li:first-child { border-top: 0; }
.noms-liste .case { margin: 0; }
.nom-texte { font-weight: 600; overflow-wrap: anywhere; }
.nom-nb { font-size: 13px; color: var(--ink-soft); white-space: nowrap; }
.rattacher { padding-top: 1.1rem; border-top: 1px solid var(--line-strong); }
.rattacher h3 { font-size: 1rem; margin: 0 0 0.7rem; }
.rattacher-ligne { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 0 1rem; align-items: end; }
.rattacher-ligne .btn { margin-bottom: 1rem; }
.envoi-profil { display: inline-block; padding: 0.05rem 0.5rem; border-radius: 999px; border: 1px solid var(--line-strong); font-size: 12px; font-weight: 600; color: var(--ink-soft); }
@media (max-width: 700px) {
    .assure-note-agir .btn { width: 100%; justify-content: center; }
    .rattacher-ligne, .rattacher-ligne.rattacher-ligne-2 { grid-template-columns: minmax(0, 1fr); }
    .rattacher-ligne .btn { width: 100%; }
    .entete-actions .btn { flex: 1 1 auto; justify-content: center; }
}

/* ---------- Envoi de pièces (intermédiaire) et pièces reçues (cabinet) ---------- */

input[type="file"] {
    width: 100%; min-height: 42px; padding: 0.4rem 0.5rem; font: inherit; font-size: 14px; color: var(--ink);
    background: var(--paper-2); border: 1px dashed var(--line-strong); border-radius: var(--rayon); cursor: pointer;
}
input[type="file"]::file-selector-button {
    font: inherit; font-size: 13px; font-weight: 600; margin-right: 0.75rem; padding: 0.3rem 0.8rem; cursor: pointer;
    color: var(--ink); background: var(--card); border: 1px solid var(--line-strong); border-radius: 6px;
}
.envoyer .flash { margin: 0.6rem 0 1rem; }
.formulaire-envoi { margin-top: 0.9rem; }
.envoi-controle { color: var(--st-rouge-tx); font-weight: 600; }
.envoi-controle.envoi-ok { color: var(--ink-soft); font-weight: 400; }
.envois-faits { margin-top: 1.5rem; padding-top: 1.1rem; border-top: 1px solid var(--line); scroll-margin-top: 5rem; }
.envois-faits h3 { font-size: 1rem; margin: 0 0 0.6rem; }
.envois-liste, .envois-recus { list-style: none; margin: 0; padding: 0; }
.envoi-fait { padding: 0.75rem 0; border-top: 1px solid var(--line); }
.envoi-fait:first-child { border-top: 0; padding-top: 0; }
.envoi-fait-tete { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.6rem; margin: 0; font-size: 14px; }
.envoi-message { margin: 0.4rem 0 0; font-size: 14px; overflow-wrap: anywhere; }
.envoi-note { margin: 0.4rem 0 0; font-size: 14px; padding: 0.45rem 0.7rem; border-left: 3px solid var(--accent); background: var(--hover); border-radius: 0 6px 6px 0; overflow-wrap: anywhere; }
.envoi-pieces { margin: 0.4rem 0 0; font-size: 13px; display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; overflow-wrap: anywhere; }
.envoye { display: inline-block; margin-left: 0.35rem; font-size: 12px; font-weight: 600; color: var(--st-vert-tx); white-space: nowrap; }

.onglets { display: flex; gap: 0.4rem; margin: -0.6rem 0 1.25rem; border-bottom: 1px solid var(--line); }
.onglets a {
    display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.55rem 0.9rem; text-decoration: none; color: var(--ink-soft);
    font-weight: 600; font-size: 14px; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.onglets a:hover { color: var(--ink); }
.onglets a.actif { color: var(--ink); border-bottom-color: var(--accent); }
.nav-compte {
    display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-left: 0.4rem; padding: 0 0.35rem; border-radius: 10px;
    font-size: 12px; font-weight: 700; background: var(--accent); color: var(--ink);
}
.envoi-recu { margin-bottom: 1rem; padding: 1.2rem 1.4rem; max-width: 60rem; }
.envoi-tete { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0.3rem 1rem; }
.envoi-ref { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }
.envoi-dossier { font-weight: 600; font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.envoi-meta { margin: 0; font-size: 13px; color: var(--ink-soft); }
.envoi-compte { margin: 0.5rem 0 0.2rem; font-size: 14px; overflow-wrap: anywhere; }
.envoi-recu .fichiers { margin-top: 0.6rem; }
.envoi-traiter { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.75rem; margin-top: 0.9rem; padding-top: 0.9rem; border-top: 1px solid var(--line); }
.envoi-traiter .champ { flex: 1 1 18rem; margin: 0; }
.envoi-pied { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.6rem; margin-top: 0.8rem; padding-top: 0.8rem; border-top: 1px solid var(--line); }
@media (max-width: 700px) {
    .envoi-recu { padding: 14px 16px; }
    .envoi-traiter .btn { width: 100%; }
    .onglets { margin-top: 0; }
}

/* ---------- Ma file de travail (accueil des intermédiaires) ---------- */

.file { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.file-principal { flex: 999 1 640px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.file-cote { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.file-cote .carte { margin: 0; padding: 16px; }
.file-date { margin: 0; color: var(--ink-soft); font-weight: 500; }
.file-tete h1 { margin-top: 4px; }
.file-tete .chapeau { max-width: none; }

/* Onglets (liens : fonctionnent sans JavaScript) : vues de la file, volets de la fiche */
.onglets-file, .onglets-fiche { position: relative; display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--line); }
.onglets-file a, .onglets-fiche a {
    display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; margin-bottom: -1px;
    border-bottom: 3px solid transparent; color: var(--ink-soft); font-weight: 500; text-decoration: none; white-space: nowrap;
}
.onglets-file a:hover, .onglets-fiche a:hover { color: var(--ink); }
.onglets-file a.actif, .onglets-fiche a[aria-selected="true"] { color: var(--ink); font-weight: 600; border-bottom-color: var(--accent); }
.onglet-nb { background: var(--line); color: var(--ink); border-radius: 10px; padding: 1px 8px; font-size: 12px; font-weight: 600; }
.actif .onglet-nb { background: var(--accent); color: #fff; }
:root[data-theme="dark"] .actif .onglet-nb { color: #0e161d; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .actif .onglet-nb { color: #0e161d; } }

.pastilles { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pastilles-titre { color: var(--ink-soft); font-weight: 500; margin-right: 4px; }
.pastille-filtre {
    display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 18px;
    background: var(--card); color: var(--ink); border: 1px solid var(--line-strong); font-size: 13px; font-weight: 500; text-decoration: none;
}
.pastille-filtre:hover { border-color: var(--ink); color: var(--ink); }
.pastille-filtre.actif { background: var(--ink); color: var(--card); border-color: var(--ink); font-weight: 600; }

.file-boite { background: var(--card); border: 1px solid var(--line); border-radius: var(--rayon); overflow: hidden; }
.file-defile { position: relative; overflow-x: auto; }
.file-entetes, .fl {
    display: grid; grid-template-columns: 120px minmax(0, 1.5fr) minmax(0, 1.2fr) minmax(0, 1.2fr) 56px 124px;
    gap: 16px; align-items: center; min-width: 860px; padding: 12px 16px;
}
.file-entetes { padding-top: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); color: var(--ink-soft); font-size: 12px; font-weight: 600; }
.file-lignes { list-style: none; margin: 0; padding: 0; }
.fl { position: relative; border-bottom: 1px solid var(--line-soft); }
.fl:last-child { border-bottom: 0; }
.fl:hover { background: var(--hover); }
.fl-choisie, .fl-choisie:hover { background: var(--accent-tint); box-shadow: inset 4px 0 0 var(--accent); }
.fl-plaque { justify-self: start; min-width: 0; }
.fl-dossier { min-width: 0; text-decoration: none; color: var(--ink); }
.fl-dossier::after { content: ""; position: absolute; inset: 0; }             /* toute la ligne ouvre le dossier */
.fl-dossier:hover { color: var(--ink); }
.fl-dossier:focus-visible { outline: none; }
.fl-dossier:focus-visible::after { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 4px; }
.fl-vehicule { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fl-assure { display: block; color: var(--ink-soft); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fl-mat { display: none; }
.fl-etape { min-width: 0; }
.fl-etape-texte { display: block; margin-top: 4px; font-size: 13px; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.piste { display: flex; gap: 3px; }
.seg { flex: 1; height: 6px; border-radius: 3px; background: var(--todo); }
.seg-fait { background: var(--accent); }
.seg-attente { background: var(--wait); }
.fl-attendu { min-width: 0; }
.fl-attendu .badge { white-space: normal; }
.attendu { display: inline-flex; align-items: center; gap: 8px; color: var(--wait-tx); font-weight: 600; font-size: 13px; }
.fl-depuis { color: var(--ink-soft); font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.fl-ancien { color: var(--red); font-weight: 600; }
.fl-action { justify-self: end; position: relative; z-index: 1; }
.fl-action .envoye { margin: 0; white-space: normal; text-align: right; display: block; }
.file-pied {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px;
    margin: 0; padding: 8px 16px; border-top: 1px solid var(--line); font-size: 13px;
}
.file-pied > a { font-weight: 600; display: inline-flex; align-items: center; min-height: 32px; }
.file-ordre { margin-left: auto; }
.file-vide { margin: 0; padding: 28px 20px; text-align: center; color: var(--ink-soft); background: var(--card); border: 1px solid var(--line); border-radius: var(--rayon); }
.file-astuce { display: none; margin: 0; color: var(--ink-soft); font-size: 13px; }
.file-titre-etroit { display: none; margin: 0; font-weight: 600; }
.file-titre-etroit span { color: var(--ink-soft); font-weight: 500; }

.panneau-cote h2 { font-size: 15px; margin-bottom: 10px; }
.etapes-nb, .suivis { list-style: none; margin: 0; padding: 0; }
.etape-nb { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 6px 0; text-decoration: none; color: var(--ink); font-size: 13px; }
a.etape-nb:hover { color: var(--ink); }
a.etape-nb:hover .etape-nb-libelle { text-decoration: underline; text-underline-offset: 3px; }
.etape-nb-nombre { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.etape-nb-barre { grid-column: 1 / -1; display: block; width: 100%; height: 6px; }
.etape-nb-barre .fond { fill: var(--line-soft); }
.etape-nb-barre .plein { fill: var(--accent); }
.etape-nb-vide { color: var(--ink-soft); }
.suivi { display: flex; gap: 10px; align-items: baseline; padding: 8px 0; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--line-soft); }
.suivis li:last-child .suivi { border-bottom: 0; }
.suivi:hover { color: var(--ink); }
.suivi:hover .suivi-titre { text-decoration: underline; text-underline-offset: 3px; }
.suivi-point { width: 8px; height: 8px; border-radius: 50%; flex: none; border: 1.5px solid #9aa6b2; }
.suivi-bouge { background: var(--accent); border-color: var(--accent); }
.suivi-texte { min-width: 0; }
.suivi-titre { display: block; font-weight: 600; }
.suivi-etat { display: block; font-size: 13px; color: var(--ink-soft); }

/* ---------- Liste et dossier côte à côte ---------- */

.md-panneau { background: var(--card); border: 1px solid var(--line); border-radius: var(--rayon); min-width: 0; outline: none; }
.md-barre { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 8px 0 24px; }
.md-retour { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; color: var(--ink-soft); font-weight: 500; text-decoration: none; }
.md-retour:hover { color: var(--ink); }
.md-fermer { border-color: transparent; }
.md-corps { padding: 0 24px 24px; }
.md-corps.charge { opacity: 0.5; }
.md-attente { margin: 0; padding: 24px 0; color: var(--ink-soft); }
.md-ouvert .md-masquer { display: none !important; }
.md-ouvert .file { display: block; }
.md-ouvert .file-principal { gap: 0; }
.md-ouvert .file-boite { border: 0; border-radius: 0; }
.md-ouvert .file-titre-etroit { display: block; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.md-ouvert .file-pied { padding: 8px 16px; }
.md-ouvert .file-vide { border: 0; }

/* Écran étroit : le dossier ouvert prend toute la place, la liste revient par « Retour » */
@media (max-width: 999px) {
    .md-ouvert .md-liste { display: none; }
    .md-fermer { display: none; }
    .md-barre { padding: 4px 16px 0; }
    .md-corps { padding: 0 16px 16px; }
}
@media (min-width: 1000px) {
    .js .file-astuce { display: block; }
    .md-ouvert { display: grid; grid-template-columns: minmax(280px, 340px) minmax(0, 1fr); gap: 20px; align-items: start; }
    .md-ouvert .md-liste {
        position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow-y: auto;
        background: var(--card); border: 1px solid var(--line); border-radius: var(--rayon);
    }
    .md-ouvert .md-retour { visibility: hidden; }

    /* La file devient une liste étroite : véhicule et durée, assuré et matricule, ce qu'il faut */
    .md-ouvert .file-entetes, .md-ouvert .fl-plaque, .md-ouvert .fl-etape, .md-ouvert .fl-action { display: none; }
    .md-ouvert .file-defile { overflow: visible; }
    .md-ouvert .fl { min-width: 0; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "dossier depuis" "attendu attendu"; gap: 2px 8px; padding: 10px 16px; align-items: start; }
    .md-ouvert .fl-dossier { grid-area: dossier; }
    .md-ouvert .fl-depuis { grid-area: depuis; font-size: 12px; }
    .md-ouvert .fl-attendu { grid-area: attendu; }
    .md-ouvert .fl-mat { display: inline; }

    /* Le tableau des dossiers devient la même liste étroite */
    .md-ouvert .resultats-tete { margin: 0; padding: 12px 16px; border-bottom: 1px solid var(--line); }
    .md-ouvert .carte-tableau { border: 0; border-radius: 0; margin: 0; }
    .md-ouvert .tableau-defilant { overflow: visible; }
    .md-ouvert .tableau-dossiers, .md-ouvert .tableau-dossiers tbody { display: block; }
    .md-ouvert .tableau-dossiers thead, .md-ouvert .tableau-dossiers td { display: none; }
    .md-ouvert .tableau-dossiers tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; padding: 10px 16px; border-bottom: 1px solid var(--line-soft); }
    .md-ouvert .tableau-dossiers td.cellule-ref, .md-ouvert .tableau-dossiers td.cellule-assure,
    .md-ouvert .tableau-dossiers td.cellule-matricule, .md-ouvert .tableau-dossiers td.cellule-etat { display: block; padding: 0; border: 0; min-width: 0; max-width: none; }
    .md-ouvert .tableau-dossiers td.cellule-assure { grid-column: 1 / -1; grid-row: 2; color: var(--ink-soft); font-size: 13px; font-weight: 400; }
    .md-ouvert .tableau-dossiers td.cellule-matricule { grid-column: 2; grid-row: 1; }
    .md-ouvert .tableau-dossiers td.cellule-etat { grid-column: 1 / -1; grid-row: 3; }
    .md-ouvert .tableau-dossiers .nature, .md-ouvert .tableau-dossiers .ww, .md-ouvert .tableau-dossiers .sous-etat { display: none; }
    .md-ouvert .tableau-dossiers .depuis-le { display: inline; margin-left: 6px; }
    .md-ouvert .pagination { margin: 12px 8px; }
}

/* ---------- Fiche d'un dossier (page du dossier et panneau à côté d'une liste) ---------- */

.feuille-fiche { background: var(--card); border: 1px solid var(--line); border-radius: var(--rayon); padding: 24px; }
.fiche { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.fiche-tete { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; justify-content: space-between; }
.fiche-identite { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; min-width: 0; }
.fiche-noms { min-width: 0; }
.fiche-titre { margin: 0; font-size: 24px; line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; overflow-wrap: anywhere; outline: none; }
.fiche-sous { margin: 2px 0 0; color: var(--ink-soft); overflow-wrap: anywhere; }
.fiche-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.fiche-actions form { margin: 0; }
.fiche-actions .btn { font-size: 13px; padding: 0 12px; }
.btn-suivre .ic { stroke: var(--ink); }
.fiche-note { margin: 0; padding: 10px 14px; border-radius: 8px; background: var(--st-bleu-bg); border: 1px solid var(--st-bleu-bd); color: var(--st-bleu-tx); }
.fiche-introuvable { padding: 24px 0; }
.fiche-introuvable p { margin: 8px 0 0; color: var(--ink-soft); }

/* Où en est le dossier : neutre, ambre (le dossier attend le compte), vert (validé), gris (annulé, carence) */
.statut {
    display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between;
    padding: 16px; border-radius: var(--rayon); background: var(--paper-2); border: 1px solid var(--line); color: var(--ink);
}
.statut-texte { flex: 1 1 320px; min-width: 0; }
.statut-phrase { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.3; }
.statut-detail { margin: 2px 0 0; color: var(--ink-soft); }
.statut-attente { background: var(--wait-bg); border-color: var(--wait-bd); color: var(--wait-strong); }
.statut-attente .statut-detail { color: var(--wait-strong); }
.statut-valide { background: var(--st-vert-bg); border-color: var(--st-vert-bd); color: var(--st-vert-tx); }
.statut-valide .statut-detail { color: var(--st-vert-tx); }
.statut-clos { background: var(--st-gris-bg); border-color: var(--st-gris-bd); color: var(--st-gris-tx); }
.statut-clos .statut-detail { color: var(--st-gris-tx); }
.btn-envoyer { min-height: 44px; padding: 0 18px; }

/* Les étapes du parcours, avec leur date */
.etapes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.etp { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.etp-barre { height: 6px; border-radius: 3px; background: var(--todo); }
.etp-libelle { font-size: 12px; color: var(--ink-soft); line-height: 1.3; }
.etp-date { font-size: 12px; color: var(--ink-soft); font-variant-numeric: tabular-nums; margin-top: -4px; }
.etp-faite .etp-barre, .etp-courante .etp-barre { background: var(--accent); }
.etp-faite .etp-libelle, .etp-courante .etp-libelle { color: var(--ink); font-weight: 600; }
.etapes-attente .etp-courante .etp-barre { background: var(--wait); }
.etapes-attente .etp-courante .etp-libelle, .etapes-attente .etp-courante .etp-date { color: var(--wait-tx); }
.etapes-attente .etp-courante .etp-date { font-weight: 600; }

/* Volets : tous affichés sans JavaScript (et à l'impression) ; app.js en fait des onglets */
.volet { min-width: 0; scroll-margin-top: 12px; }
.volet-titre { font-size: 17px; margin: 0 0 10px; }
.volet-note { margin: 0 0 12px; color: var(--ink-soft); font-size: 13px; }
.onglets-actifs .volet-titre { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.onglets-actifs .volet.volet-cache { display: none; }
.onglets-actifs .volet:focus-visible { outline-offset: 6px; }
html:not(.js) .volet + .volet, html:not(.js) .envoyer { padding-top: 20px; border-top: 1px solid var(--line); }

.resume-blocs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 32px; align-items: start; }
.resume-bloc h3 { margin: 0 0 6px; font-size: 13px; font-weight: 600; color: var(--ink-soft); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.resume-interne { padding: 12px 14px; border: 1px dashed var(--line-strong); border-radius: 8px; background: var(--paper-2); }
.info-rdv dd { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.rdv-detail { font-weight: 400; color: var(--ink-soft); font-size: 13px; }
.rdv-agenda { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; font-size: 13px; font-weight: 600; }
.resume-photos { margin-top: 20px; }
.resume-photos-tete { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 16px; margin-bottom: 8px; }
.resume-photos-tete h3 { font-size: 15px; }
.resume-photos-tete a { font-weight: 600; font-size: 13px; }
.bande { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.bande-plus {
    display: grid; place-items: center; aspect-ratio: 4 / 3; border-radius: 6px; background: var(--line-soft); border: 1px solid var(--line);
    color: var(--ink); font-weight: 600; text-decoration: none;
}
.bande-plus:hover { border-color: var(--accent); color: var(--ink); }

.documents-tete { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.onglets-actifs .documents-compte { margin-bottom: 4px; }
.envoyer { padding-top: 20px; border-top: 1px solid var(--line); scroll-margin-top: 12px; }
.envoyer > h2 { margin-bottom: 4px; }

@media (max-width: 1100px) {
    .fiche-panneau .etp-libelle { font-size: 11px; }
}
@media (max-width: 700px) {
    .feuille-fiche { padding: 16px; }
    .fiche { gap: 16px; }
    .fiche-titre { font-size: 20px; }
    .fiche-actions { width: 100%; }
    .fiche-actions .btn, .fiche-actions form { flex: 1 1 auto; }
    .fiche-actions form .btn { width: 100%; }
    .statut .btn-envoyer { width: 100%; }
    .statut-phrase { font-size: 16px; }
    /* Étapes en colonne : un repère à gauche, le libellé, la date à droite */
    .etapes { grid-template-columns: minmax(0, 1fr); gap: 4px; }
    .etp { display: grid; grid-template-columns: 6px minmax(0, 1fr) auto; gap: 0 10px; align-items: center; min-height: 28px; }
    .etp-barre { height: 100%; min-height: 24px; }
    .etp-libelle { font-size: 13px; }
    .etp-date { margin: 0; }
    .onglets-fiche { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px; }
    .resume-blocs { grid-template-columns: minmax(0, 1fr); }
    .bande { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .onglets-file { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px; }
    .onglets-file a, .onglets-fiche a { padding: 0 10px; }
    .file { gap: 16px; }
    .file-ordre { margin-left: 0; }
    /* La file en fiches empilées : pas de défilement horizontal au téléphone */
    .file-entetes, .fl-plaque { display: none; }
    .file-defile { overflow: visible; }
    .fl { min-width: 0; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "dossier depuis" "etape etape" "attendu action"; gap: 8px 12px; padding: 12px 16px; }
    .fl-dossier { grid-area: dossier; }
    .fl-depuis { grid-area: depuis; align-self: start; }
    .fl-etape { grid-area: etape; }
    .fl-attendu { grid-area: attendu; }
    .fl-action { grid-area: action; }
    .fl-mat { display: inline; }
    .fl-assure { white-space: normal; }
}

/* ---------- Impression : rapport sobre, une colonne, sur blanc ---------- */

@media print {
    :root, :root[data-theme="dark"], :root:not([data-theme="light"]) {
        --ink: #000; --ink-soft: #444; --paper: #fff; --paper-2: #fff; --card: #fff; --line: #bbb; --line-strong: #888; --line-soft: #ccc;
        --accent: #000; --accent-hover: #000; --accent-tint: #fff; --todo: #ccc; --wait: #555; --wait-tx: #000; --wait-strong: #000;
        --wait-bg: #fff; --wait-bd: #888; --chart-1: #000; --plate-bg: #fff; --red: #000; --green: #000; --amber: #000;
        --hover: #fff; --btn-bg: #000; --btn-tx: #fff;
        --st-vert-pt: #2f7a56; --st-orange-pt: #c2620e; --st-rouge-pt: #b5473c; --st-bleu-pt: #3f6fa3; --st-violet-pt: #7a5ca8; --st-gris-pt: #7c8894;
        --st-vert-bg: #fff; --st-vert-tx: #000; --st-vert-bd: #888; --st-orange-bg: #fff; --st-orange-tx: #000; --st-orange-bd: #888;
        --st-gris-bg: #fff; --st-gris-tx: #000; --st-gris-bd: #888; --st-bleu-bg: #fff; --st-bleu-tx: #000; --st-bleu-bd: #888;
        color-scheme: light;
    }
    @page { margin: 1.4cm 1.4cm 1.6cm; }
    html, body { background: #fff !important; color: #000; }
    body { font-size: 10.5pt; min-height: 0; display: block; }
    .bandeau, .pied, .retour, .actions, .btn, .lien-evitement, .flashes, .lightbox, .fiche-actions, .onglets-fiche, .onglets-file, .onglets,
    .zone-danger, .recherche, .criteres-actifs, .recherches-enr, .pagination, .btn-etoile, .btn-apercu, .rdv-agenda, .envoyer,
    .md-barre, .file-astuce, .pastilles, .file-ordre, .resume-photos, .toast { display: none !important; }
    .principal { max-width: none; padding: 0; }
    .carte, .feuille, .feuille-fiche, .md-panneau, .file-boite { border-color: #999; }
    .feuille-fiche, .md-panneau { border: 0; padding: 0; }
    .md-ouvert .md-liste { display: none !important; }      /* dossier ouvert à côté d'une liste : on imprime le dossier */
    .md-ouvert { display: block; }
    .accueil-grille, .file { display: block; }
    .carte, .statut, .resume-bloc, .etape { break-inside: avoid; }
    .carte { margin-bottom: 0.6cm; }
    /* Tous les volets de la fiche, avec leur titre */
    .onglets-actifs .volet.volet-cache { display: block; }
    .onglets-actifs .volet-titre { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; }
    .volet + .volet { padding-top: 0.4cm; border-top: 1px solid #999; }
    .documents .groupe-doc { display: none !important; }
    .documents .impression-seulement { display: block; font-size: 9.5pt; }
    .documents .impression-seulement ul { margin: 0; padding-left: 1.1rem; }
    .badge { background: #fff !important; color: #000 !important; border-color: #666 !important; }
    .etp-barre, .seg, .pe { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
    .file-defile { overflow: visible; }
    a { color: #000; text-decoration: none; }
    .tableau th { background: #eee !important; }
}

/* ---------- Dossiers anormalement lents (administration) ---------- */
.avis-lenteurs { display: flex; align-items: center; gap: 0.5rem 0.9rem; flex-wrap: wrap; text-decoration: none; color: var(--ink); padding: 12px 20px; }
.avis-lenteurs:hover { border-color: var(--accent); background: var(--hover); color: var(--ink); }
.avis-nombre {
    display: inline-grid; place-items: center; min-width: 38px; height: 32px; padding: 0 0.6rem; border-radius: 16px; font-weight: 600;
    font-variant-numeric: tabular-nums; background: var(--st-gris-bg); color: var(--st-gris-tx); border: 1px solid var(--st-gris-bd);
}
.avis-nombre-actif { background: var(--wait-bg); color: var(--wait-tx); border-color: var(--wait-bd); }
.avis-texte { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.1rem 0.75rem; flex: 1 1 14rem; min-width: 0; }
.avis-texte .muted { font-size: 13px; }
.avis-lien { display: inline-flex; align-items: center; gap: 0.25rem; font-weight: 600; font-size: 14px; color: var(--accent); white-space: nowrap; }
.avis-lien .ic { width: 16px; height: 16px; transform: rotate(180deg); }

.lenteurs-bilan { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0.25rem 1.5rem; margin: -4px 0 16px; }
.lenteurs-bilan strong { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.lenteurs-date { font-size: 13px; color: var(--ink-soft); }
.lenteurs-filtres { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; }
.lenteurs-filtres .champ { flex: 1 1 15rem; max-width: 24rem; margin: 0; }
.lenteurs-filtres-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.lenteurs-vide { padding: 1.4rem 1.1rem; margin: 0; }
.tableau-lenteurs .col-nombre { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tableau-lenteurs .lenteurs-ref { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lenteurs-etape { display: block; font-weight: 500; }
.lenteurs-etat, .lenteurs-sous { display: block; font-size: 13px; color: var(--ink-soft); margin-top: 0.15rem; }
.lenteurs-jours { display: block; font-weight: 600; color: var(--wait-tx); }
.lenteurs-methode { max-width: 60rem; }
.lenteurs-methode h2, .lenteurs-absent h2 { font-size: 16px; margin: 0 0 0.5rem; }
.lenteurs-methode ul { margin: 0 0 0.6rem; padding-left: 1.15rem; }
.lenteurs-methode li { margin-bottom: 0.3rem; }
.lenteurs-absent { max-width: 46rem; }
.commande {
    margin: 0.4rem 0 0.8rem; padding: 0.7rem 0.9rem; background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--rayon-btn);
    font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 13px; overflow-x: auto; white-space: pre;
}
.lenteurs-recalcul { max-width: 46rem; }
.lenteurs-recalcul summary { cursor: pointer; font-weight: 600; color: var(--ink-soft); min-height: 28px; }
.lenteurs-recalcul[open] summary { color: var(--ink); margin-bottom: 0.6rem; }
.lenteurs-recalcul .case { margin: 0.8rem 0 !important; }
.lenteurs-recalcul .aide { margin-top: 0.7rem; }
@media (max-width: 900px) {
    .page-lenteurs .carte-tableau { padding: 0; }
    .page-lenteurs .lenteurs-vide { background: var(--card); border: 1px solid var(--line); border-radius: var(--rayon); }
    .tableau-lenteurs .col-nombre { text-align: left; white-space: normal; }
    .lenteurs-filtres .champ { flex-basis: 100%; max-width: none; }
    .lenteurs-filtres-actions { width: 100%; }
    .lenteurs-filtres-actions .btn { flex: 1; }
}
@media print {
    .lenteurs-filtres, .lenteurs-recalcul, .avis-lenteurs { display: none !important; }
    .page-lenteurs .carte-tableau { break-inside: auto; }   /* la liste court sur plusieurs feuilles */
    .page-lenteurs .carte-tableau, .page-lenteurs .tableau-defilant { overflow: visible; }
    .tableau-lenteurs { font-size: 9pt; }
    .tableau-lenteurs td { padding-top: 5px; padding-bottom: 5px; }
    .tableau-lenteurs tr { break-inside: avoid; }
}
