/*
 * Charte TOPEX-CI — habillage progressif (octobre 2026)
 *
 * Chargée APRÈS le thème acheté : elle recolore le thème (variables) et
 * fournit les composants des écrans refaits (préfixe .tx-).
 * Maquettes de référence : canevas « Gestion Mission Topex — maquettes ».
 *
 * Couleurs
 *   Vert Mr Pami   #709136  marque, badges, accents (jamais pour du texte sur blanc)
 *   Vert action    #44601C  boutons et liens (contraste 7:1 avec le blanc)
 *   Olive          #22301A  menu latéral
 *   Rouge TOPEX    #E20B1B  logo et rejets uniquement
 *   Ambre          #C07A00  « quelqu'un doit agir »
 */

:root {
    --tx-marque: #709136;
    --tx-action: #44601C;
    --tx-action-survol: #2F4513;
    --tx-olive: #22301A;
    --tx-olive-actif: #3B5124;
    --tx-olive-texte: #E3EAD8;
    --tx-olive-discret: #B7C4A6;
    --tx-fond: #F4F6F1;
    --tx-surface: #FFFFFF;
    --tx-vert-clair: #EAF0DF;
    --tx-encre: #1C2416;
    --tx-texte-2: #5B6455;
    --tx-bord: #DCE1D5;
    --tx-bord-doux: #E7EBE1;
    --tx-champ: #8A9580;   /* bordures de champs : 3:1 sur blanc (WCAG 1.4.11) */
    --tx-ambre: #C07A00;
    --tx-ambre-texte: #8A5200;
    --tx-ambre-fond: #FFF1D6;
    --tx-gris-texte: #4E5648;
    --tx-gris-fond: #EDEFEA;
    --tx-rouge: #E20B1B;
    --tx-rouge-texte: #B00813;
    --tx-rouge-fond: #FDE7E8;
    --tx-police: 'Atkinson Hyperlegible Next', 'Atkinson Hyperlegible', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --tx-rayon: 10px;
    --tx-rayon-petit: 8px;

    /* Recoloration du thème acheté */
    --primary: #44601C;
    --primary-bg-color: #44601C;
    --primary-bg-hover: #2F4513;
    --primary-bg-border: #44601C;
    --primary-transparentcolor: #EAF0DF;
}

/* ------------------------------------------------------------ base */

body.main-body {
    font-family: var(--tx-police);
    font-size: 15px;
    color: var(--tx-encre);
    background: var(--tx-fond);
}

body.main-body h1, body.main-body h2, body.main-body h3,
body.main-body h4, body.main-body h5, body.main-body h6 {
    font-family: var(--tx-police);
    color: var(--tx-encre);
}

body.main-body a { color: var(--tx-action); }
body.main-body a:hover { color: var(--tx-action-survol); }

:focus-visible {
    outline: 3px solid var(--tx-marque) !important;
    outline-offset: 2px;
}

.tx-masque {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

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

/* ------------------------------------------------------------ thème : boutons Bootstrap */

body.main-body .btn-primary {
    background-color: var(--tx-action);
    border-color: var(--tx-action);
    color: #FFFFFF;
}
body.main-body .btn-primary:hover,
body.main-body .btn-primary:focus { background-color: var(--tx-action-survol); border-color: var(--tx-action-survol); }
body.main-body .bg-primary { background-color: var(--tx-action) !important; }
body.main-body .text-primary { color: var(--tx-action) !important; }
body.main-body .btn { min-height: 40px; }

/* ------------------------------------------------------------ thème : menu latéral */

.dark-menu .main-sidebar,
.dark-menu .main-sidebar .main-sidebar-header,
.dark-menu .sidemenu-logo {
    background: var(--tx-olive) !important;
}
.dark-menu .main-sidebar { border-right: 0; }
.dark-menu .sidemenu-logo { border-bottom-color: #3A4A2C !important; }
.dark-menu .main-sidebar-body .nav-link,
.dark-menu .main-sidebar-body .nav-sub-link { color: var(--tx-olive-texte); }
.dark-menu .main-sidebar-body .nav-link { min-height: 44px; border-radius: var(--tx-rayon-petit); }
.dark-menu .main-sidebar-body li.nav-item.active .nav-link,
.dark-menu .main-sidebar-body .nav-link[aria-current="page"] {
    background-color: var(--tx-olive-actif) !important;
    box-shadow: none !important;
}
.dark-menu .main-sidebar-body .sidemenu-icon { fill: currentColor; }
.tx-pastille {
    margin-left: auto;
    min-width: 22px;
    padding: 0 8px;
    border-radius: 11px;
    background: var(--tx-action);   /* blanc sur vert action : 7:1 (le vert Mr Pami ne fait que 3,6:1) */
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 700;
    line-height: 22px;
    text-align: center;
}

/* Logo : Mr Pami + nom, à la place des anciens logos du thème */
.tx-logo {
    display: flex !important;
    align-items: center;
    gap: 12px;
    padding: 4px 6px;
    text-decoration: none !important;
}
.tx-logo img {
    width: 42px; height: 42px;
    border-radius: 50%;
    background: #FFFFFF;
    object-fit: cover;
    flex: none;
}
.tx-logo-nom { display: flex; flex-direction: column; line-height: 1.25; text-align: left; text-transform: none; letter-spacing: 0; font-family: var(--tx-police); }
.tx-logo-nom strong { color: #FFFFFF; font-size: 17px; font-weight: 700; }
.tx-logo-nom span { color: var(--tx-olive-discret); font-size: 13px; font-weight: 400; }
.main-sidebar-hide:not(.main-sidebar-open) .tx-logo-nom { display: none; }

/* ------------------------------------------------------------ thème : en-tête */

.main-header.side-header {
    background: var(--tx-surface);
    border-bottom: 1px solid var(--tx-bord);
}
/* Déclencheurs de l'en-tête : vrais boutons, présentés comme les anciens liens du thème */
.main-header .tx-entete-bouton {
    display: block; position: relative; margin: 0; padding: 0;
    border: 0; background: transparent; font: inherit; line-height: 0.9; color: inherit; cursor: pointer;
}
.main-header .main-profile-menu > .tx-entete-bouton { display: flex; border-radius: 50%; }
.main-header .main-profile-menu .main-img-user { width: 32px; height: 32px; }

/* ------------------------------------------------------------ annonces (remplace le bandeau défilant) */

.tx-annonces {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
    margin: 20px 0 0;
    padding: 12px 18px;
    background: var(--tx-vert-clair);
    border-radius: var(--tx-rayon);
    color: #33402A;
}
.tx-annonces strong { color: var(--tx-action-survol); }
.tx-annonces span { flex: 1 1 420px; }
.tx-annonces a { font-weight: 600; margin-left: auto; white-space: nowrap; }

/* ------------------------------------------------------------ mise en page des écrans refaits */

.tx-page {
    max-width: 1180px;
    padding: 28px 0 48px;
    display: flex;
    flex-direction: column;
    gap: 28px;
    font-family: var(--tx-police);
    font-size: 15px;
    line-height: 1.5;
    color: var(--tx-encre);
}
.tx-entete {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}
.tx-titre { margin: 0; font-size: 30px; line-height: 1.2; font-weight: 700; }
.tx-intro { margin: 6px 0 0; color: var(--tx-texte-2); font-size: 17px; }
.tx-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.tx-grille {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    gap: 28px;
    align-items: start;
}
.tx-colonne { display: flex; flex-direction: column; gap: 28px; min-width: 0; }

.tx-carte {
    background: var(--tx-surface);
    border: 1px solid var(--tx-bord);
    border-radius: var(--tx-rayon);
    min-width: 0;
}
.tx-carte-entete {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--tx-bord-doux);
}
.tx-carte-entete h2 { margin: 0; font-size: 20px; font-weight: 700; }
.tx-carte-entete span { color: var(--tx-texte-2); font-size: 14px; }
.tx-carte-corps { padding: 18px 22px; }
.tx-carte--info { background: var(--tx-vert-clair); border-color: transparent; }

/* ------------------------------------------------------------ boutons */

.tx-bouton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    border-radius: var(--tx-rayon-petit);
    border: 1px solid var(--tx-action);
    background: var(--tx-action);
    color: #FFFFFF !important;
    font: inherit;
    font-weight: 600;
    text-decoration: none !important;
    white-space: nowrap;
    cursor: pointer;
}
.tx-bouton:hover { background: var(--tx-action-survol); border-color: var(--tx-action-survol); }
.tx-bouton--contour { background: var(--tx-surface); color: var(--tx-action) !important; }
.tx-bouton--contour:hover { background: var(--tx-vert-clair); color: var(--tx-action-survol) !important; }
.tx-bouton--danger { background: var(--tx-surface); border-color: var(--tx-rouge); color: var(--tx-rouge-texte) !important; }
.tx-bouton svg { flex: none; }

/* ------------------------------------------------------------ statuts */

.tx-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.5;
    white-space: nowrap;
    color: var(--tx-gris-texte);
    background: var(--tx-gris-fond);
}
.tx-badge--attente { color: var(--tx-ambre-texte); background: var(--tx-ambre-fond); }
.tx-badge--route { color: var(--tx-action-survol); background: var(--tx-vert-clair); }
.tx-badge--fini { color: #FFFFFF; background: var(--tx-action); }
.tx-badge--rejet { color: var(--tx-rouge-texte); background: var(--tx-rouge-fond); }

/* ------------------------------------------------------------ liste de tâches */

.tx-taches { list-style: none; margin: 0; padding: 0; }
.tx-tache {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 18px 22px;
    border-bottom: 1px solid var(--tx-bord-doux);
}
.tx-tache:last-child { border-bottom: 0; }
.tx-tache-texte { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tx-tache-ligne { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.tx-tache-titre { font-weight: 700; font-size: 16px; }
.tx-tache-detail { color: var(--tx-texte-2); }
.tx-tache-etape { font-size: 14px; font-weight: 600; color: var(--tx-action); }
.tx-tache-motif { font-size: 14px; color: var(--tx-texte-2); font-style: italic; }
.tx-vide { padding: 22px; color: var(--tx-texte-2); margin: 0; }

/* ------------------------------------------------------------ circuit (itinéraire de validation) */

.tx-route {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 4px 0 0;
    padding: 0;
    max-width: 260px;
}
.tx-route:has(li:nth-child(2):last-child) { max-width: 120px; }
.tx-route li { display: flex; align-items: center; flex: 1; min-width: 40px; }
.tx-route li:last-child { flex: none; }
.tx-route li::after {
    content: "";
    flex: 1;
    height: 3px;
    margin: 0 2px;
    background: var(--tx-bord);
}
.tx-route li:last-child::after { display: none; }
.tx-route li.fait::after { background: var(--tx-action); }
.tx-arret {
    width: 12px; height: 12px;
    flex: none;
    border-radius: 50%;
    box-sizing: border-box;
    border: 2px solid var(--tx-champ);
    background: #FFFFFF;
}
.fait > .tx-arret { background: var(--tx-action); border: 0; }
.en_cours > .tx-arret { width: 16px; height: 16px; border: 0; background: #FFFFFF; box-shadow: 0 0 0 3px var(--tx-ambre); }

/* ------------------------------------------------------------ chiffres */

.tx-chiffres { margin: 0; display: grid; grid-template-columns: 1fr auto; row-gap: 10px; column-gap: 16px; }
.tx-chiffres dt { color: var(--tx-texte-2); font-weight: 400; }
.tx-chiffres dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }

/* ------------------------------------------------------------ téléphone */

@media (max-width: 991.98px) {
    .tx-grille { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 575.98px) {
    .tx-page { padding-top: 16px; gap: 20px; }
    .tx-titre { font-size: 26px; }
    .tx-intro { font-size: 16px; }
    .tx-tache { grid-template-columns: minmax(0, 1fr); padding: 16px; }
    .tx-tache .tx-bouton { width: 100%; }
    .tx-actions { width: 100%; }
    .tx-actions .tx-bouton { flex: 1 1 100%; min-height: 52px; font-size: 17px; }
    .tx-carte-entete, .tx-carte-corps { padding: 16px; }
    .tx-carte-entete { flex-direction: column; align-items: flex-start; gap: 2px; }
}

/* ------------------------------------------------------------ correctif d'en-tête (téléphone)
   Le thème décale le contenu sous l'en-tête fixe avec des espaceurs calculés en JS ;
   sur téléphone le calcul tombe faux et le haut de page passe sous l'en-tête. */
@media (max-width: 991.98px) {
    .page > .jumps-prevent { display: none !important; }
    .page > .sticky:not(.main-header) { margin: 0 !important; }
    .page > .main-content.side-content { margin-top: 0 !important; padding-top: 60px !important; }
}

/* ============================================================ lot 2 : fiche d'un document */

.tx-ariane { font-size: 14px; color: var(--tx-texte-2); margin-bottom: -12px; }
.tx-surtitre { margin: 0 0 2px; font-size: 14px; color: var(--tx-texte-2); }
.tx-petit-titre { margin: 0 0 8px; font-size: 15px; font-weight: 700; color: var(--tx-texte-2); }
.tx-retour { font-weight: 600; padding: 4px 2px; }

/* Motif d'un rejet, d'une annulation ou d'une demande de modification */
.tx-motif {
    padding: 16px 20px;
    border-radius: var(--tx-rayon);
    border-left: 4px solid var(--tx-ambre);
    background: var(--tx-ambre-fond);
}
.tx-motif h2 { margin: 0 0 6px; font-size: 17px; font-weight: 700; }
.tx-motif--attente h2 { color: var(--tx-ambre-texte); }
.tx-motif--rejet { border-left-color: var(--tx-rouge); background: var(--tx-rouge-fond); }
.tx-motif--rejet h2 { color: var(--tx-rouge-texte); }
.tx-motif p:last-child { margin-bottom: 0; }

/* Circuit : itinéraire horizontal sur ordinateur, vertical sur téléphone */
.tx-circuit-entete { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 16px; margin-bottom: 18px; }
.tx-circuit-entete h2 { margin: 0; font-size: 20px; font-weight: 700; }
.tx-circuit-entete span { color: var(--tx-texte-2); font-size: 14px; }
.tx-circuit {
    list-style: none; margin: 0; padding: 0;
    display: grid;
    grid-template-columns: repeat(var(--n), minmax(0, 1fr));
}
.tx-circuit-arret { position: relative; display: flex; flex-direction: column; gap: 10px; padding-right: 12px; }
.tx-circuit-arret::before {
    content: "";
    position: absolute;
    top: 8px; left: 18px; right: 0;
    height: 3px;
    background: var(--tx-bord);
}
.tx-circuit-arret:last-child::before { display: none; }
.tx-circuit-arret.fait::before { background: var(--tx-action); }
.tx-circuit-point {
    position: relative; z-index: 1;
    width: 18px; height: 18px;
    border-radius: 50%;
    box-sizing: border-box;
    border: 2px dashed var(--tx-champ);
    background: var(--tx-surface);
}
.fait > .tx-circuit-point { border: 0; background: var(--tx-action); }
.en_cours > .tx-circuit-point { border: 0; box-shadow: 0 0 0 4px var(--tx-ambre); }
.tx-circuit-texte { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.tx-circuit-libelle { font-weight: 700; }
.a_venir .tx-circuit-libelle { color: var(--tx-texte-2); font-weight: 600; }
.tx-circuit-detail { font-size: 14px; color: var(--tx-texte-2); }

/* Détails de la mission */
.tx-details { margin: 0; padding: 6px 22px 18px; display: grid; grid-template-columns: minmax(120px, 180px) minmax(0, 1fr); }
.tx-details > div { display: contents; }
.tx-details dt { padding: 10px 12px 10px 0; color: var(--tx-texte-2); font-weight: 400; border-top: 1px solid var(--tx-bord-doux); }
.tx-details dd { margin: 0; padding: 10px 0; border-top: 1px solid var(--tx-bord-doux); }
.tx-details > div:first-child dt, .tx-details > div:first-child dd { border-top: 0; }
.tx-etapes-route { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tx-etapes-route li { padding: 2px 10px; border-radius: 12px; background: var(--tx-gris-fond); font-size: 14px; }
.tx-etapes-route li.destination { background: var(--tx-vert-clair); color: var(--tx-action-survol); font-weight: 700; }
.tx-etapes-route li + li::before { content: "→"; margin: 0 8px 0 -2px; color: var(--tx-texte-2); }
.tx-etapes-route li + li { background: none; padding-left: 0; }
.tx-etapes-route li.destination + li, .tx-etapes-route li + li.destination { }

/* Tableaux */
.tx-tableau-defile { overflow-x: auto; position: relative; } /* les libellés masqués (position absolue) restent dans la zone qui défile */
.tx-tableau { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.tx-tableau th, .tx-tableau td { padding: 12px 22px; text-align: left; border-top: 1px solid var(--tx-bord-doux); vertical-align: top; }
.tx-tableau thead th { border-top: 0; font-size: 14px; font-weight: 600; color: var(--tx-texte-2); }
.tx-tableau tbody th { font-weight: 600; }
.tx-tableau tfoot th, .tx-tableau tfoot td { border-top: 1px solid var(--tx-bord); font-weight: 700; }
.tx-nombre { text-align: right !important; white-space: nowrap; }
.tx-total { font-size: 17px; }
.tx-sous-ligne { display: block; font-size: 13px; font-weight: 400; color: var(--tx-texte-2); }

.tx-liens { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.tx-liens a { display: inline-block; padding: 6px 0; font-weight: 600; }
.tx-statut-ligne { margin: 0; }

/* Boîtes de confirmation */
.tx-dialogue {
    width: min(520px, calc(100vw - 32px));
    padding: 0;
    border: 0;
    border-radius: 12px;
    color: var(--tx-encre);
    font-family: var(--tx-police);
    box-shadow: 0 20px 50px rgba(34, 48, 26, .25);
}
.tx-dialogue::backdrop { background: rgba(28, 36, 22, .45); }
.tx-dialogue form { display: flex; flex-direction: column; gap: 12px; padding: 22px; margin: 0; }
.tx-dialogue h2 { margin: 0; font-size: 20px; font-weight: 700; }
.tx-dialogue p { margin: 0; color: var(--tx-texte-2); }
.tx-dialogue label { font-weight: 600; margin: 4px 0 0; }
.tx-dialogue textarea {
    width: 100%; box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid var(--tx-champ);
    border-radius: var(--tx-rayon-petit);
    font: inherit; color: inherit; resize: vertical;
}
.tx-dialogue-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 6px; }
.tx-bouton--danger-plein { background: var(--tx-rouge-texte); border-color: var(--tx-rouge-texte); }
.tx-bouton--danger-plein:hover { background: #8C0610; border-color: #8C0610; }
.tx-bouton--danger:hover { background: var(--tx-rouge-fond); }

@media (max-width: 767.98px) {
    .tx-circuit { grid-template-columns: minmax(0, 1fr); }
    .tx-circuit-arret { flex-direction: row; gap: 14px; padding: 0 0 18px; }
    .tx-circuit-arret:last-child { padding-bottom: 0; }
    .tx-circuit-arret::before { top: 18px; bottom: 0; left: 8px; right: auto; width: 3px; height: auto; }
    .tx-circuit-point { flex: none; margin-top: 2px; }
    .tx-details { grid-template-columns: minmax(0, 1fr); padding: 4px 16px 14px; }
    .tx-details dt { padding: 10px 0 0; }
    .tx-details dd { padding: 2px 0 10px; border-top: 0; }
    .tx-tableau th, .tx-tableau td { padding: 10px 16px; }
}

/* Sur téléphone, les actions de la fiche restent en bas de l'écran, à portée du pouce */
@media (max-width: 575.98px) {
    .tx-fiche { padding-bottom: 150px; }
    .tx-actions--fiche {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
        display: flex; flex-wrap: wrap; gap: 10px;
        padding: 12px 16px 16px;
        background: var(--tx-surface);
        border-top: 1px solid var(--tx-bord);
        box-shadow: 0 -4px 12px rgba(34, 48, 26, .08);
    }
    .tx-actions--fiche > .tx-bouton { flex: 1 1 140px; min-height: 52px; font-size: 15px; white-space: normal; text-align: center; }
    .tx-actions--fiche > .tx-principal { flex-basis: 100%; order: 9; }
}
.tx-liste-simple { margin: 0 0 4px; padding-left: 18px; }

/* ============================================================ lot 3 : listes */

.tx-liste { gap: 18px; }
.tx-recherche { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.tx-champ-recherche {
    flex: 1 1 280px; max-width: 460px;
    display: flex; align-items: center; gap: 10px;
    min-height: 44px; padding: 0 14px; margin: 0;
    border: 1px solid var(--tx-champ); border-radius: var(--tx-rayon-petit);
    background: var(--tx-surface); color: var(--tx-texte-2);
    box-sizing: border-box;
}
.tx-champ-recherche:focus-within { border-color: var(--tx-action); box-shadow: 0 0 0 3px rgba(112, 145, 54, .25); }
.tx-champ-recherche input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font: inherit; color: var(--tx-encre); }
.tx-champ-select { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--tx-texte-2); }
.tx-champ-select select {
    min-height: 44px; padding: 0 12px;
    border: 1px solid var(--tx-champ); border-radius: var(--tx-rayon-petit);
    background: var(--tx-surface); font: inherit; color: var(--tx-encre);
}
.tx-lien-discret { font-weight: 600; padding: 10px 4px; }

.tx-filtres { display: flex; flex-wrap: wrap; gap: 8px; }
.tx-filtre {
    display: inline-flex; align-items: center; gap: 6px;
    min-height: 40px; padding: 0 14px;
    border-radius: 20px;
    border: 1px solid var(--tx-champ);
    background: var(--tx-surface);
    color: var(--tx-encre) !important;
    text-decoration: none !important;
    white-space: nowrap;
}
.tx-filtre:hover { border-color: var(--tx-action); }
.tx-filtre-nombre { color: var(--tx-texte-2); font-variant-numeric: tabular-nums; }
.tx-filtre--attente { border-color: var(--tx-ambre); background: var(--tx-ambre-fond); color: var(--tx-ambre-texte) !important; font-weight: 600; }
.tx-filtre--attente .tx-filtre-nombre { color: var(--tx-ambre-texte); }
.tx-filtre[aria-current="page"] { background: var(--tx-olive); border-color: var(--tx-olive); color: #FFFFFF !important; font-weight: 600; }
.tx-filtre[aria-current="page"] .tx-filtre-nombre { color: var(--tx-olive-discret); }

.tx-tableau--liste td, .tx-tableau--liste th { vertical-align: middle; }
.tx-tableau--liste tbody tr:hover { background: #FAFBF8; }
.tx-ligne--attente { background: #FFFBF2; }
.tx-tableau--liste tbody tr.tx-ligne--attente:hover { background: #FFF6E3; }
.tx-lien-titre { font-weight: 700; color: var(--tx-encre) !important; text-decoration: none; }
.tx-lien-titre:hover { text-decoration: underline; }
.tx-cellule-action { text-align: right; white-space: nowrap; }
.tx-cellule-action .tx-bouton { min-height: 40px; padding: 0 14px; }
.tx-lien-voir { display: inline-block; padding: 8px 4px; font-weight: 600; }
.tx-pagination {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px;
    padding: 14px 22px; border-top: 1px solid var(--tx-bord-doux);
    color: var(--tx-texte-2); font-size: 14px;
}
.tx-pagination-liens { display: flex; gap: 16px; }
.tx-pagination-liens a { font-weight: 600; padding: 6px 0; }

/* Sur téléphone, chaque ligne devient une carte */
@media (max-width: 767.98px) {
    .tx-filtres { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 4px; scrollbar-width: none; }
    .tx-filtre { min-height: 44px; }
    .tx-recherche .tx-bouton--contour { display: none; }
    .tx-champ-recherche { max-width: none; min-height: 48px; }
    .tx-liste > .tx-carte { background: transparent; border: 0; }
    .tx-tableau--liste, .tx-tableau--liste tbody, .tx-tableau--liste tr, .tx-tableau--liste td { display: block; width: 100%; box-sizing: border-box; }
    .tx-tableau--liste thead { display: none; }
    .tx-tableau--liste tbody { display: flex; flex-direction: column; gap: 10px; }
    .tx-tableau--liste tr {
        padding: 14px 16px;
        background: var(--tx-surface);
        border: 1px solid var(--tx-bord);
        border-radius: var(--tx-rayon);
    }
    .tx-tableau--liste tr.tx-ligne--attente { border-left: 4px solid var(--tx-ambre); background: var(--tx-surface); }
    .tx-tableau--liste td { padding: 2px 0; border: 0; text-align: left !important; }
    .tx-tableau--liste td[data-label] { display: flex; gap: 8px; color: var(--tx-texte-2); font-size: 15px; }
    .tx-tableau--liste td[data-label]::before { content: attr(data-label) " :"; flex: none; min-width: 92px; }
    .tx-tableau--liste td[data-label="Où en est-il"] { display: block; margin-top: 6px; }
    .tx-tableau--liste td[data-label="Où en est-il"]::before { display: none; }
    .tx-cellule-titre { margin-bottom: 4px; }
    .tx-lien-titre { font-size: 17px; }
    .tx-cellule-action { margin-top: 10px; }
    .tx-cellule-action .tx-bouton { width: 100%; min-height: 48px; }
    .tx-cellule-action .tx-lien-voir { display: none; }
    .tx-tableau--liste tr { position: relative; }
    .tx-tableau--liste tr:not(.tx-ligne--attente) .tx-lien-titre::after { content: ""; position: absolute; inset: 0; }
    .tx-pagination { padding: 14px 0; }
}
@media (max-width: 767.98px) {
    .tx-tableau--liste .tx-cellule-action:has(.tx-lien-voir) { display: none; }
}

/* ============================================================ lot 4 : formulaires */

/* Champs du thème (tous les formulaires de l'application) */
body.main-body .form-label,
body.main-body .col-form-label,
body.main-body form label:not(.form-check-label):not(.tx-champ-recherche):not(.tx-champ-select) {
    font-weight: 600;
    color: var(--tx-encre);
    margin-bottom: 6px;
}
body.main-body .form-control,
body.main-body .form-select {
    min-height: 44px;
    border: 1px solid var(--tx-champ);
    border-radius: var(--tx-rayon-petit);
    color: var(--tx-encre);
    font-size: 15px;
    background-color: var(--tx-surface);
}
body.main-body textarea.form-control { min-height: 96px; }
body.main-body .form-control:focus,
body.main-body .form-select:focus {
    border-color: var(--tx-action);
    box-shadow: 0 0 0 3px rgba(112, 145, 54, .25);
}
body.main-body .form-control[readonly] { background: var(--tx-gris-fond); }
body.main-body .form-control.is-invalid,
body.main-body .form-select.is-invalid { border: 2px solid var(--tx-rouge); background-image: none; }
body.main-body .invalid-feedback { display: block; color: var(--tx-rouge-texte); font-weight: 600; font-size: 14px; }
body.main-body .form-text { color: var(--tx-texte-2); font-size: 13px; }
body.main-body .select2-container--default .select2-selection--single,
body.main-body .select2-container--default .select2-selection--multiple {
    min-height: 44px;
    border: 1px solid var(--tx-champ) !important;
    border-radius: var(--tx-rayon-petit) !important;
}
body.main-body .select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 42px; }
body.main-body .select2-container--default .select2-selection--single .select2-selection__arrow { height: 42px; }
body.main-body .select2-container--default.select2-container--focus .select2-selection--multiple,
body.main-body .select2-container--default.select2-container--open .select2-selection--single { border-color: var(--tx-action) !important; }
body.main-body .select2-container--default .select2-results__option--highlighted[aria-selected] { background: var(--tx-action); }
body.main-body .select2-container--default .select2-selection--multiple .select2-selection__choice {
    background: var(--tx-vert-clair); border-color: var(--tx-bord); color: var(--tx-action-survol);
}
body.main-body fieldset legend { font-family: var(--tx-police); font-size: 20px; font-weight: 700; color: var(--tx-encre); }

/* Mise en page des formulaires refaits */
.tx-formulaire-page .tx-grille { grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); }
.tx-etapes {
    list-style: none; margin: 0; padding: 0;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px;
    counter-reset: etape;
}
.tx-etapes a {
    display: flex; align-items: center; gap: 10px;
    min-height: 48px; padding: 8px 14px;
    border: 1px solid var(--tx-bord); border-radius: var(--tx-rayon-petit);
    background: var(--tx-surface);
    color: var(--tx-encre) !important; font-weight: 600; text-decoration: none !important;
}
.tx-etapes a:hover { border-color: var(--tx-action); }
.tx-etapes a::before {
    counter-increment: etape; content: counter(etape);
    width: 28px; height: 28px; flex: none;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%; border: 2px solid var(--tx-action); color: var(--tx-action);
    font-weight: 700; box-sizing: border-box;
}
.tx-section { scroll-margin-top: 80px; }
.tx-section-numero { color: var(--tx-marque); margin-right: 6px; }
.tx-section-aide { margin: 0; padding: 0 22px 4px; color: var(--tx-texte-2); }
.tx-champs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 20px; padding: 18px 22px 8px; }
.tx-champs > .tx-plein { grid-column: 1 / -1; }
.tx-champs .mb-3 { margin-bottom: 14px !important; }
.tx-collection { padding: 8px 22px 18px; }
.tx-collection .table { margin-bottom: 8px; }
.tx-collection .table th { font-size: 14px; font-weight: 600; color: var(--tx-texte-2); background: transparent; border-color: var(--tx-bord-doux); }
.tx-collection .table td { border-color: var(--tx-bord-doux); vertical-align: top; }
.tx-collection .btn-outline-primary {
    min-height: 44px; border: 1px dashed var(--tx-action); color: var(--tx-action);
    border-radius: var(--tx-rayon-petit); font-weight: 600; background: var(--tx-surface);
}
.tx-collection .btn-outline-primary:hover { background: var(--tx-vert-clair); color: var(--tx-action-survol); }
.tx-collection .btn-danger { min-width: 44px; min-height: 44px; background: var(--tx-surface); border: 1px solid var(--tx-bord); color: var(--tx-rouge-texte); }
.tx-collection .btn-danger:hover { background: var(--tx-rouge-fond); }

.tx-recap { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 14px; }
.tx-recap h2 { margin: 0; font-size: 20px; font-weight: 700; }
.tx-recap-total { display: flex; flex-direction: column; gap: 2px; }
.tx-recap-total span { color: var(--tx-texte-2); }
.tx-recap-total input { border: 0 !important; background: transparent !important; padding: 0 !important; min-height: 0 !important;
    font-size: 26px !important; font-weight: 700; color: var(--tx-encre) !important; box-shadow: none !important; font-variant-numeric: tabular-nums; }
.tx-recap p { margin: 0; color: var(--tx-texte-2); font-size: 14px; }
.tx-recap-actions { display: flex; flex-direction: column; gap: 10px; }

.tx-erreurs {
    padding: 16px 20px; border-radius: var(--tx-rayon);
    border-left: 4px solid var(--tx-rouge); background: var(--tx-rouge-fond);
}
.tx-erreurs h2 { margin: 0 0 6px; font-size: 17px; font-weight: 700; color: var(--tx-rouge-texte); }
.tx-erreurs ul { margin: 0; padding-left: 20px; }

@media (max-width: 991.98px) {
    .tx-formulaire-page .tx-grille { grid-template-columns: minmax(0, 1fr); }
    .tx-recap { position: static; }
}
@media (max-width: 767.98px) {
    .tx-champs { grid-template-columns: minmax(0, 1fr); padding: 14px 16px 4px; }
    .tx-collection { padding: 8px 12px 14px; }
    .tx-section-aide { padding: 0 16px 4px; }
    .tx-etapes { display: none; }
}

/* ------------------------------------------------------------ connexion */

.main-signin-wrapper { background: var(--tx-fond); }
.tx-connexion {
    min-height: 100vh;
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    font-family: var(--tx-police); color: var(--tx-encre);
}
.tx-connexion-marque {
    background: var(--tx-olive); color: #FFFFFF;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
    padding: 40px; text-align: center;
}
.tx-connexion-marque img { width: 120px; height: auto; border-radius: 50%; background: #FFFFFF; padding: 6px; }
.tx-connexion-nom { margin: 8px 0 0; font-size: 30px; font-weight: 700; }
.tx-connexion-slogan { margin: 0; color: var(--tx-olive-discret); font-size: 17px; max-width: 30ch; }
.tx-connexion-formulaire {
    display: flex; flex-direction: column; justify-content: center; gap: 14px;
    width: 100%; max-width: 420px; margin: 0 auto; padding: 40px 24px; box-sizing: border-box;
}
.tx-connexion-logo { height: 40px; width: auto; align-self: flex-start; }
.tx-connexion-formulaire h1 { margin: 12px 0 0; font-size: 30px; font-weight: 700; }
.tx-connexion-intro { margin: 0; color: var(--tx-texte-2); font-size: 17px; }
.tx-formulaire { display: flex; flex-direction: column; gap: 16px; margin-top: 6px; }
.tx-champ { display: flex; flex-direction: column; gap: 6px; text-align: left; }
.tx-champ label { font-weight: 600; margin: 0; }
.tx-champ input {
    min-height: 48px; padding: 0 14px;
    border: 1px solid var(--tx-champ); border-radius: var(--tx-rayon-petit);
    font: inherit; font-size: 16px; color: var(--tx-encre); background: var(--tx-surface);
    width: 100%; box-sizing: border-box;
}
.tx-champ input:focus { border-color: var(--tx-action); box-shadow: 0 0 0 3px rgba(112, 145, 54, .25); }
.tx-champ input:focus-visible { outline: 2px solid var(--tx-action) !important; outline-offset: 1px; }
.tx-mot-de-passe { position: relative; }
.tx-mot-de-passe input { padding-right: 96px; }
.tx-afficher {
    position: absolute; right: 4px; top: 4px; bottom: 4px;
    padding: 0 12px; border: 0; border-radius: 6px; background: transparent;
    color: var(--tx-action); font: inherit; font-weight: 600; cursor: pointer;
}
.tx-afficher:hover { background: var(--tx-vert-clair); }
.tx-bouton--large { min-height: 52px; font-size: 17px; width: 100%; }
.tx-alerte { padding: 12px 16px; border-radius: var(--tx-rayon-petit); background: var(--tx-rouge-fond); color: var(--tx-rouge-texte); font-weight: 600; }
.tx-connexion-aide { margin: 6px 0 0; color: var(--tx-texte-2); font-size: 14px; }

@media (max-width: 767.98px) {
    .tx-connexion { grid-template-columns: minmax(0, 1fr); }
    .tx-connexion-marque { display: none; }
    .tx-connexion-formulaire { justify-content: flex-start; padding-top: 48px; }
}
.tx-section-numero { font-size: inherit; }
.tx-recap-total input { text-align: left !important; width: 100%; }

/* Lot 4 : finitions */
.tx-section-numero {
    display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; margin-right: 10px;
    border-radius: 50%; border: 2px solid var(--tx-action);
    color: var(--tx-action); font-size: 14px; font-weight: 700; vertical-align: 2px;
}
/* Le logo TOPEX-CI est sur fond blanc : on le fond dans la page */
.tx-connexion-logo, .responsive-logo img { mix-blend-mode: multiply; }
/* Tableau de saisie encore vide : on cache ses en-têtes */
.tx-collection table:not(:has(tbody input, tbody select)) thead { display: none; }

/* ============================================================ lot 6 : tableau de bord interactif */

.tx-tdb2 { max-width: 1320px; gap: 22px; }
.tdb-entete { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.tdb-commandes { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.tdb-segments {
    display: inline-flex; padding: 4px; gap: 2px;
    background: #E9EDE3; border-radius: 12px;
}
.tdb-segment {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 38px; padding: 0 16px; border: 0; border-radius: 9px;
    background: transparent; color: var(--tx-texte-2) !important; font: inherit; font-weight: 600;
    text-decoration: none !important; cursor: pointer; white-space: nowrap;
    transition: background-color .15s, color .15s, box-shadow .15s;
}
.tdb-segment:hover { color: var(--tx-encre) !important; }
.tdb-segment[aria-current="true"], .tdb-segment[aria-pressed="true"] {
    background: var(--tx-surface); color: var(--tx-encre) !important;
    box-shadow: 0 1px 3px rgba(34, 48, 26, .18);
}
.tdb-segments--petit .tdb-segment { min-height: 32px; padding: 0 12px; font-size: 14px; }
.tdb-navigation {
    display: inline-flex; align-items: center; gap: 2px;
    padding: 4px; background: var(--tx-surface); border: 1px solid var(--tx-bord); border-radius: 12px;
}
.tdb-fleche {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; border-radius: 9px; color: var(--tx-encre) !important;
}
.tdb-fleche:hover { background: var(--tx-vert-clair); }
.tdb-fleche[aria-disabled="true"] { color: var(--tx-champ) !important; pointer-events: none; }
.tdb-periode { min-width: 150px; text-align: center; font-weight: 700; padding: 0 6px; }
.tdb-actualiser {
    display: inline-flex; align-items: center; justify-content: center;
    width: 46px; height: 46px; border-radius: 12px;
    border: 1px solid var(--tx-bord); background: var(--tx-surface); color: var(--tx-encre); cursor: pointer;
}
.tdb-actualiser:hover { background: var(--tx-vert-clair); }
.tdb--chargement .tdb-actualiser svg { animation: tdb-tourne 1s linear infinite; }
@keyframes tdb-tourne { to { transform: rotate(360deg); } }
.tdb--chargement .tdb-kpis, .tdb--chargement .tdb-grille { opacity: .55; transition: opacity .2s; }
.tdb-erreur { margin: 0; padding: 12px 16px; border-radius: 10px; background: var(--tx-rouge-fond); color: var(--tx-rouge-texte); font-weight: 600; }

/* Cartes */
.tdb-kpi, .tdb-carte {
    background: var(--tx-surface);
    border: 1px solid #E3E8DC;
    border-radius: 16px;
    box-shadow: 0 1px 2px rgba(34, 48, 26, .05), 0 6px 20px rgba(34, 48, 26, .04);
    min-width: 0;
}

/* Indicateurs */
.tdb-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.tdb-kpi { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 18px 20px 0; overflow: hidden; min-height: 168px; }
.tdb-kpi-libelle { margin: 0; color: var(--tx-texte-2); font-weight: 600; font-size: 14px; }
.tdb-kpi-valeur { margin: 0; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tdb-kpi-valeur strong { font-size: 32px; font-weight: 700; letter-spacing: -.01em; }
.tdb-kpi-valeur span { font-size: 15px; font-weight: 600; color: var(--tx-texte-2); }
.tdb-kpi-detail { margin: 2px 0 0; font-size: 13px; color: var(--tx-texte-2); min-height: 20px; }
.tdb-variation { display: inline-block; padding: 1px 8px; border-radius: 10px; font-weight: 700; background: var(--tx-gris-fond); color: var(--tx-gris-texte); }
.tdb-variation--bon { background: var(--tx-vert-clair); color: var(--tx-action-survol); }
.tdb-variation--mauvais { background: var(--tx-ambre-fond); color: var(--tx-ambre-texte); }
.tdb-kpi-courbe { margin: auto -20px 0; height: 54px; }
.tdb-kpi--hero { background: linear-gradient(160deg, #2C3D20 0%, #22301A 70%); border-color: #22301A; color: #FFFFFF; }
.tdb-kpi--hero .tdb-kpi-libelle, .tdb-kpi--hero .tdb-kpi-detail, .tdb-kpi--hero .tdb-kpi-valeur span { color: var(--tx-olive-discret); }
.tdb-kpi--hero .tdb-kpi-valeur strong { color: #FFFFFF; }
.tdb-kpi--hero .tdb-variation { background: rgba(255, 255, 255, .12); color: #FFFFFF; }

/* Grille des graphiques */
.tdb-grille { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.tdb-carte { grid-column: span 4; display: flex; flex-direction: column; padding: 18px 20px 20px; gap: 12px; }
.tdb-large { grid-column: span 8; }
.tdb-pleine { grid-column: 1 / -1; }
.tdb-carte-entete { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 10px; }
.tdb-carte-entete h2 { margin: 0; font-size: 17px; font-weight: 700; }
.tdb-sous-titre { margin: 2px 0 0; font-size: 13px; color: var(--tx-texte-2); }
.tdb-petit-titre { margin: 6px 0 0; font-size: 14px; font-weight: 700; color: var(--tx-texte-2); }
.tdb-graphique { position: relative; height: 220px; }
.tdb-graphique--haut { height: 300px; }
.tdb-graphique--auto { height: auto; min-height: 120px; }
.tdb-graphique--anneau { height: 210px; }
.tdb-centre {
    position: absolute; inset: 0; margin: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    pointer-events: none; text-align: center;
}
.tdb-centre strong { font-size: 26px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tdb-centre span { font-size: 13px; color: var(--tx-texte-2); }
.tdb-vide { margin: 0; color: var(--tx-texte-2); }
.tdb-alerte { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--tx-ambre-fond); color: var(--tx-ambre-texte); font-weight: 600; font-size: 14px; }
.tdb-note { margin: 0; font-size: 13px; color: var(--tx-texte-2); }

/* Légendes */
.tdb-legende { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.tdb-legende li { display: flex; align-items: center; gap: 8px; }
.tdb-legende-libelle { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tdb-legende-valeur { color: var(--tx-texte-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tdb-legende--ligne { flex-direction: row; flex-wrap: wrap; gap: 6px 18px; color: var(--tx-texte-2); font-size: 13px; }
.tdb-pastille { width: 10px; height: 10px; border-radius: 3px; background: var(--c); flex: none; }

/* Documents (attentes, échéances) */
.tdb-docs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.tdb-docs--grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 0 24px; }
.tdb-doc {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 10px 0 10px 12px; border-bottom: 1px solid var(--tx-bord-doux);
    border-left: 3px solid var(--tx-marque);
}
.tdb-doc--retard { border-left-color: var(--tx-ambre); }
.tdb-doc-texte { display: flex; flex-direction: column; min-width: 0; }
.tdb-doc-titre { font-weight: 700; color: var(--tx-encre) !important; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.tdb-doc-titre:hover { text-decoration: underline; }
.tdb-doc-ligne { font-size: 13px; color: var(--tx-texte-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tdb-docs-vide { padding: 8px 0; color: var(--tx-texte-2); }
.tdb-detail { border-top: 1px solid var(--tx-bord-doux); padding-top: 12px; animation: tdb-apparait .2s ease-out; }
@keyframes tdb-apparait { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.tdb-detail-entete { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tdb-detail-entete h3 { margin: 0; font-size: 15px; font-weight: 700; }
.tdb-fermer { width: 36px; height: 36px; border: 0; border-radius: 8px; background: var(--tx-gris-fond); font-size: 20px; line-height: 1; cursor: pointer; color: var(--tx-encre); }

/* Contrats */
.tdb-etats { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.tdb-etats-barre { display: flex; gap: 2px; height: 12px; border-radius: 6px; overflow: hidden; margin-bottom: 6px; background: var(--tx-gris-fond); }
.tdb-etats-barre span { display: block; }
.tdb-etat { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.tdb-etat strong { margin-left: auto; font-variant-numeric: tabular-nums; }

.tdb-donnees summary { cursor: pointer; font-weight: 600; color: var(--tx-action); font-size: 14px; }
.tdb-donnees .tx-tableau th, .tdb-donnees .tx-tableau td { padding: 6px 8px; font-size: 14px; }

@media (max-width: 1199.98px) {
    .tdb-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tdb-carte, .tdb-large { grid-column: span 6; }
    .tdb-large { grid-column: 1 / -1; }
}
@media (max-width: 767.98px) {
    .tdb-carte, .tdb-large { grid-column: 1 / -1; }
    .tdb-entete { align-items: stretch; }
    .tdb-commandes { width: 100%; }
    .tdb-segments:not(.tdb-segments--petit) { flex: 1 1 100%; }
    .tdb-segments:not(.tdb-segments--petit) .tdb-segment { flex: 1; }
    .tdb-navigation { flex: 1; justify-content: space-between; }
    .tdb-periode { min-width: 0; }
}
@media (max-width: 575.98px) {
    .tdb-kpis { gap: 10px; }
    .tdb-kpi { padding: 14px 14px 0; min-height: 140px; }
    .tdb-kpi-valeur strong { font-size: 24px; }
    .tdb-kpi-valeur span { font-size: 13px; }
    .tdb-kpi-detail { font-size: 12px; }
    .tdb-kpi-courbe { margin: auto -14px 0; height: 40px; }
    .tdb-kpi--hero { grid-column: 1 / -1; }
    .tdb-kpi--hero .tdb-kpi-valeur strong { font-size: 30px; }
    .tdb-carte { padding: 16px; border-radius: 14px; }
    .tdb-graphique--haut { height: 240px; }
    .tdb-docs--grille { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
    .tdb--chargement .tdb-actualiser svg { animation: none; }
}
.tdb-a-jour { margin: 0; font-size: 13px; color: var(--tx-texte-2); }
@media (max-width: 575.98px) {
    .tdb-kpi[data-cle="attente"] { grid-column: 1 / -1; min-height: 0; padding-bottom: 14px; }
}

/* ------------------------------------------------------------ menu latéral : sections par métier (oct. 2026) */

.dark-menu .main-sidebar-body .tx-menu-section {
    padding: 18px 14px 6px;
    margin: 0;
    list-style: none;
}
.dark-menu .main-sidebar-body .tx-menu-section .nav-label {
    color: var(--tx-olive-discret);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    opacity: 1;
}
.dark-menu .main-sidebar-body .tx-menu-section:first-of-type { padding-top: 10px; }
/* Sous-menu de la page courante : lien actif bien visible */
.dark-menu .main-sidebar-body .nav-sub-item.active > .nav-sub-link {
    color: #FFFFFF;
    font-weight: 700;
}
/* Menu replié (icônes seules) : les titres de section disparaissent */
.main-sidebar-hide:not(.main-sidebar-open) .tx-menu-section { display: none; }

/* ============================================================ lot 7 : formulaires modernisés (oct. 2026) */

/* Page de saisie courte : colonne centrée, actions en pied de carte */
.tx-page--etroite { max-width: 820px; margin-left: auto; margin-right: auto; width: 100%; }
.tx-champs--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tx-champs .tx-double { grid-column: span 2; }
.tx-carte--formulaire { overflow: hidden; }
.tx-carte--formulaire .tx-champs { padding: 24px 26px 10px; gap: 6px 22px; }
.tx-section-entete {
    display: flex; align-items: baseline; gap: 12px;
    padding: 18px 26px; border-bottom: 1px solid var(--tx-bord-doux);
}
.tx-section-entete h2 { margin: 0; font-size: 19px; font-weight: 700; }
.tx-section-entete .tx-section-numero { font-size: 14px; font-weight: 700; }
.tx-section-entete .tx-section-compte { margin-left: auto; font-size: 14px; color: var(--tx-texte-2); }

.tx-pied {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px;
    padding: 16px 26px;
    background: #F7F9F4;
    border-top: 1px solid var(--tx-bord-doux);
}
.tx-pied .tx-lien-annuler { margin-right: auto; }
.tx-lien-annuler {
    display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px;
    font-weight: 600; text-decoration: none !important;
}
.tx-lien-annuler:hover { text-decoration: underline !important; }
.tx-pied .tx-bouton, .tx-recap-actions .tx-bouton { min-height: 46px; }
.tx-pied .tx-bouton:not(.tx-bouton--contour) { font-weight: 700; padding: 0 22px; }

/* Cases à cocher regroupées (rôles) */
.tx-groupes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 22px 26px 26px; }
.tx-groupe {
    margin: 0; padding: 12px 16px 14px; min-width: 0;
    border: 1px solid var(--tx-bord-doux); border-radius: var(--tx-rayon);
    display: flex; flex-direction: column; gap: 4px;
}
body.main-body .tx-groupe legend {
    float: none; width: auto; margin: 0; padding: 0 6px;
    font-size: 15px; font-weight: 700;
}
.tx-case { display: flex; align-items: center; gap: 10px; min-height: 36px; margin: 0; cursor: pointer; font-weight: 400 !important; }
.tx-case input { width: 20px; height: 20px; flex: none; margin: 0; accent-color: var(--tx-action); cursor: pointer; }

/* Pièces jointes */
.tx-fichiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 22px; padding: 24px 26px 10px; }

/* Encadré latéral des formulaires longs : avancement */
.tx-avancement { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.tx-avancement a { display: flex; align-items: center; gap: 10px; min-height: 32px; text-decoration: none !important; font-weight: 600; }
.tx-avancement a::before {
    content: ""; width: 10px; height: 10px; flex: none; border-radius: 50%;
    background: var(--tx-champ);
}
.tx-avancement a.tx-a-corriger { color: var(--tx-rouge-texte) !important; }
.tx-avancement a.tx-a-corriger::before { background: var(--tx-rouge); }

/* Import Excel en deux étapes */
.tx-import { list-style: none; margin: 0; padding: 26px; display: flex; flex-direction: column; gap: 24px; }
.tx-import > li { display: flex; gap: 16px; align-items: flex-start; }
.tx-import-numero {
    flex: 0 0 32px; height: 32px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--tx-vert-clair); color: var(--tx-action); font-weight: 700;
}
.tx-import > li:last-child .tx-import-numero { background: var(--tx-action); color: #FFFFFF; }
.tx-import-corps { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.tx-import-corps h2 { margin: 0; font-size: 17px; font-weight: 700; }
.tx-import-corps p { margin: 0; color: var(--tx-texte-2); }
.tx-telecharger {
    align-self: flex-start; display: inline-flex; align-items: center; gap: 8px;
    min-height: 44px; padding: 0 14px;
    border: 1px solid var(--tx-champ); border-radius: var(--tx-rayon-petit);
    background: var(--tx-surface); font-weight: 600; text-decoration: none !important;
}
.tx-telecharger:hover { border-color: var(--tx-action); background: var(--tx-vert-clair); }
body.main-body label.tx-depot {
    position: relative;
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: 30px 20px; margin: 0;
    border: 2px dashed var(--tx-champ); border-radius: var(--tx-rayon);
    background: #F7F9F4; text-align: center; cursor: pointer; font-weight: 400;
}
body.main-body label.tx-depot:hover,
.tx-depot.tx-survol { border-color: var(--tx-action); background: var(--tx-vert-clair); }
.tx-depot:focus-within { outline: 3px solid var(--tx-marque); outline-offset: 2px; }
.tx-depot strong { font-weight: 600; }
.tx-depot strong span { color: var(--tx-action); text-decoration: underline; }
.tx-depot small { color: var(--tx-texte-2); font-size: 13px; }
.tx-depot input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.tx-fichier-choisi {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px; border: 1px solid var(--tx-bord); border-radius: var(--tx-rayon);
}
.tx-fichier-choisi[hidden] { display: none; }
.tx-fichier-choisi div { display: flex; flex-direction: column; min-width: 0; }
.tx-fichier-choisi strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-fichier-choisi span { font-size: 13px; color: var(--tx-texte-2); }

/* Barème des frais : grille catégories × charges */
.tx-bareme-outils { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 16px 22px; border-bottom: 1px solid var(--tx-bord-doux); }
.tx-bareme-outils .tx-champ-recherche { flex: 1 1 260px; max-width: 360px; }
.tx-bareme-outils > span { margin-left: auto; color: var(--tx-texte-2); font-size: 14px; }
.tx-bareme-defile { overflow-x: auto; }
.tx-bareme { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.tx-bareme th, .tx-bareme td { border: 0; padding: 8px 10px; vertical-align: middle; }
.tx-bareme thead th {
    padding: 12px 10px; background: #F7F9F4;
    font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--tx-texte-2);
    text-align: left; white-space: nowrap;
}
.tx-bareme thead th:first-child, .tx-bareme tbody th { padding-left: 22px; }
.tx-bareme tbody tr { border-top: 1px solid #EEF1EA; }
.tx-bareme tbody tr:hover { background: #FAFBF8; }
.tx-bareme tbody th { font-weight: 600; text-align: left; min-width: 220px; }
.tx-bareme td { min-width: 150px; }
.tx-bareme td:last-child { padding-right: 22px; }
.tx-montant {
    display: flex; align-items: center; gap: 6px;
    height: 42px; padding: 0 10px; margin: 0;
    border: 1px solid var(--tx-bord); border-radius: var(--tx-rayon-petit);
    background: var(--tx-surface); cursor: text; font-weight: 400 !important;
}
.tx-montant.tx-vide { border-style: dashed; border-color: var(--tx-champ); background: #FAFBF8; }
.tx-montant.tx-modifie { border: 2px solid var(--tx-ambre); background: var(--tx-ambre-fond); }
.tx-montant:focus-within { border-color: var(--tx-action); box-shadow: 0 0 0 3px rgba(112, 145, 54, .25); }
body.main-body .tx-montant input {
    flex: 1; min-width: 0; min-height: 0; height: auto; padding: 0;
    border: 0 !important; box-shadow: none !important; background: transparent;
    text-align: right; font: inherit;
}
body.main-body .tx-montant input:focus-visible { outline: 2px solid var(--tx-action) !important; outline-offset: 1px; }
.tx-montant span { font-size: 13px; color: var(--tx-texte-2); }
.tx-pied-statut { margin-right: auto; display: flex; align-items: center; gap: 8px; color: var(--tx-ambre-texte); font-weight: 600; }
.tx-pied-statut::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--tx-ambre); }
.tx-pied-statut[hidden] { display: none; }

@media (max-width: 767.98px) {
    .tx-champs--3, .tx-groupes, .tx-fichiers { grid-template-columns: minmax(0, 1fr); }
    .tx-champs .tx-double { grid-column: auto; }
    .tx-carte--formulaire .tx-champs, .tx-fichiers { padding: 18px 16px 6px; }
    .tx-groupes { padding: 16px; }
    .tx-section-entete { padding: 16px; }
    .tx-import { padding: 18px 16px; }
    /* Sur téléphone : actions en barre fixe, bouton principal en premier et en pleine largeur */
    .tx-pied {
        position: sticky; bottom: 0; z-index: 5;
        flex-direction: column-reverse; align-items: stretch;
        padding: 12px 16px 16px; background: var(--tx-surface);
        box-shadow: 0 -6px 18px rgba(34, 48, 26, .08);
    }
    .tx-pied .tx-bouton { width: 100%; min-height: 52px; font-size: 17px; }
    .tx-pied .tx-lien-annuler { margin: 0; justify-content: center; }
    .tx-pied-statut { margin: 0; justify-content: center; }
}
.tx-montant.tx-invalide { border: 2px solid var(--tx-rouge); background: var(--tx-rouge-fond); }
.tx-bareme tr[hidden] { display: none; }

/* ============================================================ lot 8 : listes dynamiques (oct. 2026) */

.tx-filtre { font: inherit; cursor: pointer; }
.tx-filtre[aria-pressed="true"] { background: var(--tx-olive); border-color: var(--tx-olive); color: #FFFFFF !important; font-weight: 600; }
.tx-filtre[aria-pressed="true"] .tx-filtre-nombre { color: var(--tx-olive-discret); }
.tx-filtre[hidden] { display: none; }
.tx-recherche .tx-exporter { margin-left: auto; }
.tx-bouton-lien { background: none; border: 0; padding: 6px 0; font: inherit; font-weight: 600; color: var(--tx-action); cursor: pointer; }
.tx-bouton-lien:hover { color: var(--tx-action-survol); text-decoration: underline; }
.tx-bouton-lien:disabled { color: var(--tx-champ); cursor: default; text-decoration: none; }
.tx-pagination[hidden], .tx-vide[hidden], .tx-tableau[hidden] { display: none; }
.tx-vide { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }

/* En-têtes triables */
.tx-tableau--dyn thead th { white-space: nowrap; }
.tx-tri {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 0; margin: 0; border: 0; background: none;
    font: inherit; font-weight: 600; color: var(--tx-texte-2); cursor: pointer;
}
.tx-tri svg { opacity: .45; }
.tx-tri:hover { color: var(--tx-encre); }
.tx-tri:hover svg { opacity: .8; }
th[aria-sort="ascending"] .tx-tri, th[aria-sort="descending"] .tx-tri { color: var(--tx-encre); }
th[aria-sort="ascending"] .tx-tri svg, th[aria-sort="descending"] .tx-tri svg { opacity: 1; color: var(--tx-action); }
th[aria-sort="ascending"] .tx-tri svg path { d: path("M3 7.5 6 4.5l3 3"); }
th[aria-sort="descending"] .tx-tri svg path { d: path("M3 4.5l3 3 3-3"); }
.tx-col-action { width: 1%; }

/* Lignes */
.tx-tableau--dyn td { vertical-align: middle; }
.tx-tableau--dyn .tx-sous-ligne { display: block; color: var(--tx-texte-2); font-size: 14px; }
.tx-tableau--dyn .tx-nombre { text-align: right; font-variant-numeric: tabular-nums; }
.tx-export-seul { display: none; }
.tx-personne { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tx-avatar {
    flex: none; width: 38px; height: 38px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--tx-vert-clair); color: var(--tx-action-survol);
    font-weight: 700; font-size: 14px; letter-spacing: .02em;
}
.tx-code {
    display: inline-block; padding: 2px 8px; border-radius: 6px;
    background: var(--tx-gris-fond); color: var(--tx-gris-texte);
    font-size: 13px; font-weight: 700; letter-spacing: .03em; font-variant-numeric: tabular-nums;
}
.tx-plaque {
    display: inline-block; padding: 2px 10px; border-radius: 6px;
    border: 1.5px solid var(--tx-encre); background: #FFFFFF;
    font-weight: 700; letter-spacing: .06em; white-space: nowrap;
}
.tx-badge--succes { background: var(--tx-vert-clair); color: var(--tx-action-survol); }
.tx-badge--alerte { background: var(--tx-ambre-fond); color: var(--tx-ambre-texte); }
.tx-badge--neutre { background: var(--tx-gris-fond); color: var(--tx-gris-texte); }

/* Boutons d'action en icônes */
.tx-icones { display: inline-flex; gap: 4px; }
.tx-icone {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: var(--tx-rayon-petit);
    border: 1px solid transparent; background: transparent;
    color: var(--tx-texte-2) !important; cursor: pointer;
}
.tx-icone:hover { background: var(--tx-vert-clair); color: var(--tx-action-survol) !important; }
.tx-icone--danger:hover { background: var(--tx-rouge-fond); color: var(--tx-rouge-texte) !important; }

/* Boîte de confirmation */
.tx-dialogue {
    width: min(440px, calc(100vw - 32px)); padding: 0;
    border: 0; border-radius: 14px; box-shadow: 0 20px 50px rgba(28, 36, 22, .25);
    font-family: var(--tx-police); color: var(--tx-encre);
}
.tx-dialogue::backdrop { background: rgba(28, 36, 22, .45); }
.tx-dialogue form { padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.tx-dialogue h2 { margin: 0; font-size: 20px; font-weight: 700; }
.tx-dialogue p { margin: 0; color: var(--tx-texte-2); }
.tx-dialogue-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.tx-bouton--supprimer { background: var(--tx-rouge-texte); border-color: var(--tx-rouge-texte); }
.tx-bouton--supprimer:hover { background: #8E0610; border-color: #8E0610; }

/* Grille du barème en lecture */
.tx-bareme--lecture td { font-variant-numeric: tabular-nums; }
.tx-bareme--lecture .tx-non-rembourse { color: var(--tx-texte-2); }

@media (max-width: 767.98px) {
    .tx-recherche .tx-exporter { display: inline-flex; margin-left: 0; width: 100%; }
    .tx-recherche .tx-champ-select, .tx-recherche .tx-champ-select select { width: 100%; }
    .tx-tableau--dyn tr { position: relative; }
    .tx-tableau--dyn .tx-cellule-action { position: absolute; top: 8px; right: 8px; margin: 0; padding: 0; }
    .tx-tableau--dyn td:first-child { padding-right: 96px; }
    .tx-tableau--dyn .tx-nombre { text-align: left; }
    .tx-pagination { flex-direction: column; align-items: stretch; text-align: center; }
    .tx-pagination-liens { justify-content: space-between; }
}
.tx-non-rembourse { color: var(--tx-texte-2); font-weight: 700; }
.tx-tableau--dyn th.tx-nombre { text-align: right; }
.tx-tableau--dyn th.tx-nombre .tx-tri { flex-direction: row-reverse; }
/* lot 8 — corrections téléphone */
.tx-tableau--liste .tx-export-seul { display: none !important; }
@media (max-width: 767.98px) {
    .tx-tableau--dyn td.tx-cellule-action { left: auto; width: auto !important; }
    .tx-tableau--dyn td[data-label] .tx-sous-ligne { display: inline; font-size: 15px; }
    .tx-tableau--dyn td[data-label] .tx-sous-ligne::before { content: "· "; }
}

/* ============================================================ lot 9 : états (oct. 2026) */
.tx-criteres { padding: 0; }
.tx-criteres-entete { display: flex; align-items: center; justify-content: space-between; padding: 14px 22px 0; }
.tx-criteres-entete h2 { margin: 0; font-size: 17px; font-weight: 700; }
.tx-criteres-champs { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px 18px; padding: 12px 22px 20px; }
body.main-body label.tx-critere { display: flex; flex-direction: column; gap: 6px; margin: 0; font-weight: 400; }
.tx-critere > span { font-weight: 600; font-size: 14px; }
.tx-critere--large { grid-column: span 2; }
.tx-critere .select2-container { width: 100% !important; }
.tx-chiffres { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.tx-chiffre { display: flex; flex-direction: column; gap: 2px; padding: 14px 18px; border-radius: var(--tx-rayon); background: var(--tx-vert-clair); }
.tx-chiffre span { color: var(--tx-texte-2); font-size: 14px; }
.tx-chiffre strong { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--tx-encre); }
.tx-etat[aria-busy] .tx-vide { display: none; }
.tx-etat[aria-busy] tbody { opacity: .5; transition: opacity .2s; }
.tx-recherche .tx-imprimer { margin-left: 0; }
@media (max-width: 767.98px) {
    .tx-critere--large { grid-column: auto; }
    .tx-recherche .tx-imprimer { display: none; }
}
/* Impression d'un état ou d'une liste : uniquement le titre, les chiffres et le tableau */
@media print {
    .main-sidebar, .main-header, .main-footer, .side-header, .tx-recherche, .tx-filtres, .tx-criteres-entete .tx-bouton-lien,
    .tx-cellule-action, .tx-col-action, .tx-pagination, .tx-actions, .tx-tri svg, .tx-dialogue { display: none !important; }
    .main-content, .main-container, .side-app, .main-body { margin: 0 !important; padding: 0 !important; background: #FFFFFF !important; }
    .tx-page { max-width: none; padding: 0; gap: 12px; }
    .tx-criteres { border: 0; }
    .tx-criteres-champs { padding: 0; }
    .tx-critere input, .tx-critere select { border: 0 !important; padding: 0 !important; min-height: 0 !important; appearance: none; }
    .tx-chiffre { background: none; border: 1px solid #CCCCCC; }
    .tx-tableau th, .tx-tableau td { padding: 6px 8px; font-size: 12px; }
    .tx-tableau tr { break-inside: avoid; }
    .tx-badge { background: none !important; padding: 0; }
}
@media print { .tx-badge { color: #1C2416 !important; font-weight: 700; } }

/* ============================================================ lot 10 : tableaux de bord des sections (oct. 2026) */
.tx-stats .stats-periode-texte { display: block; margin-top: 2px; font-size: 15px; }
.stats-kpis { grid-template-columns: repeat(var(--nb, 4), minmax(0, 1fr)); }
.stats-kpi { min-height: 128px; padding-bottom: 16px; text-decoration: none !important; color: inherit !important; }
a.stats-kpi:hover { border-color: var(--tx-action); }
.stats-kpi--alerte:not(.tdb-kpi--hero) { border-color: var(--tx-ambre); background: var(--tx-ambre-fond); }
.stats-kpi--alerte .tdb-kpi-detail { color: var(--tx-ambre-texte); font-weight: 600; }
.stats-grille .stats-normale { grid-column: span 6; }
.stats-grille .stats-large { grid-column: 1 / -1; }
.stats-grille .stats-large .tdb-graphique { height: 300px; }
.stats-anneau { height: 230px; }
.stats-chiffres summary { cursor: pointer; font-weight: 600; color: var(--tx-action); font-size: 14px; padding: 4px 0; }
.stats-chiffres[open] summary { margin-bottom: 8px; }
.stats-table th, .stats-table td { padding: 8px 12px; font-size: 14px; }
.stats-table .tx-nombre { text-align: right; font-variant-numeric: tabular-nums; }
.stats-legende-lien { display: flex; align-items: center; gap: 8px; width: 100%; color: inherit !important; text-decoration: none !important; }
.stats-legende-lien:hover .tdb-legende-libelle { text-decoration: underline; }
.stats-pastille-ligne { height: 3px; border-radius: 2px; background: repeating-linear-gradient(90deg, var(--c) 0 5px, transparent 5px 8px); }
.stats-notes { display: flex; flex-direction: column; gap: 4px; }
.tx-stats[aria-busy] .stats-grille, .tx-stats[aria-busy] .stats-kpis { opacity: .55; transition: opacity .2s; }
@media (max-width: 1199.98px) {
    .stats-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 991.98px) {
    .stats-grille .stats-normale { grid-column: 1 / -1; }
}
@media (max-width: 767.98px) {
    .stats-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stats-grille .stats-large .tdb-graphique { height: 240px; }
}
/* lot 10 : indicateurs adaptés aux montants complets */
.stats-kpis { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)) !important; }
.stats-kpi .tdb-kpi-valeur strong { font-size: 28px; white-space: nowrap; }
.stats-kpi .tdb-kpi-valeur span { white-space: nowrap; }

/* ===== Lot 11 : sélecteur de langue FR | EN ===== */
.tx-langue { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--tx-bord); border-radius: 999px; background: var(--tx-surface); }
.tx-langue a, body.main-body .tx-langue a { min-width: 34px; padding: 4px 8px; border-radius: 999px; font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-align: center; color: var(--tx-texte-2); text-decoration: none; line-height: 1.2; }
.tx-langue a:hover, body.main-body .tx-langue a:hover { color: var(--tx-encre); background: var(--tx-vert-clair); }
.tx-langue a[aria-current="true"], body.main-body .tx-langue a[aria-current="true"] { color: #fff; background: var(--tx-action); }
.tx-langue a:focus-visible { outline: 2px solid var(--tx-action); outline-offset: 2px; }
.tx-langue--connexion { display: flex; width: max-content; margin: 0 0 8px auto; }

/* ===== Lot 12 : adapté à tous les écrans (téléphone → écran 32 pouces) =====
 * Les pages occupent la largeur disponible au lieu de rester bloquées à 1 180 px, avec une
 * largeur utile propre à chaque type de page (lecture confortable des formulaires, tableaux
 * et graphiques étirés). Sur les très grands écrans en 4K à 100 %, l'ensemble est agrandi.
 */
:root {
    --tx-page-max: 1760px;          /* accueil, fiches */
    --tx-page-max-large: 2400px;    /* listes, tableaux de bord, statistiques, états */
    --tx-page-max-form: 1480px;     /* formulaires */
}
.tx-page { width: 100%; max-width: var(--tx-page-max); margin-left: auto; margin-right: auto; box-sizing: border-box; }
.tx-page.tx-liste, .tx-page.tx-tdb2, .tx-page.tx-stats { max-width: var(--tx-page-max-large); }
.tx-page.tx-formulaire-page { max-width: var(--tx-page-max-form); }
.tx-page.tx-page--etroite { max-width: 880px; }
.main-content .container-fluid { max-width: var(--tx-page-max-large); margin-left: auto; margin-right: auto; }

/* Écrans larges (≥ 1600 px) : plus d'air, graphiques plus hauts */
@media (min-width: 1600px) {
    .tx-page { gap: 32px; }
    .tdb-graphique { height: 260px; }
    .tdb-graphique--haut, .stats-grille .stats-large .tdb-graphique { height: 340px; }
}
/* Très larges (≥ 2000 px, ex. 27–32 pouces en QHD) : trois graphiques par ligne */
@media (min-width: 2000px) {
    .stats-grille .stats-normale { grid-column: span 4; }
    .tdb-graphique { height: 300px; }
    .tdb-graphique--haut, .stats-grille .stats-large .tdb-graphique { height: 380px; }
    .tx-titre { font-size: 34px; }
}
/* 4K affiché à 100 % (≥ 3000 px) : pages un peu plus larges.
   La mise à l'échelle de l'écran (150 % sous Windows/macOS) reste le réglage conseillé ;
   pas de « zoom » CSS, qui fausse les survols des graphiques. */
@media (min-width: 3000px) {
    :root { --tx-page-max: 2200px; --tx-page-max-large: 2800px; --tx-page-max-form: 1700px; }
}

/* Tablettes et téléphones */
@media (max-width: 767.98px) {
    .tx-page { padding-top: 18px; }
    /* Bandeau d'annonces : une seule annonce, sur deux lignes au plus */
    .tx-annonces span:nth-of-type(n+2) { display: none; }
    .tx-annonces span { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
    .tx-titre { font-size: 26px; }
}
@media (max-width: 991.98px) {
    /* Les grands tableaux défilent dans leur cadre, jamais toute la page */
    .tx-tableau-defile { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}
img, video { max-width: 100%; }

/* Anciennes pages Bootstrap (rapport technique, fiche collaborateur, mon compte, fichiers…) sur téléphone */
@media (max-width: 767.98px) {
    .main-content .container-fluid > .d-flex.justify-content-between,
    .main-content .card-header.d-flex { flex-wrap: wrap; gap: 8px; }
    .main-content .container-fluid h1 { font-size: 26px; line-height: 1.2; }
    .main-content .badge { white-space: normal; text-align: left; }
    /* Les tableaux défilent dans leur cadre ; les colonnes de libellés ne prennent plus 250 px */
    .main-content .table { display: block; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .main-content .table th[style*="width"] { width: 38% !important; min-width: 110px; }
    .main-content .table td { overflow-wrap: anywhere; }
    /* Signature (mon compte) : la zone de 400 px défile au lieu de dépasser l'écran */
    .flip-flap-container { max-width: 100%; overflow-x: auto; }
}
/* Fiche détaillée à l'ancienne (rapport technique) : largeur de lecture confortable */
.main-content .container-fluid.tx-detail-ancien { max-width: var(--tx-page-max-form); }

/* ===== Lot 14 : période libre « Du … au … » et export PDF des tableaux de bord ===== */
.tdb-perso {
    flex: 1 1 100%; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: flex-end; gap: 10px;
}
.tdb-perso[hidden] { display: none; }
.tdb-perso-champ { display: flex; flex-direction: column; gap: 4px; margin: 0; font-size: 13px; font-weight: 600; color: var(--tx-texte-2); }
.tdb-perso-champ input { min-height: 40px; min-width: 160px; }
.tdb-perso-ok { min-height: 40px; }
.tdb-pdf { min-height: 46px; }
.tdb--chargement .tdb-pdf, .tdb-pdf[aria-busy="true"] { opacity: .6; pointer-events: none; }
@media (max-width: 767.98px) {
    .tdb-perso { justify-content: stretch; }
    .tdb-perso-champ { flex: 1 1 40%; }
    .tdb-perso-champ input { min-width: 0; width: 100%; }
    .tdb-perso-ok { flex: 1 1 100%; }
    .tdb-pdf { flex: 1 1 100%; }
    /* Quatre choix de période sur une ligne de téléphone */
    .tdb-segments:not(.tdb-segments--petit) .tdb-segment { padding: 0 6px; min-width: 0; font-size: 14px; white-space: nowrap; }
}
@media print { .tdb-pdf, .tdb-perso { display: none !important; } }

/* ===== Lot 15 : fiche d'une publication ===== */
.tx-publication .tx-intro { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pub-echeance { color: var(--tx-texte-2); font-size: 14px; }
.pub-message { padding: 28px 32px; }
.pub-contenu { font-size: 17px; line-height: 1.7; color: var(--tx-encre); overflow-wrap: anywhere; }
.pub-contenu > :first-child { margin-top: 0; }
.pub-contenu > :last-child { margin-bottom: 0; }
.pub-contenu img { height: auto; border-radius: 8px; }
.pub-document { display: flex; align-items: center; gap: 14px; margin-top: 24px; padding: 14px 16px; border: 1px solid var(--tx-bord); border-radius: 10px; color: var(--tx-encre); text-decoration: none; }
.pub-document:hover { border-color: var(--tx-action); background: var(--tx-vert-clair); color: var(--tx-encre); }
.pub-document > span:last-child { display: flex; flex-direction: column; }
.pub-document > span:last-child span { color: var(--tx-action); font-size: 14px; }
.pub-document-icone { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 8px; background: var(--tx-vert-clair); color: var(--tx-action); flex: none; }
.pub-cible-libelle { display: block; margin-top: 4px; color: var(--tx-texte-2); font-size: 13px; }
.pub-puces { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
@media (max-width: 767.98px) { .pub-message { padding: 20px; } .pub-contenu { font-size: 16px; } }

/* ===== Lot 15 : droits à congé dans le formulaire d'attestation ===== */
.cg-recap { margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px solid var(--tx-bord); }
.cg-vide { color: var(--tx-texte-2); font-size: 14px; margin: 0; }
.cg-chiffres { margin: 0; display: grid; gap: 8px; }
.cg-chiffres div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.cg-chiffres dt { color: var(--tx-texte-2); font-weight: 400; }
.cg-chiffres dd { margin: 0; font-weight: 600; text-align: right; }
.cg-messages { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; font-size: 14px; }
.cg-messages li { padding: 8px 10px; border-radius: 8px; line-height: 1.4; }
.cg-erreur { background: var(--tx-rouge-fond); color: var(--tx-rouge-texte); }
.cg-info { background: var(--tx-vert-clair); color: var(--tx-action-survol); }

/* ===== Lot 15 : fin de contrat ===== */
.ct-fin select, .ct-fin input[type=date] { width: 100%; }
.ct-fin-aide { font-size: 13px; }
.tx-dialogue .ct-fin-case { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; }
.tx-dialogue .ct-fin-case input { margin-top: 4px; }

/* ===== Lot 15 : fiche collaborateur ===== */
.co-identite { display: flex; gap: 18px; align-items: center; }
.co-avatar { display: grid; place-items: center; flex: none; width: 64px; height: 64px; border-radius: 50%; background: var(--tx-action); color: #fff; font-size: 22px; font-weight: 700; letter-spacing: .5px; }
.co-etats { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.co-email { color: var(--tx-texte-2); font-size: 14px; }
.co-form-inline { display: inline; margin: 0; }
.co-aide { display: block; color: var(--tx-texte-2); font-size: 13px; font-weight: 400; }
.co-vide { color: var(--tx-texte-2); margin: 0; }
.co-liste { list-style: none; margin: 0; padding: 0; }
.co-liste li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--tx-bord); }
.co-liste li:first-child { border-top: 0; }
.co-etat { flex: none; }
.co-jauge { height: 8px; border-radius: 999px; background: var(--tx-gris-fond); overflow: hidden; margin-bottom: 14px; }
.co-jauge span { display: block; height: 100%; background: var(--tx-action); border-radius: inherit; }
.co-pieces { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.co-pieces li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--tx-bord); border-radius: 8px; font-size: 14px; }
.co-pieces li .co-aide { display: inline; margin-left: auto; }
.co-pieces li a { margin-left: auto; }
.co-piece-nom { font-weight: 600; }
.co-piece-icone { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-size: 13px; flex: none; }
.co-piece--ok .co-piece-icone { background: var(--tx-vert-clair); color: var(--tx-action); }
.co-piece--manque .co-piece-icone { background: var(--tx-gris-fond); color: var(--tx-gris-texte); }
.co-solde { margin: 4px 0 14px; color: var(--tx-texte-2); }
.co-solde strong { font-size: 40px; line-height: 1; color: var(--tx-encre); margin-right: 6px; }
.co-note { margin: 12px 0 0; padding: 8px 10px; border-radius: 8px; background: var(--tx-ambre-fond); color: var(--tx-ambre-texte); font-size: 13px; }
.co-sous-titre { margin-top: 18px; }
.co-derniers { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; font-size: 14px; }
.co-roles { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.co-roles li { padding: 4px 10px; border-radius: 999px; background: var(--tx-vert-clair); color: var(--tx-action-survol); font-size: 13px; }
@media (max-width: 767.98px) {
    .co-avatar { width: 48px; height: 48px; font-size: 17px; }
    .co-liste li { flex-direction: column; align-items: flex-start; padding: 12px 16px; }
}
.cg-recap h2 { margin-bottom: 10px; }

/* ===== Lot 15 : gestion de flotte ===== */
.fl-immat { display: inline-block; margin-left: 6px; padding: 2px 10px; border: 2px solid var(--tx-encre); border-radius: 6px; font-size: .7em; letter-spacing: 1px; vertical-align: middle; }
.fl-chiffres { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.fl-chiffre { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; color: var(--tx-encre); text-decoration: none; }
a.fl-chiffre:hover { border-color: var(--tx-action); color: var(--tx-encre); }
.fl-chiffre span { color: var(--tx-texte-2); font-size: 14px; }
.fl-chiffre strong { font-size: 28px; line-height: 1.1; }
.fl-chiffre strong small { font-size: 14px; font-weight: 400; color: var(--tx-texte-2); }
.fl-chiffre em { font-style: normal; color: var(--tx-texte-2); font-size: 13px; }
.fl-chiffre--disponible strong { color: var(--tx-action); }
.fl-chiffre--en_reparation strong, .fl-chiffre--en_panne strong { color: var(--tx-ambre-texte); }
.fl-periode { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.fl-periode label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 14px; }
.fl-raccourcis { display: flex; flex-wrap: wrap; gap: 14px; margin-left: auto; font-size: 14px; }
.fl-tableau-rapport tfoot th { border-top: 2px solid var(--tx-bord); }
.fl-distance { align-self: end; padding-bottom: 12px; font-size: 18px; font-weight: 700; color: var(--tx-action); }
.fl-suppression { margin-top: -8px; }
.fl-supprimer { color: var(--tx-rouge-texte); }
.fl-actions-resa { white-space: nowrap; }
.fl-actions-resa form { display: inline-block; margin: 0 4px 4px 0; }
.tx-bouton--petit { min-height: 32px; padding: 4px 12px; font-size: 13px; }
/* Planning */
.fl-legende { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.fl-grille th, .fl-grille td { min-width: 110px; vertical-align: top; }
.fl-grille .fl-nom { min-width: 170px; text-align: left; font-weight: 600; }
.fl-grille td { padding: 6px; }
.fl-aujourdhui { background: var(--tx-vert-clair); }
.fl-creneau { display: block; margin-bottom: 4px; padding: 4px 8px; border-radius: 6px; font-size: 12px; font-weight: 600; line-height: 1.3; text-decoration: none; color: var(--tx-encre); background: var(--tx-gris-fond); }
.fl-creneau small { display: block; font-weight: 400; color: inherit; opacity: .85; }
.fl-legende .fl-creneau { display: inline-block; margin: 0; }
.fl-creneau--mission { background: var(--tx-action); color: #fff; }
.fl-creneau--course, .fl-creneau--sortie { background: var(--tx-vert-clair); color: var(--tx-action-survol); }
.fl-creneau--astreinte { background: var(--tx-ambre-fond); color: var(--tx-ambre-texte); }
.fl-creneau--conge, .fl-creneau--repos { background: #E7EEF7; color: #24476B; }
.fl-creneau--indisponible { background: var(--tx-rouge-fond); color: var(--tx-rouge-texte); }
.fl-libre { display: block; text-align: center; color: var(--tx-bord); text-decoration: none; font-size: 18px; border-radius: 6px; }
.fl-libre:hover { background: var(--tx-gris-fond); color: var(--tx-action); }
@media (max-width: 767.98px) { .fl-raccourcis { margin-left: 0; } .fl-chiffre strong { font-size: 22px; } }
.fl-tableau-rapport td:first-child, .fl-tableau-rapport th:first-child { min-width: 210px; } .fl-tableau-rapport td { white-space: nowrap; } .fl-tableau-rapport td:first-child { white-space: normal; }
@media (max-width: 767.98px) { .fl-chiffres { grid-template-columns: 1fr 1fr; gap: 10px; } .fl-chiffre { padding: 12px 14px; } .fl-planning .tx-actions { flex-direction: row; flex-wrap: wrap; } .fl-planning .tx-actions .tx-bouton { flex: 1 1 auto; width: auto; } }

/* ===== Lot 16 : pièces changées ===== */
.rp-pieces { border: 1px solid var(--tx-bord); border-radius: 10px; padding: 12px 16px 16px; }
.rp-pieces legend { float: none; width: auto; padding: 0 6px; font-size: 15px; font-weight: 700; margin: 0; }
.rp-table td, .rp-table th { padding: 6px 8px; vertical-align: top; }
.rp-table input { width: 100%; min-width: 90px; }
.rp-table .rp-qte input { min-width: 64px; }
.rp-table td:first-child input { min-width: 180px; }
.rp-pieces > .tx-bouton { margin-top: 10px; }
.rp-total-pieces { display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: 12px; }
.rp-total-pieces span { color: var(--tx-texte-2); font-size: 14px; }
.rp-total-pieces strong { font-size: 20px; }

/* ===== Lot 16 : comparaisons ===== */
.cmp-onglets { display: flex; gap: 4px; border-bottom: 1px solid var(--tx-bord); }
.cmp-onglet { padding: 10px 18px; border-bottom: 3px solid transparent; color: var(--tx-texte-2); font-weight: 600; text-decoration: none; }
.cmp-onglet:hover { color: var(--tx-encre); }
.cmp-onglet.actif { color: var(--tx-action); border-bottom-color: var(--tx-action); }
.cmp-filtres .form-select { min-width: 180px; }
.cmp-choix { flex-basis: 100%; }
.cmp-choix summary { cursor: pointer; color: var(--tx-action); font-weight: 600; font-size: 14px; }
.cmp-cases { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px 16px; margin-top: 10px; max-height: 260px; overflow: auto; }
.cmp-case { display: flex; gap: 6px; align-items: baseline; font-weight: 400 !important; font-size: 14px; flex-direction: row !important; }
.cmp-case small { color: var(--tx-texte-2); }
.cmp-indicateur select { min-width: 260px; }
.cmp-zone { position: relative; width: 100%; }
.cmp-aide { margin: 8px 0 0; color: var(--tx-texte-2); font-size: 13px; }
.cmp-tableau th, .cmp-tableau td { white-space: nowrap; }
.cmp-tableau thead th { white-space: normal; min-width: 96px; vertical-align: bottom; font-size: 13px; }
.cmp-tableau .cmp-nom { min-width: 220px; text-align: left; white-space: normal; position: sticky; left: 0; background: var(--tx-surface); z-index: 1; }
.cmp-sens { margin-left: 4px; color: var(--tx-texte-2); font-weight: 400; }
.cmp-meilleur { background: var(--tx-vert-clair); color: var(--tx-action-survol); font-weight: 700; }
.cmp-pire { background: var(--tx-ambre-fond); color: var(--tx-ambre-texte); font-weight: 700; }
.cmp-inactif td, .cmp-inactif th { color: var(--tx-texte-2); }
.cmp-sans-panne { color: var(--tx-action); font-size: 13px; }
.cmp-notes ul { margin: 8px 0 0; padding-left: 18px; color: var(--tx-texte-2); font-size: 14px; display: grid; gap: 4px; }
@media (max-width: 767.98px) { .cmp-onglet { padding: 8px 10px; } .cmp-indicateur select { min-width: 0; width: 100%; } }

/* ---- lot 17 : pied de page (crédit du développeur) ---- */
.main-footer .tx-credit { display: inline-block; margin-left: .75rem; color: var(--tx-texte-2, #5B6150); }
.main-footer .tx-credit abbr { text-decoration: none; }
@media (max-width: 767.98px) { .main-footer .tx-credit { display: block; margin: .25rem 0 0; } }

/* ---- lot 17 : tableau de bord (congés, fins de contrat, flotte) ---- */
@media (min-width: 1200px) {
    /* 5 à 8 indicateurs : la grille s'adapte au nombre (4 par ligne au plus) */
    .tdb-kpis { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
    .tdb-kpis:has(> .tdb-kpi:nth-child(5)) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.tdb-lien { font-size: 14px; font-weight: 600; color: var(--tx-action); text-decoration: none; white-space: nowrap; }
.tdb-lien:hover, .tdb-lien:focus-visible { text-decoration: underline; }
.tdb-note-carte { margin: 0; font-size: 13px; color: var(--tx-texte-2); }
#tdb-absents:empty, #tdb-departs:empty { display: none; }

/* ---- lot 17 : Mes tâches regroupées par module ---- */
.tx-groupes-filtres { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 0 6px; }
.tx-filtre-groupe { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border: 1px solid var(--tx-bordure, #DADFD3); border-radius: 18px; background: var(--tx-surface, #FFF); color: var(--tx-texte, #1C2416); font-size: 14px; font-weight: 600; cursor: pointer; }
.tx-filtre-groupe span { min-width: 22px; padding: 0 6px; border-radius: 11px; background: var(--tx-gris-fond, #EEF0EA); font-size: 12px; line-height: 20px; text-align: center; }
.tx-filtre-groupe[aria-pressed="true"] { background: var(--tx-action); border-color: var(--tx-action); color: #FFF; }
.tx-filtre-groupe[aria-pressed="true"] span { background: rgba(255,255,255,.2); color: #FFF; }
.tx-filtre-groupe:focus-visible { outline: 3px solid var(--tx-focus, #8DB255); outline-offset: 2px; }
.tx-groupe-taches { border-top: 1px solid var(--tx-bordure, #E3E7DC); }
.tx-groupe-taches:first-of-type { border-top: 0; }
.tx-groupe-taches > summary { display: flex; align-items: center; gap: 10px; padding: 12px 2px; cursor: pointer; list-style: none; }
.tx-groupe-taches > summary::-webkit-details-marker { display: none; }
.tx-groupe-titre { font-size: 16px; font-weight: 700; }
.tx-groupe-nombre { min-width: 24px; padding: 0 8px; border-radius: 12px; background: var(--tx-vert-clair, #E4EDD6); color: var(--tx-action-survol, #3A5216); font-weight: 700; font-size: 13px; line-height: 22px; text-align: center; }
.tx-groupe-chevron { margin-left: auto; transition: transform .2s; color: var(--tx-texte-2); }
.tx-groupe-taches:not([open]) .tx-groupe-chevron { transform: rotate(-90deg); }
.tx-groupe-taches > .tx-taches { margin-top: 0; }
.tx-groupe-plus { margin: 4px 0 12px; }
@media (prefers-reduced-motion: reduce) { .tx-groupe-chevron { transition: none; } }

/* ============================================================ lot 17 : menu latéral moderne */
.dark-menu .main-sidebar-body .menu-nav { padding-bottom: 24px; }
/* Recherche */
.dark-menu .tx-menu-recherche {
    position: relative; display: flex; align-items: center; gap: 8px; list-style: none;
    margin: 12px 10px 8px; padding: 0 10px; min-height: 40px; border-radius: 10px;
    background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); color: var(--tx-olive-discret);
}
.dark-menu .tx-menu-recherche:focus-within { background: rgba(255, 255, 255, .14); border-color: var(--tx-olive-discret); }
.dark-menu .tx-menu-recherche svg { flex: none; }
.dark-menu .tx-menu-recherche input {
    flex: 1; min-width: 0; height: 38px; padding: 0; border: 0; background: transparent; color: #FFFFFF; font-size: 14px; outline: none;
}
.dark-menu .tx-menu-recherche input::placeholder { color: var(--tx-olive-discret); opacity: .9; }
.dark-menu .tx-menu-recherche input::-webkit-search-cancel-button { filter: invert(1); }
.dark-menu .tx-menu-recherche kbd {
    padding: 0 6px; border-radius: 4px; border: 1px solid rgba(255, 255, 255, .25); background: transparent;
    color: var(--tx-olive-discret); font: 600 12px/18px var(--tx-police); box-shadow: none;
}
.dark-menu .tx-menu-recherche:focus-within kbd { display: none; }
.tx-menu-aucun { list-style: none; padding: 8px 18px; color: var(--tx-olive-discret); font-size: 14px; }

/* Groupes */
.dark-menu .main-sidebar-body .tx-menu-groupe { margin-top: 2px; }
.dark-menu .main-sidebar-body .tx-menu-groupe-tete {
    display: flex; align-items: center; width: 100%; border: 0; background: transparent; text-align: left; cursor: pointer;
    color: #FFFFFF !important; font-weight: 700;
}
.dark-menu .main-sidebar-body .tx-menu-groupe-tete:hover { background: rgba(255, 255, 255, .06); }
.dark-menu .main-sidebar-body .tx-menu-groupe-tete:focus-visible { outline: 2px solid var(--tx-olive-discret); outline-offset: -2px; }
.tx-menu-groupe-tete .tx-pastille { margin-left: auto; }
.tx-menu-chevron { flex: none; margin-left: 8px; opacity: .8; transition: transform .2s ease; }
.tx-pastille + .tx-menu-chevron { margin-left: 8px; }
.tx-menu-groupe-tete .sidemenu-label + .tx-menu-chevron { margin-left: auto; }
.tx-menu-groupe-tete[aria-expanded="true"] .tx-menu-chevron { transform: rotate(90deg); }
.tx-menu-groupe--actif > .tx-menu-groupe-tete::before {
    content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: #B9D58C;
}
.dark-menu .main-sidebar-body .tx-menu-groupe-tete { position: relative; }
.tx-menu-groupe-liens { list-style: none; margin: 0 0 6px; padding: 0 0 0 14px; }
.tx-menu-groupe-liens[hidden] { display: none !important; }
.dark-menu .main-sidebar-body .tx-menu-groupe-liens { border-left: 1px solid rgba(255, 255, 255, .12); margin-left: 26px; padding-left: 6px; }
.dark-menu .main-sidebar-body .tx-menu-groupe-liens .nav-link { min-height: 38px; font-size: 14px; }
.dark-menu .main-sidebar-body .tx-menu-groupe-liens .sidemenu-icon { width: 18px; height: 18px; opacity: .85; }
.tx-menu-sous-titre {
    list-style: none; padding: 10px 12px 4px; color: var(--tx-olive-discret); font-size: 11px; font-weight: 700;
    letter-spacing: .08em; text-transform: uppercase;
}
.tx-menu-lien[hidden], .tx-menu-groupe[hidden], .tx-menu-sous-titre[hidden] { display: none !important; }
.tx-pastille--groupe { background: var(--tx-ambre-texte); }
@media (prefers-reduced-motion: reduce) { .tx-menu-chevron { transition: none; } }

/* Menu replié (icônes seules) : recherche, sous-titres, chevrons et liens des groupes masqués */
.main-sidebar-hide:not(.main-sidebar-open) .tx-menu-recherche,
.main-sidebar-hide:not(.main-sidebar-open) .tx-menu-sous-titre,
.main-sidebar-hide:not(.main-sidebar-open) .tx-menu-chevron,
.main-sidebar-hide:not(.main-sidebar-open) .tx-menu-groupe-liens { display: none !important; }
/* Les éléments du menu restent dans la largeur du panneau (le thème dimensionne les <li> sur leur contenu) */
.dark-menu .main-sidebar-body .menu-nav > li.tx-menu-groupe,
.dark-menu .main-sidebar-body .menu-nav > li.tx-menu-lien { max-width: calc(100% - 15px); min-width: 0; }
.dark-menu .main-sidebar-body .tx-menu-groupe-liens > li { max-width: 100%; min-width: 0; }
.dark-menu .tx-menu-recherche { box-sizing: border-box; max-width: calc(100% - 20px); }
.dark-menu .main-sidebar-body .menu-nav .nav-link { min-width: 0; }
.dark-menu .main-sidebar-body .menu-nav .sidemenu-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dark-menu .main-sidebar-body .menu-nav .nav-link .tx-pastille { flex: none; }
.tx-groupe-taches > summary { padding: 12px 22px; }
.tx-groupe-plus { margin: 4px 22px 14px; }
.tx-groupes-filtres { padding: 10px 22px 6px; }
/* Le script du thème marque « active » le groupe parent : seuls le lien courant et sa tête de groupe restent surlignés */
.dark-menu .main-sidebar-body li.nav-item.active .tx-menu-groupe-liens .nav-link:not([aria-current="page"]) { background-color: transparent !important; }
.dark-menu .main-sidebar-body .tx-menu-groupe-liens .nav-link:not([aria-current="page"]):hover { background-color: rgba(255, 255, 255, .06) !important; }
.dark-menu .main-sidebar-body li.tx-menu-groupe.active > .tx-menu-groupe-tete { background-color: transparent !important; }
.dark-menu .main-sidebar-body .tx-menu-groupe-liens { margin-left: 18px; padding-left: 2px; }
.dark-menu .main-sidebar-body .tx-menu-groupe-liens > li.nav-item { margin-left: 0; }
.dark-menu .main-sidebar-body .tx-menu-groupe-liens .nav-link { padding-left: 10px; padding-right: 8px; font-size: 13.5px; }
.dark-menu .main-sidebar-body .tx-menu-groupe-tete .sidemenu-label { font-size: 14.5px; }
.dark-menu .main-sidebar-body .tx-menu-groupe-tete .sidemenu-label { white-space: normal; line-height: 1.25; }

/* ---- lot 17 bis : catalogue des pièces ---- */
.rp-aide { margin: 8px 0 0; font-size: 13px; color: var(--tx-texte-2); max-width: 70ch; }
.rp-table input[data-rp-piece] { min-width: 220px; }

/* ============================================================ lot 17 ter : frais de l'ordre de mission lisibles
   Chaque ligne de frais devient une petite fiche sur deux rangées (participant, frais, détail / jours, prix, total)
   dès que la colonne est trop étroite pour le tableau ; libellé au-dessus de chaque case. */
#partie-frais .tx-collection { container-type: inline-size; }
#table-collection-detail-iti { min-width: 0; }
#table-collection-detail-iti .mb-3 { margin-bottom: 0 !important; }
#table-collection-detail-iti input, #table-collection-detail-iti select,
#table-collection-detail-iti .select2-container { width: 100% !important; min-width: 0; }
#table-collection-detail-iti input { min-height: 44px; font-size: 15px; }
#table-collection-detail-iti .om-c-jours input,
#table-collection-detail-iti .om-c-prix input,
#table-collection-detail-iti .om-c-total input { text-align: right; font-variant-numeric: tabular-nums; }
#table-collection-detail-iti .om-c-total input { font-weight: 700; }

@container (max-width: 1100px) {
    #table-collection-detail-iti thead { display: none; }
    #table-collection-detail-iti, #table-collection-detail-iti tbody { display: block; width: 100%; }
    #table-collection-detail-iti tbody tr {
        display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 10px 12px; align-items: end;
        padding: 14px 0; border-bottom: 1px solid var(--tx-bordure, #E3E7DC);
    }
    #table-collection-detail-iti tbody td { display: block; padding: 0 !important; border: 0 !important; min-width: 0; }
    #table-collection-detail-iti tbody td[data-label]::before {
        content: attr(data-label); display: block; margin-bottom: 4px;
        font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--tx-texte-2, #5B6150);
    }
    #table-collection-detail-iti .om-c-participant { grid-column: 1 / 5; }
    #table-collection-detail-iti .om-c-frais { grid-column: 5 / 9; }
    #table-collection-detail-iti .om-c-detail { grid-column: 9 / 13; }
    #table-collection-detail-iti .om-c-jours { grid-column: 1 / 3; }
    #table-collection-detail-iti .om-c-prix { grid-column: 3 / 7; }
    #table-collection-detail-iti .om-c-total { grid-column: 7 / 11; }
    #table-collection-detail-iti .om-c-retirer { grid-column: 11 / 13; justify-self: end; }
    #table-collection-detail-iti .om-c-retirer .btn { min-width: 44px; min-height: 44px; }
}
@container (max-width: 560px) {
    #table-collection-detail-iti .om-c-participant,
    #table-collection-detail-iti .om-c-frais,
    #table-collection-detail-iti .om-c-detail { grid-column: 1 / -1; }
    #table-collection-detail-iti .om-c-jours { grid-column: 1 / 4; }
    #table-collection-detail-iti .om-c-prix { grid-column: 4 / 9; }
    #table-collection-detail-iti .om-c-total { grid-column: 9 / 13; }
    #table-collection-detail-iti .om-c-retirer { grid-column: 1 / -1; }
}
/* Tableau large (grands écrans) : largeurs utiles par colonne */
@container (min-width: 1101px) {
    #table-collection-detail-iti .om-c-detail { min-width: 180px; }
    #table-collection-detail-iti .om-c-jours { width: 90px; }
    #table-collection-detail-iti .om-c-prix, #table-collection-detail-iti .om-c-total { width: 150px; }
}
/* Péages : même lecture que les frais */
#table-collection-detail-peage .mb-3 { margin-bottom: 0 !important; }
#table-collection-detail-peage input { width: 100% !important; min-height: 44px; font-size: 15px; text-align: right; font-variant-numeric: tabular-nums; }
#table-collection-detail-peage .om-c-total input { font-weight: 700; }
@container (max-width: 560px) {
    #table-collection-detail-peage thead { display: none; }
    #table-collection-detail-peage, #table-collection-detail-peage tbody { display: block; width: 100%; }
    #table-collection-detail-peage tbody tr { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 10px 12px; align-items: end; padding: 14px 0; border-bottom: 1px solid var(--tx-bordure, #E3E7DC); }
    #table-collection-detail-peage tbody td { display: block; padding: 0 !important; border: 0 !important; min-width: 0; }
    #table-collection-detail-peage tbody td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 4px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--tx-texte-2, #5B6150); }
    #table-collection-detail-peage .om-c-jours { grid-column: 1 / 4; }
    #table-collection-detail-peage .om-c-prix { grid-column: 4 / 9; }
    #table-collection-detail-peage .om-c-total { grid-column: 9 / 13; }
    #table-collection-detail-peage .om-c-retirer { grid-column: 1 / -1; justify-self: end; }
}

/* ---- lot 18 : jours fériés ---- */
.jf-fixes { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 4px 22px 22px; }
.jf-fixes li { padding: 4px 10px; border-radius: 14px; background: var(--tx-gris-fond, #EEF0EA); font-variant-numeric: tabular-nums; font-size: 14px; }

/* Lot 18 : intertitres dans une grille de champs (fiche véhicule) */
.tx-champs > .tx-champs-section { grid-column: 1 / -1; margin: 14px 0 -4px; padding-top: 14px; border-top: 1px solid var(--tx-bord-doux);
    font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--tx-texte-2); }
.tx-champs > .tx-champs-section:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.fl-jauge { height: 10px; margin-top: 10px; border-radius: 5px; background: var(--tx-gris-fond); overflow: hidden; }
.fl-jauge > span { display: block; height: 100%; border-radius: 5px; background: var(--primary); }
.fl-jauge--alerte > span { background: var(--tx-ambre); }

/* Lot 18 : grille d'assiduité des rapports techniques (statistiques Terrain) */
.stats-assiduite { border-collapse: separate; border-spacing: 3px; font-size: 13px; min-width: 100%; }
.stats-assiduite thead th { font-weight: 600; color: var(--tx-texte-2); text-align: center; padding: 2px; white-space: nowrap; }
.stats-assiduite tbody th { text-align: left; font-weight: 600; padding: 2px 10px 2px 0; white-space: nowrap; min-width: 180px; }
.stats-assiduite tbody th a { color: var(--tx-encre); text-decoration: none; }
.stats-assiduite tbody th a:hover { text-decoration: underline; }
.stats-assiduite tbody th .tx-sous-ligne { display: block; font-weight: 400; font-size: 12px; }
.stats-assiduite td { text-align: center; padding: 0; }
.stats-assiduite td.tx-nombre { padding-left: 8px; font-weight: 700; text-align: right; }
.stats-case { display: inline-block; width: 20px; height: 20px; border-radius: 5px; vertical-align: middle; background: var(--tx-gris-fond); }
.stats-case--fait { background: var(--primary); }
.stats-case--manque { background: var(--tx-rouge-fond); box-shadow: inset 0 0 0 1.5px var(--tx-rouge); }
.stats-case--conge { background: repeating-linear-gradient(45deg, var(--tx-gris-fond) 0 4px, var(--tx-bord) 4px 8px); }
.stats-case--en_cours { background: var(--tx-surface); box-shadow: inset 0 0 0 1.5px var(--tx-ambre); }
.stats-case--avant { background: transparent; box-shadow: inset 0 0 0 1px var(--tx-bord-doux); }
.stats-case-lien:focus-visible .stats-case { outline: 2px solid var(--tx-encre); outline-offset: 2px; }
.stats-assiduite-legende .stats-case { width: 14px; height: 14px; margin-right: 6px; }

/* Lot 18 : rapports techniques (liste et fiche) */
.rt-periode { padding: 14px 18px; display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.rt-raccourcis { display: flex; flex-wrap: wrap; gap: 6px; }
.rt-raccourci { display: inline-block; padding: 5px 12px; border: 1px solid var(--tx-bord); border-radius: 999px; background: var(--tx-surface); color: var(--tx-encre); font-size: 14px; text-decoration: none; }
.rt-raccourci:hover { border-color: var(--primary); color: var(--primary); }
.rt-raccourci[aria-current="true"] { background: var(--primary); border-color: var(--primary); color: #fff; }
.rt-dates { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; }
.rt-dates label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--tx-texte-2); }
.rt-dates input, .rt-dates select { min-height: 40px; padding: 6px 10px; border: 1px solid var(--tx-champ); border-radius: var(--tx-rayon-petit); background: var(--tx-surface); color: var(--tx-encre); font: inherit; }
.rt-resume { margin: 0; color: var(--tx-texte-2); font-size: 14px; }
.rt-moi { padding: 16px 20px; margin-bottom: 16px; display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; justify-content: space-between; }
.rt-moi .tx-petit-titre { margin: 0 0 4px; }
.rt-moi-chiffre { margin: 0; color: var(--tx-texte-2); }
.rt-moi-chiffre strong { font-size: 26px; color: var(--tx-encre); margin-right: 6px; font-variant-numeric: tabular-nums; }
.rt-moi-etat { margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.rt-semaines { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.rt-semaines li { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; color: var(--tx-texte-2); }
.rt-semaines--compact { gap: 4px; margin-top: 12px; }
.rt-semaines--compact .stats-case { width: 18px; height: 18px; }
.rt-case-courante { outline: 2px solid var(--tx-encre); outline-offset: 2px; }
.rt-agent { display: inline-flex; align-items: center; gap: 10px; }
.rt-puces { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; margin: 0; padding: 0; }
.rt-puce { display: inline-block; padding: 2px 8px; border-radius: 6px; background: var(--tx-vert-clair); color: var(--tx-encre); font-size: 13px; line-height: 1.5; }
.rt-puce--plus { background: var(--tx-gris-fond); color: var(--tx-gris-texte); font-weight: 700; }
.rt-puces--grandes .rt-puce { padding: 5px 12px; font-size: 15px; }
.rt-form-icone { display: inline; margin: 0; }
.rt-form-icone button { border: 0; background: none; cursor: pointer; }
.rt-sous-titre { margin: 18px 0 6px; font-size: 15px; font-weight: 700; }
.rt-texte { margin: 0; white-space: pre-wrap; line-height: 1.6; }
.rt-deux { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.rt-bloc { padding: 16px 20px; border-top: 4px solid var(--tx-bord); }
.rt-bloc .tx-petit-titre { margin: 0 0 8px; }
.rt-bloc--difficultes { border-top-color: var(--tx-ambre); }
.rt-bloc--suggestions { border-top-color: var(--primary); }
.rt-evaluation { border: 2px solid var(--primary); }
.rt-note { border: 0; margin: 0 0 14px; padding: 0; }
.rt-note legend { font-weight: 700; margin-bottom: 8px; font-size: 15px; }
.rt-note-choix { display: flex; flex-wrap: wrap; gap: 6px; }
.rt-note-choix label { position: relative; }
.rt-note-choix input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.rt-note-choix span { display: inline-flex; align-items: center; justify-content: center; min-width: 46px; height: 42px; padding: 0 8px; border: 1px solid var(--tx-champ); border-radius: var(--tx-rayon-petit); font-weight: 700; font-variant-numeric: tabular-nums; background: var(--tx-surface); }
.rt-note-choix input:checked + span { background: var(--primary); border-color: var(--primary); color: #fff; }
.rt-note-choix input:focus-visible + span { outline: 2px solid var(--tx-encre); outline-offset: 2px; }
.rt-conseils { display: flex; flex-direction: column; gap: 6px; font-weight: 700; }
.rt-conseils textarea { font: inherit; font-weight: 400; padding: 10px 12px; border: 1px solid var(--tx-champ); border-radius: var(--tx-rayon-petit); min-height: 110px; }
.rt-evaluation-boutons { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.rt-retour { display: flex; gap: 20px; align-items: flex-start; }
.rt-retour-note { margin: 0; display: flex; align-items: baseline; gap: 4px; padding: 10px 16px; border-radius: var(--tx-rayon); background: var(--tx-vert-clair); }
.rt-retour-note strong { font-size: 30px; }
.rt-mini { margin: 12px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14px; }
.rt-mini > div { display: contents; }
.rt-mini dt { color: var(--tx-texte-2); }
.rt-mini dd { margin: 0; font-weight: 700; }
@media (max-width: 760px) {
    .rt-deux { grid-template-columns: minmax(0, 1fr); }
    .rt-retour { flex-direction: column; }
    .rt-moi { padding: 14px 16px; }
}
@media (min-width: 900px) { .rt-liste .tx-tableau td.tx-cellule-titre { min-width: 240px; } }
.tx-details code { color: inherit; background: var(--tx-gris-fond); padding: 1px 6px; border-radius: 4px; font-size: .92em; word-break: break-all; }

/* ------------------------------------------------------------ menu rapide (second menu, bas de l'écran) */
/* Gabarit : templates/layouts/menu-rapide.html.twig — comportement : charte/menu-rapide.js */

.tx-rapide {
    position: fixed;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    z-index: 1040;
    font-family: var(--tx-police);
}
.tx-rapide-barre {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 6px;
    list-style: none;
    background: var(--tx-olive);
    border-radius: 999px;
    box-shadow: 0 10px 30px rgba(28, 36, 22, .28), 0 2px 6px rgba(28, 36, 22, .18);
}
.tx-rapide-barre > li { position: relative; }

.tx-rapide-lien,
.tx-rapide-plus,
.tx-rapide-reduire,
.tx-rapide-ouvrir {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 0;
    background: transparent;
    font: inherit;
    cursor: pointer;
    text-decoration: none;
}
.tx-rapide svg { width: 20px; height: 20px; fill: currentColor; flex: none; }

body.main-body .tx-rapide-lien {
    position: relative;
    height: 44px;
    padding: 0 14px;
    border-radius: 999px;
    color: var(--tx-olive-texte);
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    transition: background-color .15s ease, color .15s ease;
}
body.main-body .tx-rapide-lien:hover { background: var(--tx-olive-actif); color: #fff; }
body.main-body .tx-rapide-lien--actif { background: var(--tx-olive-actif); color: #fff; }
body.main-body .tx-rapide-lien--actif::after {
    content: ""; position: absolute; left: 50%; bottom: 5px; width: 18px; height: 3px;
    margin-left: -9px; border-radius: 3px; background: var(--tx-marque);
}

/* Bouton « Créer » : l'action principale, au centre */
.tx-rapide-plus {
    height: 44px;
    padding: 0 18px 0 14px;
    margin: 0 4px;
    border-radius: 999px;
    background: var(--tx-action);   /* texte blanc : 7:1 */
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    transition: background-color .15s ease, transform .15s ease;
}
.tx-rapide-plus:hover { background: var(--tx-action-survol); }
.tx-rapide-plus svg { transition: transform .2s ease; }
.tx-rapide-plus[aria-expanded="true"] svg { transform: rotate(45deg); }

.tx-rapide-pastille {
    min-width: 20px; height: 20px; padding: 0 6px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 999px;
    background: var(--tx-ambre-texte);   /* blanc sur ambre foncé : 6:1 (ambre clair : 3:1) */
    color: #fff;
    font-size: 12px; font-weight: 700; line-height: 1;
}

/* Liste « Créer un document » (s'ouvre vers le haut) */
.tx-rapide-menu {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 14px);
    transform: translateX(-50%);
    min-width: 260px;
    padding: 8px;
    background: var(--tx-surface);
    border: 1px solid var(--tx-bord);
    border-radius: var(--tx-rayon);
    box-shadow: 0 14px 40px rgba(28, 36, 22, .22);
}
.tx-rapide-menu[hidden] { display: none; }
.tx-rapide-menu-titre {
    margin: 4px 10px 6px;
    font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
    color: var(--tx-texte-2);
}
.tx-rapide-menu ul { list-style: none; margin: 0; padding: 0; }
body.main-body .tx-rapide-menu a {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 10px;
    border-radius: var(--tx-rayon-petit);
    color: var(--tx-encre);
    font-size: 14.5px; font-weight: 600;
    text-decoration: none;
}
body.main-body .tx-rapide-menu a svg { color: var(--tx-marque); }
body.main-body .tx-rapide-menu a:hover,
body.main-body .tx-rapide-menu a:focus { background: var(--tx-vert-clair); color: var(--tx-action-survol); }

/* Réduire / afficher */
.tx-rapide-reduire {
    width: 32px; height: 32px; justify-content: center;
    border-radius: 50%;
    color: var(--tx-olive-discret);
}
.tx-rapide-reduire:hover { background: var(--tx-olive-actif); color: #fff; }
.tx-rapide-ouvrir {
    display: none;
    position: relative;
    width: 52px; height: 52px; justify-content: center;
    border-radius: 50%;
    background: var(--tx-olive);
    color: #fff;
    box-shadow: 0 10px 30px rgba(28, 36, 22, .28);
}
.tx-rapide-ouvrir .tx-rapide-pastille { position: absolute; top: -4px; right: -4px; }
.tx-rapide--reduit { left: auto; right: 84px; transform: none; }
.tx-rapide--reduit .tx-rapide-barre { display: none; }
.tx-rapide--reduit .tx-rapide-ouvrir { display: inline-flex; }

/* Le contenu ne passe pas sous la barre */
body.tx-avec-rapide .main-content { padding-bottom: 96px; }

/* Écrans moyens : icônes seules, libellé en infobulle */
@media (max-width: 1199.98px) {
    .tx-rapide-barre > li:not(.tx-rapide-creer) .tx-rapide-libelle { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    body.main-body .tx-rapide-lien { padding: 0 12px; }
}

/* Téléphone : barre d'onglets pleine largeur */
@media (max-width: 767.98px) {
    .tx-rapide,
    .tx-rapide--reduit { left: 0; right: 0; bottom: 0; transform: none; }
    .tx-rapide--reduit .tx-rapide-barre { display: flex; }
    .tx-rapide-ouvrir, .tx-rapide--reduit .tx-rapide-ouvrir, .tx-rapide-reduire-li { display: none !important; }
    .tx-rapide-barre {
        justify-content: space-around;
        gap: 0;
        padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
        border-radius: 16px 16px 0 0;
    }
    .tx-rapide-barre > li { flex: 1; display: flex; justify-content: center; }
    .tx-rapide-barre > li:not(.tx-rapide-creer) .tx-rapide-libelle { position: static !important; width: auto; height: auto; overflow: visible; clip: auto; }
    body.main-body .tx-rapide-lien {
        flex-direction: column; gap: 2px;
        height: 52px; padding: 4px 6px;
        border-radius: 12px;
        font-size: 11px;
    }
    body.main-body .tx-rapide-lien--actif::after { display: none; }
    .tx-rapide-lien .tx-rapide-pastille { position: absolute; top: 0; left: 50%; margin-left: 4px; min-width: 18px; height: 18px; font-size: 11px; }
    .tx-rapide-plus {
        width: 52px; height: 52px; padding: 0; margin: -18px 0 0;
        justify-content: center;
        border-radius: 50%;
        border: 4px solid var(--tx-fond);
    }
    .tx-rapide-plus .tx-rapide-libelle { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .tx-rapide-plus svg { width: 26px; height: 26px; }
    .tx-rapide-menu { position: fixed; left: 12px; right: 12px; bottom: calc(80px + env(safe-area-inset-bottom)); transform: none; min-width: 0; }
    body.tx-avec-rapide .main-content { padding-bottom: 90px; }
    body.tx-avec-rapide #back-to-top { bottom: 92px !important; }
    body.tx-avec-rapide .main-footer { margin-bottom: 70px; }
}

/* Thème sombre */
body.dark-theme .tx-rapide-menu { background: #1f2619; border-color: #33402a; }
body.dark-theme.main-body .tx-rapide-menu a { color: #E3EAD8; }
body.dark-theme.main-body .tx-rapide-menu a:hover,
body.dark-theme.main-body .tx-rapide-menu a:focus { background: #2c3923; color: #fff; }
@media (max-width: 767.98px) { body.dark-theme .tx-rapide-plus { border-color: #14190f; } }

@media (prefers-reduced-motion: reduce) {
    .tx-rapide *, .tx-rapide-plus svg { transition: none !important; }
}
/* En local seulement : la barre de débogage Symfony occupe le bas de l'écran */
body:has(.sf-toolbar .sf-toolbarreset:not([style*="display: none"])) .tx-rapide { bottom: 54px; }
@media print { .tx-rapide { display: none !important; } body.tx-avec-rapide .main-content { padding-bottom: 0; } }

/* ------------------------------------------------------------ lot 19 : sous-menus du menu latéral */
.dark-menu .main-sidebar-body .tx-menu-sous-groupe > .tx-menu-groupe-tete { font-weight: 600; color: var(--tx-olive-texte) !important; min-height: 38px; font-size: 14px; }
.dark-menu .main-sidebar-body .tx-menu-sous-groupe > .tx-menu-groupe-tete .sidemenu-icon { width: 18px; height: 18px; opacity: .85; }
.dark-menu .main-sidebar-body .tx-menu-sous-groupe > .tx-menu-groupe-liens { margin-left: 16px; }
.tx-menu-sous-groupe.tx-menu-groupe--actif > .tx-menu-groupe-tete::before { top: 9px; bottom: 9px; }

/* ------------------------------------------------------------ lot 19 : rapports de mission, justificatifs, finance */
.tx-pieces { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.tx-pieces--seule { min-width: 220px; }
.tx-piece { display: flex; flex-direction: column; gap: 2px; }
.tx-piece-ligne { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.tx-piece-nom { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.tx-piece-montant { font-variant-numeric: tabular-nums; }
.tx-piece-motif { color: var(--tx-rouge-texte); font-size: 13.5px; }
.tx-piece-actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px 10px; margin-top: 4px; }
.tx-piece-actions form { margin: 0; }
.tx-piece-refus { position: relative; }
.tx-piece-refus > summary { list-style: none; cursor: pointer; }
.tx-piece-refus > summary::-webkit-details-marker { display: none; }
.tx-piece-refus[open] > form { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; padding: 10px; border: 1px solid var(--tx-bord); border-radius: var(--tx-rayon-petit); background: var(--tx-surface); }
.tx-piece-refus[open] > form .form-control { flex: 1 1 200px; min-width: 0; }
.tx-paiement-rapide label { display: flex; flex-direction: column; gap: 2px; font-size: 13px; flex: 1 1 120px; }
.tx-manque { color: var(--tx-ambre-texte); font-weight: 600; }
.tx-case-justifier { display: inline-flex; align-items: center; gap: 6px; margin: 0; cursor: pointer; }
.tx-case-justifier input { width: 18px; height: 18px; accent-color: var(--tx-action); }
.tx-tableau--frais td, .tx-tableau--frais th { vertical-align: top; }
.tx-bilan dt small { font-weight: 400; color: var(--tx-texte-2); }
.tx-bilan .tx-bilan-solde { padding-top: 10px; border-top: 1px solid var(--tx-bord); font-weight: 700; color: var(--tx-encre); }
.tx-bilan dd.tx-bilan-solde { font-size: 18px; }
.tx-bilan-solde--negatif, .tx-negatif { color: var(--tx-rouge-texte); }
.tx-aide-bilan { margin: 12px 0 0; color: var(--tx-texte-2); font-size: 14px; }
.tx-details--texte dd { white-space: normal; line-height: 1.55; }
.tx-controle { display: flex; flex-direction: column; gap: 8px; }
.tx-controle label { font-weight: 600; margin: 0; }
.tx-controle label small { font-weight: 400; color: var(--tx-texte-2); }
.tx-controle-boutons { display: flex; flex-wrap: wrap; gap: 8px; }
.tx-controle-boutons .tx-bouton[disabled] { opacity: .5; cursor: not-allowed; }
.tx-actions--fiche form { margin: 0; display: inline-flex; }
@media (max-width: 767.98px) {
    .tx-tableau--frais thead { display: none; }
    .tx-tableau--frais tr { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--tx-bord-doux); }
    .tx-tableau--frais th, .tx-tableau--frais td { border: 0 !important; padding: 0 !important; }
    .tx-tableau--frais td[data-label] { grid-column: 1 / -1; }
}
dl.tx-chiffres.tx-bilan { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 16px; }
dl.tx-chiffres.tx-bilan dt, dl.tx-chiffres.tx-bilan dd { padding: 0; background: none; }
.tx-pleine-largeur { display: flex; flex-direction: column; gap: 28px; margin-top: 28px; }
.tx-tableau--frais .tx-pieces { min-width: 260px; }
.dark-menu .main-sidebar-body .tx-menu-groupe-tete .sidemenu-label { flex: 1 1 auto !important; text-align: left !important; white-space: normal !important; line-height: 1.25; }
.dark-menu .main-sidebar-body .tx-menu-groupe-tete .tx-menu-chevron { margin-left: 8px; }
.dark-menu .main-sidebar-body .tx-menu-sous-groupe > .tx-menu-groupe-liens { margin-left: 10px; padding-left: 4px; }
.dark-menu .main-sidebar-body .tx-menu-groupe > .tx-menu-groupe-tete { width: 100% !important; box-sizing: border-box; }

/* ------------------------------------------------------------ lot 21 : évaluation des performances */
.tx-feu { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 999px; font-size: 13px; font-weight: 700; white-space: nowrap; line-height: 1.4; }
.tx-feu::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: currentColor; flex: none; }
.tx-feu--vert { color: var(--tx-action); background: var(--tx-vert-clair); }
.tx-feu--orange { color: var(--tx-ambre-texte); background: var(--tx-ambre-fond); }
.tx-feu--rouge { color: var(--tx-rouge-texte); background: var(--tx-rouge-fond); }
.tx-feu--vide { color: var(--tx-gris-texte); background: var(--tx-gris-fond); font-weight: 600; }
.tx-feu--vide::before { background: transparent; border: 2px solid currentColor; width: 8px; height: 8px; }
.tx-note-ligne { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tx-note-valeur { font-weight: 700; font-variant-numeric: tabular-nums; }
.tx-resultat { display: grid; grid-template-columns: auto 1fr; gap: 18px 24px; align-items: center; }
.tx-resultat-note { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 132px; padding: 16px 18px; border-radius: var(--tx-rayon); border: 2px solid currentColor; }
.tx-resultat-note strong { font-size: 40px; line-height: 1; font-variant-numeric: tabular-nums; }
.tx-resultat-note span { font-size: 13px; font-weight: 600; margin-top: 4px; }
.tx-resultat-note--vert { color: var(--tx-action); background: var(--tx-vert-clair); }
.tx-resultat-note--orange { color: var(--tx-ambre-texte); background: var(--tx-ambre-fond); }
.tx-resultat-note--rouge { color: var(--tx-rouge-texte); background: var(--tx-rouge-fond); }
.tx-resultat-note--vide { color: var(--tx-gris-texte); background: var(--tx-gris-fond); border-style: dashed; }
.tx-resultat dl { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; margin: 0; }
.tx-resultat dt { font-weight: 400; color: var(--tx-texte-2); }
.tx-resultat dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.tx-jauge { position: relative; height: 8px; border-radius: 999px; background: var(--tx-gris-fond); overflow: hidden; min-width: 80px; }
.tx-jauge > span { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: var(--tx-action); }
.tx-jauge--orange > span { background: var(--tx-ambre); }
.tx-jauge--rouge > span { background: var(--tx-rouge); }
.tx-tableau--eval td, .tx-tableau--eval th { vertical-align: top; }
.tx-tableau--eval .tx-col-critere { min-width: 240px; width: 34%; }
.tx-tableau--eval .tx-col-saisie { min-width: 220px; }
.tx-tableau--eval .tx-col-poids { width: 70px; text-align: right; font-variant-numeric: tabular-nums; }
.tx-tableau--eval .tx-partie th { background: var(--tx-fond); font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--tx-texte-2); }
.tx-saisie-note { display: flex; flex-direction: column; gap: 6px; }
.tx-saisie-note input[type=number] { width: 96px; font-variant-numeric: tabular-nums; }
.tx-saisie-note textarea { min-height: 54px; resize: vertical; }
.tx-saisie-note .tx-sur10 { color: var(--tx-texte-2); font-size: 13px; }
.tx-commentaire { margin: 4px 0 0; color: var(--tx-texte-2); font-size: 14px; line-height: 1.45; white-space: pre-line; }
.tx-calcule { font-size: 12.5px; color: var(--tx-texte-2); }
.tx-pistes { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; line-height: 1.45; }
.tx-manques { margin: 0; padding-left: 18px; color: var(--tx-ambre-texte); }
.tx-somme-poids { font-weight: 700; }
.tx-somme-poids--ok { color: var(--tx-action); }
.tx-somme-poids--ko { color: var(--tx-rouge-texte); }
.tx-annees { display: flex; flex-direction: column; gap: 14px; }
.tx-annee { display: grid; grid-template-columns: 64px repeat(4, minmax(0, 1fr)); gap: 10px; align-items: stretch; }
.tx-annee-libelle { font-weight: 700; font-size: 18px; align-self: center; }
.tx-annee-case { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border: 1px solid var(--tx-bord); border-radius: var(--tx-rayon-petit); background: var(--tx-surface); min-height: 70px; text-decoration: none !important; color: inherit; }
.tx-annee-case:hover { border-color: var(--tx-marque); }
.tx-annee-case--annuelle { border-width: 2px; }
.tx-annee-case small { color: var(--tx-texte-2); font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.tx-annee-case--vide { border-style: dashed; color: var(--tx-texte-2); background: transparent; }
.tx-courbe { display: flex; align-items: flex-end; gap: 8px; height: 170px; padding: 8px 0 0; border-bottom: 1px solid var(--tx-bord); overflow-x: auto; }
.tx-courbe-barre { flex: 1 0 34px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; font-size: 12px; }
.tx-courbe-barre i { display: block; width: 100%; max-width: 46px; border-radius: 6px 6px 0 0; background: var(--tx-action); }
.tx-courbe-barre.orange i { background: var(--tx-ambre); }
.tx-courbe-barre.rouge i { background: var(--tx-rouge); }
.tx-courbe-barre.annuelle i { outline: 2px solid var(--tx-encre); outline-offset: -2px; }
.tx-courbe-barre b { font-variant-numeric: tabular-nums; }
.tx-courbe-legende { display: flex; gap: 8px; overflow-x: auto; }
.tx-courbe-legende span { flex: 1 0 34px; text-align: center; font-size: 11.5px; color: var(--tx-texte-2); }
.tx-repartition { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: var(--tx-gris-fond); }
.tx-repartition span { display: block; height: 100%; }
.tx-repartition .vert { background: var(--tx-action); } .tx-repartition .orange { background: var(--tx-ambre); } .tx-repartition .rouge { background: var(--tx-rouge); }
.tx-objectifs-table input[type=number] { width: 84px; }
.tx-objectifs-table textarea { min-height: 48px; }
@media (max-width: 767.98px) {
    .tx-resultat { grid-template-columns: 1fr; }
    .tx-annee { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tx-annee-libelle { grid-column: 1 / -1; }
    .tx-tableau--eval thead { display: none; }
    .tx-tableau--eval tr { display: flex; flex-direction: column; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--tx-bord-doux); }
    .tx-tableau--eval th, .tx-tableau--eval td { border: 0 !important; padding: 0 !important; width: auto !important; text-align: left !important; }
    .tx-tableau--eval td[data-label]::before { content: attr(data-label); display: block; font-size: 12.5px; font-weight: 700; color: var(--tx-texte-2); margin-bottom: 2px; }
}
li.tx-note-ligne { display: flex; justify-content: space-between; }
.tx-tableau--eval { table-layout: fixed; width: 100%; }
.tx-tableau--eval .tx-col-critere { width: 32%; min-width: 0; }
.tx-tableau--eval .tx-col-poids { width: 64px; }
.tx-tableau--eval .tx-col-saisie { min-width: 0; }
.tx-saisie-note textarea, .tx-saisie-note .form-control:not([type=number]) { width: 100%; max-width: 100%; box-sizing: border-box; }
.tx-tableau--eval td, .tx-tableau--eval th { overflow-wrap: anywhere; }
.tx-tableau--eval .tx-col-poids { width: 78px; white-space: nowrap; }
/* Lot 21 : jusqu'à 6 boutons dans la barre du téléphone (raccourci Évaluations) */
@media (max-width: 767.98px) {
    .tx-rapide-barre > li { min-width: 0; }
    body.main-body .tx-rapide-barre > li > .tx-rapide-lien { padding: 4px 2px; max-width: 100%; min-width: 0; }
    .tx-rapide-barre > li:not(.tx-rapide-creer) .tx-rapide-libelle { display: block; max-width: 100%; white-space: nowrap; overflow: hidden !important; text-overflow: ellipsis; font-size: 10.5px; }
}
.tx-libelle-court { display: none; }
@media (max-width: 767.98px) {
    .tx-rapide-barre .tx-libelle-court { display: inline; }
    .tx-rapide-barre .tx-libelle-court ~ * , .tx-rapide-barre .tx-rapide-libelle:has(.tx-libelle-court) .tx-libelle-long { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}

/* Signature d'un employé posée par un administrateur (fiche Personnel) */
.tx-signature-apercu { display: flex; align-items: center; justify-content: center; min-height: 90px; margin: 10px 0 14px; padding: 8px; border: 1px dashed var(--tx-bord); border-radius: var(--tx-rayon-petit); background: #FFFFFF; }
.tx-signature-apercu img { max-width: 100%; max-height: 120px; }
.tx-signature-choix { margin-bottom: 12px; }
.tx-signature-forme { display: flex; flex-direction: column; gap: 10px; }
.tx-signature-cadre { border: 1px solid var(--tx-champ); border-radius: var(--tx-rayon-petit); background: #FFFFFF; }
.tx-signature-cadre canvas { display: block; width: 100%; height: 170px; touch-action: none; cursor: crosshair; }

/* Lignes masquées par un administrateur (listes) */
.tx-ligne--masquee > td, .tx-ligne--masquee > th { opacity: .55; background: repeating-linear-gradient(-45deg, transparent 0 8px, var(--tx-gris-fond) 8px 16px); }
.tx-ligne--masquee .tx-icone--masquer { opacity: 1; }
.tx-icone--masquer { color: var(--tx-texte-2); }
.tx-voir-masquees { white-space: nowrap; }

/* Mon compte : avatar aux initiales (calculé dans la page, sans service extérieur) */
.tx-avatar-initiales {
    display: flex; align-items: center; justify-content: center;
    width: 100px; height: 100px; border-radius: 50%;
    background: var(--tx-action); color: #FFFFFF;
    font-size: 36px; font-weight: 700; letter-spacing: .02em;
    border: 4px solid var(--tx-surface);
}

/* Champ téléphone : indicatif pays + numéro */
.tx-telephone .tx-telephone-indicatif { flex: 0 0 auto; width: 12rem; max-width: 48%; }
.tx-telephone .form-control { min-width: 0; }

/* ------------------------------------------------------------ lien d'évitement (audit 2026-10-12) */
.tx-evitement {
    position: fixed; left: 16px; top: -100px; z-index: 20000;
    padding: 10px 16px; border-radius: var(--tx-rayon-petit);
    background: var(--tx-surface); color: var(--tx-action) !important; font-weight: 700;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .2);
}
.tx-evitement:focus { top: 12px; }
#tx-contenu:focus { outline: none; }

/* Téléphone : sur une fiche, la barre d'actions fixée en bas prend la place du menu rapide (sinon il la recouvre) */
@media (max-width: 575.98px) {
    body:has(.tx-actions--fiche) .tx-rapide { display: none; }
}

/* ===== Audit final (m9, T-24) : formulaire de rapport technique à la charte (cases des travaux en grille) ===== */
.rt-travaux-choix { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 18px; padding: 12px 14px; border: 1px solid var(--tx-bord); border-radius: var(--tx-rayon-petit); background: var(--tx-surface); }
.rt-travaux-choix .form-check { display: flex; align-items: flex-start; gap: 8px; min-height: 32px; margin: 0; padding: 0; }
.rt-travaux-choix .form-check-input { position: static; float: none; flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--tx-action); }
.rt-travaux-choix .form-check-label { font-weight: 400; }
@media (max-width: 575.98px) { .rt-travaux-choix { grid-template-columns: minmax(0, 1fr); } }
/* Audit final (m9, T-17) : saisie restaurée depuis le brouillon de l'onglet */
.tx-brouillon-avis { margin: 0 0 12px; padding: 10px 14px; border-radius: var(--tx-rayon-petit); background: var(--tx-ambre-fond); color: var(--tx-ambre-texte); font-weight: 600; }
.tx-brouillon-avis .tx-bouton-lien, .tx-brouillon-avis a { margin-left: 6px; color: inherit; text-decoration: underline; }

/* ------------------------------------------------------------ menu latéral refait (octobre 2026)
   Le script du thème (sidemenu.js) n'est plus chargé : il enveloppait toute la page dans un bloc « overflow: hidden ».
   Filet de sécurité équivalent qui ne gêne ni « position: sticky » ni les éléments fixes : rien ne déborde à droite de la page. */
.page { overflow-x: clip; }

/* ===== Messages après une action (enregistrement, suppression…) : carte blanche à la charte, liseré et icône selon le type ===== */
.tx-flash-pile { padding: 16px !important; max-width: min(420px, calc(100vw - 32px)); }
.toast.tx-flash {
    --tx-flash-couleur: var(--tx-action);
    --tx-flash-fond: var(--tx-vert-clair);
    position: relative; overflow: hidden;
    display: flex; align-items: flex-start; gap: 12px;
    width: 100%; padding: 14px 12px 14px 16px; margin-bottom: 10px;
    font-family: var(--tx-police); font-size: 14.5px; color: var(--tx-encre);
    background: var(--tx-surface); border: 1px solid var(--tx-bord); border-left: 5px solid var(--tx-flash-couleur);
    border-radius: var(--tx-rayon); box-shadow: 0 10px 30px rgba(28, 36, 22, .16);
}
.toast.tx-flash:not(.show) { display: none; }
.toast.tx-flash.showing, .toast.tx-flash.show { display: flex; }
.tx-flash--erreur { --tx-flash-couleur: var(--tx-rouge-texte); --tx-flash-fond: var(--tx-rouge-fond); }
.tx-flash--alerte { --tx-flash-couleur: var(--tx-ambre-texte); --tx-flash-fond: var(--tx-ambre-fond); }
.tx-flash--info { --tx-flash-couleur: var(--tx-olive-actif); --tx-flash-fond: var(--tx-gris-fond); }
.tx-flash-icone {
    flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 50%; color: var(--tx-flash-couleur); background: var(--tx-flash-fond);
}
.tx-flash-texte { flex: 1 1 auto; min-width: 0; }
.tx-flash-titre { display: block; font-size: 15px; font-weight: 700; color: var(--tx-flash-couleur); margin: 1px 0 2px; }
.tx-flash .toast-body { padding: 0; color: var(--tx-encre); line-height: 1.45; overflow-wrap: anywhere; }
.tx-flash-fermer {
    flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; margin: -4px -2px 0 0; padding: 0; border: 0; border-radius: var(--tx-rayon-petit);
    color: var(--tx-gris-texte); background: transparent; cursor: pointer;
}
.tx-flash-fermer:hover { background: var(--tx-gris-fond); color: var(--tx-encre); }
.tx-flash-fermer:focus-visible { outline: 2px solid var(--tx-action); outline-offset: 1px; }
/* Barre du temps restant avant disparition (messages de succès et d'information, 6 s) */
.tx-flash-delai { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--tx-flash-couleur); opacity: .35; transform-origin: left; }
.tx-flash.show .tx-flash-delai { animation: tx-flash-delai 6s linear forwards; }
.tx-flash:hover .tx-flash-delai { animation-play-state: paused; }
@keyframes tx-flash-delai { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@media (prefers-reduced-motion: reduce) { .tx-flash .tx-flash-delai { display: none; } .toast.tx-flash { transition: none; } }
@media (max-width: 575px) { .tx-flash-pile { left: 0; right: 0; max-width: none; } }

/* ===== Boîte de confirmation (dialogues.js) : même gabarit que la boîte de suppression des listes ===== */
.tx-dialogue--confirmer { width: min(460px, calc(100vw - 32px)); font-family: var(--tx-police); color: var(--tx-encre); }
.tx-dialogue--confirmer h2 { font-size: 18px; line-height: 1.35; }
.tx-dialogue--confirmer p { line-height: 1.45; }

/* Paramètres › Sécurité des comptes */
.tx-securite-carte { margin-bottom: 18px; }
.tx-securite-carte > .tx-petit-titre, .tx-securite-carte summary.tx-petit-titre { font-size: 17px; color: var(--tx-encre); margin-bottom: 10px; }
.tx-securite-carte summary { cursor: pointer; }
.tx-securite-carte .tx-pied { margin-top: 16px; }
/* Bandeau « mot de passe provisoire » : compact, bouton à droite */
.tx-motif.tx-bandeau-provisoire { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 16px; margin-bottom: 0; padding: 12px 20px; text-align: left; }
.tx-bandeau-provisoire h2 { flex: 1 1 100%; margin: 0; }
.tx-bandeau-provisoire p { flex: 1 1 320px; margin: 0; }
.tx-bandeau-provisoire .tx-bouton { flex: 0 0 auto; width: auto; }
.tx-securite-retrait { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin: 0; }
.tx-securite-retrait input { max-width: 180px; }
