/* ═══════════════════════════════════════════════════════════════════════════════════════════════
   DÉCOMPTES GUIDÉS (js/188, 10.10.2026)
   Un écran, trois étapes : importer, rapprocher, dater par la banque. Le fil d'étapes reste visible
   en haut ; la liste « À terminer » passe sous le panneau en dessous de 960 px. À 375 px, chaque
   tableau devient une pile de cartes, le libellé écrit devant la valeur.
   ═══════════════════════════════════════════════════════════════════════════════════════════════ */

.dg { --dg-r: 14px; max-width: 1400px; margin: 0 auto; }
.dg-tete .dx-sous { max-width: 680px; }
.dg-lecteur { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Le fil d'étapes ─────────────────────────────────────────────────────────────────────────── */
.dg-fil { margin: 4px 0 18px; }
.dg-fil ol { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; counter-reset: dg; }
.dg-fil li { flex: 1 1 0; min-width: 0; position: relative; }
.dg-fil li + li::before { content: ''; position: absolute; left: -8px; top: 50%; width: 8px; height: 2px; background: var(--border); }
.dg-etape { width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; cursor: pointer;
  padding: 10px 14px; border-radius: var(--dg-r); border: 1px solid var(--border); background: var(--surface);
  color: var(--text-muted); font: inherit; transition: border-color .15s, background .15s; }
.dg-etape:hover { border-color: var(--accent-border); }
.dg-etape:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dg-num { flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: var(--t-s, 12.5px); background: var(--surface-alt); color: var(--text-muted); border: 1px solid var(--border); }
.dg-etape-texte { display: flex; flex-direction: column; min-width: 0; }
.dg-etape-texte b { font-size: var(--t-m, 13.5px); font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dg-etape-texte small { font-size: var(--t-xs, 11px); color: var(--text-muted); }
.dg-etape.est-actif { border-color: var(--accent); background: var(--accent-dim); }
.dg-etape.est-actif .dg-num { background: var(--accent); color: var(--on-accent, #fff); border-color: var(--accent); }
.dg-etape.est-fait .dg-num { background: color-mix(in srgb, var(--c-succes, #22c55e) 18%, transparent); color: var(--c-succes-texte, #15803d);
  border-color: color-mix(in srgb, var(--c-succes, #22c55e) 45%, transparent); }
.dg-etape.est-fait .dg-etape-texte small { color: var(--c-succes-texte, #15803d); }
.dg-etape.est-saute .dg-etape-texte small { font-style: italic; }

/* ── La grille : panneau + « À terminer » ────────────────────────────────────────────────────── */
.dg-grille { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 330px); gap: 18px; align-items: start; }
.dg-panneau, .dg-aside { border-radius: var(--dbx-r, 18px); }
.dg-panneau-titre { font-size: var(--t-l, 15px); font-weight: 600; color: var(--text); margin: 0 0 12px; }
/* Le titre reçoit le focus par programme (changement d'étape) pour que le lecteur d'écran l'annonce :
   ce n'est pas une commande, il ne porte donc pas d'anneau de focus (tabindex="-1"). */
.dg-panneau-titre:focus, .dg-panneau-titre:focus-visible { outline: none; }
.dg-sous-titre { font-size: var(--t-s, 12.5px); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); margin: 16px 0 8px; }
.dg-sous-titre:focus { outline: none; }

/* ── La zone de dépôt ────────────────────────────────────────────────────────────────────────── */
.dg-depot { border: 1.5px dashed var(--accent-border); border-radius: var(--dg-r); padding: 26px 18px; text-align: center;
  background: color-mix(in srgb, var(--accent) 4%, transparent); transition: background .15s, border-color .15s; }
.dg-depot.survol { background: color-mix(in srgb, var(--accent) 10%, transparent); border-color: var(--accent); }
.dg-depot-icone { font-size: 30px; line-height: 1; }
.dg-depot-titre { font-size: var(--t-l, 15px); font-weight: 600; color: var(--text); margin: 8px 0 4px; }
.dg-depot-formats { font-size: var(--t-s, 12.5px); color: var(--text-muted); margin: 0 0 14px; }
.dg-depot-boutons { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.dg-bouton-fichier { position: relative; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; min-height: 44px; }
.dg-bouton-fichier:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.dg-input-cache { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; clip: rect(0 0 0 0); }
.dg-outlook { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.dg-outlook #imp-outlook-liste { width: 100%; }

.dg-fichier { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--dg-r); background: var(--surface-alt); }
.dg-fichier-nom { min-width: 0; overflow-wrap: anywhere; font-size: var(--t-s, 12.5px); color: var(--text-muted); }
.dg-fichier-nom b { color: var(--text); }
.dg-fichier .dg-depot-boutons { justify-content: flex-end; }
.dg-fichier .dg-bouton-fichier { min-height: 38px; padding: 7px 12px; font-size: var(--t-s, 12.5px); }

/* ── Ce que j'ai lu ──────────────────────────────────────────────────────────────────────────── */
.dg-lu { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.dg-champ { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.dg-champ > label { font-size: var(--t-xs, 11px); font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .4px; }
.dg-champ small { font-size: var(--t-xs, 11px); color: var(--text-dim, var(--text-muted)); }
.dg-champ small.dg-a-saisir { color: var(--c-alerte-texte, #b45309); font-weight: 500; }
.dg-periode { display: flex; gap: 6px; }
.dg-periode select { flex: 1 1 auto; min-width: 0; }
.dg-periode input { flex: 0 0 86px; min-width: 0; }

/* ── Où ranger le décompte ───────────────────────────────────────────────────────────────────── */
.dg-cibles { border: 0; padding: 0; margin: 16px 0 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.dg-cibles legend { font-size: var(--t-s, 12.5px); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); margin-bottom: 8px; padding: 0; }
.dg-cible { display: flex; align-items: flex-start; gap: 10px; padding: 11px 13px; border: 1px solid var(--border); border-radius: var(--dg-r);
  background: var(--surface); cursor: pointer; transition: border-color .15s, background .15s; }
.dg-cible:hover { border-color: var(--accent-border); }
.dg-cible.actif { border-color: var(--accent); background: var(--accent-dim); }
.dg-cible input[type="radio"] { margin-top: 3px; flex: 0 0 auto; width: 18px; height: 18px; accent-color: var(--accent); }
.dg-cible:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
.dg-cible-corps { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dg-cible-corps b { font-size: var(--t-m, 13.5px); color: var(--text); font-weight: 600; overflow-wrap: anywhere; }
.dg-cible-corps small { font-size: var(--t-s, 12.5px); color: var(--text-muted); }
.dg-raisons { font-size: var(--t-xs, 11px); color: var(--text-dim, var(--text-muted)); }
.dg-encaisse { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: var(--t-s, 12.5px); color: var(--text-muted); }
.dg-encaisse select { width: auto; padding: 4px 8px; }
.dg-ecart { flex: 0 0 auto; align-self: center; font-size: var(--t-xs, 11px); font-weight: 600; border-radius: 999px; padding: 3px 9px; white-space: nowrap; border: 1px solid var(--border); }
.dg-ecart.ok { color: var(--c-succes-texte, #15803d); border-color: color-mix(in srgb, var(--c-succes, #22c55e) 40%, transparent); background: color-mix(in srgb, var(--c-succes, #22c55e) 10%, transparent); }
.dg-ecart.alerte { color: var(--c-alerte-texte, #b45309); border-color: color-mix(in srgb, var(--c-alerte, #f59e0b) 45%, transparent); background: color-mix(in srgb, var(--c-alerte, #f59e0b) 10%, transparent); }
.dg-case { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: var(--t-s, 12.5px); color: var(--text); cursor: pointer; }
.dg-case input { width: 18px; height: 18px; accent-color: var(--accent); }

/* ── Messages et actions ─────────────────────────────────────────────────────────────────────── */
.dg-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.dg-actions .btn-save, .dg-actions .btn-secondary { min-height: 42px; }
.dg-lien { background: none; border: 0; color: var(--accent); font: inherit; font-size: var(--t-s, 12.5px); font-weight: 500; cursor: pointer; padding: 8px 4px; text-decoration: underline; text-underline-offset: 3px; }
.dg-lien:hover { text-decoration-thickness: 2px; }
.dg-note { font-size: var(--t-s, 12.5px); color: var(--text-muted); margin: 8px 0; line-height: 1.5; }
.dg-note b { color: var(--text); }
.dg-alerte { font-size: var(--t-s, 12.5px); line-height: 1.5; margin: 10px 0; padding: 9px 12px; border-radius: 10px;
  color: var(--c-alerte-texte, #b45309); background: color-mix(in srgb, var(--c-alerte, #f59e0b) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--c-alerte, #f59e0b) 35%, transparent); }
.dg-ok { font-size: var(--t-m, 13.5px); margin: 10px 0; padding: 10px 12px; border-radius: 10px; color: var(--c-succes-texte, #15803d);
  background: color-mix(in srgb, var(--c-succes, #22c55e) 10%, transparent); border: 1px solid color-mix(in srgb, var(--c-succes, #22c55e) 35%, transparent); }
.dg-chargement { display: flex; align-items: center; gap: 10px; font-size: var(--t-s, 12.5px); color: var(--text-muted); padding: 14px 0; }
.dg-chargement .dbx-chargement { padding: 0; }
.dg-statut:empty { display: none; }
.dg-statut { font-size: var(--t-s, 12.5px); margin: 6px 0; }

/* ── ② Le moteur d'import (js/06) dans l'écran ───────────────────────────────────────────────── */
.dg-moteur-fichier { font-size: var(--t-s, 12.5px); color: var(--text-muted); margin: 4px 0; overflow-wrap: anywhere; }
.dg-options { margin: 8px 0 12px; border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; background: var(--surface-alt); }
.dg-options > summary { cursor: pointer; font-size: var(--t-s, 12.5px); color: var(--text-muted); }
.dg-options-corps { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; max-width: 420px; }
.dg-options-corps > label { font-size: var(--t-xs, 11px); font-weight: 600; color: var(--text-muted); text-transform: uppercase; }
.dg-radios { border: 0; padding: 0; margin: 4px 0 0; display: flex; flex-direction: column; gap: 6px; }
.dg-radios legend { font-size: var(--t-xs, 11px); font-weight: 600; color: var(--text-muted); text-transform: uppercase; padding: 0; margin-bottom: 4px; }
.dg-radios label { display: flex; align-items: center; gap: 8px; font-size: var(--t-s, 12.5px); color: var(--text); cursor: pointer; }
.dg-resume { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.dg-resume-puce { font-size: var(--t-xs, 11px); font-weight: 500; border-radius: 999px; padding: 3px 10px; border: 1px solid var(--border); background: var(--surface-alt); color: var(--text-muted); }
.dg-resume-puce.ok { color: var(--c-succes-texte, #15803d); border-color: color-mix(in srgb, var(--c-succes, #22c55e) 40%, transparent); }
.dg-resume-puce.alerte { color: var(--c-alerte-texte, #b45309); border-color: color-mix(in srgb, var(--c-alerte, #f59e0b) 45%, transparent); }
.dg-resume-puce.danger { color: var(--c-danger-texte, #b91c1c); border-color: color-mix(in srgb, var(--c-danger, #ef4444) 45%, transparent); }

/* ── ② Bordereau existant : chiffres et lignes ───────────────────────────────────────────────── */
.dg-chiffres { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 10px 0; }
.dg-chiffre { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 10px; background: var(--surface-alt); border: 1px solid var(--border); }
.dg-chiffre span { font-size: var(--t-xs, 11px); color: var(--text-muted); text-transform: uppercase; letter-spacing: .4px; font-weight: 500; }
.dg-chiffre b { font-size: 17px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.dg-chiffre.ok b { color: var(--c-succes-texte, #15803d); }
.dg-chiffre.alerte b { color: var(--c-alerte-texte, #b45309); }
.dg-lignes, .dg-credits, .dg-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.dg-lignes li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.dg-lignes li > span { display: flex; flex-direction: column; min-width: 0; }
.dg-lignes small { font-size: var(--t-xs, 11px); color: var(--text-muted); overflow-wrap: anywhere; }
.dg-montant { white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ── ③ Les crédits bancaires ─────────────────────────────────────────────────────────────────── */
.dg-credit { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: var(--dg-r); background: var(--surface); }
.dg-credit.exact { border-color: color-mix(in srgb, var(--c-succes, #22c55e) 45%, transparent); }
.dg-credit-corps { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; min-width: 0; flex: 1 1 260px; }
.dg-champ-ligne { display: inline-flex; flex-direction: column; min-width: 0; }
.dg-etiquette { font-size: var(--t-xs, 11px); color: var(--text-muted); text-transform: uppercase; letter-spacing: .4px; }
.dg-champ-ligne > span:last-child, .dg-champ-ligne > b { font-size: var(--t-m, 13.5px); color: var(--text); overflow-wrap: anywhere; }

/* ── « À terminer » ──────────────────────────────────────────────────────────────────────────── */
.dg-aside-titre { font-size: var(--t-l, 15px); font-weight: 600; color: var(--text); margin: 0; }
.dg-aside-sous { font-size: var(--t-xs, 11px); color: var(--text-muted); margin: 2px 0 10px; }
.dg-puces { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.dg-puce { font: inherit; font-size: var(--t-xs, 11px); font-weight: 500; border-radius: 999px; padding: 5px 10px; min-height: 30px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-muted); }
.dg-puce b { font-weight: 600; color: var(--text); margin-left: 2px; }
.dg-puce.actif { background: var(--accent); border-color: var(--accent); color: var(--on-accent, #fff); }
.dg-puce.actif b { color: inherit; }
.dg-puce:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dg-ligne { width: 100%; display: flex; flex-direction: column; gap: 4px; text-align: left; cursor: pointer; font: inherit;
  padding: 9px 11px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); transition: border-color .15s, background .15s; }
.dg-ligne:hover { border-color: var(--accent-border); }
.dg-ligne.actif { border-color: var(--accent); background: var(--accent-dim); }
.dg-ligne:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dg-ligne-tete { display: flex; justify-content: space-between; gap: 8px; }
.dg-ligne-tete b { font-size: var(--t-m, 13.5px); font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dg-ligne-montant { font-size: var(--t-s, 12.5px); color: var(--text-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.dg-ligne-sous { font-size: var(--t-xs, 11px); color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dg-pastilles { display: flex; flex-wrap: wrap; gap: 4px; }
.dg-p { font-size: 10.5px; font-weight: 500; border-radius: 999px; padding: 1px 7px; border: 1px solid var(--border); color: var(--text-muted); white-space: nowrap; }
.dg-p.ok { color: var(--c-succes-texte, #15803d); border-color: color-mix(in srgb, var(--c-succes, #22c55e) 40%, transparent); background: color-mix(in srgb, var(--c-succes, #22c55e) 8%, transparent); }
.dg-p.manque { color: var(--c-alerte-texte, #b45309); border-color: color-mix(in srgb, var(--c-alerte, #f59e0b) 45%, transparent); }
.dg-p.inconnu { opacity: .7; }

/* ── Mode avancé ─────────────────────────────────────────────────────────────────────────────── */
.dg-avance { position: relative; }
.dg-avance > summary { list-style: none; cursor: pointer; font-size: var(--t-s, 12.5px); font-weight: 500; color: var(--text-muted);
  border: 1px solid var(--border); border-radius: 9px; padding: 9px 14px; background: var(--surface); min-height: 40px; display: inline-flex; align-items: center; gap: 6px; }
.dg-avance > summary::-webkit-details-marker { display: none; }
.dg-avance > summary::after { content: '▾'; font-size: 11px; }
.dg-avance[open] > summary::after { content: '▴'; }
.dg-avance > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dg-avance-liste { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: min(320px, 90vw); display: flex; flex-direction: column; gap: 2px;
  padding: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 14px 34px rgba(0,0,0,.22); }
.dg-avance-liste p { font-size: var(--t-xs, 11px); color: var(--text-muted); margin: 2px 6px 6px; }
.dg-avance-liste button { text-align: left; font: inherit; font-size: var(--t-s, 12.5px); color: var(--text); background: none; border: 0; border-radius: 8px; padding: 9px 10px; cursor: pointer; }
.dg-avance-liste button:hover, .dg-avance-liste button:focus-visible { background: var(--accent-dim); color: var(--accent); outline: none; }

/* ── Le contrôle unique (js/81) : anomalies des commissions ──────────────────────────────────── */
.dg-ck { margin-top: 18px; }
.dg-ck > summary { cursor: pointer; display: flex; flex-direction: column; gap: 2px; list-style: none; }
.dg-ck > summary::-webkit-details-marker { display: none; }
.dg-ck-titre { font-size: var(--t-l, 15px); font-weight: 600; color: var(--text); }
.dg-ck-titre::before { content: '▸ '; color: var(--text-muted); }
.dg-ck[open] .dg-ck-titre::before { content: '▾ '; }
.dg-ck-sous { font-size: var(--t-xs, 11px); color: var(--text-muted); }
.dg-ck-corps { margin-top: 14px; max-width: none; }

/* ── Vue Bordereaux (js/07) : décompte joint / manquant ──────────────────────────────────────── */
.bd-compteur-sans { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 0 0 14px; padding: 8px 14px; min-height: 40px;
  font: inherit; font-size: var(--t-s, 12.5px); cursor: pointer; border-radius: 999px; color: var(--c-alerte-texte, #b45309);
  background: color-mix(in srgb, var(--c-alerte, #f59e0b) 10%, transparent); border: 1px solid color-mix(in srgb, var(--c-alerte, #f59e0b) 40%, transparent); }
.bd-compteur-sans:hover { background: color-mix(in srgb, var(--c-alerte, #f59e0b) 16%, transparent); }
.bd-compteur-sans:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.bd-compteur-action { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.bd-etat-manquant { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 3px 10px; font-size: 11.5px; font-weight: 500; white-space: nowrap;
  color: var(--c-alerte-texte, #b45309); background: color-mix(in srgb, var(--c-alerte, #f59e0b) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--c-alerte, #f59e0b) 40%, transparent); }
.bordereau-card.bd-sans-decompte { border-left: 3px solid color-mix(in srgb, var(--c-alerte, #f59e0b) 70%, transparent); }
.bordereau-header:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 10px; }
/* Un numéro « REL 24.08.2026 - Groupe Mutuel (d'après relevé bancaire) » ne pousse plus la carte. */
.bd-tete-ligne .bd-numero { max-width: 100%; white-space: normal; overflow-wrap: anywhere; flex: 0 1 auto; }
.cmx-compte { font-style: normal; font-size: 10.5px; font-weight: 500; margin-left: 4px; border-radius: 999px; padding: 1px 7px; vertical-align: middle;
  color: var(--c-alerte-texte, #b45309); border: 1px solid color-mix(in srgb, var(--c-alerte, #f59e0b) 45%, transparent); }

/* ── Mobile ──────────────────────────────────────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .dg-grille { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .dg-fil ol { gap: 6px; }
  .dg-fil li + li::before { display: none; }
  .dg-etape { flex-direction: column; align-items: flex-start; gap: 4px; padding: 8px 10px; }
  .dg-etape-texte b { white-space: normal; font-size: var(--t-s, 12.5px); }
  .dg-lu { grid-template-columns: minmax(0, 1fr); }
  .dg-panneau.dbx-carte, .dg-aside.dbx-carte { padding: 16px 14px; }
  .dg-cible { flex-wrap: wrap; }
  .dg-cible-corps { flex: 1 1 calc(100% - 40px); }
  .dg-ecart { margin-left: 28px; }
  .dg-actions > * { flex: 1 1 100%; justify-content: center; text-align: center; }
  .dg-actions .dg-lien { flex: 0 1 auto; }
  .dg-credit > .btn-save { flex: 1 1 100%; }
  .dg-tete .dx-tete-actions { width: 100%; }
  .dg-avance-liste { left: 0; right: auto; }

  /* Le tableau du moteur d'import (js/06) : une carte par ligne, le libellé devant la valeur. */
  .dg-moteur [style*="overflow-x"] { overflow-x: visible !important; }
  .dg-table-cartes { min-width: 0 !important; width: 100% !important; }
  .dg-table-cartes thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .dg-table-cartes, .dg-table-cartes tbody, .dg-table-cartes tr, .dg-table-cartes td, .dg-table-cartes tfoot { display: block; }
  .dg-table-cartes tbody tr { border: 1px solid var(--border) !important; border-radius: 12px; padding: 8px 10px; margin-bottom: 10px; background: var(--surface); }
  .dg-table-cartes td { display: flex !important; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 4px 0 !important;
    white-space: normal !important; text-align: right !important; border: 0 !important; }
  .dg-table-cartes td::before { content: attr(data-label); flex: 0 0 40%; text-align: left; font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .3px; }
  .dg-table-cartes td[data-label=""]::before { content: none; }
  .dg-table-cartes td > * { max-width: 60%; }
  .dg-table-cartes tfoot td { justify-content: flex-end; }
  .dg-table-cartes tfoot td::before { content: none; }
  .dg-table-cartes tfoot td[colspan] { display: none !important; }

  /* L'import d'archives (js/162) suit la même règle. */
  .idc-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .idc-table, .idc-table tbody, .idc-table tr, .idc-table td { display: block; }
  .idc-table tr { border: 1px solid var(--border); border-radius: 12px; padding: 6px 10px; margin-bottom: 8px; }
  .idc-table td { display: flex; justify-content: space-between; align-items: center; gap: 10px; border: 0; padding: 4px 0; }
  .idc-table td::before { content: attr(data-label); font-size: 10.5px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; }
  .idc-nom { max-width: none; white-space: normal; overflow-wrap: anywhere; text-align: right; }

  .bd-entete h2 { font-size: 16px !important; }
}
@media (prefers-reduced-motion: reduce) {
  .dg-etape, .dg-cible, .dg-ligne, .dg-depot { transition: none; }
}
