/* ============================================================
   Recette V6 — corrections de l'audit final, lot C (listes).
   Fichier séparé d'app.css et de v6-liste.css : il ne fait que
   resserrer proprement les listes Documents et Commandes.
   ============================================================ */

/* ---------- C1 : colonnes destinataire à 1440 px ----------
   Sous 1500 px, `.table-factures td { overflow-wrap: anywhere }` (app.css)
   laissait le navigateur écraser « Nom client » à 74 px : « DECATHL/ON »,
   « SORTILEG/ES », « LES HERBIER/S », des lignes de 135 px, et le bouton « ⋯ »
   hors du cadre. Les mots ne se coupent plus : seul un mot anormalement long
   (repéré par le gabarit, classe `liste-mot-long`) garde ce droit. */
@media (max-width: 1500px) {
    .liste-docs .table-factures td { overflow-wrap: break-word; }
    .liste-docs .table-factures td.liste-mot-long { overflow-wrap: anywhere; }
}

/* Largeurs minimales lisibles : le tableau défile plutôt que d'écraser un nom. */
.liste-docs .table-factures .liste-th-client,
.liste-docs .table-factures .liste-td-client { min-width: 9rem; }
.liste-docs .table-factures .liste-th-destNom,
.liste-docs .table-factures .liste-td-destNom { min-width: 6.5rem; }
.liste-docs .table-factures .liste-th-destPrenom,
.liste-docs .table-factures .liste-td-destPrenom { min-width: 6rem; }
.liste-docs .table-factures .liste-th-destVille,
.liste-docs .table-factures .liste-td-destVille { min-width: 7.5rem; }

/* Badge d'avoir SOUS le numéro, aligné sur lui : à côté, il doublait la
   largeur de la première colonne (« Avoir partiel −1 234,56 € »). */
.liste-docs .liste-td-numero .liste-numero {
    display: inline-grid; grid-template-columns: auto auto; align-items: center; column-gap: .55rem; row-gap: .25rem;
}
.liste-docs .liste-td-numero .liste-numero > .avoir-badge {
    grid-column: 2; justify-self: start; margin-left: 0;
}

/* Bouton « ⋯ » (et icône PDF) toujours dans le cadre : quand le tableau défile,
   la colonne d'actions reste accrochée au bord droit de la carte. Fond opaque,
   sinon les montants qui défilent dessous transparaîtraient. */
.liste-docs .table-factures .liste-th-actions,
.liste-docs .table-factures .liste-td-actions {
    position: sticky; right: 0; z-index: 1;
    background-color: var(--surface);
    /* L'ombre de séparation s'ajoute au voile de survol de Bootstrap (ombre
       intérieure), qu'elle remplaçait : la cellule restait blanche au survol. */
    box-shadow: inset 0 0 0 9999px var(--bs-table-bg-state, var(--bs-table-bg-type, var(--bs-table-accent-bg, transparent))),
                -10px 0 12px -12px rgba(20, 18, 50, .35);
}
.liste-docs tbody tr.is-selectionnee > .liste-td-actions {
    background: linear-gradient(rgba(124,92,255,.07), rgba(124,92,255,.07)), var(--surface);
}
.liste-docs tbody tr.is-menu > .liste-td-actions {
    background: linear-gradient(rgba(34,211,238,.08), rgba(34,211,238,.08)), var(--surface);
}
