/* © 2026 INFONEXIS. Tous droits réservés. Logiciel propriétaire : voir le fichier LICENSE. */
/**
 * Mise en page nex-wss : en-tête, menu latéral, contenu, page de connexion.
 * Écrit pour nex-wss sur Bootstrap 5.3 (aucun code de gabarit tiers). Couleurs : nex-colors.css ;
 * les thèmes (nex-themes.css) ne font que redéfinir les variables ci-dessous.
 */

:root {
	--nex-header-h: 56px;
	--nex-header-bg: var(--nex-inverse);          /* en-tête : toujours inverse, quel que soit le thème */
	--nex-sidebar-w: 245px;
	--nex-panneau-w: 17rem;                       /* 2e barre latérale (sous-menu du groupe) */
	--nex-panneau-decal: 0px;                     /* largeur dont elle décale le contenu : fixée et ouverte */
	--nex-sidebar-mini-w: 60px;

	/* menu latéral (thème classique : sombre) */
	--nex-sidebar-bg: #20252a;
	--nex-sidebar-color: rgba(255, 255, 255, .62);
	--nex-sidebar-hover-color: #fff;
	--nex-sidebar-hover-bg: rgba(255, 255, 255, .06);
	--nex-sidebar-active-color: #fff;
	--nex-sidebar-active-bg: color-mix(in srgb, var(--nex-primary) 22%, transparent);
	--nex-sidebar-header-color: rgba(255, 255, 255, .38);
	--nex-sidebar-border: rgba(255, 255, 255, .08);
	--nex-sidebar-shadow: none;
	--nex-sidebar-gap: 0px;                       /* menu flottant (Lumen) : marge autour du menu */
	--nex-sidebar-radius: 0;
	--nex-menu-radius: var(--bs-border-radius);
	--nex-menu-marker: var(--nex-primary);        /* barre à gauche de l'élément actif (transparent : aucune) */
	--nex-scroll-thumb: color-mix(in srgb, var(--nex-primary) 70%, transparent);   /* barres de défilement : couleur du thème */

	/* contenu et cartes */
	--nex-content-bg: #eef0f2;
	--nex-card-bg: var(--bs-body-bg);
	--nex-card-border: var(--bs-border-color-translucent);
	--nex-card-shadow: 0 1px 2px rgba(0, 0, 0, .06);
	--nex-backdrop: none;                         /* flou d'arrière-plan des cartes et du menu (transparent, apple) */
	--nex-card-isolation: auto;                   /* isolate avec un flou (--nex-backdrop) : voir .card::before */

	--nex-transition: .2s ease;
}
[data-bs-theme=dark] {
	--nex-content-bg: var(--bs-body-bg);
	--nex-card-bg: var(--bs-tertiary-bg);
	--nex-card-shadow: none;
}

html, body { height: 100%; }
body { background: var(--nex-content-bg); }

/* ---------------------------------------------------------------- Typographie : 12 px de base (comme WSS v5) */
:root {
	--bs-body-font-size: .75rem;
	--nex-font-xs: .625rem;
	--nex-font-sm: .6875rem;
	--nex-font-lg: .875rem;
	--nex-font-xl: 1rem;
}
h1, .h1 { font-size: 1.5rem; }
h2, .h2 { font-size: 1.25rem; }
h3, .h3 { font-size: 1.125rem; }
h4, .h4 { font-size: 1rem; }
h5, .h5 { font-size: .875rem; }
h6, .h6 { font-size: .8125rem; }
.lead { font-size: .9375rem; }
small, .small { font-size: .875em; }
.btn { --bs-btn-font-size: .75rem; --bs-btn-padding-y: .375rem; --bs-btn-padding-x: .75rem; }
.btn-sm, .btn-group-sm > .btn { --bs-btn-font-size: var(--nex-font-sm); --bs-btn-padding-y: .25rem; --bs-btn-padding-x: .5rem; }
.btn-lg, .btn-group-lg > .btn { --bs-btn-font-size: var(--nex-font-lg); --bs-btn-padding-y: .5rem; --bs-btn-padding-x: 1rem; }
.btn-xs, .btn-group-xs > .btn { --bs-btn-font-size: .625rem; --bs-btn-padding-y: .125rem; --bs-btn-padding-x: .375rem; --bs-btn-border-radius: var(--bs-border-radius-sm); }
.btn-xl, .btn-group-xl > .btn { --bs-btn-font-size: 1rem; --bs-btn-padding-y: .75rem; --bs-btn-padding-x: 1.5rem; --bs-btn-border-radius: var(--bs-border-radius-lg); }
/* bouton icône seule : carré de la hauteur d'un bouton texte de même taille (xs à xl) */
.btn-icon {
	--nex-btn-cote: calc(var(--bs-btn-font-size) * var(--bs-btn-line-height) + var(--bs-btn-padding-y) * 2 + var(--bs-btn-border-width) * 2);
	display: inline-flex; align-items: center; justify-content: center; padding: 0;
	width: var(--nex-btn-cote); height: var(--nex-btn-cote);
}
/* rond (avec btn-icon) ou pilule (bouton texte) */
.btn-circle { --bs-btn-border-radius: 50rem; }
/* badges : par défaut 87,5 % du texte qui l'entoure (10,5 px, grandit dans un titre) ; tailles fixes sm à xl */
.badge { --bs-badge-font-size: .875em; }
.badge-sm { --bs-badge-font-size: .5625rem; --bs-badge-padding-y: .25em; --bs-badge-padding-x: .5em; }
.badge-lg { --bs-badge-font-size: .8125rem; --bs-badge-padding-y: .4em; --bs-badge-padding-x: .75em; }
.badge-xl { --bs-badge-font-size: 1rem; --bs-badge-padding-y: .45em; --bs-badge-padding-x: .85em; }
.form-control, .form-select, .input-group-text { font-size: .75rem; }
.form-control-sm, .form-select-sm, .input-group-sm > .form-control, .input-group-sm > .form-select, .input-group-sm > .input-group-text { font-size: var(--nex-font-sm); }
.form-control-lg, .form-select-lg, .input-group-lg > .form-control, .input-group-lg > .form-select, .input-group-lg > .input-group-text { font-size: var(--nex-font-lg); }
.dropdown-menu { --bs-dropdown-font-size: .75rem; }
.pagination { --bs-pagination-font-size: .75rem; }
.pagination-sm { --bs-pagination-font-size: var(--nex-font-sm); }
.pagination-lg { --bs-pagination-font-size: var(--nex-font-lg); }
.popover { --bs-popover-font-size: .75rem; --bs-popover-header-font-size: .8125rem; }
.tooltip { --bs-tooltip-font-size: var(--nex-font-sm); }
.nav { --bs-nav-link-font-size: .75rem; }
.navbar { --bs-navbar-brand-font-size: 1rem; }
.toast { --bs-toast-font-size: .75rem; }
.modal-title { font-size: .9375rem; }

/* cartes : même apparence dans tous les composants (card, panel) */
.card { --bs-card-bg: var(--nex-card-bg); --bs-card-border-color: var(--nex-card-border); box-shadow: var(--nex-card-shadow); isolation: var(--nex-card-isolation); }
/* flou d'arrière-plan (Cristal, Horizon) porté par un pseudo-élément sous le contenu : un backdrop-filter sur la carte
   elle-même ferait d'elle le repère des éléments position: fixed qu'elle contient (menu des actions d'une ligne de tableau,
   strategy fixed), qui s'afficheraient décalés. isolation garde le pseudo-élément au-dessus du fond de la page. */
.card::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; backdrop-filter: var(--nex-backdrop); pointer-events: none; }
/*
 * En-tête de carte : par défaut dans la couleur choisie par l'utilisateur (primary, dégradé si la préférence est active) ;
 * bg-{couleur} sur un bloc impose sa couleur ; nex-entete-neutre garde un en-tête sans couleur (fond de la carte).
 * --nex-entete-assombri : part de noir mêlée aux en-têtes et pieds colorés (0 % ; 20 % en mode sombre et pour NeX Origine,
 * soit la nuance 600), appliquée aussi aux bg-{couleur} des en-têtes (nex-colors.css).
 */
:root { --nex-entete-assombri: 0%; }
[data-bs-theme=dark] { --nex-entete-assombri: 20%; }   /* en sombre, en-têtes colorés un ton plus foncés */
/* en sombre, texte toujours blanc sur les en-têtes et pieds colorés (boutons translucides et icônes compris), sauf fonds clairs */
[data-bs-theme=dark] .card > :is(.card-header, .card-footer):is([class*=" bg-"], .card-header:not([class*="bg-"]):not(.nex-entete-neutre)):not(.bg-white, .bg-light, .bg-body, .bg-transparent, .bg-body-secondary, .bg-body-tertiary, [class*="bg-opacity"]) {
	--nex-primary-contrast: #fff; --bs-card-cap-color: #fff; color: #fff;
}
.card > .card-header:not([class*="bg-"]):not(.nex-entete-neutre) {
	--bs-card-cap-color: var(--nex-primary-contrast); color: var(--nex-primary-contrast); border-color: transparent;
	background-color: color-mix(in srgb, var(--nex-primary) calc(100% - var(--nex-entete-assombri)), #000);
}
[data-nex-degrade] .card > .card-header:not([class*="bg-"]):not(.nex-entete-neutre) { background-image: var(--nex-degrade); }
/* bouton principal posé sur l'en-tête de la même couleur : translucide (sinon invisible) */
.card > .card-header:not([class*="bg-"]):not(.nex-entete-neutre) .btn-primary, .card > .card-header.bg-primary .btn-primary {
	--bs-btn-color: var(--nex-primary-contrast); --bs-btn-bg: color-mix(in srgb, var(--nex-primary-contrast) 18%, transparent); --bs-btn-border-color: transparent;
	--bs-btn-hover-color: var(--nex-primary-contrast); --bs-btn-hover-bg: color-mix(in srgb, var(--nex-primary-contrast) 28%, transparent); --bs-btn-hover-border-color: transparent;
	--bs-btn-active-bg: color-mix(in srgb, var(--nex-primary-contrast) 34%, transparent); background-image: none;
}
/* en-tête ou pied coloré : recouvre la bordure de la carte (sinon liseré clair autour de la couleur) */
.card > .card-header:is([class*=" bg-"], :not([class*="bg-"]):not(.nex-entete-neutre)) {
	margin: calc(-1 * var(--bs-card-border-width)) calc(-1 * var(--bs-card-border-width)) 0;
	border-radius: var(--bs-card-border-radius) var(--bs-card-border-radius) 0 0;
}
.card > .card-footer[class*=" bg-"] {
	margin: 0 calc(-1 * var(--bs-card-border-width)) calc(-1 * var(--bs-card-border-width));
	border-radius: 0 0 var(--bs-card-border-radius) var(--bs-card-border-radius);
}
/*
 * En-tête de carte : titre à gauche, actions à droite (boutons, btn-icon btn-circle, formulaire) sans gêner le titre.
 *   <div class="card-header [bg-success | nex-entete-neutre]">
 *     <div class="nex-card-titre"><i class="fa-solid fa-users"></i>Titre <small>complément</small></div>
 *     <div class="nex-card-actions">...</div>
 *   </div>
 * Titre trop long : coupé avec « … » ; les petits boutons n'augmentent pas la hauteur de l'en-tête.
 */
.card-header:has(> .nex-card-titre, > .nex-card-actions) { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; min-height: 2.75rem; }
.nex-card-titre { flex: 1 1 0; min-width: 6rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }   /* base 0 : le titre prend la place restante, les actions ne passent à la ligne que si elles manquent de place */
.nex-card-titre > i { margin-right: .5rem; }
.nex-card-titre small { margin-left: .35rem; font-weight: 400; opacity: .7; }
.nex-card-actions { flex: 0 1 auto; min-width: 0; display: flex; align-items: center; gap: .375rem; margin: -.375rem 0 -.375rem auto; }
.nex-card-actions > * { flex: none; }
.nex-card-actions > .form-control, .nex-card-actions > .form-select, .nex-card-actions > .input-group { flex: 0 1 14rem; width: auto; min-width: 7rem; }   /* le champ rétrécit avant le titre */

/* bouton sur un fond coloré (en-tête bg-*) : couleur du texte du fond, voile clair ou foncé selon ce texte */
.btn.btn-translucide, .btn.btn-translucide:hover, .btn.btn-translucide:focus-visible, .btn.btn-translucide:active { color: inherit; border-color: transparent; }
.btn.btn-translucide { background-color: color-mix(in srgb, currentColor 16%, transparent); }
.btn.btn-translucide:hover { background-color: color-mix(in srgb, currentColor 26%, transparent); }
.btn.btn-translucide:active { background-color: color-mix(in srgb, currentColor 34%, transparent); }

/* Champs de formulaire : apparence réglée par les thèmes, qui ne redéfinissent que ces variables (nex-themes.css).
   Champs : .form-control, .form-select (et une liste Tom Select qui porte form-select : l'enveloppe .ts-wrapper est le champ,
   classe .focus au focus), .input-group-text, cases à cocher et boutons radio. États valide / invalide et désactivé : Bootstrap.
   Valeurs par défaut : rendu Bootstrap (NeX Origine), recalculées dans chaque zone claire ou sombre ([data-bs-theme]). */
:root,
[data-bs-theme] {
	--nex-champ-bg: var(--bs-body-bg);
	--nex-champ-border: var(--bs-border-color);
	--nex-champ-border-bas: var(--nex-champ-border);  /* trait inférieur (champs soulignés : Relief, Clarté) */
	--nex-champ-radius: var(--bs-border-radius);
	--nex-champ-radius-sm: var(--bs-border-radius-sm);
	--nex-champ-radius-lg: var(--bs-border-radius-lg);
	--nex-champ-radius-zone: var(--nex-champ-radius); /* textarea (jamais en pilule) */
	--nex-champ-px: .75rem;                           /* marge intérieure gauche (plus grande pour les pilules) */
	--nex-champ-hover-bg: var(--nex-champ-bg);
	--nex-champ-hover-border: var(--nex-champ-border);
	--nex-champ-hover-border-bas: var(--nex-champ-hover-border);
	--nex-champ-focus-bg: var(--nex-champ-bg);
	--nex-champ-focus-border: color-mix(in srgb, var(--nex-primary) 50%, var(--bs-body-bg));
	--nex-champ-focus-border-bas: var(--nex-champ-focus-border);
	--nex-champ-focus-shadow: 0 0 0 .25rem color-mix(in srgb, var(--nex-primary) 25%, transparent);
	--nex-champ-addon-bg: var(--bs-tertiary-bg);      /* input-group-text */
	--nex-case-bg: var(--bs-body-bg);                 /* case à cocher ou bouton radio vide */
	--nex-case-border: var(--bs-border-color);
	--nex-case-radius: .25em;
}
.form-control:where(:not(:disabled, .is-valid, .is-invalid)),
.form-select:where(:not(:disabled, .disabled, .is-valid, .is-invalid)) {
	background-color: var(--nex-champ-bg); border-color: var(--nex-champ-border); border-bottom-color: var(--nex-champ-border-bas);
}
.form-control, .form-select { border-radius: var(--nex-champ-radius); padding-left: var(--nex-champ-px); }
.form-control { padding-right: var(--nex-champ-px); }
:is(.form-control, .form-select):where(.form-control-sm, .form-select-sm) { border-radius: var(--nex-champ-radius-sm); }
:is(.form-control, .form-select):where(.form-control-lg, .form-select-lg) { border-radius: var(--nex-champ-radius-lg); }
textarea.form-control { border-radius: var(--nex-champ-radius-zone); }
.form-control:where(:not(:disabled, .is-valid, .is-invalid)):hover,
.form-select:where(:not(:disabled, .disabled, .is-valid, .is-invalid)):hover {
	background-color: var(--nex-champ-hover-bg); border-color: var(--nex-champ-hover-border); border-bottom-color: var(--nex-champ-hover-border-bas);
}
.form-control:where(:not(:disabled, .is-valid, .is-invalid)):focus,
.form-select:where(:not(:disabled, .disabled, .is-valid, .is-invalid)):is(:focus, .focus) {
	background-color: var(--nex-champ-focus-bg); border-color: var(--nex-champ-focus-border); border-bottom-color: var(--nex-champ-focus-border-bas);
	box-shadow: var(--nex-champ-focus-shadow); outline: 0;
}
.input-group-text { background-color: var(--nex-champ-addon-bg); border-color: var(--nex-champ-border); border-radius: var(--nex-champ-radius); }
.form-check-input:where(:not(:checked, :indeterminate, :disabled)) { background-color: var(--nex-case-bg); border-color: var(--nex-case-border); }
.form-check-input[type=checkbox]:not(.form-switch > .form-check-input) { border-radius: var(--nex-case-radius); }

/* Barres de défilement fines */
/* barres de défilement à la couleur du thème : page, tableaux, fenêtres... (scrollbar-color se transmet aux zones qui défilent) */
html { scrollbar-color: var(--nex-scroll-thumb) transparent; }
.nex-scroll { overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--nex-scroll-thumb) transparent; }
.nex-scroll::-webkit-scrollbar { width: 6px; }
.nex-scroll::-webkit-scrollbar-thumb { background: var(--nex-scroll-thumb); border-radius: 3px; }

/* ---------------------------------------------------------------- En-tête */
.nex-header {
	position: fixed; top: 0; left: 0; right: 0; z-index: 1030;
	height: var(--nex-header-h); display: flex; align-items: center;
	background: var(--nex-header-bg); color: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}
.nex-brand {
	display: flex; align-items: center; gap: .6rem; flex: 0 0 var(--nex-sidebar-w);
	height: 100%; padding: 0 1rem; color: #fff; text-decoration: none; font-weight: 600; font-size: .9375rem;
	white-space: nowrap; overflow: hidden;
	transition: flex-basis var(--nex-transition);
}
.nex-brand:hover { color: #fff; }
.nex-brand img { width: 30px; height: 30px; flex-shrink: 0; }
.nex-header-title {
	display: flex; align-items: center; gap: .6rem; min-width: 0; flex: 1 1 auto;
	padding-left: 1rem; margin-left: .25rem; border-left: 1px solid rgba(255, 255, 255, .15);
	font-size: .875rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nex-header-title i { color: var(--nex-primary-300); font-size: 1.125rem; }
.nex-header-title:empty { border-left-color: transparent; }   /* page sans titre */
.nex-header-actions { display: flex; align-items: center; gap: .25rem; padding-right: .75rem; margin-left: auto; }
.nex-header-actions .nex-header-link {
	display: flex; align-items: center; gap: .4rem; padding: .45rem .7rem; border-radius: var(--bs-border-radius);
	color: rgba(255, 255, 255, .8); text-decoration: none;
}
.nex-header-actions .nex-header-link > i { font-size: 1.125rem; }
/* icône du thème dans la couleur par défaut du thème (--nex-header-theme-couleur posée par layout.php, indépendante de la
   couleur choisie par l'utilisateur), nom court du thème en tout petit dessous, en blanc */
.nex-header-actions .nex-header-theme { flex-direction: column; justify-content: center; gap: 2px; padding-top: .3rem; padding-bottom: .25rem; line-height: 1; }
.nex-header-actions .nex-header-theme > i { color: var(--nex-header-theme-couleur, var(--nex-primary)); }
.nex-header-theme-nom { font-size: .5625rem; font-weight: 600; letter-spacing: .02em; white-space: nowrap; color: #fff; }
.nex-header-actions .nex-header-link:hover,
.nex-header-actions .show > .nex-header-link { color: #fff; background: rgba(255, 255, 255, .08); }
.nex-menu-toggle {
	display: none; border: 0; background: none; color: #fff; padding: .5rem .9rem; font-size: 1.25rem;
}

/* ---------------------------------------------------------------- Visite guidée (js/visite.js) : zone mise en lumière (le reste
   de l'écran assombri par l'ombre de la zone), bulle aux couleurs du thème ; bouton « ? » seulement si la page a une visite */
body:not(:has(#wss-content .nex-visite-donnees)) .nex-header-actions .nex-header-visite { display: none; }
.nex-visite-voile { position: fixed; inset: 0; z-index: 1074; background: transparent; }
.nex-visite-voile.nex-visite-voile-plein { background: rgba(0, 0, 0, .55); }
.nex-visite-cible {
	position: fixed; z-index: 1075; pointer-events: none; border-radius: var(--bs-border-radius-lg);
	box-shadow: 0 0 0 2px var(--nex-primary), 0 0 0 9999px rgba(0, 0, 0, .55); transition: all .25s ease;
}
.nex-visite-bulle {
	position: fixed; z-index: 1080; width: min(22rem, calc(100vw - 1rem)); padding: 1rem 1rem .75rem; border-radius: var(--bs-border-radius-lg);
	background: var(--bs-body-bg); color: var(--bs-body-color); box-shadow: 0 .75rem 2rem rgba(0, 0, 0, .35);
	border-top: 3px solid var(--nex-primary); transition: left .25s ease, top .25s ease;
}
.nex-visite-fermer { position: absolute; top: .65rem; right: .65rem; font-size: .7rem; }
.nex-visite-titre { margin-right: 1.5rem; margin-bottom: .35rem; font-weight: 700; font-size: .9375rem; }
.nex-visite-texte { font-size: .8125rem; line-height: 1.5; color: var(--bs-secondary-color); white-space: pre-line; }
.nex-visite-pied { display: flex; align-items: center; justify-content: flex-end; gap: .4rem; margin-top: .85rem; }
.nex-visite-etape { margin-right: auto; font-size: .75rem; color: var(--bs-secondary-color); font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { .nex-visite-cible, .nex-visite-bulle { transition: none; } }

/* infobulles Bootstrap (js/infobulles.js) à la place de la bulle du navigateur */
.tooltip { --bs-tooltip-font-size: .75rem; --bs-tooltip-max-width: 18rem; --bs-tooltip-padding-x: .6rem; --bs-tooltip-padding-y: .35rem; pointer-events: none; }
/* mode sombre : gris foncé (Bootstrap prend la couleur d'accentuation, presque blanche) ; liseré pour se détacher des fonds sombres
   (Clarté et Plasma ont leurs propres infobulles, nex-themes.css) */
[data-bs-theme=dark] .tooltip { --bs-tooltip-bg: #222; --bs-tooltip-color: #f1f1f1; --bs-tooltip-opacity: 1; }
[data-bs-theme=dark] .tooltip-inner { box-shadow: 0 0 0 1px rgba(255, 255, 255, .12), 0 .25rem .75rem rgba(0, 0, 0, .45); }

/* ---------------------------------------------------------------- Recherche globale (en-tête, js/recherche.js) : champ compact qui
   s'élargit au focus, panneau des résultats aux couleurs des menus de l'en-tête ; loupe seule sur mobile (le champ couvre
   l'en-tête à l'ouverture). Icônes secondaires (thème, favoris, langue, panneau de droite) regroupées derrière « ⋮ » sur mobile. */
.nex-recherche { position: relative; flex: none; margin: 0 .5rem; }
.nex-recherche-ouvrir, .nex-recherche-fermer, .nex-header-actions .nex-header-plus { display: none; }
.nex-recherche-champ { position: relative; display: flex; align-items: center; width: 15rem; transition: width var(--nex-transition); }
.nex-recherche-active .nex-recherche-champ { width: 26rem; }
.nex-recherche-champ > i { position: absolute; left: .8rem; font-size: .8125rem; color: rgba(255, 255, 255, .55); pointer-events: none; }
.nex-recherche-champ input {
	width: 100%; height: 2.125rem; padding: 0 3.75rem 0 2.15rem; border: 1px solid rgba(255, 255, 255, .1); border-radius: var(--bs-border-radius-lg);
	background: rgba(255, 255, 255, .08); color: #fff; font-size: .8125rem; outline: none; transition: background-color var(--nex-transition), border-color var(--nex-transition);
}
.nex-recherche-champ input::placeholder { color: rgba(255, 255, 255, .5); }
.nex-recherche-champ input:focus { background: rgba(255, 255, 255, .14); border-color: color-mix(in srgb, var(--nex-primary) 65%, transparent); }
.nex-recherche-champ input::-webkit-search-cancel-button { filter: invert(1); opacity: .6; }
.nex-recherche-touche { position: absolute; right: .6rem; padding: .05rem .35rem; border: 1px solid rgba(255, 255, 255, .2); border-radius: .25rem; background: none;
	color: rgba(255, 255, 255, .55); font: 600 .625rem/1.4 inherit; pointer-events: none; }
.nex-recherche-active .nex-recherche-touche { display: none; }
.nex-recherche-panneau {
	position: absolute; z-index: 1060; top: calc(100% + .45rem); left: 0; width: max(100%, 26rem); max-height: min(70vh, 32rem); overflow-y: auto; padding: .35rem;
	background: var(--bs-body-bg); color: var(--bs-body-color); border: 1px solid var(--bs-border-color-translucent); border-radius: var(--bs-border-radius-lg);
	box-shadow: 0 .5rem 1.5rem rgba(0, 0, 0, .3); font-size: .8125rem;
}
.nex-recherche-groupe { padding: .55rem .6rem .25rem; font-size: .625rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--bs-secondary-color); }
.nex-recherche-groupe > span { margin-left: .3rem; font-weight: 600; opacity: .8; }
.nex-recherche-resultat, .nex-recherche-tout { display: flex; align-items: center; gap: .7rem; padding: .45rem .6rem; border-radius: var(--bs-border-radius); color: inherit; text-decoration: none; }
.nex-recherche-resultat > i { color: var(--nex-primary-300, var(--nex-primary)); }
.nex-recherche-resultat small { display: block; color: var(--bs-secondary-color); font-size: .6875rem; }
.nex-recherche-titre { font-weight: 600; }
.nex-recherche-resultat:hover, .nex-recherche-resultat.active, .nex-recherche-tout:hover, .nex-recherche-tout.active { background: color-mix(in srgb, var(--nex-primary) 22%, transparent); color: inherit; }
.nex-recherche-tout { margin-top: .35rem; border-top: 1px solid var(--bs-border-color-translucent); border-radius: 0 0 var(--bs-border-radius) var(--bs-border-radius); color: var(--nex-primary-300, var(--nex-primary)); }
.nex-recherche-info { padding: .6rem .7rem; color: var(--bs-secondary-color); }
.nex-header-secondaire { display: contents; }
/* boutons de l'en-tête (loupe, « ⋮ ») : même allure que les liens */
.nex-header button.nex-header-link { border: 0; background: none; }
.nex-recherche-ouvrir { align-items: center; padding: .45rem .7rem; border-radius: var(--bs-border-radius); color: rgba(255, 255, 255, .8); font-size: 1.125rem; }
.nex-recherche-ouvrir:hover { color: #fff; background: rgba(255, 255, 255, .08) !important; }
@media (max-width: 1399.98px) { .nex-recherche-champ { width: 13rem; } .nex-recherche-active .nex-recherche-champ { width: 22rem; } }
@media (max-width: 1199.98px) { .nex-recherche-champ { width: 11rem; } .nex-recherche-active .nex-recherche-champ { width: 18rem; } .nex-recherche-touche { display: none; } }
@media (max-width: 991.98px) { .nex-recherche { margin-left: auto; } .nex-recherche + .nex-header-actions { margin-left: 0; } }

/* ---------------------------------------------------------------- Indicateurs de l'en-tête déclarés par les modules (wss/core/entete.php, js/entete.js,
   12/10/2026 : CO2e du bilan carbone) : à côté de la recherche, icône dans la couleur de l'indicateur, valeur courte ; panneau au clic */
.nex-header-indicateurs { display: flex; align-items: center; gap: .15rem; flex: none; }
.nex-header-indicateurs + .nex-header-actions { margin-left: 0; }
.nex-header-indicateurs .nex-header-link {
	display: flex; align-items: center; gap: .35rem; padding: .4rem .6rem; border-radius: var(--bs-border-radius); color: rgba(255, 255, 255, .85);
	text-decoration: none; white-space: nowrap;
}
.nex-header-indicateurs .nex-header-link > i { font-size: 1rem; color: var(--nex-indicateur-couleur, rgba(255, 255, 255, .85)); }
.nex-header-indicateurs .nex-header-link:hover, .nex-header-indicateurs .show > .nex-header-link { color: #fff; background: rgba(255, 255, 255, .08); }
.nex-header-indicateur-texte { font-size: .75rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.nex-indicateur-panneau { width: 21rem; max-width: calc(100vw - 1rem); padding: 0; overflow: hidden; }
.nex-indicateur-panneau-titre { display: flex; align-items: center; gap: .5rem; padding: .6rem .9rem; font-weight: 600; font-size: .8125rem;
	border-bottom: 1px solid var(--bs-border-color-translucent); }
.nex-indicateur-panneau-corps { padding: .6rem .9rem; font-size: .8125rem; }
.nex-indicateur-panneau-pied { padding: .45rem .9rem; border-top: 1px solid var(--bs-border-color-translucent); font-size: .75rem; text-align: right; }
.nex-indicateur-chiffres { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-bottom: .4rem; }
.nex-indicateur-chiffres > div { padding: .45rem .6rem; border-radius: var(--bs-border-radius); background: var(--bs-tertiary-bg); }
.nex-indicateur-chiffres b { display: block; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.nex-indicateur-chiffres span { font-size: .6875rem; color: var(--bs-secondary-color); }
@media (max-width: 575.98px) { .nex-header-indicateur-texte { display: none; } }
@media (max-width: 767.98px) {
	.nex-recherche { margin: 0 0 0 auto; }
	.nex-recherche-ouvrir, .nex-header-actions .nex-header-plus { display: flex; }
	.nex-recherche-champ { display: none; }
	.nex-header.nex-recherche-ouverte .nex-recherche-champ {
		display: flex; position: fixed; z-index: 2; top: 0; left: 0; right: 0; width: auto; height: var(--nex-header-h); gap: .25rem; padding: 0 .5rem;
		background: var(--nex-header-bg);
	}
	.nex-header.nex-recherche-ouverte .nex-recherche-champ > i { left: 1.3rem; }
	.nex-header.nex-recherche-ouverte .nex-recherche-fermer { display: flex; border: 0; background: none; color: #fff; padding: .5rem .7rem; font-size: 1.1rem; }
	.nex-recherche-champ input { padding-right: .75rem; }
	.nex-recherche-panneau { position: fixed; top: calc(var(--nex-header-h) + .35rem); left: .5rem; right: .5rem; width: auto; }
	.nex-header-secondaire { display: none; }
	.nex-header-plus-ouvert .nex-header-secondaire {
		display: flex; align-items: center; gap: .15rem; position: fixed; top: calc(var(--nex-header-h) + .35rem); right: .5rem; padding: .3rem;
		background: var(--nex-header-bg); border-radius: var(--bs-border-radius-lg); box-shadow: 0 .5rem 1.5rem rgba(0, 0, 0, .35);
	}
	.nex-header-plus-ouvert .nex-header-plus { color: #fff; background: rgba(255, 255, 255, .08); }
}
@media (max-width: 575.98px) { .nex-brand span { display: none; } }
@media (prefers-reduced-motion: reduce) { .nex-recherche-champ, .nex-recherche-champ input { transition: none; } }

/* ---------------------------------------------------------------- Menu latéral */
.nex-sidebar {
	position: fixed; top: calc(var(--nex-header-h) + var(--nex-sidebar-gap)); bottom: var(--nex-sidebar-gap); left: var(--nex-sidebar-gap); z-index: 1020;
	width: var(--nex-sidebar-w); display: flex; flex-direction: column; border-radius: var(--nex-sidebar-radius);
	background: var(--nex-sidebar-bg); color: var(--nex-sidebar-color);
	box-shadow: var(--nex-sidebar-shadow); backdrop-filter: var(--nex-backdrop);
	transition: width var(--nex-transition), transform var(--nex-transition);
}
.nex-sidebar .nex-menu { flex: 1 1 auto; min-height: 0; padding: .5rem 0 1rem; }   /* min-height: 0 : le menu défile au lieu de déborder */
/* zone du bas (administration, aide) : fixe au-dessus du bouton de réduction, séparée du menu qui défile */
.nex-sidebar .nex-menu.nex-menu-bas { flex: none; padding: .35rem 0 .45rem; border-top: 1px solid var(--nex-sidebar-border); }
.nex-menu-bas:not(:has(.nex-menu-link)) { display: none; }

.nex-sidebar-footer { border-radius: 0 0 var(--nex-sidebar-radius) var(--nex-sidebar-radius); }

.nex-menu-header {
	padding: 1rem 1.1rem .35rem; font-size: .625rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
	color: var(--nex-sidebar-header-color); white-space: nowrap; overflow: hidden;
}
.nex-menu-link {
	position: relative; display: flex; align-items: center; gap: .7rem;
	margin: 1px .5rem; padding: .5rem .6rem; border-radius: var(--nex-menu-radius);
	color: var(--nex-sidebar-color); text-decoration: none; white-space: nowrap;
	font-size: .6875rem;                          /* 11 px : 1 px de moins que le contenu (sous-menu : 95 %) */
}
.nex-menu-link:hover { color: var(--nex-sidebar-hover-color); background: var(--nex-sidebar-hover-bg); }
.nex-menu-link.active { color: var(--nex-sidebar-active-color); background: var(--nex-sidebar-active-bg); font-weight: 500; }
.nex-menu-link.active::before {
	content: ""; position: absolute; left: -.5rem; top: .35rem; bottom: .35rem; width: 3px;
	border-radius: 0 3px 3px 0; background: var(--nex-menu-marker);
}
.nex-menu-badge {
	margin-left: auto; min-width: 1.3rem; height: 1.1rem; padding: 0 .35rem; border-radius: 999px;
	display: inline-flex; align-items: center; justify-content: center; font-size: .625rem; font-weight: 600; line-height: 1;
}
.nex-menu-badge + .nex-menu-caret { margin-left: .4rem; }
.nex-sidebar-mini .nex-menu-badge { position: absolute; top: .1rem; right: .35rem; min-width: 1rem; height: .9rem; padding: 0 .25rem; font-size: .5625rem; }
.nex-menu-icon { flex: 0 0 1.4rem; text-align: center; font-size: .9375rem; }
.nex-menu-text { overflow: hidden; text-overflow: ellipsis; }
.nex-menu-caret { margin-left: auto; font-size: .7rem; transition: transform var(--nex-transition); }
.nex-menu-item.open > .nex-menu-link .nex-menu-caret { transform: rotate(90deg); }
.nex-submenu { display: none; padding: .15rem 0 .35rem; }
.nex-menu-item.open > .nex-submenu { display: block; }
.nex-submenu .nex-menu-link { padding-left: 2.7rem; font-size: .95em; }
/* menu à un niveau par module (07/10/2026, Paramètres > Général > Menu) : groupe au premier niveau, ses pages dessous, sous-menu d'une page au
   troisième niveau */
.nex-menu-groupe > .nex-menu-link { font-weight: 600; }
.nex-submenu .nex-submenu { padding: 0 0 .2rem; }
.nex-submenu .nex-submenu .nex-menu-link { padding-left: 4.1rem; font-size: 1em; }
.nex-submenu .nex-menu-item.has-sub > .nex-menu-link { padding-left: 2.7rem; }
/* ---------------------------------------------------------------- 2e barre latérale (15/10/2026, demande de Grégory, comme Pennylane) : le groupe du menu n'est qu'un lien ; ses pages
   sont dans ce panneau posé contre le menu (couleurs du menu : il est dans le <nav>). Non fixé : il recouvre le contenu et se referme (clic ailleurs, Échap,
   changement de page) ; fixé (épingle, préférence `layout.panneau_fixe`) : il reste ouvert et le contenu se décale. */
.nex-panneau {
	position: absolute; top: 0; bottom: 0; left: calc(100% + var(--nex-sidebar-gap)); width: var(--nex-panneau-w); display: flex; flex-direction: column;
	/* couleur du menu posée sur un fond plein : un menu translucide (verre dépoli) laisserait lire le contenu qu'elle recouvre */
	background: linear-gradient(var(--nex-sidebar-bg), var(--nex-sidebar-bg)) var(--nex-panneau-fond, var(--bs-body-bg)); color: var(--nex-sidebar-color); border-left: 1px solid var(--nex-sidebar-border);
	border-radius: var(--nex-sidebar-radius); box-shadow: 0 .5rem 1.5rem rgba(0, 0, 0, .25); backdrop-filter: var(--nex-backdrop); z-index: 1;
}
.nex-panneau[hidden] { display: none; }
.nex-panneau-fixe.nex-panneau-ouvert { --nex-panneau-decal: calc(var(--nex-panneau-w) + var(--nex-sidebar-gap)); }
.nex-panneau-fixe .nex-panneau { box-shadow: none; }
.nex-panneau-entete { display: flex; align-items: center; gap: .25rem; padding: .9rem .6rem .5rem 1.1rem; }
.nex-panneau-titre { flex: 1; font-weight: 700; font-size: .875rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nex-panneau-btn { border: 0; background: none; color: var(--nex-sidebar-color); padding: .3rem .45rem; border-radius: var(--bs-border-radius); font-size: .8rem; opacity: .75; }
.nex-panneau-btn:hover { color: var(--nex-sidebar-hover-color); background: var(--nex-sidebar-hover-bg); opacity: 1; }
.nex-panneau-fixer[aria-pressed=true] { color: var(--nex-sidebar-active-color); opacity: 1; }
.nex-panneau-fixer[aria-pressed=true] i { transform: rotate(-35deg); }
.nex-panneau-liste { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 0 0 1rem; }
.nex-panneau-groupe { display: none; }
.nex-panneau-groupe.nex-panneau-courant, .nex-panneau-filtre .nex-panneau-groupe { display: block; }
.nex-panneau-filtre .nex-panneau-groupe::before { content: attr(data-titre); display: block; padding: .6rem 1.1rem .15rem; font-size: .625rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--nex-sidebar-header-color); }
.nex-panneau-section {
	padding: .95rem 1.1rem .3rem; font-size: .625rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--nex-sidebar-header-color);
	border-top: 1px solid var(--nex-sidebar-border); margin-top: .5rem;
}
.nex-panneau-section:first-child { border-top: 0; margin-top: 0; padding-top: .4rem; }
.nex-panneau .nex-menu-link { font-size: .75rem; padding: .45rem .7rem; }
.nex-panneau .nex-submenu .nex-menu-link { padding-left: 1.9rem; font-size: .95em; }
.nex-panneau .nex-menu-link.active::before { left: -.5rem; }
/* groupe du menu : actif (contient la page affichée) ou dont le panneau est ouvert */
.nex-menu-groupe.nex-menu-actif > .nex-menu-link { color: var(--nex-sidebar-hover-color); background: var(--nex-sidebar-hover-bg); }
.nex-menu-groupe.nex-panneau-sel > .nex-menu-link { color: var(--nex-sidebar-active-color); background: var(--nex-sidebar-active-bg); }
.nex-menu-groupe.nex-panneau-sel > .nex-menu-link .nex-menu-caret { transform: translateX(2px); }
/* menu réduit : le panneau garde ses textes et ses sous-menus (le reste du menu n'a que des icônes) */
.nex-sidebar-mini .nex-panneau .nex-menu-text, .nex-sidebar-mini .nex-panneau .nex-menu-caret { display: revert !important; }
.nex-sidebar-mini .nex-panneau .nex-menu-link { justify-content: flex-start; }
.nex-sidebar-mini .nex-panneau .nex-menu-item.open > .nex-submenu { display: block !important; }
.nex-sidebar-mini .nex-panneau .nex-menu-badge { position: static; }
/* menu sur toute la hauteur : le panneau commence sous l'en-tête */
[data-nex-menu-plein] .nex-panneau { top: calc(var(--nex-header-h) - var(--nex-sidebar-gap)); }
/* tablette et mobile : le panneau recouvre le menu en tiroir, rien n'est fixé */
@media (max-width: 991.98px) {
	.nex-panneau { left: 0; width: 100%; border-left: 0; box-shadow: none; }
	.nex-panneau-fixer { display: none; }
	.nex-panneau-fixe.nex-panneau-ouvert { --nex-panneau-decal: 0px; }
}

.nex-sidebar-footer { border-top: 1px solid var(--nex-sidebar-border); padding: .35rem .5rem; text-align: right; }
.nex-sidebar-mini-btn { border: 0; background: none; color: var(--nex-sidebar-color); padding: .4rem .6rem; border-radius: var(--bs-border-radius); }
.nex-sidebar-mini-btn:hover { color: var(--nex-sidebar-hover-color); background: var(--nex-sidebar-hover-bg); }

/* ---------------------------------------------------------------- Contenu */
.nex-content {
	margin-left: calc(var(--nex-sidebar-w) + var(--nex-sidebar-gap) * 2 + var(--nex-panneau-decal)); padding: calc(var(--nex-header-h) + 1.25rem) 1.5rem 2rem;
	min-height: 100%; transition: margin-left var(--nex-transition);
}

/* ---------------------------------------------------------------- Menu réduit (icônes seules) */
.nex-sidebar-mini .nex-sidebar { width: var(--nex-sidebar-mini-w); }
.nex-sidebar-mini .nex-brand { flex-basis: var(--nex-sidebar-mini-w); }
.nex-sidebar-mini .nex-brand span,
.nex-sidebar-mini .nex-menu-text,
.nex-sidebar-mini .nex-menu-caret,
.nex-sidebar-mini .nex-submenu { display: none !important; }
.nex-sidebar-mini .nex-menu-header { height: 1px; padding: 0; margin: .5rem .9rem; background: var(--nex-sidebar-border); color: transparent; }
.nex-sidebar-mini .nex-menu-link { justify-content: center; }
.nex-sidebar-mini .nex-sidebar-mini-btn i { transform: rotate(180deg); }
.nex-sidebar-mini .nex-content { margin-left: calc(var(--nex-sidebar-mini-w) + var(--nex-sidebar-gap) * 2 + var(--nex-panneau-decal)); }

/* ---------------------------------------------------------------- Menu sur toute la hauteur (thèmes <html data-nex-menu-plein>)
   Sur ordinateur : le menu couvre la hauteur de la fenêtre, logo et nom de l'application en haut du menu, en-tête à sa droite.
   Sur mobile : gabarit habituel (en-tête sur toute la largeur, menu en tiroir). */
.nex-sidebar-marque { display: none; }
/* filtre du menu (08/10/2026) : au-dessus des entrées, masqué quand le menu est réduit */
.nex-menu-filtre { position: relative; padding: .5rem .75rem .25rem; flex: 0 0 auto; }
.nex-menu-filtre > i { position: absolute; left: 1.3rem; top: 50%; transform: translateY(-35%); font-size: .7rem; opacity: .6; pointer-events: none; }
.nex-menu-filtre input { padding-left: 1.75rem; padding-right: 1.75rem; font-size: .75rem; background: var(--nex-sidebar-filtre-bg, rgba(255, 255, 255, .08)); border-color: transparent; color: inherit; }
.nex-menu-filtre input::placeholder { color: inherit; opacity: .6; }
.nex-sidebar:not([data-bs-theme=dark]) .nex-menu-filtre input { --nex-sidebar-filtre-bg: rgba(0, 0, 0, .05); }
.nex-sidebar-mini .nex-menu-filtre { display: none; }
.nex-sidebar .nex-menu [hidden] { display: none !important; }
.nex-menu-filtre-vide { padding: .5rem 1rem; font-size: .75rem; opacity: .7; }
@media (min-width: 992px) {
	[data-nex-menu-plein] .nex-sidebar { top: var(--nex-sidebar-gap); z-index: 1035; }
	[data-nex-menu-plein] .nex-header { left: calc(var(--nex-sidebar-w) + var(--nex-sidebar-gap) * 2); transition: left var(--nex-transition); }
	[data-nex-menu-plein] .nex-sidebar-mini .nex-header { left: calc(var(--nex-sidebar-mini-w) + var(--nex-sidebar-gap) * 2); }
	[data-nex-menu-plein] .nex-header .nex-brand { display: none; }
	[data-nex-menu-plein] .nex-header-title { margin-left: 0; padding-left: 1.5rem; border-left: 0; }
	[data-nex-menu-plein] .nex-sidebar-marque {
		display: flex; align-items: center; gap: .6rem; flex: none; height: var(--nex-header-h); padding: 0 1rem;
		color: var(--nex-sidebar-hover-color); font-size: .9375rem; font-weight: 600; text-decoration: none; white-space: nowrap; overflow: hidden;
	}
	[data-nex-menu-plein] .nex-sidebar-marque img { width: 30px; height: 30px; flex-shrink: 0; }
	[data-nex-menu-plein] .nex-sidebar-mini .nex-sidebar-marque { justify-content: center; padding: 0; }
	[data-nex-menu-plein] .nex-sidebar-mini .nex-sidebar-marque span { display: none; }
}
@media (min-width: 992px) and (prefers-reduced-motion: reduce) {
	[data-nex-menu-plein] .nex-header { transition: none; }
}

/* ---------------------------------------------------------------- Mobile : menu en tiroir */
.nex-sidebar-backdrop { display: none; }
@media (max-width: 991.98px) {
	.nex-menu-toggle { display: block; }
	.nex-brand { flex-basis: auto !important; padding-left: .25rem; }
	.nex-header-title { display: none; }
	.nex-sidebar { width: var(--nex-sidebar-w) !important; transform: translateX(calc(-100% - var(--nex-sidebar-gap) - 1px)); }
	.nex-content { margin-left: 0 !important; padding-left: 1rem; padding-right: 1rem; }
	.nex-sidebar-footer { display: none; }
	.nex-sidebar-mini .nex-menu-text, .nex-sidebar-mini .nex-menu-caret, .nex-sidebar-mini .nex-brand span { display: revert !important; }
	.nex-sidebar-open .nex-sidebar { transform: none; box-shadow: 0 0 30px rgba(0, 0, 0, .4); }
	.nex-sidebar-open .nex-sidebar-backdrop { display: block; position: fixed; inset: var(--nex-header-h) 0 0 0; z-index: 1010; background: rgba(0, 0, 0, .45); }
}

@media (prefers-reduced-motion: reduce) {
	.nex-sidebar, .nex-brand, .nex-content, .nex-menu-caret { transition: none; }
}

/* ---------------------------------------------------------------- Fond d'image (thème transparent) */
.nex-fond { position: fixed; inset: 0; z-index: -1; background: #0b1117 center / cover no-repeat; }
.nex-fond::after { content: ""; position: absolute; inset: 0; background: var(--nex-fond-voile, rgba(38, 40, 52, .75)); backdrop-filter: blur(5px); }

/* ---------------------------------------------------------------- Page de connexion (/auth/) */
.nex-auth { position: relative; min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; color: #fff; background: #0b1117; }
.nex-auth-cover { position: fixed; inset: 0; }
.nex-auth-voile { position: fixed; inset: 0; background: rgba(15, 20, 25, .5); }
.nex-auth-contenu { position: relative; z-index: 1; width: 100%; max-width: 380px; }
/* demande d'accès (formulaire hors tableau wss.inscription) : colonne plus large, libellés au-dessus des champs, sans sommaire */
.nex-auth-contenu.nex-auth-large { max-width: 560px; }
.nex-form-auth { text-align: left; color: var(--bs-body-color); }
.nex-form-auth .nex-form-sommaire { display: none; }
.nex-form-auth .nex-form-page { grid-template-columns: minmax(0, 1fr); }
.nex-form-auth .nex-form-ligne { grid-template-columns: minmax(0, 1fr); gap: .3rem; }
.nex-form-auth .nex-form-libelle { padding-top: 0; text-align: left; }
.nex-form-auth .nex-modal-pied .btn-primary { width: 100%; }

/* ---------------------------------------------------------------- En-tête : étoile, favoris, notifications */
.nex-etoile { position: relative; flex: none; width: 2rem; height: 2rem; padding: 0; border: 0; border-radius: 50%; background: none; font-size: 1rem; }
.nex-etoile { color: rgba(255, 255, 255, .3); }                  /* étoile pleine, grisée tant que la page n'est pas en favori */
.nex-etoile:hover { color: rgba(255, 255, 255, .7); background: rgba(255, 255, 255, .08); }
.nex-etoile.active, .nex-etoile.active:hover { color: var(--nex-yellow); }
.nex-header-title .nex-etoile i { color: inherit; font-size: inherit; }

.nex-favoris { width: 21rem; padding: .5rem; grid-template-columns: repeat(3, 1fr); gap: .25rem; }
.nex-favoris.show { display: grid; }   /* Bootstrap impose display: block au menu ouvert */
.nex-favori { position: relative; }
.nex-favori-lien {
	display: flex; flex-direction: column; align-items: center; gap: .5rem; padding: .9rem .25rem .7rem; border-radius: var(--bs-border-radius);
	color: var(--bs-body-color); text-decoration: none; text-align: center;
}
.nex-favori-lien:hover { background: var(--bs-tertiary-bg); color: var(--bs-emphasis-color); }
.nex-favori-lien i { font-size: 1.5rem; color: var(--nex-primary); }
.nex-favori-lien span { max-width: 100%; font-size: var(--nex-font-sm); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* groupe de la page dans le menu (12/10/2026 : plusieurs pages « Indicateurs ») : au-dessus du nom, petit et discret */
.nex-favori-parent { max-width: 100%; margin-bottom: -.45rem; font-size: .625rem; line-height: 1.2; color: var(--bs-secondary-color); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nex-favori-retirer {
	position: absolute; top: .2rem; right: .2rem; display: none; width: 1.25rem; height: 1.25rem; padding: 0; border: 0; border-radius: 50%;
	background: var(--bs-secondary-bg); color: var(--bs-secondary-color); font-size: .625rem; line-height: 1;
}
.nex-favori:hover .nex-favori-retirer, .nex-favori-retirer:focus-visible { display: block; }
.nex-favori-retirer:hover { background: var(--nex-danger); color: #fff; }
.nex-favoris-vide { grid-column: 1 / -1; padding: 1rem; text-align: center; color: var(--bs-secondary-color); }

.nex-cloche { position: relative; }
.nex-cloche-badge {
	position: absolute; top: .15rem; right: .2rem; min-width: 1rem; height: 1rem; padding: 0 .25rem; border-radius: 999px;
	background: var(--nex-danger); color: #fff; font-size: .5625rem; font-weight: 700; line-height: 1rem; text-align: center;
}
.nex-cloche-badge[hidden] { display: none; }
.nex-notifications { width: 22rem; padding: 0; overflow: hidden; }
.nex-notifications-entete { display: flex; align-items: center; justify-content: space-between; padding: .7rem 1rem; border-bottom: 1px solid var(--bs-border-color); font-weight: 600; }
.nex-notifications-entete a { font-size: var(--nex-font-sm); font-weight: 400; text-decoration: none; }
.nex-notifications-liste { max-height: 22rem; }
.nex-notification { display: flex; gap: .75rem; padding: .7rem 1rem; color: var(--bs-body-color); text-decoration: none; border-bottom: 1px solid var(--bs-border-color-translucent); }
.nex-notification:hover { background: var(--bs-tertiary-bg); color: var(--bs-body-color); }
.nex-notification-icone { flex: none; display: flex; align-items: center; justify-content: center; width: 2.25rem; height: 2.25rem; border-radius: 50%; font-size: .875rem; }
.nex-notification-corps { display: flex; flex-direction: column; min-width: 0; }
.nex-notification-titre { font-weight: 600; color: var(--bs-emphasis-color); }
.nex-notification-texte { color: var(--bs-secondary-color); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.nex-notification-date { margin-top: .15rem; font-size: var(--nex-font-sm); color: var(--bs-tertiary-color); }
.nex-notification { position: relative; }
.nex-notification-retirer { position: absolute; top: .45rem; right: .55rem; display: flex; align-items: center; justify-content: center; width: 1.4rem; height: 1.4rem;
	border-radius: 50%; color: var(--bs-tertiary-color); font-size: .75rem; opacity: 0; transition: opacity .15s; }
.nex-notification:hover .nex-notification-retirer, .nex-notification-retirer:focus { opacity: 1; }
.nex-notification-retirer:hover { background: var(--bs-secondary-bg); color: var(--bs-emphasis-color); }
@media (hover: none) { .nex-notification-retirer { opacity: 1; } }
.nex-notifications-vide { display: flex; flex-direction: column; align-items: center; gap: .5rem; padding: 2rem 1rem; color: var(--bs-secondary-color); }
.nex-notifications-vide i { font-size: 2rem; }
.nex-notifications-pied { display: block; padding: .6rem; text-align: center; font-size: var(--nex-font-sm); text-decoration: none; background: var(--bs-tertiary-bg); }
@media (max-width: 575.98px) {
	.nex-notifications { width: calc(100vw - 1rem); }
}

/* ---------------------------------------------------------------- Navigation sans rechargement (nav.js) */
/* barre de chargement sous l'en-tête, au-delà de 150 ms */
.nex-chargement::after {
	content: ""; position: fixed; top: var(--nex-header-h); left: 0; z-index: 1040; width: 100%; height: 3px;
	background: linear-gradient(90deg, transparent, var(--nex-primary), transparent); background-size: 50% 100%; background-repeat: no-repeat;
	animation: nex-chargement 1s linear infinite;
}
@keyframes nex-chargement { from { background-position: -50% 0; } to { background-position: 150% 0; } }
/* squelettes (squelette.js) : barres Bootstrap placeholder, plus discrètes, hauteurs selon le rôle */
.nex-squelette .placeholder { border-radius: .25rem; opacity: .15; }
.nex-squelette .nex-squelette-titre { height: 1.5rem; }
.nex-squelette .nex-squelette-chiffre { height: 1.75rem; }
.nex-squelette .nex-squelette-champ { display: inline-block; width: 12rem; height: 1.875rem; }
.nex-squelette .nex-squelette-bouton { display: inline-block; width: 6rem; height: 1.875rem; }
.nex-squelette .nex-squelette-bloc { display: block; width: 100%; height: 12rem; }
.nex-squelette .table { --bs-table-bg: transparent; }
/* chargement abandonné (trop long) */
.nex-delai { max-width: 28rem; margin: 3rem auto; text-align: center; }
.nex-delai > i { font-size: 2.5rem; color: var(--nex-warning); margin-bottom: 1rem; }
@media (prefers-reduced-motion: reduce) {
	.nex-chargement::after { animation: none; background: var(--nex-primary); }
}


/* ---------------------------------------------------------------- Fenêtres modales (modal.js, <dialog>) */
/* fenêtre accrochée en haut (comme Bootstrap) : en changeant d'onglet, seule la hauteur varie vers le bas, l'en-tête ne bouge pas */
dialog.nex-modal {
	width: min(92vw, var(--nex-modal-l, 36rem)); max-height: calc(100vh - 3.5rem); margin: 1.75rem auto auto;
	padding: 0; border: 0; border-radius: var(--bs-border-radius-lg);
	background: var(--nex-modal-bg, var(--bs-body-bg)); color: var(--bs-body-color); box-shadow: 0 10px 40px rgba(0, 0, 0, .3);
}
dialog.nex-modal[open] { display: flex; animation: nex-modal-entree .18s ease-out; }
dialog.nex-modal:focus, dialog.nex-modal:focus-visible { outline: none; }   /* focus donné à la fenêtre à l'ouverture (modal.js) : sans contour */
dialog.nex-modal::backdrop { background: rgba(15, 20, 25, .5); backdrop-filter: blur(2px); }
@keyframes nex-modal-entree { from { opacity: 0; transform: translateY(8px) scale(.98); } }
/* tailles : largeur au plus (92 % de l'écran au plus) ; full (alias plein) : tout l'écran moins 50 px autour, l'effet de fenêtre reste */
.nex-modal-sm { --nex-modal-l: 24rem; }
.nex-modal-lg { --nex-modal-l: 56rem; }
.nex-modal-xl { --nex-modal-l: 72rem; }
.nex-modal-xxl { --nex-modal-l: 88rem; }
.nex-modal-xxxl { --nex-modal-l: 104rem; }
dialog.nex-modal.nex-modal-full, dialog.nex-modal.nex-modal-plein { --nex-modal-marge: 50px; width: calc(100vw - 2 * var(--nex-modal-marge));
	height: calc(100vh - 2 * var(--nex-modal-marge)); max-height: none; margin: var(--nex-modal-marge) auto; }
@media (max-width: 767.98px) { dialog.nex-modal.nex-modal-full, dialog.nex-modal.nex-modal-plein { --nex-modal-marge: .75rem; } }
.nex-modal-contenu { display: flex; flex-direction: column; width: 100%; min-height: 0; }
.nex-modal-entete { display: flex; align-items: center; gap: .75rem; padding: .85rem 1.25rem; border-bottom: 1px solid var(--bs-border-color-translucent); }
.nex-modal-titre { flex: 1; min-width: 0; font-size: .9375rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nex-modal-titre i { margin-right: .6rem; color: var(--nex-primary); }
.nex-modal-corps { position: relative; flex: 1 1 auto; min-height: 0; overflow: auto; padding: 1.25rem; }   /* relative : les éléments placés en absolu (select caché de Tom Select) défilent avec le contenu au lieu d'allonger la fenêtre */
.nex-modal-pied { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .5rem; padding: .75rem 1.25rem; border-top: 1px solid var(--bs-border-color-translucent); }
@media (prefers-reduced-motion: reduce) { dialog.nex-modal[open] { animation: none; } }

/* ---------------------------------------------------------------- Formulaires (js/formulaire.js, wss/form/formulaire.php) */
/* fiche : en-tête de la couleur du thème (text-bg-primary posé par formulaire.js) */
.nex-modal-formulaire .nex-modal-titre i { color: inherit; opacity: .9; }
/* formulaire « droit » : libellé aligné à droite | champ, lignes séparées par un trait */
.nex-form-ligne[hidden], .nex-form-groupe[hidden], .nex-form-sommaire-lien[hidden], .nex-form-onglets > li[hidden], .nex-form-etapes > li[hidden] { display: none !important; }
.nex-form-ligne { display: grid; grid-template-columns: minmax(8rem, 13rem) minmax(0, 1fr); gap: .2rem 1rem; padding: .55rem 0; }
.nex-form-ligne + .nex-form-ligne { border-top: 1px solid var(--bs-border-color-translucent); }
.nex-form-libelle { padding-top: .4rem; text-align: right; font-weight: 600; color: var(--bs-secondary-color); overflow-wrap: anywhere; }
.nex-form-requis { color: var(--nex-danger); }
.nex-form-etoile { margin-left: .2rem; }
.nex-form-valeur { min-width: 0; }
.nex-form-court > [data-saisie] { max-width: 12rem; }
.nex-form-moyen > [data-saisie] { max-width: 24rem; }
/* largeur « plein » (09/10/2026) : libellé au-dessus (ou aucun), champ sur toute la largeur de la fiche (lignes d'une facture) */
.nex-form-ligne:has(> .nex-form-plein) { grid-template-columns: minmax(0, 1fr); }
.nex-form-ligne:has(> .nex-form-plein) > .nex-form-libelle { padding-top: 0; text-align: left; }
.nex-form-ligne:has(> .nex-form-plein) > .nex-form-libelle:empty { display: none; }
.nex-form-aide { display: flex; gap: .4rem; margin-top: .3rem; font-size: .8125rem; color: var(--bs-secondary-color); }
.nex-form-aide i { margin-top: .2rem; font-size: .75rem; }
.nex-form-erreur { margin-top: .3rem; font-size: .8125rem; color: var(--nex-danger); }
.nex-form-erreur:empty { display: none; }
.nex-form-invalide .form-control, .nex-form-invalide .ts-wrapper .ts-control, .nex-form-invalide .form-check-input { border-color: var(--nex-danger) !important; }
/* liste Tom Select qui porte form-select : la bordure est sur l'enveloppe (12/10/2026 : la case du fournisseur n'était pas entourée) ; select natif */
.nex-form-invalide .ts-wrapper.form-select, .nex-form-invalide select.form-select:not(.ts-hidden-accessible) { border-color: var(--nex-danger) !important; }
.nex-form-invalide .nex-form-libelle { color: var(--nex-danger); }
.nex-form-lecture { padding-top: .4rem; }
.nex-form-interrupteur { padding-top: .45rem; margin: 0; }
/* rendus de saisie (wss/form/formulaire.php 'saisie') */
.nex-form-avec-plus { display: flex; gap: .4rem; align-items: flex-start; }
.nex-form-avec-plus > .ts-wrapper, .nex-form-avec-plus > select { flex: 1 1 auto; min-width: 0; }
.nex-form-plus { flex: 0 0 auto; }
.nex-form-choix { display: flex; flex-direction: column; gap: .3rem; padding-top: .4rem; }
.nex-form-choix-ligne { flex-direction: row; flex-wrap: wrap; gap: .3rem 1.25rem; }
.nex-form-choix .form-check { margin: 0; }
.nex-form-boutons .btn { --bs-btn-padding-y: .3rem; --bs-btn-font-size: .8125rem; }
.nex-form-etoiles { display: inline-flex; align-items: center; gap: .1rem; padding-top: .3rem; border-radius: var(--bs-border-radius); }
.nex-form-etoiles:focus-visible { outline: 2px solid var(--nex-primary); outline-offset: 2px; }
.nex-form-etoiles button { padding: .1rem .15rem; border: 0; background: none; color: var(--bs-border-color); font-size: 1.15rem; line-height: 1; }
.nex-form-etoiles button.active { color: var(--nex-orange, #f59c1a); }
.nex-form-etoiles:hover button { color: var(--bs-border-color); }
.nex-form-etoiles button:hover, .nex-form-etoiles button:has(~ button:hover) { color: color-mix(in srgb, var(--nex-orange, #f59c1a) 70%, transparent) !important; }
.nex-form-etoiles-valeur { margin-left: .5rem; font-size: .8125rem; color: var(--bs-secondary-color); }
.nex-form-curseur { display: flex; align-items: center; gap: .85rem; padding-top: .35rem; max-width: 24rem; }
.nex-form-curseur .form-range { flex: 1 1 auto; }
.nex-form-curseur-valeur { min-width: 3.5rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.nex-form-nuancier { display: flex; gap: .4rem; max-width: 14rem; }
.nex-form-nuancier .form-control-color { flex: 0 0 3rem; }
/* classe de couleur du thème (type couleur) : grille de la charte, base puis nuances 100 à 900 */
.nex-form-palette { padding-top: .3rem; }
.nex-form-palette-grille { display: flex; flex-direction: column; gap: 2px; overflow-x: auto; }
.nex-form-palette-ligne { display: flex; align-items: center; gap: 2px; }
.nex-form-palette-titre { flex: 0 0 5.5rem; font-size: .75rem; color: var(--bs-secondary-color); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nex-form-palette-ligne button { display: inline-flex; align-items: center; justify-content: center; flex: 1 1 0; min-width: 1.4rem; max-width: 2.4rem; height: 1.15rem;
	padding: 0; border: 0; border-radius: .2rem; font-size: .6rem; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); }
.nex-form-palette-ligne .nex-form-palette-base { margin-right: .35rem; }
.nex-form-palette-ligne button i { opacity: 0; color: #fff; text-shadow: 0 0 2px rgba(0, 0, 0, .7); }
.nex-form-palette-ligne button:hover { outline: 1px solid var(--bs-body-color); }
.nex-form-palette-ligne button.active { outline: 2px solid var(--bs-body-color); outline-offset: 1px; position: relative; z-index: 1; }
.nex-form-palette-ligne button.active i { opacity: 1; }
.nex-form-palette-choix { display: flex; align-items: center; gap: .6rem; margin-top: .5rem; min-height: 1.6rem; font-size: .8125rem; }
.nex-form-palette-choix .btn.active { background: var(--bs-secondary-bg); }
/* couleur libre (type hex) : pastille + code, nuancier en menu déroulant */
.nex-form-nuancier { position: relative; display: flex; gap: .4rem; max-width: 14rem; }
.nex-form-nuancier-pastille { flex: 0 0 auto; width: 2.4rem; padding: .3rem; border: 1px solid var(--bs-border-color); }
.nex-form-nuancier-pastille span { display: block; width: 100%; height: 100%; min-height: 1.2rem; border-radius: .2rem; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.nex-form-nuancier-vide { background: repeating-linear-gradient(45deg, var(--bs-border-color) 0 2px, transparent 2px 6px) !important; }
.nex-form-nuancier-menu { padding: .6rem; min-width: 0; }
.nex-form-nuances { display: flex; gap: 3px; }
.nex-form-nuances + .nex-form-nuances { margin-top: 3px; }
.nex-form-nuances:first-child { margin-bottom: .5rem; }
.nex-form-nuance { width: 1.35rem; height: 1.35rem; padding: 0; border: 0; border-radius: .2rem; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1); }
.nex-form-nuance:hover { transform: scale(1.15); }
.nex-form-nuance.active { outline: 2px solid var(--bs-body-color); outline-offset: 1px; }
.nex-form-nuancier-perso { display: flex; align-items: center; gap: .5rem; margin: .6rem 0 0; font-size: .8125rem; cursor: pointer; }
.nex-form-nuancier-perso input { width: 2rem; height: 1.5rem; padding: 0; border: 0; background: none; cursor: pointer; }
/* icône (type icone) : liste fixée par le code (licence Font Awesome), recherche par nom */
.nex-form-icone { display: flex; align-items: center; gap: .25rem; }
.nex-form-icone-bouton { display: inline-flex; align-items: center; min-width: 12rem; justify-content: space-between; text-align: left; }
.nex-form-icones { width: 22rem; max-width: calc(100vw - 2rem); padding: .6rem; }
.nex-form-icones-liste { max-height: 18rem; overflow: auto; }
.nex-form-icones-groupe { margin: .35rem 0 .2rem; font-size: .6875rem; font-weight: 700; text-transform: uppercase; color: var(--bs-secondary-color); }
.nex-form-icones-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(2.1rem, 1fr)); gap: 2px; }
.nex-form-icones-grille button { height: 2.1rem; padding: 0; border: 0; border-radius: var(--bs-border-radius); background: none; color: var(--bs-body-color); }
.nex-form-icones-grille button:hover { background: var(--bs-tertiary-bg); }
.nex-form-icones-grille button.active { background: var(--nex-primary); color: var(--nex-primary-contrast); }
/* texte mis en forme (type html, Quill 2 thème snow) : couleurs du thème, clair et sombre */
.nex-form-texte-riche .ql-toolbar.ql-snow { border-color: var(--nex-champ-border, var(--bs-border-color)); border-radius: var(--bs-border-radius) var(--bs-border-radius) 0 0;
	background: var(--bs-tertiary-bg); font-family: inherit; }
.nex-form-texte-riche .ql-container.ql-snow { border-color: var(--nex-champ-border, var(--bs-border-color)); border-radius: 0 0 var(--bs-border-radius) var(--bs-border-radius);
	background: var(--nex-champ-bg, var(--bs-body-bg)); font-family: inherit; font-size: .875rem; }
.nex-form-texte-riche .ql-editor { min-height: calc(var(--nex-texte-lignes, 4) * 1.6rem); max-height: 60vh; color: var(--bs-body-color); }
.nex-form-texte-riche .ql-editor.ql-blank::before { color: var(--bs-secondary-color); font-style: normal; }
.nex-form-texte-riche .ql-editor img { max-width: 100%; border-radius: var(--bs-border-radius-sm); }
.nex-form-texte-riche .ql-snow .ql-stroke { stroke: var(--bs-body-color); }
.nex-form-texte-riche .ql-snow .ql-fill, .nex-form-texte-riche .ql-snow .ql-stroke.ql-fill { fill: var(--bs-body-color); }
.nex-form-texte-riche .ql-snow .ql-picker { color: var(--bs-body-color); }
.nex-form-texte-riche .ql-snow button:hover .ql-stroke, .nex-form-texte-riche .ql-snow button.ql-active .ql-stroke,
.nex-form-texte-riche .ql-snow .ql-picker-label:hover .ql-stroke, .nex-form-texte-riche .ql-snow .ql-picker-label.ql-active .ql-stroke { stroke: var(--nex-primary); }
.nex-form-texte-riche .ql-snow button:hover .ql-fill, .nex-form-texte-riche .ql-snow button.ql-active .ql-fill { fill: var(--nex-primary); }
.nex-form-texte-riche .ql-snow .ql-picker-label:hover, .nex-form-texte-riche .ql-snow .ql-picker-label.ql-active, .nex-form-texte-riche .ql-snow .ql-picker-item:hover,
.nex-form-texte-riche .ql-snow .ql-picker-item.ql-selected { color: var(--nex-primary); }
.nex-form-texte-riche .ql-snow .ql-picker-options { background: var(--bs-body-bg); border-color: var(--bs-border-color) !important; box-shadow: var(--bs-box-shadow-sm); }
.nex-form-texte-riche .ql-snow .ql-tooltip { z-index: 5; background: var(--bs-body-bg); color: var(--bs-body-color); border-color: var(--bs-border-color); box-shadow: var(--bs-box-shadow-sm); }
.nex-form-texte-riche .ql-snow .ql-tooltip input[type=text] { background: var(--nex-champ-bg, var(--bs-body-bg)); color: var(--bs-body-color); border-color: var(--bs-border-color); }
.nex-form-texte-riche .ql-snow a { color: var(--bs-link-color); }
.nex-form-texte-riche-etat { margin-top: .3rem; }
.nex-form-invalide .nex-form-texte-riche .ql-container, .nex-form-invalide .nex-form-texte-riche .ql-toolbar { border-color: var(--nex-danger); }
/* texte mis en forme affiché hors de l'éditeur : <div class="nex-texte-riche"> (classes de Quill gardées par le nettoyage) */
.nex-texte-riche img { max-width: 100%; height: auto; }
/* captures d'un échange : miniatures cliquables (lien data-apercu = grande fenêtre) */
.nex-miniatures a[data-apercu] { display: inline-block; vertical-align: top; margin: .25rem .5rem .25rem 0; }
.nex-miniatures a[data-apercu] img { max-height: 280px; max-width: min(480px, 100%); width: auto; border: 1px solid var(--bs-border-color); border-radius: .375rem; cursor: zoom-in; background: var(--bs-body-bg); }
.nex-texte-riche .ql-align-center { text-align: center; }
.nex-texte-riche .ql-align-right { text-align: right; }
.nex-texte-riche .ql-align-justify { text-align: justify; }
.nex-texte-riche .ql-size-small { font-size: .75em; }
.nex-texte-riche .ql-size-large { font-size: 1.5em; }
.nex-texte-riche .ql-size-huge { font-size: 2.5em; }
.nex-texte-riche .ql-indent-1 { padding-left: 3em; }
.nex-texte-riche .ql-indent-2 { padding-left: 6em; }
.nex-texte-riche .ql-indent-3 { padding-left: 9em; }
.nex-texte-riche .ql-indent-4 { padding-left: 12em; }
.nex-texte-riche .ql-indent-5 { padding-left: 15em; }
.nex-texte-riche .ql-indent-6 { padding-left: 18em; }
.nex-texte-riche .ql-indent-7 { padding-left: 21em; }
.nex-texte-riche .ql-indent-8 { padding-left: 24em; }
/* fréquence (type frequence) */
.nex-form-frequence { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .6rem; }
.nex-form-frequence > .form-select { max-width: 16rem; }
.nex-form-frequence-perso { width: auto; flex-wrap: nowrap; }
.nex-form-frequence-perso[hidden] { display: none; }
.nex-form-frequence-perso input { max-width: 5rem; }
.nex-form-frequence-apercu { flex-basis: 100%; font-size: .8125rem; color: var(--bs-secondary-color); }
.nex-form-frequence-apercu:empty { display: none; }
/* montants HT / TVA / TTC liés (saisie montants) */
.nex-form-montants { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: .5rem 1rem; }
.nex-form-montant .form-label { margin-bottom: .2rem; color: var(--bs-secondary-color); }
.nex-form-montant .form-check { margin-top: .3rem; }
.nex-form-montant-tva .form-select { flex: 0 0 6.5rem; }
.nex-form-montant-tva input[readonly] { background: var(--bs-tertiary-bg); }
/* téléphone (type tel) : drapeau + indicatif, liste des pays avec recherche */
.nex-drapeau { width: 1.25rem; height: .94rem; border-radius: .15rem; object-fit: cover; box-shadow: 0 0 0 1px rgba(0, 0, 0, .1); flex: 0 0 auto; }
.nex-form-tel { max-width: 24rem; flex-wrap: nowrap; }
.nex-form-tel-pays { display: inline-flex; align-items: center; border: 1px solid var(--nex-champ-border, var(--bs-border-color)); background: var(--nex-champ-addon-bg, var(--bs-tertiary-bg));
	font-size: .8125rem; font-variant-numeric: tabular-nums; }
.nex-form-tel-menu { width: 20rem; max-width: calc(100vw - 2rem); padding: .5rem; }
.nex-form-tel-liste { max-height: 16rem; overflow: auto; }
.nex-form-tel-liste button { display: flex; align-items: center; gap: .55rem; width: 100%; padding: .3rem .45rem; border: 0; border-radius: var(--bs-border-radius); background: none;
	color: var(--bs-body-color); font-size: .8125rem; text-align: left; }
.nex-form-tel-liste button[hidden] { display: none; }
.nex-form-tel-liste button:hover { background: var(--bs-tertiary-bg); }
.nex-form-tel-liste button.active { background: color-mix(in srgb, var(--nex-primary) 12%, transparent); color: var(--nex-primary); font-weight: 600; }
.nex-form-tel-nom { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nex-form-tel-code { color: var(--bs-secondary-color); font-variant-numeric: tabular-nums; }
/* adresse (saisie adresse) : pays, rue, complément, code postal + ville, code INSEE et GPS ; propositions en position fixe */
.nex-form-adresse { display: flex; flex-direction: column; gap: .4rem; max-width: 36rem; }
.nex-form-adresse .nex-form-adresse-pays { width: 100%; max-width: 20rem; justify-content: flex-start; }
.nex-form-adresse .nex-form-adresse-pays > i { margin-left: auto !important; }
.nex-form-adresse-ville { display: flex; gap: .4rem; }
.nex-form-adresse-ville .nex-form-adresse-cp { flex: 0 0 8rem; font-variant-numeric: tabular-nums; }
.nex-form-adresse-info { font-size: .75rem; color: var(--bs-secondary-color); font-variant-numeric: tabular-nums; }
.nex-form-adresse-info:empty { display: none; }
.nex-form-propositions { position: fixed; z-index: 1090; max-height: 16rem; overflow-y: auto; padding: .25rem; margin: 0; }
.nex-form-propositions .dropdown-item { border-radius: var(--bs-border-radius); font-size: .8125rem; padding: .35rem .55rem; white-space: normal; }
.nex-form-proposition { display: flex; align-items: baseline; gap: .75rem; }
.nex-form-proposition > span:first-child { flex: 1 1 auto; min-width: 0; }
.nex-form-proposition-detail { color: var(--bs-secondary-color); font-size: .75rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.nex-form-propositions .dropdown-item.active .nex-form-proposition-detail, .nex-form-propositions .dropdown-item:active .nex-form-proposition-detail { color: inherit; opacity: .85; }
/* pièces jointes (type fichiers) */
.nex-form-fichiers-liste { margin: 0; padding: 0; list-style: none; }
.nex-form-fichiers-liste li { display: flex; align-items: center; gap: .55rem; padding: .35rem .55rem; border: 1px solid var(--bs-border-color-translucent); border-radius: var(--bs-border-radius);
	margin-bottom: .3rem; font-size: .8125rem; }
.nex-form-fichiers-liste li > i { width: 1rem; text-align: center; color: var(--nex-primary); }
.nex-form-fichiers-liste a { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nex-form-fichier-taille { color: var(--bs-secondary-color); font-size: .75rem; white-space: nowrap; }
.nex-form-depot { display: flex; flex-direction: column; align-items: center; gap: .2rem; padding: .9rem; border: 2px dashed var(--bs-border-color); border-radius: var(--bs-border-radius-lg);
	color: var(--bs-secondary-color); font-size: .8125rem; text-align: center; cursor: pointer; }
.nex-form-depot[hidden] { display: none; }
.nex-form-depot > i { font-size: 1.4rem; color: var(--nex-primary); }
.nex-form-depot:hover, .nex-form-depot:focus-visible, .nex-form-depot.nex-depot-actif { border-color: var(--nex-primary); background: color-mix(in srgb, var(--nex-primary) 6%, transparent); outline: none; }
.nex-form-fichiers-envois { margin-top: .4rem; }
/* aperçu d'un fichier (js/apercu.js) : PDF dans une iframe, image centrée ; boutons en haut à droite */
.nex-modal-apercu .nex-modal-corps { padding: 0; overflow: hidden; display: flex; }
.nex-apercu-cadre { flex: 1 1 auto; width: 100%; min-height: 0; border: 0; background: var(--bs-tertiary-bg); }
.nex-apercu-image { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; padding: 1rem; overflow: auto; background: var(--nex-damier); }
.nex-apercu-image img { max-width: 100%; max-height: 100%; object-fit: contain; box-shadow: 0 .25rem 1rem rgba(0, 0, 0, .25); }
.nex-apercu-actions { display: flex; gap: .4rem; }
/* cellules : pièces jointes */
.nex-table-fichiers { display: inline-flex; flex-wrap: wrap; gap: .2rem .6rem; }
.nex-table-fichiers a { display: inline-flex; align-items: center; gap: .3rem; white-space: nowrap; text-decoration: none; }
.nex-table-fichiers a i { color: var(--bs-secondary-color); }
/* cellules : couleur libre */
.nex-table-hex { display: inline-flex; align-items: center; gap: .35rem; }
.nex-table-hex-pastille { display: inline-block; width: .9rem; height: .9rem; border-radius: .2rem; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }
/* groupes : icône + titre dans la couleur du thème, trait dessous */
.nex-form-groupe + .nex-form-groupe { margin-top: 1.5rem; }
/* image (type image) : vignette du tableau (comme les logos d'une liste : carré arrondi, fin liseré, image entière avec une petite
   marge ; depuis le 08/10/2026 : image entière sans cadre) ; rayon selon le thème (--nex-vignette-rayon : 10 px, 14 px pour les thèmes arrondis) ; 'forme' => 'rond' : photo de
   profil qui remplit le cercle ; taille : --nex-vignette-taille */
:root { --nex-vignette-taille: 30px; --nex-vignette-rayon: 8px; }   /* 30 px (07/10/2026, Grégory : « réduire un peu ») */
[data-nex-theme="lumen"], [data-nex-theme="cristal"], [data-nex-theme="pastel"], [data-nex-theme="horizon"], [data-nex-theme="cosmos"] { --nex-vignette-rayon: 11px; }
/* image (logo, produit) : entière comme dans la fiche, sans cadre ni fond, hauteur de la vignette, largeur selon ses proportions (2,4 fois au
   plus : logos en longueur) ; 08/10/2026, Grégory : « les logos comme dans le formulaire, pas un rond » */
.nex-table-vignette { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; width: auto;
	max-width: calc(var(--nex-vignette-taille) * 2.4); height: var(--nex-vignette-taille); padding: 0; vertical-align: middle; object-fit: contain;
	border: 0; border-radius: 3px; background: none; }
.nex-table-vignette.nex-vignette-vide { width: var(--nex-vignette-taille); border: 1px solid var(--bs-border-color); }
.nex-avatar.nex-avatar-carre { border-radius: var(--nex-vignette-rayon); }   /* initiales d'une colonne d'images non ronde (logo absent) */
.nex-table-vignette-lien { display: inline-block; line-height: 0; border-radius: var(--nex-vignette-rayon); }
.nex-table-vignette-lien:hover .nex-table-vignette { border-color: var(--nex-primary); box-shadow: 0 0 0 1px var(--nex-primary); }
.nex-vignette-vide { border-style: dashed; color: var(--bs-secondary-color); opacity: .5; font-size: .85rem; }
.nex-table-vignette.nex-vignette-vide, .nex-table-vignette.nex-vignette-vide.nex-vignette-rond { border-radius: 5px; }   /* pas d'image : vignette à coins de 5 px, même pour une colonne ronde */
.nex-table-vignette.nex-vignette-rond { width: var(--nex-vignette-taille); padding: 0; object-fit: cover; border-radius: 50%; }
.nex-table-vignette-lien:has(.nex-vignette-rond) { border-radius: 50%; }
.nex-form-image { display: flex; align-items: center; gap: 1rem; }
.nex-form-image-apercu { display: flex; flex: none; align-items: center; justify-content: center; width: 112px; height: 112px; overflow: hidden;
	border: 1px dashed var(--bs-border-color); border-radius: calc(var(--nex-vignette-rayon) * 1.4); background: var(--bs-tertiary-bg); color: var(--bs-secondary-color); font-size: 2rem; }
.nex-form-image-apercu.nex-vignette-rond { border-radius: 50%; }
.nex-form-image-apercu a, .nex-form-image-apercu img { display: block; width: 100%; height: 100%; }
.nex-form-image-apercu img { padding: 6px; object-fit: contain; }   /* image entière (logo, produit) */
.nex-form-image-apercu.nex-vignette-rond img { padding: 0; object-fit: cover; }   /* photo de profil : remplit le cercle */
.nex-form-image.nex-depot-actif .nex-form-image-apercu { border-color: var(--nex-primary); background: color-mix(in srgb, var(--nex-primary) 10%, transparent); }
.nex-form-image-actions { display: flex; flex-direction: column; gap: .4rem; min-width: 0; }
.nex-form-image-actions small { color: var(--bs-secondary-color); }

/* json dans une cellule (wss_table_json) : mini tableau, titres en gras dans la couleur du thème ; objet : « clé valeur » */
.nex-table-json { width: 100%; margin: .1rem 0; border-collapse: collapse; font-size: .6875rem; line-height: 1.3; }   /* toute la largeur de la colonne : suit son redimensionnement */
.nex-table-json th { padding: 0 .5rem .1rem 0; border-bottom: 1px solid color-mix(in srgb, var(--nex-primary) 45%, transparent); color: var(--nex-primary); font-weight: 700; white-space: nowrap; }
.nex-table-json td { padding: .1rem .5rem .1rem 0; border-bottom: 1px solid var(--bs-border-color-translucent); white-space: nowrap; }
.nex-table-json :is(th, td):last-child { padding-right: 0; }
.nex-table-json td:not(.text-end) { max-width: 0; overflow: hidden; text-overflow: ellipsis; }   /* colonne réduite : texte coupé (…), nombres entiers gardés */
.nex-table-json tr:last-child td { border-bottom: 0; }
.nex-table-json-reste td { color: var(--bs-secondary-color); font-style: italic; }
.nex-table-json-objet { display: inline-flex; flex-wrap: wrap; gap: .1rem .75rem; font-size: .6875rem; }
.nex-table-json-objet b { color: var(--nex-primary); }

/* grille (type grille) : lignes de la fiche, poignée pour réordonner, retrait */
.nex-form-grille table { margin-bottom: .5rem; }
.nex-form-grille th { color: var(--bs-secondary-color); font-size: .75rem; font-weight: 700; white-space: nowrap; }
.nex-form-grille .nex-form-grille-poignee { width: 1.5rem; padding-left: 0; padding-right: 0; text-align: center; }
.nex-form-grille [data-grille-poignee] { color: var(--bs-secondary-color); cursor: grab; }
.nex-form-grille .nex-form-grille-retirer { width: 2rem; text-align: center; }
.nex-form-grille tr.nex-form-grille-cible td { box-shadow: inset 0 2px 0 var(--nex-primary); }

/* pourcentage : barre sous le champ, remplie selon la valeur tapée (animée) ; au-delà de 100 % : pleine, couleur d'alerte */
.nex-form-pourcent { height: 4px; margin-top: .35rem; overflow: hidden; border-radius: 2px; background: var(--bs-tertiary-bg); }
.nex-form-pourcent > span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--nex-primary); transition: width .3s ease, background-color .3s; }
.nex-form-pourcent.nex-depasse > span { background: var(--bs-warning); }
@media (prefers-reduced-motion: reduce) { .nex-form-pourcent > span { transition: none; } }
.nex-cellule-champ .nex-form-pourcent { display: none; }   /* modification dans la cellule : champ seul */
/* modification en série : fiche à droite (seule elle défile) ; liste des lignes à gauche, affichée par le bouton en haut à gauche de
   l'en-tête : fenêtre élargie et de hauteur fixe d'une ligne à l'autre */
.nex-form-serie .nex-modal-corps { display: flex; padding: 0; overflow: hidden; }
dialog.nex-form-serie-liste { height: calc(100vh - 3.5rem); }
dialog.nex-form-serie-liste:is(.nex-modal-sm, .nex-modal-md, .nex-modal-lg, .nex-modal-xl) { --nex-modal-l: 84rem; }   /* xxl et plus : gardent leur largeur */
.nex-serie { display: flex; flex: 1; min-width: 0; min-height: 0; }
.nex-serie-liste { display: none; flex: 0 0 18rem; flex-direction: column; min-height: 0; border-right: 1px solid var(--bs-border-color-translucent);
	background: color-mix(in srgb, var(--nex-primary) 3%, var(--bs-tertiary-bg)); }
.nex-form-serie-liste .nex-serie-liste { display: flex; }
.nex-serie-bascule[aria-pressed="true"] { background: rgba(255, 255, 255, .25); }
.nex-serie-recherche { padding: .6rem; border-bottom: 1px solid var(--bs-border-color-translucent); }
.nex-serie-lignes { position: relative; flex: 1; min-height: 0; overflow: auto; padding: .35rem; }
.nex-serie-ligne { position: relative; display: flex; flex-direction: column; width: 100%; padding: .45rem 1.7rem .45rem .65rem; border: 0;
	border-radius: var(--bs-border-radius); background: none; color: inherit; font-size: .8125rem; text-align: left; }
.nex-serie-ligne + .nex-serie-ligne { margin-top: 1px; }
.nex-serie-ligne:hover { background: var(--bs-secondary-bg); }
.nex-serie-ligne.active { background: color-mix(in srgb, var(--nex-primary) 14%, transparent); box-shadow: inset 3px 0 0 var(--nex-primary); }
.nex-serie-titre, .nex-serie-detail { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nex-serie-titre { font-weight: 600; }
.nex-serie-detail { color: var(--bs-secondary-color); font-size: .75rem; line-height: 1.35; }
.nex-serie-ok { position: absolute; top: .55rem; right: .55rem; color: var(--bs-success); }
.nex-serie-vide { padding: .75rem; color: var(--bs-secondary-color); font-size: .8125rem; }
.nex-serie-fiche { position: relative; flex: 1; min-width: 0; min-height: 0; overflow: auto; padding: 1.25rem; }
.nex-serie-position { background: rgba(0, 0, 0, .2); font-weight: 600; }
.nex-modal-formulaire .nex-modal-pied [data-bouton="ligne_suivante"] { margin-right: auto; }   /* Annuler, Précédente, Suivante à gauche ; enregistrer à droite */
@media (max-width: 767.98px) { .nex-serie-liste, .nex-serie-bascule { display: none !important; } }   /* petit écran : Précédente / Suivante seulement */
.nex-form-onglets ~ .nex-form-groupes .nex-form-groupe-titre, .nex-form-etapes ~ .nex-form-groupes .nex-form-groupe-titre { display: none; }   /* titre déjà sur l'onglet ou l'étape */
.nex-form-groupe[hidden] { display: none; }
.nex-form-groupe-titre { display: flex; align-items: center; gap: .55rem; padding-bottom: .4rem; margin-bottom: .25rem; font-size: .9375rem; font-weight: 700; color: var(--nex-primary);
	border-bottom: 2px solid color-mix(in srgb, var(--nex-primary) 30%, transparent); }
.nex-form-groupe-description { margin: .35rem 0 .25rem; font-size: .8125rem; color: var(--bs-secondary-color); }
/* contenu en lecture fourni par le module (HTML déjà nettoyé côté serveur) : ex. conversation d'un ticket au-dessus de la réponse */
/* fiche avec panneau de gauche (option 'panneau') : colonne de lecture qui défile, fiche à droite ; empilés sous 992 px */
.nex-form-avec-panneau { display: grid; grid-template-columns: minmax(18rem, 36%) minmax(0, 1fr); gap: 1rem; align-items: start; }
.nex-form-panneau { position: sticky; top: 0; display: flex; flex-direction: column; max-height: min(70vh, 40rem); border: 1px solid var(--bs-border-color); border-radius: .5rem; background: var(--bs-tertiary-bg); overflow: hidden; }
.nex-form-panneau-titre { padding: .5rem .75rem; font-size: .8125rem; font-weight: 600; color: var(--bs-secondary-color); border-bottom: 1px solid var(--bs-border-color); }
.nex-form-panneau-corps { overflow: auto; padding: .5rem; }
.nex-form-colonne { min-width: 0; }
@media (max-width: 991.98px) { .nex-form-avec-panneau { grid-template-columns: minmax(0, 1fr); } .nex-form-panneau { position: static; max-height: 18rem; } }
.nex-form-groupe-apercu { margin: .5rem 0 .75rem; max-height: 18rem; overflow: auto; border: 1px solid var(--bs-border-color); border-radius: .375rem; background: var(--bs-tertiary-bg); }
/* multi-entités : entité de la nouvelle donnée (imposée par l'en-tête, couleur de l'entité ; ou à choisir) */
.nex-form-bandeau-entite { display: flex; align-items: center; gap: .75rem; margin-bottom: .75rem; padding: .6rem .9rem; border-radius: var(--bs-border-radius);
	border: 1px solid color-mix(in srgb, var(--nex-be) 45%, transparent); border-left: 4px solid var(--nex-be);
	background: color-mix(in srgb, var(--nex-be) 12%, var(--bs-body-bg)); font-size: .8125rem; }
.nex-form-bandeau-entite > i { font-size: 1.35rem; color: var(--nex-be); flex: none; }
.nex-form-bandeau-entite b { font-size: .9375rem; }
.nex-form-bandeau-entite .small { color: var(--bs-secondary-color); }
.nex-form-bandeau-choix { border-left-style: dashed; }
/* présentation « page » : sommaire des groupes à gauche, fixe au défilement, groupe courant marqué d'un trait à droite */
.nex-form-page { display: grid; grid-template-columns: 11.5rem minmax(0, 1fr); gap: 1.5rem; }
.nex-form-page.nex-form-sans-sommaire { grid-template-columns: minmax(0, 1fr); }
/* sommaire masqué quand la fiche tient sans défiler (formulaire.js, 08/10/2026) */
.nex-form-page.nex-form-sommaire-inutile { grid-template-columns: minmax(0, 1fr); }
.nex-form-sommaire-inutile .nex-form-sommaire { display: none; }
.nex-form-sommaire { position: sticky; top: 0; align-self: start; display: flex; flex-direction: column; gap: .15rem; }
/* formulaire hors tableau posé dans une page (cadreEnLigne de formulaire.js) : la page défile, sommaire sous l'en-tête, boutons en bas */
.nex-form-en-ligne .nex-modal-corps { overflow: visible; }
.nex-form-en-ligne .nex-form-sommaire { top: calc(var(--nex-header-h, 3.5rem) + 1rem); }
.nex-form-en-ligne .nex-modal-pied { position: sticky; bottom: 0; z-index: 2; background: var(--bs-card-cap-bg, var(--bs-body-bg)); }
.nex-form-sommaire-lien { display: flex; align-items: center; gap: .55rem; padding: .45rem .7rem; border-right: 3px solid transparent; border-radius: var(--bs-border-radius) 0 0 var(--bs-border-radius);
	color: var(--bs-body-color); font-size: .8125rem; text-decoration: none; }
.nex-form-sommaire-lien i { width: 1rem; text-align: center; color: var(--bs-secondary-color); }
.nex-form-sommaire-lien:hover { background: var(--bs-tertiary-bg); color: var(--bs-body-color); }
.nex-form-sommaire-lien.active { border-right-color: var(--nex-primary); background: color-mix(in srgb, var(--nex-primary) 10%, transparent); color: var(--nex-primary); font-weight: 600; }
.nex-form-sommaire-lien.active i { color: var(--nex-primary); }
/* présentation « onglets » */
.nex-form-onglets { margin-bottom: 1rem; }
.nex-form-onglets .nav-link { display: flex; align-items: center; gap: .45rem; font-size: .8125rem; }
/* présentation « assistant » : étapes numérotées reliées par un trait */
.nex-form-etapes { display: flex; margin: 0 0 1.25rem; padding: 0; list-style: none; }
.nex-form-etapes li { position: relative; flex: 1 1 0; min-width: 0; }
.nex-form-etapes li + li::before { content: ''; position: absolute; top: .9rem; right: 50%; left: -50%; height: 2px; background: var(--bs-border-color); }
.nex-form-etapes li.nex-form-etape-faite + li::before, .nex-form-etapes li.nex-form-etape-faite::before { background: var(--nex-primary); }
.nex-form-etapes button { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: .35rem; width: 100%; padding: 0; border: 0; background: none; color: var(--bs-secondary-color); font-size: .8125rem; }
.nex-form-etape-numero { display: inline-flex; align-items: center; justify-content: center; width: 1.85rem; height: 1.85rem; border: 2px solid var(--bs-border-color); border-radius: 50%;
	background: var(--nex-modal-bg, var(--bs-body-bg)); font-weight: 700; }   /* fond de la fenêtre : le trait passe derrière le rond */
.nex-form-etape-numero i { display: none; }
.nex-form-etape-titre { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nex-form-etapes button.active { color: var(--nex-primary); font-weight: 600; }
.nex-form-etapes button.active .nex-form-etape-numero { border-color: var(--nex-primary); background: var(--nex-primary); color: var(--nex-primary-contrast); }
.nex-form-etape-faite button { color: var(--bs-body-color); }
.nex-form-etape-faite .nex-form-etape-numero { border-color: var(--nex-primary); color: var(--nex-primary); }
.nex-form-etape-faite .nex-form-etape-numero span { display: none; }
.nex-form-etape-faite .nex-form-etape-numero i { display: inline; }
.nex-form-etapes button:not(.active):hover .nex-form-etape-numero { border-color: var(--nex-primary); }   /* toute étape se clique (plus loin : comme « Suivant ») */
/* petit écran : libellé au-dessus du champ, sommaire masqué */
@media (max-width: 767.98px) {
	.nex-form-ligne { grid-template-columns: minmax(0, 1fr); }
	.nex-form-libelle { padding-top: 0; text-align: left; }
	.nex-form-page { grid-template-columns: minmax(0, 1fr); }
	.nex-form-sommaire { display: none; }
	.nex-form-etape-titre { display: none; }
}

/* ---------------------------------------------------------------- Aide (page Aide, articles de wss/core/aide.php) */
.nex-aide-recherche { position: relative; }
.nex-aide-recherche > i { position: absolute; top: 50%; left: 1rem; transform: translateY(-50%); color: var(--bs-secondary-color); }
.nex-aide-recherche .form-control { padding-left: 2.6rem; }
.nex-aide-page { padding-top: .55rem; padding-bottom: .35rem; background: var(--bs-tertiary-bg); color: var(--bs-secondary-color); font-size: .75rem; font-weight: 700;
	text-transform: uppercase; letter-spacing: .03em; }
.nex-aide-element[hidden], .nex-aide-page[hidden] { display: none; }
.nex-aide-cote { position: sticky; top: 4.5rem; }
.nex-aide-chemin a { text-decoration: none; }
.nex-aide-resume { color: var(--bs-secondary-color); font-size: 1rem; }
.nex-aide-contenu { max-width: 52rem; font-size: .9375rem; line-height: 1.6; }
.nex-aide-contenu h2 { margin: 1.75rem 0 .6rem; padding-bottom: .3rem; border-bottom: 2px solid color-mix(in srgb, var(--nex-primary) 30%, transparent);
	color: var(--nex-primary); font-size: 1.2rem; font-weight: 700; scroll-margin-top: 5rem; }
.nex-aide-contenu h3 { margin: 1.2rem 0 .4rem; font-size: 1rem; font-weight: 700; }
.nex-aide-num { opacity: .7; }
.nex-aide-contenu table.data { width: 100%; margin: .6rem 0 1rem; border-collapse: collapse; font-size: .875rem; }
.nex-aide-contenu table.data th { padding: .4rem .6rem; background: var(--nex-primary); color: var(--nex-primary-contrast, #fff); text-align: left; }
.nex-aide-contenu table.data td { padding: .4rem .6rem; border-bottom: 1px solid var(--bs-border-color); vertical-align: top; }
.nex-aide-contenu table.data tbody tr:nth-child(odd) td { background: color-mix(in srgb, var(--nex-primary) 6%, transparent); }
.nex-aide-contenu .alerte { margin: .8rem 0; padding: .7rem 1rem; border: 1px solid var(--bs-warning); border-radius: var(--bs-border-radius);
	background: color-mix(in srgb, var(--bs-warning) 10%, transparent); }
.nex-aide-contenu .cite { margin: .8rem 0; padding: .6rem 1rem; border-left: 3px solid var(--nex-primary); background: color-mix(in srgb, var(--nex-primary) 6%, transparent); }
.nex-aide-contenu kbd { font-size: .8em; }
.nex-aide-capture { display: flex; align-items: center; justify-content: center; gap: .6rem; min-height: 6rem; margin: .8rem 0 1rem; padding: 1rem;
	border: 2px dashed var(--bs-border-color); border-radius: var(--bs-border-radius-lg); background: var(--bs-tertiary-bg); color: var(--bs-secondary-color);
	font-size: .875rem; text-align: center; }
.nex-aide-capture i { font-size: 1.4rem; opacity: .6; }
.nex-aide-figure { margin: .8rem 0 1rem; text-align: center; }
.nex-aide-figure img { max-width: 100%; border: 1px solid var(--bs-border-color); border-radius: var(--bs-border-radius-lg); box-shadow: 0 .25rem 1rem rgba(0, 0, 0, .08); }
.nex-aide-figure figcaption { margin-top: .35rem; color: var(--bs-secondary-color); font-size: .8125rem; }
.nex-header-aide { min-width: 15rem; }
@media (max-width: 1199.98px) { .nex-aide-cote { position: static; } }

/* ---------------------------------------------------------------- Profils d'accès (Administration > Profils d'accès) */
.nex-profil-groupe { padding-top: .6rem; padding-bottom: .3rem; background: var(--bs-tertiary-bg); color: var(--bs-secondary-color); font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.nex-profil-droit { display: flex; align-items: flex-start; gap: .75rem; cursor: pointer; }
.nex-profil-droit .form-check-input { flex: none; margin-top: .2rem; }
.nex-profil-droit-texte { min-width: 0; }
.nex-profil-ouvre { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .3rem; }
.nex-profil-ouvre .badge { font-weight: 500; }
.nex-profil-pied { position: sticky; bottom: 0; z-index: 2; display: flex; gap: .5rem; padding: .75rem 0; background: var(--nex-content-bg, var(--bs-body-bg)); }

/* ---------------------------------------------------------------- Générateur de déclarations (Framework > Générateur) */
/* réglages à gauche, code généré à droite (collé en haut au défilement) ; une colonne sous 1200 px */
.nex-generateur { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 1rem; align-items: start; }
.nex-generateur-droite { position: sticky; top: 4.5rem; }
.nex-generateur-code .nex-exemple-code { border-top: 0; }
.nex-generateur-code .nex-exemple-code pre { max-height: calc(100vh - 17rem); }
.nex-generateur-onglets { gap: .25rem; padding: .5rem .75rem; }
.nex-generateur-onglets .nav-link { padding: .2rem .6rem; font-size: .8125rem; }
.nex-generateur-alertes { padding: .75rem; }
.nex-gen-section { margin-bottom: .75rem; }
.nex-gen-section > summary { cursor: pointer; list-style: none; }
.nex-gen-section > summary::-webkit-details-marker { display: none; }
.nex-gen-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: .6rem .9rem; }
.nex-gen-option-large { grid-column: 1 / -1; }
.nex-gen-libelle { display: block; margin-bottom: .15rem; font-size: .75rem; font-weight: 600; }
.nex-gen-aide { margin-top: .15rem; color: var(--bs-secondary-color); font-size: .6875rem; line-height: 1.3; }
.nex-gen-plus { margin-top: .6rem; }
.nex-gen-plus > summary { color: var(--nex-primary); font-size: .8125rem; cursor: pointer; }
.nex-gen-plus[open] > summary { margin-bottom: .5rem; }
.nex-gen-colonne, .nex-gen-champ { margin-bottom: .5rem; padding: .45rem .7rem; border: 1px solid var(--bs-border-color); border-radius: var(--bs-border-radius); }
.nex-gen-colonne > summary, .nex-gen-champ > summary { display: flex; align-items: center; gap: .5rem; cursor: pointer; font-size: .8125rem; }
.nex-gen-colonne[open] > summary, .nex-gen-champ[open] > summary { margin-bottom: .6rem; }
.nex-gen-colonne-titre { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nex-gen-boutons { display: inline-flex; gap: .6rem; margin-left: auto; }
.nex-gen-groupe { margin-top: .75rem; padding: .75rem; border: 1px dashed var(--bs-border-color); border-radius: var(--bs-border-radius-lg); }
.nex-gen-groupe-entete { display: flex; align-items: center; margin-bottom: .5rem; }
.nex-gen-champs { margin-top: .6rem; }
.nex-generateur-reference td { vertical-align: top; }
.nex-generateur-exemple code { display: block; max-width: 32rem; white-space: pre-wrap; font-size: .6875rem; }
@media (max-width: 1199.98px) { .nex-generateur { grid-template-columns: minmax(0, 1fr); } .nex-generateur-droite { position: static; } }

/* ---------------------------------------------------------------- Page d'erreur (wss_http_page_erreur, router.php) */
/* code en grand dans la couleur du thème, icône qui flotte, message d'humour ; suit le thème et le mode de l'utilisateur */
.nex-erreur { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: calc(100vh - 9rem); max-width: 40rem;
	margin: 0 auto; padding: 2rem 1rem; text-align: center; }
.nex-erreur-illustration { position: relative; margin-bottom: 1rem; }
.nex-erreur-code { display: block; font-size: clamp(6rem, 18vw, 10rem); font-weight: 800; line-height: 1; letter-spacing: -.04em;
	background: linear-gradient(135deg, var(--nex-primary), color-mix(in srgb, var(--nex-primary) 35%, var(--bs-body-bg)));
	-webkit-background-clip: text; background-clip: text; color: transparent; user-select: none; }
.nex-erreur-icone { position: absolute; right: -1.6rem; bottom: -.9rem; --nex-logo-anime-taille: 5.25rem; }
.nex-erreur-titre { margin: .5rem 0 .4rem; font-size: 1.6rem; font-weight: 700; }
.nex-erreur-humour { margin-bottom: .5rem; color: var(--bs-secondary-color); font-size: 1rem; }
.nex-erreur-detail { max-width: 100%; margin-bottom: .5rem; padding: .4rem .75rem; overflow-wrap: anywhere; border-radius: var(--bs-border-radius);
	background: var(--bs-tertiary-bg); color: var(--bs-secondary-color); font-size: .8125rem; }
.nex-erreur-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-top: 1rem; }
.nex-erreur-support { margin-top: 1.25rem; color: var(--bs-secondary-color); font-size: .8125rem; }
@keyframes nex-erreur-flotte { 50% { transform: translateY(-.5rem) rotate(-6deg); } }

/* symbole Orinexis animé (12/10/2026, demande de Grégory : pages d'erreur, puis chargement des pages avec le squelette) : pastille, arrivée en tournant, source
   ambrée qui respire, onde de la couleur du thème ; --nex-logo-anime-taille (5.25rem), --nex-logo-anime-delai (départ des animations) ; immobile si « réduire
   les animations ». HTML : <span class="nex-logo-anime"><img src="(symbole)" alt=""></span> (squelette.js : logoAnime()). */
.nex-logo-anime { position: relative; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
	width: var(--nex-logo-anime-taille, 5.25rem); height: var(--nex-logo-anime-taille, 5.25rem); border-radius: 50%;
	border: 3px solid color-mix(in srgb, var(--nex-primary) 45%, var(--bs-body-bg)); color: var(--nex-primary-contrast, #fff); font-size: 1.75rem;
	background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--bs-body-bg) 70%, #fff), var(--bs-body-bg) 70%);
	box-shadow: 0 .5rem 1.5rem color-mix(in srgb, var(--nex-primary) 35%, transparent); animation: nex-erreur-flotte 3.2s ease-in-out var(--nex-logo-anime-delai, 0s) infinite; }
.nex-logo-anime > img { width: 86%; height: 86%; object-fit: contain;
	animation: nex-logo-arrivee 1.1s cubic-bezier(.2, .8, .2, 1) var(--nex-logo-anime-delai, 0s) both,
		nex-logo-respire 2.6s ease-in-out calc(var(--nex-logo-anime-delai, 0s) + 1.1s) infinite alternate; }
.nex-logo-anime::after { content: ''; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid var(--nex-primary); opacity: 0; pointer-events: none;
	animation: nex-logo-onde 2.6s ease-out calc(var(--nex-logo-anime-delai, 0s) + 1.1s) infinite; }
@keyframes nex-logo-arrivee { from { opacity: 0; transform: rotate(-200deg) scale(.3); } 70% { opacity: 1; transform: rotate(12deg) scale(1.06); } to { transform: none; } }
@keyframes nex-logo-respire { from { filter: drop-shadow(0 0 .1rem rgba(255, 194, 61, .25)); } to { filter: drop-shadow(0 0 .6rem rgba(255, 194, 61, .65)); transform: scale(1.04); } }
@keyframes nex-logo-onde { from { opacity: .55; transform: scale(1); } to { opacity: 0; transform: scale(1.55); } }
@media (prefers-reduced-motion: reduce) { .nex-logo-anime, .nex-logo-anime > img, .nex-logo-anime::after { animation: none; } }

/* chargement d'une page (nav.js) : symbole animé au centre du squelette, seulement si l'attente dure (450 ms après le squelette : pas d'éclair au chargement rapide) */
.nex-squelette { position: relative; }
.nex-squelette-logo { position: absolute; z-index: 2; top: clamp(6rem, 28vh, 16rem); left: 50%; display: flex; flex-direction: column; align-items: center; gap: .75rem;
	transform: translateX(-50%); color: var(--bs-secondary-color); font-size: .8125rem; pointer-events: none;
	--nex-logo-anime-taille: 4.5rem; --nex-logo-anime-delai: .45s; animation: nex-chargeur-apparait .35s ease .45s both; }
@keyframes nex-chargeur-apparait { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .nex-squelette-logo { animation: none; } }

/* ---------------------------------------------------------------- Messages éphémères (toast.js) */
/* popover : couche supérieure du navigateur, au-dessus des fenêtres ; affichée seulement quand elle est ouverte */
.nex-toasts { position: fixed; inset: 4rem 1rem auto auto; width: min(24rem, calc(100vw - 2rem)); height: auto; margin: 0; padding: 0; overflow: visible;
	border: 0; background: none; color: var(--bs-body-color); }
.nex-toasts:popover-open { display: flex; flex-direction: column; gap: .5rem; }
.nex-toast { --nex-notif: var(--bs-info); position: relative; display: flex; align-items: flex-start; gap: .65rem; overflow: hidden; padding: .7rem .75rem .8rem .85rem;
	border: 1px solid color-mix(in srgb, var(--nex-notif) 35%, var(--bs-border-color)); border-left: 4px solid var(--nex-notif); border-radius: var(--bs-border-radius-lg);
	background: color-mix(in srgb, var(--nex-notif) 9%, var(--bs-body-bg)); box-shadow: 0 .5rem 1.5rem rgba(0, 0, 0, .18); font-size: .8125rem;
	animation: nex-toast-entree .2s ease-out; }
.nex-toast-success { --nex-notif: var(--bs-success); }
.nex-toast-danger { --nex-notif: var(--bs-danger); }
.nex-toast-warning { --nex-notif: var(--bs-warning); }
.nex-toast-icone { margin-top: .1rem; color: var(--nex-notif); font-size: 1rem; }
.nex-toast-texte { display: flex; flex: 1; flex-direction: column; gap: .1rem; min-width: 0; overflow-wrap: anywhere; }
.nex-toast .btn-close { flex: none; margin-top: .1rem; font-size: .6rem; }
/* temps restant : la barre se vide, la notification part à la fin ; arrêtée au survol */
.nex-toast-temps { position: absolute; bottom: 0; left: 0; height: 3px; background: var(--nex-notif); opacity: .6; animation: nex-toast-temps linear forwards; }
.nex-toast:hover .nex-toast-temps, .nex-toast:focus-within .nex-toast-temps { animation-play-state: paused; }
.nex-toast-sortie { opacity: 0; transform: translateX(1rem); transition: opacity .2s, transform .2s; }
@keyframes nex-toast-entree { from { opacity: 0; transform: translateX(1rem); } }
@keyframes nex-toast-temps { from { width: 100%; } to { width: 0; } }
@media (prefers-reduced-motion: reduce) {
	.nex-toast { animation: none; }
	.nex-toast-sortie { transition: none; }
	.nex-toast-temps { opacity: 0; }   /* la barre décompte toujours le temps, sans se voir */
}

/* ---------------------------------------------------------------- Rognage (rognage.js) */
/* damier : montre la transparence d'une image (rognage, vignettes de la banque, envois) */
:root { --nex-damier: repeating-conic-gradient(var(--bs-tertiary-bg) 0 25%, var(--bs-secondary-bg) 0 50%) 0 0 / 12px 12px; }
.nex-rognage-cadre-ext { display: flex; justify-content: center; background: var(--nex-damier); border-radius: var(--bs-border-radius); }
.nex-rognage { position: relative; display: inline-block; overflow: hidden; touch-action: none; user-select: none; }
.nex-rognage img { display: block; max-width: 100%; max-height: 60vh; }
.nex-rognage-cadre {
	position: absolute; cursor: move; outline: 1px solid rgba(255, 255, 255, .9); box-shadow: 0 0 0 9999px rgba(0, 0, 0, .55);
	background-image: linear-gradient(rgba(255, 255, 255, .35) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .35) 1px, transparent 1px);
	background-size: 33.333% 33.333%; background-position: -1px -1px;   /* grille des tiers */
}
.nex-rognage-cadre:focus-visible { outline: 2px solid var(--nex-primary); }
.nex-rognage-poignee { position: absolute; width: 14px; height: 14px; background: #fff; border: 2px solid var(--nex-primary); border-radius: 50%; transform: translate(-50%, -50%); }
.nex-rognage-poignee[data-poignee=nw] { left: 0; top: 0; cursor: nwse-resize; }
.nex-rognage-poignee[data-poignee=n]  { left: 50%; top: 0; cursor: ns-resize; }
.nex-rognage-poignee[data-poignee=ne] { left: 100%; top: 0; cursor: nesw-resize; }
.nex-rognage-poignee[data-poignee=e]  { left: 100%; top: 50%; cursor: ew-resize; }
.nex-rognage-poignee[data-poignee=se] { left: 100%; top: 100%; cursor: nwse-resize; }
.nex-rognage-poignee[data-poignee=s]  { left: 50%; top: 100%; cursor: ns-resize; }
.nex-rognage-poignee[data-poignee=sw] { left: 0; top: 100%; cursor: nesw-resize; }
.nex-rognage-poignee[data-poignee=w]  { left: 0; top: 50%; cursor: ew-resize; }
.nex-rognage-proportion .nex-rognage-poignee:is([data-poignee=n], [data-poignee=e], [data-poignee=s], [data-poignee=w]) { display: none; }   /* proportion imposée : coins seulement */

/* ---------------------------------------------------------------- Envoi de fichiers (televersement.js) */
.nex-televersement { display: flex; align-items: center; gap: .75rem; padding: .5rem .75rem; border: 1px solid var(--bs-border-color-translucent); border-radius: var(--bs-border-radius); margin-bottom: .5rem; background: var(--bs-tertiary-bg); }
.nex-televersement-apercu { flex: none; display: flex; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; border-radius: .3rem; overflow: hidden; background: var(--nex-damier); color: var(--bs-secondary-color); }
.nex-televersement-apercu img { width: 100%; height: 100%; object-fit: cover; }
.nex-televersement-infos { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .2rem; }
.nex-televersement-nom { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nex-televersement-etat { font-size: var(--nex-font-sm); color: var(--bs-secondary-color); }
.nex-televersement .progress { height: 4px; }
.nex-televersement-ok .progress-bar { background: var(--nex-success); }
.nex-televersement-erreur { border-color: var(--nex-danger-300); }
.nex-televersement-erreur .nex-televersement-etat { color: var(--nex-danger); }
.nex-televersement-erreur .progress-bar, .nex-televersement-annule .progress-bar { background: var(--nex-gray-400); }

/* ---------------------------------------------------------------- Banque d'images (images.js) */
.nex-banque-outils { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: .75rem; }
.nex-banque-recherche { width: 16rem; }
.nex-banque-envois:empty { display: none; }
.nex-banque-envois { max-height: 12rem; overflow: auto; margin-bottom: .75rem; }
.nex-banque-zone { position: relative; min-height: 18rem; }
.nex-banque-depot { position: absolute; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; border: 2px dashed var(--nex-primary); border-radius: var(--bs-border-radius-lg); background: color-mix(in srgb, var(--nex-primary) 10%, var(--bs-body-bg)); color: var(--nex-primary); font-weight: 600; }
.nex-banque-depot i { font-size: 2.5rem; }
.nex-depot-actif .nex-depot-possible .nex-banque-depot { display: flex; }
.nex-banque-blocs { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: .75rem; }
.nex-banque-bloc { position: relative; display: flex; flex-direction: column; padding: 0; border: 2px solid transparent; border-radius: var(--bs-border-radius-lg); background: var(--bs-tertiary-bg); color: inherit; text-align: left; overflow: hidden; cursor: pointer; user-select: none; }
.nex-banque-bloc:focus-visible { outline: 2px solid var(--nex-primary); outline-offset: 2px; }
.nex-banque-bloc.nex-coche { border-color: var(--nex-danger-300); }
/* case à cocher (suppression groupée) en haut à gauche, étoile (photo de profil) en haut à droite */
.nex-banque-bloc .nex-banque-coche { position: absolute; top: .45rem; left: .45rem; z-index: 1; width: 1.15rem; height: 1.15rem; margin: 0; box-shadow: 0 1px 3px rgba(0, 0, 0, .35); cursor: pointer; }
.nex-banque-etoile { position: absolute; top: .4rem; right: .4rem; z-index: 1; display: flex; align-items: center; justify-content: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: rgba(0, 0, 0, .55); color: var(--nex-yellow); font-size: .75rem; }
.nex-banque-col-coche { width: 2rem; }
.nex-banque-tableau .nex-banque-coche { margin: 0; cursor: pointer; }
.nex-banque-selection { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-bottom: .75rem; padding: .4rem .75rem; border-radius: var(--bs-border-radius); background: var(--bs-tertiary-bg); font-size: var(--nex-font-sm); }
.nex-banque-selection[hidden] { display: none; }
.nex-banque-selection .form-check { min-height: 0; }
.nex-banque-bloc img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--nex-damier); }
.nex-banque-bloc-nom { padding: .4rem .6rem 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nex-banque-bloc-dim { padding: 0 .6rem .45rem; font-size: var(--nex-font-sm); color: var(--bs-secondary-color); }
.nex-banque-bloc:hover { border-color: var(--nex-primary-300); }
.nex-banque-bloc.active { border-color: var(--nex-primary); box-shadow: 0 0 0 .2rem color-mix(in srgb, var(--nex-primary) 20%, transparent); }
.nex-banque-tableau img { width: 3rem; height: 2.25rem; object-fit: cover; border-radius: .25rem; background: var(--nex-damier); }
.nex-banque-tableau tbody tr { cursor: pointer; }
.nex-banque-tableau tr.active > td { --bs-table-bg-state: color-mix(in srgb, var(--nex-primary) 15%, transparent); }
.nex-banque-vide { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; min-height: 16rem; color: var(--bs-secondary-color); text-align: center; }
.nex-banque-vide i { font-size: 2.5rem; opacity: .5; }
.nex-banque-tailles { display: flex; gap: .25rem; margin-right: auto; }
.nex-banque-tailles .btn small { font-size: .7rem; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ tableaux de données (wss/table/, js/table.js) */
.nex-tableau { --nex-table-font: .8125rem; --nex-table-fixe-bg: var(--nex-card-bg); }
/* thèmes aux cartes translucides : fond opaque des colonnes fixes (le contenu qui défile dessous ne doit pas transparaître) */
[data-nex-theme=horizon] .nex-tableau { --nex-table-fixe-bg: #4a4d59; }
[data-nex-theme=horizon][data-nex-mode=dark] .nex-tableau { --nex-table-fixe-bg: #21232d; }
[data-nex-theme=cristal] .nex-tableau { --nex-table-fixe-bg: color-mix(in srgb, var(--nex-card-bg), var(--nex-content-bg)); }
[data-nex-theme=cosmos] .nex-tableau { --nex-table-fixe-bg: #0e1028; }
[data-nex-theme=cosmos][data-nex-mode=light] .nex-tableau { --nex-table-fixe-bg: #1b1d33; }
[data-nex-theme=terminal] .nex-tableau { --nex-table-fixe-bg: #000a02; }
[data-nex-theme=neon] .nex-tableau { --nex-table-fixe-bg: #1d0838; }
.nex-tableau-carte { overflow: visible; }
.nex-tableau-carte > .card-header small { font-weight: 600; }

/* onglets filtrants avec compteurs */
.nex-tableau-onglets { padding: .5rem .75rem 0; border-bottom: 1px solid var(--bs-border-color); flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
.nex-tableau-onglets .nav-link { white-space: nowrap; font-size: var(--nex-table-font); padding: .45rem .8rem; color: var(--bs-secondary-color); }
.nex-tableau-onglets .nav-link.active { color: var(--bs-body-color); font-weight: 600; }
.nex-tableau-onglets .badge { font-weight: 600; font-size: .6875rem; }
.nex-tableau-onglets .text-bg-light { background: var(--bs-secondary-bg) !important; color: var(--bs-secondary-color) !important; }

/* filtres simples : titre + badge de l'opérateur (menu), champ dessous ; bouton effacer et lien du filtre avancé à droite */
.nex-tableau-simples, .nex-tableau-avance { padding: .7rem .75rem .6rem; border-bottom: 1px solid var(--bs-border-color); background: var(--bs-tertiary-bg); }
.nex-tableau-simples[hidden], .nex-tableau-avance[hidden] { display: none; }
.nex-filtres-simples { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .6rem .75rem; }
.nex-filtre { flex: 1 1 12rem; max-width: 20rem; min-width: 10rem; }
.nex-filtre-titre { display: flex; align-items: center; gap: .35rem; margin-bottom: .25rem; height: 1.4rem; }
.nex-filtre-titre label { flex: 1 1 auto; font-size: var(--nex-table-font); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nex-filtre-actif .nex-filtre-titre label { color: var(--nex-primary); }
.nex-filtre-op { display: inline-flex; align-items: center; padding: .05rem .35rem; border: 1px solid var(--nex-primary); border-radius: .3rem; background: transparent;
	color: var(--nex-primary); font-size: .6875rem; font-weight: 700; line-height: 1.3; white-space: nowrap; }
.nex-filtre-op::after { display: none; }
.nex-filtre-op i { font-size: .625rem; }
.nex-filtre-op.modifie { border-color: var(--nex-orange); color: var(--nex-orange); }
.nex-filtre-symbole { display: inline-block; min-width: 2.75rem; margin-right: .5rem; font-weight: 700; color: var(--bs-secondary-color); }
.nex-filtre-valeur { display: flex; gap: .3rem; min-width: 0; }
.nex-filtre-valeur > * { min-width: 0; }
.nex-filtre-valeur > .form-control, .nex-filtre-valeur > .form-select, .nex-filtre-valeur > .ts-wrapper { flex: 1 1 0; }
.nex-filtre-sans-valeur { color: var(--bs-secondary-color); font-style: italic; background: transparent; }
.nex-filtres-pied { display: flex; align-items: center; gap: 1rem; margin-top: .45rem; }
.nex-filtres-pied:not(:has(> :not([hidden]))) { display: none; }
.nex-filtres-pied .btn-link { font-size: var(--nex-table-font); text-decoration: none; }
.nex-filtres-pied .btn-link:hover { text-decoration: underline; }

/* filtre avancé : conditions reliées par ET / OU */
.nex-filtres-conditions-titre { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-bottom: .5rem; font-size: var(--nex-table-font); font-weight: 600; }
.nex-filtres-conditions-titre [hidden] { display: none; }
.nex-groupe { padding: .5rem .6rem .25rem; border: 1px dashed color-mix(in srgb, var(--nex-primary) 40%, var(--bs-border-color)); border-radius: var(--bs-border-radius-lg); background: var(--bs-body-bg); }
.nex-groupe-titre { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-bottom: .45rem; font-size: var(--nex-table-font); font-weight: 600; color: var(--bs-secondary-color); }
.nex-groupe-lien { display: flex; justify-content: center; margin: .4rem 0; }
.nex-pastille-paren { font-weight: 700; font-size: 1rem; line-height: 1; color: var(--bs-secondary-color); }
.nex-pastille-paren + .nex-pastille { margin-left: -.2rem; }
.nex-condition { display: grid; grid-template-columns: 2.5rem minmax(9rem, 13rem) minmax(8rem, 12rem) minmax(10rem, 1fr) auto; gap: .35rem; align-items: start; margin-bottom: .35rem; }
.nex-condition-lien { align-self: center; font-size: .6875rem; font-weight: 700; text-transform: uppercase; color: var(--nex-primary); text-align: right; }
@media (max-width: 767.98px) { .nex-condition { grid-template-columns: 2.5rem 1fr 1fr auto; } .nex-condition > .nex-filtre-valeur { grid-column: 2 / -1; grid-row: 2; } }

/* barre d'outils : gestion du tableau, lignes par page, recherche */
.nex-tableau-outils { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; padding: .6rem .75rem; }
.nex-tableau-gestion .btn { --bs-btn-font-size: .8125rem; min-width: 2.1rem; }
.nex-tableau-gestion .btn.nex-filtres-masques { --bs-btn-bg: var(--nex-orange); --bs-btn-color: #fff; --bs-btn-border-color: var(--nex-orange); --bs-btn-hover-bg: var(--nex-orange); --bs-btn-hover-color: #fff; background: var(--nex-orange); color: #fff; }
/* nombre de filtres actifs : pastille au coin du bouton des filtres */
.btn[data-t="filtres-bascule"] { position: relative; z-index: 2; overflow: visible; }   /* au-dessus du bouton voisin (pastille) */
.btn .nex-tableau-nb-filtres { position: absolute; z-index: 3; top: -.55rem; right: -.15rem; font-size: .625rem; padding: .25em .5em; pointer-events: none; }
.nex-tableau-nb-filtres[hidden] { display: none; }
.nex-tableau-droite { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin-left: auto; }
.nex-tableau-par-page { width: auto; }
.nex-tableau-recherche { position: relative; flex: 0 1 18rem; min-width: 10rem; }
.nex-tableau-recherche > i { position: absolute; left: .65rem; top: 50%; transform: translateY(-50%); color: var(--bs-secondary-color); font-size: .8rem; pointer-events: none; }
.nex-tableau-recherche .form-control { padding-left: 2rem; }
.nex-tableau-menu { min-width: 16rem; max-height: min(500px, 70vh); overflow: auto; padding-top: 0; font-size: var(--nex-table-font); }   /* 500 px au plus (02/10/2026), titre collé en haut */
/* en-tête du menu : bord à bord, même si le thème donne une marge intérieure aux menus (Pastel, Clarté, Libre, Plasma) ;
   coins du haut arrondis par le menu (overflow). La marge du menu vaut « 0 » sans unité chez Bootstrap : jamais additionnée à
   une longueur dans calc() (règle invalide) ; elle est compensée par une bordure transparente (le fond passe dessous). */
.nex-tableau-menu-titre { position: sticky; top: 0; z-index: 1; margin: 0 calc(-1 * var(--bs-dropdown-padding-x, 0px)) .4rem;
	padding: .65rem 1rem; border-inline: var(--bs-dropdown-padding-x, 0) solid transparent;
	background: var(--nex-primary); color: var(--nex-primary-contrast); font-weight: 600; }
.nex-tableau-menu .dropdown-item.active { background: color-mix(in srgb, var(--nex-primary) 14%, transparent); color: var(--bs-body-color); font-weight: 600; }
.nex-tableau-option { display: flex; align-items: center; cursor: pointer; white-space: normal; }

/* pastilles des filtres actifs (filtres masqués) */
.nex-tableau-pastilles { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; padding: 0 .75rem .6rem; font-size: var(--nex-table-font); }
.nex-tableau-pastilles[hidden] { display: none; }
.nex-pastille { display: inline-flex; align-items: center; gap: .3rem; max-width: 100%; padding: .2rem .3rem .2rem .6rem; border-radius: 50rem; line-height: 1.3;
	background: color-mix(in srgb, var(--nex-primary) 12%, var(--bs-body-bg)); border: 1px solid color-mix(in srgb, var(--nex-primary) 30%, transparent); }
.nex-pastille-col { font-weight: 600; }
.nex-pastille-op { color: var(--nex-primary); font-weight: 700; }
.nex-pastille-val { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 16rem; }
.nex-pastille .btn-close { width: .5rem; height: .5rem; padding: .3rem; margin-left: .1rem; background-size: .5rem; opacity: .6; }
.nex-pastille-lien { font-size: var(--nex-font-xs); text-transform: uppercase; font-weight: 700; color: var(--bs-secondary-color); }

/* message après une opération (édition en masse, fusion, import) */

/* fenêtres d'écriture (js/table-ecriture.js) : fusion, import */
.nex-fusion { font-size: var(--nex-table-font); }
.nex-fusion > thead th { white-space: nowrap; vertical-align: middle; }
.nex-fusion > thead th.nex-fusion-reference { background: color-mix(in srgb, var(--nex-primary) 14%, transparent); }
.nex-fusion > tbody th { width: 1%; white-space: nowrap; font-weight: 600; }
.nex-fusion > tbody tr.nex-fusion-conflit > * { background: color-mix(in srgb, var(--nex-warning) 9%, transparent); }
.nex-fusion-valeur { display: flex; align-items: flex-start; gap: .1rem; margin: 0; cursor: pointer; }
.nex-fusion-valeur:has(input:disabled) { cursor: default; }
.nex-fusion-valeur .form-check-input { flex: none; margin-top: .15rem; }
.nex-import-etapes { padding-left: 1.25rem; margin-bottom: 0; }
.nex-import-etapes > li { margin-bottom: 1rem; }
.nex-import-etapes > li::marker { font-weight: 700; color: var(--nex-primary); }
.nex-import-depot { display: flex; flex-direction: column; align-items: center; gap: .35rem; padding: 1.25rem; border: 2px dashed var(--bs-border-color);
	border-radius: var(--bs-border-radius-lg); color: var(--bs-secondary-color); text-align: center; }
.nex-import-depot > i { font-size: 1.75rem; color: var(--nex-primary); }
.nex-import-depot.nex-depot-actif { border-color: var(--nex-primary); background: color-mix(in srgb, var(--nex-primary) 8%, transparent); }
.nex-import-erreurs { max-height: 16rem; overflow: auto; border: 1px solid var(--bs-border-color); border-radius: var(--bs-border-radius); }

/* barre de sélection (actions groupées) */
.nex-tableau-selection { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .9rem; padding: .45rem .75rem; font-size: var(--nex-table-font);
	background: color-mix(in srgb, var(--nex-primary) 10%, var(--bs-body-bg)); border-top: 1px solid color-mix(in srgb, var(--nex-primary) 25%, transparent); }
.nex-tableau-selection[hidden] { display: none; }

/* tableau : défilement interne (en-tête visible), en-tête coloré (groupes foncés, titres dans la couleur du thème) */
.nex-tableau-defile { position: relative; overflow: auto; max-height: var(--nex-tableau-hauteur, max(24rem, calc(100vh - 17rem))); scrollbar-width: thin; }   /* hauteur calculée par table.js (ajusterHauteur) : carte entière, pagination comprise, dans l'écran */
.nex-tableau-sans-defile .nex-tableau-defile { max-height: none; }
.nex-tableau-sans-defile .nex-table > thead > tr > th { position: static; }
/* chargement : grand squelette opaque posé sur les lignes, sous l'en-tête (js : poserSquelette) ; la mise en page ne bouge pas */
.nex-tableau-corps { position: relative; overflow: hidden; }
.nex-tableau-voile { position: absolute; left: 0; right: 0; top: 0; z-index: 6; overflow: hidden; display: none; background: var(--nex-card-bg, var(--bs-body-bg)); }
.nex-tableau-attente .nex-tableau-voile { display: block; }
.nex-squelette-ligne { display: flex; align-items: center; border-bottom: 1px solid var(--bs-border-color-translucent); }
.nex-squelette-ligne > div { flex: none; padding: 0 .45rem; }
.nex-squelette-ligne .placeholder { display: block; height: .7rem; border-radius: .2rem; }
.nex-tableau-attente .nex-tableau-corps::after { content: ""; position: absolute; top: 0; left: 0; z-index: 7; height: 2px; width: 30%; background: var(--nex-orange); animation: nex-tableau-barre 1s ease-in-out infinite; }
@keyframes nex-tableau-barre { from { left: -30%; } to { left: 100%; } }
.nex-table { --bs-table-bg: var(--nex-card-bg, var(--bs-body-bg)); font-size: .75rem; }
.nex-table > :not(caption) > * > * { padding: .3rem .45rem; }
.nex-table > thead > tr > th { position: sticky; top: 0; z-index: 3; background: var(--nex-primary); color: var(--nex-primary-contrast); font-weight: 700; white-space: nowrap;
	vertical-align: middle; border-color: color-mix(in srgb, var(--nex-primary-contrast) 18%, transparent); border-bottom-width: 1px; box-shadow: none; }
/* ligne des groupes : couleur du thème assombrie, texte toujours clair (la couleur de texte des titres peut être foncée :
   jaune, lime, Pastel en sombre) */
.nex-table > thead > tr.nex-table-groupes > th { background: color-mix(in srgb, var(--nex-primary) 55%, #000); color: rgba(255, 255, 255, .92);
	font-size: .6875rem; text-transform: uppercase; letter-spacing: .04em; }
.nex-table > thead > tr.nex-table-groupes + tr > th { top: 1.65rem; }
.nex-table > thead .nex-table-case, .nex-table > thead .nex-table-actions { background: color-mix(in srgb, var(--nex-primary) 55%, #000); z-index: 4; }
.nex-table > thead > tr.nex-table-groupes > :is(.nex-table-case, .nex-table-actions) { border-bottom-color: transparent; }   /* angle d'un seul bloc */
.nex-table-triable { cursor: pointer; user-select: none; }
.nex-table-triable:hover { background: color-mix(in srgb, var(--nex-primary) 85%, #fff) !important; }
.nex-table-tri { margin-left: .35rem; font-size: .75rem; opacity: .45; }
.nex-table-tri.actif { opacity: 1; }
.nex-table th sup { font-weight: 700; }
.nex-table .nex-table-case { width: 2.1rem; }
.nex-table .nex-table-actions { width: 1%; white-space: nowrap; }
.nex-table .form-check-input { width: 1rem; height: 1rem; margin: 0; vertical-align: middle; cursor: pointer; }   /* taille fixe (texte des données : 12 px) */
.nex-table > thead .form-check-input { border-color: color-mix(in srgb, var(--nex-primary-contrast) 70%, transparent); }

/* fond des lignes porté par chaque cellule, en couches (les colonnes fixes suivent : survol, lignes alternées, couleurs) :
   socle (opaque pour une colonne fixe), fond de la ligne (couleur, alternance, sélection), survol ; teinte de colonne par-dessus */
.nex-table > tbody > tr > *, .nex-table > tfoot > tr > * { --nex-ligne-bg: var(--bs-table-bg); --nex-survol: transparent; background-color: var(--nex-table-socle, transparent);
	background-image: linear-gradient(var(--nex-survol), var(--nex-survol)), linear-gradient(var(--nex-ligne-bg), var(--nex-ligne-bg)); box-shadow: none; vertical-align: middle; }
/* traits verticaux entre les colonnes (option, par défaut) : bordures séparées, portées par chaque cellule,
   pour rester visibles sur les colonnes fixes au défilement */
.nex-table.nex-bordures { border-collapse: separate; border-spacing: 0; }
.nex-table.nex-bordures > :not(caption) > tr > :not(:last-child) { border-right: 1px solid var(--bs-border-color); }
.nex-table.nex-bordures > thead > tr > :not(:last-child) { border-right-color: color-mix(in srgb, var(--nex-primary-contrast) 22%, transparent); }
.nex-table.nex-raye > tbody > tr:nth-of-type(odd) > * { --nex-ligne-bg: color-mix(in srgb, var(--bs-body-color) 4%, var(--bs-table-bg)); }
.nex-table > tbody > tr.nex-ligne-couleur > * { --nex-ligne-bg: color-mix(in srgb, var(--nex-ligne-c) 14%, var(--bs-table-bg)); }
.nex-table > tbody > tr.nex-table-cochee > * { --nex-ligne-bg: color-mix(in srgb, var(--nex-primary) 13%, var(--bs-table-bg)); }
.nex-table > tbody > tr:hover > * { --nex-survol: color-mix(in srgb, var(--bs-body-color) 7%, transparent); }
.nex-table > tbody > tr > td.nex-col-couleur { box-shadow: inset 0 0 0 9999px color-mix(in srgb, var(--nex-col-c) 10%, transparent); }
/* menu « … » d'une ligne (placé dans body par table.js) ; ligne concernée marquée pendant l'ouverture */
.nex-menu-ligne { position: fixed; z-index: 1080; min-width: 13rem; margin: 0; font-size: var(--nex-table-font, .8125rem); }
.nex-table > tbody > tr.nex-menu-actif > * { --nex-survol: color-mix(in srgb, var(--nex-primary) 10%, transparent); }
.nex-table-action { --bs-btn-padding-y: .1rem; --bs-btn-padding-x: .25rem; --bs-btn-font-size: .875rem; width: 1.7rem; height: 1.7rem; }
.nex-table-action:hover { background: var(--bs-secondary-bg); }
.nex-table-action, .nex-table-action:hover, .nex-table-action:focus, .nex-table-action:focus-visible { text-decoration: none; }   /* btn-link : pas de soulignement sous les icônes */
.nex-table > tbody > tr:focus-visible { outline: 2px solid var(--nex-primary); outline-offset: -2px; }
.nex-table-vide > td { padding: 2.5rem 1rem !important; text-align: center; color: var(--bs-secondary-color); }
.nex-table-vide i { font-size: 2rem; opacity: .5; margin-bottom: .5rem; }
.nex-table-totaux > * { --nex-table-socle: var(--nex-table-fixe-bg); --nex-survol: var(--bs-tertiary-bg); font-weight: 600; position: sticky; bottom: 0; z-index: 3; }
/* contenu des cellules sur une ligne (option « retour à la ligne » : texte replié) */
.nex-tableau:not(.nex-tableau-retour) .nex-table > tbody > tr > td { white-space: nowrap; max-width: 28rem; overflow: hidden; text-overflow: ellipsis; }
.nex-table-tronque { cursor: help; }
.nex-table-image { width: 2.5rem; height: 2rem; object-fit: cover; border-radius: .25rem; background: var(--nex-damier); }
.nex-table-multi { display: inline-flex; flex-wrap: wrap; gap: .25rem; }
.nex-table-pastille, .nex-liste-pastille { display: inline-block; width: .65rem; height: .65rem; margin-right: .4rem; border-radius: 50%; vertical-align: baseline; }

/* pied : informations, pagination */
.nex-tableau-pied { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; font-size: var(--nex-table-font); }
.nex-tableau-info { margin-right: auto; color: var(--bs-secondary-color); }
.nex-tableau-pied .page-link { min-width: 2rem; text-align: center; }

/* menu des colonnes : cases + glisser-déposer */
.nex-tableau-colonne { display: flex; align-items: center; gap: .1rem; cursor: pointer; }
.nex-tableau-poignee { margin-right: .5rem; color: var(--bs-secondary-color); cursor: grab; }
.nex-tableau-colonne.nex-glisse { opacity: .4; }
.nex-tableau-colonne small { margin-left: auto; padding-left: .5rem; }

/* modification dans la cellule : cellule modifiable soulignée au survol, champ dans la cellule, retour visuel après l'écriture */
.nex-table td.nex-editable { cursor: text; }
.nex-table > tbody > tr > td.nex-editable:hover { outline: 1px dashed color-mix(in srgb, var(--nex-primary) 70%, transparent); outline-offset: -2px; }
.nex-table > tbody > tr > td.nex-cellule-edition { padding: .15rem .25rem; outline: 2px solid var(--nex-primary); outline-offset: -2px; white-space: normal; min-width: 12rem; }
.nex-cellule-champ { display: flex; align-items: center; gap: .25rem; }
.nex-cellule-champ > [data-champ] { flex: 1; min-width: 0; }
/* champs de la fiche montés dans la cellule (téléphone, durée, fréquence, icône...) : taille réduite, sans aperçu */
.nex-cellule-champ > [data-champ] :is(.form-control, .form-select, .input-group-text, .btn:not(.btn-xs)) { padding: .2rem .45rem; font-size: .8125rem; min-height: 0; }
.nex-cellule-champ > [data-champ] .nex-form-frequence-apercu { display: none; }
.nex-table > tbody > tr > td.nex-cellule-modifiee { animation: nex-cellule-ok 1.2s ease; }
@keyframes nex-cellule-ok { from { background-color: color-mix(in srgb, var(--bs-success) 35%, transparent); } }
@media (prefers-reduced-motion: reduce) { .nex-table > tbody > tr > td.nex-cellule-modifiee { animation: none; } }

/* redimensionnement des colonnes : poignée sur le bord droit de chaque titre */
.nex-tableau-sans-defile .nex-table > thead > tr.nex-table-titres > th { position: relative; }   /* poignée placée dans le titre */
/* en-tête non fixe : pas de décalage (le top des titres sous la ligne des groupes ne sert qu'à l'en-tête collant ; en relatif il les
   faisait descendre sur la première ligne) */
.nex-tableau-sans-defile .nex-table > thead > tr:is(.nex-table-groupes, .nex-table-titres, :not([class])) > th { top: auto; }   /* plus précis que « groupes + tr > th » */
.nex-col-poignee { position: absolute; top: 0; right: -3px; bottom: 0; width: 7px; z-index: 1; cursor: col-resize; touch-action: none; }
.nex-col-poignee::after { content: ''; position: absolute; top: 25%; bottom: 25%; left: 3px; width: 1px; background: color-mix(in srgb, var(--nex-primary-contrast) 35%, transparent); opacity: 0; transition: opacity .15s; }
.nex-table > thead th:hover .nex-col-poignee::after, .nex-redimension .nex-col-poignee::after { opacity: 1; }
.nex-redimension, .nex-redimension * { cursor: col-resize !important; user-select: none; }
@media (max-width: 767.98px) { .nex-col-poignee { display: none; } }

/* réordonner les lignes : poignée, ligne déplacée */
.nex-poignee-ligne { display: inline-flex; align-items: center; padding: 0 .3rem; color: var(--bs-secondary-color); cursor: grab; touch-action: none; }
.nex-poignee-ligne:hover { color: var(--nex-primary); }
.nex-table > tbody > tr.nex-ligne-glissee > * { opacity: .45; }

/* fenêtre d'historique d'une ligne */
/* historique des modifications (onglet Historique du dossier, action « Historique » du tableau) : une carte par enregistrement */
.nex-historique { display: flex; flex-direction: column; gap: .6rem; font-size: .8125rem; }
.nex-historique-evt { border: 1px solid var(--bs-border-color); border-left: 3px solid var(--bs-primary); border-radius: var(--bs-border-radius);
	background: var(--bs-body-bg); overflow: hidden; }
.nex-historique-tete { display: flex; align-items: center; gap: .6rem; padding: .5rem .75rem; background: var(--bs-tertiary-bg); flex-wrap: wrap; }
.nex-historique-avatar { width: 1.75rem; height: 1.75rem; font-size: .65rem; flex: none; }
.nex-historique-champs { --bs-table-bg: transparent; }
.nex-historique-champs th { width: 30%; font-weight: 600; color: var(--bs-secondary-color); padding-left: .75rem; }
.nex-historique-champs td { word-break: break-word; }
.nex-historique-champs tr:last-child > * { border-bottom: 0; }
.nex-historique-avant { color: var(--bs-secondary-color); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--bs-danger) 60%, transparent); }
.nex-historique-apres { font-weight: 600; }

/* ligne de détail dépliable */
.nex-detail-bascule > i { transition: transform var(--nex-transition); }
.nex-detail-bascule[aria-expanded="true"] > i { transform: rotate(90deg); color: var(--nex-primary); }
.nex-table > tbody > tr.nex-detail-ligne > td { padding: 0; background: color-mix(in srgb, var(--nex-primary) 3%, var(--nex-table-fixe-bg)); white-space: normal; }
.nex-detail { position: sticky; left: 0; max-width: min(100%, 60rem); padding: .75rem 1rem .85rem 2.5rem; border-left: 3px solid var(--nex-primary); }
@media (prefers-reduced-motion: reduce) { .nex-detail-bascule > i { transition: none; } }

/* regroupement des lignes : en-tête de groupe (repliable) et sous-totaux */
.nex-table > tbody > tr.nex-groupe-ligne > td { padding: 0; background: color-mix(in srgb, var(--nex-primary) 9%, var(--nex-table-fixe-bg)); border-bottom: 1px solid var(--bs-border-color); }
.nex-groupe-titre { position: sticky; left: 0; display: inline-flex; align-items: center; gap: .55rem; padding: .4rem .75rem; border: 0; background: none; color: inherit;
	font-weight: 600; text-align: left; }
.nex-groupe-colonne { font-size: .6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--bs-secondary-color); }
.nex-groupe-chevron { width: .9rem; color: var(--nex-primary); transition: transform var(--nex-transition); }
.nex-groupe-ferme .nex-groupe-chevron { transform: rotate(-90deg); }
.nex-table > tbody > tr.nex-groupe-totaux > td { background: color-mix(in srgb, var(--nex-primary) 4%, var(--nex-table-fixe-bg)); font-weight: 600; border-bottom: 2px solid var(--bs-border-color); }
@media (prefers-reduced-motion: reduce) { .nex-groupe-chevron { transition: none; } }

/* densité (option de l'utilisateur) : compacte, normale (défaut), aérée */
.nex-table.nex-densite-compacte > :not(caption) > * > * { padding-top: .12rem; padding-bottom: .12rem; }
.nex-table.nex-densite-compacte > tbody > tr > td { font-size: .6875rem; }
.nex-table.nex-densite-aeree > :not(caption) > * > * { padding: .6rem .65rem; }
.nex-table.nex-densite-aeree > tbody > tr > td { font-size: .8125rem; }
/* plein écran : tableau au-dessus de la page, la zone des lignes occupe la hauteur restante */
/* bloc réduit (bouton « − » de l'en-tête) : seul l'en-tête reste visible, coins du bas arrondis */
.nex-tableau.nex-tableau-replie > .nex-tableau-carte > :not(.card-header) { display: none !important; }
.nex-tableau.nex-tableau-replie > .nex-tableau-carte > .card-header { border-radius: var(--bs-card-border-radius); border-bottom: 0; }
.nex-tableau.nex-tableau-plein { position: fixed; inset: .5rem; z-index: 1045; margin: 0; }
.nex-tableau.nex-tableau-plein > .nex-tableau-carte { height: 100%; margin: 0; display: flex; flex-direction: column; box-shadow: 0 .75rem 2.5rem rgba(0, 0, 0, .4); }
.nex-tableau.nex-tableau-plein .nex-tableau-corps { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.nex-tableau.nex-tableau-plein .nex-tableau-defile { flex: 1; max-height: none; }
body.nex-tableau-plein-actif { overflow: hidden; }
body.nex-tableau-plein-actif::after { content: ''; position: fixed; inset: 0; z-index: 1044; background: rgba(0, 0, 0, .45); }

/* action impossible pour une ligne (suppression d'une ligne liée...) : icône grisée, raison au survol et au clic */
.nex-table-action.nex-action-indisponible, .dropdown-item.nex-action-indisponible { opacity: .35; cursor: help; }
.nex-table-action.nex-action-indisponible:hover { opacity: .6; }
/* vues enregistrées */
.nex-tableau-vues { min-width: 17rem; }
.nex-vue { display: flex; align-items: center; }
.nex-vue > .dropdown-item { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.nex-vue.active > .dropdown-item { font-weight: 600; }
.nex-vue > .btn { margin-right: .35rem; opacity: .6; }
.nex-vue > .btn:hover { opacity: 1; }
/* légende des actions */
.nex-tableau-legende { min-width: 18rem; max-width: 24rem; }
.nex-legende-ligne { display: flex; align-items: flex-start; gap: .65rem; padding: .35rem .9rem; }
.nex-legende-ligne > i { margin-top: .15rem; }
.nex-legende-note { margin-top: .35rem; padding: .5rem .9rem .35rem; border-top: 1px solid var(--bs-border-color); font-size: .75rem; color: var(--bs-secondary-color); }

/* fenêtre d'export : colonnes cochées et ordre (glisser-déposer) */
.nex-export-colonnes { max-height: min(50vh, 26rem); overflow-y: auto; border: 1px solid var(--bs-border-color); border-radius: var(--bs-border-radius); padding: .25rem; }
.nex-export-colonne { display: flex; align-items: center; gap: .6rem; padding: .3rem .5rem; border-radius: var(--bs-border-radius-sm); cursor: grab; }
.nex-export-colonne:hover, .nex-export-colonne:focus-visible { background: var(--bs-tertiary-bg); outline: none; }
.nex-export-colonne:focus-visible { box-shadow: inset 0 0 0 2px var(--nex-primary); }
.nex-export-colonne .form-check-input { margin: 0; flex: none; }
.nex-export-colonne label { flex: 1; cursor: pointer; user-select: none; }
.nex-export-colonne.nex-glisse { opacity: .4; }
.nex-export-poignee { color: var(--bs-secondary-color); }

/* ------------------------------------------------------------------ Barre de page (wss_page_barre()) : sous-menu d'une page,
   collé au menu principal sur toute la hauteur (Paramètres, documentation...). Couleurs calculées depuis les variables du
   thème : en clair, surface des cartes teintée de la couleur du thème (se détache du fond du contenu et des cartes) ; en
   sombre, surface entre le fond et les cartes, teintée plus fort. Élément actif : fond teinté + repère de la couleur du thème. */
:root {
	--nex-page-barre-w: 230px;
	--nex-page-barre-bg: color-mix(in srgb, var(--nex-primary) 4%, var(--nex-card-bg));
	--nex-page-barre-border: var(--nex-card-border);
	--nex-page-barre-color: var(--bs-body-color);
	--nex-page-barre-muted: var(--bs-secondary-color);
	--nex-page-barre-hover-bg: color-mix(in srgb, var(--nex-primary) 7%, transparent);
	--nex-page-barre-active-bg: color-mix(in srgb, var(--nex-primary) 13%, transparent);
	--nex-page-barre-active-color: color-mix(in srgb, var(--nex-primary) 85%, var(--bs-body-color));
	--nex-page-barre-marker: var(--nex-primary);
	--nex-page-barre-gap: var(--nex-sidebar-gap);           /* menu flottant (Lumen) : la barre flotte aussi */
	--nex-page-barre-radius: var(--nex-sidebar-radius);
	--nex-page-barre-shadow: var(--nex-card-shadow);
}
[data-bs-theme=dark] {
	--nex-page-barre-bg: color-mix(in srgb, var(--nex-primary) 7%, color-mix(in srgb, var(--nex-card-bg), var(--nex-content-bg)));
	--nex-page-barre-hover-bg: color-mix(in srgb, var(--nex-primary) 12%, transparent);
	--nex-page-barre-active-bg: color-mix(in srgb, var(--nex-primary) 24%, transparent);
	--nex-page-barre-active-color: color-mix(in srgb, var(--nex-primary) 45%, #fff);
}
/* Horizon : verre dépoli comme les cartes ; Lumen : arrondie et flottante comme le menu */
[data-nex-theme=horizon] { --nex-page-barre-bg: var(--nex-card-bg); --nex-page-barre-active-color: #fff; }
[data-nex-theme=lumen] { --nex-page-barre-shadow: 0 2px 10px rgba(0, 0, 0, .08); }

.nex-page-barre {
	position: fixed; z-index: 5; top: calc(var(--nex-header-h) + var(--nex-page-barre-gap)); bottom: var(--nex-page-barre-gap);
	left: calc(var(--nex-sidebar-w) + var(--nex-sidebar-gap) * 2 + var(--nex-panneau-decal)); width: var(--nex-page-barre-w);
	display: flex; flex-direction: column; background: var(--nex-page-barre-bg); color: var(--nex-page-barre-color);
	border-right: 1px solid var(--nex-page-barre-border); border-radius: var(--nex-page-barre-radius); box-shadow: var(--nex-page-barre-shadow);
	backdrop-filter: var(--nex-backdrop); transition: left var(--nex-transition);
}
.nex-sidebar-mini .nex-page-barre { left: calc(var(--nex-sidebar-mini-w) + var(--nex-sidebar-gap) * 2 + var(--nex-panneau-decal)); }
.nex-content:has(.nex-page-barre:not(.nex-page-barre-apercu)) { padding-left: calc(var(--nex-page-barre-w) + var(--nex-page-barre-gap) + 1.5rem); }
.nex-page-barre-titre { display: flex; align-items: center; gap: .55rem; padding: 1rem 1rem .75rem; font-weight: 700; font-size: .9375rem; }
.nex-page-barre-titre > i { color: var(--nex-primary); }
.nex-page-barre-recherche { position: relative; padding: 0 .75rem .6rem; flex: 0 0 auto; }
.nex-page-barre-recherche > i { position: absolute; left: 1.35rem; top: 50%; transform: translateY(-65%); font-size: .7rem; opacity: .6; pointer-events: none; }
.nex-page-barre-recherche input { padding-left: 1.7rem; font-size: .8rem; }
.nex-page-barre-vide { padding: .5rem .75rem; font-size: .8rem; opacity: .7; }
.nex-page-barre-liste > [hidden] { display: none !important; }
.nex-page-barre-liste { flex: 1; overflow-y: auto; padding: 0 .5rem 1rem; scrollbar-width: thin; }
.nex-page-barre-groupe { padding: .85rem .6rem .3rem; font-size: .6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--nex-page-barre-muted); }
.nex-page-barre-lien { position: relative; display: flex; align-items: center; gap: .55rem; padding: .4rem .6rem; margin: 1px 0; border-radius: var(--nex-menu-radius);
	color: inherit; text-decoration: none; font-size: .8125rem; }
.nex-page-barre-lien > i:first-child { width: 1.1em; text-align: center; color: var(--nex-page-barre-muted); }
.nex-page-barre-lien.nex-niveau-1 { padding-left: 1.6rem; }
.nex-page-barre-lien:hover { background: var(--nex-page-barre-hover-bg); color: inherit; }
.nex-page-barre-lien.active { background: var(--nex-page-barre-active-bg); color: var(--nex-page-barre-active-color); font-weight: 600; }
.nex-page-barre-lien.active > i:first-child { color: inherit; }
.nex-page-barre-lien.active::before { content: ''; position: absolute; left: 0; top: .35rem; bottom: .35rem; width: 3px; border-radius: 3px; background: var(--nex-page-barre-marker); }
.nex-page-barre-pastille { margin-left: auto; }
/* tablette et mobile : bloc en haut du contenu */
@media (max-width: 991.98px) {
	.nex-page-barre { position: static; width: auto; margin-bottom: 1rem; border: 1px solid var(--nex-page-barre-border); border-radius: var(--bs-border-radius-lg); }
	.nex-content:has(.nex-page-barre:not(.nex-page-barre-apercu)) { padding-left: 1rem; }
	.nex-page-barre-liste { max-height: 40vh; }
}
/* aperçu dans la charte (non fixée) */
.nex-page-barre.nex-page-barre-apercu { position: relative; top: auto; bottom: auto; left: auto; height: 22rem; z-index: auto; }

/* ------------------------------------------------------------------ Barre de droite (wss_barre_droite()) : mini-widgets d'une page.
   Même fond et mêmes couleurs que le menu de gauche (variables --nex-sidebar-*), flottante avec Lumen ; masquable par le bouton
   de l'en-tête (préférence layout.barre_droite_masquee) ; tiroir par-dessus le contenu sous 1200 px. */
:root { --nex-barre-droite-w: 270px; }
.nex-barre-droite {
	position: fixed; z-index: 6; top: calc(var(--nex-header-h) + var(--nex-sidebar-gap)); bottom: var(--nex-sidebar-gap); right: var(--nex-sidebar-gap);
	width: var(--nex-barre-droite-w); padding: .75rem .75rem 1.25rem; background: var(--nex-sidebar-bg); color: var(--nex-sidebar-color);
	border-left: 1px solid var(--nex-sidebar-border); border-radius: var(--nex-sidebar-radius); box-shadow: var(--nex-sidebar-shadow);
	backdrop-filter: var(--nex-backdrop); font-size: .75rem; transition: transform var(--nex-transition);
	--nex-widget-bg: var(--nex-sidebar-hover-bg); --nex-widget-fort: var(--nex-sidebar-hover-color);
}
.nex-content:has(.nex-barre-droite:not(.nex-barre-droite-apercu)) { padding-right: calc(var(--nex-barre-droite-w) + var(--nex-sidebar-gap) * 2 + 1.5rem); }
.nex-barre-droite-masquee .nex-barre-droite:not(.nex-barre-droite-apercu) { transform: translateX(calc(100% + var(--nex-sidebar-gap) + 1px)); }
.nex-barre-droite-masquee .nex-content:has(.nex-barre-droite) { padding-right: 1.5rem; }
body:not(:has(.nex-barre-droite:not(.nex-barre-droite-apercu))) [data-nex-barre-droite-toggle].nex-header-link { display: none; }
.nex-barre-droite-voile { display: none; }
@media (max-width: 1199.98px) {
	.nex-barre-droite:not(.nex-barre-droite-apercu) { z-index: 1040; transform: translateX(calc(100% + var(--nex-sidebar-gap) + 1px)); box-shadow: 0 0 24px rgba(0, 0, 0, .25); }
	.nex-content:has(.nex-barre-droite:not(.nex-barre-droite-apercu)) { padding-right: 1.5rem; }
	.nex-barre-droite-ouverte .nex-barre-droite { transform: none; }
	.nex-barre-droite-ouverte .nex-barre-droite-voile { display: block; position: fixed; inset: 0; z-index: 1039; background: rgba(0, 0, 0, .35); }
}
@media (max-width: 991.98px) { .nex-content:has(.nex-barre-droite:not(.nex-barre-droite-apercu)) { padding-right: 1rem; } }
@media (prefers-reduced-motion: reduce) { .nex-barre-droite { transition: none; } }
.nex-barre-droite.nex-barre-droite-apercu { position: relative; inset: auto; height: 28rem; overflow-y: auto; transform: none; }

.nex-widget + .nex-widget { margin-top: 1rem; }
.nex-widget-titre { display: flex; align-items: center; gap: .45rem; margin-bottom: .4rem; font-size: .625rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
	color: var(--nex-sidebar-header-color); }
.nex-widget-puce { width: .4rem; height: .4rem; border-radius: 50%; flex: none; }
.nex-widget-carte { background: var(--nex-widget-bg); border: 1px solid var(--nex-sidebar-border); border-radius: var(--bs-border-radius); }
.nex-widget-ligne { display: flex; align-items: center; gap: .55rem; padding: .45rem .6rem; color: inherit; text-decoration: none; }
.nex-widget-ligne + .nex-widget-ligne, .nex-widget-progression + .nex-widget-progression, .nex-widget-message + .nex-widget-message { border-top: 1px solid var(--nex-sidebar-border); }
.nex-widget-ligne > i { width: 1em; text-align: center; opacity: .7; }
a.nex-widget-ligne:hover { color: var(--nex-widget-fort); }
.nex-widget-ligne > span:first-of-type { color: var(--nex-widget-fort); }
.nex-widget-valeur { margin-left: auto; font-variant-numeric: tabular-nums; }
.nex-widget-stats { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; }
.nex-widget-stat { display: flex; flex-direction: column; align-items: center; gap: .15rem; padding: .7rem .4rem; text-align: center; }
.nex-widget-stat > i { font-size: 1.25rem; margin-bottom: .2rem; opacity: .85; }
.nex-widget-stat > strong { color: var(--nex-widget-fort); font-size: .875rem; }
.nex-widget-progression { padding: .45rem .6rem; }
.nex-widget-progression > .d-flex > span:first-child { color: var(--nex-widget-fort); }
.nex-widget-progression .progress { height: .25rem; margin-top: .35rem; background: var(--nex-sidebar-border); }
.nex-widget-message { display: flex; gap: .55rem; padding: .5rem .6rem; }
.nex-widget-avatar { flex: none; width: 1.75rem; height: 1.75rem; border-radius: 50%; display: grid; place-items: center; font-size: .625rem; font-weight: 700;
	background: color-mix(in srgb, var(--nex-primary) 35%, transparent); color: var(--nex-widget-fort); }
.nex-widget-message-texte { min-width: 0; flex: 1; }
.nex-widget-message-texte strong { color: var(--nex-widget-fort); }
.nex-widget-message-texte > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nex-widget-libre { padding: .6rem; }

/* Administration > Paramètres : blocs de réglages en lignes « libellé | champ » */
.nex-parametres-bloc-titre { display: flex; align-items: center; gap: .5rem; margin: 1.25rem 0 .5rem; font-weight: 700; }
.nex-parametres-bloc-titre > i { color: var(--nex-primary); }
.nex-parametres-ligne { padding: .75rem 0; }
.nex-parametres-ligne + .nex-parametres-ligne { border-top: 1px solid var(--bs-border-color); }
.nex-parametres-ligne > .col-form-label { font-weight: 600; }
.nex-parametres-liste .badge { font-size: .6875rem; }

/* mobile : une carte par ligne (libellé de la colonne devant chaque valeur) */
@media (max-width: 767.98px) {
	.nex-tableau-defile { max-height: none; }
	.nex-table > thead { display: none; }
	.nex-table, .nex-table > tbody, .nex-table > tbody > tr, .nex-table > tbody > tr > td, .nex-table > tfoot, .nex-table > tfoot > tr, .nex-table > tfoot > tr > * { display: block; width: 100%; }
	.nex-table > tbody > tr { position: relative; padding: .5rem .75rem; border-bottom: 1px solid var(--bs-border-color); }
	.nex-tableau .nex-table > tbody > tr > td { display: flex; gap: .75rem; padding: .15rem 0; border: 0; text-align: left !important; white-space: normal; max-width: none; }
	.nex-table > tbody > tr > td[data-label]::before { content: attr(data-label); flex: 0 0 38%; font-weight: 600; color: var(--bs-secondary-color); }
	.nex-table > tbody .nex-table-actions { justify-content: flex-end; width: auto; }
	.nex-table > tbody .nex-table-case { position: absolute; top: .6rem; left: .75rem; width: auto; }
	.nex-table > tbody > tr:has(.nex-table-case) { padding-left: 2.5rem; }
	.nex-table-vide > td { display: block !important; }
	.nex-filtre { max-width: none; }
}

/* ------------------------------------------------------------------ listes (Tom Select) et calendrier (Air Datepicker) : thème nex */
.ts-wrapper.nex-liste .ts-control { min-height: calc(1.5em + .5rem + 2px); }
/* petite liste (filtres, form-select-sm) : même hauteur que les petits champs (Tom Select impose sinon 32 px à l'enveloppe) */
.ts-wrapper.form-select-sm, .nex-filtre-valeur .ts-wrapper { min-height: 0; }
.ts-wrapper.form-select-sm .ts-control, .nex-filtre-valeur .ts-control { min-height: calc(1.5em + .5rem + 2 * var(--bs-border-width)); padding: .25rem .75rem .25rem .5rem; font-size: var(--nex-font-sm); line-height: 1.5; }
.nex-filtre-valeur .ts-wrapper.multi.has-items .ts-control { padding-top: calc(.25rem - 2px); padding-bottom: calc(.25rem - 2px); }
.nex-filtre-valeur .ts-wrapper.multi .ts-control > .item { margin: 1px 3px 1px 0; padding: 0 .35rem; line-height: 1.4; }
.nex-filtre-valeur .ts-wrapper.multi.has-items .ts-control > input { min-width: 2rem; flex: 1 1 2rem; }
.ts-wrapper:not(.form-control, .form-select).focus .ts-control { border-color: var(--nex-primary-300); box-shadow: 0 0 0 .2rem color-mix(in srgb, var(--nex-primary) 25%, transparent); }
.ts-wrapper.multi .ts-control > .item { background: color-mix(in srgb, var(--nex-primary) 14%, var(--bs-body-bg)); color: var(--bs-body-color); border-radius: .25rem; }
/* trait entre le libellé et la croix : Tom Select le fixe en gris clair (#dee2e6, trop visible en sombre) ; tiré de la couleur du texte */
.ts-wrapper.plugin-remove_button:not(.rtl) .item .remove { border-left-color: color-mix(in srgb, currentColor 22%, transparent); }
.ts-wrapper.plugin-remove_button:not(.rtl) .item.active .remove { border-left-color: transparent; }
.ts-dropdown.nex-liste-flottante { margin: 0; box-shadow: var(--bs-box-shadow); }   /* liste dans une fenêtre : position fixe (liste.js) */
.ts-dropdown { z-index: 1090; background: var(--bs-body-bg); color: var(--bs-body-color); border-color: var(--bs-border-color); font-size: var(--nex-font-sm); }
.ts-dropdown .active { background: color-mix(in srgb, var(--nex-primary) 12%, var(--bs-body-bg)); color: var(--bs-body-color); }
.ts-dropdown .optgroup-header { color: var(--bs-secondary-color); background: var(--bs-tertiary-bg); font-weight: 600; }
.ts-control, .ts-wrapper.single.input-active .ts-control { background: var(--bs-body-bg); color: var(--bs-body-color); }
.ts-control input { color: var(--bs-body-color); }
.air-datepicker.nex-date-calendrier {
	--adp-font-family: inherit; --adp-font-size: .875rem; --adp-z-index: 1090;
	--adp-background-color: var(--bs-body-bg); --adp-background-color-hover: var(--bs-secondary-bg); --adp-background-color-active: var(--bs-tertiary-bg);
	--adp-background-color-in-range: color-mix(in srgb, var(--nex-primary) 12%, transparent); --adp-background-color-in-range-focused: color-mix(in srgb, var(--nex-primary) 20%, transparent);
	--adp-background-color-selected-other-month-focused: var(--nex-primary-600); --adp-background-color-selected-other-month: var(--nex-primary);
	--adp-color: var(--bs-body-color); --adp-color-secondary: var(--bs-secondary-color); --adp-accent-color: var(--nex-primary); --adp-color-current-date: var(--nex-primary);
	--adp-color-other-month: var(--bs-tertiary-color); --adp-color-disabled: var(--bs-tertiary-color); --adp-color-disabled-in-range: var(--bs-tertiary-color);
	--adp-color-other-month-hover: var(--bs-secondary-color); --adp-border-color: var(--bs-border-color); --adp-border-color-inner: var(--bs-border-color-translucent);
	--adp-border-radius: var(--bs-border-radius-lg); --adp-border-color-inline: var(--bs-border-color); --adp-nav-arrow-color: var(--bs-secondary-color);
	--adp-day-name-color: var(--nex-primary); --adp-day-name-color-hover: var(--nex-primary-300); --adp-cell-background-color-selected: var(--nex-primary);
	--adp-cell-background-color-selected-hover: var(--nex-primary-600); --adp-cell-background-color-in-range: color-mix(in srgb, var(--nex-primary) 12%, transparent);
	--adp-cell-background-color-in-range-hover: color-mix(in srgb, var(--nex-primary) 20%, transparent); --adp-cell-border-color-in-range: var(--nex-primary);
	--adp-btn-color: var(--nex-primary); --adp-btn-color-hover: var(--nex-primary-600); --adp-btn-background-color-hover: var(--bs-secondary-bg);
	--adp-time-track-color: var(--bs-border-color); --adp-time-thumb-background-color: var(--bs-body-bg); --adp-time-thumb-border-color: var(--nex-primary);
	--adp-pointer-size: 8px; box-shadow: var(--bs-box-shadow);
}
.air-datepicker.nex-date-avec-plages { display: grid; grid-template-columns: auto 1fr; width: auto; }
.air-datepicker.nex-date-avec-plages > .air-datepicker--pointer { grid-column: 1; }
.air-datepicker.nex-date-avec-plages > :not(.nex-date-plages):not(.air-datepicker--pointer) { grid-column: 2; width: 16.5rem; }
.nex-date-plages > * { flex-shrink: 0; }
.air-datepicker.nex-date-calendrier > .air-datepicker--pointer { display: none; }   /* position calculée par datepicker.js */
.nex-date-plages { grid-row: 1 / span 3; display: flex; flex-direction: column; width: 13.5rem; max-height: 21rem; overflow: hidden auto; padding: .35rem; border-right: 1px solid var(--bs-border-color); }
.nex-date-plage { padding: .3rem .6rem; border: 0; border-radius: var(--bs-border-radius); background: none; color: var(--bs-body-color); text-align: left; font-size: .8125rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nex-date-plage:hover, .nex-date-plage:focus-visible { background: color-mix(in srgb, var(--nex-primary) 12%, transparent); color: var(--nex-primary); outline: none; }
.nex-date-plage:disabled { opacity: .45; pointer-events: none; }
/* groupes des raccourcis (Mes périodes, En cours, Passé, À venir) et enregistrement de la période affichée */
.nex-date-plages-titre { padding: .45rem .6rem .15rem; font-size: .6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--bs-secondary-color); }
.nex-date-plages-titre:first-child { padding-top: .15rem; }
.nex-date-plages-mes { display: flex; flex-direction: column; }
.nex-date-plage-ligne { display: flex; align-items: center; }
.nex-date-plage-ligne > .nex-date-plage { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.nex-date-plage-suppr { flex: 0 0 auto; padding: .15rem .4rem; border: 0; border-radius: var(--bs-border-radius); background: none; color: var(--bs-secondary-color); font-size: .75rem; opacity: 0; }
.nex-date-plage-ligne:hover .nex-date-plage-suppr, .nex-date-plage-suppr:focus-visible { opacity: 1; }
.nex-date-plage-suppr:hover { color: var(--nex-danger, var(--bs-danger)); }
.nex-date-plages-pied { position: sticky; bottom: -.35rem; margin: auto -.35rem -.35rem; padding: .35rem; border-top: 1px solid var(--bs-border-color); background: var(--bs-body-bg); }
.nex-date-plages-pied > .nex-date-plage { width: 100%; color: var(--nex-primary); }
/* numéros de semaine ISO (datepicker.js, option semaines) : colonne à gauche des jours ; mode semaine : ligne survolée */
.air-datepicker.nex-date-calendrier:has(.nex-date-avec-semaines) { --adp-width: 272px; }
.air-datepicker.nex-date-avec-plages:has(.nex-date-avec-semaines) > :not(.nex-date-plages):not(.air-datepicker--pointer) { width: 18rem; }
.air-datepicker-body--cells.-days-.nex-date-avec-semaines, .air-datepicker-body--day-names.nex-date-avec-semaines { grid-template-columns: 1.75rem repeat(7, var(--adp-day-cell-width)); }
.nex-date-semaine, .nex-date-semaine-titre { display: flex; align-items: center; justify-content: center; margin-right: .2rem; padding: 0; border: 0;
	border-right: 1px solid var(--bs-border-color-translucent); background: none; color: var(--bs-tertiary-color); font-size: .6875rem; font-variant-numeric: tabular-nums; }
.nex-date-semaine-titre { font-weight: 600; color: var(--bs-secondary-color); }
button.nex-date-semaine { cursor: pointer; border-radius: var(--bs-border-radius) 0 0 var(--bs-border-radius); }
button.nex-date-semaine:hover { background: color-mix(in srgb, var(--nex-primary) 12%, transparent); color: var(--nex-primary); font-weight: 600; }
.air-datepicker-cell.-day-.nex-date-survol:not(.-selected-) { background: var(--adp-cell-background-color-in-range); }
/* icône « i » de l'aide de saisie, dans le champ à droite */
.nex-date-enveloppe { position: relative; display: block; flex: 1 1 0; min-width: 0; }
.nex-date-enveloppe > .nex-date { width: 100%; padding-right: 1.9rem; }
.nex-date-aide { position: absolute; top: 0; bottom: 0; right: .2rem; display: flex; align-items: center; padding: 0 .4rem; border: 0; background: none; color: var(--bs-secondary-color); font-size: .8125rem; }
.nex-date-aide:hover, .nex-date-aide:focus-visible { color: var(--nex-primary); outline: none; }
.nex-date-syntaxe-popover { --bs-popover-max-width: min(32rem, calc(100vw - 1rem)); --bs-popover-font-size: .8125rem; --bs-popover-body-padding-y: .5rem; }
.nex-date-syntaxe-ligne { display: grid; grid-template-columns: minmax(0, 12.5rem) 1fr; gap: .1rem .75rem; align-items: baseline; padding: .2rem 0; border-bottom: 1px solid var(--bs-border-color-translucent); }
.nex-date-syntaxe-ligne code { display: inline-block; margin: 0 .1rem .1rem 0; padding: 0 .3rem; border-radius: .25rem; background: var(--bs-tertiary-bg); color: var(--nex-primary); font-size: .75rem; white-space: nowrap; }
.nex-date-syntaxe-pied { padding-top: .4rem; color: var(--bs-secondary-color); font-size: .75rem; }
@media (max-width: 575.98px) { .air-datepicker.nex-date-avec-plages { grid-template-columns: 1fr; } .nex-date-plages { grid-row: auto; width: auto; flex-direction: row; flex-wrap: wrap; max-height: 7rem; border-right: 0; border-bottom: 1px solid var(--bs-border-color); } }

/* onglets de page (wss_page_onglets) : variantes d'une page (toutes / les miennes...) */
.nex-page-onglets { gap: .35rem; margin-bottom: .75rem; }
.nex-page-onglets .nav-link { padding: .35rem .85rem; font-size: .8125rem; border: 1px solid var(--bs-border-color); background: var(--bs-body-bg); color: var(--bs-body-color); }
.nex-page-onglets .nav-link:hover { border-color: var(--bs-primary); color: var(--bs-primary); }
.nex-page-onglets .nav-link.active { border-color: var(--bs-primary); background: var(--bs-primary); color: var(--bs-white, #fff); }

/* ------------------------------------------------------------------ tableau de bord (accueil, js/pages/tableau_bord.js, GridStack) */
.nex-tdb-barre { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: .5rem; }
.nex-tdb-salut { font-size: 1.15rem; font-weight: 600; margin-right: .75rem; }
.nex-tdb-outils { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-left: auto; }
/* filtres communs (réglage partagé par plusieurs widgets : période, portée...) */
.nex-tdb-filtres { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .75rem; }
.nex-tdb-filtres[hidden] { display: none; }
.nex-tdb-filtre { display: flex; align-items: center; gap: .35rem; margin: 0; font-size: .8rem; color: var(--bs-secondary-color); }
.nex-tdb-filtre .form-select { width: auto; min-width: 9rem; max-width: 16rem; }
.nex-tdb-mode { font-size: .8125rem; color: var(--bs-primary); font-weight: 600; margin-right: .25rem; }
.nex-tdb-a-enregistrer { box-shadow: 0 0 0 .2rem color-mix(in srgb, var(--bs-warning) 55%, transparent); }
.nex-tdb-grille { margin: 0 -6px; min-height: 120px; }
.nex-tdb .grid-stack-item-content { overflow: visible; }
.nex-tdb-carte, .nex-tdb-bloc { height: 100%; display: flex; flex-direction: column; margin: 0; }
.nex-tdb-carte .nex-tdb-entete, .nex-tdb-bloc .nex-tdb-entete { display: flex; align-items: center; gap: .5rem; padding: .4rem .6rem; min-height: 2.4rem; }
.nex-tdb-entete .nex-card-titre { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.nex-tdb-actions { margin-left: auto; display: flex; gap: .2rem; opacity: 0; transition: opacity .15s; }
.nex-tdb-carte:hover .nex-tdb-actions, .nex-tdb-bloc:hover > .nex-tdb-entete .nex-tdb-actions, .nex-tdb-en-edition .nex-tdb-actions { opacity: 1; }
.nex-tdb-edition { display: none !important; }
.nex-tdb-en-edition .nex-tdb-edition { display: inline-flex !important; }
.nex-tdb-en-edition .nex-tdb-entete { cursor: move; }
.nex-tdb-corps { flex: 1; min-height: 0; overflow: auto; padding: .6rem .75rem; }
.nex-tdb-graphique { width: 100%; height: 100%; min-height: 120px; }
.nex-tdb-corps:has(.nex-tdb-graphique) { overflow: hidden; padding: .35rem; }
/* indicateur seul dans un widget : il remplit la carte, sans l'en-tête de la carte en lecture (titre déjà dans l'indicateur ; en-tête
   rendu en personnalisation : poignée et réglages) */
.nex-tdb:not(.nex-tdb-en-edition) .nex-tdb-carte:has(.nex-tdb-corps > .nex-indicateur:only-child) > .nex-tdb-entete { display: none; }
.nex-tdb:not(.nex-tdb-en-edition) .nex-tdb-carte:has(.nex-tdb-corps > .nex-indicateur:only-child) .nex-tdb-corps > .nex-indicateur { border-radius: var(--bs-card-border-radius); }
.nex-tdb-corps:has(> .nex-indicateur:only-child) { padding: 0; overflow: hidden; }
.nex-tdb-corps > .nex-indicateur:only-child { height: 100%; border-radius: 0 0 var(--bs-card-inner-border-radius) var(--bs-card-inner-border-radius); }
.nex-tdb-chargement { display: grid; gap: .5rem; padding-top: .25rem; }
.nex-tdb-chargement .placeholder { border-radius: .25rem; height: .9rem; opacity: .25; animation: placeholder-glow 2s ease-in-out infinite; }
.nex-tdb-vide { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4rem; color: var(--bs-secondary-color);
	font-size: .8125rem; text-align: center; }
.nex-tdb-vide i { font-size: 1.5rem; opacity: .45; }
.nex-tdb-liste { list-style: none; margin: 0; padding: 0; font-size: .8125rem; }
.nex-tdb-liste li { display: flex; align-items: center; gap: .6rem; padding: .4rem 0; border-bottom: 1px solid var(--bs-border-color-translucent); }
.nex-tdb-liste li:last-child { border-bottom: 0; }
.nex-tdb-liste li > i { width: 1.1rem; text-align: center; flex: none; }
.nex-tdb-liste-texte { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.nex-tdb-liste-texte a, .nex-tdb-liste-texte span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.nex-tdb-liste-texte small { color: var(--bs-secondary-color); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.nex-tdb-liste-pied { display: block; margin-top: .35rem; font-size: .75rem; text-align: right; }
/* bloc : grille intérieure, hauteur calculée (en-tête + lignes) */
.nex-tdb-bloc { background: color-mix(in srgb, var(--bs-primary) 4%, var(--bs-tertiary-bg)); }
.nex-tdb-bloc-corps { position: relative; flex: 1; min-height: 0; padding: 0 0 .25rem; }
.nex-tdb-sous-grille { min-height: 100%; }
.nex-tdb-bloc-vide { position: absolute; inset: .5rem; align-items: center; justify-content: center; border: 2px dashed var(--bs-border-color);
	border-radius: var(--bs-border-radius); color: var(--bs-secondary-color); font-size: .8125rem; pointer-events: none; }
.nex-tdb-bloc-item:not(.nex-tdb-bloc-sans) .nex-tdb-bloc-vide { display: none !important; }
/* personnalisation : grille visible, emplacement de dépôt teinté */
.nex-tdb-en-edition .nex-tdb-grille { background-image: linear-gradient(color-mix(in srgb, var(--bs-primary) 6%, transparent) 1px, transparent 1px);
	background-size: 100% 76px; border-radius: var(--bs-border-radius); }
.nex-tdb .grid-stack-placeholder > .placeholder-content { background: color-mix(in srgb, var(--bs-primary) 14%, transparent) !important;
	border: 2px dashed var(--bs-primary); border-radius: var(--bs-border-radius); }
.nex-tdb .ui-resizable-se { opacity: .6; }
/* catalogue des widgets */
.nex-tdb-onglets { gap: .25rem; }
.nex-tdb-onglets .nav-link { padding: .2rem .6rem; font-size: .8rem; }
.nex-tdb-onglets .nav-link .badge { font-size: .65rem; }
.nex-tdb-cat h6 { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--bs-secondary-color); margin: .75rem 0 .4rem; }
.nex-tdb-catalogue { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .5rem; }
.nex-tdb-choix { display: flex; align-items: flex-start; gap: .6rem; text-align: left; padding: .6rem .7rem; border: 1px solid var(--bs-border-color);
	border-radius: var(--bs-border-radius); background: var(--bs-body-bg); color: var(--bs-body-color); }
.nex-tdb-choix:hover { border-color: var(--bs-primary); background: color-mix(in srgb, var(--bs-primary) 6%, var(--bs-body-bg)); }
.nex-tdb-choix > i { font-size: 1.15rem; color: var(--bs-primary); margin-top: .1rem; width: 1.3rem; text-align: center; }
.nex-tdb-choix { position: relative; }
.nex-tdb-choix-present { border-color: color-mix(in srgb, var(--bs-success) 55%, var(--bs-border-color)); }
.nex-tdb-present { position: absolute; top: .4rem; right: .5rem; font-style: normal; font-size: .75rem; font-weight: 600; color: var(--bs-success); }
.nex-tdb-choix b { display: block; font-size: .8125rem; }
.nex-tdb-choix small { display: block; color: var(--bs-secondary-color); font-size: .75rem; }

/* ------------------------------------------------------------------ arbre de navigation (wss_arbre_html, js/arbre.js) */
.nex-avec-arbre { display: grid; grid-template-columns: minmax(15rem, 18rem) minmax(0, 1fr); gap: .75rem; align-items: start; }
.nex-avec-arbre-gauche { position: sticky; top: calc(var(--nex-header-h) + .75rem); max-height: calc(100vh - var(--nex-header-h) - 1.5rem); }
.nex-avec-arbre-gauche > .card-body { overflow: auto; }
@media (max-width: 991.98px) { .nex-avec-arbre { grid-template-columns: minmax(0, 1fr); } .nex-avec-arbre-gauche { position: static; max-height: 22rem; } }
.nex-arbre { font-size: .8125rem; }
.nex-arbre ul { list-style: none; margin: 0; padding: 0; }
.nex-arbre-recherche { position: relative; margin-bottom: .4rem; }
.nex-arbre-recherche > i { position: absolute; left: .55rem; top: 50%; transform: translateY(-50%); font-size: .75rem; color: var(--bs-secondary-color); }
.nex-arbre-recherche input { padding-left: 1.7rem; }
.nex-arbre-ligne { display: flex; align-items: center; gap: .1rem; padding-left: calc(var(--nex-arbre-niveau) * .9rem); border-radius: var(--bs-border-radius-sm); }
.nex-arbre-ligne:hover { background: var(--bs-tertiary-bg); }
.nex-arbre-ligne.actif { background: color-mix(in srgb, var(--bs-primary) 14%, transparent); }
.nex-arbre-ligne.actif .nex-arbre-lien { color: var(--bs-primary); font-weight: 600; }
.nex-arbre-fleche { flex: none; width: 1.3rem; height: 1.6rem; display: inline-flex; align-items: center; justify-content: center; border: 0; background: none;
	color: var(--bs-secondary-color); font-size: .65rem; padding: 0; }
.nex-arbre-fleche i { transition: transform .15s; }
[aria-expanded="true"] > .nex-arbre-ligne .nex-arbre-fleche i { transform: rotate(90deg); }
.nex-arbre-lien { flex: 1; min-width: 0; display: flex; align-items: center; gap: .45rem; padding: .3rem .4rem .3rem .1rem; color: var(--bs-body-color); text-decoration: none; }
.nex-arbre-lien > i { width: 1rem; text-align: center; flex: none; color: var(--bs-secondary-color); }
.nex-arbre-lien > span:not(.nex-arbre-nombre) { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.nex-arbre-lien:focus-visible { outline: 2px solid var(--bs-primary); outline-offset: -2px; border-radius: var(--bs-border-radius-sm); }
.nex-arbre-nombre { margin-left: auto; flex: none; font-size: .6875rem; color: var(--bs-secondary-color); background: var(--bs-tertiary-bg); border-radius: 1rem; padding: 0 .45rem; }

/* tableaux : « Tout sélectionner » / « Tout désélectionner » en tête des menus à cases (colonnes, filtres affichés) */
.nex-tableau-tout-aucun { display: flex; padding: .35rem .75rem .45rem; border-bottom: 1px solid var(--bs-border-color-translucent); }
.nex-tableau-tout-aucun .btn { flex: 1 1 0; white-space: nowrap; }   /* boutons collés de même largeur (comme la densité) */
.nex-tableau-menu-recherche { position: relative; padding: .4rem .75rem; border-bottom: 1px solid var(--bs-border-color-translucent); }
.nex-tableau-menu-recherche input { padding-right: 1.75rem; }
/* croix « Vider » d'un champ de recherche (menu latéral, menus du tableau ; 08/10/2026) : visible seulement si le champ a du texte */
.nex-champ-vider { position: absolute; right: 1.1rem; top: 50%; transform: translateY(-50%); border: 0; background: none; color: inherit; opacity: .6;
	padding: .15rem .3rem; line-height: 1; font-size: .75rem; cursor: pointer; }
.nex-champ-vider:hover, .nex-champ-vider:focus-visible { opacity: 1; }
input:placeholder-shown + .nex-champ-vider { display: none; }
.nex-menu-filtre input, .nex-tableau-menu-recherche input { appearance: none; }
.nex-menu-filtre input::-webkit-search-cancel-button, .nex-tableau-menu-recherche input::-webkit-search-cancel-button { display: none; }
.nex-tableau-colonnes-liste > label[hidden] { display: none !important; }

/* Cartes (12/10/2026, js/carte.js, Leaflet) : zone arrondie, légende des trajets */
.nex-carte { width: 100%; min-height: 16rem; border: 1px solid var(--bs-border-color); border-radius: var(--bs-border-radius); overflow: hidden; z-index: 0; }
.nex-carte .leaflet-control-layers, .nex-carte .leaflet-bar a { color: #212529; }
.nex-carte-legende ol li { margin-bottom: .15rem; }
