/* Copyright (C) 2026 TAD IT Services
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <https://www.gnu.org/licenses/>.
 *
 * ============================================================================
 * MboaPaie — Design system « humain »
 * Charte chaleureuse, professionnelle et accessible. Tokens partagés par toutes
 * les pages du module et par lib/mboapaie_ui.lib.php. Responsive, dark-mode ready,
 * focus visibles, transitions douces (respecte prefers-reduced-motion).
 * ============================================================================
 */

:root {
	/* Marque — verts chaleureux (feuille / croissance). Accents conserves : ils
	   portent leur propre texte blanc, donc restent lisibles sur n'importe quel
	   theme (clair comme sombre). Les liens suivent le theme Dolibarr. */
	/* Accent principal : suit le theme Dolibarr actif. Priorite a la marque du
	 * theme ergonova (--ergo-brand-primary) s'il est actif, puis a la couleur
	 * d'action / de lien standard, et enfin repli sur le vert de marque si aucun
	 * theme ne definit rien. Les boutons/KPI/focus ne sont donc plus figes. */
	/* v1.25.0 : l'ACCENT suit desormais EXCLUSIVEMENT le theme Dolibarr natif
	 * (--butactionbg / couleur d'action). Plus aucune couleur d'accent figee.
	 * Statuts (amber/red/brick) et surbrillances d'audit restent des variables
	 * SEMANTIQUES MboaPaie centralisees (seul endroit ou une valeur est definie). */
	--mbp-green: var(--butactionbg, var(--colortextlink, var(--colortext)));
	--mbp-green-600: var(--butactionbghover, var(--butactionbg, var(--colortextlink)));
	--mbp-on-accent: var(--textbutaction, var(--colorbacktabcard1));
	/* Teinte claire de l'accent : derivee du theme via color-mix (repli sur un
	 * vert tres pale si le navigateur ne supporte pas color-mix). Suit donc le
	 * theme actif (turquoise pale sous ergonova). */
	--mbp-green-050: color-mix(in srgb, var(--mbp-green) 12%, var(--mbp-surface));
	/* ============================================================
	 * EXCEPTION UNIQUE (v1.25.1) : les INDICATEURS DE STATUT propres au module
	 * (validé / en attente / rejeté = ok / avertissement / danger) conservent des
	 * couleurs FIXES attribuees. C'est le SEUL endroit du module ou une couleur est
	 * ecrite en dur, et uniquement pour porter un SENS metier stable quel que soit
	 * le theme. Sont FIXES ici : statuts (ok/warn/danger) + surbrillances d'audit.
	 * TOUT le reste (accent, neutres, ombres) herite dynamiquement du theme ACTIF.
	 * ============================================================ */
	--mbp-amber: #F2B705;
	--mbp-amber-050: #FDF4DA;
	--mbp-brick: #B3541E;
	--mbp-brick-050: #F7E9DF;
	--mbp-red: #C4453B;
	--mbp-red-050: #F8E6E4;
	/* v1.99.23 : COULEURS DE FORMAT (icones d'export). Meme logique que les statuts
	 * ci-dessus : un pictogramme de FORMAT porte un sens stable, INDEPENDANT du theme
	 * (un fichier Excel est vert partout, un CSV vert plus fonce, JSON/code indigo).
	 * Ce sont donc des tokens de charte FIXES, definis ici (seul endroit admis). */
	--mbp-fmt-excel: #217346;
	--mbp-fmt-csv: #157347;
	--mbp-fmt-code: #3F51B5;
	/* v1.99.27 : ÉCHELLE TYPOGRAPHIQUE (charte rédaction/typo). Source UNIQUE, en rem
	 * (suit la base du thème, accessible). Tout composant référence un token, jamais
	 * une valeur en dur. Cf. sonde mbp_diag_scan_typo. */
	/* v1.99.79 : ÉCHELLE ALIGNÉE SUR DOLIBARR NATIF (eldy). Le corps (14), les titres (16)
	 * et les micro (12) étaient déjà natifs ; les libellés (→14), les grands chiffres (→25)
	 * et les pictos (→16) reviennent aux dimensions natives. Style (couleurs/arrondi/dark)
	 * conservé — seules les TAILLES changent. */
	--mbp-fs-display: 25px;   /* grands chiffres KPI (natif : 25px) */
	--mbp-fs-section: 16px;   /* titre de section / colonne (natif) */
	--mbp-fs-body: 14px;    /* corps, cellules, boutons (= base native) */
	--mbp-fs-label: 14px;  /* libellés de formulaire (natif = base) */
	--mbp-fs-help: 13px;   /* aides, intros (natif) */
	--mbp-fs-micro: 12px;    /* badges, légendes (natif) */
	--mbp-fs-icon: 16px;     /* pictos (natif : ~1em inline) */
	--mbp-fs-newbtn: 28px;   /* ⊕ « Nouveau » icône-seule (aligné sur MEDU) */
	/* v1.99.79 : HAUTEUR DE CONTRÔLE unique alignée sur le natif (boutons/champs/selects/
	 * boutons-icônes). Remplace les 34px/30px dispersés → rendu compact « Dolibarr natif ».
	 * Les lignes de tableau se resserrent d'elles-mêmes (contrôles plus courts). */
	--mbp-ctl-h: 28px;       /* hauteur native d'un contrôle (input/select/bouton) */
	--mbp-ctl-lh: 26px;      /* interligne interne pour centrer le libellé (h - bordures) */
	/* v1.99.209 : padding des lignes de fiche EN LECTURE = hauteur NATIVE Dolibarr.
	 * Le cœur applique « table.border td { padding: 2px } » aux fiches (tableforfield) :
	 * on reprend exactement cette hauteur verticale (2px), en gardant un retrait
	 * horizontal confortable pour l'alignement libellé/valeur. Token unique →
	 * généralisation à TOUTES les fiches (une seule source de vérité). */
	--mbp-fiche-row-pad: 2px 16px;
	/* v1.99.80 : STYLE DE BOUTON NEUTRE (comme le natif : fond clair, bordure fine, encre
	 * foncée). Demande user — TOUS les boutons d'action, sans exception, portent ce style
	 * (fini l'aplat d'accent). Dérivé du thème (theme-aware, dark-mode). La SUPPRESSION
	 * garde son rouge (signal de sécurité, hors périmètre « couleur accent »). */
	--mbp-btn-bg: var(--mbp-surface);
	--mbp-btn-ink: var(--mbp-ink);
	--mbp-btn-border: var(--mbp-line-strong);
	--mbp-btn-bg-hover: var(--mbp-grey-050);
	/* v1.99.95 : INFOBULLE MAISON UNIQUE (centralisée) — demande user : FOND BLANC,
	 * TEXTE NOIR (+ bordure/ombre pour lisibilité). Seul endroit où la couleur est définie.
	 * Largeur = contenu (capée), positionnée AU-DESSUS du déclencheur (JS). */
	--mbp-tip-bg: #ffffff;
	--mbp-tip-ink: #1a1a1a;
	--mbp-tip-border: #d0d5dd;
	/* Neutres : herites du THEME Dolibarr actif (var --color*), avec repli sur
	   l'ancienne palette creme si le theme ne definit pas la variable. C'est ce
	   qui fait que MboaPaie epouse le theme (clair / sombre / couleurs entreprise)
	   au lieu d'imposer un ilot creme fige. */
	--mbp-ink: var(--colortext);
	--mbp-muted: color-mix(in srgb, var(--colortext) 62%, var(--colorbackbody));
	--mbp-line: var(--tableborder, color-mix(in srgb, var(--colortext) 15%, var(--colorbackbody)));
	--mbp-bg: var(--colorbackbody);
	--mbp-surface: var(--colorbacktabcard1);
	--mbp-surface-2: var(--colorbacklinepair1);
	/* Formes & profondeur */
	--mbp-radius: 2px;
	--mbp-radius-sm: 2px;
	--mbp-radius-btn: 8px;   /* rayon des BOUTONS de la charte (façon démo, nettement arrondi) */
	/* v1.90.0 : rayon des CHAMPS (saisies + listes) — arrondi « 4 côtés partout »
	 * demandé sur la maquette. Dérivé, pas figé (px de forme, pas de couleur). */
	--mbp-field-radius: 8px;
	/* v1.99.82 : bordure PLEINE et visible des zones de saisie (le natif ne pose qu'un
	 * fin trait bas → champs difficiles à repérer). Dérivée du thème. */
	--mbp-field-border: var(--mbp-line-strong);
	/* Rayon des cartes de la couche « mbp-ui » (identité premium, dérivée du thème). */
	--mbp-radius-lg: 12px;
	--mbp-shadow: 0 1px 2px color-mix(in srgb, var(--colorblack) 5%, transparent), 0 6px 20px color-mix(in srgb, var(--colorblack) 6%, transparent);
	--mbp-shadow-sm: 0 1px 2px color-mix(in srgb, var(--colorblack) 6%, transparent);
	--mbp-ring: 0 0 0 3px color-mix(in srgb, var(--mbp-green) 25%, transparent);
	--mbp-font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;

	/* v1.24.2 : jetons issus de la migration des couleurs FIGEES (audit couleurs).
	   Valeurs identiques aux anciens litteraux -> rendu inchange, theming centralise. */
	--mbp-white: var(--colorwhite);
	--mbp-badge-bg: color-mix(in srgb, var(--colortext) 10%, var(--colorbacktabcard1));
	--mbp-badge-ink: var(--colortext);
	--mbp-amber-ink: #8A6D00;
	--mbp-red-ink: #9E362E;
	--mbp-grey-050: color-mix(in srgb, var(--colortext) 8%, var(--colorbacktabcard1));
	--mbp-line-strong: color-mix(in srgb, var(--mbp-line) 70%, var(--colortext));
	--mbp-line-soft: color-mix(in srgb, var(--mbp-line) 60%, var(--colorbackbody));
	--mbp-muted-soft: color-mix(in srgb, var(--colortext) 42%, var(--colorbackbody));
	--mbp-neutral-800: var(--colortext);
	--mbp-neutral-700: color-mix(in srgb, var(--colortext) 85%, var(--colorbackbody));
	--mbp-neutral-550: var(--mbp-muted);
	--mbp-neutral-500: var(--mbp-muted-soft);
	--mbp-surface-alt: var(--colorbacklinepair1);
	--mbp-surface-alt2: var(--colorbacktabcard1);
	--mbp-green-tint: color-mix(in srgb, var(--mbp-green) 8%, var(--mbp-surface));
	--mbp-danger-strong: #C0392B;
	--mbp-shadow-tint: color-mix(in srgb, var(--colorblack) 6%, transparent);
	/* Bannieres des outils de diagnostic (audit alignement / couleurs / bascule).
	 * v1.99.29 (audit conformite mbp-ui) : ces fonds/bordures/encres etaient FIGES
	 * en clair (#EEF7F1...) et restaient donc clairs sous un theme Dolibarr sombre,
	 * creant un ilot incoherent. Ils sont desormais DERIVES du theme actif via
	 * color-mix sur --colorbackbody / --colortext, tout en conservant la TEINTE
	 * SEMANTIQUE stable (vert=ok, ambre=warn, rouge=err). Suivent le mode sombre. */
	--mbp-ok-bg: color-mix(in srgb, var(--mbp-green) 12%, var(--colorbackbody));
	--mbp-ok-border: color-mix(in srgb, var(--mbp-green) 34%, var(--colorbackbody));
	--mbp-err-bg: color-mix(in srgb, var(--mbp-red) 12%, var(--colorbackbody));
	--mbp-err-border: color-mix(in srgb, var(--mbp-red) 38%, var(--colorbackbody));
	--mbp-err-ink: color-mix(in srgb, var(--mbp-red) 72%, var(--colortext));
	--mbp-warn-bg: color-mix(in srgb, var(--mbp-amber) 14%, var(--colorbackbody));
	--mbp-warn-border: color-mix(in srgb, var(--mbp-amber) 42%, var(--colorbackbody));
	--mbp-warn-ink: color-mix(in srgb, var(--mbp-amber) 62%, var(--colortext));

	--mbp-ink-strong: var(--colortext);
	--mbp-shadow-strong: color-mix(in srgb, var(--colorblack) 30%, transparent);
	--mbp-flag-height: #E69500;
	--mbp-flag-left: #7A3FB5;
	--mbp-flag-gap: #2A8A8A;
	--mbp-flag-indent: #C0398B;
	--mbp-flag-text: #D81B60;
	--mbp-flag-list: #DD3333;

	/* v1.99.152 — COUCHE « HYBRIDE SaaSFabric » : langage visuel porté (pastille d'en-tête,
	 * cartes KPI, pills sémantiques, cartes à en-tête, en-têtes de liste en capitales douces).
	 * L'ACCENT reste var(--mbp-green) = thème actif (règle anti-hardcode MboaPaie conservée).
	 * success/info FIXES rejoignent les statuts déjà figés (amber/red) — seul endroit admis.
	 * Toutes les TAILLES passent par des tokens --mbp-fs-* (contrat ui_regressions). */
	--mbp-fs-h1: 21px;            /* titre de page (pastille header) */
	--mbp-radius-card: 9px;      /* cartes & tuiles KPI hybrides */
	--mbp-radius-pico: 10px;     /* pastille-icône d'en-tête */
	--mbp-pico-sm: 34px;         /* pastille-icône compacte (en-tête de modale) */
	--mbp-radius-pill: 20px;     /* pills sémantiques */
	--mbp-success: #16A34A;
	--mbp-success-050: color-mix(in srgb, var(--mbp-success) 12%, var(--mbp-surface));
	--mbp-success-ink: color-mix(in srgb, var(--mbp-success) 74%, var(--colortext));
	--mbp-info: #2563EB;
	--mbp-info-050: color-mix(in srgb, var(--mbp-info) 12%, var(--mbp-surface));
	--mbp-info-ink: color-mix(in srgb, var(--mbp-info) 74%, var(--colortext));
	--mbp-hy-shadow: 0 1px 2px color-mix(in srgb, var(--colorblack) 6%, transparent), 0 2px 8px color-mix(in srgb, var(--colorblack) 7%, transparent);

}

/* v1.99.35 : coquille « .mbp-page » RETIREE (code mort — conteneur supprime du HTML
   en v1.26.3, passage 100 % natif). Rien a remplacer : le rendu est porte par « .mbp-ui ». */

/* En-tete de page (titre + sous-titre + actions) */

/* ---- Titre de section -------------------------------------------------- */

/* Icone d'en-tete : taille maitrisee (evite le picto surdimensionne), alignee au titre. */

/* ---- Cartes ------------------------------------------------------------ */
.mbp-card {
	background: var(--mbp-surface);
	border: 1px solid var(--mbp-line);
	border-radius: var(--mbp-radius-card);
	box-shadow: var(--mbp-shadow-sm);
	padding: 18px 18px;
	margin: 0 0 16px;
}
.mbp-card h3 { margin: 0 0 10px; font-size: var(--mbp-fs-section); font-weight: 700; }

/* Grille responsive de cartes / KPIs */

/* ---- Tuiles KPI -------------------------------------------------------- */

/* ---- Badges (pilules teintees, douces) --------------------------------- */

/* ---- Boutons ----------------------------------------------------------- */
.mbp-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 7px;
	padding: 8px 15px;
	border-radius: var(--mbp-radius-btn);
	font-family: inherit; font-size: var(--mbp-fs-body); font-weight: 650;
	line-height: 1.2;
	border: 1px solid var(--mbp-line);
	background: var(--mbp-surface);
	color: var(--mbp-ink);
	cursor: pointer;
	text-decoration: none;
	transition: transform .12s ease, box-shadow .12s ease, background .12s ease, border-color .12s ease;
}
.mbp-btn:hover { transform: translateY(-1px); box-shadow: var(--mbp-shadow-sm); text-decoration: none; }
.mbp-btn:active { transform: translateY(0); }
.mbp-btn:focus-visible { outline: none; box-shadow: var(--mbp-ring); }
/* v1.99.182 : SYSTÈME DE BOUTONS de la charte (démo gabarit F validée) — 4 variantes,
 * émises exclusivement par mbp_btn()/mbp_submit()/mbp_action_link(). Hauteur alignée
 * sur les contrôles natifs (--mbp-ctl-h), icône à gauche, jamais de majuscules. */
.mbp-ui .mbp-btn { height: var(--mbp-ctl-h); padding: 0 13px; box-sizing: border-box; vertical-align: middle; }
.mbp-ui .mbp-btn .fas { font-size: var(--mbp-fs-icon); }
.mbp-ui .mbp-btn--sm { height: calc(var(--mbp-ctl-h) - 6px); padding: 0 9px; font-size: var(--mbp-fs-help); }
.mbp-ui .mbp-btn--secondary:hover { border-color: var(--mbp-green); color: var(--mbp-green); transform: none; box-shadow: none; }
/* v1.99.219 : variante `primary` NEUTRALISÉE — application de la loi v1.99.80
 * (« fini l'aplat d'accent sur TOUS les boutons, sans exception ; seule la SUPPRESSION
 * garde le rouge »). mbp_submit défaut = primary : sans ceci, les 51 submits du module
 * s'affichaient en aplat accent (violet) → aspect « natif Dolibarr ». Rendu identique à
 * la base neutre ; léger relief accent au survol (affordance). */
.mbp-ui .mbp-btn--primary {
	background: var(--mbp-surface); border-color: var(--mbp-line); color: var(--mbp-ink);
}
.mbp-ui .mbp-btn--primary:hover { border-color: var(--mbp-green); color: var(--mbp-green); transform: none; box-shadow: none; }
.mbp-ui .mbp-btn--danger {
	color: var(--mbp-danger-strong);
	border-color: color-mix(in srgb, var(--mbp-danger-strong) 45%, var(--mbp-line));
}
.mbp-ui .mbp-btn--danger:hover {
	background: color-mix(in srgb, var(--mbp-danger-strong) 8%, var(--mbp-surface));
	border-color: var(--mbp-danger-strong); transform: none; box-shadow: none;
}
.mbp-ui .mbp-btn--ghost { border-color: transparent; background: none; color: var(--mbp-muted); }
.mbp-ui .mbp-btn--ghost:hover { color: var(--mbp-green); transform: none; box-shadow: none; }
.mbp-ui .mbp-btn[aria-disabled="true"], .mbp-ui .mbp-btn.mbp-busy { opacity: .45; pointer-events: none; }
button.mbp-btn { font-family: inherit; }
/* « Nouveau » = icône seule possédée (identique au déclencheur historique). */
/* ⊕ « Nouveau » = ICÔNE SEULE accent (aligné sur MEDU) : pas de fond/boîte, disque « + »
 * plus grand (--mbp-fs-newbtn), couleur = accent du thème. */
.mbp-ui .mbp-newbtn {
	display: inline-flex; align-items: center; justify-content: center; flex: none;
	min-height: var(--mbp-ctl-h); padding: 0; background: none; border: 0;
	color: var(--mbp-green); text-decoration: none !important; vertical-align: middle; line-height: 1;
}
.mbp-ui .mbp-newbtn .fas { font-size: var(--mbp-fs-newbtn); line-height: 1; }
.mbp-ui .mbp-newbtn:hover { opacity: .7; }
/* Deux boutons consécutifs de la charte : espacement horizontal cohérent partout. */
.mbp-ui .mbp-btn + .mbp-btn { margin-left: 8px; }

/* v1.99.184 : INTERRUPTEUR possédé (mbp_toggle) — case native habillée en switch. */
.mbp-ui .mbp-switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; vertical-align: middle; }
.mbp-ui .mbp-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.mbp-ui .mbp-switch-track { position: relative; width: 38px; height: 22px; flex: none; border-radius: 11px; background: var(--mbp-line-strong); transition: background .15s ease; }
.mbp-ui .mbp-switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s ease; box-shadow: var(--mbp-shadow-sm); }
.mbp-ui .mbp-switch input:checked + .mbp-switch-track { background: var(--mbp-green); }
.mbp-ui .mbp-switch input:checked + .mbp-switch-track::after { transform: translateX(16px); }
.mbp-ui .mbp-switch input:focus-visible + .mbp-switch-track { box-shadow: var(--mbp-ring); }
.mbp-ui .mbp-switch-label { font-size: var(--mbp-fs-body); color: var(--mbp-ink); }

/* v1.99.184 : MENU « … » possédé (mbp_menu_more) — <details> natif, sans JS. */
.mbp-ui .mbp-more { position: relative; display: inline-block; }
.mbp-ui .mbp-more > summary { list-style: none; }
.mbp-ui .mbp-more > summary::-webkit-details-marker { display: none; }
.mbp-ui .mbp-more-pop { position: absolute; top: calc(var(--mbp-ctl-h) + 4px); right: 0; z-index: 30; min-width: 190px; padding: 5px; display: flex; flex-direction: column; gap: 2px; background: var(--mbp-surface); border: 1px solid var(--mbp-line); border-radius: var(--mbp-radius-card); box-shadow: 0 8px 26px color-mix(in srgb, var(--colorblack) 14%, transparent); }
.mbp-ui .mbp-more-pop .mbp-btn { width: 100%; justify-content: flex-start; margin-left: 0; }

/* v1.99.200 : RECHERCHE DICTIONNAIRE possédée (mbp_dict_search) — barre entre le
 * formulaire d'ajout et le tableau, filtrage instantané côté client. */
.mbp-ui .mbp-dsearch-wrap {
	display: flex; align-items: center; gap: 10px;
	background: var(--mbp-surface); border: 1px solid var(--mbp-line);
	border-radius: var(--mbp-radius-card); box-shadow: var(--mbp-shadow-sm);
	padding: 10px 14px; margin: 0 0 14px;
}
.mbp-ui .mbp-dsearch-wrap > .fa-search { color: var(--mbp-muted); font-size: var(--mbp-fs-icon); }
.mbp-ui .mbp-dsearch {
	flex: 1 1 200px; min-width: 0; height: var(--mbp-ctl-h); box-sizing: border-box;
	border: 1px solid var(--mbp-line); border-radius: var(--mbp-radius-btn);
	background: var(--mbp-surface); color: var(--mbp-ink); padding: 0 11px;
	font-size: var(--mbp-fs-help);
}
.mbp-ui .mbp-dsearch:focus { outline: none; border-color: var(--mbp-green); box-shadow: var(--mbp-ring); }
.mbp-ui .mbp-dsearch-count { font-size: var(--mbp-fs-help); color: var(--mbp-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* v1.99.184 : ÉTAT VIDE possédé (mbp_empty_state) — encart pointillé + CTA. */
.mbp-ui .mbp-empty { border: 1px dashed var(--mbp-line-strong); border-radius: var(--mbp-radius-card); padding: 22px 16px; text-align: center; color: var(--mbp-muted); }
.mbp-ui .mbp-empty-ico { font-size: var(--mbp-fs-display); color: var(--mbp-muted-soft); display: block; margin-bottom: 8px; }
.mbp-ui .mbp-empty-msg { font-size: var(--mbp-fs-body); margin-bottom: 10px; }
.mbp-ui .mbp-empty-cta { display: flex; justify-content: center; }

/* v1.35.3 : la surcouche d'en-tete .mbp-greenhead (qui FORCAIT le vert/accent de
 * charte sur les en-tetes de tableau) est SUPPRIMEE. Les en-tetes « liste_titre »
 * suivent desormais exclusivement le THEME actif choisi par l'utilisateur — plus
 * aucun forcage de couleur propre au module sur la structure. */
.mbp-btn[disabled], .mbp-btn.disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }

/* v1.99.20 : la rustine « double fond » de 1.99.17 (.tabBar.tabBarWithBottom …)
 * est SUPPRIMÉE — code mort. La cause était traitée à la racine : les cartes sans
 * onglets passent maintenant en dol_get_fiche_head(..., -1) (classe .tabBar seule,
 * sans bande basse réservée). Plus aucun .tabBarWithBottom n'est émis par le module,
 * donc le sélecteur ne matchait plus rien. */

/* ---- Barre d'outils / filtres ----------------------------------------- */
.mbp-toolbar {
	display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
	margin: 0 0 14px;
}
.mbp-toolbar.mbp-card { padding: 12px 14px; }

/* ---- Navigation de configuration (presente sur TOUTES les sous-pages) --- */

/* v1.99.35 : bloc « champs de formulaire coherents » scope « .mbp-page » RETIRE (code
   mort). L'arrondi charte des saisies est porte par « .mbp-ui input… » juste ci-dessous. */

/* v1.98.4 : ARRONDI DES CHAMPS DE SAISIE sous la classe body réelle « .mbp-ui » (le scope
 * historique « .mbp-page » a été retiré en v1.26.3, passage 100 % natif). Coins uniquement ;
 * bordure/padding restent au thème. Les listes select2 portent déjà leur propre arrondi ;
 * on aligne ici les champs texte/nombre/date. */
.mbp-ui input[type=text], .mbp-ui input[type=search], .mbp-ui input[type=number],
.mbp-ui input[type=date], .mbp-ui input[type=email], .mbp-ui input[type=tel],
.mbp-ui input[type=password], .mbp-ui input[type=url], .mbp-ui select, .mbp-ui textarea,
.mbp-ui .flat:not([type=checkbox]):not([type=radio]) {
	border-radius: var(--mbp-field-radius);
	/* v1.99.82 : bordure pleine (remplace le seul trait bas natif) → zone de saisie
	 * immédiatement identifiable. */
	border: 1px solid var(--mbp-field-border) !important;
	background-color: var(--inputbackgroundcolor, var(--mbp-surface));
}
/* v1.99.84 : LARGEURS ADAPTÉES AU CONTENU pour les champs à contenu BORNÉ (une saisie
 * nombre/date/téléphone n'a pas besoin de toute la largeur de la colonne). max-width →
 * on plafonne les champs trop larges sans empêcher une largeur explicite plus petite.
 * Les champs texte (contenu variable) ne sont pas touchés ici. */
.mbp-ui input[type=number] { max-width: 140px; }
.mbp-ui input[type=date] { max-width: 175px; }
.mbp-ui input[type=tel] { max-width: 210px; }

/* Focus : accent + halo (repère clair du champ actif). */
.mbp-ui input[type=text]:focus, .mbp-ui input[type=search]:focus, .mbp-ui input[type=number]:focus,
.mbp-ui input[type=date]:focus, .mbp-ui input[type=email]:focus, .mbp-ui input[type=tel]:focus,
.mbp-ui input[type=password]:focus, .mbp-ui input[type=url]:focus, .mbp-ui textarea:focus,
.mbp-ui .flat:not([type=checkbox]):not([type=radio]):focus {
	border-color: var(--mbp-green) !important;
	box-shadow: var(--mbp-ring);
	outline: none;
}

/* ---- Tableaux ---------------------------------------------------------- */

/* ---- Encart d'aide / info --------------------------------------------- */

/* ---- Etat vide (humain, encourageant) --------------------------------- */

/* ---- Avatar / initiales (humaniser les personnes) --------------------- */

/* ---- Fil d'aide / documentation --------------------------------------- */

/* NB v1.28.1 : l'accordeon du menu de gauche a ete SUPPRIME (JS + CSS) :
 * il interferait avec les menu managers type ergonova (panneau off-canvas,
 * etats replies persistants). Le menu est laisse 100% natif. */

/* ---- Responsive -------------------------------------------------------- */

@media (max-width: 640px) {
	.mbp-toolbar { flex-direction: column; align-items: stretch; }
	.mbp-toolbar .mbp-btn { width: 100%; }
	
}

/* ---- Compatibilite menu managers famille "remark" (revolutionpro,
 * ergonova...) : entree de menu MboaPaie. Ces templates attenuent les
 * modules qu'ils ne connaissent pas : ils appliquent
 * "filter: grayscale(1)" a l'icone (barre claire) et "brightness(0) invert(1)
 * + opacity: .5" (barre sombre), ce qui rend MboaPaie grise/delave alors que
 * les modules natifs restent nets. On remet l'entree a parite :
 *   - barre claire  : on annule le greyscale -> icone couleur, nette ;
 *   - barre sombre   : on garde le knockout blanc (contraste) mais pleine opacite ;
 *   - texte          : on n'impose PAS de couleur (pas de "inherit" qui capturait
 *                      l'accent turquoise) -> il herite du texte de menu standard. */
body .site-menu-icon.mainmenu.mboapaie {
	opacity: 1 !important;
	-webkit-filter: none !important;
	filter: none !important;
}
body .site-menubar-dark .site-menu-icon.mainmenu.mboapaie { opacity: 1 !important; }
body .site-menu-item a[href*="mboapaie"],
body .site-menu-item a[href*="mboapaie"] .site-menu-title { opacity: 1 !important; }

/* ---- Icone MboaPaie dans la barre du HAUT (eldy natif, fond navy) --------
 * Le menu haut eldy affiche l'icone du module en <img> (object_mboapaie.png,
 * vert de marque). Sur le bandeau navy, on la passe en BLANC pour l'aligner sur
 * les icones natives (Accueil, Tiers...). Portee stricte a la barre .tmenu : la
 * carte module (fond blanc) et le menu gauche ergonova gardent l'icone en couleur. */
ul.tmenu li a[href*="mboapaie"] img,
.tmenu a[href*="mboapaie"] img.pictofixedwidth {
	-webkit-filter: brightness(0) invert(1);
	filter: brightness(0) invert(1);
}

/* Pas de soulignage sur les entrees ET sous-entrees du menu de gauche
 * (rendu propre facon menu natif Dolibarr). */
#id-left a.vmenu,
#id-left a.vmenu:hover,
#id-left a.vsmenu,
#id-left a.vsmenu:hover {
	text-decoration: none !important;
}

/* ---- Etats de chargement (js/mboapaie.js) ----------------------------- */
/* Bouton en cours de soumission : desactive visuellement + petit spinner. */
.mbp-btn.mbp-is-loading,
button.mbp-is-loading,
input.mbp-is-loading {
	position: relative;
	color: transparent !important;
	pointer-events: none;
	opacity: .8;
}
.mbp-is-loading::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 14px;
	height: 14px;
	margin: -7px 0 0 -7px;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	color: var(--mbp-green);
	animation: mbp-spin .6s linear infinite;
}
/* Squelette de contenu en attente (listes rafraichies en AJAX). */
.mbp-skeleton {
	height: 14px;
	margin: 8px 0;
	border-radius: var(--mbp-radius);
	background: linear-gradient(90deg, var(--mbp-surface-2) 25%, var(--mbp-line) 37%, var(--mbp-surface-2) 63%);
	background-size: 400% 100%;
	animation: mbp-shimmer 1.4s ease infinite;
}
@keyframes mbp-spin { to { transform: rotate(360deg); } }
@keyframes mbp-shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) {
	.mbp-is-loading::after { animation: none; }
	.mbp-skeleton { animation: none; }
}

/* ---- Emplacement de capture d'ecran reserve (manuel admin) ------------ */

/* ---- Accessibilite : mouvement reduit --------------------------------- */
@media (prefers-reduced-motion: reduce) {
	.mbp-btn { transition: none !important; }
	.mbp-btn:hover { transform: none; }
}

/* ---- Theme : heritage Dolibarr (clair / sombre / entreprise) ---------- */
/* Depuis v1.4.2, les neutres (fond, surface, texte, bordures) sont pilotes par
   les variables du theme Dolibarr actif (voir :root ci-dessus). Le module suit
   donc automatiquement le theme choisi par l'entreprise, y compris un theme
   sombre, sans ilot creme fige. Les accents verts de marque et les couleurs de
   statut (ambre/rouge) sont conserves car ils embarquent leur propre contraste
   de texte et restent lisibles quel que soit le fond. */

/* ============================================================
 * Fiche employe (formulaire 2 colonnes) : lecture optimisee.
 * - AUCUNE bordure ni cadre (aspect epure).
 * - Libelles sur UNE seule ligne.
 * - Champs qui REMPLISSENT la largeur de la colonne.
 * - Zebrage discret + survol pour la lisibilite.
 * ============================================================ */
/* v1.99.34 : mbp-empform est desormais une CARTE (comme mbp-cform) — on ne coupe
 * plus la bordure/ombre de la TABLE (l'ancien !important la rendait plate alors que
 * mbp-cform etait cartee : 2 formulaires du module rendus differemment). On garde
 * seulement l'absence de bordure sur les cellules (le separateur est un filet fin). */
table.mbp-empform td,
table.mbp-empform tr {
	border: none;
}
/* table-layout AUTO (v1.51.1) : la colonne libellé se dimensionne à son contenu
 * (voir bloc v1.51.1 plus bas) ; la cellule valeur prend tout le reste (width:100%),
 * ce qui borne la table à 100% de sa demi-colonne sans débordement. */
table.mbp-empform {
	border-collapse: collapse;
	width: 100%;
	table-layout: auto;
}
table.mbp-empform td {
	padding: 7px 10px;
	vertical-align: middle;
	overflow: hidden;
	text-overflow: ellipsis;
}
table.mbp-empform td:first-child {
	width: 40%;               /* colonne libelle : proportion fixe et stable */
	padding-right: 14px;
	color: var(--mbp-neutral-700);
	font-weight: 500;
	white-space: normal;      /* une ligne au zoom normal ; retour propre si tres etroit */
	word-break: break-word;
}
table.mbp-empform > tbody > tr:nth-child(even) { background: var(--mbp-surface-alt); }
table.mbp-empform > tbody > tr:hover { background: var(--mbp-green-tint); }
/* Les champs remplissent leur cellule sans jamais la depasser */
table.mbp-empform td:last-child input[type="text"],
table.mbp-empform td:last-child input[type="email"],
table.mbp-empform td:last-child select {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}
/* HAUTEUR UNIFORME de toutes les zones de saisie (texte, email, nombre, date,
 * telephone) ET des listes select2 -> rendu homogene facon Dolibarr. Une seule
 * valeur (30px) partagee par tous les controles du formulaire. */
table.mbp-empform td:last-child input[type="text"],
table.mbp-empform td:last-child input[type="email"],
table.mbp-empform td:last-child input[type="number"],
table.mbp-empform td:last-child input[type="tel"],
table.mbp-empform td:last-child input:not([type="file"]):not([type="checkbox"]):not([type="radio"]),
table.mbp-empform td:last-child .select2-selection--single {
	height: var(--mbp-ctl-h) !important;
	box-sizing: border-box;
	vertical-align: middle;
}
table.mbp-empform td:last-child input:not([type="file"]):not([type="checkbox"]):not([type="radio"]) {
	padding-top: 3px;
	padding-bottom: 3px;
	line-height: normal;
	/* Meme retrait gauche que la valeur des listes (rendered padding-left:8px)
	 * -> le texte des champs de saisie et des listes s'aligne exactement.
	 * !important + bordure gauche figee a 1px : certains THEMES Dolibarr posent
	 * sur input[type=text] un padding/bordure plus prioritaire, ce qui collait le
	 * texte de saisie au bord (retrait < 8px) alors que la LISTE gardait ses 8px
	 * -> decalage visible entre saisie et liste. On verrouille donc les deux
	 * composantes du retrait (bordure + padding) pour un debut de texte identique. */
	padding-left: 8px !important;
	border-left-width: 1px !important;
	box-sizing: border-box;
}
/* ============================================================
 * CENTRAGE DES LISTES select2 SUR TOUTES LES PAGES DU MODULE.
 * La correction n'est plus limitee a la fiche employe : toute liste select2
 * d'une page MboaPaie voit sa valeur centree verticalement (flex). Corrige
 * « la valeur des listes calee trop haut » partout, pas seulement ici.
 * ============================================================ */
/* v1.99.35 : reglages select2 scope « .mbp-page » RETIRES (code mort). Le padding de boite
   (0) et le retrait interieur (8px) sont portes globalement par « .mbp-ui .select2… » plus
   bas, et specifiquement par « table.mbp-empform … » pour la fiche salarie. */
/* v1.99.35 : regle « police identique saisies/listes » scope « .mbp-page » RETIREE (code
   mort). La couleur/police des valeurs select2 est portee par « .mbp-ui .select2… » plus bas. */
/* select2 : Dolibarr pose un style INLINE « width: 310px / 320.8px » (width:'resolve').
 * On neutralise cette largeur figee sur TOUTES les variantes de conteneur select2
 * (span.select2, .select2-container, l'enfant direct) pour que le champ epouse
 * toujours 100% de sa cellule, a tout niveau de zoom -> plus de fleche detachee. */
table.mbp-empform td:last-child .select2,
table.mbp-empform td:last-child span.select2-container,
table.mbp-empform td:last-child .select2-container {
	width: 100% !important;
	max-width: 100% !important;
	min-width: 0 !important;
	box-sizing: border-box;
}
/* Cle du correctif « fleche detachee » : la BOITE interne (.select2-selection)
 * porte encore les classes utilitaires Dolibarr « maxwidth300 / minwidth75 »
 * (max-width:300px !important). Le conteneur etant force a 100%, la boite
 * restait a 300px et la fleche, ancree au bord droit du CONTENEUR, partait
 * loin a droite. On neutralise donc AUSSI ces plafonds sur la boite : boite
 * ET conteneur a 100% -> la fleche revient au bord du champ. */
table.mbp-empform td:last-child .select2-selection,
table.mbp-empform td:last-child .select2-selection--single {
	width: 100% !important;
	max-width: 100% !important;
	min-width: 0 !important;
	box-sizing: border-box;
	position: relative;   /* ancre la fleche sur la boite, pas sur un parent */
	/* Bordure gauche figee a 1px (comme les inputs) : le debut du texte de la
	 * valeur = bord boite + 1px + 8px, exactement comme la saisie. */
	border-left-width: 1px !important;
}
/* Centrage vertical FIABLE de la valeur selectionnee.
 * Methode standard select2 : hauteur de boite fixe + line-height du texte
 * EGALE a cette hauteur -> le texte (« Virement bancaire », « Homme »...) est
 * parfaitement centre, quel que soit le zoom. La fleche partage la meme
 * hauteur et reste collee au bord droit. */
table.mbp-empform td:last-child .select2-selection--single {
	height: var(--mbp-ctl-h) !important;
	/* Centrage vertical par FLEX : align-items:center place le texte au centre
	 * exact de la boite quelles que soient les regles de line-height/padding
	 * heritees de select2 ou du theme. Methode la plus fiable (la valeur
	 * « Homme », « Centre »... n'est plus calee trop haut). La fleche est en
	 * position absolue -> hors flux flex, donc non impactee. */
	display: flex !important;
	align-items: center !important;
	overflow: hidden;
}
table.mbp-empform td:last-child .select2-selection__rendered {
	line-height: normal !important;   /* laisse le flex centrer, pas le line-height */
	padding-left: 8px;
	padding-right: 22px;   /* laisse la place a la fleche */
	width: 100%;
}
/* Le chevron de cette cellule suit désormais la règle unique centralisée
 * (.mbp-ui .select2-selection__arrow, v1.99.7) : plus d'override local. */
/* v1.99.96 : les number (ex. « Nombre d'enfants ») ne doivent PAS s'étirer à 100% comme les
 * champs texte — le !important contre la regle generale td:last-child input{width:100%}. */
table.mbp-empform td:last-child input[type="number"] { width: 70px !important; max-width: 70px !important; }

/* Repli « intitule libre » du poste : discret, pleine largeur, sur sa propre ligne
 * sous la liste. Il ne rivalise plus visuellement avec le select principal. */
table.mbp-empform td .mbp-poste-fallback { margin-top: 6px; }
table.mbp-empform td .mbp-poste-fallback-input {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	font-size: var(--mbp-fs-help);
	color: var(--mbp-neutral-500);
	background: var(--mbp-surface-alt2);
	border: 1px dashed var(--mbp-line-soft);
	border-radius: 4px;
	padding: 4px 8px;
}
table.mbp-empform td .mbp-poste-fallback-input::placeholder { color: var(--mbp-muted-soft); font-style: italic; }
/* Quand le repli est revele, la cellule poste passe a 2 lignes. On aligne alors
 * son libelle EN HAUT (au niveau de la liste) au lieu du centre des 2 lignes. */
table.mbp-empform td.mbp-poste-labelcell {
	vertical-align: top;
	padding-top: 12px;
}
/* Couple Mobile Money apparie « Operateur = N° » + radio prefere, sur une ligne. */
table.mbp-empform td .mbp-momo-row {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap; /* le numero reste TOUJOURS visible : Prefere/Verifie passent dessous si etroit */
}
table.mbp-empform td .mbp-momo-op { flex: 0 0 38%; min-width: 120px; }
/* Numero prioritaire : largeur mini garantie -> ne s'ecrase jamais a zero. */
table.mbp-empform td .mbp-momo-num { flex: 1 1 140px; min-width: 130px; height: var(--mbp-ctl-h) !important; box-sizing: border-box; }
table.mbp-empform td .mbp-momo-pref {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	gap: 3px;
	white-space: nowrap;
	font-size: var(--mbp-fs-help);
	color: var(--mbp-neutral-550);
}
table.mbp-empform td .mbp-momo-pref input { margin: 0; }
/* v1.99.35 : « .mbp-page .fichehalfleft { padding-right } » RETIRE (code mort ; l'ecart des
   deux colonnes est porte par « .mbp-ui .fichecenter .fichehalfleft/right » plus bas). */
/* Calendrier jQuery-UI : au-dessus des composants select2 (~1051) pour qu'il ne
 * soit jamais masque partiellement par un champ voisin. */
.ui-datepicker { z-index: 1300 !important; }

/* v1.99.109 : ICÔNE CALENDRIER UNIFIÉE. Les champs $form->selectDate() rendent un PNG natif
 * (img.ui-datepicker-trigger = object_calendarday.png, « image 2 »). On le masque et le
 * remplace (via js/mboapaie.js) par un picto FontAwesome calendrier propre, cohérent avec le
 * reste du module. Le datepicker reste fonctionnel (le picto ouvre le calendrier). */
.mbp-ui img.ui-datepicker-trigger { display: none !important; }
.mbp-ui .mbp-cal-trigger {
	cursor: pointer;
	color: var(--mbp-muted);
	margin-left: 6px;
	font-size: var(--mbp-fs-body);
	vertical-align: middle;
	line-height: var(--mbp-ctl-h);
}
.mbp-ui .mbp-cal-trigger:hover { color: var(--mbp-ink); }

/* v1.99.113 : TOGGLES d'activation. Le picto natif Dolibarr switch_on/off (fa-toggle-*) est
 * rendu à ~2em (29px) → disproportionné vs les autres actions de ligne (crayon/poubelle ~15px).
 * On l'aligne sur la taille d'icône de charte. Centralisé → toutes les listes admin. */
.mbp-ui .fa-toggle-on,
.mbp-ui .fa-toggle-off { font-size: var(--mbp-fs-icon) !important; vertical-align: middle; }

/* v1.99.109 : champ GÉNÉRÉ AUTO en lecture seule (ex. Matricule) — aspect « non éditable »
 * + largeur AU CONTENU (bat la règle .mbp-empform width:100% via specificité + !important). */
.mbp-ui input.mbp-input-readonly {
	background: var(--mbp-surface-alt) !important;
	color: var(--mbp-neutral-700) !important;
	cursor: default;
	width: 15ch !important;
	max-width: 15ch !important;
}

/* v1.99.109 : DATEPICKER jQuery restylé « moderne » (proche du natif HTML5, image 1).
 * 100 % visuel — la logique selectDate/enregistrement des dates est INCHANGÉE. */
.ui-datepicker.ui-widget {
	background: var(--mbp-surface) !important;
	border: 1px solid var(--mbp-line-strong) !important;
	border-radius: 12px !important;
	box-shadow: var(--mbp-shadow) !important;
	padding: 10px !important;
	font-family: inherit !important;
	font-size: var(--mbp-fs-body) !important;
	width: auto !important;
}
.ui-datepicker .ui-datepicker-header {
	background: transparent !important;
	border: 0 !important;
	padding: 2px 0 8px !important;
	position: relative;
}
.ui-datepicker .ui-datepicker-title { font-weight: 700 !important; color: var(--mbp-ink) !important; line-height: 1.7; }
.ui-datepicker .ui-datepicker-title select { margin: 0 2px; }
.ui-datepicker .ui-datepicker-prev,
.ui-datepicker .ui-datepicker-next {
	top: 2px !important; height: 26px; width: 26px; cursor: pointer;
	border-radius: 8px !important; background: transparent !important; border: 0 !important;
}
.ui-datepicker .ui-datepicker-prev { left: 2px !important; }
.ui-datepicker .ui-datepicker-next { right: 2px !important; }
.ui-datepicker .ui-datepicker-prev:hover,
.ui-datepicker .ui-datepicker-next:hover { background: var(--mbp-surface-alt) !important; }
.ui-datepicker .ui-datepicker-prev span,
.ui-datepicker .ui-datepicker-next span { display: none !important; } /* masque les sprites ui-icon */
.ui-datepicker .ui-datepicker-prev::before,
.ui-datepicker .ui-datepicker-next::before {
	font-weight: 700; color: var(--mbp-muted);
	position: absolute; left: 0; right: 0; top: 3px; text-align: center; font-size: var(--mbp-fs-body);
}
.ui-datepicker .ui-datepicker-prev::before { content: "\276E"; } /* chevron gauche (police héritée) */
.ui-datepicker .ui-datepicker-next::before { content: "\276F"; } /* chevron droit (police héritée) */
.ui-datepicker table.ui-datepicker-calendar { margin: 0 !important; border-collapse: separate; border-spacing: 2px; }
.ui-datepicker .ui-datepicker-calendar th { color: var(--mbp-muted) !important; font-weight: 600 !important; font-size: var(--mbp-fs-micro); padding: 4px 0 !important; border: 0 !important; }
.ui-datepicker .ui-datepicker-calendar td { padding: 0 !important; border: 0 !important; }
.ui-datepicker .ui-datepicker-calendar td a,
.ui-datepicker .ui-datepicker-calendar td span {
	display: block; text-align: center; padding: 6px 0 !important; min-width: 2.4em;
	border: 0 !important; background: transparent !important; color: var(--mbp-ink) !important;
	border-radius: 8px !important; font-weight: 500;
}
.ui-datepicker .ui-datepicker-calendar td a:hover { background: var(--mbp-surface-alt) !important; }
.ui-datepicker .ui-datepicker-calendar td.ui-datepicker-today a { box-shadow: inset 0 0 0 1px var(--mbp-line-strong); }
.ui-datepicker .ui-datepicker-calendar td a.ui-state-active,
.ui-datepicker .ui-datepicker-calendar td a.ui-state-highlight.ui-state-active { background: var(--mbp-neutral-800) !important; color: var(--colorbackbody, #fff) !important; }
.ui-datepicker .ui-datepicker-calendar td.ui-datepicker-other-month a,
.ui-datepicker .ui-datepicker-calendar td.ui-state-disabled span { color: var(--mbp-muted-soft) !important; opacity: .55; }
.ui-datepicker .ui-datepicker-buttonpane { border-top: 1px solid var(--mbp-line-soft) !important; margin: 8px -2px 0 !important; padding-top: 8px !important; }
.ui-datepicker .ui-datepicker-buttonpane button {
	background: transparent !important; border: 0 !important; color: var(--mbp-green) !important;
	font-weight: 600; cursor: pointer; padding: 4px 8px; border-radius: 6px;
}
.ui-datepicker .ui-datepicker-buttonpane button:hover { text-decoration: underline; background: var(--mbp-surface-alt) !important; }

/* Trait residuel au-dessus des boutons : bordure du cadre "tabBar" de Dolibarr
 * (genere par dol_get_fiche_head/dol_get_fiche_end). On l'efface pour un rendu
 * totalement epure sur les pages du module. */
/* v1.99.34 : regle .mbp-page .tabBar RETIREE (code mort : le conteneur .mbp-page a
 * ete retire du HTML en v1.26.3 ; la neutralisation du .tabBar est desormais portee
 * par .mbp-ui .tabBar plus haut). */

/* v1.18.0 : marqueur de champ obligatoire (fiche salarie, champs configurables).
   L'asterisque rouge est injectee cote client d'apres la config admin. */
.mbp-req-star { color: var(--mbp-danger-strong); font-weight: 700; margin-left: 2px; }

/* v1.18.3 : FILET GLOBAL d'alignement des listes sur TOUTES les interfaces du
   module. Dolibarr propage les classes du <select> (« flat ») sur la BOITE
   select2 ; combinee a « .mbp-page .flat { padding } » cela decalait le texte des
   listes. On garantit ici, sur toute page ou la charte est chargee, que la boite
   select2 n'herite d'aucun padding : le seul retrait du texte vient du rendered
   (8px), identique aux saisies. No-op pour le coeur Dolibarr (boite deja a 0). */
.select2-container--default .select2-selection--single.flat { padding: 0 !important; }
/* v1.99.35 : doublon « .mbp-page …rendered { padding-left } » RETIRE (code mort ; le retrait
   8px des valeurs select2 est porte par « .mbp-ui .select2… » plus bas). */

/* ============================================================
 * v1.24.2 : classes des OUTILS DE DIAGNOSTIC (fin des couleurs en ligne).
 * Puces d'etape + bannieres de resultat d'audit -> plus aucun style="color:".
 * ============================================================ */
.mbp-step-ok { color: var(--mbp-green); font-size: var(--mbp-fs-section); font-weight: bold; }
.mbp-step-wip { color: var(--mbp-amber); font-size: var(--mbp-fs-section); }
.mbp-step-ko { color: var(--mbp-red); font-size: var(--mbp-fs-section); }
.mbp-audit-result { margin: 8px 0 16px; padding: 8px 10px; border-radius: 6px; border: 1px solid var(--mbp-line); background: var(--mbp-surface-2); color: var(--mbp-ink); }
.mbp-audit-result.mono { font-family: monospace; font-size: var(--mbp-fs-micro); white-space: pre-wrap; }
.mbp-audit-result.ok { border-color: var(--mbp-ok-border); background: var(--mbp-ok-bg); color: var(--mbp-green); }
.mbp-audit-result.err { border-color: var(--mbp-err-border); background: var(--mbp-err-bg); color: var(--mbp-err-ink); }
.mbp-audit-result.warn { border-color: var(--mbp-warn-border); background: var(--mbp-warn-bg); color: var(--mbp-warn-ink); }

/* v1.48.0 : libellés de la fiche salarié sur une seule ligne (colonne de gauche
   ajustée au contenu, plus de retour à la ligne « Situation matrimoniale » etc.). */
.mbp-empform tr > td:first-child { white-space: nowrap; }

/* ============================================================
 * v1.51.0 — ESPACEMENT LABEL ↔ CHAMP RESSERRÉ, DE FAÇON GLOBALE.
 * Constat utilisateur : sur toutes les fiches, la colonne des libellés est trop
 * large -> grand vide entre le libellé et le champ. On resserre partout.
 *
 * Portée STRICTE au module : sélecteur préfixé « body.mbp-body » (classe posée
 * sur les pages du module via llxHeader $morecssonbody). Le cœur Dolibarr et les
 * autres modules ne sont JAMAIS impactés (leur <body> n'a pas cette classe).
 * ============================================================ */

/* 1) Fiches natives Dolibarr du module (contrat, congé, prêt, bulletin, période) :
 *    tables « border » en table-layout AUTO -> largeur minimale + nowrap : la
 *    colonne libellé se cale sur son contenu, supprimant le vide avant le champ. */
body.mbp-body table.border > tbody > tr > td:first-child {
	width: 1px;               /* auto-layout : se réduit au contenu (nowrap) */
	white-space: nowrap;      /* jamais de retour à la ligne du libellé */
	vertical-align: middle;   /* alignement vertical propre avec le champ */
	padding-right: 14px;      /* respiration minimale avant le champ */
}
/* Cellule valeur : prend tout l'espace restant -> libellé calé au contenu. */
body.mbp-body table.border > tbody > tr > td:first-child + td {
	width: 100%;
}

/* 2) Fiche salarié (mbp-empform, table-layout AUTO) : LARGEUR AU CONTENU PUR.
 *    - libellé : white-space nowrap => jamais de retour à la ligne ;
 *    - largeur : 1px + nowrap => la colonne se réduit exactement au plus long
 *      libellé (aucun vide superflu), la cellule valeur (width:100%) absorbe le
 *      reste => les champs restent pleine largeur, bornés à la demi-colonne ;
 *    - vertical-align middle => libellé et champ centrés sur la même ligne. */
table.mbp-empform td:first-child {
	width: 1px;
	white-space: nowrap;
	vertical-align: middle;
}
table.mbp-empform td:last-child {
	width: 100%;
}
/* Exception ré-affirmée (après la règle ci-dessus, même spécificité) : quand le
 * repli « intitulé libre » du poste s'affiche, la cellule libellé reste alignée EN
 * HAUT au niveau de la liste (sinon 2 lignes centrées de travers). */
table.mbp-empform td.mbp-poste-labelcell {
	vertical-align: top;
}

/* ============================================================================
 * Utilitaires UI (v1.78.0) — REMPLACENT tout style couleur en ligne / hex figé.
 * Une seule source de vérité : ces classes consomment les jetons du thème.
 * ============================================================================ */

/* Encart / note informative (ex-styles en ligne cream figés). */
.mbp-callout {
	border: 1px solid var(--mbp-warn-border);
	background: var(--mbp-warn-bg);
	/* Encre APPARIÉE au fond crème fixe (sinon texte du thème illisible en mode sombre). */
	color: var(--mbp-warn-ink);
	padding: 12px 14px;
	margin: 10px 0;
	border-radius: var(--mbp-radius);
}
.mbp-callout strong { color: var(--mbp-warn-ink); }

/* Champ en lecture seule (ex-fond gris posé en JS). Grisé, suit le thème. */
.mbp-readonly {
	background: var(--mbp-grey-050) !important;
}

/* Vignette d'image : bordure suivant le thème (ex-var(--tableborder,#ccc)). */
.mbp-thumb {
	max-height: 48px;
	max-width: 70px;
	border: 1px solid var(--mbp-line);
	border-radius: var(--mbp-radius);
	vertical-align: middle;
}
.mbp-thumb-lg {
	max-width: 160px;
	border: 1px solid var(--mbp-line);
	border-radius: var(--mbp-radius);
}

/* Séparateur pointillé (ex-border-top dashed var(--tableborder,#ccc)). */
.mbp-sep-dashed {
	margin-top: 10px;
	padding-top: 8px;
	border-top: 1px dashed var(--mbp-line);
}

/* ============================================================================
 * COUCHE DESIGN « mbp-ui » (pilote v1.80.0) — identité premium MboaPaie.
 * Activée par la classe body « mbp-ui » (en plus de « mbp-body »). Restyle la
 * ZONE DE CONTENU des fiches (cartes, espacement, libellés) — PAS le ruban haut
 * (global Dolibarr). 100 % dérivée des jetons : AUCUNE couleur en dur → suit le
 * thème actif (clair / sombre / couleurs entreprise).
 * ============================================================================ */

/* Colonnes de la fiche : un peu d'air entre les deux cartes. */
.mbp-ui .fichecenter { display: block; }
.mbp-ui .fichehalfleft { padding-right: 10px; }
.mbp-ui .fichehalfright { padding-left: 10px; }

/* Cartes : les tableaux de champs (lecture) et les formulaires deviennent des
   cartes douces, avec ombre légère et coins arrondis. */
.mbp-ui table.tableforfield,
.mbp-ui table.mbp-empform,
.mbp-ui table.border.centpercent {
	background: var(--mbp-surface);
	border: 1px solid var(--mbp-line);
	border-radius: var(--mbp-radius-lg);
	box-shadow: var(--mbp-shadow-sm);
	border-collapse: separate;
	border-spacing: 0;
	overflow: hidden;
	margin-bottom: 16px;
}

/* Lignes : séparateur discret, respiration verticale. */
.mbp-ui table.tableforfield > tbody > tr > td,
.mbp-ui table.mbp-empform > tbody > tr > td {
	border-bottom: 1px solid var(--mbp-line-soft);
	padding: 10px 14px;
	vertical-align: middle;
}
.mbp-ui table.tableforfield > tbody > tr:last-child > td,
.mbp-ui table.mbp-empform > tbody > tr:last-child > td {
	border-bottom: none;
}

/* Libellé (1re colonne) atténué ; valeur en avant. */
.mbp-ui table.tableforfield > tbody > tr > td:first-child {
	color: var(--mbp-muted);
	font-weight: 500;
	width: 34%;
	white-space: nowrap;
}
.mbp-ui table.tableforfield > tbody > tr > td:nth-child(2) {
	color: var(--mbp-ink);
	font-weight: 500;
}

/* Barre d'onglets de la fiche : plus douce. */
/* v1.99.34 : le .tabBar (dol_get_fiche_head) n'est JAMAIS une carte. Ce sont les
 * tables de contenu (tableforfield / mbp-cform / mbp-empform / liste) qui portent la
 * carte. Encarter aussi le .tabBar creait un double-encartage (« sous-couche »).
 * On efface tout habillage du .tabBar (natif theme compris) pour ne laisser qu'UNE
 * carte : celle du contenu. Remplace la carte .tabBar + les rustines margin/padding
 * + le :has() de v1.99.33.
 * v1.99.41 (Pilier 1) : DECOUPLAGE COMPLET du « .tabBar » natif. Toutes les fiches du
 * module passent par l'adaptateur mbp_fiche_head() qui injecte la classe POSSEDEE
 * « .mbp-fiche-head » -> le CSS ne cible plus QUE cette classe. Si Dolibarr renomme
 * « .tabBar », le rendu tient (l'adaptateur marque le conteneur quel que soit son nom). */
.mbp-ui .mbp-fiche-head {
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	background: transparent !important;
	padding: 0 !important;
	margin: 0 0 12px !important;
}

/* v1.99.107 — ONGLET ACTIF arrondi (coins hauts, rayon charte 8px). Le `.tabactive` natif
 * sortait à coins carrés. Centralisé sur la classe POSSÉDÉE `.mbp-fiche-head` (+ repli
 * `.tabBar`) → s'applique à TOUTES les fiches du module, sans toucher chaque page. */
.mbp-ui .tab.tabactive,
.mbp-ui .tabsElem.tabsElemActive {
	border-top-left-radius: var(--mbp-field-radius, 8px) !important;
	border-top-right-radius: var(--mbp-field-radius, 8px) !important;
}

/* Titres de section (load_fiche_titre) : accent discret + espacement. */
.mbp-ui .titre,
.mbp-ui td.nowrap .titre {
	font-weight: 700;
	color: var(--mbp-ink);
	letter-spacing: .1px;
}

/* Badges : pastille pleine et lisible (couleurs = classes natives du thème). */
/* v1.99.152 — pill sémantique façon SaaSFabric : fond teinté doux + pastille-point +
 * texte coloré. On garde la classe native .badge (le centrage `td:has(.badge)` reste valide) ;
 * on neutralise l'aplat plein natif au profit du style teinté. */
.mbp-ui .badge {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	border-radius: var(--mbp-radius-pill);
	padding: 3px 10px;
	font-weight: 700;
	font-size: var(--mbp-fs-micro);
	line-height: 1.5;
	background: var(--mbp-surface-2);
	color: var(--mbp-muted);
	border: none;
}
.mbp-ui .badge::before {
	content: "";
	width: 6px; height: 6px;
	border-radius: 50%;
	background: currentColor;
	flex: none;
}
.mbp-ui .badge.badge-status4 { background: var(--mbp-success-050); color: var(--mbp-success-ink); }
.mbp-ui .badge.badge-status1,
.mbp-ui .badge.badge-status3 { background: var(--mbp-amber-050); color: var(--mbp-amber-ink); }
.mbp-ui .badge.badge-status8,
.mbp-ui .badge.badge-status5,
.mbp-ui .badge.badge-status6 { background: var(--mbp-red-050); color: var(--mbp-red-ink); }
.mbp-ui .badge.badge-status2,
.mbp-ui .badge.badge-status7 { background: var(--mbp-info-050); color: var(--mbp-info-ink); }
.mbp-ui .badge.badge-status0 { background: var(--mbp-surface-2); color: var(--mbp-muted); }

/* Encarts (callouts) et champs conservent leurs jetons ; on harmonise le rayon. */
.mbp-ui .mbp-callout { border-radius: var(--mbp-radius-lg); }

/* Boutons d'action : GÉOMÉTRIE UNIFORME (v1.98.3) + coins arrondis cohérents.
 * Problème relevé en prod : le thème n'habille bien que <input class="button">
 * (padding 8px, line-height 19px) ; les <button> et <a> retombaient sur des valeurs
 * différentes (padding 0, line-height normal) -> même bouton, TAILLE différente d'une
 * page à l'autre. On impose la même boîte aux trois types d'élément et aux deux familles
 * (button / butAction). 100 % géométrie, aucune couleur (celles-ci restent au thème). */
.mbp-ui .butAction,
.mbp-ui .button,
.mbp-ui a.butAction,
.mbp-ui input.button,
.mbp-ui button.button,
.mbp-ui a.button,
.mbp-ui input.butAction,
.mbp-ui button.butAction,
.mbp-ui .butActionDelete,
.mbp-ui a.butActionDelete,
.mbp-ui input.butActionDelete,
.mbp-ui button.butActionDelete {
	box-sizing: border-box !important;
	height: var(--mbp-ctl-h) !important;      /* hauteur de contrôle standard (= champs/selects, médiane charte) */
	padding-top: 0 !important;
	padding-bottom: 0 !important;
	font-size: var(--mbp-fs-body) !important;   /* le thème donnait 14.7px aux <input> et 15.5px aux <button> */
	line-height: var(--mbp-ctl-lh) !important; /* centre le libellé sur une ligne, tous types d'élément */
	vertical-align: middle;
	text-align: center;
	border-radius: 8px;
	/* v1.99.210 : casse + poids ALIGNÉS sur la charte .mbp-btn (fini le MAJUSCULES gras
	 * natif qui faisait détonner p.ex. les boutons d'upload « CHOISIR UN FICHIER » de
	 * l'onglet Documents par rapport à nos boutons). Généralisé à tous les .button natifs. */
	text-transform: none !important;
	font-weight: 650 !important;
}

/* v1.98.7 : CONFORMITÉ mbp-ui DES BOUTONS D'ACTION. Retour terrain : les boutons natifs
 * (class="button" : outils du diagnostic, Recharger, Analyser, Ajuster, Détecter ma
 * position…) restaient au rendu BRUT du thème (fond gris clair, bordure grise, rayon
 * 1px) alors que les boutons mbp-ui (butAction) portent l'accent du thème + rayon 8px.
 * On aligne TOUS les boutons d'action sur la charte : accent + rayon 8px + texte sur
 * accent. Exceptions conservées : l'ANNULATION reste neutre (mais arrondie) et la
 * SUPPRESSION garde son rouge natif (butActionDelete / button-cancel). 100 % jetons. */
/* v1.99.80 : STYLE NEUTRE UNIFORME sur TOUS les boutons, sans exception (demande user —
 * cf. bouton « TEST » de référence). Fini l'aplat d'accent : fond clair, bordure fine,
 * encre foncée, comme le bouton natif. Seule la SUPPRESSION garde son rouge (sécurité).
 * 100 % jetons (theme-aware / dark-mode). */
.mbp-ui .button:not(.butActionDelete),
.mbp-ui input.button:not(.butActionDelete),
.mbp-ui button.button:not(.butActionDelete),
.mbp-ui a.button:not(.butActionDelete),
.mbp-ui .butAction:not(.butActionDelete) {
	background: var(--mbp-btn-bg) !important;
	color: var(--mbp-btn-ink) !important;
	border: 1px solid var(--mbp-btn-border) !important;
	border-radius: 8px !important;
}
.mbp-ui .button:not(.butActionDelete):hover,
.mbp-ui input.button:not(.butActionDelete):hover,
.mbp-ui button.button:not(.butActionDelete):hover,
.mbp-ui a.button:not(.butActionDelete):hover,
.mbp-ui .butAction:not(.butActionDelete):hover {
	background: var(--mbp-btn-bg-hover) !important;
	color: var(--mbp-btn-ink) !important;
	border-color: var(--mbp-line-strong) !important;
}
/* v1.99.105 — SUPPRESSION neutralisée : identique aux autres boutons (demande user —
 * boutons « Supprimer » / « Suppression » alignés sur « Marquer sorti »). L'icône poubelle
 * porte désormais le sens ; plus d'aplat rouge. Mêmes jetons que le style neutre commun. */
.mbp-ui .butActionDelete,
.mbp-ui a.butActionDelete,
.mbp-ui input.butActionDelete,
.mbp-ui button.butActionDelete {
	background: var(--mbp-btn-bg) !important;
	color: var(--mbp-btn-ink) !important;
	border: 1px solid var(--mbp-btn-border) !important;
	border-radius: 8px !important;
}
.mbp-ui .butActionDelete:hover,
.mbp-ui a.butActionDelete:hover,
.mbp-ui input.butActionDelete:hover,
.mbp-ui button.butActionDelete:hover {
	background: var(--mbp-btn-bg-hover) !important;
	color: var(--mbp-btn-ink) !important;
	border-color: var(--mbp-line-strong) !important;
}

/* v1.99.11 — COMPOSANT LISTE DÉROULANTE : LARGEUR AU CONTENU (bornée). L'ancien
 * min-width:190px forfaitaire s'appliquait à TOUS les selects fermés → un « Oui/Non »
 * s'affichait sur 190px (constaté : 29 listes trop larges sur « Champs obligatoires »).
 * On laisse désormais select2 (width:'resolve') dimensionner au contenu, borné par un
 * max raisonnable. Les FILTRES de liste gardent leur largeur mini dédiée (plus bas)
 * pour ne pas tronquer « — Sélectionner — ». */
.mbp-ui .select2-container--default .select2-selection--single { min-width: 0; max-width: 320px; }
.mbp-ui table.liste td .select2-container--default .select2-selection--single { min-width: 0; }
/* v1.99.96 : MULTISELECT (ex. « Sites autorisés ») rendu IDENTIQUE aux selects SIMPLES.
 * La LARGEUR est laissée à la règle générale des select2 (auto / min 140 / max 340, plus bas)
 * — exactement comme les selects simples. On n'aligne ici QUE la hauteur (= hauteur de
 * contrôle), le padding interne et le CHEVRON (le multiple n'en a pas nativement). */
.mbp-ui .select2-container--default .select2-selection--multiple {
	box-sizing: border-box; position: relative; padding: 2px 22px 2px 4px;
	/* v1.99.199 : hauteur AUTO — la hauteur figée faisait déborder les puces
	 * sélectionnées sur les lignes voisines (Réglages généraux, multiselects RH).
	 * La boîte garde la hauteur de contrôle à vide et GRANDIT avec les puces. */
	min-height: var(--mbp-ctl-h); height: auto;
	/* IDENTIQUE au select simple : même bordure, même arrondi, même fond. */
	border: 1px solid var(--mbp-line-strong) !important;
	border-radius: var(--mbp-field-radius) !important;
	background: var(--mbp-surface);
	display: flex; align-items: center; flex-wrap: wrap;
}
.mbp-ui .select2-container--default.select2-container--focus .select2-selection--multiple,
.mbp-ui .select2-container--default.select2-container--open .select2-selection--multiple {
	border-color: var(--mbp-green) !important; box-shadow: var(--mbp-ring);
}
.mbp-ui .select2-selection--multiple .select2-selection__rendered {
	/* v1.99.199 : les puces passent à la ligne dans la boîte (plus de nowrap ni de
	 * line-height plein contrôle qui empilait les puces hors cadre). */
	padding: 0 4px !important; margin: 0; line-height: normal; white-space: normal;
	display: flex; flex-wrap: wrap; align-items: center; gap: 2px; width: 100%;
}
/* Puces de sélection : compactes, arrondies au rayon des champs, croix intégrée. */
.mbp-ui .select2-selection--multiple .select2-selection__choice {
	margin: 2px 0 !important; padding: 1px 6px !important;
	border: 1px solid var(--mbp-line-strong) !important;
	border-radius: var(--mbp-field-radius) !important;
	background: var(--mbp-neutral-50, #f6f6f6) !important;
	line-height: 1.5; max-width: 100%; overflow: hidden; text-overflow: ellipsis;
}
.mbp-ui .select2-selection--multiple .select2-search--inline,
.mbp-ui .select2-selection--multiple .select2-search__field {
	margin: 0 !important; height: calc(var(--mbp-ctl-h) - 6px); line-height: normal;
}
/* Chevron identique à la flèche du select simple (native ~#888 → --mbp-muted-soft). */
.mbp-ui .select2-container--default .select2-selection--multiple::after {
	content: ""; position: absolute; right: 9px; top: 50%; margin-top: -2px;
	width: 0; height: 0; pointer-events: none;
	border-left: 4px solid transparent; border-right: 4px solid transparent;
	border-top: 5px solid var(--mbp-muted-soft);
}
/* Placeholder « — Select — » du multi = même encre que les selects simples (non grisé). */
.mbp-ui .select2-selection--multiple .select2-search__field::placeholder { color: var(--mbp-neutral-800) !important; opacity: 1; }

/* v1.99.11 — DÉBORDEMENT DE PAGE À DROITE. Cause constatée (Barèmes légaux, +193px) :
 * un contenu long non sécable (JSON des barèmes) force la table `centpercent` au-delà
 * de la largeur du contenu. On autorise la coupure des tokens longs → la table se
 * replie dans la largeur disponible, plus aucun débordement horizontal. */
.mbp-ui table.liste td, .mbp-ui table.centpercent td { overflow-wrap: anywhere; }
.mbp-ui .fiche, .mbp-ui .fichecenter { max-width: 100%; }
/* v1.99.215 — GARDE-FOU GLOBAL ANTI-DÉBORDEMENT (édition ET listes). Règle du proprio :
 * AUCUN débordement horizontal de page n'est autorisé. On agit SANS poser d'overflow sur
 * les conteneurs (ce qui rognerait menus déroulants select2 / infobulles) :
 *   1) les champs de saisie ne dépassent jamais leur conteneur (cap 100 %) ;
 *   2) les barres d'actions & formulaires inline (.tabsAction — ex. l'ajout de ligne des
 *      profils de paie) se REPLIENT au lieu de pousser la page vers la droite. */
.mbp-ui input, .mbp-ui select, .mbp-ui textarea { max-width: 100%; box-sizing: border-box; }
.mbp-ui form.tabsAction,
.mbp-ui div.tabsAction { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
/* les sections bornent leur largeur (sans overflow -> pas de rognage des popups) */
.mbp-ui .border { max-width: 100%; }
/* v1.99.10 : ANTI-FLASH. Le <select> de pagination natif reste visible ~300ms avant
 * l'habillage select2 puis « saute » vers le widget. On le masque tant que select2 ne
 * l'a pas transformé (classe html.mbp-pgjs posée dès le parse par le JS ; retirée après
 * habillage, ou après un filet de 2,5s si l'habillage n'a pas lieu → natif visible,
 * pagination utilisable). Une fois habillé, le natif porte .select2-hidden-accessible
 * (hors-écran) : la règle ne le vise plus. */
html.mbp-pgjs .mbp-ui select.selectlimit:not(.select2-hidden-accessible),
html.mbp-pgjs .mbp-ui select[name="limit"]:not(.select2-hidden-accessible) {
	visibility: hidden !important;
}
/* v1.99.146 : même anti-flash ÉTENDU aux listes déroulantes de FILTRE (« — Select — ») — sur un
 * Ctrl+F5 les <select> natifs s'affichent puis select2 les habille en sautant. On masque le natif
 * tant qu'il n'est pas habillé (guard `:not(.select2-hidden-accessible)`, filet mbp-pgjs 2,5s). */
html.mbp-pgjs .mbp-ui tr.liste_titre_filter select:not(.select2-hidden-accessible),
html.mbp-pgjs .mbp-ui .mbp-filter-item select:not(.select2-hidden-accessible) {
	visibility: hidden !important;
}

/* v1.99.7/.10 : SÉLECTEUR DE PAGINATION — LARGEUR COMPACTE. Le sélecteur de limite
 * ne doit JAMAIS hériter du min-width:190px des filtres (il n'affiche qu'un nombre).
 * Cible fiable = le frère adjacent du <select.selectlimit>/<select[name=limit]> caché
 * (le conteneur select2 ne reçoit PAS de classe custom ici ; l'ancien ciblage par
 * classe conteneur était mort et a été retiré). Retombe sur TOUTES les listes. Le
 * panneau déroulé, lui, porte .mbp-pglimit-drop (dropdownCssClass, actif). */
.mbp-ui select.selectlimit + .select2-container,
.mbp-ui select[name="limit"] + .select2-container {
	width: auto !important;
	min-width: 4.2em !important;
	max-width: 6em !important;
	height: var(--mbp-ctl-h) !important;          /* le conteneur ne doit pas se gonfler (cœur D19) */
	vertical-align: middle;
	transition: none !important;      /* v1.99.10 : coupe l'animation (transition:all héritée) à l'apparition */
	/* v1.99.160 : le conteneur ne centrait pas sa .selection (posée ~6px trop bas par select2)
	 * → le libellé « 20 » descendait. On centre explicitement la sélection dans le conteneur. */
	display: inline-flex !important;
	align-items: center !important;
}
.mbp-ui select.selectlimit + .select2-container > .selection,
.mbp-ui select[name="limit"] + .select2-container > .selection { flex: 1 1 auto; min-width: 0; }
/* v1.99.147 : les NUMÉROS DE PAGE natifs étaient ~7px plus HAUT que le sélecteur « 20 » et que les
 * boutons de barre (⊕/Importer) — ceux-ci sont déjà alignés entre eux. On descend donc les numéros
 * pour aligner toute la ligne. Généralisé à toutes les listes du module. */
/* v1.99.157 : ALIGNEMENT ROBUSTE de la barre de pagination. Le <ul> contient le <li> du
 * sélecteur de limite ET les <li> des numéros ; l'ancien décalage top:7px ne touchait que
 * les <a> (ni l'actif « 1 », ni le select) → désalignement. On centre TOUT verticalement
 * via un flex sur le <ul>, sans aucun nudge en pixels (généralisé haut ET bas de liste). */
.mbp-ui div.pagination {
	display: inline-flex; align-items: center;
	position: relative; top: 3px;
}
.mbp-ui div.pagination > ul {
	display: inline-flex; align-items: center; margin: 0; padding: 0; list-style: none;
}
.mbp-ui div.pagination > ul > li {
	position: static; top: auto; display: inline-flex; align-items: center; margin: 0;
}

/* v1.99.158 : BARRE DE TITRE DE LISTE (print_barre_liste = table.table-fiche-title) alignée
 * sur UNE SEULE HAUTEUR. La table native (picto | titre | pagination, cellules valignmiddle)
 * laissait un décalage vertical entre le titre (gauche) et la pagination (droite). On la
 * transforme en rangée FLEX centrée : picto+titre à gauche, pagination poussée à droite.
 * Généralisé à toutes les listes du module. */
.mbp-ui table.table-fiche-title { display: block; width: 100%; }
.mbp-ui table.table-fiche-title > tbody { display: flex; align-items: center; width: 100%; }
.mbp-ui table.table-fiche-title > tbody > tr { display: flex; align-items: center; width: 100%; gap: 4px; }
.mbp-ui table.table-fiche-title > tbody > tr > td { display: flex; align-items: center; padding: 0; }
.mbp-ui table.table-fiche-title > tbody > tr > td.col-right { margin-left: auto; }
/* Le titre natif porte line-height:40px (héritage eldy) → son glyphe descend ~3px sous
 * le centre, désaligné des numéros de pagination. On normalise la line-height pour un
 * centrage cohérent avec la pagination (glyphes sur la même ligne). */
.mbp-ui table.table-fiche-title .titre { line-height: 1.2; padding: 0; }

/* v1.99.148 : GÉNÉRALISATION de l'alignement des formulaires. Dans un formulaire `.border` qui
 * utilise `titlefield` (colonne de label à largeur fixe), toute ligne dont le label a été laissé
 * sans `titlefield` prend la MÊME largeur → les champs/boutons de valeur démarrent au même niveau. */
.mbp-ui table.border:has(> tbody > tr > td.titlefield) > tbody > tr > td:first-child:not(.titlefield):not([colspan]) {
	width: 250px;
}
/* Le wrapper .selection se gonfle sur certains cœurs (padding 6/12 → ~46px) : on le
 * fige à la hauteur du champ pour que la barre de pagination ne se déforme pas. */
.mbp-ui select.selectlimit + .select2-container .selection,
.mbp-ui select[name="limit"] + .select2-container .selection {
	display: flex !important;
	align-items: center;
	height: var(--mbp-ctl-h) !important;
	padding: 0 !important;
	overflow: hidden;
}
.mbp-ui select.selectlimit + .select2-container .select2-selection--single,
.mbp-ui select[name="limit"] + .select2-container .select2-selection--single {
	min-width: 0 !important;
	width: 100%;
	height: var(--mbp-ctl-h) !important;
	padding: 0 !important;   /* évite le double rembourrage (single + rendered) qui tronque « 20 » */
}
/* Zone de texte : marge gauche lisible + place à droite pour le chevron. */
.mbp-ui select.selectlimit + .select2-container .select2-selection__rendered,
.mbp-ui select[name="limit"] + .select2-container .select2-selection__rendered {
	padding-left: 10px !important;
	padding-right: 24px !important;
	/* v1.99.160 : le libellé « 20 » descendait ~6px dans sa boîte (line-height select2 par
	 * défaut) → désaligné des numéros. Centrage vertical explicite = glyphe au centre de la boîte. */
	display: flex !important;
	align-items: center !important;
	height: var(--mbp-ctl-h) !important;
	line-height: 1 !important;
}
/* v1.99.8 : PANNEAU DÉROULÉ du sélecteur de pagination. Sans contrainte, select2
 * (dropdownAutoWidth) le dimensionne à ~220px : un grand tiroir sous une petite
 * boîte de 76px → rupture visuelle. On le ramène à une largeur compacte, alignée
 * sous le déclencheur, et on resserre les lignes (choix d'un simple nombre). */
.select2-dropdown.mbp-pglimit-drop {
	width: 92px !important;       /* px (pas em : la police du panneau est agrandie) : sous le déclencheur */
	min-width: 0 !important;
	font-size: var(--mbp-fs-body) !important;   /* le panneau héritait d'une police ~36px → 6em géant + lignes hautes */
}
.select2-dropdown.mbp-pglimit-drop .select2-results__option {
	padding-top: 4px !important;
	padding-bottom: 4px !important;
	min-height: 0 !important;
	font-size: var(--mbp-fs-body) !important;
	line-height: 1.4;
}

/* v1.99.0 : HABILLAGE mbp-ui DES CHAMPS D'IMPORT DE FICHIER. Le bouton natif « Choisir un
 * fichier » du navigateur est stylé au bouton mbp-ui (accent + rayon 8px) via le
 * pseudo-élément ::file-selector-button — aucun JS, aucune couleur en dur. */
.mbp-ui input[type=file]::file-selector-button {
	background: var(--mbp-btn-bg);
	color: var(--mbp-btn-ink);
	border: 1px solid var(--mbp-btn-border);
	border-radius: 8px;
	padding: 5px 12px;
	margin-right: 10px;
	cursor: pointer;
	font-size: var(--mbp-fs-help);
}
.mbp-ui input[type=file]::-webkit-file-upload-button {
	background: var(--mbp-btn-bg);
	color: var(--mbp-btn-ink);
	border: 1px solid var(--mbp-btn-border);
	border-radius: 8px;
	padding: 5px 12px;
	margin-right: 10px;
	cursor: pointer;
	font-size: var(--mbp-fs-help);
}

/* Photo / vignette : cadre carte. */
.mbp-ui .mbp-thumb-lg {
	border-radius: var(--mbp-radius-lg);
	box-shadow: var(--mbp-shadow-sm);
}

/* ----------------------------------------------------------------------------
 * mbp-ui — FAMILLE LISTES (v1.81.0). Les tableaux de liste Dolibarr
 * (table.liste) deviennent des cartes : en-tête posé, lignes aérées, survol
 * discret. 100 % jetons, aucune couleur en dur. On ne touche PAS aux couleurs
 * de statut (badges/pastilles gardent leurs classes natives).
 * -------------------------------------------------------------------------- */

/* La table de liste = une carte douce. */
.mbp-ui .div-table-responsive > table.liste,
.mbp-ui .div-table-responsive-no-min > table.liste,
.mbp-ui table.liste {
	background: var(--mbp-surface);
	border: 1px solid var(--mbp-line);
	border-radius: var(--mbp-radius-lg);
	box-shadow: var(--mbp-shadow-sm);
	border-collapse: separate;
	border-spacing: 0;
	overflow: hidden;
	margin-bottom: 16px;
}

/* En-tête de liste : libellés atténués, filet bas net. */
.mbp-ui table.liste > tbody > tr.liste_titre > th,
.mbp-ui table.liste > thead > tr.liste_titre > th,
.mbp-ui table.liste tr.liste_titre th,
.mbp-ui table.liste tr.liste_titre td {
	background: var(--mbp-surface-alt);
	color: var(--mbp-muted);
	font-weight: 400 !important;   /* v1.99.107 : en-têtes de colonne NON gras, uniforme (demande user) */
	border-bottom: 1px solid var(--mbp-line);
	padding: 7px 8px;   /* v1.99.125 : espacement NATIF Dolibarr (mesuré 7px 8px) */
	vertical-align: middle;
}
/* v1.99.107 — UNIFORMISATION : aucun gras en en-tête de colonne, quel que soit le tableau
 * (certains `<th>` retombaient sur le gras natif du navigateur). Centralisé sur `.liste_titre`. */
.mbp-ui .liste_titre th,
.mbp-ui .liste_titre td,
.mbp-ui tr.liste_titre th,
.mbp-ui tr.liste_titre td { font-weight: 400 !important; }

/* v1.99.107 — CHEVRON DE TRI masqué en en-tête (demande user). Le lien de tri reste
 * cliquable/fonctionnel ; seule la flèche `.imgup`/`.imgdown` (span fa-caret) est cachée.
 * Centralisé sur toutes les listes du module. */
/* v1.99.129 : le tri redevient VISIBLE (demande user). Le chevron de direction (colonne triée
 * côté serveur) est affiché mais discret ; les liens d'en-tête triables ont un curseur pointer. */
/* v1.99.135 : chevron NATIF masqué — le tri utilise le MODÈLE UNIFORME (↕ neutre, ↑/↓ actif),
 * identique au tri client, sur toutes les colonnes triables (demande user). */
.mbp-ui table.liste tr.liste_titre .imgup,
.mbp-ui table.liste tr.liste_titre .imgdown,
.mbp-ui table.liste tr.liste_titre th span[class*="fa-caret"] { display: none !important; }
.mbp-ui table.liste tr.liste_titre th a[href*="sortfield"] { cursor: pointer; }

/* v1.99.130 : TITRES DE RUBRIQUE (lignes de section d'une liste = `tr.liste_titre` dont la
 * cellule couvre toutes les colonnes via colspan). À aligner à GAUCHE et en GRAS (demande user),
 * généralisé à toutes les listes du module. Ne concerne pas la vraie ligne d'en-tête (qui a des
 * cellules séparées, sans colspan). */
.mbp-ui table:not(.border):has(tr.liste_titre) tr.liste_titre > td[colspan],
.mbp-ui table tr.liste_titre > td[colspan] {
	text-align: left !important;   /* bat le centrage des colonnes « courtes » (:last-child) */
	font-weight: bold !important;  /* bat le `font-weight:400 !important` global liste_titre */
	width: auto;                   /* pas de rétrécissement min-content sur un titre de section */
}

/* v1.99.132 : table d'aide « Protocoles d'intégration par marque » (devices). La colonne URL
 * contient des URLs longues en `<code>` (insécables) qui monopolisaient la largeur et écrasaient
 * la colonne Protocole (cassée caractère par caractère). On garde Protocole lisible (min-width,
 * retour à la ligne au mot) et on laisse l'URL céder (coupe n'importe où). */
/* v1.99.133 : la colonne « Marque » (courte : ZKTeco, Hikvision…) monopolisait la largeur en
 * absorbant l'espace, laissant Protocole + URL écrasées à droite. On cale Marque au contenu et on
 * élargit CONSIDÉRABLEMENT Protocole et URL (≈ moitié-moitié du reste). Le `!important` bat la
 * règle générique de rétrécissement des dernière/avant-dernière colonnes. */
/* v1.99.134 : table « libre-service » (Employé | Utilisateur lié | État | Action). « Employé »
 * absorbait toute la largeur → grand vide avant « Utilisateur lié ». On cale Employé au contenu et
 * on laisse « Utilisateur lié » absorber (contenu à gauche) → il se rapproche d'Employé. */
.mbp-ui table.mbp-selfservice-table th:nth-child(1),
.mbp-ui table.mbp-selfservice-table td:nth-child(1) { width: 1%; white-space: nowrap; }
.mbp-ui table.mbp-selfservice-table th:nth-child(2),
.mbp-ui table.mbp-selfservice-table td:nth-child(2) { width: auto; text-align: left; }

.mbp-ui table.mbp-proto-help th:nth-child(1),
.mbp-ui table.mbp-proto-help td:nth-child(1) { width: 1%; white-space: nowrap; min-width: 230px; }
.mbp-ui table.mbp-proto-help th:nth-child(2),
.mbp-ui table.mbp-proto-help td:nth-child(2) { width: auto !important; min-width: 220px; white-space: normal !important; text-align: left !important; }
.mbp-ui table.mbp-proto-help th:nth-child(3),
.mbp-ui table.mbp-proto-help td:nth-child(3) { width: auto !important; min-width: 380px; text-align: left !important; }
.mbp-ui table.mbp-proto-help td:nth-child(3) code { word-break: break-all; white-space: normal; }

/* v1.99.133 : table sonde de diagnostic (Contrôle | État | Détail | Conseil | Dernier passage).
 * « Conseil » est l'avant-dernière colonne → l'auto-rétrécissement des « 2 dernières colonnes »
 * la calait à la largeur mini (un mot par ligne). On lui rend une largeur confortable, à gauche,
 * en retour à la ligne normal. Le `!important` bat la règle générique de rétrécissement. */
/* v1.99.133 : table des Barèmes légaux (Code | Libellé | Date d'effet | Date fin | Contenu JSON |
 * Action). Le JSON `<code>` insécable de « Contenu » (avant-dernière colonne) monopolisait la
 * largeur et étranglait les colonnes de dates (qui cassaient « 01/01/2⏎026 »). On rend les dates
 * insécables + un peu de largeur, et on laisse le JSON céder (coupe n'importe où). */
.mbp-ui table.mbp-bareme-table th:nth-child(3),
.mbp-ui table.mbp-bareme-table td:nth-child(3),
.mbp-ui table.mbp-bareme-table th:nth-child(4),
.mbp-ui table.mbp-bareme-table td:nth-child(4) { white-space: nowrap !important; min-width: 100px; width: auto !important; text-align: left; }
/* v1.99.134 : rééquilibrage Libellé/Contenu — Libellé réduit (cap ~220px), Contenu (JSON) élargi
 * (absorbe le reste, min 340px) pour que le JSON tienne sur moins de lignes. Code calé au contenu. */
.mbp-ui table.mbp-bareme-table th:nth-child(1),
.mbp-ui table.mbp-bareme-table td:nth-child(1) { width: 1%; white-space: nowrap; }
.mbp-ui table.mbp-bareme-table th:nth-child(2),
.mbp-ui table.mbp-bareme-table td:nth-child(2) { width: 220px !important; }
.mbp-ui table.mbp-bareme-table th:nth-child(5),
.mbp-ui table.mbp-bareme-table td:nth-child(5) { width: auto !important; min-width: 340px; }
.mbp-ui table.mbp-bareme-table td:nth-child(5) code { word-break: break-all; white-space: normal; }

.mbp-ui table.mbp-probe-table th:nth-child(1),
.mbp-ui table.mbp-probe-table td:nth-child(1) { min-width: 175px; }
/* Détail (3) et Conseil (4) équilibrés : même part, retour à la ligne normal, à gauche. */
.mbp-ui table.mbp-probe-table th:nth-child(3),
.mbp-ui table.mbp-probe-table td:nth-child(3) { width: auto !important; min-width: 240px; white-space: normal !important; text-align: left !important; }
.mbp-ui table.mbp-probe-table th:nth-child(4),
.mbp-ui table.mbp-probe-table td:nth-child(4) {
	width: auto !important;
	min-width: 240px;
	white-space: normal !important;
	text-align: left !important;
}

/* v1.99.134 : uniformise la DISTRIBUTION des tables de « Santé & diagnostic » sur
 * celle de la table sonde (Infrastructure) : colonne libellé compacte à gauche
 * (~195px, comme mbp-probe-table) au lieu de s'étirer à ~850px et rejeter l'état
 * au bord ; la colonne descriptive (2e) absorbe la largeur restante à gauche ;
 * les colonnes d'état/valeur restent compactes et centrées. Exclut la table des
 * étapes d'install (1re colonne = ✓). */
.mbp-ui table.mbp-diag-table th:first-child,
.mbp-ui table.mbp-diag-table td:first-child { width: 180px !important; text-align: left !important; white-space: normal !important; }
.mbp-ui table.mbp-diag-table th:nth-child(2),
.mbp-ui table.mbp-diag-table td:nth-child(2) { width: auto !important; text-align: left !important; white-space: normal !important; }

/* Tri CLIENT (dictionnaires…) : en-tête cliquable + flèche d'état (neutre / ↑ / ↓). */
.mbp-ui .mbp-sortable { cursor: pointer; user-select: none; }
.mbp-ui .mbp-sortable::after { content: " \2195"; opacity: .35; }
.mbp-ui .mbp-sortable.mbp-sort-asc::after { content: " \2191"; opacity: .9; }
.mbp-ui .mbp-sortable.mbp-sort-desc::after { content: " \2193"; opacity: .9; }

/* v1.99.131 : colonnes triables CÔTÉ SERVEUR non actives → flèche neutre ↕ (même affordance
 * que le tri client), pour montrer qu'elles sont triables (Réf, Nom, Matricule, Site…). */
.mbp-ui th.mbp-serversort > a[href*="sortfield"],
.mbp-ui th.mbp-serversort-asc > a[href*="sortfield"],
.mbp-ui th.mbp-serversort-desc > a[href*="sortfield"] { cursor: pointer; }
.mbp-ui th.mbp-serversort > a[href*="sortfield"]::after { content: " \2195"; opacity: .35; }
.mbp-ui th.mbp-serversort-asc > a[href*="sortfield"]::after { content: " \2191"; opacity: .9; }
.mbp-ui th.mbp-serversort-desc > a[href*="sortfield"]::after { content: " \2193"; opacity: .9; }

/* v1.99.138 : grille catégorie×échelon — répartition équilibrée des colonnes (Catégorie n'absorbe
 * plus tout ; échelons/salaire répartis). */
.mbp-ui table.mbp-grid-table > tbody > tr > th:first-child,
.mbp-ui table.mbp-grid-table > tbody > tr > td:first-child { width: 1%; white-space: nowrap; }
.mbp-ui table.mbp-grid-table > tbody > tr > th:not(:first-child),
.mbp-ui table.mbp-grid-table > tbody > tr > td:not(:first-child) { width: auto !important; }

/* Historique des versions (grille) : contenu court partout (I, A, montants, dates) → colonnes
 * réparties ÉQUITABLEMENT au lieu de laisser « Catégorie » absorber toute la largeur. Les
 * alignements par cellule (.right, badge centré) restent respectés. */
.mbp-ui table.mbp-grid-hist > tbody > tr > th,
.mbp-ui table.mbp-grid-hist > tbody > tr > td { width: 20% !important; }

/* Liste pointage : colonne « État » — titre + badge CENTRÉS (alignés). Le décalage de 0,5 cm a été
 * annulé (demande user) ; on ne garde que le centrage. */
.mbp-ui table.liste th.mbp-etat-nudge,
.mbp-ui table.liste td.mbp-etat-nudge { text-align: center !important; }

/* Contenu des référentiels (diagnostic) : « Nb de lignes » était rejetée à droite car « Contrôle »
 * absorbait toute la largeur. On cale Contrôle + Nb au CONTENU (Nb se rapproche de Contrôle) et
 * « Actif » absorbe le vide (à gauche), qui reste sur la droite de la table. */
.mbp-ui table.mbp-refcount > tbody > tr > th:first-child,
.mbp-ui table.mbp-refcount > tbody > tr > td:first-child,
.mbp-ui table.mbp-refcount > tbody > tr > th:nth-child(2),
.mbp-ui table.mbp-refcount > tbody > tr > td:nth-child(2) { width: 1% !important; white-space: nowrap; }
.mbp-ui table.mbp-refcount > tbody > tr > th:last-child,
.mbp-ui table.mbp-refcount > tbody > tr > td:last-child { width: auto !important; text-align: left; }

/* v1.99.106 — Colonne RÉF. (1re colonne des listes mbp) : légèrement élargie et
 * insécable, pour que la référence (« EMP0013 », « BUL-2025-… ») tienne sur une ligne
 * sans coller aux bords ni se couper. S'applique à toutes les listes du module. */
.mbp-ui table.liste tr.liste_titre th:first-child { min-width: 80px; }
.mbp-ui table.liste td:first-child { white-space: nowrap; overflow-wrap: normal; }

/* v1.99.124 — COLONNES D'ACTION des listes (« Actif » = toggle, « Actions » = crayon/poubelle) :
 * largeur AU CONTENU (au lieu de colonnes larges) + tout centré (titre + cellules). Cible les
 * cellules qui ne portent qu'un toggle ou des liens/icônes d'action (pas de texte) ; `width:1%`
 * en table auto-layout rétrécit la colonne à son min-content, le <th> suit la largeur de colonne.
 * `:has()` — cohérent avec le CSS moderne du module ; dégradation propre si non supporté.
 * Généralisé : s'applique à TOUTES les listes du module (pas de markup à toucher). */
.mbp-ui table.liste td:has(.fa-toggle-on),
.mbp-ui table.liste td:has(.fa-toggle-off),
.mbp-ui table.liste td:has(a.mbp-postlink),
.mbp-ui table.liste td:has(.pictodelete),
.mbp-ui table.liste td:has(button.mbp-rowact-btn),
.mbp-ui table.liste td:has(.mbp-iconact),
.mbp-ui table.liste td:has(.mbp-rowact-btn) {
	width: 1%;
	white-space: nowrap;
	text-align: center;
}
/* Le titre de ces colonnes reste centré (convention .center du module). Filet de sécurité :
 * centre aussi l'en-tête si une cellule d'action existe dans la colonne (même largeur de colonne). */
.mbp-ui table.liste tr.liste_titre th.center { text-align: center; }

/* v1.99.134 — CORRECTIF RACINE : suppression du rétrécissement AVEUGLE POSITIONNEL des « 2
 * dernières colonnes » (ex-v1.99.126). Il calait à la largeur mini TOUTE colonne en dernière/
 * avant-dernière position, y compris des colonnes de TEXTE (Conseil, Étape, État, Résolution,
 * Contenu JSON…), qui cassaient alors un mot/lettre par ligne. Le calage des vraies colonnes
 * courtes reste assuré, sans effet de bord, par :
 *   - le ciblage PAR CONTENU d'action ci-dessus (`td:has(.mbp-rowact-btn / .pictodelete / …)`),
 *   - le ciblage PAR CLASSE ci-dessous (`th.center/.right`, `td.center/.right`, `td:has(.badge)`).
 * Les colonnes de texte en fin de table absorbent/reviennent à la ligne normalement. */

/* v1.99.127 — OPTIMISATION DES COLONNES INTERNES des listes (largeur de TABLE INCHANGÉE — on ne
 * rétrécit pas la table, seulement la répartition interne). Les colonnes déjà marquées « courtes »
 * — centrées (badges/toggles/statuts) ou à droite (nombres/montants) — se calent à LEUR CONTENU
 * (`width:1%` en table auto-layout) ; les colonnes de TEXTE (à gauche) absorbent l'espace restant.
 * Généralisé à TOUTES les listes du module (y compris embarquées dans les cartes). */
/* Périmètre = toute table de LISTE (celle qui a une ligne d'en-tête `tr.liste_titre`), donc aussi
 * les tables `noborder centpercent` (index dictionnaires, grilles de config…) — PAS les
 * formulaires clé/valeur (qui n'ont pas de `liste_titre`). */
.mbp-ui table:not(.border):has(tr.liste_titre) tr.liste_titre th.center,
.mbp-ui table:not(.border):has(tr.liste_titre) tr.liste_titre th.right,
.mbp-ui table:not(.border):has(tr.liste_titre) tr.liste_titre td.center,
.mbp-ui table:not(.border):has(tr.liste_titre) tr.liste_titre td.right,
.mbp-ui table:not(.border):has(tr.liste_titre) > tbody > tr.oddeven > td.center,
.mbp-ui table:not(.border):has(tr.liste_titre) > tbody > tr.oddeven > td.right {
	width: 1%;
	white-space: nowrap;
}
/* Badges de STATUT centrés quelle que soit la classe d'alignement de la cellule (corrige les
 * badges laissés à gauche ou à droite). Haute spécificité pour battre .right/.left natifs. */
/* v1.99.169 : `.mbp-cell-left` = cellule TEXTE portant un badge d'appoint (ex. « Salarié ! »
 * des ordres de paiement) → reste alignée à gauche et garde sa largeur (le centrage
 * automatique ne vise que les colonnes de STATUT). */
.mbp-ui table:not(.border):has(tr.liste_titre) > tbody > tr.oddeven > td:has(.badge):not(.mbp-cell-left) {
	text-align: center;
	width: 1%;
	white-space: nowrap;
}

/* v1.99.129 — COLONNE PRINCIPALE FLEXIBLE (opt-in). Dans une liste où UNE colonne est marquée
 * `.mbp-col-flex` (le Libellé/Nom), TOUTES les autres colonnes se calent à leur contenu
 * (`width:1%`) et la colonne flex ABSORBE l'espace restant. Corrige le « vide » entre deux
 * colonnes texte (ex. Code très large collé à Libellé). N'affecte que les listes marquées. */
.mbp-ui table:has(.mbp-col-flex) tr.liste_titre th,
.mbp-ui table:has(.mbp-col-flex) tr.liste_titre td,
.mbp-ui table:has(.mbp-col-flex) > tbody > tr.oddeven > td { width: 1%; white-space: nowrap; }
.mbp-ui table:has(.mbp-col-flex) tr.liste_titre th.mbp-col-flex,
.mbp-ui table:has(.mbp-col-flex) tr.liste_titre td.mbp-col-flex,
.mbp-ui table:has(.mbp-col-flex) > tbody > tr.oddeven > td.mbp-col-flex { width: auto; white-space: normal; }

/* Ligne de filtres : fond neutre, séparée de l'en-tête. */
.mbp-ui table.liste tr.liste_titre_filter td,
.mbp-ui table.liste tr.liste_titre_filter th {
	background: var(--mbp-surface);
	border-bottom: 1px solid var(--mbp-line-soft);
	padding: 6px 10px;
}

/* Lignes de données : respiration + séparateur discret. */
.mbp-ui table.liste > tbody > tr.oddeven > td {
	border-bottom: 1px solid var(--mbp-line-soft);
	padding: 7px 8px;   /* v1.99.125 : espacement NATIF Dolibarr (mesuré 7px 8px) */
	vertical-align: middle;
}
.mbp-ui table.liste > tbody > tr.oddeven:last-child > td {
	border-bottom: none;
}
/* Survol de ligne : teinte accent très légère (dérivée du thème). */
.mbp-ui table.liste > tbody > tr.oddeven:hover > td {
	background: var(--mbp-green-tint);
}

/* Barre d'actions au-dessus/dessous des listes : boutons cohérents. */
.mbp-ui .tabsAction .butAction,
.mbp-ui div.tabsAction a.butAction {
	border-radius: 8px;
}

/* Pied de liste (pagination) : posé dans la carte. */
.mbp-ui table.liste > tbody > tr.liste_total > td,
.mbp-ui table.liste tr.liste_total td {
	background: var(--mbp-surface-alt);
	border-top: 1px solid var(--mbp-line);
	font-weight: 600;
}

/* ----------------------------------------------------------------------------
 * mbp-ui — ANCRE POSSEDEE « .mbp-list » (Pilier 1, v1.99.54). Les listes migrees
 * via mbp_list_open()/mbp_list_titre() portent NOS classes .mbp-list /
 * .mbp-list-titre. Ce bloc reprend, ancre sur ces classes, l'essentiel du rendu
 * « carte » ci-dessus : si le markup natif (.liste/.liste_titre) derive entre
 * versions de Dolibarr, l'apparence reste tenue par une classe que NOUS possedons.
 * (Duplication assumee avec les regles natives : memes valeurs, aucun conflit.)
 * -------------------------------------------------------------------------- */
.mbp-ui .mbp-list {
	background: var(--mbp-surface);
	border: 1px solid var(--mbp-line);
	border-radius: var(--mbp-radius-lg);
	box-shadow: var(--mbp-shadow-sm);
	border-collapse: separate;
	border-spacing: 0;
	overflow: hidden;
	margin-bottom: 16px;
}
.mbp-ui .mbp-list > tbody > tr.mbp-list-titre > th,
.mbp-ui .mbp-list > thead > tr.mbp-list-titre > th,
.mbp-ui .mbp-list tr.mbp-list-titre th,
.mbp-ui .mbp-list tr.mbp-list-titre td {
	background: var(--mbp-surface-alt);
	color: var(--mbp-muted);
	font-weight: 400;   /* v1.99.107 : en-têtes non gras (uniforme) */
	border-bottom: 1px solid var(--mbp-line);
	padding: 7px 8px;   /* v1.99.125 : espacement NATIF Dolibarr */
	vertical-align: middle;
}
.mbp-ui .mbp-list > tbody > tr.oddeven > td {
	border-bottom: 1px solid var(--mbp-line-soft);
	padding: 7px 8px;   /* v1.99.125 : espacement NATIF Dolibarr */
	vertical-align: middle;
}
.mbp-ui .mbp-list > tbody > tr.oddeven:last-child > td { border-bottom: none; }
.mbp-ui .mbp-list > tbody > tr.oddeven:hover > td { background: var(--mbp-green-tint); }

/* ----------------------------------------------------------------------------
 * mbp-ui — BLOC PHOTO (formulaire salarié). Empilement vertical net : le champ
 * fichier au-dessus, les boutons caméra EN DESSOUS, sans chevauchement. S'applique
 * aussi hors mbp-ui (rendu correct quel que soit le thème). Aucune couleur en dur.
 * -------------------------------------------------------------------------- */
/* ----------------------------------------------------------------------------
 * mbp-ui — BARRE DE FILTRES DE LISTE (v1.82.0). Chaque « libellé + contrôle » est
 * un groupe insécable qui enveloppe proprement ; les actions (rechercher / effacer)
 * restent groupées à droite. Fin du désalignement où les libellés restaient en
 * haut et les contrôles débordaient à la ligne. Tokens uniquement.
 * -------------------------------------------------------------------------- */
.mbp-listfilter {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 12px;
	margin: 10px 0 14px;
}
.mbp-listfilter .mbp-filter-item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	white-space: nowrap;
}
.mbp-listfilter .mbp-filter-item > label {
	color: var(--mbp-muted);
	font-weight: 500;
	font-size: var(--mbp-fs-micro);
	margin: 0;
}
.mbp-listfilter .mbp-filter-item input.flat,
.mbp-listfilter .mbp-filter-item select { max-width: 190px; }
.mbp-listfilter .mbp-filter-actions {
	display: inline-flex;
	gap: 6px;
	margin-left: auto;
}
.mbp-listfilter .mbp-filter-actions .button { border-radius: 8px; }

/* v1.98.5 : les listes déroulantes des BARRES D'ACTION (.tabsAction : sélecteur
 * « Employé » de Feuilles de présence, etc.) restaient trop étroites et tronquaient
 * « — Sélectionner — » en « — S… ». On leur donne une largeur mini pour afficher le
 * placeholder en entier, sans toucher aux listes en tableau (légitimement étroites). */
.mbp-ui .tabsAction .select2-container { min-width: 220px; }
.mbp-ui .tabsAction select.flat { min-width: 220px; }

/* v1.98.6 : ALIGNEMENT VERTICAL des boutons d'une même barre d'action. Les boutons de
 * soumission <input>/<button> (marge verticale symétrique 3px) et les liens <a butAction>
 * (marge haute 0, marge basse ~19.6px, asymétrique) ne tombaient PAS sur la même ligne :
 * le bouton de soumission apparaissait ~10px plus bas que les liens (relevé sur la page
 * Import : Téléverser sous Modèle CSV/XLSX). On uniformise les marges verticales et le
 * centrage -> les boutons d'une barre s'alignent au pixel. 100% géométrie. */
.mbp-ui .tabsAction .button,
.mbp-ui .tabsAction .butAction,
.mbp-ui .tabsAction input.button,
.mbp-ui .tabsAction button.button,
.mbp-ui .tabsAction a.butAction,
.mbp-ui .tabsAction a.button,
.mbp-ui .tabsAction .butActionDelete,
.mbp-ui .tabsAction a.butActionDelete,
.mbp-ui .tabsAction input.butActionDelete,
.mbp-ui .tabsAction button.butActionDelete {
	margin-top: 3px !important;
	margin-bottom: 3px !important;
	vertical-align: middle !important;
}

/* ----------------------------------------------------------------------------
 * mbp-ui — COCKPIT « Qualité & Tests » (v1.83.0). Barre d'onglets, panneaux et
 * cartes d'agrégats. 100 % jetons du thème, aucune couleur en dur.
 * -------------------------------------------------------------------------- */
.mbp-qatabs {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	border-bottom: 1px solid var(--mbp-line);
	margin: 6px 0 16px;
}
.mbp-qatabs .mbp-qatab {
	padding: 8px 14px;
	border: 1px solid transparent;
	border-bottom: none;
	border-radius: 8px 8px 0 0;
	color: var(--mbp-muted);
	text-decoration: none;
	font-weight: 600;
	font-size: var(--mbp-fs-help);
}
.mbp-qatabs .mbp-qatab:hover { color: var(--mbp-ink); background: var(--mbp-green-tint); }
.mbp-qatabs .mbp-qatab.mbp-qatab-on {
	color: var(--mbp-ink);
	background: var(--mbp-surface);
	border-color: var(--mbp-line);
	margin-bottom: -1px;
}
.mbp-qatabs .mbp-qatab-soon {
	font-size: var(--mbp-fs-micro);
	font-weight: 600;
	color: var(--mbp-muted-soft);
	border: 1px solid var(--mbp-line);
	border-radius: 10px;
	padding: 0 6px;
	margin-left: 4px;
}
.mbp-qapane { padding: 4px 2px 8px; }
.mbp-qacards { display: flex; flex-wrap: wrap; gap: 12px; margin: 6px 0 14px; }
.mbp-qacards .mbp-qacard {
	flex: 1 1 120px;
	min-width: 120px;
	background: var(--mbp-surface);
	border: 1px solid var(--mbp-line);
	border-radius: var(--mbp-radius-lg);
	box-shadow: var(--mbp-shadow-sm);
	padding: 12px 14px;
	text-align: center;
}
.mbp-qacards .mbp-qacard-n { font-size: var(--mbp-fs-display); font-weight: 700; color: var(--mbp-ink); line-height: 1.1; }
.mbp-qacards .mbp-qacard-l { font-size: var(--mbp-fs-micro); color: var(--mbp-muted); margin-top: 4px; }
.mbp-qaactions { margin: 4px 0 14px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
/* Tableau de bord : rangee de KPI en tuiles de charte (habille la sortie de mbp_kpi,
   qui reste en balisage natif). Jetons du theme uniquement, aucune couleur en dur. */
.mbp-dbkpis { display: flex; flex-wrap: wrap; gap: 12px; margin: 8px 0 20px; }
.mbp-dbkpis > div {
	flex: 1 1 150px;
	min-width: 150px !important;
	background: var(--mbp-surface);
	border: 1px solid var(--mbp-line);
	border-radius: var(--mbp-radius-lg);
	box-shadow: var(--mbp-shadow-sm);
	padding: 14px 16px !important;
	margin: 0 !important;
	text-align: center;
}
.mbp-dbkpis > div > .bold { font-size: var(--mbp-fs-display) !important; }

/* Personnalisation des blocs du tableau de bord (engrenage). Tout dérivé du thème. */
.mbp-dbblock.kpi-hidden { display: none !important; }
.mbp-dbpanel {
	background: var(--mbp-surface);
	border: 1px solid var(--mbp-line);
	border-radius: var(--mbp-radius-lg);
	box-shadow: var(--mbp-shadow-sm);
	padding: 12px 14px;
	margin: 6px 0 16px;
}
.mbp-dbpanel .mbp-dbpanel-title { font-weight: 700; margin-bottom: 8px; }
.mbp-dbpanel .mbp-dbpanel-toggles { display: flex; flex-wrap: wrap; gap: 16px; }
.mbp-dbpanel label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
/* v1.99.218 : hérite entièrement de .mbp-btn ; ne surcharge que le format CARRÉ (icône ⚙). */
.mbp-ui .mbp-dbgear { width: var(--mbp-ctl-h); padding: 0; line-height: 1; }

.mbp-photo-block { display: flex; flex-direction: column; gap: 10px; max-width: 340px; }
.mbp-photo-block .mbp-photo-file { display: block; }
.mbp-photo-block .mbp-photo-cam { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.mbp-photo-block .mbp-photo-cam > div { flex-basis: 100%; }
.mbp-photo-block video, .mbp-photo-block .mbp-thumb-lg { display: block; }

/* ============================================================================
 * v1.90.0 — COUCHE CHARTE GLOBALE (mbp-ui)
 * Reskin du markup Dolibarr NATIF pour que TOUTES les pages du module épousent
 * la maquette validée : champs et listes arrondis, panneau select2 déroulé
 * stylé, fiches et listes rendues en CARTES. Tout dérivé du thème (aucune
 * couleur en dur). Portée par la classe body « mbp-ui ».
 * ========================================================================== */

/* ---- 1) Listes fermées (select2) : arrondi, hauteur, valeur centrée ------
 * (L'arrondi des champs de saisie est porté plus haut par « .mbp-ui input… » ;
 * l'ancien doublon scopé « .mbp-page » a été retiré en v1.99.35, code mort.) */

/* select2 (liste fermée) — GLOBAL, plus seulement le formulaire salarié :
 * boîte arrondie, surface + bord de charte, hauteur 34px, valeur centrée. */
.mbp-ui .select2-container--default .select2-selection--single {
	height: var(--mbp-ctl-h);
	border: 1px solid var(--mbp-line);
	border-radius: var(--mbp-field-radius) !important;
	background: var(--mbp-surface);
	display: flex;
	align-items: center;
	/* v1.99.7 : contexte de positionnement du chevron. Sans cela l'ancre du picto
	 * remonte au conteneur select2 (parfois plus haut que le champ, ex. pagination)
	 * et le chevron se décentre. Ancré sur le champ (34px) → toujours centré. */
	position: relative;
}
.mbp-ui .select2-container--default.select2-container--focus .select2-selection--single,
.mbp-ui .select2-container--default.select2-container--open .select2-selection--single {
	border-color: var(--mbp-green);
	box-shadow: var(--mbp-ring);
}
.mbp-ui .select2-container--default .select2-selection--single .select2-selection__rendered {
	line-height: normal;
	color: var(--mbp-neutral-800);
}
/* Placeholder « — Sélectionner — » discret (texte atténué). */
.mbp-ui .select2-container--default .select2-selection__placeholder { color: var(--mbp-muted-soft); }
/* v1.99.7 : CHEVRON select2 — RÈGLE UNIQUE CENTRALISÉE. Le picto épouse toute la
 * hauteur du champ (top:0 + height:100%) : le triangle interne (b, centré à 50%)
 * tombe donc pile au milieu quelle que soit la hauteur du champ (34px standard,
 * cellule salarié plus courte, pagination…). Retrait droit uniforme. Remplace les
 * anciens réglages dispersés (height:32px/28px, right:6px/4px) qui se contredisaient. */
.mbp-ui .select2-selection__arrow {
	height: 20px !important;
	top: 50% !important;
	bottom: auto !important;
	transform: translateY(-50%);
	/* v1.99.8 : le cœur pose un `left` négatif sur le span du chevron → il s'étire
	 * sur toute la boîte et le triangle (centré à 50 % du span) se retrouve PILE sur
	 * la valeur (« 20 »). On annule ce `left` : span étroit ancré à droite → triangle
	 * dans la zone droite, jamais sur le texte. */
	left: auto !important;
	right: 8px !important;
	width: 18px !important;
}
/* v1.99.8/.10 : ANCRAGE DIRECT DU TRIANGLE (pagination). Le span du chevron reste
 * étiré sur toute la boîte compacte (left utilisé ≈ 0) ; on positionne l'élément
 * VISIBLE (b) lui-même à droite. v1.99.10 : décalé un peu plus à droite (right 6→2px)
 * — il paraissait trop collé à la valeur. (Ancien sélecteur .select2-container.mbp-
 * pglimit retiré : mort, le conteneur ne reçoit pas cette classe.) */
.mbp-ui select.selectlimit + .select2-container .select2-selection__arrow b,
.mbp-ui select[name="limit"] + .select2-container .select2-selection__arrow b {
	left: auto !important;
	right: 2px !important;
	margin-left: 0 !important;
}

/* ---- 2) select2 : PANNEAU DÉROULÉ (jamais stylé jusqu'ici) --------------- */
.mbp-ui .select2-dropdown,
.select2-container--default .select2-dropdown {
	background: var(--mbp-surface);
	border: 1px solid var(--mbp-line);
	border-radius: var(--mbp-field-radius);
	box-shadow: var(--mbp-shadow);
	overflow: hidden;
}
.select2-container--default .select2-results__option {
	color: var(--mbp-ink);
	padding: 8px 10px;
	font-size: var(--mbp-fs-help);
}
.select2-container--default .select2-results__option--highlighted[aria-selected],
.select2-container--default .select2-results__option--highlighted {
	background: color-mix(in srgb, var(--mbp-green) 14%, var(--mbp-surface));
	color: var(--mbp-ink);
}
.select2-container--default .select2-results__option[aria-selected=true] {
	background: var(--mbp-green-tint);
	font-weight: 600;
}
.select2-container--default .select2-search--dropdown .select2-search__field {
	border: 1px solid var(--mbp-line);
	border-radius: var(--mbp-field-radius);
	background: var(--mbp-surface);
	color: var(--mbp-ink);
	padding: 6px 8px;
}

/* Selects NATIFS résiduels (filtres de liste rendus non-select2) : arrondis. */
.mbp-ui .mbp-listfilter select {
	border-radius: var(--mbp-field-radius);
	height: var(--mbp-ctl-h);
}

/* ---- 3) FICHES : colonnes natives rendues en CARTES --------------------- */
.mbp-ui .fichecenter .fichehalfleft > table.tableforfield,
.mbp-ui .fichecenter .fichehalfright > table.tableforfield,
.mbp-ui .fichehalfleft > table.border.tableforfield,
.mbp-ui .fichehalfright > table.border.tableforfield {
	background: var(--mbp-surface);
	border: 1px solid var(--mbp-line) !important;
	border-radius: var(--mbp-radius-lg);
	box-shadow: var(--mbp-shadow-sm);
	padding: 4px 16px;
	border-collapse: separate;
	border-spacing: 0;
	width: 100%;
	/* v1.99.206 : layout fixe → la largeur de colonne LIBELLÉ (200px) devient
	 * autoritaire comme la grille « .kv » de la démo (auto la traitait en minimum). */
	table-layout: fixed;
}
.mbp-ui .fichehalfleft > table.tableforfield > tbody > tr > td,
.mbp-ui .fichehalfright > table.tableforfield > tbody > tr > td {
	border-bottom: 1px solid var(--mbp-line-soft);
	/* Rythme identique à la démo (.kv > div { padding:8px 16px }). */
	padding: var(--mbp-fiche-row-pad);
	vertical-align: middle;
}
.mbp-ui .fichehalfleft > table.tableforfield > tbody > tr:last-child > td,
.mbp-ui .fichehalfright > table.tableforfield > tbody > tr:last-child > td {
	border-bottom: none;
}
/* v1.99.206 : colonne LIBELLÉ calée sur la démo (Gabarit B « .kv » : ~220px muted).
 * En table-layout auto, c'est la 1re cellule de CHAQUE ligne qui fixe la colonne :
 * on force donc titlefield ET les 1res cellules sans titlefield à la MÊME largeur,
 * plus prioritaire que la règle globale l.1218 (250px) grâce au contexte fichehalf. */
/* Colonne LIBELLÉ fiche calée sur la démo (Gabarit B « .kv » : ~220px, muted).
 * !important assumé : bat la règle globale l.1218 (250px, :has+:not très spécifique)
 * UNIQUEMENT dans le contexte fiche (fichehalf), sans toucher les autres formulaires. */
.mbp-ui .fichehalfleft > table.tableforfield > tbody > tr > td:first-child,
.mbp-ui .fichehalfright > table.tableforfield > tbody > tr > td:first-child {
	width: 200px !important;
	padding: var(--mbp-fiche-row-pad);
}
.mbp-ui .fichehalfleft > table.tableforfield > tbody > tr > td.titlefield,
.mbp-ui .fichehalfright > table.tableforfield > tbody > tr > td.titlefield {
	color: var(--mbp-muted);
	font-weight: 500;
	width: 200px !important;
	padding: var(--mbp-fiche-row-pad);
}
/* Écart entre les deux colonnes de la fiche. */
.mbp-ui .fichecenter .fichehalfleft { padding-right: 9px; }
.mbp-ui .fichecenter .fichehalfright { padding-left: 9px; }

/* v1.99.206 : ALIGNEMENT UNIVERSEL des fiches en lecture (Gabarit B, « sans exception »).
 * Cible la carte de fiche possédée `table.mbp-form.tableforfield` — quel que soit son
 * conteneur (2 colonnes fichehalf OU carte pleine largeur) — pour que TOUTES les fiches
 * (salarié, contrat, congé, prêt, période, bulletin) partagent le même rythme que la démo.
 * Les formulaires d'ÉDITION utilisent `mbp-cform` (sans `tableforfield`) → non touchés. */
.mbp-ui table.mbp-form.tableforfield {
	table-layout: fixed;
}
.mbp-ui table.mbp-form.tableforfield > tbody > tr > td {
	border-bottom: 1px solid var(--mbp-line-soft);
	padding: var(--mbp-fiche-row-pad);
	vertical-align: middle;
}
.mbp-ui table.mbp-form.tableforfield > tbody > tr:last-child > td {
	border-bottom: none;
}
.mbp-ui table.mbp-form.tableforfield > tbody > tr > td:first-child {
	width: 200px !important;
	color: var(--mbp-muted);
	font-weight: 500;
}

/* ---- 4) LISTES : tableau natif rendu en CARTE (façon grid maquette) ------
 * Couvre aussi les tables « noborder » des pages admin (transferts, dictionnaires,
 * config) pour que la généralisation n'oublie AUCUNE page.
 * NB : les « table.liste » (avec ou sans centpercent/tagtable) sont déjà rendues en
 * carte complète par le bloc « FAMILLE LISTES » (v1.81.0, ~l.907, « .mbp-ui table.liste »).
 * Ce bloc-ci n'ajoute donc QUE le cas « noborder.centpercent » (tables non-liste). */
.mbp-ui table.tagtable.liste,
.mbp-ui table.noborder.centpercent {
	background: var(--mbp-surface);
	border: 1px solid var(--mbp-line);
	border-radius: var(--mbp-radius-lg);
	overflow: hidden;
	box-shadow: var(--mbp-shadow-sm);
	border-collapse: separate;
	border-spacing: 0;
	width: 100%;
}
/* v1.99.211 : les sorties natives FormFile (list_of_documents, onglet Documents)
 * portent « noborder nobottom » qui SUPPRIME la bordure basse ET l'ombre → le
 * tableau détonnait (ni filet bas ni ombre) par rapport aux autres listes. On les
 * REPOSE explicitement pour uniformiser tous les tableaux de liste. */
.mbp-ui table.liste.noborder,
.mbp-ui table.liste.nobottom {
	border: 1px solid var(--mbp-line) !important;
	box-shadow: var(--mbp-shadow-sm) !important;
}
.mbp-ui table.liste > tbody > tr.liste_titre > th,
.mbp-ui table.liste > thead > tr.liste_titre > th,
.mbp-ui table.liste tr.liste_titre td,
.mbp-ui table.noborder > tbody > tr.liste_titre > th,
.mbp-ui table.noborder > tbody > tr.liste_titre > td {
	background: var(--mbp-surface-alt);
	color: var(--mbp-muted);
	font-weight: 400;   /* v1.99.107 : en-têtes non gras (uniforme) */
	padding: 7px 8px;   /* v1.99.125 : espacement NATIF Dolibarr (mesuré 7px 8px) */
	vertical-align: middle;
	border-bottom: 1px solid var(--mbp-line);
}
.mbp-ui table.liste > tbody > tr.oddeven > td,
.mbp-ui table.noborder > tbody > tr.oddeven > td {
	padding: 7px 8px;   /* v1.99.125 : espacement NATIF Dolibarr (mesuré 7px 8px) */
	vertical-align: middle;
	border-bottom: 1px solid var(--mbp-line-soft);
}
.mbp-ui table.liste > tbody > tr.oddeven:last-child > td,
.mbp-ui table.noborder > tbody > tr.oddeven:last-child > td { border-bottom: none; }
.mbp-ui table.liste > tbody > tr.oddeven:hover > td,
.mbp-ui table.noborder > tbody > tr.oddeven:hover > td {
	background: color-mix(in srgb, var(--mbp-green) 6%, var(--mbp-surface));
}

/* ---- 5) FORMULAIRES (GLOBAL) : labels à droite + select2 pleine largeur --
 * S'applique à TOUS les formulaires de création/édition du module (leave, loan,
 * payslip, payperiod, planning…), pas seulement salarié/contrat. On distingue le
 * formulaire (table.border DANS un <form>) de la FICHE en lecture (tableforfield,
 * dont les libellés restent à gauche). Rien n'est laissé derrière. */
.mbp-ui form table.border:not(.tableforfield) > tbody > tr > td:first-child,
.mbp-ui table.mbp-empform > tbody > tr > td:first-child,
.mbp-ui table.mbp-empform > tbody > tr > td.titlefield,
.mbp-ui table.mbp-cform > tbody > tr > td:first-child {
	text-align: right;
	/* v1.99.34 : 'color' RETIRE ici (il etait ecrase par le bloc libelle plus bas
	 * qui derive la couleur du theme). Une seule source de couleur de libelle. */
	font-weight: 500;
	white-space: nowrap;
	padding-right: 14px;
}
/* select2 + saisies dans les formulaires : largeur BORNÉE (façon maquette), pas
 * étirée sur toute la demi-colonne. Correctif de la régression 1.90.0 (width:100%
 * sans plafond rendait les champs anormalement longs). */
.mbp-ui form table.border td:last-child .select2-container,
.mbp-ui table.mbp-empform td:last-child .select2-container,
.mbp-ui table.mbp-cform td:last-child .select2-container,
.mbp-ui form table.border td:last-child span.select2 {
	width: auto !important; max-width: 340px !important; min-width: 140px !important; box-sizing: border-box;
}
/* v1.99.102 : NE PAS étirer à 100% les inputs qui portent DÉJÀ une classe de largeur
 * explicite (width50, maxwidth150, width100, minwidth200…) — chacun garde SA largeur, adaptée
 * au contenu (fin des « lignes plus grandes que leur contenu » : Heures/semaine width50 était
 * écrasé à 100%). Seuls les inputs SANS classe de largeur remplissent la cellule (borné 340px).
 * Les number sont gérés à part (toujours étroits). */
.mbp-ui form table.border:not(.tableforfield) td:last-child input.flat:not([class*="width"]),
.mbp-ui form table.border:not(.tableforfield) td:last-child input[type=text]:not([class*="width"]),
.mbp-ui form table.border:not(.tableforfield) td:last-child input[type=email]:not([class*="width"]),
.mbp-ui table.mbp-empform td:last-child input.flat:not([class*="width"]),
.mbp-ui table.mbp-cform td:last-child input.flat:not([class*="width"]) {
	max-width: 340px; width: 100%; box-sizing: border-box;
}

/* ---- 6) EN-TÊTE tableau de bord : ligne de contexte société ------------- */
.mbp-dbcontext {
	/* v1.99.82 : ligne société plus LISIBLE (encre plus soutenue + taille de corps)
	 * et espacée du titre (margin-top négatif retiré). */
	color: var(--mbp-neutral-700);
	font-size: var(--mbp-fs-body);
	margin: 6px 0 16px;
}
.mbp-dbhead-tools { display: inline-flex; align-items: center; gap: 8px; }
.mbp-dbhead-tools label { color: var(--mbp-muted); font-size: var(--mbp-fs-micro); }

/* ---- 7) BANDEAU DE FICHE : retour + titre + navigation préc/suiv --------- */
.mbp-ui .mbp-recordhead { margin: 2px 0 12px; }
.mbp-ui .mbp-backlink {
	display: inline-block; color: var(--mbp-muted); font-size: var(--mbp-fs-help);
	margin-bottom: 6px; text-decoration: none;
}
.mbp-ui .mbp-backlink:hover { color: var(--mbp-green); }
.mbp-ui .mbp-recordhead-main {
	display: flex; align-items: center;
	gap: 12px; flex-wrap: wrap;
}
/* v1.99.202 : pastille-icône du bandeau de fiche (Gabarit B démo) — même style que
 * l'en-tête de page ; le bloc nav ◄ n/N ► est poussé à droite. */
.mbp-ui .mbp-recordhead-main .mbp-pico {
	width: 42px; height: 42px; flex: none;
	border-radius: var(--mbp-radius-pico);
	background: var(--mbp-green); color: var(--mbp-on-accent);
	display: flex; align-items: center; justify-content: center;
	box-shadow: var(--mbp-shadow-sm);
}
.mbp-ui .mbp-recordhead-main .mbp-pico .fas,
.mbp-ui .mbp-recordhead-main .mbp-pico .fa,
.mbp-ui .mbp-recordhead-main .mbp-pico img { font-size: var(--mbp-fs-h1); line-height: 1; }
/* Repli img_picto (appelants sans opts.icon) : image blanchie et calibrée, comme .mbp-phead. */
.mbp-ui .mbp-recordhead-main .mbp-pico img { filter: brightness(0) invert(1); width: var(--mbp-fs-h1); height: var(--mbp-fs-h1); }
.mbp-ui .mbp-recordhead-txt { min-width: 0; display: flex; flex-direction: column; }
.mbp-ui .mbp-recordhead-txt .mbp-psub { font-size: var(--mbp-fs-help); color: var(--mbp-muted); margin-top: 1px; }
/* Ligne sous-titre + badge de statut alignés (Gabarit B démo). */
.mbp-ui .mbp-recordhead-txt .mbp-psub-line { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.mbp-ui .mbp-recordhead-txt .mbp-psub-line .mbp-psub-sep { opacity: .55; }
.mbp-ui .mbp-recordhead-txt .mbp-psub-line .badge,
.mbp-ui .mbp-recordhead-txt .mbp-psub-line .mbp-badge { vertical-align: middle; }
.mbp-ui .mbp-recordhead-main .mbp-recordnav { margin-left: auto; }
.mbp-ui .mbp-recordtitle {
	font-size: var(--mbp-fs-h1); font-weight: 750; letter-spacing: -.2px; color: var(--mbp-ink);
	display: flex; align-items: center; gap: 6px;
}
/* Pied d'actions d'une FICHE (Gabarit B) : boutons à DROITE. Ne cible que la barre qui
 * suit le contenu de fiche (marqueur .mbp-actions-fiche posé par les pages). */
.mbp-ui .mbp-actions-fiche { justify-content: flex-end; }
/* v1.99.202 : BLOCS CLÉ/VALEUR DE FICHE EN CARTES (Gabarit B démo) — les tables des
 * demi-colonnes (fichehalfleft/right) prennent l'habillage carte, centralisé (toutes
 * les fiches en héritent, aucun changement PHP). Hors formulaires de modale. */
.mbp-ui .fichecenter .fichehalfleft > table,
.mbp-ui .fichecenter .fichehalfright > table {
	background: var(--mbp-surface);
	border: 1px solid var(--mbp-line) !important;
	border-radius: var(--mbp-radius-card);
	box-shadow: var(--mbp-shadow-sm);
	overflow: hidden;
	margin-bottom: 14px;
}
/* En MODALE (création/édition salarié-contrat), l'habillage carte est ENTIÈREMENT
 * neutralisé (sinon double encadrement + overflow:hidden qui rogne select2/datepicker). */
.mbp-ui .mbp-modal-body .fichecenter .fichehalfleft > table,
.mbp-ui .mbp-modal-body .fichecenter .fichehalfright > table {
	background: none; border: 0 !important; border-radius: 0;
	box-shadow: none; overflow: visible; margin-bottom: 0;
}
/* v1.99.204 : TITRE DE CARTE (mbp_form_open($cls,$titre)) — <caption> en barre d'en-tête
 * (Gabarit B démo : chaque bloc clé/valeur devient une carte TITRÉE par thème). */
.mbp-ui table.mbp-form > caption.mbp-form-cap {
	caption-side: top; text-align: left;
	font-size: var(--mbp-fs-section); font-weight: 700; color: var(--mbp-ink);
	/* Gris d'en-tête VISIBLE (façon démo) : dérivé de l'encre, s'adapte au thème. */
	background: color-mix(in srgb, var(--mbp-ink) 6%, var(--mbp-surface));
	border-bottom: 1px solid var(--mbp-line);
	padding: 10px 14px;
}
/* En modale, pas de barre de titre de carte (formulaire de saisie, pas fiche). */
.mbp-ui .mbp-modal-body table.mbp-form > caption.mbp-form-cap { display: none; }
.mbp-ui .mbp-recordnav { display: inline-flex; align-items: center; gap: 8px; }
.mbp-ui .mbp-recnav-btn {
	display: inline-flex; align-items: center; justify-content: center;
	width: var(--mbp-ctl-h); height: var(--mbp-ctl-h);
	border: 1px solid var(--mbp-line); border-radius: var(--mbp-field-radius);
	background: var(--mbp-surface); color: var(--mbp-ink); text-decoration: none;
}
.mbp-ui .mbp-recnav-btn:hover { border-color: var(--mbp-green); color: var(--mbp-green); }
.mbp-ui .mbp-recnav-btn.disabled { opacity: .4; pointer-events: none; }
.mbp-ui .mbp-recnav-pos { color: var(--mbp-muted); font-size: var(--mbp-fs-help); min-width: 48px; text-align: center; }

/* ---- 11) FORMULAIRES : supprime la « bande » vide au bas de la carte -------
 * La carte des formulaires (conteneur .tabBar de dol_get_fiche_head) laissait
 * ~34px de vide sous la dernière ligne = margin-bottom du table (16px) +
 * padding-bottom du .tabBar (18px). On colle la carte à son contenu. Ne vise que
 * les tables DIRECTEMENT dans .tabBar (formulaires) ; les fiches en lecture
 * (colonnes .fichecenter) ne sont pas concernées. */
/* v1.99.34 : rustines margin-bottom/padding-bottom du .tabBar RETIREES — devenues
 * superflues depuis que le .tabBar n'est plus une carte (voir bloc .tabBar plus haut). */
.mbp-ui .mbp-fiche-head > table.border,
.mbp-ui .mbp-fiche-head > form > table.border { margin-bottom: 0; }

/* ---- 8) LISTES (suite) : entêtes NON cliquables visuellement --------------
 * Les colonnes triables de Dolibarr rendent l'entête en <a> (bleu, soulignable).
 * On neutralise l'aspect « lien » : couleur d'entête, pas de soulignement. Le tri
 * reste fonctionnel (le clic marche), mais l'entête ne ressemble plus à un lien. */
/* v1.99.169 : entêtes TRIABLES (<a>) = MÊME rendu que les non-triables : encre + gras 700
 * (les liens restaient gris/400 à cause de « th a{font-weight:normal} » d'eldy et de l'ancien
 * « muted !important » ici → « certaines colonnes pas en gras »). Force avec !important. */
.mbp-ui table.liste tr.liste_titre th a,
.mbp-ui table.liste tr.liste_titre td a,
.mbp-ui table.liste .liste_titre .a_button,
.mbp-ui table.liste th.wrapcolumntitle a {
	color: var(--mbp-ink) !important;
	text-decoration: none !important;
	font-weight: 700 !important;
}
.mbp-ui table.liste tr.liste_titre th a:hover { color: var(--mbp-green) !important; }

/* v1.99.150 : Confrontation planning/pointage — la colonne « Jour » absorbait toute la largeur
 * (données tassées à droite). On la cale au contenu et on répartit équitablement les 5 colonnes
 * de données (Prévu/Réel/Écart/Retard/État) sur la largeur restante. */
.mbp-ui table.mbp-confront-table > tbody > tr > th:first-child,
.mbp-ui table.mbp-confront-table > tbody > tr > td:first-child,
.mbp-ui table.mbp-confront-table > tbody > tr > th:last-child,
.mbp-ui table.mbp-confront-table > tbody > tr > td:last-child { width: 1%; white-space: nowrap; }
.mbp-ui table.mbp-confront-table > tbody > tr > th:not(:first-child):not(:last-child),
.mbp-ui table.mbp-confront-table > tbody > tr > td:not(:first-child):not(:last-child) { width: auto !important; }
/* La colonne « État » (dernière) : badge centré dans sa colonne calée au contenu, à droite. */
.mbp-ui table.mbp-confront-table > tbody > tr > th:last-child,
.mbp-ui table.mbp-confront-table > tbody > tr > td:last-child { text-align: center !important; }

/* v1.99.149 : en-têtes de liste — afficher le LIBELLÉ COMPLET (retour à la ligne) au lieu de
 * tronquer en « … » quand la table a beaucoup de colonnes (ex. Périodes de paie : « Retenues
 * salariales », « Charges patronales », « Coût employeur »). Généralisé aux listes du module. */
/* v1.99.170 : les entêtes NUMÉRIQUES (right/center : montants, dates, nb) restent sur UNE
 * ligne — le libellé donne la largeur (« Net à payer » se cassait en 2 lignes). Seuls les
 * entêtes texte (gauche) peuvent revenir à la ligne. */
.mbp-ui table.liste tr.liste_titre th.wrapcolumntitle:not(.right):not(.center),
.mbp-ui table.liste tr.liste_titre th.wrapcolumntitle:not(.right):not(.center) .wrapcolumntitle {
	white-space: normal !important;
	overflow: visible !important;
	text-overflow: clip !important;
	max-width: none !important;
}
.mbp-ui table.liste tr.liste_titre th.wrapcolumntitle.right,
.mbp-ui table.liste tr.liste_titre th.wrapcolumntitle.center {
	white-space: nowrap !important;
	overflow: visible !important;
	max-width: none !important;
}
/* v1.99.171 : entêtes SIMPLES (<th> sans wrapcolumntitle, tri client) : le libellé + sa
 * flèche de tri restent sur UNE ligne (ex. « Type », « Condition », « Compte » des rubriques
 * se cassaient). La colonne prend la largeur de son titre — pas plus. */
.mbp-ui table.liste tr.liste_titre:not(.liste_titre_filter) > th:not(.wrapcolumntitle) { white-space: nowrap; }
/* Colonne État : centrée (1 ou 2 badges), fin de la plainte d'alignement. */
.mbp-ui table.liste th.mbp-col-status, .mbp-ui table.liste td.mbp-col-status {
	text-align: center !important;
}
.mbp-ui table.liste td.mbp-col-status .badge { vertical-align: middle; }

/* Regroupement par année des périodes de paie : entête d'année repliable.
 * Aucune couleur codée en dur (charte) : on s'appuie sur font-weight + curseur. */
.mbp-ui tr.mbp-periodhead { cursor: pointer; }
.mbp-ui tr.mbp-periodhead td { font-weight: 600; }
.mbp-ui .mbp-periodcaret { display: inline-block; width: 1em; }

/* ---- 9) FILTRES de liste : arrondis + contrôles compacts ------------------ */
.mbp-ui .mbp-listfilter input.flat,
.mbp-ui .mbp-listfilter input[type=text] {
	border-radius: var(--mbp-field-radius);
	height: var(--mbp-ctl-h); box-sizing: border-box;
}
/* Boutons d'action des filtres (loupe, croix) : ICÔNES ACCENT SANS BORDURE,
 * alignées comme les icônes de titre (+ / export). */
.mbp-ui .mbp-listfilter .mbp-filter-actions { display: inline-flex; align-items: center; gap: 4px; }
.mbp-ui .mbp-listfilter .button {
	height: var(--mbp-ctl-h); width: var(--mbp-ctl-h); padding: 0; display: inline-flex; align-items: center; justify-content: center;
	background: transparent !important;
	border: none !important;
	box-shadow: none !important;
	color: var(--mbp-green);
	font-size: var(--mbp-fs-body);
	cursor: pointer; vertical-align: middle;
}
.mbp-ui .mbp-listfilter .button:hover { color: var(--mbp-green-600); background: transparent !important; }
/* Filtres de liste en select2 : largeur mini pour afficher « — Sélectionner — »
 * en entier (fin de la troncature « — Sé… » sur les colonnes étroites). La largeur
 * reste bornée par les classes maxwidth* Dolibarr quand elles sont présentes. */
.mbp-ui table.liste tr.liste_titre_filter .select2-container,
.mbp-ui .mbp-inlinefilter .select2-container { min-width: 0 !important; width: 150px !important; max-width: 150px !important; }

/* Sélecteur de pagination NATIF (fallback JS désactivé + style avant habillage) :
 * compact, arrondi, aligné. Règle UNIQUE (l'ancien doublon plus bas a été retiré). */
.mbp-ui select[name="limit"], .mbp-ui select.selectlimit {
	min-width: 64px !important; width: auto !important; height: var(--mbp-ctl-h);
	border-radius: var(--mbp-field-radius); padding: 0 8px; vertical-align: middle;
}

/* ---- 10) RETOURS PROD D18 : entêtes non-cliquables, zéro soulignement,
 * boutons de titre sans bordure, listes natives dimensionnées au contenu. ---- */

/* (a) Entêtes de colonnes : TEXTE NON CLIQUABLE, couleur uniforme, aucune
 * sur-coloration (bleu/mauve du lien ou du lien visité). Le tri par entête est
 * retiré visuellement ET fonctionnellement (pointer-events:none). */
/* v1.99.169 : les entêtes TRIABLES (lien <a> dans le <th>) et cette règle forçaient
 * la couleur « muted » + graisse 600 → entêtes gris/moins gras que les autres (Réf.,
 * Mois, Salarié…). Alignement sur la charte validée « casse normale + GRAS + encre » :
 * même rendu que les entêtes non triables. Le survol reste signalé par l'accent. */
.mbp-ui table.liste tr.liste_titre a,
.mbp-ui table.liste tr.liste_titre a:visited {
	color: var(--mbp-ink) !important;
	text-decoration: none !important;
	font-weight: 700 !important;
	cursor: pointer;
}
.mbp-ui table.liste tr.liste_titre a:hover {
	color: var(--mbp-green) !important;
	text-decoration: none !important;
}
.mbp-ui table.liste tr.liste_titre:not(.liste_titre_filter) th,
.mbp-ui table.liste tr.liste_titre:not(.liste_titre_filter) td {
	color: var(--mbp-ink) !important;
}

/* (b) AUCUN soulignement / surlignage sur les liens et menus (demande de longue
 * date). Les liens restent cliquables, mais sans décoration ni surbrillance. */
.mbp-ui a,
.mbp-ui a:hover,
.mbp-ui a:focus,
.mbp-ui .vmenu a:hover,
.mbp-ui .tmenu a:hover,
.mbp-ui ul.tmenu a:hover,
.mbp-ui .menu a:hover {
	text-decoration: none !important;
}

/* (c) Boutons de titre Dolibarr (+ Nouveau, Import/Export) : ICÔNES SANS BORDURE. */
.mbp-ui .btnTitle,
.mbp-ui a.btnTitle {
	background: transparent !important;
	border: none !important;
	box-shadow: none !important;
	/* v1.99.144 : on GARDE la TAILLE NATIVE Dolibarr des icônes (⊕ / Importer) — pas de réduction.
	 * v1.99.145 : on RAPPROCHE les 3 contrôles — le bouton natif a un padding interne énorme (~80px
	 * de large) qui écarte les icônes. On réduit ce padding (l'icône garde sa taille) + marge serrée,
	 * et on aligne verticalement sur le sélecteur de pagination. */
	padding-left: 3px !important;
	padding-right: 3px !important;
	margin: 0 1px !important;
	min-width: 0 !important;
	vertical-align: middle;
	position: relative;
	top: 6px;
}
/* Rapproche le 1er bouton du sélecteur de pagination voisin (réduit l'espace natif ~23px). */
.mbp-ui a.btnTitle:first-of-type { margin-left: -10px !important; }
.mbp-ui .btnTitle:hover .btnTitle-icon { color: var(--mbp-green); }

/* v1.99.12 — ACTIONS DE LIGNE EN PICTO. Certaines actions POST (bascule actif/inactif,
 * régénérer le secret) sont des <button type="submit"> : on les habille en PICTO, comme
 * les pictos éditer/supprimer voisins (fond transparent, couleur de charte, alignés) —
 * fini les gros boutons texte DÉSACTIVER / RÉGÉNÉRER en pleine colonne. Aucune couleur
 * en dur : on dérive du token de lien de la charte. */
.mbp-ui .mbp-rowact-btn {
	background: none !important;
	border: 0 !important;
	box-shadow: none !important;
	padding: 0 2px !important;
	margin: 0 !important;
	height: auto !important;
	line-height: 1 !important;
	cursor: pointer;
	vertical-align: middle;
	color: var(--colortextlink, #128247);
}
.mbp-ui .mbp-rowact-btn:hover { opacity: .7; }

/* v1.99.19 — LONGS BOUTONS D'EXPORT / TELECHARGEMENT → PICTO ICONE SEULE.
 * Les actions utilitaires (exporter tous les dictionnaires, telecharger un
 * modele CSV/XLSX) etaient de longs boutons texte, souvent en haut de page.
 * On les habille en picto carre avec infobulle (mbp_icon_action). Couleur
 * derivee du token de lien de la charte — aucune couleur en dur. */
.mbp-ui .mbp-iconact {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--mbp-ctl-h);
	height: var(--mbp-ctl-h);
	border-radius: var(--mbp-field-radius, 6px);
	color: var(--colortextlink, #128247);
	text-decoration: none;
	vertical-align: middle;
}
.mbp-ui .mbp-iconact:hover { opacity: .7; }
/* Bouton SUBMIT rendu en icone seule : on retire le chrome de bouton (mbp_icon_submit). */
.mbp-ui .mbp-iconact-submit { border: 0; background: transparent; cursor: pointer; padding: 0; }
/* v1.99.22 : icônes de FORMAT plus visibles (fichier Excel / code / CSV). */
.mbp-ui .mbp-iconact .fas { font-size: var(--mbp-fs-icon); }
/* v1.99.23 : COULEUR DE MARQUE par format (via tokens de charte, aucun littéral ici).
 * Les pictos ressemblent enfin au logo de l'appli cible : Excel vert, CSV vert foncé,
 * JSON/code indigo — reconnaissables au premier coup d'œil, sur tout thème. */
.mbp-ui .mbp-iconact--xlsx .fas { color: var(--mbp-fmt-excel); }
.mbp-ui .mbp-iconact--csv .fas { color: var(--mbp-fmt-csv); }
.mbp-ui .mbp-iconact--json .fas { color: var(--mbp-fmt-code); }
/* v1.99.22 : GROUPE « libellé : icônes » aligné à droite. Le texte de présentation
 * d'abord, les pictos suivent directement. Lisible sans survol (le libellé porte le sens). */
.mbp-ui .mbp-iconactbar {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 6px;
	flex-wrap: wrap;
}
.mbp-ui .mbp-iconactbar-label { font-size: var(--mbp-fs-help); margin-right: 2px; }
/* v1.99.24 : PIED DE PAGE « Importer | Exporter » en COLONNES. Séparé du contenu
 * par un filet de charte ; colonnes qui s'empilent sur mobile (flex-wrap). */
.mbp-ui .mbp-iofooter {
	display: flex;
	gap: 28px;
	flex-wrap: wrap;
	margin-top: 20px;
	padding-top: 14px;
	border-top: 1px solid var(--mbp-line);
}
.mbp-ui .mbp-iofooter-col { flex: 1 1 260px; min-width: 240px; }
.mbp-ui .mbp-iofooter-title { font-weight: 600; margin-bottom: 3px; }
.mbp-ui .mbp-iofooter-intro { font-size: var(--mbp-fs-help); margin-bottom: 10px; }
/* Dans les colonnes du pied, les groupes de pictos s'alignent à GAUCHE (lecture
 * naturelle de colonne), et non à droite comme une action isolée. */
.mbp-ui .mbp-iofooter-body .mbp-iconactbar { justify-content: flex-start; margin: 0 0 8px; }
/* Cadrage de la COLONNE ACTION : pictos centrés verticalement et espacés régulièrement,
 * jamais repliés — répond au « Align » signalé sur plusieurs listes. */
.mbp-ui table.liste td:last-child { white-space: nowrap; }
.mbp-ui table.liste td:last-child a,
.mbp-ui table.liste td:last-child .mbp-rowact-btn,
.mbp-ui table.liste td:last-child img,
.mbp-ui table.liste td:last-child .fas { vertical-align: middle; }

/* (d) Listes déroulantes NATIVES (filtres) : largeur AU CONTENU (pas de longue
 * ligne pour 10 caractères), avec un plafond raisonnable. */
.mbp-ui .mbp-listfilter select {
	width: auto !important;
	min-width: 120px;
	max-width: 280px;
	height: var(--mbp-ctl-h);
	border-radius: var(--mbp-field-radius);
	vertical-align: middle;
}

/* ============================================================================
 * AUDIT CONFORMITE mbp-ui (v1.99.29) — affordances a11y generalisees
 * Comble les ecarts vs maquette sur les elements interactifs PROPRES au module
 * (la maquette impose ces regles globalement ; select2/chrome Dolibarr couvrent
 * deja le reste). Aucune valeur de couleur d'accent figee : tout suit le theme.
 * ========================================================================== */

/* 1) Focus visible generalise. La maquette pose :focus-visible sur TOUT element
 *    interactif ; le module ne le posait que sur .mbp-btn. Les elements maison
 *    (icones d'action, nav de fiche, onglets QA, backlink, engrenage) heritaient
 *    du focus par defaut du theme, souvent supprime. On le retablit. */
.mbp-ui a:focus-visible,
.mbp-ui button:focus-visible,
.mbp-ui .mbp-iconact:focus-visible,
.mbp-ui .mbp-rowact-btn:focus-visible,
.mbp-ui .mbp-recnav-btn:focus-visible,
.mbp-ui .mbp-backlink:focus-visible,
.mbp-ui .mbp-dbgear:focus-visible,
.mbp-ui .mbp-qatabs .mbp-qatab:focus-visible,
.mbp-ui .mbp-listfilter .button:focus-visible {
	outline: 2px solid var(--mbp-green);
	outline-offset: 2px;
	border-radius: 4px;
}

/* 2) Cibles tactiles >= 44px sur pointeur grossier (WCAG 2.5.8, maquette L176).
 *    Les pictos d'action du module font 30-34px : on les agrandit au toucher
 *    sans changer le rendu souris. */
@media (pointer: coarse) {
	.mbp-ui .mbp-iconact,
	.mbp-ui .mbp-rowact-btn,
	.mbp-ui .mbp-recnav-btn,
	.mbp-ui .mbp-dbgear,
	.mbp-ui .mbp-listfilter .button,
	.mbp-ui .mbp-qatabs .mbp-qatab {
		min-width: 44px;
		min-height: 44px;
	}
}

/* 3) Ré-empilage mobile des FORMULAIRES (maquette L155-167). Sous 640px, la
 *    colonne libelle forcee a droite + nowrap comprimait les champs. On repasse
 *    le libelle AU-DESSUS du champ, pleine largeur, comme la maquette. Cible les
 *    memes selecteurs que la regle « labels a droite » pour rester coherent. */
@media (max-width: 640px) {
	.mbp-ui form table.border:not(.tableforfield) > tbody > tr,
	.mbp-ui table.mbp-empform > tbody > tr,
	.mbp-ui table.mbp-cform > tbody > tr {
		display: block;
		width: 100%;
	}
	.mbp-ui form table.border:not(.tableforfield) > tbody > tr > td,
	.mbp-ui table.mbp-empform > tbody > tr > td,
	.mbp-ui table.mbp-cform > tbody > tr > td {
		display: block;
		width: 100% !important;
	}
	.mbp-ui form table.border:not(.tableforfield) > tbody > tr > td:first-child,
	.mbp-ui table.mbp-empform > tbody > tr > td:first-child,
	.mbp-ui table.mbp-empform > tbody > tr > td.titlefield,
	.mbp-ui table.mbp-cform > tbody > tr > td:first-child {
		text-align: left;
		white-space: normal;
		padding-right: 0;
		padding-bottom: 2px;
	}
}

/* ============================================================================
 * NEUTRALISATION DE LA « SURCOUCHE » THEME SUR LES FICHES D'EDITION (v1.99.30)
 * Objectif maquette : formulaires du module SANS zebrage + libelles mutes gris.
 * Generalise a TOUS les formulaires d'edition (fiche salarie .mbp-empform, contrat
 * .mbp-cform, et tout table.border DANS un <form> : leave/loan/payperiod/admin...).
 * On NE touche PAS aux LISTES (table.liste garde son zebrage) ni aux fiches lecture
 * (tableforfield). Portee .mbp-ui => bat le theme hote sans !important agressif.
 * ========================================================================== */

/* 1) Aucun zebrage sur les formulaires : on annule le fond alterne, qu'il vienne
 *    du THEME (table.border nth-child / .oddeven) OU d'une regle MODULE (empform). */
.mbp-ui form table.border:not(.tableforfield):not(.liste) > tbody > tr,
.mbp-ui form table.border:not(.tableforfield):not(.liste) > tbody > tr:nth-child(even),
.mbp-ui form table.border:not(.tableforfield):not(.liste) > tbody > tr:nth-child(odd),
.mbp-ui form table.border:not(.tableforfield):not(.liste) > tbody > tr.oddeven,
.mbp-ui form table.border:not(.tableforfield):not(.liste) > tbody > tr.oddeven1,
.mbp-ui form table.border:not(.tableforfield):not(.liste) > tbody > tr.oddeven2,
.mbp-ui table.mbp-empform > tbody > tr:nth-child(even),
.mbp-ui table.mbp-empform > tbody > tr:nth-child(odd),
.mbp-ui table.mbp-cform > tbody > tr:nth-child(even),
.mbp-ui table.mbp-cform > tbody > tr:nth-child(odd) {
	background: transparent;
}

/* 2) Separateur fin facon maquette entre les lignes (au lieu du fond alterne). */
.mbp-ui form table.border:not(.tableforfield):not(.liste) > tbody > tr > td,
.mbp-ui table.mbp-empform > tbody > tr > td,
.mbp-ui table.mbp-cform > tbody > tr > td {
	border-bottom: 1px solid color-mix(in srgb, var(--mbp-line) 55%, var(--colorbackbody));
}
.mbp-ui form table.border:not(.tableforfield):not(.liste) > tbody > tr:last-child > td,
.mbp-ui table.mbp-empform > tbody > tr:last-child > td,
.mbp-ui table.mbp-cform > tbody > tr:last-child > td {
	border-bottom: none;
}

/* 3) Libelles de formulaire un cran PLUS MUTES (gris), theme-safe (derive du theme
 *    donc correct aussi en mode sombre) : moins « bleu-nuit » que le --mbp-muted
 *    standard sur les themes a texte fortement teinte. */
.mbp-ui form table.border:not(.tableforfield):not(.liste) > tbody > tr > td:first-child,
.mbp-ui table.mbp-empform > tbody > tr > td:first-child,
.mbp-ui table.mbp-empform > tbody > tr > td.titlefield,
.mbp-ui table.mbp-cform > tbody > tr > td:first-child {
	color: color-mix(in srgb, var(--colortext) 48%, var(--colorbackbody));
}

/* v1.99.32 : RENFORCEMENT anti-surcouche (modules CSS tiers ex. africageo/smsavance
 * qui habillent table.border). Le zebrage peut etre pose sur le TD (pas seulement le
 * TR) : on neutralise les deux, avec une specificite accrue (body.mbp-body) pour
 * battre un module CSS charge apres mboapaie.css, quel que soit l'ordre. */
body.mbp-body form table.border:not(.tableforfield):not(.liste) > tbody > tr > td,
body.mbp-body form table.border:not(.tableforfield):not(.liste) > tbody > tr:nth-child(even) > td,
body.mbp-body form table.border:not(.tableforfield):not(.liste) > tbody > tr.oddeven > td,
body.mbp-body table.mbp-empform > tbody > tr > td,
body.mbp-body table.mbp-empform > tbody > tr:nth-child(even) > td,
body.mbp-body table.mbp-cform > tbody > tr > td,
body.mbp-body table.mbp-cform > tbody > tr:nth-child(even) > td {
	background-color: transparent;
}

/* v1.99.34 : le bloc :has() de v1.99.33 est RETIRE — le double-encartage est
 * desormais reglé a la racine (le .tabBar n'est plus une carte, voir bloc .tabBar). */

/* mbp-ui — MoMo : flag « confirmé actif » + avertissement de cohérence (v1.99.56). */
.mbp-momo-row .mbp-momo-verif { margin-left: 10px; white-space: nowrap; }
.mbp-momo-row .mbp-momo-warn { margin-left: 10px; color: var(--mbp-red); font-size: var(--mbp-fs-help); }

/* mbp-ui — CHAMP FICHIER COMPACT (v1.99.60) : bouton « Choisir un fichier » a la
 * place du « Aucun fichier selectionne » natif ; le nom choisi s'affiche a cote. */
.mbp-ui .mbp-file { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mbp-ui .mbp-file-btn { position: relative; overflow: hidden; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.mbp-ui .mbp-file-btn .mbp-file-input { position: absolute; left: 0; top: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.mbp-ui .mbp-file-name { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Ligne d'import : champ fichier + action cote a cote (action rapprochee, alignee a gauche). */
.mbp-ui .mbp-import-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 8px 0; }
/* v1.99.108 : bande d'intro import = texte à gauche, « Télécharger le modèle » à droite. */
.mbp-ui .mbp-import-intro { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.mbp-ui .mbp-import-intro-tpl { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; }
/* Liens « fichier » homogènes : même picto, libellé de format en texte. */
.mbp-ui .mbp-tpl-link { margin-left: 10px; white-space: nowrap; text-decoration: none; color: var(--mbp-muted); }
.mbp-ui .mbp-tpl-link:hover { color: var(--mbp-ink); text-decoration: underline; }
/* Conteneur du groupe de liens de téléchargement de fichier (mbp_icon_action_group). */
.mbp-ui .mbp-filedl { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 2px; }
.mbp-ui .mbp-filedl-label { color: inherit; opacity: 1; }
.mbp-ui .mbp-filedl .mbp-tpl-link:first-of-type { margin-left: 8px; }
/* Bouton d'action posé sur la même ligne qu'un champ (ex. import : à droite du sélecteur). */
.mbp-ui .mbp-inline-action { margin-left: 12px; vertical-align: middle; }
/* v1.99.122 : garde-fou anti-débordement — un TEXTE D'AIDE dans une barre d'action (.tabsAction,
 * en white-space:nowrap pour les boutons) doit pouvoir s'enrouler, sinon un long libellé force
 * un défilement horizontal de la page. Les boutons, eux, gardent leur nowrap. */
.mbp-ui .tabsAction .opacitymedium { white-space: normal; }

/* v1.99.119 : LISTE DE CASES À COCHER (ex. « Sites autorisés ») — une case par site, alignées.
 * Le salarié peut être actif sur un seul, plusieurs ou tous les sites ; vide = aucune restriction. */
.mbp-ui .mbp-checklist { display: flex; flex-wrap: wrap; gap: 6px 20px; align-items: center; }
.mbp-ui .mbp-checklist label { display: inline-flex; align-items: center; gap: 5px; margin: 0; cursor: pointer; }

/* v1.99.113 : BARRE D'ACTION sur UNE SEULE LIGNE. Les libellés raccourcis (DGI, OP…) tiennent
 * désormais sur une ligne ; on l'impose (nowrap) + espacement resserré, avec un défilement
 * horizontal discret en secours si l'écran est vraiment étroit (plutôt qu'un retour à la ligne). */
.mbp-ui .tabsAction { white-space: nowrap; overflow-x: auto; }
.mbp-ui .tabsAction .button,
.mbp-ui .tabsAction .butAction,
.mbp-ui .tabsAction .butActionDelete { margin-left: 2px !important; margin-right: 2px !important; padding-left: 8px !important; padding-right: 8px !important; }
/* v1.99.118 : aligne verticalement TOUS les éléments d'une barre d'action (icône-action,
 * formulaires inline, boutons) — ex. « Nouveau site » (icône) + « 3 sites de démonstration ». */
.mbp-ui .tabsAction .mbp-iconact,
.mbp-ui .tabsAction form,
.mbp-ui .tabsAction .button,
.mbp-ui .tabsAction .butAction { vertical-align: middle; }
.mbp-ui .tabsAction form { display: inline-block; margin: 0; }
/* Les <button>/<input> d'un form inline de barre d'action portent 3px de marge verticale
 * (règle d'alignement submit/lien), rendant le form plus haut que l'icône-action voisine.
 * On donne la même marge à l'icône-action → hauteurs égales, centres alignés. */
.mbp-ui .tabsAction .mbp-iconact { margin-top: 3px; margin-bottom: 3px; }

/* v1.99.77 : encart de completude de la configuration initiale (checklist vivante). */
.mbp-ui .mbp-setup-state ul { margin: 0; }
.mbp-ui .mbp-setup-state.mbp-setup-ok { border-left: 4px solid var(--mbp-green); }
.mbp-ui .mbp-setup-state.mbp-setup-ko { border-left: 4px solid var(--mbp-red); }
.mbp-ui .mbp-chk-ok { color: var(--mbp-green); font-weight: 700; }
.mbp-ui .mbp-chk-ko { color: var(--mbp-red); font-weight: 700; }

/* v1.99.78 : fil d'etapes de l'assistant sequentiel verrouille. */
.mbp-ui .mbp-wiz-steps { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.mbp-ui .mbp-wiz-step { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--mbp-border, #ccc); background: var(--mbp-surface, #fff); }
.mbp-ui .mbp-wiz-step .mbp-wiz-num { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; border-radius: 50%; background: var(--mbp-green-050); font-weight: 700; }
.mbp-ui .mbp-wiz-step.is-current { border-color: var(--mbp-green); box-shadow: var(--mbp-ring); }
.mbp-ui .mbp-wiz-step.is-done { border-color: var(--mbp-green); }
.mbp-ui .mbp-wiz-step.is-done .mbp-wiz-num { color: var(--mbp-green); }
.mbp-ui .mbp-wiz-step.is-locked { opacity: 0.55; }

/* v1.99.78 : banniere « Configuration incomplete » (verrou cible etape 4). */
.mbp-ui .mbp-setup-banner, .mbp-body .mbp-setup-banner { margin: 8px 0; padding: 10px 14px; border-radius: 8px; border: 1px solid var(--mbp-red); background: var(--mbp-red-050); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ============================================================================
 * v1.99.83 : INFOBULLE MAISON CENTRALISÉE (mbpTip). UN SEUL style d'infobulle pour
 * tout le module (fini l'hétérogénéité blanche-large vs sombre-native). Positionnée
 * AU-DESSUS du déclencheur par le JS, largeur = contenu (capée). Ne cible que les
 * déclencheurs ICÔNE ([data-mbptip], .mbp-iconact[title]) — jamais les boutons libellés.
 * ============================================================================ */
.mbp-tip {
	position: fixed; z-index: 100000;
	max-width: 280px; width: max-content;
	background: var(--mbp-tip-bg); color: var(--mbp-tip-ink);
	border: 1px solid var(--mbp-tip-border);
	font-size: var(--mbp-fs-micro); line-height: 1.35;
	padding: 6px 9px; border-radius: 6px;
	box-shadow: var(--mbp-shadow);
	pointer-events: none; opacity: 0;
	transition: opacity .12s ease;
	white-space: normal; text-align: center;
}
.mbp-tip.is-on { opacity: 1; }
.mbp-tip.is-measuring { opacity: 0 !important; }
/* Petit picto d'aide « ⓘ » normalisé (remplace textwithpicto). */
.mbp-ui .mbp-tip-ico {
	color: var(--mbp-muted); cursor: help; margin-left: 5px;
	font-size: var(--mbp-fs-icon); vertical-align: middle; display: inline-flex;
}
.mbp-ui .mbp-tip-ico:hover, .mbp-ui .mbp-tip-ico:focus { color: var(--mbp-green); outline: none; }

/* ============================================================================
 * v1.99.152 — COUCHE « HYBRIDE SaaSFabric »
 * Reproduit le langage visuel SaaSFabric (pastille d'en-tête, cartes KPI, cartes à
 * en-tête, en-têtes de liste en capitales douces) sous le scope .mbp-ui. Accent =
 * thème (--mbp-green). Aucune taille en dur : tout via --mbp-fs-* / tokens de forme.
 * ============================================================================ */

/* --- En-tête de page : pastille-icône (accent thème) + titre + sous-titre ---- */
.mbp-ui .mbp-phead {
	display: flex; align-items: center; gap: 14px;
	margin: 6px 0 20px; flex-wrap: wrap;
}
.mbp-ui .mbp-phead .mbp-pico {
	width: 42px; height: 42px; flex: none;
	border-radius: var(--mbp-radius-pico);
	background: var(--mbp-green); color: var(--mbp-on-accent);
	display: flex; align-items: center; justify-content: center;
	box-shadow: var(--mbp-shadow-sm);
}
.mbp-ui .mbp-phead .mbp-pico .fas,
.mbp-ui .mbp-phead .mbp-pico .fa,
.mbp-ui .mbp-phead .mbp-pico img { font-size: var(--mbp-fs-h1); line-height: 1; }
.mbp-ui .mbp-phead .mbp-pico img { filter: brightness(0) invert(1); width: var(--mbp-fs-h1); height: var(--mbp-fs-h1); }
.mbp-ui .mbp-phead .mbp-phead-txt { display: flex; flex-direction: column; min-width: 0; }
.mbp-ui .mbp-phead .mbp-ptitle {
	font-size: var(--mbp-fs-h1); font-weight: 750; letter-spacing: -.2px;
	color: var(--mbp-ink); line-height: 1.15;
}
.mbp-ui .mbp-phead .mbp-psub { font-size: var(--mbp-fs-help); color: var(--mbp-muted); margin-top: 1px; }
.mbp-ui .mbp-phead .mbp-pactions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
/* v1.99.190 : pagination façon démo dans l'en-tête (mbp_list_toolbar) — une seule barre. */
.mbp-ui .mbp-pgnav { display: inline-flex; align-items: center; gap: 10px; font-size: var(--mbp-fs-help); color: var(--mbp-muted); }
.mbp-ui .mbp-pglimit { display: inline-flex; margin: 0; }
.mbp-ui .mbp-pglimit-sel { height: var(--mbp-ctl-h); border: 1px solid var(--mbp-line); border-radius: var(--mbp-radius-btn); background: var(--mbp-surface); color: var(--mbp-ink); padding: 0 6px; font-size: var(--mbp-fs-help); }
.mbp-ui .mbp-pgpages { display: inline-flex; align-items: center; gap: 6px; }
.mbp-ui .mbp-pgpages a, .mbp-ui .mbp-pgpages .mbp-pgdis { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: var(--mbp-ctl-h); border: 1px solid var(--mbp-line); border-radius: var(--mbp-radius-btn); text-decoration: none; color: var(--mbp-ink); }
.mbp-ui .mbp-pgpages a:hover { border-color: var(--mbp-green); color: var(--mbp-green); }
.mbp-ui .mbp-pgpages .mbp-pgdis { opacity: .4; }
.mbp-ui .mbp-pgpages b { color: var(--mbp-ink); font-variant-numeric: tabular-nums; }
.mbp-ui .mbp-pgpages .mbp-pgsep { opacity: .5; }

/* --- Grille + tuiles KPI (carte SaaSFabric : bordure, ombre douce, valeur tabulaire) - */
.mbp-ui .mbp-dbkpis,
.mbp-ui .mbp-kpis {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
	gap: 14px; margin: 4px 0 8px; align-items: stretch;
}
.mbp-ui .mbp-kpi {
	position: relative; overflow: hidden;
	background: var(--mbp-surface);
	border: 1px solid var(--mbp-line);
	border-radius: var(--mbp-radius-card);
	box-shadow: var(--mbp-hy-shadow);
	padding: 15px 16px; text-align: left; min-width: 0;
}
.mbp-ui .mbp-kpi::before {
	content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
	background: var(--mbp-green);
}
.mbp-ui .mbp-kpi.mbp-kpi-amber::before { background: var(--mbp-amber); }
.mbp-ui .mbp-kpi.mbp-kpi-red::before { background: var(--mbp-red); }
.mbp-ui .mbp-kpi.mbp-kpi-grey::before { background: var(--mbp-line-strong); }
.mbp-ui .mbp-kpi .mbp-kval {
	font-size: var(--mbp-fs-display); font-weight: 780; letter-spacing: -.4px;
	color: var(--mbp-ink); line-height: 1.1; font-variant-numeric: tabular-nums;
}
.mbp-ui .mbp-kpi .mbp-klbl {
	margin-top: 5px; font-size: var(--mbp-fs-micro); font-weight: 700;
	letter-spacing: .5px; text-transform: uppercase; color: var(--mbp-muted);
}

/* --- Carte à en-tête (façon .saasfab-card : barre de titre + corps) ----------- */
.mbp-ui .mbp-card-hy { padding: 0; overflow: hidden; }
.mbp-ui .mbp-card-hy .mbp-ch {
	display: flex; align-items: center; gap: 10px;
	padding: 13px 18px; border-bottom: 1px solid var(--mbp-line);
	background: var(--mbp-surface-2);
}
.mbp-ui .mbp-card-hy .mbp-ch h3 { margin: 0; font-size: var(--mbp-fs-section); font-weight: 700; color: var(--mbp-ink); }
.mbp-ui .mbp-card-hy .mbp-cb { padding: 16px 18px; }

/* --- En-têtes de liste en CAPITALES douces (signature SaaSFabric), sans toucher
 *     à la logique de colonnes existante : uniquement typo/fond de la ligne titre. -- */
/* Généralisé : ligne d'en-tête de liste en CASSE NORMALE (Maj+min) + GRAS, que les cellules
 * soient des <th> OU des <td> (certaines listes construites à la main utilisent des <td>).
 * Exclut les lignes de FILTRE (liste_titre_filter) qui portent des champs de saisie. */
.mbp-ui table.liste tr.liste_titre:not(.liste_titre_filter) > th,
.mbp-ui table.liste tr.liste_titre:not(.liste_titre_filter) > td {
	text-transform: none;
	font-weight: 700 !important; color: var(--mbp-ink);
	background: var(--mbp-surface-2);
}
/* v1.99.164 : les SELECT2 des lignes de filtre imposaient ~180-200px de min-content
 * chacun ; le layout natif (#id-container display:table) propage cette largeur → la table
 * élargit la PAGE au lieu de défiler dans .div-table-responsive (débordement à droite,
 * vu sur Contrats). On cape les select2 de filtre (ils restent utilisables, le panneau
 * déroulé garde sa largeur auto). Généralisé à toutes les listes. */
.mbp-ui tr.liste_titre_filter .select2-container {
	min-width: 0 !important;
	max-width: 150px !important;
}
/* v1.99.164 : PANNEAU DÉROULÉ des filtres — select2 l'ouvre d'abord à sa largeur auto
 * (souvent très large) puis le recale : flash visuel. On fixe une largeur stable et
 * lisible, indépendante du déclencheur capé à 130px. Généralisé (le panneau est attaché
 * au <body>, donc hors de la table). Le sélecteur de pagination garde sa propre règle
 * (.mbp-pglimit-drop, plus spécifique). */
body.mbp-ui .select2-dropdown:not(.mbp-pglimit-drop) {
	width: 240px !important;
	min-width: 180px !important;
	max-width: 240px !important;
}

/* v1.99.164 : LISTE DES CONTRATS en table-layout:fixed (classe possédée) — la min-content
 * des colonnes (noms, libellés de régime, selects de filtre) était propagée par le layout
 * natif (#id-container display:table) → la PAGE débordait à droite au lieu de laisser
 * .div-table-responsive défiler. En fixed, la table suit exactement 100% du conteneur ;
 * les contenus longs s'ellipsent. Largeurs posées par la ligne d'entête. */
.mbp-ui table.mbp-contracttable { table-layout: fixed; }
/* En fixed, la PREMIÈRE rangée fixe les colonnes — ici la ligne de FILTRES. On pose donc
 * les largeurs sur ses <td> (l'entête suit automatiquement). */
/* Colonnes (9) : 1 Réf, 2 Salarié, 3 Type, 4 Catégorie, 5 Base, 6 Régime,
 * 7 Début, 8 Fin, 9 État. */
.mbp-ui table.mbp-contracttable tr.liste_titre_filter > td { width: auto !important; }
.mbp-ui table.mbp-contracttable tr.liste_titre_filter > td:nth-child(1) { width: 10% !important; }
.mbp-ui table.mbp-contracttable tr.liste_titre_filter > td:nth-child(2) { width: 17% !important; }
.mbp-ui table.mbp-contracttable tr.liste_titre_filter > td:nth-child(4) { width: 8% !important; }
.mbp-ui table.mbp-contracttable tr.liste_titre_filter > td:nth-child(6) { width: 10% !important; }
.mbp-ui table.mbp-contracttable tr.liste_titre_filter > td:nth-child(7),
.mbp-ui table.mbp-contracttable tr.liste_titre_filter > td:nth-child(8) { width: 9% !important; }
.mbp-ui table.mbp-contracttable tr.liste_titre_filter > td:nth-child(9) { width: 11% !important; }
.mbp-ui table.mbp-contracttable > tbody > tr.oddeven > td {
	white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* Anti-chevauchement : un entête plus large que sa colonne se clippe au lieu de
 * déborder sur la colonne voisine. */
.mbp-ui table.mbp-contracttable tr.liste_titre:not(.liste_titre_filter) > th {
	overflow: hidden; text-overflow: ellipsis;
}

/* v1.99.162 : entêtes de colonnes numériques (right/center) sur UNE ligne — le libellé
 * (abrégé) définit la largeur de la colonne au lieu de se casser en 2 lignes ; les colonnes
 * texte (Réf/Mois) rendent alors l'espace qu'elles accaparaient. Généralisé aux listes. */
.mbp-ui table.liste tr.liste_titre:not(.liste_titre_filter) > th.right,
.mbp-ui table.liste tr.liste_titre:not(.liste_titre_filter) > th.center { white-space: nowrap; }
.mbp-ui table.liste tr.liste_titre th.right .wrapcolumntitle,
.mbp-ui table.liste tr.liste_titre th.center .wrapcolumntitle { white-space: nowrap; max-width: none; }

/* v1.99.162 : Périodes de paie — Réf/Mois accaparaient la largeur (251/164px pour un contenu
 * court). En table-layout auto, une largeur de cellule n'est qu'un minimum → Réf s'étirait.
 * On passe la table en `fixed` : Réf/Mois sont capés, l'espace restant se répartit ÉGALEMENT
 * entre les colonnes numériques (montants), qui respirent. La 1re rangée (entête) fixe les
 * largeurs ; la rangée de groupe (colspan) suit sans souci. */
.mbp-ui table.mbp-periodtable { table-layout: fixed; }
/* Reset du `width:1%` générique (sinon les colonnes numériques sont écrasées en fixed) : toutes
 * en auto, puis Réf/Mois capés → le reste se partage également entre les colonnes de montants. */
.mbp-ui table.mbp-periodtable tr.liste_titre:not(.mbp-periodhead) > th { width: auto !important; }
.mbp-ui table.mbp-periodtable tr.liste_titre:not(.mbp-periodhead) > th:nth-child(1) { width: 150px !important; }
.mbp-ui table.mbp-periodtable tr.liste_titre:not(.mbp-periodhead) > th:nth-child(2) { width: 96px !important; }
.mbp-ui table.mbp-periodtable tr.oddeven > td:nth-child(1),
.mbp-ui table.mbp-periodtable tr.oddeven > td:nth-child(2) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* v1.99.168 : COLONNE « LARGE » possédée (libellés longs légitimes : institution bancaire,
 * obligation légale…). Absorbe l'espace disponible (width auto contre les 1%/contenu des
 * colonnes voisines courtes) et reste sur UNE ligne. Choix user : « colonne élargie »
 * plutôt qu'ellipsis. */
.mbp-ui table.liste th.mbp-col-wide,
.mbp-ui table.liste td.mbp-col-wide { width: auto !important; min-width: 260px; white-space: nowrap; }

/* --- Barre d'actions possédée (mbp_actions_open) : alignement/espacement uniformes --- */
.mbp-ui .mbp-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
/* v1.99.198 : ALIGNEMENT des barres d'actions — les <form> internes s'alignent en ligne
 * centrée, et tout champ (input/select) y prend la HAUTEUR DE CONTRÔLE + le rayon des
 * boutons, pour être parfaitement aligné avec les boutons de la charte (fini le décalage
 * vertical des inputs bruts type « Motif d'annulation »). */
.mbp-ui .mbp-actions > form { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
/* Reset des marges parasites (ex. margin-bottom natif de .tabsAction a) qui décalent
 * verticalement les boutons dans une barre flex-center : l'espacement vient du gap.
 * !important assumé : neutralise une règle native plus spécifique sur les <a>. */
.mbp-ui .mbp-actions .mbp-btn,
.mbp-ui .mbp-modal-foot .mbp-btn { margin: 0 !important; }
.mbp-ui .mbp-actions input[type="text"],
.mbp-ui .mbp-actions input[type="search"],
.mbp-ui .mbp-actions input[type="number"],
.mbp-ui .mbp-actions select {
	height: var(--mbp-ctl-h); box-sizing: border-box; vertical-align: middle;
	border: 1px solid var(--mbp-line); border-radius: var(--mbp-radius-btn); padding: 0 10px;
	background: var(--mbp-surface); color: var(--mbp-ink);
}
/* v1.99.171 : BARRE D'ACTIONS D'EN-TÊTE (créer/+ Nouveau…) toujours À DROITE — généralisé
 * (demande user : les « + » de Sites, Terminaux, Types de contrat, Rubriques… étaient à gauche,
 * les autres pages à droite). Cible la barre qui suit directement l'en-tête de page ou son
 * sous-titre ; les barres de formulaire/pied (Enregistrer/Annuler) ne sont pas concernées. */
/* (les 3 anciens sélecteurs positionnels « barre qui suit l'en-tête » sont RETIRÉS : ils
 * poussaient aussi à droite les barres de FILTRE (ex. Employé/Mois des feuilles de présence).
 * Seules les barres de CRÉATION ci-dessous sont concernées.) */
/* …et toute barre d'actions « de création » (picto + / bouton Nouveau) placée au-dessus d'une
 * liste (barre suivie d'une table ou de son conteneur), quel que soit ce qui la précède
 * (bloc info, titre de section…) — ex. Profils de paie. */
.mbp-ui .mbp-actions:has(> .mbp-iconact .fa-plus-circle):has(+ .div-table-responsive, + .div-table-responsive-no-min, + table, + .border, + .mbp-card, + .titre + .div-table-responsive, + .titre + table),
.mbp-ui .mbp-actions:has(> a.butAction[href*="action=create"]):has(+ .div-table-responsive, + .div-table-responsive-no-min, + table, + .border, + .mbp-card, + .titre + .div-table-responsive, + .titre + table) { justify-content: flex-end; }
.mbp-ui .mbp-actions-tight { margin: 2px 0 16px; }

/* v1.99.165 : ligne de contexte du dashboard (« MboaPaie · exercice N ») en rangée flex —
 * contexte à gauche, ACTIONS RAPIDES poussées à l'extrême droite (demande user). */
.mbp-ui .mbp-dbctxrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mbp-ui .mbp-dbctxrow .mbp-dbcontext { margin: 0; }
.mbp-ui .mbp-dbctx-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* --- Couche utilitaire (v1.99.157) : remplace les styles inline de LAYOUT par des classes
 *     possédées + passe-plat de variable CSS (style="--mbp-*:…", autorisé par le contrat).
 *     Valeurs EXACTES préservées (aucune approximation d'échelle). --------------------- */
.mbp-ui .mbp-mt { margin-top: var(--mbp-mt); }
.mbp-ui .mbp-mb { margin-bottom: var(--mbp-mb); }
.mbp-ui .mbp-ml { margin-left: var(--mbp-ml); }
.mbp-ui .mbp-mr { margin-right: var(--mbp-mr); }
.mbp-ui .mbp-m  { margin: var(--mbp-m); }
.mbp-ui .mbp-p  { padding: var(--mbp-p); }
.mbp-ui .mbp-w  { width: var(--mbp-w); }
.mbp-ui .mbp-maxw { max-width: var(--mbp-maxw); }
.mbp-ui .mbp-minw { min-width: var(--mbp-minw); }
.mbp-ui .mbp-inline { display: inline; }
.mbp-ui .mbp-inline-block { display: inline-block; }
.mbp-ui .mbp-nowrap { white-space: nowrap; }

/* --- Bouton « Copier » (mbp_copy_btn) : feedback vert bref au clic --------------- */
.mbp-ui .mbp-copybtn { transition: color .15s ease; }
/* Picto d'action DESTRUCTIVE (rejeter/supprimer) : rouge de charte, comme img_delete. */
.mbp-ui .mbp-iconact[data-mbp-danger] .fas { color: var(--mbp-red); }
.mbp-ui .mbp-copybtn.mbp-copied { color: var(--mbp-success); }

/* v1.99.169 : CALENDRIER DES ABSENCES — 31 colonnes jour + badges pill (~44px chacun) faisaient
 * déborder la page. Table possédée `mbp-leavecal` en layout fixe : colonne Salarié bornée, jours
 * compacts, pastille RONDE (statut) au lieu du pill texte, week-end grisé (fini le style inline). */
.mbp-ui table.mbp-leavecal { table-layout: fixed; }
.mbp-ui table.mbp-leavecal tr.liste_titre > th:first-child,
.mbp-ui table.mbp-leavecal tr.oddeven > td:first-child { width: 170px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mbp-ui table.mbp-leavecal .mbp-cal-day { padding: 4px 2px !important; text-align: center; width: auto !important; }
.mbp-ui table.mbp-leavecal .mbp-cal-we { background: var(--mbp-surface-alt); }
.mbp-ui table.mbp-leavecal .mbp-cal-dot {
	display: inline-block; width: 12px; height: 12px; border-radius: 50%; vertical-align: middle;
	background: var(--mbp-muted);
}
.mbp-ui table.mbp-leavecal .mbp-cal-dot.badge-status4 { background: var(--mbp-success); }
.mbp-ui table.mbp-leavecal .mbp-cal-dot.badge-status3 { background: var(--mbp-info); }
.mbp-ui table.mbp-leavecal .mbp-cal-dot.badge-status1 { background: var(--mbp-amber); }
.mbp-ui .mbp-leavecal-legend .mbp-cal-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; vertical-align: middle; margin-right: 4px; background: var(--mbp-muted); }
.mbp-ui .mbp-leavecal-legend .mbp-cal-dot.badge-status4 { background: var(--mbp-success); }
.mbp-ui .mbp-leavecal-legend .mbp-cal-dot.badge-status3 { background: var(--mbp-info); }
.mbp-ui .mbp-leavecal-legend .mbp-cal-dot.badge-status1 { background: var(--mbp-amber); }
/* v1.99.169 : colonne « Nb jrs » (Congés) — juste la place de son entête, pas plus. */
.mbp-ui table.liste tr.liste_titre th.mbp-col-nbdays { min-width: 58px; white-space: nowrap; }

/* v1.99.174 : DOUBLE LISTE « Disponibles ⇄ Membres » (Équipes). Hauteur FIXE + défilement
 * interne : n'empiète jamais sur les lignes voisines (fini les tags select2 qui débordaient). */
.mbp-ui .mbp-dl { display: flex; align-items: stretch; gap: 10px; margin: 10px 0 4px; }
.mbp-ui .mbp-dl-col { flex: 1 1 0; min-width: 0; border: 1px solid var(--mbp-line); border-radius: var(--mbp-radius-card); background: var(--mbp-surface); display: flex; flex-direction: column; }
.mbp-ui .mbp-dl-head { padding: 8px 10px; border-bottom: 1px solid var(--mbp-line); background: var(--mbp-surface-2); display: flex; align-items: center; gap: 6px; }
.mbp-ui .mbp-dl-count { font-size: var(--mbp-fs-micro); font-weight: 700; padding: 1px 8px; border-radius: var(--mbp-radius-pill); background: var(--mbp-green-050); color: var(--mbp-ink); }
/* Barre d'outils : UNE hauteur de contrôle (--mbp-ctl-h) pour le select2 ET la recherche,
 * même rayon/bordure (champs de charte), recherche étirée, espacement régulier. */
.mbp-ui .mbp-dl-tools { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--mbp-line-soft); background: var(--mbp-surface); }
.mbp-ui .mbp-dl-tools .mbp-dl-search {
	flex: 1 1 auto; min-width: 0; box-sizing: border-box;
	height: var(--mbp-ctl-h) !important; line-height: var(--mbp-ctl-lh) !important;
	padding: 0 10px !important; margin: 0 !important;
	border: 1px solid var(--mbp-field-border) !important; border-radius: var(--mbp-field-radius) !important;
	font-size: var(--mbp-fs-body) !important; background: var(--mbp-surface);
}
.mbp-ui .mbp-dl-tools .mbp-dl-search::placeholder { color: var(--mbp-muted-soft); }
/* Hauteur = EXACTEMENT 5 lignes visibles (5 × hauteur de ligne + padding), le reste au défilement. */
.mbp-ui .mbp-dl-list { list-style: none; margin: 0; padding: 4px 0; height: calc(5 * var(--mbp-dl-row, 30.6px) + 8px); overflow-y: auto; }
.mbp-ui .mbp-dl-list li { min-height: var(--mbp-dl-row, 30.6px); box-sizing: border-box; }
.mbp-ui .mbp-dl-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 10px; cursor: pointer; user-select: none; }
.mbp-ui .mbp-dl-list li:hover { background: var(--mbp-surface-2); }
.mbp-ui .mbp-dl-list li.mbp-dl-sel { background: var(--mbp-green-050); box-shadow: inset 3px 0 0 var(--mbp-green); }
.mbp-ui .mbp-dl-list .mbp-dl-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mbp-ui .mbp-dl-list .mbp-dl-site { font-size: var(--mbp-fs-micro); color: var(--mbp-muted); white-space: nowrap; }
.mbp-ui .mbp-dl-mid { display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.mbp-ui .mbp-dl-mid .mbp-dl-btn { min-width: 0 !important; padding: 0 10px !important; }
.mbp-ui .mbp-dl-tools .select2-container { flex: 0 0 auto; width: 170px !important; max-width: 170px !important; min-width: 0 !important; height: var(--mbp-ctl-h) !important; }
.mbp-ui .mbp-dl-tools .select2-container .select2-selection--single { height: var(--mbp-ctl-h) !important; border: 1px solid var(--mbp-field-border) !important; border-radius: var(--mbp-field-radius) !important; }
.mbp-ui .mbp-dl-tools .select2-container .select2-selection__rendered { line-height: var(--mbp-ctl-lh) !important; padding-left: 10px !important; }
.mbp-ui .mbp-dl-tools .select2-container .select2-selection__arrow { height: var(--mbp-ctl-h) !important; }

/* ============================================================================
 * v1.99.178 — MODALE DE SAISIE (patron medu-eschol / SaaSFabric, démo validée).
 * Voile + carte centrée + en-tête à pastille + corps défilant + pied à droite.
 * Rendue côté serveur (ouverte quand la page l'imprime). Tokens de charte.
 * ============================================================================ */
.mbp-ui .mbp-modal-veil {
	position: fixed; inset: 0; z-index: 1200;
	background: color-mix(in srgb, var(--colorblack) 45%, transparent);
	display: flex; align-items: center; justify-content: center; padding: 20px;
}
/* v1.99.193 : les dropdowns select2 sont ajoutés au <body> (hors modale) : leur z-index
 * natif passe SOUS le voile (1200) → ils s'affichaient derrière la modale. On les remonte
 * au-dessus. S'applique au conteneur ouvert ET au panneau de résultats. */
.select2-container--open { z-index: 1300 !important; }
.select2-container--open .select2-dropdown,
body .select2-container.select2-container--open { z-index: 1300 !important; }
.mbp-ui .mbp-modal {
	width: 560px; max-width: 100%; max-height: 90vh; display: flex; flex-direction: column;
	background: var(--mbp-surface); border-radius: 14px;
	box-shadow: 0 12px 48px color-mix(in srgb, var(--colorblack) 30%, transparent);
	overflow: hidden; animation: mbpModalPop .18s ease;
}
/* v1.99.194 : TAILLES adaptées au contenu (largeur ; la hauteur reste ajustée au contenu,
 * corps défilant sous max-height:90vh). max-width:100% garde le responsive mobile. */
.mbp-ui .mbp-modal--sm { width: 440px; }
.mbp-ui .mbp-modal--md { width: 560px; }
.mbp-ui .mbp-modal--lg { width: 720px; }
.mbp-ui .mbp-modal--xl { width: 980px; }
/* « full » : gros formulaires DEUX COLONNES (salarié, contrat) — largeur maximale utile. */
.mbp-ui .mbp-modal--full { width: min(1180px, 96vw); }
@keyframes mbpModalPop { from { transform: translateY(10px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .mbp-ui .mbp-modal { animation: none; } }
.mbp-ui .mbp-modal-head {
	display: flex; align-items: center; gap: 11px; padding: 14px 18px;
	border-bottom: 1px solid var(--mbp-line); flex: none;
}
.mbp-ui .mbp-modal-head .mbp-pico {
	width: var(--mbp-pico-sm); height: var(--mbp-pico-sm); flex: none; border-radius: var(--mbp-radius-card);
	background: var(--mbp-green); color: var(--mbp-on-accent);
	display: inline-flex; align-items: center; justify-content: center;
}
.mbp-ui .mbp-modal-head .mbp-pico .fas { font-size: var(--mbp-fs-icon); }
.mbp-ui .mbp-modal-head h3 { margin: 0; font-size: var(--mbp-fs-section); font-weight: 700; color: var(--mbp-ink); }
.mbp-ui .mbp-modal-x {
	margin-left: auto; font-size: var(--mbp-fs-h1); line-height: 1; color: var(--mbp-muted-soft);
	text-decoration: none !important; padding: 2px 6px;
}
.mbp-ui .mbp-modal-x:hover { color: var(--mbp-ink); }
.mbp-ui .mbp-modal-body { padding: 16px 18px; overflow-y: auto; overflow-x: hidden; }
/* SAISIE EMPILÉE (démo validée) : markup dédié mbp_modal_field() — libellé petit et
   gris ALIGNÉ À GAUCHE au-dessus, champ pleine largeur en dessous. Rangées espacées. */
.mbp-ui .mbp-frow { display: flex; flex-direction: column; gap: 5px; margin: 0 0 12px; text-align: left; }
.mbp-ui .mbp-modal-body > form > .mbp-frow:last-of-type,
.mbp-ui .mbp-f2 .mbp-frow { margin-bottom: 0; }
.mbp-ui .mbp-frow > label {
	font-size: var(--mbp-fs-micro); font-weight: 600; color: var(--mbp-muted); text-align: left;
}
.mbp-ui .mbp-frow-req { color: var(--mbp-danger-strong); }
.mbp-ui .mbp-frow-help { font-size: var(--mbp-fs-micro); color: var(--mbp-muted-soft); }
.mbp-ui .mbp-frow-field { min-width: 0; }
/* Champs pleine largeur dans la rangée ; les largeurs mini natives ne priment plus. */
.mbp-ui .mbp-frow-field input[type="text"],
.mbp-ui .mbp-frow-field input[type="email"],
.mbp-ui .mbp-frow-field input[type="password"],
.mbp-ui .mbp-frow-field input[type="date"],
.mbp-ui .mbp-frow-field input[type="datetime-local"],
.mbp-ui .mbp-frow-field textarea,
.mbp-ui .mbp-frow-field select,
.mbp-ui .mbp-frow-field .select2-container {
	width: 100% !important; min-width: 0; max-width: 100%; box-sizing: border-box;
}
/* Numériques courts (rayon, rang…) : largeur contenue pour garder l'unité en ligne. */
.mbp-ui .mbp-frow-field input[type="number"] { min-width: 0; max-width: 100%; box-sizing: border-box; }
/* Deux rangées côte à côte (démo .f2). */
.mbp-ui .mbp-f2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 0 12px; }
/* Cases à cocher : la rangée reste compacte, libellé inline possible dans le champ. */
.mbp-ui .mbp-frow-field label { font-size: var(--mbp-fs-body); color: var(--mbp-ink); }
/* Garde-fou : AUCUN contrôle ne déborde du corps de la modale (sections annexes incluses). */
.mbp-ui .mbp-modal-body input,
.mbp-ui .mbp-modal-body select,
.mbp-ui .mbp-modal-body textarea,
.mbp-ui .mbp-modal-body .select2-container { max-width: 100%; box-sizing: border-box; }
/* v1.99.195 : GROS FORMULAIRES DEUX COLONNES en modale (salarié/contrat : fichehalfleft/right
 * + tables mbp-empform/mbp-cform). On garde les 2 colonnes mais on rend les champs FLUIDES
 * (les largeurs fixes minwidthXXX ne débordent plus) et chaque colonne à 50 %. */
.mbp-ui .mbp-modal-body .fichecenter { display: flex; flex-wrap: wrap; gap: 0; }
.mbp-ui .mbp-modal-body .fichehalfleft,
.mbp-ui .mbp-modal-body .fichehalfright { width: 50%; float: none; box-sizing: border-box; padding: 0 10px; }
.mbp-ui .mbp-modal-body .fichehalfleft table,
.mbp-ui .mbp-modal-body .fichehalfright table { width: 100%; }
.mbp-ui .mbp-modal-body .fichehalfleft input[type="text"],
.mbp-ui .mbp-modal-body .fichehalfright input[type="text"],
.mbp-ui .mbp-modal-body .fichehalfleft input[type="date"],
.mbp-ui .mbp-modal-body .fichehalfright input[type="date"],
.mbp-ui .mbp-modal-body .fichehalfleft textarea,
.mbp-ui .mbp-modal-body .fichehalfright textarea,
.mbp-ui .mbp-modal-body .fichehalfleft select,
.mbp-ui .mbp-modal-body .fichehalfright select,
.mbp-ui .mbp-modal-body .fichehalfleft .select2-container,
.mbp-ui .mbp-modal-body .fichehalfright .select2-container {
	width: 100% !important; min-width: 0 !important; max-width: 100%; box-sizing: border-box;
}
@media (max-width: 720px) {
	.mbp-ui .mbp-modal-body .fichehalfleft,
	.mbp-ui .mbp-modal-body .fichehalfright { width: 100%; }
}
.mbp-ui .mbp-modal-foot {
	display: flex; justify-content: flex-end; align-items: center; gap: 8px;
	padding: 12px 18px; border-top: 1px solid var(--mbp-line); background: var(--mbp-surface-2);
	margin: 12px -18px -14px; /* colle le pied aux bords du corps */
}

/* ==========================================================================
 * v1.99.232 — ALIGNEMENTS HORIZONTAUX du menu gauche (spec proprio mesurée).
 * UNIQUEMENT l'alignement (pas de couleur / accordéon / gras). Scoppé body.mbp-body.
 * Cible : icône catégorie à ~8px du bord ; texte catégorie après l'icône ;
 * « → » du sous-menu en absolu à 10px (≈18px du bord) ; texte sous-menu à 26px (≈34px du bord) ;
 * liens sous-menu au MÊME bord que la catégorie (0 indent — c'est le padding qui décale le texte).
 * ========================================================================== */
/* PRÉREQUIS : eldy imprime un <br> après CHAQUE entrée -> son interligne écrase toute marge
 * custom. On le neutralise (sinon l'alignement/rythme ci-dessous n'a aucun effet visible). */
body.mbp-body .vmenu br,
body.mbp-body .menu_titre br,
body.mbp-body .menu_contenu br { display: none; }
/* Catégorie : lien sans padding-left -> l'icône démarre au bord (~8px via le conteneur). */
body.mbp-body .menu_titre a.vmenu,
body.mbp-body .menu_titre span.vmenu,
body.mbp-body .menu_titre span.vmenudisabled { padding-left: 0; }
/* Sous-menu : lien au même bord (0 indent), « → » absolu à 10px, texte décalé de 26px. */
body.mbp-body .menu_contenu { margin-left: 0; padding-left: 0; }
body.mbp-body .menu_contenu a.vsmenu,
body.mbp-body .menu_contenu span.vsmenudisabled {
	position: relative;
	display: block;
	margin-left: 0;
	padding-left: 26px;   /* texte du sous-menu ≈ 34px du bord */
}
body.mbp-body .menu_contenu a.vsmenu::before,
body.mbp-body .menu_contenu span.vsmenudisabled::before {
	content: "\2192";     /* → */
	position: absolute;
	left: 10px;           /* ≈ 18px du bord */
	color: var(--mbp-muted);
}
/* v1.99.233 — RYTHME VERTICAL du menu (spec proprio). L'"espace vide" = marges.
 * Ligne de texte ~16px ; gaps : avant catégorie 22px, catégorie→sous-menu 13px, entre sous-menus 11px. */
body.mbp-body .menu_titre { margin: 0; }
body.mbp-body .menu_titre a.vmenu,
body.mbp-body .menu_titre span.vmenu,
body.mbp-body .menu_titre span.vmenudisabled {
	display: block; line-height: 16px; padding-top: 0; padding-bottom: 0; margin-top: 4px; /* v1.99.234 : aligné MEDUERP — entre catégories ≈ 40px (au lieu de 58) */
}
body.mbp-body .menu_contenu {
	margin-top: 9px;             /* entre sous-menus (top→top ≈ 27px) — aligné MEDUERP */
	margin-bottom: 0; padding-top: 0; padding-bottom: 0;
}
body.mbp-body .menu_titre + .menu_contenu { margin-top: 10px; }   /* 1er sous-menu sous la catégorie (≈ 29px) — aligné MEDUERP */
body.mbp-body .menu_contenu a.vsmenu,
body.mbp-body .menu_contenu span.vsmenudisabled { line-height: 16px; padding-top: 0; padding-bottom: 0; }


/* v1.99.234 — Accordéon menu (calqué MEDUERP) : chevron JUSTE APRÈS le texte + panneau plein */
body.mbp-body .menu_titre a.vmenu.mbp-acc { cursor: pointer; }
/* chevron INLINE juste après le texte (identique au rendu MEDUERP), pas au bord droit */
body.mbp-body .menu_titre a.vmenu.mbp-acc::after {
	/* Conformité UI MboaPaie : pas de police imposée (chevron Unicode hérite la police),
	 * taille via token --mbp-fs-* (le garde-fou typo interdit font-family imposée + px en dur). */
	content: "\203A"; font-weight: 900;
	display: inline-block; margin-left: 8px; vertical-align: baseline;
	color: var(--mbp-muted); font-size: var(--mbp-fs-micro); transition: transform .15s;
}
body.mbp-body .menu_titre a.vmenu.mbp-acc.mbp-acc-open::after { transform: rotate(90deg); }
/* Le panneau du menu descend jusqu'en bas (l'accordéon raccourcit la liste). */
body.mbp-body div.vmenu { min-height: calc(100vh - 60px); }

/* v1.99.248 : grille « trame par jour » de l'application groupée de planning. */
.mbp-week-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.mbp-week-col { min-width: 110px; }
