/* ===== prospects-liste.css ===== */
/* Prospects : liste et Kanban.
   Feuille de domaine du lot PD-1a (vague 1), créée et importée par assets/app.js au lot T0.
   Seul ce lot l'écrit ; app.css reste réservé aux jetons et composants (docs/DESIGN-SYSTEM.md §9.9).
   Les règles de base du Kanban (.carte-prospect, .colonnes-pipeline…) restent dans app.css ; celles-ci
   les complètent (chargées après). */

/* ---------- En-tête : contrôle segmenté Colonnes / Liste ---------- */

.tete-liste nav.prospects-vues { margin: 0; }

/* ---------- Filtres : envoi automatique, pastille « Relances dues » ---------- */

.prospects-filtres .champ--case { align-self: center; }
.prospects-filtres .champ--case input { height: 16px; margin: 0; }
.filtre-pastille { display: inline-flex !important; white-space: nowrap; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; border: 1px solid var(--trait); border-radius: var(--rayon-pilule); background: var(--surface); font-size: var(--t-sm) !important; cursor: pointer;
    transition: background-color var(--duree-rapide, .12s) var(--courbe), border-color var(--duree-rapide, .12s) var(--courbe); }
.filtre-pastille:hover { border-color: var(--trait); }
.filtre-pastille .compteur { margin-left: 0; }
.filtre-pastille--signal .compteur { background: var(--attention-fond); color: var(--attention-texte); box-shadow: inset 0 0 0 1px var(--attention-trait); }
.filtre-pastille--active { border-color: var(--attention-trait); background: var(--attention-fond); color: var(--attention-texte); }
.filtre-pastille:focus-within { outline: 2px solid var(--primaire); outline-offset: 2px; }

/* ---------- Bandeau compact des relances J+3 (repliable) ---------- */

.relances-dues { padding: 0; margin-top: var(--e-2); }
.relances-dues__resume { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px var(--e-3); padding: 8px 14px; cursor: pointer; list-style: none; }
.relances-dues__resume::-webkit-details-marker { display: none; }
.relances-dues__resume::before { content: ''; align-self: center; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); transition: transform var(--duree) var(--courbe); }
.relances-dues[open] > .relances-dues__resume::before { transform: rotate(45deg); }
.relances-dues__titre { font-weight: 500; }
.relances-dues__aide { font-size: var(--t-xs); color: var(--attention-texte); }
.relances-dues__liste { padding: 0 14px 10px 30px; color: var(--encre); }
.relances-dues__liste > li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px var(--e-2); }

/* ---------- Kanban : colonnes ---------- */

.kanban { margin-top: var(--e-2); }
.kanban__archives { margin: 0 0 var(--e-2); }
.prospects-filtres > .filtres { margin-top: 0; }
.prospects-effacer { white-space: nowrap; }
.kanban .colonnes-pipeline { display: flex; align-items: stretch; position: relative; } /* contient les .sr-only absolus : pas de débordement de page */
.kanban .colonne-pipeline { flex: 1 0 216px; min-width: 0; }
.kanban .colonne-pipeline__titre { gap: 4px; }
.kanban .colonne-pipeline__titre > .compteur { margin-left: auto; }

.colonne-pipeline__replier { display: flex; align-items: center; gap: 4px; width: 100%; padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; border-radius: var(--rayon-xs); }
.colonne-pipeline__replier .compteur { margin-left: auto; }
.colonne-pipeline__replier::after { content: ''; flex: none; width: 6px; height: 6px; margin: 0 4px 0 2px; border-right: 1.5px solid var(--encre-douce); border-bottom: 1.5px solid var(--encre-douce); transform: rotate(135deg); transition: transform var(--duree) var(--courbe); }
.colonne-pipeline__replier:hover .colonne-pipeline__libelle { text-decoration: underline; }

/* Colonne repliée : bande verticale étroite, libellé et compteur, toujours zone de dépôt. */
.kanban .colonne-pipeline--repliee { flex: 0 0 44px; padding: 10px 4px; scroll-snap-align: none; }
.colonne-pipeline--repliee .colonne-pipeline__cartes { display: none; }
.colonne-pipeline--repliee .colonne-pipeline__titre { margin: 0; height: 100%; }
.colonne-pipeline--repliee .colonne-pipeline__replier { flex-direction: column; justify-content: flex-start; height: 100%; min-height: 160px; gap: 8px; }
.colonne-pipeline--repliee .colonne-pipeline__replier .compteur { order: -1; margin: 0; }
.colonne-pipeline--repliee .colonne-pipeline__replier::after { order: -2; margin: 2px 0; transform: rotate(-45deg); }
.colonne-pipeline--repliee .colonne-pipeline__libelle { writing-mode: vertical-rl; font-size: var(--t-sm); white-space: nowrap; }
.colonne-pipeline--perdu .colonne-pipeline__libelle { color: var(--encre-douce); }

/* ---------- Kanban : cartes ---------- */

.carte-prospect { position: relative; }
.carte-prospect.carte-prospect--fantome { position: fixed; } /* le fantôme du glisser (app.css) reste fixe */
.carte-prospect--nouveau { outline: 0; border-color: var(--succes-trait); background: var(--succes-fond); box-shadow: inset 3px 0 0 var(--primaire), var(--ombre-carte); }
.carte-prospect__tete { display: flex; align-items: flex-start; gap: 4px; }
.carte-prospect__nom { flex: 1; min-width: 0; color: var(--encre); text-decoration: none; overflow-wrap: anywhere; line-height: 1.35; }
.carte-prospect__nom:hover { color: var(--primaire); text-decoration: underline; }
.carte-prospect__nom strong { font-weight: 500; }
.carte-prospect__badges { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 0; }
.carte-prospect__pied { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: var(--t-xs); color: var(--encre-douce); }
.carte-prospect__jauge { flex: 1; min-width: 24px; height: 4px; }
.carte-prospect__taux { flex: none; font-variant-numeric: tabular-nums; }
.carte-prospect__cdm { flex: none; padding: 0 6px; border: 1px solid var(--trait); border-radius: var(--rayon-pilule); background: var(--surface); font: 500 11px/16px var(--police); color: var(--encre); letter-spacing: .02em; }

/* Menu « Déplacer » : bouton icône, liste des étapes dépliée dans la carte (pas de débordement rogné par la piste). */
.carte-prospect__deplacer { flex: none; }
.carte-prospect__bouton-deplacer { display: grid; place-items: center; width: 28px; height: 28px; margin: -4px -4px 0 0; border-radius: var(--rayon-champ); color: var(--encre-douce); cursor: pointer; list-style: none;
    transition: background-color var(--duree-rapide, .12s) var(--courbe), color var(--duree-rapide, .12s) var(--courbe); }
.carte-prospect__bouton-deplacer::-webkit-details-marker { display: none; }
.carte-prospect__bouton-deplacer:hover, .carte-prospect__deplacer[open] > .carte-prospect__bouton-deplacer { background: var(--surface-4); color: var(--encre); }
.carte-prospect__deplacer[open] { flex-basis: 100%; order: 2; }
.carte-prospect__tete:has(> .carte-prospect__deplacer[open]) { flex-wrap: wrap; }
.carte-prospect__deplacer[open] > .carte-prospect__bouton-deplacer { position: absolute; top: 10px; right: 10px; margin: -4px -4px 0 0; }
.carte-prospect .carte-prospect__etape { display: block; margin: 8px 0 0; padding-top: 8px; border-top: 1px solid var(--trait-2); animation: kanban-ouvrir var(--duree) var(--courbe); }
.carte-prospect__menu-titre { margin: 0 0 4px; font-size: var(--t-xs); color: var(--encre-douce); }
.carte-prospect__menu { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1px; }
.carte-prospect__etape .carte-prospect__choix { display: flex; align-items: center; gap: 6px; width: 100%; height: auto; min-height: 28px; padding: 4px 6px; border: 0; border-radius: var(--rayon-xs); background: none; font: inherit; font-size: var(--t-xs); line-height: 1.3; color: var(--encre); text-align: left; cursor: pointer; }
.carte-prospect__etape .carte-prospect__choix::before { content: ''; flex: none; width: 6px; height: 6px; border-radius: var(--rayon-pilule); background: var(--neutre-trait); }
.carte-prospect__etape .carte-prospect__choix--gagne::before { background: var(--succes-trait); }
.carte-prospect__etape .carte-prospect__choix--perdu::before { background: var(--neutre-trait); }
.carte-prospect__etape .carte-prospect__choix:hover:not(:disabled) { background: var(--surface-4); }
.carte-prospect__etape .carte-prospect__choix:disabled { color: var(--encre-douce); cursor: default; }
.carte-prospect__etape .carte-prospect__choix:disabled::after { content: '(actuelle)'; margin-left: auto; }

/* Retour visuel du dépôt (C5) : jamais au-delà de 160 ms. */
.carte-prospect--deposee { animation: kanban-atterrir var(--duree) var(--courbe); }
.compteur--pulse { animation: kanban-pulser var(--duree) var(--courbe); }
@keyframes kanban-atterrir { from { transform: translateY(-4px) scale(.98); border-color: var(--succes-trait); } to { transform: none; } }
@keyframes kanban-pulser { 50% { transform: scale(1.2); } }
@keyframes kanban-ouvrir { from { opacity: 0; transform: translateY(-2px); } to { opacity: 1; transform: none; } }

/* ---------- Kanban : défilement horizontal toujours visible ---------- */

.kanban__defilement { display: flex; align-items: center; gap: var(--e-2); margin-bottom: var(--e-2); }
.kanban__fleche { flex: none; display: grid; place-items: center; width: 32px; height: 28px; padding: 0; border: 1px solid var(--trait); border-radius: var(--rayon-champ); background: var(--surface); color: var(--encre); font: 500 18px/1 var(--police); cursor: pointer;
    transition: background-color var(--duree-rapide, .12s) var(--courbe); }
.kanban__fleche:hover:not(:disabled) { background: var(--surface-4); }
.kanban__fleche:disabled { opacity: .4; cursor: default; }
.kanban__barre { flex: 1; min-width: 0; overflow-x: scroll; overflow-y: hidden; height: 14px; }
.kanban__barre-piste { height: 1px; }
/* Barres non flottantes (macOS les masque sinon) : toujours visibles, en haut comme en bas. */
.kanban__barre, .kanban .colonnes-pipeline { scrollbar-width: auto; scrollbar-color: var(--trait) var(--surface-4); }
.kanban__barre::-webkit-scrollbar, .kanban .colonnes-pipeline::-webkit-scrollbar { height: 10px; }
.kanban__barre::-webkit-scrollbar-track, .kanban .colonnes-pipeline::-webkit-scrollbar-track { background: var(--surface-4); border-radius: var(--rayon-pilule); }
.kanban__barre::-webkit-scrollbar-thumb, .kanban .colonnes-pipeline::-webkit-scrollbar-thumb { background: var(--trait); border-radius: var(--rayon-pilule); }
.kanban__barre::-webkit-scrollbar-thumb:hover, .kanban .colonnes-pipeline::-webkit-scrollbar-thumb:hover { background: var(--trait-champ); }

/* ---------- Liste : filtres dans les en-têtes de colonnes ---------- */

.prospects-tableau .filtres-colonnes td { padding: 4px 6px; background: var(--surface-2); border-bottom: 1px solid var(--trait); vertical-align: top; }
.prospects-tableau .filtres-colonnes input, .prospects-tableau .filtres-colonnes select { width: 100%; min-width: 96px; height: 30px; padding: 0 6px; border: 1px solid var(--trait-champ); border-radius: var(--rayon-champ); background: var(--surface); font: inherit; font-size: var(--t-xs); color: var(--encre); }
.prospects-tableau .filtres-colonnes input[type='search'] { min-width: 140px; }
.prospects-tableau .filtres-colonnes__dates { display: flex; flex-wrap: nowrap; gap: 6px; }
/* La cellule des deux dates échappe au plafond de 120 px de la colonne Relance (lignes de données). */
.prospects-tableau tr > td:has(> .filtres-colonnes__dates) { max-width: none; }
.prospects-tableau .filtres-colonnes__date { display: flex; align-items: center; gap: 3px; }
.prospects-tableau .filtres-colonnes__date label { font-size: 11px; color: var(--encre-douce); }
.prospects-tableau .filtres-colonnes input[type='date'] { width: 96px; min-width: 96px; padding: 0 4px; }
.prospects-tableau .filtres-colonnes :focus { outline: 2px solid var(--primaire); outline-offset: 0; }

@media (max-width: 720px) {
    .tete-liste nav.prospects-vues { order: 2; }
    .relances-dues:not([open]) .relances-dues__aide { display: none; }
    .filtre-pastille { white-space: normal; }
}

/* Lot W2B : filtres d'en-tête en choix unique avec recherche (même contrainte de rognage que la grille des temps). */
.filtres-colonnes .champ { margin-bottom: 0; }
.filtres-colonnes .choix-recherche__saisie { min-width: 140px; height: 32px; }

/* ===== prospects-fiche.css ===== */
/* Prospects : fiche et formulaire.
   Feuille de domaine du lot PD-1b (vague 1), créée et importée par assets/app.js au lot T0.
   Seul ce lot l'écrit ; app.css reste réservé aux jetons et composants (docs/DESIGN-SYSTEM.md §9.9). */

/* ---------- Formulaire prospect (sections, sommaire collant) ---------- */
.prospect-formulaire { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: var(--e-5); align-items: start; }
.prospect-formulaire__corps { min-width: 0; }
.prospect-formulaire__sommaire { position: sticky; top: var(--e-4); }
.prospect-formulaire__sommaire ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.prospect-formulaire__sommaire li[hidden] { display: none; }
.prospect-formulaire__sommaire a {
    display: block; padding: 6px 10px; border-radius: var(--rayon-xs); font-size: var(--t-sm);
    color: var(--encre-douce); text-decoration: none;
    transition: background-color var(--duree-rapide) var(--courbe), color var(--duree-rapide) var(--courbe);
}
.prospect-formulaire__sommaire a:hover { background: var(--surface-2); color: var(--encre); }
.prospect-formulaire .section-formulaire { scroll-margin-top: var(--e-4); }

@media (max-width: 960px) {
    .prospect-formulaire { grid-template-columns: minmax(0, 1fr); gap: var(--e-3); }
    .prospect-formulaire__sommaire { position: static; }
    .prospect-formulaire__sommaire ol { flex-direction: row; flex-wrap: wrap; gap: 4px; }
    .prospect-formulaire__sommaire a { padding: 4px 10px; border: 1px solid var(--trait-2); border-radius: 999px; background: var(--surface); }
}

/* ---------- Fiche prospect (onglets et colonne latérale Pipeline) ---------- */
.prospect-fiche { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--e-4); align-items: start; }
.prospect-fiche__principal, .prospect-fiche__lateral { min-width: 0; }
.prospect-fiche__jauge { width: 100%; }
.prospect-fiche__relance { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--e-2) var(--e-3); }
.prospect-fiche__relance .en-ligne { margin-left: 0; }
.prospect-fiche__conversion details { margin-top: var(--e-3); }
.criteres-manquants a { color: inherit; }
.criteres-manquants a:hover { color: var(--encre); }
/* En accordéon (mobile), les cartes du panneau Synthèse perdent leur cadre, comme un panneau à carte unique. */
.onglets--accordeon #prospect-synthese .pile > .carte { border: 0; padding: 0; }

@media (max-width: 960px) {
    .prospect-fiche { grid-template-columns: minmax(0, 1fr); }
}

/* ===== dossiers.css ===== */
/* Dossiers : fiche à onglets (bloc « fiche », DO-1), liste et formulaires (bloc « formulaires », DO-2).
   Feuille de domaine du lot DO-1 et DO-2 (vague 1), créée et importée par assets/app.js au lot T0.
   Seul ce lot l'écrit ; app.css reste réservé aux jetons et composants (docs/DESIGN-SYSTEM.md §9.9). */

/* fiche (DO-1) */

/* En-tête : Mise en place et Modifier seulement ; les destinations sont devenues des onglets. */
.fiche-onglets { margin-top: var(--e-2); }
.onglets__onglet .fiche-pastille { padding: 0 6px; font-size: var(--t-xs); line-height: 18px; }
.fiche-alerte-completer a { margin-left: 2px; }

/* Sous-blocs repliables (carte Dossier, « Changer l'équipe », bases N-1, historique de l'équipe). */
.fiche-repli { margin-top: var(--e-3); border-top: 1px solid var(--trait-2); padding-top: var(--e-3); }
.fiche-repli > summary {
    display: inline-flex; align-items: center; gap: 6px; cursor: pointer; list-style: none;
    font-size: var(--t-sm); font-weight: 600; color: var(--encre);
}
.fiche-repli > summary::-webkit-details-marker { display: none; }
.fiche-repli > summary::before {
    content: ''; width: 6px; height: 6px; margin-right: 2px; border: solid currentColor; border-width: 0 1.5px 1.5px 0;
    transform: rotate(-45deg); transition: transform var(--duree) var(--courbe);
}
.fiche-repli[open] > summary::before { transform: rotate(45deg); }
.fiche-repli > summary .aide { font-weight: 400; }
.fiche-repli--action > summary { color: var(--primaire); font-weight: 500; }
.fiche-repli--action > summary:hover { color: var(--primaire-survol); }
.fiche-repli[open] > :not(summary) { margin-top: var(--e-3); }
/* Petit panneau ouvert par un clic seulement (fermé au chargement) : pas d'animation à l'affichage de la page. */
@keyframes fiche-ouverture { from { opacity: 0; transform: translateY(-2px); } to { opacity: 1; transform: none; } }

/* Contacts en cartes : nom et action, badges, fonction, coordonnées. */
.fiche-contacts { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--e-2); }
.fiche-contact {
    display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 10px 12px;
    border: 1px solid var(--trait-2); border-radius: var(--rayon-champ); background: var(--surface-2);
}
.fiche-contact__tete { display: flex; align-items: baseline; justify-content: space-between; gap: var(--e-2); }
.fiche-contact__action { flex-shrink: 0; font-size: var(--t-sm); }
.fiche-contact__etiquettes { display: flex; flex-wrap: wrap; gap: 4px; }
.fiche-contact__coordonnee { font-size: var(--t-sm); overflow-wrap: anywhere; }

/* Équipe : « Terminer » ouvre la date de fin dans un petit panneau. */
.fiche-terminer { display: inline; margin-left: 4px; }
.fiche-terminer > summary { display: inline; list-style: none; cursor: pointer; }
.fiche-terminer > summary::-webkit-details-marker { display: none; }
.fiche-terminer[open] { display: block; }
.fiche-terminer__panneau {
    display: flex; flex-wrap: wrap; align-items: center; gap: var(--e-2); margin-top: var(--e-2); padding: var(--e-3);
    border: 1px solid var(--trait); border-radius: var(--rayon-champ); background: var(--surface); box-shadow: var(--ombre-carte);
    animation: fiche-ouverture var(--duree) var(--courbe);
}
.fiche-terminer__panneau label { flex-basis: 100%; font-size: var(--t-xs); font-weight: 500; color: var(--encre-douce); }

/* Onglet Documents : liens vers les échanges avec le client. */
.fiche-liens { display: flex; flex-direction: column; gap: var(--e-3); margin: 0; padding: 0; list-style: none; }
.fiche-liens li { display: flex; flex-direction: column; gap: 2px; }

/* formulaires et liste (DO-2) */

/* Titre de page : contexte du dossier (code et dénomination) en second plan. */
h1 .titre-contexte { margin-left: 6px; font-size: var(--t-md); font-weight: 400; color: var(--encre-douce); }

/* --- Liste des dossiers --- */

/* Filtres de la liste : recherche, cabinet et état sur la première ligne, puis le lien « Plus de filtres » et « Filtrer » (à droite),
   toujours à la même place. Équipe et fiscal s'ouvrent sur une seconde ligne (case à cocher + libellé, sans script). */
.filtres--dossiers .filtres__recherche { flex: 0 1 280px; }
.filtres--dossiers > .champ:not(.filtres__recherche) { flex: 0 1 180px; }
.filtres-plus__case { position: absolute; top: 0; left: 0; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); border: 0; opacity: 0; }
.filtres-plus__bascule {
    display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto; height: 32px; margin: 0 0 var(--e-2) var(--e-2); padding: 0 var(--e-1);
    cursor: pointer; font-size: var(--t-sm); font-weight: 500; color: var(--primaire); white-space: nowrap;
}
.filtres-plus__bascule::before {
    content: ''; width: 6px; height: 6px; margin-right: 4px; border: solid currentColor; border-width: 0 1.5px 1.5px 0;
    transform: rotate(-45deg); transition: transform var(--duree) var(--courbe);
}
.filtres-plus__case:checked + .filtres-plus__bascule::before { transform: rotate(45deg); }
.filtres-plus__bascule:hover { color: var(--primaire-survol); }
.filtres-plus__bascule .compteur { margin-left: 2px; }
.filtres-plus__case:focus-visible + .filtres-plus__bascule { outline: 2px solid var(--primaire); outline-offset: 2px; border-radius: var(--rayon-champ); }
.filtres-plus__champs { display: none; flex: 0 0 100%; flex-wrap: wrap; gap: 0 var(--e-2); }
.filtres-plus__case:checked ~ .filtres-plus__champs { display: flex; }
.filtres-plus__champs > .champ { flex: 0 1 180px; min-width: 0; }

/* Tableau : noms de l'équipe sur une ligne ; groupes Équipe et Fiscal repliables. */
.liste-dossiers__equipe { white-space: nowrap; }

/* --- Formulaire du dossier : sommaire collant et sections --- */

.formulaire-dossier { display: grid; grid-template-columns: 184px minmax(0, 1fr); gap: 0 var(--e-5); align-items: start; }
.formulaire-dossier > .erreurs { grid-column: 1 / -1; }
.formulaire-dossier__sommaire { position: sticky; top: calc(var(--entete) + var(--e-4)); grid-row: span 2; }
.formulaire-dossier__sommaire ul { margin: 0; padding: 0; list-style: none; border-left: 1px solid var(--trait-2); }
.formulaire-dossier__sommaire a {
    display: flex; align-items: center; justify-content: space-between; gap: var(--e-2);
    margin-left: -1px; padding: 6px var(--e-3); border-left: 2px solid transparent;
    font-size: var(--t-sm); color: var(--encre-douce); text-decoration: none;
    transition: color var(--duree-rapide) var(--courbe), border-color var(--duree-rapide) var(--courbe);
}
.formulaire-dossier__sommaire a:hover, .formulaire-dossier__sommaire a:focus-visible { color: var(--encre); border-left-color: var(--trait); }
.formulaire-dossier__sommaire .etiquette { flex-shrink: 0; }
.formulaire-dossier__sections { min-width: 0; }
.formulaire-dossier__sections .section-formulaire { scroll-margin-top: calc(var(--entete) + var(--e-4)); }
.formulaire-dossier > .actions-collantes { grid-column: 2; }
.formulaire-dossier__siren { margin: var(--e-3) 0 0; }

/* Oui / Non : boutons radio segmentés, sur une demi-largeur. */
.section-formulaire__grille > .champ--choix:has(.choix--segmente) { grid-column: auto; }
.choix--segmente {
    display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; align-self: start;
    background: var(--surface-4); border: 1px solid var(--trait-2); border-radius: var(--rayon-carte);
}
.choix--segmente .choix__option {
    position: relative; padding: 4px 12px; border: 1px solid transparent; border-radius: var(--rayon-champ);
    font-size: var(--t-sm); font-weight: 500; color: var(--neutre-texte); cursor: pointer;
    transition: background-color var(--duree-rapide) var(--courbe), color var(--duree-rapide) var(--courbe);
}
.choix--segmente .choix__option input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.choix--segmente .choix__option:hover { background: var(--trait-2); color: var(--encre); }
.choix--segmente .choix__option:has(input:checked) { background: var(--surface); border-color: var(--trait); color: var(--encre); box-shadow: var(--ombre-carte); }
.choix--segmente .choix__option:has(input:focus-visible) { outline: 2px solid var(--primaire); outline-offset: 1px; }

@media (max-width: 1100px) {
    .formulaire-dossier { display: block; }
    .formulaire-dossier__sommaire { position: static; margin-bottom: var(--e-3); }
    .formulaire-dossier__sommaire ul { display: flex; flex-wrap: wrap; gap: 6px; border-left: 0; }
    .formulaire-dossier__sommaire a {
        margin: 0; padding: 2px 10px; border: 1px solid var(--trait); border-radius: var(--rayon-pilule);
        background: var(--surface); font-size: var(--t-xs);
    }
    .formulaire-dossier__sommaire a:hover, .formulaire-dossier__sommaire a:focus-visible { border-color: var(--trait); }
}

/* --- Révision des tarifs : deux étapes numérotées --- */

.revision-tarifs__etape { margin-top: var(--e-3); }
.revision-tarifs__numero {
    display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; margin-right: 6px;
    border-radius: var(--rayon-pilule); background: var(--surface-4); border: 1px solid var(--trait);
    font-size: var(--t-xs); font-weight: 600; vertical-align: 1px;
}
.revision-tarifs__etape > .actions { margin-top: var(--e-2); }
.apercu-revision .total { margin-top: var(--e-4); }

@media (max-width: 720px) {
    h1 .titre-contexte { display: block; margin: 2px 0 0; }
}

/* ===== assistances.css ===== */
/* Assistances, débours et partages.
   Feuille de domaine du lot DO-3 (vague 1), créée et importée par assets/app.js au lot T0.
   Seul ce lot l'écrit ; app.css reste réservé aux jetons et composants (docs/DESIGN-SYSTEM.md §9.9). */

/* ---------- Tableaux (liste des assistances, débours) ---------- */

.tableau-assistances td .aide { display: block; font-size: var(--t-xs); }
.tableau-assistances__prestation { min-width: 200px; }
.tableau-assistances .etiquette, .tableau-debours .etiquette { white-space: nowrap; }

/* ---------- Formulaire de création et fiche d'une assistance ---------- */

.assistance-formulaire { max-width: 880px; }
/* Le groupe « Express Juridique » (FormaliteEjType) occupe toute la largeur d'une section. */
.section-formulaire__grille > .formalite-ej { grid-column: 1 / -1; }

/* Statut et responsable modifiables en ligne, le reste replié derrière « Modifier les informations ». */
.assistance-suivi { margin-top: var(--e-4); }
.assistance-suivi__rapide {
    display: grid; gap: 0 var(--e-4); align-items: end;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
}
.assistance-suivi__rapide > .champ select { width: 100%; }
.assistance-suivi__rapide > .bouton { margin-bottom: var(--e-4); }
.assistance-suivi > .proprietes { margin-bottom: var(--e-3); }
.assistance-suivi__detail { border-top: 1px solid var(--trait-2); padding-top: var(--e-3); }
.assistance-suivi__detail > summary, .aide-repliable > summary {
    display: inline-flex; align-items: center; gap: 6px; cursor: pointer; list-style: none;
    font-size: var(--t-sm); font-weight: 500; color: var(--primaire);
}
.assistance-suivi__detail > summary::-webkit-details-marker, .aide-repliable > summary::-webkit-details-marker { display: none; }
.assistance-suivi__detail > summary::before, .aide-repliable > summary::before {
    content: ''; width: 6px; height: 6px; border: solid currentColor; border-width: 0 1.5px 1.5px 0;
    transform: rotate(-45deg); transition: transform var(--duree) var(--courbe);
}
.assistance-suivi__detail[open] > summary::before, .aide-repliable[open] > summary::before { transform: rotate(45deg); }
.assistance-suivi__detail > summary:hover, .aide-repliable > summary:hover { color: var(--primaire-survol); text-decoration: underline; }
/* Sections à plat dans la carte « Suivi » (pas de carte dans la carte). */
.assistance-suivi .formulaire-sections { margin-top: var(--e-3); }
.assistance-suivi .section-formulaire { padding: 0; border: 0; border-radius: 0; }
.assistance-suivi .section-formulaire + .section-formulaire { padding-top: var(--e-4); border-top: 1px solid var(--trait-2); }

@media (max-width: 720px) {
    .assistance-suivi__rapide { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Débours ---------- */

.formulaire-debours .champ input:not([type='checkbox']):not([type='radio']), .formulaire-debours .champ select { width: 100%; }

/* « Payé par » : boutons radio présentés en contrôle segmenté. */
.choix-segmente {
    display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px;
    border: 1px solid var(--trait-2); border-radius: var(--rayon-carte); background: var(--surface-4);
}
.choix-segmente .choix__option {
    position: relative; display: inline-flex; align-items: center; min-height: 30px; padding: 0 12px;
    border: 1px solid transparent; border-radius: var(--rayon-champ);
    font-size: var(--t-sm); font-weight: 500; color: var(--neutre-texte); cursor: pointer;
    transition: background-color var(--duree-rapide) var(--courbe), color var(--duree-rapide) var(--courbe);
}
.choix-segmente .choix__option input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.choix-segmente .choix__option:hover { background: var(--trait-2); color: var(--encre); }
.choix-segmente .choix__option:has(input:checked) { border-color: var(--trait); background: var(--surface); color: var(--encre); box-shadow: var(--ombre-carte); }
.choix-segmente .choix__option:has(input:focus-visible) { outline: 2px solid var(--primaire); outline-offset: 1px; }

/* ---------- Documents partagés ---------- */

.aide-repliable { margin: 0 0 var(--e-4); }
.aide-repliable > .aide { max-width: 72ch; margin: var(--e-2) 0 0; }

.partage-formulaire > .choix-multiple { margin-bottom: var(--e-4); }
.partage-documents .choix-multiple__liste { max-height: 320px; }
.partage-documents .choix__option { align-items: center; gap: 8px; flex-wrap: wrap; }
.partage-document__meta { color: var(--encre-douce); font-weight: 400; }
.partage-document__note { padding: 0 8px 6px 32px; }
.partage-document__note input { width: 100%; height: 32px; padding: 0 8px; border: 1px solid var(--trait-champ); border-radius: var(--rayon-champ); font: inherit; font-size: var(--t-sm); }
.partage-document__note input:focus { border-color: var(--primaire); outline: none; box-shadow: var(--anneau); }
/* Note visible seulement pour un document coché (sans :has, elle reste visible : rien n'est perdu). */
.partage-document:not(:has(input[type='checkbox']:checked)) .partage-document__note { display: none; }
.partage-depot { padding: 0; min-width: 0; }
.partage-depot .champ input { width: 100%; max-width: 100%; }

.partage h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.partage > .aide { margin: 0 0 var(--e-2); }
.partage__annuler { display: block; margin-top: var(--e-3); }
.lien-bouton--danger { color: var(--danger-texte); }
.lien-bouton--danger:hover { color: var(--danger-texte); }
/* Liste des prospects à 1440 px sans défilement (José, 27/10) : étape et relance sur deux lignes au besoin. */
.prospects-tableau td:nth-child(2) { max-width: 180px; }
.prospects-tableau td:nth-child(2) .etiquette { white-space: normal; text-align: left; line-height: 1.3; }
.prospects-tableau td:nth-child(8) { max-width: 120px; white-space: normal; }

/* ---------- Lot DS-B : listes et synthèses en blocs (DESIGN-SYSTEM.md §9.12, §9.13) ---------- */
/* Listes : cellule titre (nom et code gris), jauge d'avancement et pastilles d'équipe restent denses. */
.liste-dossiers td, .prospects-tableau td { vertical-align: middle; }
.liste-dossiers .avancement, .prospects-tableau .avancement { min-width: 96px; gap: var(--e-1); }
.liste-dossiers .cellule-titre { min-width: 160px; }
.prospects-tableau .cellule-titre { min-width: 150px; }
.prospects-tableau__badges { display: flex; flex-wrap: wrap; gap: var(--e-1); margin-top: 2px; }
/* Fiche prospect : pastilles d'équipe sous le titre du bloc Pipeline. */
.prospect-fiche__equipe { margin-bottom: var(--e-2); }
/* Synthèse d'un dossier : les cartes à tête gardent des sous-titres collés au contenu. */
.fiche-synthese .bloc h3 { margin-top: 0; }
.fiche-synthese .bloc > details { margin: 0; }
.fiche-synthese .bloc--tableau .cellule-titre__nom { font-weight: 500; }
/* 375 px : recherche pleine largeur, cabinet et état côte à côte ; le lien « Plus de filtres » (sans retour à la ligne, taille fixe) et
   « Filtrer » partagent la ligne suivante ; les champs repliés se répartissent deux par ligne, sans rien déborder de la page. */
@media (max-width: 720px) {
    .filtres--dossiers .filtres__recherche { flex: 1 1 100%; }
    .filtres--dossiers > .champ:not(.filtres__recherche) { flex: 1 1 130px; }
    .filtres-plus__bascule { margin-left: 0; }
    .filtres-plus__champs > .champ { flex: 1 1 130px; }
}

/* Point 11 de la recette DS-B : contact principal en en-tête, contacts archivables, archivage du dossier. */
.contenu > .titre-actions:has(+ .fiche-entete-contact) { margin-bottom: var(--e-2); }
.fiche-entete-contact { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 0 0 var(--e-4); font-size: var(--t-sm); color: var(--encre-douce); }
.fiche-entete-contact__nom { font-weight: 500; color: var(--encre); text-decoration: none; }
.fiche-entete-contact__nom:hover { text-decoration: underline; }
.fiche-entete-contact__coordonnee { overflow-wrap: anywhere; }
.fiche-archivage { display: contents; }
.fiche-dialogue { width: min(460px, 92vw); padding: var(--e-5); border: 1px solid var(--trait); border-radius: 8px; background: var(--surface); color: var(--encre); }
.fiche-dialogue::backdrop { background: rgba(31, 41, 55, .45); backdrop-filter: blur(3px); }
.fiche-dialogue h2 { margin: 0 0 var(--e-4); font-size: var(--t-md); }
.archivage__avertissement { margin-bottom: var(--e-3); }
.archivage__retard { display: block; margin-top: var(--e-1); }
.archivage__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--e-2); margin-top: var(--e-3); }
/* Retour sur la section après un envoi (ancre_retour.js : Contacts, Missions, Échéancier) : pas cachée sous l'en-tête collant. */
.onglets section[data-ancre-retour] { scroll-margin-top: calc(var(--entete) + var(--e-3)); }
.fiche-contacts-bloc__outils { display: flex; flex-wrap: wrap; align-items: center; gap: var(--e-2) var(--e-3); }
.fiche-contacts-bloc__archives { display: inline-flex; align-items: center; gap: 6px; color: var(--encre-douce); cursor: pointer; }
.fiche-contacts-bloc:not(:has(.fiche-contacts-bloc__case:checked)) .fiche-contact--archive { display: none; }
.fiche-contact--archive { background: var(--surface-4); color: var(--encre-douce); }
.fiche-contact__gestion { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 4px; font-size: var(--t-sm); }
.fiche-contact__gestion > form { display: inline; }
.fiche-contact__remplacer .champ { margin-bottom: var(--e-2); }
.lien-bouton--danger, .lien-bouton--danger:hover { color: var(--danger-texte); }
