/* ==========================================================================
   Gestion d'appels entrants - InfoCaisse - feuille de style
   Repères visuels repris de l'ancien classeur Excel :
   vert = résolu/clos, jaune = planifié, orange = à facturer, violet = boîtier,
   rouge = planning dépassé.
   ========================================================================== */

:root {
  /* --- Habillage InfoCaisse (22/08/2026) ------------------------------------
     Anthracite + le vert-jaune du logo. Ces jetons n'ont AUCUNE valeur métier :
     bandeau, onglets, boutons, focus, survol. Ils sont volontairement SÉPARÉS
     des bleus ci-dessous, qui portent, eux, du sens (badge « En cours », trait
     de séparation des journées, pastille de suivi non lu). Repeindre
     l'habillage en touchant --bleu modifierait ces repères sans prévenir.
     ⚠️ --accent ne se pose QUE sur du sombre : sur blanc il donne 1,16:1,
     illisible. Ne jamais s'en servir pour du texte sur fond clair. */
  --chrome: #1b2228;
  --chrome-fonce: #12181c;
  /* L'anthracite employé en TEXTE (titres, liens, numéros) : le même que
     --chrome en clair, éclairci par le mode sombre (22/10/2026). Ne pas s'en
     servir sur un fond vert-jaune --accent, qui reste clair dans les deux
     thèmes : là, c'est --chrome. */
  --chrome-texte: #1b2228;
  --chrome-clair: #eef0f2;   /* survol de ligne : gris neutre, sans teinte */
  --accent: #dafe0a;         /* le vert-jaune du mot « Caisse » du logo */

  /* --- Bleus de STATUT - ne pas réutiliser pour de l'habillage ------------- */
  --bleu: #1f5f8b;
  --bleu-fonce: #17475f;
  --bleu-clair: #e8f1f7;

  --vert: #d7f0d2;
  --vert-bord: #7cbf6e;
  --vert-texte: #1f6b2a;

  --jaune: #fff6c2;
  --jaune-bord: #e0c94a;

  --orange: #ffd9a8;
  --orange-bord: #e08b2e;
  --orange-texte: #a35608;

  --violet: #d9c9ee;
  --violet-bord: #8358bd;

  /* Sarcelle - état « Reçue » d'une RMA (10/09/2026). Teinte NEUVE, sans autre
     sens dans l'outil : le seul état RMA qui réclame un geste. */
  --sarcelle: #d3efec;
  --sarcelle-bord: #2a9d8f;
  --sarcelle-texte: #0f5a52;

  --rouge: #d33f3f;
  --rouge-clair: #fde4e4;

  --gris-texte: #2c3338;
  --gris-doux: #667079;
  --bordure: #d5dbe0;
  --fond: #f4f6f8;
  --blanc: #fff;

  --radius: 6px;
  --ombre: 0 2px 8px rgba(20, 40, 60, .12);
  /* Retrait horizontal du bandeau. La bannière de version s'aligne dessus
     (30/09/2026) : posée en absolu, elle se cale sur la PADDING box du
     bandeau, donc sur x = 0 - il faut donc la décaler de ce même retrait.
     Même procédé que --pager-h : si le retrait change, c'est ICI. */
  --topbar-pad: 16px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  color: var(--gris-texte);
  background: var(--fond);
}

.hidden { display: none !important; }
.spacer { flex: 1; }
.mt { margin-top: 18px; }

/* ---------------------------- Connexion ---------------------------- */
/* Refonte du 15/10/2026 : mélange des maquettes 6 + 9, variante B. Colonne
   anthracite à gauche (logo, version), à droite le tableau des appels estompé
   sous un voile anthracite, et le formulaire dans une carte blanche soulignée
   de vert-jaune, alignée à gauche. Le « tableau » est un dessin en CSS :
   aucune donnée, on n'est pas connecté. */
.login-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  background: var(--chrome);
}
.login-colonne {
  position: relative;
  z-index: 2;
  background: var(--chrome);
  border-right: 3px solid var(--accent);
  padding: 30px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.login-colonne img { width: 100%; max-width: 124px; height: auto; display: block; }
.login-version { margin-top: auto; color: #8c979f; font-size: 11.5px; font-variant-numeric: tabular-nums; }

.login-scene { position: relative; overflow: hidden; min-width: 0; }
/* Le tableau en filigrane : en-tête, puis lignes aux couleurs du dashboard
   (bleu en cours, orange à facturer, blanc, vert résolu, rouge en retard),
   chaque ligne portant des barres grises en guise de texte. */
.login-fond { position: absolute; inset: 0; background: var(--blanc); filter: blur(2px); }
.login-fond-lignes { display: flex; flex-direction: column; }
/* 🔴 Une VRAIE grille de colonnes, la même pour l'en-tête et chaque ligne, sur
   toute la largeur (15/10/2026, signalé par l'utilisateur : barres de largeurs
   différentes d'une ligne à l'autre, rien d'aligné, et la moitié droite vide
   sur un écran de 1 920 px). Les colonnes reprennent celles du tableau des
   appels ; seule la longueur du « texte » varie, toujours calée à gauche de
   sa colonne. */
.lf-ligne {
  display: grid;
  grid-template-columns: 52px 84px minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1.1fr) minmax(0, .8fr) minmax(0, 3fr) 92px 46px 64px 84px 84px 78px 46px 46px;
  column-gap: 18px;
  align-items: center;
  height: 31px;
  padding: 0 14px;
  border-bottom: 1px solid #e3e8ec;
}
.lf-ligne i { display: block; height: 7px; border-radius: 3px; background: #c9d0d5; }
.lf-ligne i.lf-n { background: #aab4bb; }
.lf-ligne i.lf-badge { height: 16px; border-radius: 999px; }
.lf-ligne i.lf-init { height: 18px; width: 26px !important; border-radius: 999px; background: #8c979f; }
.lf-tete { background: #f4f6f7; border-bottom: 2px solid var(--chrome); height: 34px; }
.lf-tete i { background: #8c979f; height: 6px; }
.lf-jour { border-top: 2px solid var(--bleu); }
.lf-encours { background: #eef4fa; } .lf-facturer { background: #ffeacf; } .lf-resolu { background: #e6f6e2; } .lf-retard { background: #fdeaea; }
.login-scene::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(27, 34, 40, .58);
}
.login-cartes {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px clamp(24px, 7vw, 110px);
}

.login-box {
  background: var(--blanc);
  width: 400px;
  max-width: 100%;
  padding: 30px 32px 26px;
  border-radius: 10px;
  border-bottom: 3px solid var(--accent);
  box-shadow: 0 16px 44px rgba(0, 0, 0, .38);
}
.login-box h1 { margin: 0; font-size: 26px; font-weight: 800; line-height: 1.15; color: var(--chrome); }
.login-sub { margin: 6px 0 22px; color: var(--gris-doux); font-size: 13px; line-height: 1.45; }
.login-box label { display: block; margin-bottom: 14px; font-weight: 700; font-size: 12px; color: #3f4a52; }
.login-champ {
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid var(--bordure);
  border-radius: var(--radius);
  background: var(--blanc);
}
.login-champ:focus-within { border-color: var(--chrome); box-shadow: 0 0 0 1px var(--chrome); }
.login-champ .ico { width: 16px; height: 16px; color: var(--gris-doux); flex: 0 0 auto; }
.login-champ input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 9px 0;
  border: 0;
  outline: 0;
  background: none;
  font-size: 14px;
  font-weight: 400;
  font-family: inherit;
}
.login-box .btn-primary { background: var(--chrome); border-color: var(--chrome); }
.login-box .btn-primary:hover { background: var(--chrome-fonce); }
.login-actions { display: flex; align-items: center; gap: 14px; margin-top: 4px; }
.login-actions .btn { flex: 1 1 auto; justify-content: center; padding-block: 9px; }
.login-actions .login-lien { margin: 0; flex: 0 0 auto; }

/* Liens discrets de l'écran de connexion : « Mot de passe oublié ? », « Retour
   à la connexion » (14/09/2026). Des `<button type="button">` et non des `<a>` :
   ils vivent dans un formulaire, et Entrée ne doit jamais les déclencher. */
.login-lien {
  display: block;
  margin: 10px auto 0;
  padding: 4px;
  background: none;
  border: 0;
  color: var(--gris-texte);
  font-size: 12.5px;
  text-decoration: underline;
  cursor: pointer;
}
.login-lien:hover { color: var(--chrome); }
.login-info {
  margin-top: 12px;
  padding: 10px 12px;
  background: var(--chrome-clair);
  border: 1px solid var(--bordure);
  border-radius: var(--radius);
  font-size: 12.5px;
  line-height: 1.45;
}
.login-box .btn + .btn { margin-top: 8px; }

/* Écran étroit : la colonne devient un bandeau en haut. */
@media (max-width: 700px) {
  .login-screen { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .login-colonne { flex-direction: row; align-items: center; padding: 14px 16px; border-right: 0; border-bottom: 3px solid var(--accent); }
  .login-colonne img { max-width: 110px; }
  .login-version { margin: 0 0 0 auto; }
  .login-cartes { min-height: 0; padding: 24px 16px; justify-content: center; }
}

/* ---------------------------- Barre du haut ---------------------------- */
/* 🔴 `height` et non `min-height` - corrigé le 24/08/2026.
   Avec `min-height: 100vh`, .app grandissait jusqu'à la taille de son contenu
   (9 778 px mesurés sous 1500 tickets) : plus rien ne contraignait ses enfants,
   `.table-wrap` s'étirait au lieu de défiler, et c'est la FENÊTRE qui défilait.
   Trois conséquences, toutes corrigées d'un coup en fixant la hauteur :
     · le bandeau partait vers le haut ;
     · `.grid thead th` (position: sticky) collait à un conteneur qui ne
       défilait jamais - les libellés de colonnes disparaissaient ;
     · `afficherTickets()` restaure le scrollTop du cadre pour ne pas perdre
       la place au rafraîchissement : l'opération ne faisait rien.
   Sans risque : les quatre vues logent leur contenu dans un `.table-wrap`, et
   les trois sous-vues Boîtiers basculent en `hidden`. */
.app { height: 100vh; overflow: hidden; display: flex; flex-direction: column; }

.topbar {
  /* Repère de positionnement de la bannière de version (30/09/2026).
     ⚠️ Le menu Administration et la cloche ne bougent pas : leurs panneaux
     sont ancrés sur leurs propres conteneurs (.admin-zone, .cloche-zone),
     tous deux déjà positionnés - vérifié avant de poser cette ligne. */
  position: relative;
  background: linear-gradient(135deg, var(--chrome) 0%, var(--chrome-fonce) 100%);
  color: var(--blanc);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--topbar-pad);
  height: 48px;
  flex: 0 0 auto;
}

.topbar-left, .topbar-right { display: flex; align-items: center; gap: 14px; }
/* Barre d'outils pleine hauteur (22/10/2026) : les segments touchent le haut
   et le bas du bandeau, séparés par des filets - variante 10 choisie. */
.topbar-right { align-self: stretch; gap: 0; }
.topbar-right .maj-heure { padding-right: 14px; }

/* Logo société dans le bandeau. Le fond anthracite fait ressortir le logo sans
   traitement particulier - c'est du texte clair sur fond transparent, il lui
   faut impérativement un fond sombre. `onerror` côté HTML : si le fichier
   manque, l'image disparaît au lieu d'afficher une icône cassée. */
.topbar-logo { display: flex; align-items: center; flex-shrink: 0; }
.topbar-logo img {
  height: 26px;        /* logo 482x89 → environ 141px de large, cale sur les 48px du bandeau */
  max-width: 150px;
  object-fit: contain;
  display: block;
}

/* Bannière de version au survol du logo (30/09/2026)
   ==========================================================================
   Demandée par l'utilisateur. Le texte vient de GET /api/version, jamais d'une
   constante du frontend - voir chargerVersion() dans app.js.

   🔴 FLOTTANTE (position: absolute) et `pointer-events: none` : elle ne décale
   rien dans le bandeau et n'intercepte aucun clic. Même principe que le panneau
   de suggestions et que celui du gérant, où le décalage a été mesuré à 0 px.

   ⚠️ z-index 65 : au-dessus de l'en-tête collant du tableau (2) et du bouton de
   remontée (40), SOUS les modales (100 et 200) - une fiche ouverte doit la
   recouvrir. Le menu Administration et la cloche sont à 60, juste en dessous :
   c'est voulu, cette bannière est la plus éphémère des trois.

   ⚠️ `--accent` n'est posé que sur de l'anthracite (13,91:1), jamais sur du
   clair où il tombe à 1,16:1. C'est la règle de l'habillage InfoCaisse. */
.logo-version {
  position: absolute;
  /* 🔴 Ancrée sur `.topbar`, PAS sur `.topbar-logo` : mesuré, la boîte du logo
     ne fait que 29 px centrées dans un bandeau de 48, la bannière retombait
     donc À L'INTÉRIEUR de la barre (y = 44,5 pour un bas de barre à 48).
     `left: 0` se cale sur le padding du bandeau, donc exactement sur le bord
     gauche du logo. Le liseré vert-jaune la rattache visuellement à la barre,
     la même signature que l'onglet actif et le bouton de remontée. */
  top: 100%;
  left: var(--topbar-pad);
  z-index: 65;
  width: max-content;
  max-width: 260px;
  padding: 7px 11px;
  background: var(--chrome);
  border-top: 2px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--ombre);
  color: var(--blanc);
  font-size: 12px;
  line-height: 1.5;
  opacity: 0;
  pointer-events: none;
  transition: opacity .12s ease;
}
.topbar-logo:hover .logo-version { opacity: 1; }
/* Le nom complet de l'outil : il rend service surtout sous 1 600 px, où
   `.brand` est masqué par la media query et où le bandeau ne le dit plus. */
.logo-version b { display: block; font-weight: 700; }
.logo-version span { display: block; color: var(--accent); font-variant-numeric: tabular-nums; }

.brand { font-weight: 700; font-size: 16px; letter-spacing: .3px; }
/* 🔴 Sous 1 520 px, le libellé s'efface (10/09/2026). Mesuré avec l'onglet RMA
   et un utilisateur connecté : le bandeau demande 1 509 px. En dessous, le titre
   ET le nom de l'utilisateur passaient sur deux lignes. Le logo InfoCaisse reste,
   et le nom complet de l'outil est dans l'onglet du navigateur. Sans le titre,
   le bandeau tient jusqu'à ~1 300 px. */
/* Seuil remonté de 1519 à 1599 px le 15/09/2026 : l'onglet Licences (+95 px)
   faisait passer le nom de l'utilisateur sur deux lignes à 1520 px (mesuré). */
/* Seuil remonté de 1599 à 1719 px le 09/10/2026 : avec l'onglet « Ma journée »
   des techniciens, le bandeau demande 1 703 px titre affiché (mesuré avec
   « Vincent DEFOLIE (VD) », responsable, donc engrenage compris). */
/* Seuil REDESCENDU à 1 579 px le 12/10/2026 : Boîtiers, RMA, Licences et
   Bibliothèque sont regroupés dans le menu « Atelier », le bandeau ne demande
   plus que 1 546 px titre affiché (mesuré, même compte : 34 px de marge à
   1 580). */
@media (max-width: 1579px) { .brand { display: none; } }
/* Sous 1 500 px, le bandeau sans titre demande encore 1 489 px (même mesure) :
   « Statistiques » devient « Stats » et les onglets se resserrent. Le mot
   complet reste dans l'infobulle et l'aria-label du bouton. */
.nav-btn .lib-court { display: none; }
/* Seuil REDESCENDU à 1 359 px le 12/10/2026 (menu « Atelier ») : les
   libellés longs ne demandent plus que 1 332 px sans le titre (mesuré). */
@media (max-width: 1359px) {
  .nav-btn .lib-long { display: none; }
  .nav-btn .lib-court { display: inline; }
  .tabs-nav .nav-btn { padding-left: 11px; padding-right: 11px; }
}
/* 🔴 Onglets en SEGMENTS PLEINE HAUTEUR (22/10/2026), le même gabarit que les
   boutons de droite (`.barre-btn`) : demandé par l'utilisateur, deux styles
   dans un même bandeau faisaient bizarre. Filet à gauche de chaque onglet, et
   un dernier à droite de la navigation pour la refermer. */
.topbar-left { align-self: stretch; }
.tabs-nav {
  display: flex;
  align-self: stretch;
  gap: 0;
  border-right: 1px solid rgba(255, 255, 255, .12);
}
.tabs-nav .atelier-zone { align-self: stretch; }

.nav-btn {
  height: 100%;
  background: transparent;
  border: none;
  border-left: 1px solid rgba(255, 255, 255, .12);
  border-radius: 0;
  color: rgba(255, 255, 255, .82);
  padding: 0 15px;
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
  white-space: nowrap;
  transition: background-color .12s ease;
  /* Icône + libellé sur une ligne. Les icônes sont de la même famille que
     celles du formulaire d'appel (trait 1,8, extrémités arrondies) : elles
     prennent la couleur du texte, donc elles s'éclaircissent avec l'onglet
     actif sans règle supplémentaire. */
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.nav-btn .ico { width: 18px; height: 18px; vertical-align: 0; }
.nav-btn:hover,
.nav-btn[aria-expanded="true"] { background: rgba(255, 255, 255, .10); color: #fff; }
.nav-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
/* L'onglet courant est souligné du vert-jaune du logo, bien posé sur du
   sombre. Le fond translucide seul ne suffisait pas à le distinguer du survol. */
.nav-btn.active {
  background: rgba(255, 255, 255, .10);
  color: #fff;
  font-weight: 600;
  box-shadow: inset 0 -3px 0 var(--accent);
}

/* ------------------------ Menu Administration ------------------------ */
/* 🔴 Depuis le 22/10/2026, ce n'est plus un bouton du bandeau (l'engrenage)
   mais un SOUS-MENU du menu de l'utilisateur (option B, couronne). Les entrées
   et leurs identifiants n'ont pas changé. */
.admin-zone { position: relative; display: flex; }
.admin-fleche { font-size: 10px; line-height: 1; }

.admin-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  /* Même plan que le panneau de la cloche : au-dessus du contenu, sous les
     modales (100 et 200) - une fiche ouverte doit recouvrir ce menu. */
  z-index: 60;
  min-width: 216px;
  background: var(--blanc);
  color: var(--gris-texte);
  border: 1px solid var(--bordure);
  border-radius: var(--radius);
  box-shadow: var(--ombre);
  overflow: hidden;
  padding-bottom: 4px;
}
.admin-tete {
  padding: 9px 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--gris-doux);
  border-bottom: 1px solid var(--bordure);
  margin-bottom: 4px;
}
.admin-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 9px 12px;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 13px;
  color: var(--gris-texte);
  text-align: left;
  cursor: pointer;
}
.admin-item:hover { background: var(--chrome-clair); }
/* Une entrée qui est un LIEN (exemple de CSV, 20/10/2026) : même allure qu'un bouton. */
a.admin-item { text-decoration: none; box-sizing: border-box; }
/* Geste réservé à un autre rôle (export client, 15/10/2026) : grisé, pas masqué. */
.admin-item:disabled { opacity: .45; cursor: not-allowed; }
.admin-item:disabled:hover { background: none; }
.admin-item .ico { width: 17px; height: 17px; flex: 0 0 auto; }

/* ---------------- Boutons du bandeau, côté droit (22/10/2026) ----------------
   Combinaison des variantes 9 et 10 choisie parmi 10 pistes : segments pleine
   hauteur séparés par des filets (10), avatar d'initiales et Déconnexion en
   icône (9). Ils remplacent les `.btn-ghost .btn-sm`, jugés trop fins (23 px
   de haut). Même survol que les onglets de navigation, le langage du bandeau. */
.barre-btn {
  height: 100%;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 15px;
  background: transparent;
  border: none;
  border-left: 1px solid rgba(255, 255, 255, .12);
  border-radius: 0;
  color: rgba(255, 255, 255, .9);
  font-family: inherit;
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .12s ease;
}
.barre-btn:hover,
.barre-btn[aria-expanded="true"] { background: rgba(255, 255, 255, .10); color: #fff; }
.barre-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.barre-btn:disabled { opacity: .5; cursor: progress; }
.barre-btn .ico { width: 18px; height: 18px; vertical-align: 0; }
/* Un écran du sous-menu Administration est affiché : le nom porte le
   soulignement vert-jaune, comme l'engrenage le portait avant lui. */
.barre-btn.active { background: rgba(255, 255, 255, .10); color: #fff; box-shadow: inset 0 -3px 0 var(--accent); }
.barre-ico { padding: 0 14px; }
.cloche-zone, .user-zone { align-self: stretch; }

/* L'onde de la cloche reste autour de l'ICÔNE : posée sur tout le segment
   (48 px), elle débordait largement du bandeau. */
.barre-btn.cloche-btn::after { inset: 9px 6px; }
/* La respiration animait le contour du petit bouton, qui n'existe plus :
   elle passe sur le fond et le soulignement, toujours en vert-jaune. */
.barre-btn.cloche-btn.respire { animation-name: cloche-respire-barre; }
@keyframes cloche-respire-barre {
  0%, 100% { background: transparent; box-shadow: inset 0 -3px 0 rgba(218, 254, 10, 0); }
  50% { background: rgba(218, 254, 10, .14); box-shadow: inset 0 -3px 0 var(--accent); }
}
.barre-btn .cloche-muet { left: 8px; bottom: 10px; }

/* Avatar d'initiales : vert-jaune sur l'anthracite, texte anthracite dessus
   (13,91:1) - la règle de l'habillage. */
.user-avatar {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--accent);
  color: var(--chrome-texte);
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.user-zone { position: relative; display: flex; }
/* Le menu tombe pile sous le segment (pas d'écart à franchir au survol), et
   `overflow: visible` laisse sortir le sous-menu Administration. */
.user-menu {
  top: 100%;
  left: auto;
  right: 0;
  /* `max-content` : ancré sur un segment étroit, le menu prenait sa largeur et
     l'en-tête « Connecté en tant que … » passait sur deux lignes (mesuré). */
  width: max-content;
  min-width: 240px;
  overflow: visible;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}
.user-menu-tete { text-transform: none; letter-spacing: 0; font-weight: 400; }
.user-menu .admin-zone { display: block; }
.sous-fleche { margin-left: auto; font-size: 15px; line-height: 1; color: var(--gris-doux); }
#btn-admin[aria-expanded="true"] { background: var(--chrome-clair); }
/* Sous-menu : il s'ouvre à GAUCHE, le menu de l'utilisateur étant collé au
   bord droit de l'écran. Collé au menu, sans écart, pour le même survol. */
.sous-menu { top: -5px; left: auto; right: 100%; min-width: 260px; }

/* ---------------------------- Cloche ---------------------------- */
.cloche-zone { position: relative; display: flex; }
.cloche-btn { display: inline-flex; align-items: center; gap: 5px; position: relative; }

/* Une notification vient d'arriver (06/10/2026) : la cloche oscille une
   seconde, en même temps que le son. Pivot en haut, comme une vraie cloche. */
.cloche-btn.sonne .ico { animation: cloche-sonne 0.9s ease-out; transform-origin: 50% 8%; }
@keyframes cloche-sonne {
  0%, 100% { transform: rotate(0); }
  15% { transform: rotate(16deg); }
  30% { transform: rotate(-13deg); }
  45% { transform: rotate(9deg); }
  60% { transform: rotate(-6deg); }
  75% { transform: rotate(3deg); }
}
/* ⚠️ Plus de règle `prefers-reduced-motion` ici : voir l'onde plus bas. */

/* Arrivée d'une notification (06/10/2026), choix de l'utilisateur parmi cinq
   maquettes : proposition 1 (l'ONDE) + proposition 5 (la RESPIRATION).
   ⚠️ Vert-jaune `--accent` : permis ici, il est sur l'anthracite du bandeau
   (13,91:1) - jamais sur du clair (1,16:1). Aucune couleur de statut. */

/* 1. L'onde : deux anneaux qui s'échappent du bouton, à l'arrivée. */
.cloche-btn::after {
  content: ""; position: absolute; inset: -2px;
  border: 2px solid var(--accent); border-radius: var(--radius);
  opacity: 0; pointer-events: none;
}
.cloche-btn.onde::after { animation: cloche-onde 1.1s ease-out 2; }
@keyframes cloche-onde {
  0% { transform: scale(1); opacity: .9; }
  100% { transform: scale(1.7); opacity: 0; }
}

/* 5. La respiration : le contour pulse jusqu'à l'ouverture de la cloche (ou
   jusqu'à ce que tout soit vu). C'est elle qui couvre l'onglet resté en
   arrière-plan : l'onde s'y est jouée sans témoin, la respiration attend. */
.cloche-btn.respire { animation: cloche-respire 1.8s ease-in-out infinite; }
@keyframes cloche-respire {
  0%, 100% { border-color: rgba(255, 255, 255, .35); box-shadow: 0 0 0 0 rgba(218, 254, 10, 0); }
  50% { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(218, 254, 10, .35); }
}

/* 🔴 L'onde et la respiration jouent MÊME quand le système demande de limiter
   les animations - décision de l'utilisateur le 06/10/2026. Mesuré sur le
   serveur : « Effets d'animation » de Windows DÉSACTIVÉS (réglage courant sur
   un serveur ou en bureau à distance, que personne n'a choisi pour l'outil),
   et la première version n'affichait alors qu'un contour vert fixe - « ce
   n'est pas ce que nous avons décidé ». Le reste de l'interface continue de
   respecter le réglage ; seul ce signal, voulu, y échappe. */

/* Son inactif (06/10/2026) : petit haut-parleur barré en coin de la cloche.
   Gris clair d'habillage sur l'anthracite - ce n'est ni une alerte ni un
   statut, juste une information. Il disparaît au premier clic dans la page. */
.cloche-muet {
  position: absolute; left: 2px; bottom: 1px;
  width: 11px; height: 11px; display: inline-flex;
  background: var(--chrome); border-radius: 50%;
}
.cloche-muet svg {
  width: 11px; height: 11px; fill: none; stroke: #ced5d9;
  stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
}

/* Compteur de non-lus. Même bleu que la pastille « +N » du dashboard : les deux
   disent la même chose - « il y a du nouveau pour toi » - et doivent se
   reconnaître. Sur le bandeau anthracite, ce bleu ne concurrence aucune des
   couleurs de statut, qui ne vivent que dans le tableau. */
.cloche-compteur {
  background: var(--bleu);
  color: #fff;
  border-radius: 9px;
  padding: 0 5px;
  min-width: 17px;
  height: 16px;
  line-height: 16px;
  font-size: 10.5px;
  font-weight: 700;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.cloche-panneau {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  width: 380px;
  max-width: calc(100vw - 32px);
  background: var(--blanc);
  color: var(--gris-texte);
  border: 1px solid var(--bordure);
  border-radius: var(--radius);
  box-shadow: var(--ombre);
  overflow: hidden;
}
.cloche-tete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px 8px 12px;
  border-bottom: 1px solid var(--bordure);
  font-weight: 600;
  font-size: 13px;
}
.cloche-actions { display: flex; gap: 6px; }
.cloche-liste { max-height: 380px; overflow-y: auto; }
.cloche-vide { margin: 0; padding: 18px 14px; color: var(--gris-doux); font-size: 13px; }

.cloche-item {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--chrome-clair);
  font-size: 12.5px;
}
.cloche-item:hover { background: var(--chrome-clair); }
/* Non lu : un filet bleu à gauche, pas un fond coloré. Un fond ferait une tache
   de couleur dans un panneau où le blanc doit rester la norme. */
.cloche-item.non-lu { border-left: 3px solid var(--bleu); }
/* Rappel à heure fixe (27/10/2026) : libellé indigo, filet indigo s'il est non lu. */
.cloche-item.cloche-rappel .cloche-libelle { color: #4a3fa0; font-weight: 600; }
.cloche-item.cloche-rappel.non-lu { border-left-color: #6b5fb0; }

.cloche-corps {
  flex: 1;
  /* Sans min-width:0, un enfant flex refuse de rétrécir sous sa taille de
     contenu : le nom du client ne pourrait jamais s'abréger en « … ». */
  min-width: 0;
  text-align: left;
  background: none;
  border: 0;
  padding: 9px 4px 9px 12px;
  cursor: pointer;
  font: inherit;
}
.cloche-item.non-lu .cloche-corps { padding-left: 9px; }

/* Croix : retire la ligne de MA cloche, sans rien détruire pour les autres.
   Volontairement visible en permanence et non au survol - une croix qui
   n'apparaît qu'au survol est introuvable pour qui ne survole pas, et
   inaccessible au doigt sur un écran tactile. */
.cloche-croix {
  flex: none;
  background: none;
  border: 0;
  padding: 0 11px;
  cursor: pointer;
  color: var(--gris-doux);
  font-size: 17px;
  line-height: 1;
}
.cloche-croix:hover { color: var(--rouge); }
.cloche-item-tete { display: flex; align-items: baseline; gap: 6px; margin-bottom: 2px; }
.cloche-ticket { font-weight: 700; font-variant-numeric: tabular-nums; }
.cloche-client {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--gris-doux);
}
.cloche-quand { color: var(--gris-doux); font-size: 11px; white-space: nowrap; }
.cloche-libelle { display: block; color: var(--gris-texte); }
/* Nommé uniquement quand l'auteur n'est PAS affecté au ticket (règle n°2). */
.cloche-auteur { margin-left: 6px; color: var(--gris-doux); font-style: italic; }

/* ---------------------------- Retour en haut de liste ---------------------------- */
/* Pastille anthracite soulignée de vert-jaune : la même signature que l'onglet
   actif du bandeau, pour que le bouton appartienne visiblement à l'outil.
   ⚠️ z-index 40, donc SOUS les modales (100 et 200) : une fiche ticket ouverte
   doit le recouvrir, pas cohabiter avec lui. */
/* ⚠️ Posée AU-DESSUS de la pagination, pas dans le coin.
   Depuis que la mise en page est figée (24/08), `.pager` est collé en bas de
   l'écran en permanence : une pastille à `bottom: 22px` recouvrait le bouton
   « Suivant › ». Mesuré : la pagination occupe les 46 px du bas.
   `--pager-h` porte cette hauteur - si le contenu de `.pager` change (une
   ligne de plus, un bouton plus haut), c'est ici qu'il faut la corriger.
   `right` aligne le bord droit de la pastille sur celui de « Suivant › »
   (16 px de padding de `.view` + 2 px de `.pager`). */
.btn-haut {
  --pager-h: 46px;
  position: fixed;
  right: 18px;
  bottom: calc(var(--pager-h) + 12px);
  z-index: 40;
  width: 40px;
  height: 40px;
  border: none;
  border-bottom: 3px solid var(--accent);
  border-radius: 50%;
  background: var(--chrome);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(20, 40, 60, .28);
}
.btn-haut:hover { background: var(--chrome-fonce); }
.btn-haut .ico { width: 19px; height: 19px; vertical-align: 0; }

.current-user { font-size: 13px; }

/* Heure du dernier chargement. Volontairement discrète : c'est une information
   de confiance qu'on va chercher quand on se demande « ces chiffres datent de
   quand ? », pas une alerte à imposer toute la journée. Chiffres tabulaires
   pour qu'elle ne tressaute pas à chaque minute qui change. */
.maj-heure {
  font-size: 11px;
  opacity: .75;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* ---------------------------- Boutons ---------------------------- */
.btn {
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 7px 14px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  background: var(--blanc);
  color: var(--gris-texte);
  border-color: var(--bordure);
  white-space: nowrap;
}
.btn:hover { filter: brightness(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-primary { background: var(--chrome); color: #fff; border-color: var(--chrome); font-weight: 600; }
.btn-primary:hover { background: var(--chrome-fonce); }
.btn-danger { background: var(--rouge); color: #fff; border-color: var(--rouge); }
.btn-ghost { background: transparent; border-color: rgba(255, 255, 255, .35); color: inherit; }
.view .btn-ghost, .modal .btn-ghost { border-color: var(--bordure); color: var(--gris-texte); background: var(--blanc); }
.btn-sm { padding: 4px 10px; font-size: 12px; }

/* Bouton réduit à son icône - impression PDF du tableau (05/10/2026).
   ⚠️ Carré et de la MÊME hauteur que ses voisins : il vit entre la recherche et
   « + Nouveau ticket », un bouton plus bas ou plus haut casserait l'alignement
   de la barre d'outils. Le mot est dans `title` et `aria-label`, jamais perdu -
   même choix que l'engrenage du menu Administration, mesuré à 43 px contre 148
   avec son libellé. */
.btn-icone {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;   /* 7 + 17 (icône) + 7 + 2 (bordure) = 33 px, la hauteur exacte de ses deux voisins - mesurée */
  line-height: 0;
}
.btn-icone .ico { width: 17px; height: 17px; margin: 0; }
.btn-block { width: 100%; margin-top: 6px; }

/* « M'envoyer un lien par mail » sous le formulaire du bandeau : un geste
   secondaire, qui ne doit pas concurrencer le bouton « Modifier ». */
.pw-lien { margin: 12px 0 0; font-size: 12.5px; color: var(--gris-texte); }
.lien-texte {
  padding: 0;
  background: none;
  border: 0;
  color: var(--chrome-texte);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

/* Enregistrement qui dépasse DELAI_ROULETTE (app.js, `sansDoubleEnvoi`) : la
   roulette REMPLACE le libellé, au centre du bouton. Le texte devient
   transparent sans quitter le bouton : sa largeur ne bouge pas (rien ne se
   décale dans le pied de fenêtre) et son nom accessible reste lu.
   ⚠️ Rien ne s'affiche en dessous du délai : un enregistrement normal (30 à
   70 ms) ne doit rien faire clignoter. D'où aussi l'absence de `:disabled`. */
.btn.en-envoi { position: relative; color: transparent; cursor: progress; }
.btn.en-envoi::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 14px;
  margin: -9px 0 0 -9px; /* 14 px + 2 × 2 px de bordure = 18 px */
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: roulette-envoi .7s linear infinite;
}
/* Bouton clair (« Analyser le fichier ») : roulette anthracite. */
.btn.en-envoi:not(.btn-primary):not(.btn-danger)::after {
  border-color: rgba(27, 34, 40, .2);
  border-top-color: var(--chrome);
}
@keyframes roulette-envoi { to { transform: rotate(360deg); } }
/* Limiter les animations : ralentie, pas figée - c'est le seul signe que le
   serveur travaille, une roulette immobile ne dirait plus rien. */
@media (prefers-reduced-motion: reduce) { .btn.en-envoi::after { animation-duration: 2.4s; } }

/* ---------------------------- Vue / barre d'outils ---------------------------- */
.view { flex: 1; padding: 14px 16px 0; display: flex; flex-direction: column; min-height: 0; }

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.toolbar-right { display: flex; align-items: center; gap: 8px; }
.toolbar-title { font-weight: 600; font-size: 15px; }

.status-tabs { display: flex; gap: 6px; flex-wrap: wrap; }

.chip {
  border: 1px solid var(--bordure);
  background: var(--blanc);
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  color: #56626b;
}
.chip:hover { background: var(--chrome-clair); }
.chip.active { background: var(--chrome); border-color: var(--chrome); color: #fff; font-weight: 600; }
.chip-warn.active { background: var(--rouge); border-color: var(--rouge); }
.chip-bill.active { background: var(--orange-texte); border-color: var(--orange-texte); }
.chip-done.active { background: var(--vert-texte); border-color: var(--vert-texte); }

/* -------------------------- Menu de filtres --------------------------- */
.filtres-zone {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}
.filtres-menu { position: relative; }

.btn-filtrer { display: inline-flex; align-items: center; gap: 6px; }
.filtres-fleche { font-size: 11px; opacity: .7; }
/* Même spécificité que « .view .btn-ghost » : c'est la position PLUS BAS dans
   le fichier qui fait gagner cette règle. Ne pas la remonter. */
.btn-filtrer[aria-expanded="true"] {
  background: var(--chrome);
  border-color: var(--chrome);
  color: #fff;
}

.filtres-panneau {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  /* Au-dessus de l'en-tête collant du tableau (2), sous les modales (100). */
  z-index: 20;
  min-width: 280px;
  background: var(--blanc);
  border: 1px solid var(--bordure);
  border-radius: var(--radius);
  box-shadow: var(--ombre);
  padding: 12px 14px;
  text-align: left;
  /* Mesuré : le panneau fait 477 px de haut et démarre à 101 px du haut. Sous
     ~578 px de hauteur utile (portable en 1366×768 avec barres, écran de
     surveillance...) son bas était coupé et « Réinitialiser » devenait
     inatteignable. Il défile plutôt que de déborder. */
  max-height: calc(100vh - 125px);
  overflow-y: auto;
}
.filtres-groupe { border: 0; padding: 0; margin: 0 0 12px; }
.filtres-groupe legend,
.filtres-label {
  display: block;
  padding: 0;
  margin-bottom: 5px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--gris-doux);
}
.filtres-choix {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  padding: 3px 0;
  font-size: 13px;
  cursor: pointer;
}
.filtres-choix input { margin: 0; cursor: pointer; }
.filtres-aide {
  color: var(--gris-doux);
  font-size: 11px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}
.filtres-panneau select { width: 100%; }
.filtres-pied {
  border-top: 1px solid var(--bordure);
  padding-top: 10px;
}

/* Pastilles des filtres actifs. Elles répondent à « qu'est-ce que je regarde
   là ? » sans rouvrir le menu - c'est ce qui permet de replier les filtres
   sans perdre la lisibilité immédiate du dashboard. Un clic retire le filtre. */
.filtres-actifs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pastille {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--chrome);
  background: var(--chrome-clair);
  color: var(--chrome-texte);
  border-radius: 20px;
  padding: 4px 8px 4px 12px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}
.pastille:hover { background: #d8e7f2; }
.pastille-x { font-size: 14px; line-height: 1; opacity: .65; }
.pastille:hover .pastille-x { opacity: 1; }
.pastille-retard { border-color: var(--rouge); background: var(--rouge-clair); color: var(--rouge); }
.pastille-bs { border-color: var(--violet-bord); background: var(--violet); color: #4b2d75; }
/* RMA : habillage neutre, comme le repère du tableau - pas une couleur de statut. */
.pastille-rma { border-color: var(--chrome); background: var(--chrome-clair); color: var(--chrome-texte); }

/* Ligne de bon rattachée à une réservation : référence et quantité figées,
   seuls les S/N restent à saisir. */
.bl-reservation { flex: 1; min-width: 0; font-size: 13px; }
.bl-reservation .hint { display: block; }
.pastille-factu { border-color: var(--orange-bord); background: #ffeacf; color: var(--orange-texte); }
.pastille-done { border-color: var(--vert-bord); background: var(--vert); color: var(--vert-texte); }

/* ------------------- Composition d'un bon de livraison ------------------- */
.bl-ligne {
  border: 1px solid var(--bordure);
  border-radius: var(--radius);
  padding: 8px 10px;
  margin-bottom: 8px;
  background: var(--fond);
}
.bl-ligne-tete { display: flex; align-items: center; gap: 8px; }
.bl-ligne-tete .bl-ref, .bl-ligne-tete .bl-acc { flex: 1; min-width: 0; }
.bl-ligne-tete .bl-acc-libre { flex: 1; min-width: 0; }
.bl-ligne-tete .bl-qte, .bl-ligne-tete .bl-acc-qte { width: 72px; flex: none; }
.bl-suppr { flex: none; font-size: 16px; line-height: 1; padding: 2px 8px; }

/* Un couple de S/N par exemplaire : le socle part systématiquement avec le
   boîtier, les garder sur la même ligne dit lequel est allé avec lequel. */
.bl-series { margin-top: 6px; }
.bl-serie { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.bl-serie-num {
  width: 18px;
  flex: none;
  text-align: right;
  font-size: 12px;
  font-weight: 700;
  color: var(--gris-doux);
}
.bl-serie .input { flex: 1; min-width: 0; }

.check { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.check input { margin: 0; cursor: pointer; }
.mb { margin-bottom: 10px; }

.input {
  border: 1px solid var(--bordure);
  border-radius: var(--radius);
  padding: 8px 10px;
  font-size: 14px;
  font-family: inherit;
  background: var(--blanc);
  color: var(--gris-texte);
}
.input:focus { outline: 2px solid var(--chrome-clair); border-color: var(--chrome); }
/* Champ « Réf. facture » mis en évidence quand le patron vient de cocher le
   Visa RV sans avoir encore saisi de numéro. Simple rappel visuel, pas un
   blocage : la classe part dès la première frappe. */
.input-attention {
  background: #fff6ea;
  border-color: var(--orange-bord);
}
.input-attention:focus { outline-color: var(--orange); border-color: var(--orange-bord); }
.input-sm { padding: 7px 9px; font-size: 13px; }
#search-input { min-width: 280px; }
/* Le placeholder énumère tout ce que la recherche RMA accepte : tronqué à
   167 px, il perdait « fabricant » et « n° d'appel » (mesuré : 299 px requis). */
#rma-search { min-width: 310px; }

/* ---------------------------- Tableau dense ---------------------------- */
.table-wrap {
  flex: 1;
  overflow: auto;
  background: var(--blanc);
  border: 1px solid var(--bordure);
  border-radius: var(--radius);
  min-height: 0;
}

.grid { border-collapse: collapse; width: 100%; font-size: 14px; }

.grid thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #e3e8ec;
  border-bottom: 2px solid #b9c3cb;
  border-right: 1px solid var(--bordure);
  padding: 10px 10px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: #4a555e;
  white-space: nowrap;
}

.grid tbody td {
  border-bottom: 1px solid #dfe5ea;
  border-right: 1px solid #eef1f4;
  padding: 9px 10px;
  vertical-align: top;
  line-height: 1.45;
}

/* Chiffres alignés en colonne (dates, numéros) : plus facile à parcourir à l'œil. */
.grid .cell-num,
.grid .col-date,
.col-tel { font-variant-numeric: tabular-nums; }

.grid tbody tr { cursor: pointer; }
.grid tbody tr:hover td { background: var(--chrome-clair) !important; }

/* Repère de changement de jour (équivalent de la marque manuelle en colonne A
   que le patron utilisait pour contrôler les appels jour par jour). */
/* Changement de jour (22/10/2026, choix de l'utilisateur parmi 10 teintes) :
   AUBERGINE #5b1a5e en clair (10,3 à 12:1 sur les fonds de ligne, mesuré),
   magenta #ff66ff en sombre (voir le bloc MODE SOMBRE). Il était au bleu de
   statut, celui des appels « en cours », et se confondait avec eux. */
.grid tbody tr.jour-suivant td { border-top: 2px solid #5b1a5e; }

/* Ligne résolue = verte, comme dans l'Excel dès que « FAIT LE » est renseigné.
   Teintes volontairement plus pâles que les badges : le fond doit rester lisible
   sous du texte noir sur toute une journée de consultation. */
.grid tbody tr.st-resolu td { background: #e6f6e2; }
.grid tbody tr.st-nouveau td { background: var(--blanc); }
/* Bleu très pâle : « en cours » était à #fbfcfd, indiscernable du blanc de
   « nouveau ». Luminance perçue ≈ 243, donc plus clair que le vert « résolu »
   (≈ 239) et l'orange « à facturer » (≈ 237) - la hiérarchie visuelle reste :
   ces deux-là dominent la ligne, le bleu ne fait que teinter le travail en cours. */
.grid tbody tr.st-en_cours td { background: #eef4fa; }
.grid tbody tr.en-retard td { background: #fdeaea; }

/* Axe facturation. Déclaré après les couleurs de statut et le retard, donc
   prioritaire à spécificité égale : c'est voulu, « à facturer » prime même sur
   un planning dépassé (le retard reste signalé par la date rouge en colonne
   Planning). Luminance perçue calée sur le vert « résolu » ci-dessus (~238)
   pour que le texte noir reste aussi confortable à lire toute la journée.

   🔴 Il n'y a plus de règle `tr.facture` (retirée le 01/09/2026). Un ticket
   facturé colorait la ligne en VERT, donc la faisait passer pour résolue alors
   que l'intervention pouvait être encore en cours - le même défaut que la
   clôture automatique retirée le même jour. La ligne garde maintenant la
   couleur de son statut, et la facturation se lit dans la colonne Factu
   (étiquette « FACTURÉ » + numéro). **Ne pas la remettre.**

   ⚠️ Le vert reste celui de `tr.st-resolu` : un appel résolu ET facturé est
   donc vert, mais parce qu'il est RÉSOLU. */
.grid tbody tr.a-facturer td { background: #ffeacf; }

/* ==========================================================================
   Présentation « Aéré » - onglet Tickets UNIQUEMENT (29/09/2026)
   ==========================================================================
   Choisie parmi 6 pistes soumises à l'utilisateur. Tout est scopé à
   #tickets-table, jamais à .grid directement : cette classe est partagée par
   les grilles RMA, Licences, Boîtiers, Clients (vue liste) et les deux
   journaux, qui doivent rester inchangées. Ne pas remonter ces règles vers
   .grid - ce serait exactement le genre de fuite que le projet évite déjà
   pour .modale-appel et .modale-dense. */
#tickets-table thead th {
  background: var(--blanc);
  border-bottom: 2px solid var(--chrome);
  border-right: none;
  padding: 11px 14px;
}
#tickets-table tbody td {
  border-right: none;
  border-bottom: 1px solid rgba(20, 30, 40, .06);
  padding: 13px 14px;
  transition: background-color .12s ease;
}
#tickets-table tbody td:first-child { transition: background-color .12s ease, box-shadow .12s ease; }

/* Filet court centré entre les cellules (22/10/2026), variante 4 choisie parmi
   10 pistes soumises à l'utilisateur. 60 % de la hauteur : les filets entre
   appels restent seuls continus, la lecture ligne par ligne prime.
   ⚠️ Posé en ::after et pas en background-image : le survol réécrit le fond
   des cellules par `background: … !important` (shorthand), ce qui effaçait le
   filet sur la ligne survolée. Le <th> est déjà positionné (sticky). */
#tickets-table tbody td:not(:last-child) { position: relative; }
#tickets-table tbody td:not(:last-child)::after,
#tickets-table thead th:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 20%;
  bottom: 20%;
  right: 0;
  width: 1px;
  background: #d3dae0;
  pointer-events: none;
}

/* 🔴 Corrigé le 29/09/2026, trouvé en mesurant le rendu réel plutôt qu'à l'œil.
   `.col-motif` porte `min-width: 280px` mais UNIQUEMENT sur le <th> - la
   cellule de donnée utilise la classe `cell-motif`, jamais `col-motif`, donc
   ne recevait aucun plancher. Sous 15 colonnes, un numéro de téléphone en
   `white-space: nowrap` suffit à faire retomber le Motif à ~41 px mesurés :
   c'est ce qui rendait toute la ligne « bof », pas seulement le numéro. */
#tickets-table .cell-motif { min-width: 280px; }

/* La colonne Tél. n'avait que 9 px de marge pour un numéro complet (mesuré :
   icône + « 03 83 62 41 58 » = 109 px pour un budget de 118 px) - déjà trop
   juste avant le bouton de copie, qui a fait déborder. Élargie ici plutôt que
   sur `.col-tel` partagé (utilisé aussi par l'en-tête « Téléphone » de la page
   Clients) : uniquement l'en-tête du dashboard des appels est concerné. */
#tickets-table th.col-tel { width: 165px; }

/* Survol de ligne, piste « Mixte » : le fond fonce très légèrement SANS
   jamais sortir de la famille de couleur du statut (contrairement au gris
   neutre `!important` de la règle .grid partagée ci-dessus, qui reste la
   règle des autres tableaux) + un liseré de 3 px dans la teinte pleine du
   statut sur la cellule N°, pour dire précisément quelle ligne est visée.
   `!important` nécessaire pour l'emporter sur `.grid tbody tr:hover td` -
   entre deux règles importantes, la spécificité décide, et l'ID l'emporte. */
#tickets-table tbody tr:hover.st-nouveau td { background: var(--chrome-clair) !important; }
#tickets-table tbody tr:hover.st-en_cours td { background: #e0ebf5 !important; }
#tickets-table tbody tr:hover.st-resolu td { background: #d7efd1 !important; }
#tickets-table tbody tr:hover.en-retard td { background: #fadede !important; }
#tickets-table tbody tr:hover.a-facturer td { background: #ffe0b8 !important; }
#tickets-table tbody tr:hover.st-nouveau td:first-child { box-shadow: inset 3px 0 0 #7a5c00; }
#tickets-table tbody tr:hover.st-en_cours td:first-child { box-shadow: inset 3px 0 0 var(--bleu); }
#tickets-table tbody tr:hover.st-resolu td:first-child { box-shadow: inset 3px 0 0 var(--vert-texte); }
#tickets-table tbody tr:hover.en-retard td:first-child { box-shadow: inset 3px 0 0 var(--rouge); }
#tickets-table tbody tr:hover.a-facturer td:first-child { box-shadow: inset 3px 0 0 var(--orange-texte); }

/* Arrivée d'un appel (09/10/2026) - le pendant de Ma journée : la ligne
   s'ouvre en accordéon (le CONTENU des cellules, `.tk-ouvre`, et leur padding :
   une ligne de tableau ne s'anime pas en hauteur), puis le liseré de la
   cellule N° clignote trois fois, dans la teinte de survol de sa ligne - même
   ordre de priorité que les règles ci-dessus, « à facturer » en dernier.
   `--tk-ecoule` (délai négatif) laisse reprendre l'animation après un redessin.
   🔴 Hors `prefers-reduced-motion`, comme l'onde de la cloche : les effets
   d'animation de Windows sont coupés sur le serveur. */
#tickets-table tbody tr.st-nouveau { --tk-lisere: #7a5c00; }
#tickets-table tbody tr.st-en_cours { --tk-lisere: var(--bleu); }
#tickets-table tbody tr.st-resolu { --tk-lisere: var(--vert-texte); }
#tickets-table tbody tr.en-retard { --tk-lisere: var(--rouge); }
#tickets-table tbody tr.a-facturer { --tk-lisere: var(--orange-texte); }
@keyframes tk-accordeon { from { max-height: 0; opacity: 0; } to { max-height: 240px; opacity: 1; } }
@keyframes tk-padding { from { padding-top: 0; padding-bottom: 0; } }
@keyframes tk-lisere {
  0%, 100% { box-shadow: inset 3px 0 0 transparent; }
  50% { box-shadow: inset 3px 0 0 var(--tk-lisere, var(--chrome)); }
}
#tickets-table tbody tr.tk-ouverture td {
  animation: tk-padding .4s ease-out both;
  animation-delay: var(--tk-ecoule, 0ms);
}
#tickets-table tbody tr.tk-ouverture .tk-ouvre {
  overflow: hidden;
  animation: tk-accordeon .4s ease-out both;
  animation-delay: var(--tk-ecoule, 0ms);
}
#tickets-table tbody tr.tk-arrivee td:first-child {
  animation: tk-lisere .9s ease-in-out 3;
  animation-delay: calc(400ms + var(--tk-ecoule, 0ms));
}
/* Pendant l'ouverture, la cellule N° porte DEUX animations (padding et liseré). */
#tickets-table tbody tr.tk-ouverture.tk-arrivee td:first-child {
  animation: tk-padding .4s ease-out both, tk-lisere .9s ease-in-out 3;
  animation-delay: var(--tk-ecoule, 0ms), calc(400ms + var(--tk-ecoule, 0ms));
}

.col-num { width: 62px; }
.col-date { width: 94px; white-space: nowrap; }
.col-client { width: 195px; }
.col-ville { width: 135px; }
.col-tel { width: 118px; }
.col-logiciel { width: 105px; }
.col-statut { width: 88px; }
.col-canal { width: 52px; text-align: center; }
.col-tech { width: 96px; }
.col-flag { width: 66px; text-align: center; }
/* Badges centrés dans leur colonne (onglets Licences et RMA, 16/09/2026). L'en-tête
   ET les cellules portent la classe : sinon le titre et le badge ne s'alignent pas. */
.col-centre { text-align: center; }
/* ⚠️ `.grid thead th` pose `text-align: left` avec une spécificité supérieure : sans
   cette seconde règle, le titre restait à gauche au-dessus du badge centré (mesuré). */
.grid thead th.col-centre { text-align: center; }
/* Ces deux colonnes portent une seconde ligne (réf. facture / modèle de boîtier) :
   elles sont un peu plus larges que les autres colonnes d'étiquette. */
.col-factu { width: 118px; }
.col-bs { width: 86px; }
/* Colonnes de comptage du parc de boîtiers (stock / sortis / restant). */
.col-stock { width: 70px; text-align: center; }
.col-etat { width: 118px; }
.col-actions { width: 95px; }
.col-motif { min-width: 280px; }

.cell-num { font-weight: 700; color: #56626b; }
.cell-client { font-weight: 700; font-size: 14.5px; }
/* Le motif est l'information la plus consultée du tableau : en gras comme le
   nom du client, mais sans grossir la police (c'est du texte long). */
.cell-motif { white-space: pre-wrap; word-break: break-word; color: #1d2429; font-weight: 700; }

/* Seconde ligne d'une cellule d'étiquette : réf. facture sous « À FACT. »,
   modèle de boîtier sous « BS ». */
.cell-sub {
  margin-top: 2px;
  font-size: 11.5px;
  font-weight: 700;
  color: #56626b;
  word-break: break-word;
  line-height: 1.25;
}

.date-planning { color: #8a4a06; font-weight: 700; }
.date-retard { color: #b62828; font-weight: 800; }
.date-faite { color: #16571f; font-weight: 700; }

/* Badges d'attribution (initiales, ex. « VD », « AB/RD »). */
.tech-badge {
  display: inline-block;
  background: var(--chrome);
  color: #fff;
  border-radius: 3px;
  padding: 2px 7px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .3px;
  margin: 0 2px 2px 0;
}

/* Badge de statut, toujours affiché sur chaque ligne. Le fond de ligne ne peut
   pas porter cette information à lui seul : dès qu'un ticket est à facturer ou
   facturé, sa couleur de fond écrase celle du statut (priorité voulue). */
.badge-statut {
  display: inline-block;
  border-radius: 12px;
  padding: 2px 9px;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
  border: 1px solid;
}
.badge-nouveau { background: var(--jaune); border-color: var(--jaune-bord); color: #7a5c00; }
.badge-en_cours { background: var(--bleu-clair); border-color: var(--bleu); color: var(--bleu-fonce); }
.badge-resolu { background: var(--vert); border-color: var(--vert-bord); color: var(--vert-texte); }

.flag {
  display: inline-block;
  border-radius: 3px;
  padding: 2px 7px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.flag-facturer { background: var(--orange); border: 1px solid var(--orange-bord); color: var(--orange-texte); }
.flag-visa { background: var(--vert); border: 1px solid var(--vert-bord); color: var(--vert-texte); }
.flag-bs { background: var(--violet); border: 1px solid var(--violet-bord); color: #4a2a7a; }
.flag-mini { background: #e5eaee; border: 1px solid var(--bordure); color: var(--gris-doux); }
/* Étiquette « FACTURÉ », posée au-dessus du numéro de facture. */
.flag-facture { background: var(--vert); border: 1px solid var(--vert-bord); color: var(--vert-texte); }
/* Le numéro lui-même (ex. « 07-FA2600356 ») : chiffres tabulaires pour que les
   références s'alignent d'une ligne à l'autre. */
.cell-facture { color: var(--vert-texte); font-variant-numeric: tabular-nums; }

/* Compteurs de suivis et de pièces jointes, sous le motif.
   ⚠️ Le motif est en gras 700 juste au-dessus : en 12 px poids 400, les
   anciens compteurs s'effaçaient par comparaison (5,86:1 contre 15,71:1 pour
   le motif). Ils sont maintenant en 12,5 px gras, gris foncé, à 9,08:1. */
.meta-icons { margin-top: 3px; font-size: 12.5px; white-space: nowrap; }
.meta-grp {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-right: 11px;
  color: #3f4a52;
  font-weight: 700;
}
.meta-grp .ico-meta { width: 15px; height: 15px; stroke-width: 1.9; }

/* 🔴 « Du nouveau depuis la dernière lecture de l'équipe » : l'icône se REMPLIT
   et passe au bleu. Le remplacement de la pastille « +N », le 24/09/2026.

   Le remplissage n'est pas décoratif, il porte le signal : entre ce bleu et le
   gris ci-dessus il n'y a que **1,33:1** d'écart (luminances 0,103 et 0,066),
   donc la couleur seule serait invisible à 15 px - et davantage encore sur la
   ligne « en cours », déjà bleu pâle. Le passage du trait au plein est un
   changement de FORME, lisible même en noir et blanc. Ne pas retirer le `fill`
   en croyant que la couleur suffit.

   Contrastes mesurés de l'icône bleue sur les cinq fonds de ligne : 6,84 blanc ·
   6,18 en cours · 6,08 résolu · 5,84 à facturer · 5,91 en retard.

   ⚠️ Bleu de STATUT, celui qui signale déjà le non-lu dans la cloche - pas une
   sixième couleur, et surtout pas l'orange ni le rouge, qui portent « à
   facturer » et « en retard ». */
.meta-grp.meta-neuf { color: var(--bleu); }
.meta-grp.meta-neuf .ico-meta { fill: var(--bleu); }

.empty { padding: 40px; text-align: center; color: var(--gris-doux); }

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 2px 12px;
  flex: 0 0 auto;
}
.pager-info { font-size: 12px; color: var(--gris-doux); }
.pager-buttons { display: flex; gap: 6px; }

/* ---------------------------- Modales ---------------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 30, 45, .55);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 30px 16px;
  z-index: 100;
  overflow-y: auto;
}
/* Fenêtres CENTRÉES à l'écran (23/10/2026, demandé par l'utilisateur).
   🔴 Par des marges automatiques et PAS par `align-items: center` : une
   fenêtre plus haute que l'écran aurait alors son haut coupé, hors de portée
   du défilement (titre, croix, date d'appel). Avec `margin: auto`, elle se
   centre quand elle tient, et repart en haut, défilable, quand elle déborde. */
.modal-overlay > .modal { margin-top: auto; margin-bottom: auto; }

.modal {
  background: var(--blanc);
  border-radius: 8px;
  box-shadow: var(--ombre);
  width: 100%;
  max-width: 720px;
  display: flex;
  flex-direction: column;
}
.modal-lg { max-width: 1080px; }
.modal-sm { max-width: 460px; }

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--bordure);
}
.modal-head h2 { margin: 0; font-size: 17px; }

.modal-close {
  background: none;
  border: none;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  color: var(--gris-doux);
  padding: 0 4px;
}

.modal-body { padding: 16px 18px; }

.modal-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-top: 1px solid var(--bordure);
  background: #fafbfc;
  border-radius: 0 0 8px 8px;
}

/* ---------------------------- Formulaires ---------------------------- */
.form-grid { display: flex; flex-wrap: wrap; gap: 12px; }

.field { display: flex; flex-direction: column; gap: 4px; }
.field-full { flex: 1 1 100%; }
.field-sm { flex: 1 1 150px; }
.field-client { flex: 2 1 280px; }
.field label { font-size: 11.5px; font-weight: 600; color: var(--gris-doux); text-transform: uppercase; letter-spacing: .3px; }
.field .input { width: 100%; }
.req { color: var(--rouge); }
.hint { font-size: 11px; color: var(--gris-doux); font-weight: 400; text-transform: none; letter-spacing: 0; }
.hint.ok { color: var(--vert-texte); }
/* Contrepartie de `.hint.ok` : un SIRET introuvable ou un établissement fermé.
   Rouge de STATUT, celui du retard - c'est bien « quelque chose ne va pas ». */
.hint.ko { color: var(--rouge); font-weight: 700; }
.mt-lbl { margin-top: 18px; }

.field-flags { flex-direction: row; flex-wrap: wrap; gap: 16px; padding-top: 4px; }
.check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--gris-texte);
  cursor: pointer;
}
.check input { width: 15px; height: 15px; cursor: pointer; }
.check.disabled { opacity: .5; cursor: not-allowed; }

/* Pastilles d'initiales. Capsule et non cercle fixe : `users.initiales` est un
   varchar(8), une pastille de largeur figée tronquerait des initiales à 3
   caractères ou plus. À 2 lettres, min-width + border-radius plein donnent le
   rond. */
.tech-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.tech-opt {
  /* 0 0 auto : jamais rétrécie sous son contenu - des initiales longues
     passent à la ligne (flex-wrap) au lieu d'être rognées. */
  flex: 0 0 auto;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--bordure);
  border-radius: 999px;
  background: var(--blanc);
  color: var(--gris-texte);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .4px;
  cursor: pointer;
  user-select: none;
  transition: background .12s, border-color .12s, color .12s;
}
.tech-opt:hover { border-color: var(--chrome); background: var(--chrome-clair); }
/* Le picker n'était pas atteignable au clavier tant que c'était un <span>. */
.tech-opt:focus-visible { outline: 2px solid var(--chrome); outline-offset: 2px; }
.tech-opt.on { background: var(--chrome); color: #fff; border-color: var(--chrome); }
.tech-opt.on:hover { background: var(--chrome-fonce); border-color: var(--chrome-fonce); }
/* Compte DÉSACTIVÉ encore attribué à l'appel (14/09/2026) : pointillés et gris.
   Pas de texte barré - il est toujours attribué, un trait laisserait croire
   qu'il est déjà retiré. #5b6670 : blanc dessus = 5,9:1. */
.tech-opt.inactif { border-style: dashed; color: #5b6670; }
.tech-opt.inactif.on,
.tech-opt.inactif.on:hover { background: #5b6670; border-color: #5b6670; color: #fff; }
@media (prefers-reduced-motion: reduce) { .tech-opt { transition: none; } }
/* « Non affectés » du menu Filtrer (22/10/2026) : même bouton que les
   initiales, sous elles, à la largeur de son libellé. */
.tech-opt-sans { display: block; margin: 8px auto 0; padding-left: 12px; padding-right: 12px; }

.form-error {
  margin-top: 12px;
  background: var(--rouge-clair);
  border: 1px solid var(--rouge);
  color: #8a1f1f;
  padding: 8px 11px;
  border-radius: var(--radius);
  font-size: 12.5px;
}

/* ---------------------------- Détail ticket ---------------------------- */
.ticket-extra {
  display: flex;
  gap: 20px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--bordure);
}
.extra-col { flex: 1 1 0; min-width: 0; }
.extra-col h3 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; color: var(--gris-doux); letter-spacing: .3px; }

.comments { max-height: 260px; overflow-y: auto; margin-bottom: 10px; }
.comment {
  border-left: 3px solid var(--chrome);
  background: #f7f9fb;
  padding: 7px 10px;
  margin-bottom: 7px;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.comment-meta { font-size: 11px; color: var(--gris-doux); margin-bottom: 3px; display: flex; justify-content: space-between; gap: 8px; }
.comment-text { white-space: pre-wrap; word-break: break-word; font-size: 12.5px; }
.comment-del { background: none; border: none; color: var(--rouge); cursor: pointer; font-size: 11px; padding: 0; }

.comment-form { display: flex; gap: 8px; align-items: flex-start; }
.comment-form textarea { flex: 1; resize: vertical; }

.files { margin-bottom: 10px; }
.file-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border: 1px solid var(--bordure);
  border-radius: var(--radius);
  margin-bottom: 5px;
  font-size: 12.5px;
}
.file-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-link { color: var(--bleu); cursor: pointer; text-decoration: underline; background: none; border: none; font: inherit; padding: 0; text-align: left; }
.file-size { color: var(--gris-doux); font-size: 11px; white-space: nowrap; }
/* Signale les pièces jointes qui s'ouvrent en aperçu au lieu de se télécharger. */
.file-tag {
  background: var(--bleu-clair);
  border: 1px solid var(--bordure);
  border-radius: 3px;
  padding: 1px 5px;
  font-size: 10px;
  font-weight: 700;
  color: var(--bleu);
  white-space: nowrap;
}

/* ------------------------- Visionneuse PDF ------------------------- */
/* L'aperçu remplit la modale : padding retiré, hauteur calée sur la fenêtre
   pour que le document soit lisible sans zoomer. */
.pdf-body { padding: 0; }
.pdf-frame {
  display: block;
  width: 100%;
  height: 75vh;
  min-height: 420px;
  border: 0;
  background: #525659;
}
/* Aperçu d'une image : même cadre que le PDF, mais `contain` plutôt qu'étiré.
   Les pièces jointes sont des photos de terrain prises au téléphone, souvent
   bien plus hautes que larges - les déformer les rendrait inexploitables. */
.pdf-image {
  display: block;
  width: 100%;
  height: 75vh;
  min-height: 420px;
  object-fit: contain;
  background: #525659;
}

.file-drop {
  display: block;
  border: 2px dashed var(--bordure);
  border-radius: var(--radius);
  padding: 14px;
  text-align: center;
  color: var(--gris-doux);
  cursor: pointer;
  font-size: 12.5px;
}
.file-drop:hover, .file-drop.over { border-color: var(--bleu); background: var(--bleu-clair); color: var(--bleu); }

.boitier-zone { font-size: 12.5px; }
.boitier-actif {
  background: var(--violet);
  border: 1px solid var(--violet-bord);
  border-radius: var(--radius);
  padding: 8px 10px;
  margin-bottom: 8px;
}

.muted { color: var(--gris-doux); }

/* Badge d'état des boîtiers */
.etat { display: inline-block; padding: 2px 8px; border-radius: 12px; font-size: 11px; font-weight: 700; }
.etat-dispo { background: var(--vert); color: var(--vert-texte); border: 1px solid var(--vert-bord); }
.etat-pret { background: var(--violet); color: #4a2a7a; border: 1px solid var(--violet-bord); }
.etat-hs { background: #e5eaee; color: var(--gris-doux); border: 1px solid var(--bordure); }
/* Référence hors service réaffichée par la case du parc (14/09/2026) : grisée,
   pour ne pas se confondre avec le matériel en circulation. */
.ligne-hs td { color: var(--gris-doux); }
/* Écart de l'historique du stock : en gras mais SANS couleur - un « +2 » vert
   ou un « -1 » rouge emprunterait le sens des couleurs de statut. */
.ecart { font-weight: 700; white-space: nowrap; }
/* Il reste du stock mais une partie est sortie. */
.etat-partiel { background: var(--orange); color: var(--orange-texte); border: 1px solid var(--orange-bord); }

/* ------------------------- Parc de boîtiers ------------------------- */
.ligne-cliquable { cursor: pointer; }
.stock-restant { font-weight: 800; }
.stock-vide { color: var(--rouge); }

/* Clients détenteurs, listés directement sur la ligne de la référence. */
.pret-client {
  display: inline-block;
  background: var(--bleu-clair);
  border: 1px solid var(--bordure);
  border-radius: 3px;
  padding: 1px 6px;
  margin: 0 3px 2px 0;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.pret-client.en-retard { background: var(--rouge-clair); border-color: var(--rouge); color: #b62828; }

/* Résumé de stock en tête de fiche : détenus / sortis / en stock. */
.stock-resume { display: flex; gap: 10px; margin: 4px 0 18px; }
.stock-case {
  flex: 1;
  text-align: center;
  padding: 10px 6px;
  border: 1px solid var(--bordure);
  border-radius: var(--radius);
  background: var(--blanc);
}
.stock-case.stock-vide { border-color: var(--rouge); background: var(--rouge-clair); }
.stock-val { display: block; font-size: 24px; font-weight: 800; line-height: 1.1; }
.stock-lbl { display: block; font-size: 11px; text-transform: uppercase; color: var(--gris-doux); letter-spacing: .3px; }

/* Tableaux imbriqués dans une modale (prêts en cours, historique). L'en-tête
   collant du dashboard n'a pas de sens ici : la modale scrolle en entier. */
.grid-inline { font-size: 12.5px; }
.grid-inline thead th { position: static; }
#bt-en-cours, #bt-historique { overflow-x: auto; margin-bottom: 4px; }

#boitier-extra h3 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; color: var(--gris-doux); letter-spacing: .3px; }

/* ---------------------------- Toast ---------------------------- */
.toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gris-texte);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--radius);
  box-shadow: var(--ombre);
  z-index: 200;
  font-size: 13px;
}
.toast.err { background: var(--rouge); }

@media (max-width: 1100px) {
  .ticket-extra { flex-direction: column; }
  .col-logiciel, .col-tel { display: none; }
}

/* Repère « client sous contrat de maintenance » dans la colonne Client.
   Un simple bouclier : l'information se lit d'un coup d'œil pendant l'appel,
   sans coûter une colonne au tableau, déjà dense. */
.contrat { font-size: 12px; opacity: .85; }

/* ------------------------- Icônes au trait ------------------------- */
/* Inline, monochromes, elles héritent de la couleur du texte autour.
   Aucune police ni bibliothèque : deux blocs de balisage suffisent. */
.ico {
  width: 15px;
  height: 15px;
  flex: none;
  vertical-align: -2px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.field label .ico, .check .ico { opacity: .7; }

/* Colonne Tél. : fixe et portable empilés. */
.cell-tels { line-height: 1.45; }
.tel-item { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.tel-item .ico { width: 13px; height: 13px; color: var(--gris-doux); }

/* 🔴 Corrigé le 29/09/2026, signalé par l'utilisateur : le numéro se noyait
   dans le même gris fin que Ville et Logiciel, alors que c'est la donnée la
   plus utile de la ligne (celle qu'on rappelle). Relevé au même anthracite que
   les pastilles d'initiales (--chrome) - jamais une couleur de statut, qui
   porterait un sens qu'elle n'a pas ici. Scopé aux Tickets : la page Clients
   réutilise .tel-item pour son propre affichage, plus posé (pas de bousculade
   de colonnes), et n'a pas besoin de ce relief. */
#tickets-table .tel-item { font-weight: 600; color: var(--chrome-texte); }
#tickets-table .tel-item .ico { color: var(--chrome-texte); }

/* Copie du numéro au survol (29/09/2026) - Tickets uniquement : le bouton
   n'existe que dans le HTML produit par telsDashboard() (voir app.js). La
   page Clients réutilise .tel-item pour son propre affichage sans jamais
   poser ce bouton ; ces règles y restent donc sans effet. */
.tel-copy {
  appearance: none;
  border: none;
  background: transparent;
  padding: 0;
  width: 19px;
  height: 19px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--gris-doux);
  opacity: 0;
  cursor: pointer;
  transition: opacity .12s ease, background-color .12s ease, color .12s ease;
}
.tel-item:hover .tel-copy,
.tel-copy:focus-visible { opacity: 1; }
.tel-copy:hover { background: var(--chrome-clair); color: var(--chrome-texte); }
.tel-copy:focus-visible { outline: 2px solid var(--chrome); outline-offset: 1px; }
.tel-copy .ico { width: 13px; height: 13px; margin: 0; }
.tel-copy .ico-check { display: none; }
.tel-copy.copie .ico-copy { display: none; }
.tel-copy.copie .ico-check { display: inline-flex; }
.tel-copy.copie { opacity: 1; background: var(--chrome-clair); color: var(--chrome-texte); }

/* Garde-fou « numéro différent de la fiche ». */
.tel-comparaison { margin-bottom: 14px; }
.tel-bloc {
  background: var(--fond);
  border-radius: var(--radius);
  padding: 9px 11px;
  margin-bottom: 8px;
  font-size: 13px;
}
.tel-libelle { font-weight: 700; font-size: 11px; text-transform: uppercase;
               letter-spacing: .04em; color: var(--gris-doux); margin-bottom: 5px; }
.tel-ligne { display: flex; justify-content: space-between; padding: 2px 0; }
.tel-ligne span:first-child { color: var(--gris-doux); }
.tel-nouveau { border-top: 1px solid var(--bordure); margin-top: 4px; padding-top: 5px; }
.tel-nouveau span:last-child { font-weight: 700; color: var(--bleu); }

/* Boutons de choix : le libellé nomme le cas d'usage, pas un oui/non. */
.tel-choix { display: flex; flex-direction: column; gap: 8px; }
.btn-choix { text-align: left; padding: 10px 12px; line-height: 1.4; }
.btn-choix strong { display: block; font-size: 14px; }
.btn-choix span { display: block; font-size: 12px; color: var(--gris-doux); margin-top: 2px; }

/* Bouclier barré : client SANS contrat de maintenance.
   Affiché uniquement dans ce cas - la majorité des clients étant sous contrat,
   un repère « sous contrat » serait partout et ne signalerait plus rien. */
.ico-sans-contrat { color: var(--rouge); }
.contrat { display: inline-flex; vertical-align: -2px; }
.flag-sans-contrat {
  background: var(--rouge-clair);
  border: 1px solid var(--rouge);
  color: var(--rouge);
}

/* ---------------------- Rapport d'import CSV ---------------------- */
.import-rapport {
  margin-top: 14px;
  padding: 12px 14px;
  background: var(--fond);
  border-radius: var(--radius);
  font-size: 13px;
}
.import-chiffres { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.import-chiffre {
  background: var(--blanc);
  border: 1px solid var(--bordure);
  border-radius: var(--radius);
  padding: 5px 10px;
}
.import-chiffre strong { font-size: 15px; }
.import-ok { border-color: var(--vert-bord); color: var(--vert-texte); }
.import-rapport .hint { margin: 4px 0; }
.import-rapport code {
  background: var(--blanc);
  border: 1px solid var(--bordure);
  border-radius: 3px;
  padding: 0 4px;
}
/* Lignes écartées : visibles sans être alarmantes - un import partiel reste un
   import réussi, il faut juste savoir ce qui n'est pas passé. */
.import-erreurs {
  margin-top: 10px;
  padding: 8px 10px;
  background: var(--rouge-clair);
  border-radius: var(--radius);
  color: #8a2020;
}
.import-erreurs ul { margin: 6px 0 0; padding-left: 18px; }
.import-erreurs li { margin-bottom: 3px; }

/* Import des appels ouverts du classeur Excel (15/09/2026). Les points à
   vérifier sont en habillage NEUTRE : ni l'orange ni le rouge, qui portent
   « à facturer » et « en retard ». */
.import-avert {
  margin-top: 10px;
  padding: 8px 10px;
  background: var(--blanc);
  border: 1px solid var(--bordure);
  border-left: 3px solid var(--chrome);
  border-radius: var(--radius);
}
.import-avert ul,
.import-rapport .import-erreurs ul { margin: 6px 0 0; padding-left: 18px; max-height: 140px; overflow-y: auto; }

/* Aperçu MODIFIABLE de l'import CSV (21/10/2026) - tout est scopé .imp-* et
   à la fenêtre d'import. La fenêtre s'élargit dès que le tableau apparaît. */
#import-modal .modal.modale-import-large { max-width: min(1600px, 96vw); width: 96vw; }
.imp-barre { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 12px 0 6px; }
.imp-barre .spacer { flex: 1; }
/* Barre d'outils : historique, sélection, remplacement en masse. */
.imp-outils {
  display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center;
  margin-top: 10px; padding: 8px 10px; background: var(--chrome-clair);
  border: 1px solid var(--bordure); border-radius: 6px;
}
.imp-groupe { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.imp-groupe + .imp-groupe { padding-left: 14px; border-left: 1px solid var(--bordure); }
.imp-groupe label { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; white-space: nowrap; }
.imp-groupe .input-sm { height: 28px; padding: 2px 6px; font-size: 12.5px; }
.imp-groupe #imp-cherche, .imp-groupe #imp-remplace { width: 150px; }
.imp-groupe .btn:disabled { opacity: 0.45; cursor: default; }
.imp-compte { font-size: 12px; font-weight: 600; color: var(--chrome-texte); white-space: nowrap; }
.imp-table tr.imp-choisie td { background: #eef3d6; }
/* Une fois le tableau affiché, le mode d'emploi s'efface : le tableau prend la
   place, et le pied (Importer) doit rester à l'écran, mesuré à 1366 × 768. */
#import-modal .modale-import-large .modal-body > p.hint.mb { display: none; }
.import-details summary { cursor: pointer; margin: 4px 0; }
.imp-cadre {
  max-height: max(220px, calc(100vh - 450px)); overflow: auto;
  border: 1px solid var(--bordure, #d5dbe0); border-radius: 6px;
}
.imp-table { border-collapse: separate; border-spacing: 0; font-size: 12.5px; min-width: 100%; }
.imp-table th {
  position: sticky; top: 0; z-index: 2; background: var(--chrome); color: #fff;
  font-weight: 600; text-align: left; padding: 6px 6px; white-space: nowrap;
}
.imp-table td { padding: 2px 3px; border-bottom: 1px solid rgba(27, 34, 40, 0.06); vertical-align: middle; background: #fff; }
.imp-table .imp-fixe { white-space: nowrap; }
.imp-table .imp-num { color: var(--gris-doux, #6b7680); text-align: right; padding-right: 6px; }
.imp-cell {
  width: 100%; min-width: 110px; border: 1px solid transparent; border-radius: 4px;
  padding: 4px 6px; font: inherit; background: transparent; color: inherit;
}
.imp-cell:hover { border-color: #d5dbe0; }
.imp-cell:focus { outline: none; border-color: var(--chrome); background: #fff; }
.imp-table td.imp-bool, .imp-table th.imp-bool { text-align: center; }
.imp-table th.imp-bool label { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
/* Une case qui mérite un coup d'œil : la ligne s'importe quand même. */
.imp-table td.imp-alerte { background: var(--rouge-clair); box-shadow: inset 0 0 0 1px var(--rouge); }
.imp-table tr.imp-ko td { background: #fbeeee; }
.imp-table tr.imp-modifiee td.imp-num { color: var(--chrome-texte); font-weight: 700; }
.imp-table tr.imp-modifiee td.imp-num::after { content: " ✎"; }
.imp-table tr.imp-retiree td { opacity: 0.45; }
.imp-table tr.imp-retiree .imp-cell { text-decoration: line-through; }
.imp-table tr.imp-retiree td:first-child { opacity: 1; }
.imp-retirer {
  width: 22px; height: 22px; border: 1px solid #d5dbe0; border-radius: 50%;
  background: #fff; cursor: pointer; line-height: 1; color: var(--chrome-texte);
}
.imp-retirer:hover { background: var(--chrome-clair); }
.imp-sort { display: inline-block; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 600; border: 1px solid; }
.imp-sort.imp-creation { background: var(--vert); border-color: var(--vert-bord); color: var(--vert-texte); }
.imp-sort.imp-mise_a_jour { background: var(--bleu-clair); border-color: var(--bleu); color: var(--bleu-fonce); }
/* Case qui MODIFIE une fiche existante : liseré bleu et point en coin, pour
   la distinguer d'un coup d'œil d'une alerte (rouge). Infobulle : avant → après. */
.imp-table td.imp-maj { background: var(--bleu-clair); box-shadow: inset 0 0 0 1px var(--bleu); position: relative; }
.imp-table td.imp-maj::after {
  content: ""; position: absolute; top: 3px; right: 3px; width: 6px; height: 6px;
  border-radius: 50%; background: var(--bleu); pointer-events: none;
}
.imp-table td.imp-maj.imp-alerte { background: var(--rouge-clair); }
.imp-sort.imp-inchange { background: var(--chrome-clair); border-color: #c8ced3; color: var(--chrome-texte); }
.imp-sort.imp-ecartee { background: var(--rouge-clair); border-color: var(--rouge); color: #8a1f1f; }
.imp-motif { display: block; font-size: 11px; color: var(--gris-doux, #6b7680); max-width: 220px; white-space: normal; }
.import-avert li { margin-bottom: 3px; }
.import-regles { padding-left: 18px; }
.import-regles li { margin-bottom: 4px; }
.import-fait {
  margin-bottom: 10px;
  padding: 8px 10px;
  background: var(--blanc);
  border: 1px solid var(--vert-bord);
  border-radius: var(--radius);
  color: var(--vert-texte);
  font-weight: 600;
}
/* Seul ce cadre défile : le compte rendu et les boutons restent en place. */
.import-appels-liste {
  margin-top: 10px;
  max-height: 42vh;
  overflow: auto;
  background: var(--blanc);
  border: 1px solid var(--bordure);
  border-radius: var(--radius);
}
.import-appels-liste table { width: 100%; border-collapse: collapse; font-size: 12px; }
.import-appels-liste th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #e3e8ec;
  border-bottom: 1px solid #b9c3cb;
  padding: 5px 6px;
  text-align: left;
  white-space: nowrap;
}
.import-appels-liste td { padding: 5px 6px; border-bottom: 1px solid var(--bordure); vertical-align: top; }
.import-nowrap { white-space: nowrap; }
.import-sous { color: #5b6670; font-size: 11px; }
.import-suivi { margin-top: 3px; color: #5b6670; white-space: pre-line; }
.import-texte { font-style: italic; }
.import-case {
  display: inline-block;
  padding: 0 5px;
  border: 1px solid var(--bordure);
  border-radius: 3px;
  background: var(--chrome-clair);
  color: var(--chrome-texte);
  font-size: 11px;
  white-space: nowrap;
}
/* Même repère que la pastille d'un compte désactivé : pointillés gris. */
.tech-badge.import-sans-compte { background: transparent; color: #5b6670; border: 1px dashed #5b6670; }

/* ---- Correction des appels avant l'import (09/10/2026) ----
   Lignes de l'aperçu cliquables ; repères en habillage NEUTRE (anthracite sur
   gris), jamais une couleur de statut : « corrigé » n'est ni un retard ni un
   impayé. Seul « à revoir » prend l'orangé de l'avertissement de l'import. */
.import-appels-liste tr.reprise-ligne { cursor: pointer; }
.import-appels-liste tr.reprise-ligne:hover td,
.import-appels-liste tr.reprise-ligne:focus-visible td { background: var(--chrome-clair); }
.import-appels-liste tr.reprise-ecarte td { color: #8a949c; text-decoration: line-through; text-decoration-color: #b9c3cb; }
.import-appels-liste tr.reprise-ecarte td:first-child { text-decoration: none; }
.reprise-repere {
  display: inline-block; margin-top: 3px; padding: 0 5px; border-radius: 3px;
  background: var(--chrome); color: #fff; font-size: 10.5px; font-weight: 600;
  text-decoration: none;
}
.reprise-repere-ecarte { background: #5b6670; }
.reprise-repere-perime { background: #fff3cd; color: #7a5c00; border: 1px solid #e6c65c; }
.reprise-aide { margin: 6px 0 8px; }
.lien-discret {
  background: none; border: 0; padding: 0; font: inherit; color: var(--bleu);
  text-decoration: underline; cursor: pointer;
}
.reprise-tete { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.reprise-perime { font-size: 12px; color: #7a5c00; background: #fff3cd; padding: 3px 8px; border-radius: 4px; }
.reprise-bloc { border: 1px solid var(--bordure); border-radius: 6px; padding: 8px 12px 10px; margin: 0 0 10px; }
.reprise-bloc legend { padding: 0 6px; font-weight: 700; font-size: 13px; color: var(--chrome-texte); }
.reprise-bloc legend .hint { font-weight: 400; margin-left: 2px; }
.reprise-bloc legend .lien-discret { font-weight: 400; font-size: 12px; margin-left: 8px; }
.reprise-fiche { margin-bottom: 8px; }
.reprise-fiche-choisie { font-size: 12.5px; padding: 6px 8px; border-radius: 4px; background: var(--chrome-clair); }
.reprise-origine { color: #5b6670; font-style: italic; }
/* Appel écarté : les blocs s'estompent, la bascule reste nette - on voit d'un
   coup d'oeil qu'il ne partira pas, et l'on peut revenir dessus. */
#reprise-modal.reprise-modal-ecarte .reprise-bloc { opacity: .5; }
#reprise-modal .modal-foot #reprise-position { margin-left: 8px; }

/* =========================================================================
   FENÊTRE DE PRISE D'APPEL - habillage « Dense » (01/09/2026)
   -------------------------------------------------------------------------
   🔴 SOCLE PARTAGÉ `.modale-dense` (05/09/2026), anciennement `.modale-appel`.
   Une fenêtre ne prend cet habillage que si elle porte explicitement la classe - aucune ne change par accident. Portée par : #ticket-modal, #client-modal,
   #boitier-modal. Les autres continuent d'utiliser `.form-grid` en flex.

   ⚠️ La plupart des règles exigent EN PLUS une classe propre (`.grille4`,
   `.head-date`, `.repris`, `.foot-statut`) : elles ne peuvent donc pas
   déborder sur une fenêtre qui ne l'a pas. `.modale-appel` reste posée sur la
   seule fiche d'appel, comme point d'accroche pour ses spécificités futures.

   🔴 Aucun identifiant ni type d'élément n'a changé : les bascules sont de
   vraies `<input type="checkbox">`, le statut une vraie liste déroulante.
   `collecterFormulaireTicket()` lit le formulaire champ par champ par
   identifiant - l'habillage ne peut donc pas altérer ce qui part au serveur.
   ========================================================================= */

/* ---- gabarit dense : c'est ce qui distingue cet habillage des autres ---- */
.modale-dense {
  --h-champ: 32px;
  --gap-champ: 10px;
}

/* ---- bandeau anthracite souligné du vert-jaune du logo ---- */
.modale-dense .modal-head {
  background: var(--chrome);
  border-bottom: 3px solid var(--accent);
  padding: 9px 14px;
  gap: 16px;
}
.modale-dense .modal-head h2 { color: #fff; font-size: 15.5px; }
.modale-dense .head-droite {
  display: flex;
  align-items: center;
  gap: 9px;
}
.modale-dense .head-droite > label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #aeb8bf;
}
/* La date d'appel est bien un CHAMP : on doit pouvoir corriger un appel saisi
   la veille. Habillée pour le fond sombre, pas désactivée. */
.modale-dense .head-date {
  background: rgba(255, 255, 255, .10);
  border: 1px solid rgba(255, 255, 255, .26);
  border-radius: var(--radius);
  padding: 4px 9px;
  font-size: 13px;
  font-family: inherit;
  color: #fff;
  color-scheme: dark;
}
.modale-dense .head-date:focus {
  outline: 2px solid var(--accent);
  border-color: var(--accent);
}
.modale-dense .modal-close { color: #aeb8bf; }
.modale-dense .modal-close:hover { color: #fff; }

.modale-dense .modal-body { padding: 14px; }

/* ---- la grille : 4 colonnes, disposition de la proposition 2 ----
   ⚠️ Ne s'applique qu'à #ticket-form grâce à `.grille4`. `.form-grid` reste
   en flex partout ailleurs. */
.modale-dense .form-grid.grille4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap-champ);
  align-items: start;
}
.modale-dense .grille4 .c2 { grid-column: span 2; }
.modale-dense .grille4 .c3 { grid-column: span 3; }
.modale-dense .grille4 .c4 { grid-column: 1 / -1; }

.modale-dense .field { gap: 4px; }
.modale-dense .field > label { font-size: 10px; }
.modale-dense .input {
  min-height: var(--h-champ);
  padding: 5px 9px;
  font-size: 13.5px;
}
.modale-dense textarea.input { min-height: calc(var(--h-champ) + 18px); }

/* Champs recopiés de la fiche client : fond en retrait.
   ⚠️ Ils restent MODIFIABLES - un salarié peut appeler de son propre poste
   sans que la fiche du client change. Le curseur de saisie le confirme. */
.modale-dense .input.repris { background: #f1f4f6; color: #4b555d; }
.modale-dense .input.repris:focus { background: var(--blanc); color: var(--gris-texte); }

/* ---- bouton d'état du contrat de maintenance ----
   Remplace la phrase « Client sous contrat de maintenance ».
   🔴 C'est toujours la case `tk-contrat` : elle est seulement rendue
   invisible, jamais retirée du DOM, sinon `.checked` ne serait plus lisible. */
.modale-dense .contrat {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  align-self: flex-start;
  height: var(--h-champ);
  padding: 0 11px;
  border: 1px solid;
  border-radius: var(--radius);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  /* fond ET bordure de l'état « sans contrat », l'exception qui doit se voir */
  background: var(--rouge-clair);
  border-color: var(--rouge);
  color: #8a1f1f;
}
.modale-dense .contrat input { position: absolute; opacity: 0; width: 0; height: 0; }
.modale-dense .contrat .ico { width: 15px; height: 15px; color: var(--rouge); }
.modale-dense .contrat-etat {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 1px 6px;
  border-radius: 3px;
  background: var(--rouge);
  border: 1px solid var(--rouge);
  color: #fff;
}
/* Sous contrat : discret. C'est le cas de la grande majorité des clients - un
   repère sur presque toutes les fiches ne signalerait plus rien. */
.modale-dense .contrat:has(input:checked) {
  background: var(--blanc);
  border-color: var(--bordure);
  color: var(--gris-texte);
}
.modale-dense .contrat:has(input:checked) .ico { color: var(--vert-texte); }
.modale-dense .contrat:has(input:checked) .contrat-etat {
  background: var(--vert);
  border-color: var(--vert-bord);
  color: var(--vert-texte);
}
.modale-dense .contrat:focus-within { outline: 2px solid var(--chrome); outline-offset: 2px; }

/* ---- bascules : esprit bouton, libellé complet ----
   🔴 Ce sont de vraies cases à cocher. L'état visuel vient de
   `:has(input:checked)`, pas de JavaScript : rien à synchroniser, donc rien
   qui puisse se désynchroniser. */
.modale-dense .bascules {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  min-height: var(--h-champ);
}
.modale-dense .bsc {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: var(--h-champ);
  padding: 0 11px;
  border: 1px solid var(--bordure);
  border-radius: var(--radius);
  background: var(--blanc);
  font-size: 12.5px;
  color: var(--gris-texte);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}
.modale-dense .bsc input { position: absolute; opacity: 0; width: 0; height: 0; }
.modale-dense .bsc .voyant {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c9d0d5;
  flex: 0 0 auto;
}
.modale-dense .bsc:hover { border-color: var(--chrome); }
.modale-dense .bsc:has(input:checked) {
  background: var(--chrome);
  border-color: var(--chrome);
  color: #fff;
  font-weight: 600;
}
/* ⚠️ Le vert-jaune ne se pose QUE sur du sombre : sur blanc il donne 1,16:1.
   Ici le fond est anthracite, c'est son seul emploi légitime. */
.modale-dense .bsc:has(input:checked) .voyant { background: var(--accent); }
.modale-dense .bsc:has(input:disabled) { opacity: .45; cursor: not-allowed; }
.modale-dense .bsc:focus-within { outline: 2px solid var(--chrome); outline-offset: 2px; }

/* ---- pied : le statut y descend ---- */
.modale-dense .modal-foot { padding: 9px 14px; gap: 10px; }
.modale-dense .foot-statut {
  display: flex;
  align-items: center;
  gap: 8px;
}
.modale-dense .foot-statut > label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--gris-doux);
}
/* Liste déroulante habillée en pastille de statut. Les couleurs sont celles du
   badge du dashboard : ce sont des repères MÉTIER, ils ne changent pas. */
.modale-dense .select-statut {
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 24px 3px 10px;
  border-radius: 12px;
  border: 1px solid;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 7px center;
  background-size: 11px;
}
.modale-dense .statut-nouveau { background-color: var(--jaune); border-color: var(--jaune-bord); color: #7a5c00; }
.modale-dense .statut-en_cours { background-color: var(--bleu-clair); border-color: var(--bleu); color: var(--bleu-fonce); }
.modale-dense .statut-resolu { background-color: var(--vert); border-color: var(--vert-bord); color: var(--vert-texte); }

/* ---- Rappel de la date enregistrée (23/10/2026, proposition 2) ----
   Champ de date cerné d'orange quand il diffère de l'enregistré, ancienne
   valeur dessous avec « Rétablir ». Orange d'« attention », pas une couleur
   de statut : celle du champ « Réf. facture » mis en évidence (.input-attention). */
.modale-dense .input.date-modifiee { border-color: var(--orange-bord); box-shadow: 0 0 0 1px var(--orange-bord); }
.date-avant {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--gris-doux);
  font-variant-numeric: tabular-nums;
}
.date-avant .ico { width: 13px; height: 13px; flex: 0 0 auto; }
/* Planning + heure de rappel facultative (27/10/2026), sur la même ligne. */
.planning-ligne { display: flex; gap: 4px; }
.planning-ligne input[type="date"] { flex: 1 1 auto; min-width: 0; }
.planning-ligne input[type="time"] { flex: 0 0 5.6em; min-width: 0; padding-left: 4px; padding-right: 2px; }
/* L'heure sous la date de planning, dans le tableau des appels. */
.heure-rappel {
  display: flex; align-items: center; gap: 3px;
  font-size: 11.5px; font-weight: 600; color: #4a3fa0; white-space: nowrap;
}
.heure-rappel .ico { width: 12px; height: 12px; flex: 0 0 auto; }
.date-avant .lien-texte { font-size: 11.5px; }

/* ---- Statut en un clic (22/10/2026) ----
   Interrupteur à trois positions (variante 5 choisie parmi 6) : une seule
   position allumée, dans la teinte PLEINE de son statut ; les deux autres en
   retrait sur la piste. Contrastes mesurés : texte #3d2f00 sur jaune #e0c94a,
   blanc sur bleu #1f5f8b (6,9:1) et sur vert #2e7d32 (5,1:1). */
.statut-raccourcis { margin-left: 6px; font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--gris-doux); }
.statut-bascule { display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--chrome-clair); }
.statut-bascule button {
  flex: 1;
  min-width: 0;
  padding: 7px 6px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--gris-doux);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.statut-bascule button:hover { color: var(--gris-texte); }
.statut-bascule button:focus-visible { outline: 2px solid var(--chrome); outline-offset: 1px; }
.statut-bascule button[aria-checked="true"][data-statut="nouveau"] { background: #e0c94a; color: #3d2f00; }
.statut-bascule button[aria-checked="true"][data-statut="en_cours"] { background: #1f5f8b; color: #fff; }
.statut-bascule button[aria-checked="true"][data-statut="resolu"] { background: #2e7d32; color: #fff; }
@media (prefers-reduced-motion: reduce) { .statut-bascule button { transition: none; } }

/* ---- Frise d'avancement dans le bandeau de la fiche (22/10/2026) ----
   Elle SUIT le statut. Sur l'anthracite du bandeau : étapes passées et
   courante dans la teinte du statut atteint, à venir en gris translucide. */
.frise-statut {
  --frise-c: #e0c94a;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  margin: 0 auto;
  padding: 0 16px;
  font-size: 11.5px;
  color: rgba(255, 255, 255, .5);
  user-select: none;
}
.frise-statut[data-statut="en_cours"] { --frise-c: #6fb0f0; }
.frise-statut[data-statut="resolu"] { --frise-c: #7cbf6e; }
.frise-etape { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.frise-etape i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .3);
  box-sizing: border-box;
  transition: background-color .2s ease, border-color .2s ease;
}
.frise-trait { width: 34px; height: 2px; margin: 0 8px; background: rgba(255, 255, 255, .18); transition: background-color .2s ease; }
.frise-etape.fait { color: rgba(255, 255, 255, .75); }
.frise-etape.fait i,
.frise-etape.courant i { background: var(--frise-c); border-color: var(--frise-c); }
.frise-etape.courant { color: #fff; font-weight: 600; }
.frise-etape.courant i { box-shadow: 0 0 0 3px rgba(255, 255, 255, .12); }
.frise-trait.fait { background: var(--frise-c); }
@media (prefers-reduced-motion: reduce) { .frise-etape i, .frise-trait { transition: none; } }
/* Le titre (« Appel n° 9 - CLIENT ») cède avant la frise sur un nom long. */
#ticket-modal .modal-head h2 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- blocs de l'appel existant, resserrés eux aussi ---- */
.modale-dense .ticket-extra { margin-top: 14px; padding-top: 12px; }

/* En dessous de ~940 px les cinq bascules passent sur deux lignes (mesuré :
   +48 px). Sans effet sur un écran de bureau ; on laisse faire plutôt que de
   rogner les libellés, qui sont justement ce qui rend les bascules lisibles. */

/* ============================== Statistiques ==============================
   ⚠️ Les barres de VOLUME sont peintes en anthracite (--chrome), pas en bleu :
   le bleu porte un sens métier (« En cours »), l'habillage n'en porte aucun.
   Seul le bloc « répartition par statut » utilise les couleurs de statut, et
   ce sont exactement celles des badges du dashboard. */
.stats-periode {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--gris-doux);
}
.stats-periode .input-sm { width: 148px; }

.stats-contenu { padding: 16px; display: flex; flex-direction: column; gap: 16px; }

.stats-bloc {
  border: 1px solid var(--bordure);
  border-radius: var(--radius);
  background: var(--blanc);
}
.stats-bloc > h3 {
  margin: 0;
  padding: 9px 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .4px;
  text-transform: uppercase;
  color: var(--gris-doux);
  border-bottom: 1px solid var(--bordure);
}
.stats-corps { padding: 14px; }
.stats-note { margin: 10px 0 0; font-size: 11.5px; color: var(--gris-doux); }

.stats-cartes { display: grid; grid-template-columns: repeat(auto-fit, minmax(126px, 1fr)); gap: 10px; }
/* Encart « pastille + jauge » (24/11/2026, mélange B choisi par l'utilisateur
   parmi 8 maquettes) : le liseré gauche est RETIRÉ (« beaucoup trop IA »), ne
   pas le remettre. Icône dans un rond teinté, jauge = part du total, absente
   quand l'encart n'est pas une part (délais, décomptes du jour). Couleurs par
   variables du thème : le mode sombre suit sans réplique, sauf l'icône jaune. */
.stats-carte {
  --sk: var(--chrome-texte); --sf: var(--chrome-clair); --si: var(--chrome-texte);
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--bordure);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--blanc);
}
.stats-pastille {
  flex: none; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; background: var(--sf); color: var(--si);
}
.stats-pastille svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.stats-texte { flex: 1; min-width: 0; }
.stats-texte > span { display: block; }
.stats-nb { font-size: 23px; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; }
.stats-lib { font-size: 12px; color: var(--gris-doux); margin-top: 1px; }
.stats-sous { font-size: 11px; color: var(--gris-doux); margin-top: 3px; }
.stats-jauge { height: 5px; margin-top: 6px; border-radius: 3px; background: var(--chrome-clair); overflow: hidden; }
/* Écrans moyens (1366 px mesuré) : huit encarts par ligne, la pastille rétrécit
   pour laisser au texte la place de tenir. */
@media (max-width: 1600px) {
  .stats-carte { gap: 9px; padding: 9px 10px; }
  .stats-pastille { width: 30px; height: 30px; }
  .stats-pastille svg { width: 16px; height: 16px; }
}
.stats-jauge i { display: block; height: 100%; min-width: 3px; border-radius: 3px; background: var(--sk); }

/* Les couleurs de statut et de facturation du dashboard. */
.stats-carte.c-nouveau { --sk: var(--jaune-bord); --sf: var(--jaune); --si: #8a6d00; }
.stats-carte.c-encours { --sk: var(--bleu); --sf: var(--bleu-clair); --si: var(--bleu); }
.stats-carte.c-resolu { --sk: var(--vert-bord); --sf: var(--vert); --si: var(--vert-texte); }
.stats-carte.c-retard { --sk: var(--rouge); --sf: var(--rouge-clair); --si: var(--rouge); }
.stats-carte.c-facturer { --sk: var(--orange-bord); --sf: var(--orange); --si: var(--orange-texte); }
.stats-carte.c-facture { --sk: var(--vert-texte); --sf: var(--vert); --si: var(--vert-texte); }
.stats-carte.c-bs { --sk: var(--violet-bord); --sf: var(--violet); --si: var(--violet-bord); }
/* RMA : anthracite (habillage) pour les décomptes, sarcelle pour le seul qui
   appelle un geste - les RMA reçues, exactement comme leur badge d'état. */
.stats-carte.c-rma-recue { --sk: var(--sarcelle-bord); --sf: var(--sarcelle); --si: var(--sarcelle-texte); }

.stats-barres { display: flex; flex-direction: column; gap: 6px; }
.stats-ligne {
  display: grid;
  grid-template-columns: 200px 1fr 52px;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
}
.stats-etiquette { display: flex; align-items: center; gap: 6px; min-width: 0; }
.stats-etiquette span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stats-piste { background: var(--chrome-clair); border-radius: 999px; height: 15px; overflow: hidden; }
.stats-remplissage { height: 100%; background: var(--chrome); border-radius: 999px; min-width: 2px; }
.stats-remplissage.f-nouveau { background: var(--jaune-bord); }
.stats-remplissage.f-encours { background: var(--bleu); }
.stats-remplissage.f-resolu { background: var(--vert-bord); }
.stats-valeur { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }

/* Volume par mois : colonnes verticales, une par mois de la période. */
.stats-mois { display: flex; align-items: flex-end; gap: 6px; height: 140px; }
.stats-mois-col { flex: 1 1 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; height: 100%; }
.stats-mois-barre { width: 100%; max-width: 52px; background: var(--chrome); border-radius: 3px 3px 0 0; min-height: 2px; }
.stats-mois-nb { font-size: 11.5px; font-weight: 600; }
.stats-mois-lib { font-size: 11px; color: var(--gris-doux); white-space: nowrap; }

/* Le bouclier barré des clients sans contrat, repris tel quel du dashboard. */
.stats-sans-contrat { color: var(--rouge); display: inline-flex; flex: 0 0 auto; }
.stats-sans-contrat .ico { width: 15px; height: 15px; }

/* ========================= Rapport d'événements =========================
   Réservé au patron (menu Administration). Deux teintes seulement, et elles
   viennent des couleurs de STATUT, pas de l'habillage : c'est la nature du
   mouvement qui les justifie, comme le rouge du retard sur le dashboard. */
.journal-resume {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--bordure);
  background: var(--blanc);
}
.journal-bloc { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.journal-titre {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .4px;
  text-transform: uppercase;
  color: var(--gris-doux);
  margin-right: 2px;
}
.journal-pastille {
  border: 1px solid var(--bordure);
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 12px;
  background: var(--blanc);
}
.journal-pastille b { font-weight: 700; }

/* Étiquette du type d'action, dans sa colonne. */
.jr-type {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid var(--bordure);
  white-space: nowrap;
}
.jr-type.jr-suppression { background: var(--rouge-clair); border-color: var(--rouge); color: #8a1f1f; }
.jr-type.jr-archivage { background: var(--orange); border-color: var(--orange-bord); color: var(--orange-texte); }
.jr-type.jr-creation { background: var(--vert); border-color: var(--vert-bord); color: var(--vert-texte); }
/* ⚠️ Le circuit de facturation porte UNE seule teinte, le bleu clair : « à
   facturer », le visa et le n° de facture sont trois étapes du même parcours.
   Surtout pas l'orange du dashboard pour « à facturer » - il est déjà pris ici
   par l'archivage, et deux types de même couleur ne se distingueraient plus. */
.jr-type.jr-a_facturer, .jr-type.jr-visa, .jr-type.jr-facture { background: var(--bleu-clair); border-color: var(--bleu); color: var(--bleu-fonce); }
/* Rappel à heure fixe (27/10/2026) : indigo, aucune couleur de statut. */
.jr-type.jr-rappel { background: #ecebf8; border-color: #6b5fb0; color: #3d3478; }

/* La ligne entière n'est teintée que pour les deux mouvements destructeurs :
   ce sont les seuls qu'on doit repérer sans lire. */
tr.jr-suppression td { background: var(--rouge-clair); }
tr.jr-archivage td { background: #fff6ec; }

/* Ligne de tableau qui mène à un appel (prêts, historique, bons de livraison).
   ⚠️ Posée UNIQUEMENT quand un appel est réellement rattaché : une ligne sans
   ticket ne prend ni curseur main ni survol - rien ne doit annoncer une action
   qui n'existe pas. */
.ligne-appel { cursor: pointer; }
.ligne-appel:hover td { background: var(--chrome-clair); }
.ligne-appel .cell-num { font-weight: 600; color: var(--bleu); }

/* ⚠️ `.grid tbody tr` impose le curseur main et le survol à TOUTES les lignes de
   tableau - hérité du dashboard, où chaque ligne ouvre bien un appel. Dans les
   quatre tableaux ci-dessous, une ligne sans appel rattaché n'ouvre rien : on
   lui retire les deux, sinon elle promet une action qui n'existe pas. */
#bt-en-cours tbody tr:not(.ligne-appel),
#bt-historique tbody tr:not(.ligne-appel),
#prets-body tr:not(.ligne-appel),
#livraisons-body tr:not(.ligne-appel) { cursor: default; }
#bt-en-cours tbody tr:not(.ligne-appel):hover td,
#bt-historique tbody tr:not(.ligne-appel):hover td,
#prets-body tr:not(.ligne-appel):hover td,
#livraisons-body tr:not(.ligne-appel):hover td { background: transparent !important; }

/* ---- grille à 3 colonnes : fiches Client et Boîtier (05/09/2026) ----
   ⚠️ `.field-full` et `.field-sm` sont conservées telles quelles dans le HTML :
   la première prend toute la largeur, la seconde une colonne. Aucun champ n'a
   été retouché, donc aucun identifiant n'a pu bouger. */
.modale-dense .form-grid.grille3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap-champ);
  align-items: start;
}
.modale-dense .grille3 .c2 { grid-column: span 2; }
.modale-dense .grille3 .c3,
.modale-dense .grille3 .field-full { grid-column: 1 / -1; }


/* Résumé de stock d'une référence, en cartes plutôt qu'en ligne de texte. */
.modale-dense .stock-cartes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.modale-dense .stock-carte {
  border: 1px solid var(--bordure);
  border-left-width: 4px;
  border-radius: var(--radius);
  padding: 8px 11px;
}
.modale-dense .stock-carte .nb { font-size: 22px; font-weight: 700; line-height: 1.15; }
.modale-dense .stock-carte .lib { font-size: 11.5px; color: var(--gris-doux); }
.modale-dense .stock-carte.s-total { border-left-color: var(--chrome); }
.modale-dense .stock-carte.s-sortis { border-left-color: var(--violet-bord); }
.modale-dense .stock-carte.s-restant { border-left-color: var(--vert-bord); }
.modale-dense .stock-carte.s-vide { border-left-color: var(--rouge); }

/* Les sous-titres des blocs de la fiche boîtier, au même ton que les autres. */
.modale-dense .modal-body h3 {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--gris-doux);
  margin: 0 0 8px;
}
.modale-dense .modal-body h3.mt { margin-top: 18px; }

/* Grille à 2 colonnes : fenêtres courtes (utilisateur, mot de passe). */
.modale-dense .form-grid.grille2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap-champ);
  align-items: start;
}
.modale-dense .grille2 .c2,
.modale-dense .grille2 .field-full { grid-column: 1 / -1; }

/* ⚠️ `.field` est en `flex-direction: column` : posée sur le MÊME élément, la
   classe `.bascules` héritait de la colonne et empilait les bascules, centrées.
   Cette règle rétablit la ligne, alignée à gauche. Constaté sur la fiche
   utilisateur le 05/09/2026. */
.modale-dense .field.bascules {
  flex-direction: row;
  justify-content: flex-start;
}

/* ---- Statistiques : segments de statut, encart, TOP 10 (07/09/2026) ----
   ⚠️ Les trois teintes sont celles des badges du dashboard : ce sont des ÉTATS,
   pas des séries décoratives. Le reste des barres garde l'anthracite, qui ne
   porte aucun sens métier. */
.stats-seg { display: block; }
/* 🔴 Vert ADOUCI pour la masse des résolus. Avec `--vert-bord` en aplat, les
   95 % des appels clos peignaient tout l'écran en vert vif et l'œil n'allait
   plus vers ce qui traîne - l'inverse de ce que ce graphique doit montrer. La
   catégorie dominante et normale reste discrète, les exceptions ressortent. */
.sg-resolu { background: #a9dda0; }
.sg-encours { background: var(--bleu); }
.sg-nouveau { background: var(--jaune-bord); }

/* Colonne mensuelle empilée : 2 px de blanc entre les segments, sinon les
   teintes se touchent et la limite devient illisible. */
.stats-mois-pile {
  width: 100%;
  max-width: 52px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-radius: 3px 3px 0 0;
  overflow: hidden;
  min-height: 2px;
}

/* Barre horizontale segmentée (par technicien). */
.stats-remplissage { display: flex; gap: 2px; overflow: hidden; }
.stats-remplissage .stats-seg { height: 100%; flex: 0 0 auto; }

.stats-legende {
  display: flex;
  gap: 14px;
  margin-top: 9px;
  font-size: 11.5px;
  color: var(--gris-doux);
}
.stats-legende i {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  margin-right: 5px;
}

/* Le chiffre qui appelle une action, sorti de la note de bas de bloc. */
.stats-encart {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--chrome-clair);
  border-radius: var(--radius);
  padding: 9px 12px;
  margin-bottom: 12px;
}
/* Cliquable depuis le 22/10/2026 (ouvre le tableau sur « Non affectés ») : le
   fond est déjà gris clair, le survol fonce donc d'un cran. */
.stats-encart.stats-clic { border: 0; }
.stats-encart.stats-clic:hover { background: #dfe5ea; }
.stats-encart-nb { font-size: 23px; font-weight: 700; line-height: 1; }
.stats-encart-txt { font-size: 11.5px; color: var(--gris-doux); line-height: 1.35; }

/* Repère d'infobulle sur un titre de bloc. */
.stats-info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border: 1px solid var(--bordure);
  border-radius: 50%;
  font-size: 9px;
  cursor: help;
  vertical-align: 1px;
}

.stats-top { width: 100%; }
.stats-top .stats-rang { color: var(--gris-doux); font-variant-numeric: tabular-nums; }
.stats-top .stats-part { color: var(--gris-doux); font-weight: 400; }
/* Aucune ligne du TOP 10 n'ouvre quoi que ce soit : pas de curseur trompeur. */
.stats-top tbody tr { cursor: default; }
.stats-top tbody tr:hover td { background: transparent !important; }

/* Filtre client de l'écran Statistiques. */
.stats-periode #st-client { width: 168px; }
.stats-clients-actifs { display: flex; flex-wrap: wrap; gap: 6px; }
/* La barre d.outils est en flex-wrap : sans `flex-basis: 100%`, les pastilles
   se glissent entre les champs et les raccourcis de période. On leur donne
   leur propre ligne, alignée à gauche sous les contrôles. */
.stats-clients-actifs:not(:empty) { flex: 1 0 100%; margin-top: 2px; }

/* ========================== Page Clients en fiches ==========================
   Forme « fiche contact » : le téléphone d'abord, c'est ce qu'on vient chercher
   quand on doit rappeler un commerçant. Le reste passe en second plan. */
.cartes-grille {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 12px;
  padding: 14px;
}
.cl-carte {
  background: var(--blanc);
  border: 1px solid var(--bordure);
  border-radius: var(--radius);
  padding: 11px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  transition: border-color .12s, box-shadow .12s;
}
.cl-carte:hover { border-color: var(--chrome); box-shadow: var(--ombre); }
.cl-carte:focus-visible { outline: 2px solid var(--chrome); outline-offset: 2px; }
/* Seule l'EXCEPTION porte un repère : la grande majorité des clients est sous
   contrat, un liseré sur presque toutes les cartes ne signalerait plus rien. */
.cl-carte.cl-sans-contrat { border-left: 4px solid var(--rouge); }

.cl-nom { font-size: 13px; font-weight: 600; line-height: 1.25; }

.cl-pied {
  border-top: 1px solid var(--chrome-clair);
  padding-top: 7px;
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  font-size: 11px;
  color: var(--gris-doux);
}
/* Le seul chiffre coloré de la carte : ce qui reste à traiter. Bleu de STATUT,
   comme le badge « En cours » du dashboard. */
.cl-encours {
  color: var(--bleu-fonce);
  background: var(--bleu-clair);
  border: 1px solid var(--bleu);
  border-radius: 999px;
  padding: 0 7px;
  font-weight: 600;
}

/* Index alphabétique. Hors du cadre défilant : il reste en place pendant qu'on
   parcourt les fiches. */
.clients-index { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.index-lettre {
  min-width: 24px;
  height: 24px;
  padding: 0 5px;
  border: 1px solid var(--bordure);
  border-radius: var(--radius);
  background: var(--blanc);
  color: var(--gris-doux);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}
.index-lettre:hover { border-color: var(--chrome); color: var(--gris-texte); }
.index-lettre.active { background: var(--chrome); border-color: var(--chrome); color: #fff; }

/* Bouton « Tous » de l'index : c'est la remise à zéro du filtre par lettre.
   Placé en TÊTE de la barre plutôt qu'à l'écart - l'œil le cherche là, et sa
   position ne bouge pas selon le nombre de lettres présentes. */
.index-tous { min-width: 40px; }

/* ---- Suggestion de client sous les champs téléphone (07/09/2026) ----
   🔴 Panneau FLOTTANT (position absolue) : il se superpose au formulaire au
   lieu de décaler les rangées suivantes. Même préoccupation que la case
   réservée du n° de facture - rien ne doit bouger sous la main pendant qu'on
   saisit un appel, le client au téléphone. */
.champ-suggest { position: relative; }
.suggest-panneau {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 100%;
  width: max-content;
  max-width: 340px;
  z-index: 70;
  background: var(--chrome);
  border-radius: var(--radius);
  box-shadow: var(--ombre);
  overflow: hidden;
  padding-bottom: 3px;
}
.suggest-tete {
  padding: 6px 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .4px;
  text-transform: uppercase;
  color: #aeb8bf;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.suggest-item {
  display: block;
  width: 100%;
  padding: 7px 10px;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  color: #fff;
}
.suggest-item:hover { background: rgba(255, 255, 255, .12); }
.suggest-nom { display: block; font-size: 12.5px; font-weight: 600; }
.suggest-detail { display: block; font-size: 11px; color: #aeb8bf; }

/* Proposition sélectionnée au clavier (flèches ↑ ↓). */
.suggest-item.on { background: rgba(255, 255, 255, .16); }

/* Étiquettes du journal d'ADMINISTRATION. Les gestes destructeurs en rouge, les
   mouvements de compte en orangé - ce sont les deux familles qu'on vient
   chercher dans ce journal. */
.jr-type.jr-compte_cree, .jr-type.jr-compte_debloque,
.jr-type.jr-client_cree, .jr-type.jr-boitier_cree,
.jr-type.jr-chat_coupure_levee, .jr-type.jr-chat_signalement_clos {
  background: var(--vert); border-color: var(--vert-bord); color: var(--vert-texte);
}
.jr-type.jr-compte_modifie, .jr-type.jr-compte_desactive,
.jr-type.jr-lien_mot_de_passe, .jr-type.jr-mot_de_passe_defini,
.jr-type.jr-client_modifie, .jr-type.jr-boitier_modifie,
.jr-type.jr-client_fusionne, .jr-type.jr-clients_distincts,
.jr-type.jr-chat_lecture, .jr-type.jr-chat_moderateur, .jr-type.jr-chat_acces, .jr-type.jr-chat_groupe {
  background: var(--orange); border-color: var(--orange-bord); color: var(--orange-texte);
}
.jr-type.jr-compte_bloque, .jr-type.jr-verrou_force,
.jr-type.jr-client_supprime, .jr-type.jr-boitier_supprime, .jr-type.jr-fiche_supprimee,
.jr-type.jr-chat_coupure, .jr-type.jr-chat_masquage {
  background: var(--rouge-clair); border-color: var(--rouge); color: #8a1f1f;
}
.jr-type.jr-export, .jr-type.jr-import_clients, .jr-type.jr-import_appels, .jr-type.jr-recap_hebdo {
  background: var(--bleu-clair); border-color: var(--bleu); color: var(--bleu-fonce);
}

/* ---- bascule d'affichage de la page Clients ----------------------------
   🔴 Préfixée `.bascule-vue`, comme `.modale-dense` l'est pour les fenêtres :
   aucune de ces règles ne peut atteindre un autre composant. C'est un
   interrupteur à glissière, DISTINCT des bascules `.bsc` des fenêtres de
   saisie, qui sont des pastilles-boutons.

   L'état visuel vient de `:has(input:checked)` et non de JavaScript - rien à
   synchroniser, donc rien qui puisse se désynchroniser. Seul le LIBELLÉ est
   écrit par le script, parce qu'un texte ne se déduit pas d'un sélecteur. */
.bascule-vue {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 30px;
  padding: 0 4px;
  font-size: 13px;
  color: var(--gris-texte);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.bascule-vue input { position: absolute; opacity: 0; width: 0; height: 0; }
.bascule-vue .bv-piste {
  position: relative;
  width: 40px;
  height: 22px;
  border-radius: 999px;
  background: #c6ccd1;
  transition: background .18s ease;
  flex: 0 0 auto;
}
.bascule-vue .bv-curseur {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform .18s ease;
}
/* Anthracite allumé, gris éteint. Pas de vert-jaune ici : la piste est claire
   au repos, et l'accent ne se pose que sur du sombre (1,16:1 sur blanc). */
.bascule-vue:has(input:checked) .bv-piste { background: var(--chrome); }
.bascule-vue:has(input:checked) .bv-curseur { transform: translateX(18px); }
.bascule-vue:hover .bv-piste { background: #b3bbc1; }
.bascule-vue:has(input:checked):hover .bv-piste { background: var(--chrome-fonce); }
/* La case est invisible : sans ceci, la navigation au clavier n'aurait aucun
   repère visible sur ce contrôle. */
.bascule-vue:focus-within .bv-piste { outline: 2px solid var(--chrome); outline-offset: 2px; }
.bascule-vue .bv-texte { font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
  .bascule-vue .bv-piste, .bascule-vue .bv-curseur { transition: none; }
}

/* ---- Panneau « enseigne ou gérant ? » ------------------------------------
   Il réutilise `.suggest-panneau` : même fond anthracite, même flottement,
   même z-index. Seuls les boutons lui sont propres. C'est volontaire - deux
   panneaux qui s'ouvrent sous le même champ doivent se ressembler, sinon le
   second passe pour une erreur. */
.gerant-panneau { max-width: 380px; padding-bottom: 0; }
.gerant-choix { display: flex; gap: 6px; padding: 8px 10px 10px; }
.gerant-btn {
  flex: 1;
  padding: 7px 8px;
  font-family: inherit;
  font-size: 12px;
  line-height: 1.25;
  color: #fff;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: var(--radius);
  cursor: pointer;
}
.gerant-btn:hover { background: rgba(255, 255, 255, .2); }
/* 🔴 « C'est le gérant » est mis en avant, mais en vert-jaune sur anthracite
   uniquement : `--accent` donne 1,16:1 sur fond clair, il ne sort JAMAIS du
   sombre (cf. « Habillage InfoCaisse »). */
.gerant-btn-p {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--chrome-texte);
  font-weight: 600;
}
.gerant-btn-p:hover { background: #e6ff3d; }
/* L'échappatoire est NOMMÉE et visible, pas cachée derrière Échap : sans elle
   on tape un gérant au hasard pour passer, et une donnée fausse coûte plus
   cher qu'un champ vide. Discrète, mais pas dissimulée. */
.gerant-btn-x { flex: 0 0 auto; background: none; border-color: transparent; color: #aeb8bf; }
.gerant-btn-x:hover { background: rgba(255, 255, 255, .12); color: #fff; }

/* Lien en texte au fil d'une phrase (« annuler », « ajouter le nom du gérant »).
   Un vrai <button> habillé en lien : il est ainsi atteignable au clavier, et il
   vit dans <form id="ticket-form"> où un <a href="#"> ferait défiler la page. */
.lien-texte {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--bleu);
  text-decoration: underline;
  cursor: pointer;
}

/* ---- Repère « gérant ? » -------------------------------------------------
   🔴 Habillage NEUTRE, et surtout pas orangé. L'orange porte « à facturer » et
   le rouge « sans contrat » / « en retard » : ce sont des jetons de la famille
   STATUT, qui ont un sens métier. Une fiche sans gérant n'est ni un retard ni
   un impayé, c'est un travail qui reste à faire - lui prêter une couleur
   métier ferait lire une urgence qui n'existe pas.

   Il se voit quand même, parce qu'il est RARE : il n'apparaît qu'à partir du
   3ᵉ appel d'un client encore anonyme. C'est le même pari que le bouclier
   barré - c'est l'exception qui saute aux yeux, pas la couleur. */
.flag-sans-gerant {
  background: var(--chrome-clair);
  color: var(--chrome-texte);
  border: 1px solid #c3cbd1;
}
/* Compteur du menu Administration. Absent quand il vaut zéro : un « 0 » affiché
   en permanence inviterait à ouvrir un écran vide. */
.admin-compte {
  margin-left: auto;
  min-width: 20px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--chrome-clair);
  color: var(--chrome-texte);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

/* Saisie du gérant dans le panneau flottant. Le champ est un `.input` normal
   posé sur fond anthracite : d'où le fond blanc conservé et le libellé clair. */
.gerant-saisie { padding: 8px 10px 4px; }
.gerant-saisie label {
  display: block;
  font-size: 11px;
  color: #aeb8bf;
  margin-bottom: 4px;
}
.gerant-saisie .input { width: 100%; }
.gerant-saisie .gerant-choix { padding: 8px 0 6px; }

/* ---- Encart de statistiques cliquable -----------------------------------
   Il devient un vrai <button> : il faut donc lui rendre l'allure d'une carte,
   que le navigateur lui retire (police, alignement, largeur). */
.stats-clic {
  font: inherit;
  color: inherit;
  text-align: left;
  width: 100%;
  cursor: pointer;
  transition: background .12s;
}
/* 🔴 Le survol ne touche QUE le fond. Une première version posait aussi
   `border-color`, qui repeint les QUATRE côtés - le liseré gauche compris,
   celui qui porte la couleur de statut. Mesuré : le rouge « en retard »
   rgb(211,63,63) passait à rgb(195,203,209) au survol. Les deux règles ont la
   même spécificité (deux classes), et celle-ci étant plus bas dans le fichier,
   elle gagnait. Ne pas y remettre `border-color`. */
.stats-clic:hover { background: var(--chrome-clair); }
.stats-clic:focus-visible { outline: 2px solid var(--chrome); outline-offset: 2px; }

/* Les deux bornes de la période, côte à côte dans le menu Filtrer. */
.filtres-periode { display: flex; align-items: center; gap: 6px; }
.filtres-periode .input { flex: 1; min-width: 0; }

/* ==================== RMA (10/09/2026) ==================== */

/* ---- Les quatre états, en couleur (demandé par l'utilisateur) ------------
   🔴 Trois teintes REPRISES du badge de statut des appels, AVEC LE MÊME SENS :
   jaune = pas encore parti (comme « Nouveau »), bleu = en cours (comme « En
   cours »), vert = terminé (comme « Résolu »). L'onglet se lit sans rien
   réapprendre.

   « Reçue » est le seul état qui réclame un geste - reposer chez le client ou
   ranger en stock occasion - et reçoit donc une teinte NOUVELLE, la sarcelle
   (`--sarcelle*`, déclarée avec les autres jetons de STATUT). Elle ne porte
   aucun autre sens dans l'outil : ni l'orange (« à facturer »), ni le rouge
   (« en retard », « sans contrat »), ni le violet (« boîtier stockeur »).

   ⚠️ `background-color` et non `background` : la même classe habille aussi la
   liste déroulante du pied de fenêtre, dont la flèche est une background-image.
   Le raccourci `background` l'effacerait.

   ⚠️ Le second sélecteur (`.modale-dense .select-statut.rma-etat-…`) est
   nécessaire : `.modale-dense .select-statut` pose `border: 1px solid` avec
   une spécificité supérieure, qui écraserait la couleur de bordure. */
.rma-etat-a_envoyer,
.modale-dense .select-statut.rma-etat-a_envoyer {
  background-color: var(--jaune); border-color: var(--jaune-bord); color: #7a5c00;
}
.rma-etat-chez_fabricant,
.modale-dense .select-statut.rma-etat-chez_fabricant {
  background-color: var(--bleu-clair); border-color: var(--bleu); color: var(--bleu-fonce);
}
.rma-etat-recu,
.modale-dense .select-statut.rma-etat-recu {
  background-color: var(--sarcelle); border-color: var(--sarcelle-bord); color: var(--sarcelle-texte);
}
.rma-etat-clos,
.modale-dense .select-statut.rma-etat-clos {
  background-color: var(--vert); border-color: var(--vert-bord); color: var(--vert-texte);
}

/* ---- La destination - LA donnée du module ---------------------------------
   « Client » discret, « Stock occasion » en aplat anthracite : c'est l'exception
   qui doit se voir, exactement comme le bouclier barré « sans contrat ».
   Anthracite = habillage, sans sens métier : on ne prête pas une couleur de
   statut à une destination. */
.rma-dest {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  border-radius: 4px;
  padding: 1px 7px;
  border: 1px solid #9aa4ab;
  color: var(--chrome-texte);
  white-space: nowrap;
}
.rma-dest-occasion { background: var(--chrome); border-color: var(--chrome); color: #fff; }
/* La consigne du tableau Velleda, écrite en toutes lettres quand l'appareil est
   REÇU - le seul moment où l'erreur peut se produire. Rouge : c'est un « attention ». */
.rma-alerte { margin-top: 3px; font-size: 11px; font-weight: 700; color: var(--rouge); }

/* ---- La liste ---- */
.grid-rma .col-age { width: 56px; white-space: nowrap; font-variant-numeric: tabular-nums; }
/* Un RMA clos (affiché par « Afficher les RMA clos » ou par une recherche) : on
   le reconnaît au badge vert ET à son texte atténué, pour ne pas le confondre
   avec ce qui est encore dehors. */
.grid-rma tr.rma-clos td { color: var(--gris-doux); }
/* « 3e RMA » : habillage neutre, comme « gérant ? ». Récidive n'est pas urgence. */
.rma-recidive {
  display: inline-block;
  margin-left: 4px;
  font-size: 10px;
  font-weight: 700;
  border-radius: 999px;
  padding: 0 6px;
  background: var(--chrome-clair);
  border: 1px solid #c3cbd1;
  color: var(--chrome-texte);
}
.hint.rma-recidive-hint { color: var(--chrome-texte); font-weight: 700; }
.hint.erreur { color: var(--rouge); }

/* ---- Le choix de destination dans la fenêtre ----
   Deux grands choix qui NOMMENT le cas, plutôt qu'une case à cocher abstraite -
   même principe que les deux boutons du garde-fou téléphones. L'état vient de
   `:has(input:checked)` : rien à synchroniser en JavaScript. */
.rma-destination { display: flex; gap: 8px; }
.rma-dest-choix {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--bordure);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
  background: var(--blanc);
}
.rma-dest-choix input { accent-color: var(--chrome); margin: 0; }
.rma-dest-choix:has(input:checked) { border-color: var(--chrome); background: var(--chrome-clair); }
/* « Stock occasion » choisi : aplat anthracite, comme dans la liste.
   🔴 La pastille du bouton radio passe alors au vert-jaune : `--accent` ne se pose
   QUE sur du sombre (1,16:1 sur blanc). Ici il est sur l'anthracite - c'est le cas
   permis. Sans ça, le bouton coché disparaîtrait, anthracite sur anthracite. */
.rma-dest-stock:has(input:checked) { background: var(--chrome); border-color: var(--chrome); color: #fff; }
.rma-dest-stock:has(input:checked) input { accent-color: var(--accent); }

/* ---- Le bloc RMA de la fiche d'appel ---- */
.rma-ligne-appel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  padding: 6px 8px;
  margin-bottom: 4px;
  border: 1px solid var(--bordure);
  border-radius: var(--radius);
  cursor: pointer;
}
.rma-ligne-appel:hover { background: var(--chrome-clair); }
.rma-ligne-materiel { font-weight: 600; }
#tk-rma-bloc .btn { margin-top: 4px; }

/* ---- Repère « RMA » dans le tableau des appels ----
   SOUS LE NUMÉRO d'appel (option C, choisie le 10/09/2026). Habillage neutre
   (anthracite sur gris clair) tant que l'appareil est dehors : le tableau porte
   déjà six couleurs de statut, avec un sens chacune.
   🔴 SAUF quand une RMA est REÇUE : sarcelle, exactement le badge « Reçue » de
   l'onglet RMA. C'est le seul état qui attend un geste de nous - reposer
   l'appareil ou le ranger - et c'est le seul qui doit sauter aux yeux. */
.flag-rma {
  display: inline-block;
  margin-top: 4px;
  background: var(--chrome-clair);
  border: 1px solid var(--chrome);
  color: var(--chrome-texte);
}
.flag-rma-recue {
  background: var(--sarcelle);
  border-color: var(--sarcelle-bord);
  color: var(--sarcelle-texte);
}


/* ==========================================================================
   Licences provisoires LEO (15/09/2026)
   ========================================================================== */

/* ---- L'encart du tableau des appels ----
   Anthracite souligné de vert-jaune : l'habillage de l'outil, sans emprunter une
   couleur de statut (orange = à facturer, rouge = retard). Il se voit parce
   qu'il est RARE - il n'existe que lorsqu'une licence est dans sa fenêtre.
   Seul le « dont N déjà bloquée(s) » passe au rouge : c'est un retard réel. */
.licences-encart {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 0 0 10px;
  padding: 8px 14px;
  border: 0;
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  background: var(--chrome);
  color: #fff;
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}
.licences-encart:hover { background: var(--chrome-fonce); }
.licences-encart:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.licences-encart .ico { width: 18px; height: 18px; flex: 0 0 auto; }
.licences-encart-bloquees {
  margin-left: 4px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--rouge);
  color: #fff;
  font-weight: 700;
  font-size: 11.5px;
}
.licences-encart-lien { margin-left: auto; color: var(--accent); font-weight: 700; white-space: nowrap; }

/* ---- Les trois états ----
   « Provisoire » neutre (c'est l'attente normale), « Définitive » en VERT comme
   « Résolu » (l'affaire est finie), « Abandonnée » en gris. `background-color` et
   non `background` : la même classe habille la liste déroulante du pied de
   fenêtre, dont la flèche est une image de fond (leçon des états RMA). */
.lic-etat-en_cours,
.modale-dense .select-statut.lic-etat-en_cours {
  background-color: var(--chrome-clair); border-color: var(--chrome); color: var(--chrome-texte);
}
.lic-etat-definitive,
.modale-dense .select-statut.lic-etat-definitive {
  background-color: var(--vert); border-color: var(--vert-bord); color: var(--vert-texte);
}
.lic-etat-abandonnee,
.modale-dense .select-statut.lic-etat-abandonnee {
  background-color: #eceff1; border-color: #9aa4ab; color: #4f5961;
}

/* ---- La date de fin ----
   Dans la fenêtre d'alerte : en gras, sans couleur - l'appel d'alerte existe
   déjà, rien n'est encore en retard. Date dépassée : ROUGE, la caisse est
   bloquée, c'est le sens du rouge « planning dépassé » du tableau. */
.grid-licences .col-fin { width: 118px; white-space: nowrap; }
.lic-fin { font-variant-numeric: tabular-nums; }
.lic-a-echeance { font-weight: 700; color: var(--chrome-texte); }
.lic-bloquee, .cell-sub.lic-bloquee { font-weight: 700; color: var(--rouge); }

/* Bloc « Licence provisoire » de la fiche d'appel : le bouton respire sans
   prendre les 18 px de `.mt`, qui sert à séparer deux blocs entiers. */
#tk-licence-zone .btn { margin-top: 8px; }
.lic-mail-ko { color: var(--rouge); font-weight: 700; }
.grid-licences tr.lic-terminee td { color: var(--gris-doux); }

/* ---- La fenêtre ---- */
.li-lecture {
  padding: 6px 0;
  font-size: 13px;
  color: var(--gris-texte);
}
.li-alerte {
  margin-top: 12px;
  padding: 8px 12px;
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  background: var(--chrome-clair);
  font-size: 12.5px;
  line-height: 1.6;
}
/* L'historique des dates n'ouvre rien : pas de main au survol (cf. `.grid tbody tr`). */
#li-historique .grid tbody tr { cursor: default; }
#li-historique .grid tbody tr:hover td { background: transparent !important; }

/* ---- Le bloc de la fiche client ---- */
#cl-licences .mt-sm { margin-top: 6px; }

/* ---- Sécurité des comptes (28/09/2026) ---- */

/* Aide de politique de mot de passe, sur la page ouverte par un lien. Elle vit
   hors de l'application (écran de connexion), d'où sa propre règle plutôt que
   `.hint`, qui est réglée pour les libellés de champ des fenêtres. */
.login-aide { margin: -14px 0 16px; color: var(--gris-doux); font-size: 12px; line-height: 1.4; }

/* Bandeau « compte bloqué » de la fiche utilisateur.
   🔴 Rouge de STATUT (`--rouge`), celui du retard et du « sans contrat » : un
   compte bloqué est bien une anomalie qui appelle une action, et non un simple
   état d'habillage. Il n'apparaît que sur les fiches réellement bloquées. */
.bandeau-bloque {
  display: flex; flex-direction: column; gap: 2px;
  background: var(--rouge-clair); border: 1px solid var(--rouge);
  border-radius: 6px; padding: 8px 10px;
}
.bandeau-bloque .bloque-titre { font-weight: 700; color: #a32020; font-size: 13px; }
.bandeau-bloque .bloque-detail { font-size: 11.5px; color: var(--gris-texte); }

/* Pastille « Bloqué » de la liste des comptes. */
.etat-bloque {
  display: inline-block; padding: 1px 7px; border-radius: 999px;
  background: var(--rouge-clair); color: #a32020;
  border: 1px solid var(--rouge); font-size: 11px; font-weight: 700;
}

/* ---- Purge du journal (29/09/2026) ---- */
.purge-intro { margin: 0 0 14px; font-size: 13px; line-height: 1.45; color: var(--gris-texte); }

/* Le compte de lignes à effacer. 🔴 C'est LUI le garde-fou de cette fenêtre,
   pas une phrase alarmante : il porte un nombre mesuré par le serveur. */
.purge-compte { margin-top: 12px; font-size: 13px; color: var(--gris-doux); }
.purge-compte-attention {
  color: #a32020; font-weight: 700;
  background: var(--rouge-clair); border: 1px solid var(--rouge);
  border-radius: 6px; padding: 8px 10px;
}

/* ---------------- Verrou de modification des appels (06/10/2026) ----------------
   Bande ROUGE sous le bandeau de la fiche : « Appel en mode consultation - VD est
   en train de modifier cet appel ». Rouge `--rouge` : il porte déjà « bloqué »
   dans l'outil (retard, licence bloquée) - choix de l'utilisateur. Texte blanc
   en gras sur `#d33f3f` (4,61:1). */
.verrou-bande {
  display: flex; align-items: center; gap: 10px;
  background: var(--rouge); color: #fff;
  padding: 9px 16px; font-size: 13px; font-weight: 600;
}
.verrou-bande.hidden { display: none; }
.verrou-bande .ico { width: 16px; height: 16px; flex: 0 0 auto; stroke: currentColor; }
.verrou-bande #tk-verrou-texte { flex: 1 1 auto; }
/* Boutons blancs sur la bande : lisibles sans emprunter une autre couleur. */
.verrou-bande .verrou-btn {
  background: #fff; color: var(--rouge); border-color: #fff; font-weight: 600;
}

/* En consultation, tout ce qui MODIFIE l'appel est grisé et inerte. Restent
   actifs : fermer, ouvrir une pièce jointe, une RMA, la licence, et les
   boutons de la bande. Le blocage réel est fait par le script (clics
   interceptés) et par le serveur (409) - ce style ne fait que le montrer. */
#ticket-modal.consultation button:not([data-close]):not(.modal-close):not([data-file]):not([data-licence]):not(.verrou-btn),
#ticket-modal.consultation .file-drop,
#ticket-modal.consultation .tech-opt {
  opacity: .45; cursor: not-allowed;
}
#ticket-modal.consultation .modal-body input,
#ticket-modal.consultation .modal-body select,
#ticket-modal.consultation .modal-body textarea,
#ticket-modal.consultation .modal-foot select,
#ticket-modal.consultation .head-date {
  background: #eef0f2; cursor: not-allowed;
}

/* ==========================================================================
   Vue « Ma journée » - accueil des techniciens
   ==========================================================================
   Trois groupes par urgence (retard/jour/semaine), posés en agenda vertical.
   #view-ma-journee est masquée par défaut et révélée par estTerrain() ; voir
   app.js. */
#view-ma-journee .table-wrap {
  background: transparent;
  border: none;
  border-radius: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--bordure) transparent;
}
#view-ma-journee .table-wrap::-webkit-scrollbar { width: 8px; }
#view-ma-journee .table-wrap::-webkit-scrollbar-track { background: transparent; }
#view-ma-journee .table-wrap::-webkit-scrollbar-thumb { background: var(--bordure); border-radius: 999px; }
#view-ma-journee .table-wrap::-webkit-scrollbar-thumb:hover { background: #b9c3cb; }
/* `width: 100%` est nécessaire ICI et pas sur #mj-corps : .mj-entete est un
   ITEM flex direct de #view-ma-journee (display:flex), et des marges `auto`
   sur un item flex désactivent l'étirement - mesuré : sans ce `width`, la
   boîte retombait à la largeur de son texte (227 px) au lieu de 760,
   `max-width` ne servant plus à rien. #mj-corps n'a pas ce problème : il vit
   dans .table-wrap, qui n'est pas un conteneur flex. Le .table-wrap lui-même
   reste PLEINE LARGEUR : l'ascenseur doit aller au bord réel de l'écran, pas
   au bord de la colonne de texte. */
.mj-entete { flex: 0 0 auto; width: 100%; max-width: 760px; margin: 0 auto 14px; }
.mj-entete h2 { margin: 0 0 2px; font-size: 20px; color: var(--chrome-texte); }
.mj-sous-titre { margin: 0; font-size: 13px; color: var(--gris-doux); }
.mj-corps { padding: 16px; max-width: 760px; margin: 0 auto; }
.mj-groupe { margin-bottom: 1.75rem; }
.mj-groupe:last-child { margin-bottom: 0; }
.mj-titre-groupe {
  display: flex; align-items: center; gap: 8px; margin: 0 0 10px;
  font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px;
  color: var(--gris-doux);
}
.mj-retard .mj-titre-groupe { color: var(--rouge); }
.mj-compte {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px;
  background: var(--chrome-clair); color: #4a555e; font-size: 11px; font-weight: 700;
}
.mj-retard .mj-compte { background: var(--rouge-clair); color: var(--rouge); }

.mj-ligne { position: relative; padding-left: 24px; display: flex; flex-direction: column; gap: 9px; }
.mj-ligne::before {
  content: ""; position: absolute; left: 5px; top: 4px; bottom: 4px; width: 2px;
  background: var(--bordure);
}
.mj-item { position: relative; cursor: pointer; }
.mj-point {
  position: absolute; left: -24px; top: 13px; width: 10px; height: 10px;
  border-radius: 50%; background: var(--gris-doux); border: 2px solid var(--blanc);
  box-shadow: 0 0 0 1px var(--bordure); transition: background-color .4s ease;
}
.mj-retard .mj-point { background: var(--rouge); }
.mj-jour .mj-point { background: var(--chrome); }
.mj-semaine .mj-point { background: #b9c3cb; }
.mj-termine .mj-point { background: var(--mj-termine-accent); }

/* `display: flex` : le bouton rond "Fait" est un FRÈRE de .mj-carte-contenu
   plutôt qu'une position absolue par-dessus le texte - une carte haute
   (motif long, deux numéros de téléphone) l'aurait sinon recouvert. Centré
   verticalement sur toute la hauteur réelle de la carte, quel que soit son
   contenu, sans jamais chevaucher rien. */
.mj-carte {
  display: flex; align-items: center; gap: 10px;
  background: var(--blanc); border: 1px solid var(--bordure); border-radius: 8px;
  padding: 10px 12px;
  transition: box-shadow .12s ease, background-color .4s ease, border-color .4s ease;
}
.mj-carte-contenu { flex: 1; min-width: 0; }
.mj-retard .mj-carte { border-left: 3px solid var(--rouge); }
.mj-jour .mj-carte { border-left: 3px solid var(--chrome); }
.mj-item:hover .mj-carte { box-shadow: 0 1px 4px rgba(20, 40, 60, .12); }

/* Bouton "Fait" - rond, icône seule, toujours au même endroit. Neutre au
   repos (il ne porte aucun sens tant qu'on n'a pas cliqué) ; le vert
   n'apparaît qu'au survol, comme un aperçu de ce que le clic va faire - pas
   une couleur de statut posée en permanence sur un appel qui n'est pas
   encore résolu. */
.mj-carte-fait {
  flex: none; appearance: none; cursor: pointer;
  width: 34px; height: 34px; border-radius: 50%;
  border: 1.5px solid var(--bordure); background: var(--blanc); color: var(--gris-doux);
  display: inline-flex; align-items: center; justify-content: center;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.mj-carte-fait .ico { width: 16px; height: 16px; }
.mj-carte-fait:hover, .mj-carte-fait:focus-visible {
  background: var(--vert); border-color: var(--vert-bord); color: var(--vert-texte);
}
.mj-item.mj-termine .mj-carte-fait { opacity: 0; pointer-events: none; transition: opacity .3s ease; }
.mj-carte-entete { display: flex; align-items: baseline; gap: 8px; margin-bottom: 3px; }
.mj-carte-num { font-weight: 700; color: #56626b; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.mj-carte-client { font-weight: 700; font-size: 13.5px; }
.mj-carte-motif {
  font-size: 13px; color: #1d2429; margin: 0 0 7px; line-height: 1.35;
  position: relative; display: inline-block; transition: color .4s ease;
}
/* Trait qui se dessine de gauche à droite au moment où l'appel passe
   "terminé" - posé en ::after pour ne jamais dépendre du support navigateur
   de `text-decoration-line` animée, inégal d'un moteur à l'autre. */
.mj-carte-motif::after {
  content: ""; position: absolute; left: 0; top: 50%; height: 1.5px; width: 0;
  background: currentColor; transition: width .35s ease .1s;
}
.mj-termine .mj-carte-motif::after { width: 100%; }
.mj-carte-pied { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.mj-carte-date { font-size: 11.5px; color: var(--gris-doux); font-variant-numeric: tabular-nums; }
.mj-item.mj-termine .mj-carte-actions { opacity: 0; pointer-events: none; transition: opacity .3s ease; }

/* ---- Résolu aujourd'hui : habillage ADOUCI, jamais le vert plein de
   "Résolu" ----------------------------------------------------------------
   Même raisonnement que le volume mensuel des Statistiques (.sg-resolu,
   #a9dda0) : un vert franc sur beaucoup de cartes finirait par dominer
   l'écran et détourner l'œil de ce qu'il reste à faire. --mj-termine-accent
   REPREND #a9dda0 tel quel ; le reste de la palette est mesuré pour rester
   au-dessus de 4,5:1 sur le fond de carte choisi (6,19:1 pour le badge,
   8,05:1 pour le motif, 5,25:1 pour les mentions secondaires). */
.mj-termine {
  --mj-termine-accent: #a9dda0;
  --mj-termine-fond: #e7ede2;
  --mj-termine-texte: #17500a;
  --mj-termine-doux: #56626b;
}
.mj-termine .mj-carte { background: var(--mj-termine-fond); border-left: 3px solid var(--mj-termine-accent); }
.mj-termine .mj-carte-motif { color: var(--mj-termine-doux); }
.mj-termine .mj-carte-num, .mj-termine .mj-carte-date { color: var(--mj-termine-doux); }
.mj-termine .badge-statut {
  background: var(--mj-termine-accent); border-color: var(--mj-termine-accent);
  color: var(--mj-termine-texte);
}
.mj-termine .mj-titre-groupe { color: var(--mj-termine-texte); }
.mj-termine .mj-compte { background: var(--mj-termine-accent); color: var(--mj-termine-texte); }

/* Bouton « Rétablir » : seule action laissée sur une carte terminée. Même
   geste en sens inverse que « Fait » (efface date_resolution), pas une
   nouvelle route. */
.lien-retablir {
  appearance: none; border: none; background: none; padding: 0;
  font-size: 11.5px; color: var(--gris-doux); text-decoration: underline;
  cursor: pointer; font-family: inherit;
}
.lien-retablir:hover { color: var(--chrome-texte); }

/* Les deux temps de l'animation de clic sur « Fait » (app.js) :
   1. la carte prend l'habillage .mj-termine EN PLACE (transitions ci-dessus) ;
   2. une fois le changement visible, .mj-sortie la réduit à rien avant que
      chargerMaJournee() ne la réintègre, déjà classée, dans son vrai groupe. */
.mj-item.mj-sortie {
  max-height: 0; opacity: 0; margin: 0; overflow: hidden;
  transition: max-height .35s ease, opacity .25s ease, margin .35s ease;
}
.mj-item.mj-sortie .mj-carte { padding-top: 0; padding-bottom: 0; transition: padding .35s ease; }
/* Entrée douce : posée sur CHAQUE carte de "Terminé" à chaque rendu - y
   compris celles déjà présentes avant le clic. Un léger "souffle" à chaque
   rafraîchissement n'est pas un défaut, c'est le même principe que la
   roulette d'enregistrement : un repère discret que quelque chose vient de
   se passer, jamais un décor qui reste figé. */
.mj-groupe.mj-termine .mj-item { animation: mj-entree .35s ease; }
@keyframes mj-entree { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
/* Arrivée d'un appel par la mise à jour en direct (09/10/2026) : accordéon
   + trois ondes sur le point, dans la couleur de son groupe (`color` porte la
   teinte, l'onde la reprend par currentColor - aucune couleur nouvelle).
   🔴 Volontairement HORS de la règle prefers-reduced-motion ci-dessous, comme
   l'onde de la cloche (v=119) : les « effets d'animation » de Windows sont
   coupés sur le serveur et en bureau à distance, et un signal d'arrivée figé
   ne signalerait plus rien. */
.mj-retard .mj-point { color: var(--rouge); }
.mj-jour .mj-point { color: var(--chrome-texte); }
.mj-semaine .mj-point { color: #b9c3cb; }
@keyframes mj-accordeon {
  from { max-height: 0; opacity: 0; }
  to { max-height: 320px; opacity: 1; }
}
@keyframes mj-onde-point {
  0% { box-shadow: 0 0 0 1px var(--bordure), 0 0 0 0 currentColor; }
  100% { box-shadow: 0 0 0 1px var(--bordure), 0 0 0 11px transparent; }
}
/* Deux classes, deux temps : `.mj-ouverture` (accordéon) porte l'overflow
   hidden et tombe à la fin de l'animation - le point vit HORS de la carte
   (left: -24px), il serait rogné, ondes comprises. Les ondes partent après. */
.mj-item.mj-ouverture { overflow: hidden; animation: mj-accordeon .4s ease-out; }
.mj-item.mj-arrivee .mj-point { animation: mj-onde-point .9s ease-out .4s 3; }

@media (prefers-reduced-motion: reduce) {
  .mj-groupe.mj-termine .mj-item { animation: none; }
  .mj-carte, .mj-point, .mj-carte-motif, .mj-carte-motif::after, .mj-item.mj-sortie { transition: none; }
}

/* Numéro + copie au survol : repris tel quel du dashboard (.tel-item/.tel-copy,
   déjà installés par le lot précédent). Même relief que #tickets-table :
   c'est ici qu'on vient chercher qui appeler aujourd'hui. */
.mj-carte-tel { display: flex; flex-direction: column; gap: 2px; margin: 2px 0 7px; }
#view-ma-journee .tel-item { font-weight: 600; color: var(--chrome-texte); }
#view-ma-journee .tel-item .ico { color: var(--chrome-texte); }

/* Ligne d'action sous le contenu : ne porte plus que « Rétablir » sur une
   carte terminée. « Fait » et « Reporter » sont des ronds dans la colonne de
   droite (voir plus bas), tous deux via le PUT /tickets/{id} existant. */
.mj-carte-actions { display: flex; gap: 6px; margin-top: 8px; }

/* Repère neutre (retour de boîtier) et sarcelle (RMA reçue, même teinte que
   l'onglet RMA pour « Reçue ») : jamais une couleur de statut, ces deux lignes
   ne portent ni statut d'appel ni retard de planning. */
.chip-neutre {
  display: inline-flex; align-items: center; gap: 5px; background: var(--chrome-clair);
  border: 1px solid var(--bordure); color: var(--chrome-texte); border-radius: 12px;
  padding: 2px 9px; font-size: 10.5px; font-weight: 700; white-space: nowrap;
}
.chip-sarcelle {
  display: inline-flex; align-items: center; gap: 5px; background: var(--sarcelle);
  border: 1px solid var(--sarcelle-bord); color: var(--sarcelle-texte); border-radius: 12px;
  padding: 2px 9px; font-size: 10.5px; font-weight: 700; white-space: nowrap;
}

/* ---- « Reporter » de « Ma journée » (08/10/2026) --------------------------
   Rond du MÊME gabarit que « Fait », empilé dessous dans la même colonne.
   ⚠️ `.mj-carte-fait` n'est pas retouché : demandé par l'utilisateur. Le
   survol de « Reporter » reste NEUTRE (anthracite) - le vert est réservé à
   « Fait », qui résout l'appel. */
.mj-carte-boutons { flex: none; display: flex; flex-direction: column; gap: 6px; }
.mj-carte-reporter {
  flex: none; appearance: none; cursor: pointer;
  width: 34px; height: 34px; border-radius: 50%;
  border: 1.5px solid var(--bordure); background: var(--blanc); color: var(--gris-doux);
  display: inline-flex; align-items: center; justify-content: center;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.mj-carte-reporter .ico { width: 16px; height: 16px; }
.mj-carte-reporter:hover, .mj-carte-reporter:focus-visible, .mj-carte-reporter[aria-expanded="true"] {
  background: var(--chrome-clair); border-color: var(--chrome); color: var(--chrome-texte);
}
.mj-item.mj-termine .mj-carte-reporter { opacity: 0; pointer-events: none; transition: opacity .3s ease; }

/* Menu des dates : posé sur .mj-item (déjà en position relative), aligné à
   gauche de la colonne de boutons. Liseré vert-jaune en tête comme la
   bannière de version - l'accent n'y est jamais du texte sur du blanc. */
.mj-report-menu {
  position: absolute; z-index: 30; right: 52px; top: 50%; transform: translateY(-50%);
  width: 220px; padding: 6px; background: var(--blanc);
  border: 1px solid var(--bordure); border-top: 2px solid var(--accent); border-radius: 8px;
  box-shadow: 0 6px 18px rgba(20, 40, 60, .16);
}
.mj-report-menu button {
  display: flex; justify-content: space-between; align-items: baseline; width: 100%;
  appearance: none; border: none; background: none; border-radius: 5px;
  padding: 7px 9px; font: inherit; font-size: 12.5px; color: #1d2429; cursor: pointer; text-align: left;
}
.mj-report-menu button span { font-size: 11.5px; color: var(--gris-doux); font-variant-numeric: tabular-nums; }
.mj-report-menu button:hover, .mj-report-menu button:focus-visible { background: var(--chrome-clair); outline: none; }
.mj-report-autre {
  display: flex; flex-direction: column; gap: 4px; margin-top: 4px; padding: 7px 9px 3px;
  border-top: 1px solid var(--bordure); font-size: 11.5px; color: var(--gris-doux);
}
.mj-report-autre input { font: inherit; font-size: 12.5px; height: 30px; }

/* Animation retenue (« a · Glissement ») : la carte part à droite, puis la
   réduction .mj-sortie existante la retire avant le rechargement. */
.mj-item.mj-glisse { transform: translateX(40px); opacity: 0; transition: transform .33s ease, opacity .33s ease; }
@media (prefers-reduced-motion: reduce) {
  .mj-item.mj-glisse { transition: none; }
}


/* Pied de la fiche utilisateur (09/10/2026) : avec « Renvoyer le récap », les
   gestes secondaires ne tiennent plus sur une ligne dans 460 px - mesuré :
   15 px de débordement, 46 avec « Débloquer le compte ». Ils passent sur une
   ligne à eux, « Annuler » et « Enregistrer » restant ensemble à droite :
   regroupés dans `.foot-droite`, ils passent à la ligne d'un bloc. */
#user-modal .modal-foot { flex-wrap: wrap; row-gap: 8px; }
#user-modal .foot-droite { display: flex; gap: 8px; margin-left: auto; }
#rp-fiche-recherche-zone, #rp-fiche-recherche { width: 100%; }

/* ===================== Bibliothèque de dépannage (12/10/2026) ===================== */
/* Libellé « Motif » + suggestions sur la MÊME ligne : la ligne existait, rien
   ne bouge dans le formulaire quand une suggestion apparaît. */
/* ⚠️ Le lien est SORTI DU FLUX (position absolue) : mesuré, en flex il
   ajoutait 2 px à la ligne quand il apparaissait. Et le libellé reste un bloc,
   sinon la ligne passait à 19 px au lieu des 14 d'un libellé ordinaire. */
.label-ligne { position: relative; }
.label-ligne > label { display: block; }
.modale-dense .label-ligne > label { font-size: 10px; }
.bib-suggest-zone { position: absolute; right: 0; bottom: 0; line-height: 1; }
.bib-suggest-lien {
  display: inline-flex; align-items: center; gap: 4px;
  background: none; border: 0; padding: 0; margin: 0;
  font: inherit; font-size: 11px; font-weight: 600; line-height: 1;
  color: var(--chrome-texte); text-decoration: underline; text-underline-offset: 2px;
  cursor: pointer; white-space: nowrap;
}
.bib-suggest-lien .ico { width: 13px; height: 13px; }
.bib-suggest-lien:hover { color: #000; }
/* Ancré à DROITE : le lien est au bord droit de la fenêtre. */
.bib-panneau { left: auto; right: 0; min-width: 260px; max-width: 420px; }
.bib-panneau .suggest-nom { white-space: normal; }

/* La vue : des fiches en colonnes, comme un rayonnage. */
.bib-liste {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 12px; padding: 14px;
}
.bib-carte {
  background: var(--blanc); border: 1px solid var(--bordure); border-radius: 8px;
  padding: 12px 14px; cursor: pointer; display: flex; flex-direction: column; gap: 7px;
  border-left: 3px solid var(--chrome);
}
.bib-carte:hover, .bib-carte:focus-visible { background: var(--chrome-clair); outline: none; }
.bib-titre { margin: 0; font-size: 14px; font-weight: 700; color: var(--chrome-texte); }
.bib-etiquettes { display: flex; flex-wrap: wrap; gap: 5px; }
.bib-mot {
  display: inline-flex; align-items: center; border: 1px solid var(--bordure);
  background: var(--blanc); color: #3f4a52; border-radius: 12px;
  padding: 1px 8px; font: inherit; font-size: 11px; cursor: pointer;
}
button.bib-mot:hover { background: var(--chrome); border-color: var(--chrome); color: #fff; }
.bib-extrait {
  margin: 0; font-size: 12.5px; color: #3f4a52; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  white-space: pre-line;
}
.bib-lib {
  display: inline-block; margin-right: 6px; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .3px; color: var(--gris-doux);
}
.bib-pied {
  margin-top: auto; display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
  font-size: 11px; color: var(--gris-doux);
}
.bib-pied .ico { width: 12px; height: 12px; }
#view-bibliotheque .toolbar select { max-width: 190px; }
#view-bibliotheque #bib-search { width: 360px; max-width: 100%; }

/* Fenêtre de fiche : la solution est la partie qu'on vient lire. */
#fiche-modal #fi-solution { min-height: 140px; }
#fiche-modal #fi-origine { margin: 8px 0 0; }

/* ===================== Menu « Atelier » (12/10/2026) =====================
   Même habillage que le menu Administration (.admin-menu, .admin-item). */
.atelier-zone { position: relative; display: flex; }
#btn-atelier .admin-fleche { margin-left: 2px; }
/* Depuis les onglets pleine hauteur (22/10/2026), la liste tombe pile sous le
   bouton, comme le menu de l'utilisateur. Le pont ci-dessous reste inoffensif. */
.atelier-menu { top: 100%; border-top-left-radius: 0; border-top-right-radius: 0; }
/* Pont invisible entre le bouton et la liste (8 px de vide) : le pointeur qui
   descend vers le menu reste « dans la zone », il ne la referme pas. */
.atelier-zone:has(.atelier-menu:not(.hidden))::after {
  content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 10px;
}
/* L'écran affiché, repéré dans la liste : le bouton seul ne dit pas lequel. */
.atelier-menu .admin-item.courant {
  font-weight: 600; background: var(--chrome-clair); box-shadow: inset 3px 0 0 var(--chrome);
}

/* Icône « bibliothèque » au CENTRE EXACT du pied de la fiche d'appel
   (12/10/2026) : position absolue, elle ne pousse ni le statut ni les boutons.
   Discrète (gris, au trait) tant qu'il s'agit d'archiver ; anthracite sur gris
   clair une fois l'appel archivé - aucune couleur de statut. */
#ticket-modal .modal-foot { position: relative; }
.btn-pied-bib {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 32px; height: 32px; padding: 0; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--bordure); background: var(--blanc); color: var(--gris-doux);
  cursor: pointer;
}
.btn-pied-bib.hidden { display: none; }
.btn-pied-bib .ico { width: 17px; height: 17px; }
.btn-pied-bib:hover, .btn-pied-bib:focus-visible { color: var(--chrome-texte); border-color: var(--chrome); outline: none; }
.btn-pied-bib.archive { color: var(--chrome-texte); background: var(--chrome-clair); border-color: var(--chrome); }

/* ---- Partager le fichier client (12/10/2026) ----
   Le menu reprend l'habillage du menu Administration, aligné à DROITE du
   bouton : il vit au bout de la barre d'outils. */
.partage-zone { position: relative; display: inline-flex; }
.partage-menu { left: auto; right: 0; top: calc(100% + 6px); min-width: 240px; }
.partage-menu .admin-tete { text-transform: none; letter-spacing: 0; font-weight: 600; line-height: 1.35; }
.admin-sep { height: 1px; background: var(--bordure); margin: 4px 0; }

/* ---- Livre et enveloppe au centre du pied de la fiche d'appel ----
   Le groupe est centré en position absolue ; les deux boutons y sont posés
   côte à côte. Un seul visible = centré quand même. */
.pied-centre {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: inline-flex; gap: 8px; align-items: center;
}
.pied-centre .btn-pied-bib { position: static; transform: none; }
#db-remplacer-zone { margin-top: 6px; }

/* ---- Fusionner les doublons (12/10/2026) ----
   Habillage neutre : une carte cochée prend le liseré anthracite, la fiche « à
   garder » un fond gris clair. Aucune couleur de statut n'est détournée. */
.dbl-tout { margin-left: 12px; }
.dbl-aide { margin: 4px 2px 12px; }
.dbl-groupe { border: 1px solid var(--bordure); border-radius: var(--radius); background: var(--blanc); margin-bottom: 14px; }
.dbl-groupe-tete { padding: 8px 12px; font-weight: 700; font-size: 13px; border-bottom: 1px solid var(--bordure); background: var(--chrome-clair); }
.dbl-raisons { font-weight: 400; color: var(--gris-doux); margin-left: 8px; }
.dbl-cartes { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; padding: 10px; }
.dbl-carte { border: 1px solid var(--bordure); border-radius: var(--radius); padding: 8px 10px; cursor: pointer; font-size: 13px; background: var(--blanc); }
.dbl-carte.garde { background: var(--chrome-clair); }
.dbl-carte.cochee { border-color: var(--chrome); box-shadow: inset 3px 0 0 var(--chrome); }
.dbl-carte-tete { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.dbl-nom { font-weight: 700; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.dbl-num { color: var(--gris-doux); font-size: 11px; }
.dbl-ligne { color: var(--gris-texte); margin: 2px 0; }
.dbl-tel { margin-right: 10px; font-weight: 600; color: var(--chrome-texte); }
.dbl-pied { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--bordure); color: var(--gris-doux); }
.dbl-garder { cursor: pointer; color: var(--gris-texte); }
.dbl-coche input, .dbl-garder input { cursor: pointer; }

/* ---- Prise d'appel : champ manquant d'un NOUVEAU client (12/10/2026) ---- */
.input.manquant { border-color: var(--rouge); box-shadow: 0 0 0 2px rgba(211, 63, 63, .15); }

/* ---- « Ce client existe peut-être déjà » (12/10/2026) ---- */
.sim-liste { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.sim-carte { display: flex; gap: 10px; align-items: center; border: 1px solid var(--bordure); border-radius: var(--radius); padding: 8px 10px; }
.sim-corps { flex: 1; min-width: 0; font-size: 13px; }
.sim-nom { font-weight: 700; }
.sim-raisons { color: var(--gris-doux); font-size: 12px; }

/* ---- Gérant sous le nom du client, tableau des appels (proposition A, 12/10/2026) ----
   Deuxième ligne en gris normal : le nom du commerce reste ce qu'on lit d'abord. */
#tickets-table .cell-gerant { font-weight: 400; font-size: 12.5px; color: var(--gris-doux); margin-top: 2px; }
.sim-actions { display: flex; flex-direction: column; gap: 4px; flex: 0 0 auto; }
.sim-actions .btn { white-space: nowrap; }

/* « Mettre à jour la fiche » : une ligne par champ qui diffère (12/10/2026). */
.sim-maj-tout { margin: 6px 0 4px; }
.sim-maj-lignes { display: flex; flex-direction: column; gap: 4px; margin: 6px 0 12px; }
.sim-maj-ligne { display: grid; grid-template-columns: 18px 100px minmax(0, 1fr) 14px minmax(0, 1fr); gap: 6px; align-items: center;
  padding: 6px 8px; border: 1px solid var(--bordure); border-radius: var(--radius); font-size: 13px; cursor: pointer; }
.sim-maj-lib { font-weight: 700; }
.sim-maj-avant { color: var(--gris-doux); text-decoration: line-through; overflow-wrap: anywhere; }
.sim-maj-ligne:not(:has(input:checked)) .sim-maj-avant, .sim-maj-avant.vide { text-decoration: none; }
.sim-maj-avant.vide { font-style: italic; }
.sim-maj-apres { font-weight: 600; overflow-wrap: anywhere; }
.sim-maj-fleche { color: var(--gris-doux); }
.sim-maj-pied { display: flex; align-items: center; gap: 8px; }

/* Client et gérant côte à côte dans la case de deux colonnes (12/10/2026). */
#ticket-modal .client-gerant { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
#ticket-modal .client-gerant label .hint { font-weight: 400; margin-left: 4px; }

/* =========================================================================
   FICHE CLIENT - refonte du 15/10/2026
   -------------------------------------------------------------------------
   Mélange de quatre maquettes choisi par l'utilisateur : en-tête « carte de
   visite », encarts de coordonnées, sections repliables, colonne de résumé.
   🔴 Tout est scopé à `.modale-client` et aux classes `clf-` : `.cl-*` sert
   déjà aux cartes de la page Clients, ne pas y toucher.
   ========================================================================= */
.modale-dense.modale-client { max-width: 980px; }

/* ---- en-tête carte de visite : le bandeau anthracite devient la carte ---- */
.modale-client .modal-head.clf-visite {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto auto;
  grid-template-rows: auto auto;
  column-gap: 14px;
  row-gap: 2px;
  align-items: center;
  padding: 11px 16px;
}
.clf-avatar {
  grid-row: 1 / span 2;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--accent); color: var(--chrome);
  display: grid; place-items: center;
  font-weight: 800; font-size: 16px; letter-spacing: .02em;
}
.clf-avatar .ico { width: 20px; height: 20px; }
.modale-client .clf-visite h2 {
  font-size: 17px; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.clf-puces { grid-row: 1 / span 2; display: flex; gap: 6px; align-items: center; }
.modale-client .clf-visite .modal-close { grid-row: 1 / span 2; }
.clf-sous { grid-column: 2; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 12.5px; color: #c9d2d8; min-width: 0; }
.clf-sous span { display: inline-flex; align-items: center; gap: 5px; }
.clf-sous .ico { width: 13px; height: 13px; }
.clf-sous .clf-a-faire { color: #ffb4b4; }
.clf-puce {
  display: inline-flex; align-items: center;
  font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2px 9px;
  background: var(--chrome-clair); color: var(--chrome-texte); white-space: nowrap;
}
.clf-puce.clf-ok { background: var(--vert); color: var(--vert-texte); }
.clf-puce.clf-ko { background: var(--rouge-clair); color: #8a1f1f; }
/* Sur l'anthracite, les puces s'éclaircissent. */
.clf-visite .clf-puce { background: rgba(255, 255, 255, .13); color: #fff; }
.clf-visite .clf-puce.clf-ok { background: #2f5a35; color: #d7f5d0; }
.clf-visite .clf-puce.clf-ko { background: #6b2525; color: #ffd9d9; }

/* ---- corps : formulaire + colonne de résumé ---- */
.clf-corps { display: grid; grid-template-columns: minmax(0, 1fr) 236px; gap: 14px; align-items: start; }
.clf-gauche { display: flex; flex-direction: column; gap: 10px; min-width: 0; }

/* ---- Historique des appels du client (23/10/2026) ----
   Il prend la place du formulaire (masqué, pas retiré : la saisie survit).
   Chaque appel est un TICKET : souche à la teinte pleine du statut, ligne
   de perforation à encoches, puis le détail. Teintes de statut reprises des
   repères métier (jaune nouveau, bleu en cours, vert résolu). */
.clf-gauche.en-historique > #client-form,
.clf-gauche.en-historique > #client-error { display: none; }
#btn-cl-historique { margin-top: 8px; width: 100%; }
.clh-barre { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.clh-filtres { display: flex; gap: 6px; }
.clh-filtres .chip { padding: 4px 12px; font-size: 12px; }
.clh-compte { margin-left: auto; font-size: 12px; color: var(--gris-doux); }
.clh-liste {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius);
  background: var(--fond);
  max-height: 62vh;
  overflow-y: auto;
}
.clh-ticket {
  --clh-souche: #e0c94a;
  --clh-souche-texte: #3d2f00;
  position: relative;
  display: flex;
  min-height: 112px;
  border-radius: 8px;
  background: var(--blanc);
  box-shadow: 0 1px 3px rgba(20, 40, 60, .16);
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}
.clh-ticket.st-en_cours { --clh-souche: #1f5f8b; --clh-souche-texte: #fff; }
.clh-ticket.st-resolu { --clh-souche: #2e7d32; --clh-souche-texte: #fff; }
.clh-ticket:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(20, 40, 60, .2); }
.clh-ticket:focus-visible { outline: 2px solid var(--chrome); outline-offset: 2px; }
.clh-souche {
  flex: 0 0 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 8px 4px;
  border-radius: 8px 0 0 8px;
  background: var(--clh-souche);
  color: var(--clh-souche-texte);
}
.clh-souche small { font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
.clh-souche b { font-size: 22px; line-height: 1; font-variant-numeric: tabular-nums; }
.clh-souche span { font-size: 11px; font-variant-numeric: tabular-nums; }
/* La perforation : un pointillé, et deux encoches qui « mordent » le ticket
   en haut et en bas, de la couleur du fond de la liste. */
.clh-perfo { position: relative; width: 0; margin: 10px 0; border-left: 2px dashed var(--bordure); }
.clh-perfo::before,
.clh-perfo::after {
  content: "";
  position: absolute;
  left: -9px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--fond);
}
.clh-perfo::before { top: -19px; }
.clh-perfo::after { bottom: -19px; }
.clh-corps { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; }
.clh-motif {
  font-weight: 700;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.clh-ligne { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.clh-ligne .tech-badge { margin: 0; font-size: 11px; padding: 1px 6px; }
.clh-ligne .flag { font-size: 10.5px; padding: 1px 6px; }
.clh-sans { font-size: 11.5px; font-style: italic; color: var(--gris-doux); }
.clh-pied {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding-top: 6px;
  border-top: 1px dotted var(--bordure);
  font-size: 11px;
  color: var(--gris-doux);
}
.clh-ouvrir { margin-left: auto; font-weight: 600; color: var(--chrome-texte); }
@media (prefers-reduced-motion: reduce) { .clh-ticket { transition: none; } .clh-ticket:hover { transform: none; } }
#client-form { display: flex; flex-direction: column; gap: 10px; }

/* ---- encarts de coordonnées : de vrais champs, en gros ---- */
.clf-tuiles { display: grid; grid-template-columns: 1fr 1fr 1.25fr; gap: 10px; }
.clf-tuile {
  border: 1px solid var(--bordure); border-radius: 8px; padding: 8px 10px 6px;
  display: flex; flex-direction: column; gap: 3px; cursor: text; min-width: 0;
  transition: border-color .12s;
}
.clf-tuile:hover { border-color: #9aa5ad; }
.clf-tuile:focus-within { border-color: var(--chrome); box-shadow: 0 0 0 1px var(--chrome); }
.clf-tuile.manque { border-color: var(--rouge); background: #fffafa; }
.clf-t {
  display: flex; align-items: center; gap: 6px;
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--gris-doux);
}
.clf-t .ico { width: 14px; height: 14px; }
.clf-v { display: flex; align-items: center; gap: 4px; min-width: 0; }
.clf-v input {
  flex: 1 1 auto; min-width: 0; border: 0; outline: 0; background: none; padding: 1px 0;
  font: inherit; font-size: 17px; font-weight: 700; color: var(--gris-texte);
  font-variant-numeric: tabular-nums;
}
.clf-tuile-mail .clf-v input { font-size: 13.5px; font-weight: 600; }
.clf-v input::placeholder { font-size: 13px; font-weight: 500; color: #9aa5ad; }
.clf-copie {
  flex: 0 0 auto; border: 0; background: none; cursor: pointer; padding: 3px; border-radius: 4px;
  color: var(--gris-doux); display: inline-flex; opacity: 0; transition: opacity .12s;
}
.clf-tuile:hover .clf-copie, .clf-copie:focus-visible { opacity: 1; }
.clf-copie:hover { background: var(--chrome-clair); color: var(--chrome-texte); }
.clf-copie .ico { width: 15px; height: 15px; }

/* ---- sections repliables ---- */
.clf-sec { border: 1px solid var(--bordure); border-radius: 7px; overflow: hidden; }
.clf-sec > summary {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px; cursor: pointer;
  font-weight: 700; font-size: 13px; background: #f7f9fa; list-style: none; user-select: none;
}
.clf-sec > summary::-webkit-details-marker { display: none; }
.clf-sec > summary::after {
  content: ""; width: 7px; height: 7px; margin-left: 6px; flex: 0 0 auto;
  border-right: 2px solid var(--gris-doux); border-bottom: 2px solid var(--gris-doux);
  transform: rotate(-45deg); transition: transform .12s;
}
.clf-sec[open] > summary::after { transform: rotate(45deg); }
.clf-sec > summary:focus-visible { outline: 2px solid var(--chrome); outline-offset: -2px; }
.clf-sec > summary .ico { width: 16px; height: 16px; color: var(--chrome-texte); }
.clf-resume {
  flex: 1 1 auto; min-width: 0; color: var(--gris-doux); font-weight: 400; font-size: 12px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.clf-sec[open] .clf-resume { visibility: hidden; }
.clf-etat { flex: 0 0 auto; }
.clf-sec[open] > summary { border-bottom: 1px solid var(--bordure); }
.clf-sec-corps { padding: 10px 12px; display: flex; flex-direction: column; gap: 10px; }
.modale-client .clf-sec-corps.form-grid.grille3 { display: grid; }
.clf-grille-adresse { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1.4fr); gap: var(--gap-champ); }

/* ---- colonne de résumé ---- */
.clf-lat {
  background: var(--chrome-clair); border-radius: 8px; padding: 10px;
  display: flex; flex-direction: column; gap: 10px; min-width: 0;
}
.modale-dense .clf-lat .clf-contrat { align-self: stretch; height: auto; min-height: 36px; justify-content: flex-start; }
.clf-lat .clf-contrat .contrat-etat { margin-left: auto; }
.clf-vide { margin: 0; font-size: 12px; color: var(--gris-doux); background: var(--blanc); border-radius: 6px; padding: 8px 9px; line-height: 1.45; }
.clf-bloc { display: flex; flex-direction: column; gap: 6px; }
.clf-bloc h5 {
  margin: 0; display: flex; align-items: center; gap: 5px;
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--gris-doux);
}
.clf-bloc h5 .ico { width: 13px; height: 13px; }
.clf-bloc .muted { margin: 0; font-size: 12px; }
.clf-lat .ligne-appel, .clf-licence, .clf-item {
  background: var(--blanc); border-radius: 6px; padding: 6px 8px; font-size: 12px;
  display: flex; flex-direction: column; gap: 3px; border: 1px solid transparent;
}
.clf-lat .ligne-appel, .clf-licence { cursor: pointer; }
.clf-lat .ligne-appel:hover, .clf-licence:hover { border-color: var(--chrome); }
.clf-l1 { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.clf-l1 b { font-variant-numeric: tabular-nums; }
.clf-lat .ligne-appel .clf-l1 .badge-statut, .clf-licence .clf-l1 .tech-badge { margin-left: auto; }
.clf-l2 { color: var(--gris-texte); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.clf-l3 { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; color: var(--gris-doux); }
.clf-bloc .btn { align-self: flex-start; }

@media (max-width: 900px) {
  .clf-corps { grid-template-columns: 1fr; }
  .clf-tuiles { grid-template-columns: 1fr 1fr; }
}
/* Placement explicite : le placement automatique de la grille mettait les puces
   à la place du nom (mesuré dans le navigateur le 15/10/2026). */
.modale-client .clf-visite > .clf-avatar { grid-column: 1; grid-row: 1 / span 2; }
.modale-client .clf-visite > h2 { grid-column: 2; grid-row: 1; justify-self: start; max-width: 100%; }
.modale-client .clf-visite > .clf-puces { grid-column: 3; grid-row: 1 / span 2; }
.modale-client .clf-visite > .modal-close { grid-column: 4; grid-row: 1 / span 2; }
.modale-client .clf-visite > .clf-sous { grid-column: 2; grid-row: 2; }

/* =========================================================================
   CARTES DE LA PAGE CLIENTS - « 2 + 3, raccourci E » (15/10/2026)
   -------------------------------------------------------------------------
   Initiales anthracite et vert-jaune (comme l'en-tête de la fiche), nom et
   gérant, ville et puces, numéros dans deux tuiles copiables, et un raccourci
   « Nouvel appel » qui n'apparaît qu'au survol ou au focus clavier (variante E,
   choisie par l'utilisateur en connaissant la limite : invisible au doigt).
   Classes `clc-` ; `.cl-carte`, `.cl-nom`, `.cl-pied`, `.cl-encours` gardés.
   ========================================================================= */
.cl-carte.clc { gap: 8px; }
.clc-tete { display: flex; align-items: center; gap: 10px; }
.clc-av {
  width: 34px; height: 34px; border-radius: 50%; flex: 0 0 auto;
  background: var(--chrome); color: var(--accent);
  display: grid; place-items: center; font-weight: 800; font-size: 12.5px; letter-spacing: .02em;
}
.clc-id { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.clc .cl-nom { font-size: 13.5px; font-weight: 700; }
.clc-ger { display: flex; align-items: center; gap: 4px; font-size: 12px; color: #4b555d; min-width: 0; }
.clc-ger .ico, .clc-lieu .ico { width: 13px; height: 13px; flex: 0 0 auto; color: var(--gris-doux); }
.clc-ger.clc-a-faire { color: #b23a3a; font-style: italic; }
.clc-ger.clc-sans { color: var(--gris-doux); }
.clc-appel {
  width: 30px; height: 30px; border-radius: 50%; flex: 0 0 auto; border: 0; cursor: pointer;
  background: var(--chrome); color: var(--accent); display: grid; place-items: center;
  opacity: 0; transition: opacity .12s, transform .12s;
}
.clc-appel .ico { width: 16px; height: 16px; }
.cl-carte.clc:hover .clc-appel, .cl-carte.clc:focus-within .clc-appel { opacity: 1; }
.clc-appel:hover { transform: scale(1.08); }
.clc-appel:focus-visible { opacity: 1; outline: 2px solid var(--chrome); outline-offset: 2px; }
.clc-ligne { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 6px; }
.clc-lieu { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: #4b555d; margin-right: 2px; }
.clc-puce {
  font-size: 10.5px; font-weight: 700; border-radius: 999px; padding: 1px 7px;
  background: var(--chrome-clair); color: var(--chrome-texte);
}
.clc-tuiles { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.clc-tuile { border: 1px solid var(--bordure); border-radius: 6px; padding: 5px 7px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.clc-tuile.clc-manque { border-color: var(--rouge); background: #fffafa; }
.clc-lb {
  display: flex; align-items: center; gap: 4px;
  font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--gris-doux);
}
.clc-lb .ico { width: 12px; height: 12px; }
.clc-num { display: flex; align-items: center; gap: 4px; font-weight: 700; font-size: 12.5px; font-variant-numeric: tabular-nums; white-space: nowrap; min-width: 0; }
.clc-vide { font-weight: 400; font-size: 11.5px; color: var(--gris-doux); }
.clc-copie {
  margin-left: auto; border: 0; background: none; padding: 2px; border-radius: 4px; cursor: pointer;
  color: var(--gris-doux); display: inline-flex; opacity: 0; transition: opacity .12s;
}
.clc-copie .ico { width: 13px; height: 13px; }
.cl-carte.clc:hover .clc-copie, .clc-copie:focus-visible, .clc-copie.copie { opacity: 1; }
.clc-copie:hover { background: var(--chrome-clair); color: var(--chrome-texte); }

/* ---- Environnement de test (15/10/2026) ----
   Posé par marquerEnvironnement() quand /api/version dit « test ». Cadre rouge
   sur tout l'écran et étiquette en haut au centre ; au-dessus de tout, fenêtres
   comprises, mais sans jamais intercepter un clic. Absent en production. */
.env-test {
  position: fixed;
  inset: 0;
  z-index: 10000;
  pointer-events: none;
  border: 4px solid var(--rouge);
}
.env-test span {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  background: var(--rouge);
  color: #fff;
  font-weight: 800;
  font-size: 11px;
  letter-spacing: .12em;
  padding: 2px 14px 4px;
  border-radius: 0 0 8px 8px;
}

/* =========================================================================
   TCHAT (15/10/2026) - maquettes validées : bouton A, panneau D,
   conversation E, saisie A, mention E + B, signalement C, modération A+C+E,
   groupes, charte B. Tout est préfixé `tchat-` / `t-` : rien ne touche les
   autres écrans.
   🔴 z-index : bouton, panneau et carte de mention passent AU-DESSUS des
   fenêtres de saisie (100 et 200) - décision de l'utilisateur : on répond
   sans fermer une fiche d'appel ouverte. La modération, plein écran, au-dessus.
   ========================================================================= */
.tchat-btn {
  position: fixed; right: 18px; bottom: calc(46px + 12px + 40px + 10px); z-index: 260;
  width: 40px; height: 40px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--chrome); color: var(--accent); display: grid; place-items: center;
  box-shadow: 0 4px 14px rgba(20, 40, 60, .3);
}
.tchat-btn:hover { background: var(--chrome-fonce); }
.tchat-btn .ico { width: 20px; height: 20px; }
.tchat-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tchat-pastille {
  position: absolute; top: -5px; right: -6px; min-width: 19px; height: 19px; padding: 0 5px;
  border-radius: 999px; background: var(--bleu); color: #fff; font-size: 10.5px; font-weight: 700;
  display: grid; place-items: center; border: 2px solid #fff;
}
.tchat-pastille.t-at { background: var(--accent); color: var(--chrome); border-color: var(--chrome); }
@keyframes tchat-onde { 0% { box-shadow: 0 0 0 0 rgba(218,254,10,.75); } 100% { box-shadow: 0 0 0 16px rgba(218,254,10,0); } }
/* Comme l'onde de la cloche : jouée même si le système limite les animations
   (effets Windows coupés sur le serveur), c'est un signal. */
.tchat-btn.onde { animation: tchat-onde 1.6s ease-out infinite; }

/* ---- panneau (D) : fenêtre flottante au-dessus du bouton ---- */
.tchat-panneau {
  position: fixed; right: 18px; bottom: calc(46px + 12px + 40px + 10px + 50px); z-index: 260;
  width: 370px; height: min(560px, calc(100vh - 230px)); min-height: 340px;
  background: var(--blanc); border-radius: 10px; box-shadow: 0 16px 44px rgba(0, 0, 0, .3);
  display: flex; flex-direction: column; overflow: hidden; font-size: 13px;
}
.t-tete { display: flex; align-items: center; gap: 9px; padding: 9px 10px 9px 12px; background: var(--chrome); color: #fff; border-bottom: 3px solid var(--accent); flex: 0 0 auto; }
.t-tete-ico { color: var(--accent); display: grid; }
.t-tete-ico .ico { width: 18px; height: 18px; }
.t-tete-txt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.t-tete-txt b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-tete-txt span { font-size: 11px; color: #c9d2d8; }
.t-ib { position: relative; width: 30px; height: 30px; flex: 0 0 auto; border: none; border-radius: 7px; background: transparent; color: inherit; cursor: pointer; display: grid; place-items: center; font-size: 18px; line-height: 1; }
.t-tete .t-ib { color: #c9d2d8; }
.t-tete .t-ib:hover { background: rgba(255,255,255,.12); color: #fff; }
.t-ib .ico { width: 16px; height: 16px; }
.t-ib:focus-visible, .t-item:focus-visible, .t-filtre:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.t-ib-pas { position: absolute; top: -2px; right: -2px; min-width: 15px; height: 15px; border-radius: 999px; background: var(--rouge); color: #fff; font-size: 9.5px; font-style: normal; font-weight: 700; display: grid; place-items: center; padding: 0 3px; }
.t-outils { display: flex; gap: 6px; padding: 8px 10px; border-bottom: 1px solid var(--bordure); align-items: center; flex: 0 0 auto; }
.t-filtre { width: 30px; height: 30px; border-radius: 7px; border: none; background: var(--chrome-clair); color: var(--gris-texte); cursor: pointer; display: grid; place-items: center; flex: 0 0 auto; }
.t-filtre.on { background: var(--chrome); color: var(--accent); }
.t-filtre .ico { width: 15px; height: 15px; }
.t-recherche { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 6px; border: 1px solid var(--bordure); border-radius: 7px; padding: 0 8px; color: var(--gris-doux); }
.t-recherche input { border: 0; outline: 0; min-width: 0; width: 100%; padding: 6px 0; font: inherit; background: none; }
.t-recherche .ico { width: 14px; height: 14px; }
.t-en-ligne { display: flex; align-items: center; gap: 6px; padding: 6px 10px; background: #f7f9fa; border-bottom: 1px solid var(--bordure); flex: 0 0 auto; overflow: hidden; }
.t-en-ligne > span { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--gris-doux); margin-right: 2px; }
.t-en-ligne .ico { width: 12px; height: 12px; }
.t-av-btn { border: none; background: none; padding: 0; cursor: pointer; border-radius: 50%; }
.t-liste { flex: 1 1 auto; overflow-y: auto; min-height: 0; }
.t-item { width: 100%; display: flex; gap: 9px; align-items: center; padding: 8px 12px; border: none; border-bottom: 1px solid #eef0f2; background: var(--blanc); cursor: pointer; text-align: left; font: inherit; color: inherit; }
.t-item:hover { background: var(--chrome-clair); }
.t-item.sel { background: var(--bleu-clair); }
.t-item.t-statique { cursor: default; }
.t-item.t-statique:hover { background: var(--blanc); }
.t-item-c { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.t-item-c b { font-size: 12.5px; display: flex; align-items: center; gap: 4px; }
.t-item-c > span { color: var(--gris-doux); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-item.nl .t-item-c b, .t-item.nl .t-item-c > span { color: var(--gris-texte); font-weight: 700; }
.t-item-d { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; font-size: 10.5px; color: var(--gris-doux); flex: 0 0 auto; }
.t-pas { min-width: 18px; height: 18px; border-radius: 999px; background: var(--bleu); color: #fff; font-size: 10.5px; font-weight: 700; font-style: normal; display: grid; place-items: center; padding: 0 5px; }
.t-pas.t-at { background: var(--accent); color: var(--chrome); }
.t-muet { color: var(--gris-doux); display: inline-grid; }
.t-muet .ico { width: 12px; height: 12px; }
.t-av { width: 32px; height: 32px; border-radius: 50%; background: var(--chrome); color: var(--accent); display: grid; place-items: center; font-weight: 800; font-size: 11px; flex: 0 0 auto; position: relative; }
.t-av.sm { width: 26px; height: 26px; font-size: 9.5px; }
.t-av-grp { background: var(--chrome-clair); color: var(--chrome-texte); border-radius: 8px; }
.t-av-grp .ico, .t-av-outil .ico { width: 16px; height: 16px; }
.t-av-outil { background: var(--chrome-clair); color: var(--gris-doux); }
.t-tete .t-av-grp { background: rgba(255,255,255,.14); color: var(--accent); }
.t-on { position: absolute; right: -1px; bottom: -1px; width: 10px; height: 10px; border-radius: 50%; background: #2fb344; border: 2px solid #fff; }
.t-vide { color: var(--gris-doux); text-align: center; padding: 22px 14px; margin: 0; font-size: 12.5px; }
.t-coupe { display: flex; gap: 8px; align-items: flex-start; margin: 8px 10px; padding: 8px 10px; border-radius: 8px; background: var(--rouge-clair); color: #8a1f1f; font-size: 12px; }
.t-coupe .ico { width: 16px; height: 16px; flex: 0 0 auto; }

/* ---- conversation (E) ---- */
.t-fil { position: relative; flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 10px 12px; background: #f7f9fa; display: flex; flex-direction: column; gap: 6px; }
.t-jour { align-self: center; font-size: 10.5px; color: var(--gris-doux); background: var(--chrome-clair); border-radius: 999px; padding: 1px 10px; margin: 4px 0; }
.t-msg { display: flex; align-items: flex-start; gap: 4px; max-width: 86%; position: relative; }
.t-msg.lui { align-self: flex-start; flex-direction: row-reverse; }
.t-msg.moi { align-self: flex-end; }
.t-bulle { padding: 7px 10px; border-radius: 12px; line-height: 1.4; min-width: 0; overflow-wrap: anywhere; }
.t-msg.lui .t-bulle { background: var(--blanc); border: 1px solid var(--bordure); border-bottom-left-radius: 4px; }
.t-msg.moi .t-bulle { background: var(--chrome); color: #fff; border-bottom-right-radius: 4px; }
.t-auteur { display: block; font-size: 10.5px; color: var(--gris-doux); }
.t-meta { display: block; font-size: 10px; color: var(--gris-doux); margin-top: 2px; text-align: right; }
.t-msg.moi .t-meta { color: #aeb8bf; }
.t-efface { color: var(--gris-doux); }
.t-msg.moi .t-efface { color: #aeb8bf; }
.t-lien-appel { color: var(--bleu); font-weight: 700; }
.t-msg.moi .t-lien-appel { color: var(--accent); }
.t-mention { background: rgba(218,254,10,.35); border-radius: 3px; padding: 0 2px; }
.t-msg.moi .t-mention { background: rgba(218,254,10,.25); color: var(--accent); }
.t-cite { border-left: 3px solid var(--bordure); padding: 2px 7px; margin-bottom: 4px; font-size: 11.5px; color: var(--gris-doux); background: rgba(0,0,0,.03); border-radius: 0 5px 5px 0; }
.t-msg.moi .t-cite { color: #c9d2d8; border-left-color: var(--accent); background: rgba(255,255,255,.07); }
.t-menu-btn { border: none; background: none; cursor: pointer; color: var(--gris-doux); padding: 4px; border-radius: 6px; opacity: 0; align-self: center; }
.t-msg:hover .t-menu-btn, .t-menu-btn:focus-visible { opacity: 1; }
.t-menu-btn:hover { background: var(--chrome-clair); }
.t-menu-btn .ico { width: 16px; height: 16px; }
.t-menu { position: absolute; top: 26px; z-index: 5; background: var(--blanc); border: 1px solid var(--bordure); border-radius: 8px; box-shadow: 0 8px 22px rgba(0,0,0,.16); padding: 4px 0; min-width: 150px; }
.t-msg.moi .t-menu { right: 0; }
.t-msg.lui .t-menu { left: 0; }
.t-menu button { width: 100%; display: flex; gap: 8px; align-items: center; padding: 7px 12px; border: none; background: none; font: inherit; font-size: 12.5px; color: var(--gris-texte); cursor: pointer; text-align: left; }
.t-menu button:hover { background: var(--chrome-clair); }
.t-menu button.danger { color: var(--rouge); }
.t-menu .ico { width: 15px; height: 15px; }
.t-systeme { align-self: stretch; display: flex; gap: 8px; align-items: flex-start; background: #ffeacf; border: 1px solid #f2c58d; border-radius: 8px; padding: 7px 10px; font-size: 11.5px; color: #6b4300; }
.t-systeme .ico { width: 15px; height: 15px; flex: 0 0 auto; color: #9a5a00; }
.t-vu { align-self: flex-end; display: flex; align-items: center; gap: 3px; font-size: 10.5px; color: var(--gris-doux); }
.t-vu .ico { width: 13px; height: 13px; color: var(--bleu); }
.t-photo { position: relative; width: 180px; min-height: 60px; border-radius: 8px; overflow: hidden; background: var(--chrome-clair); margin-bottom: 4px; }
.t-photo img { display: block; width: 100%; max-height: 180px; object-fit: cover; }
.t-dl { position: absolute; right: 6px; bottom: 6px; display: flex; gap: 4px; align-items: center; border: none; border-radius: 6px; padding: 3px 7px; background: rgba(27,34,40,.82); color: #fff; font: inherit; font-size: 10.5px; cursor: pointer; }
.t-dl .ico { width: 12px; height: 12px; }
.t-fichier { display: flex; gap: 8px; align-items: center; border: 1px solid var(--bordure); border-radius: 8px; background: var(--blanc); color: var(--gris-texte); padding: 6px 8px; margin-bottom: 4px; cursor: pointer; font: inherit; font-size: 12px; text-align: left; max-width: 240px; }
.t-fichier span { display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.t-fichier small { color: var(--gris-doux); }
.t-fichier .ico { width: 16px; height: 16px; flex: 0 0 auto; }
.t-depot { position: absolute; inset: 8px; border: 2px dashed var(--chrome); border-radius: 10px; background: rgba(218,254,10,.22); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; z-index: 4; }
.t-depot span { font-size: 11px; color: var(--gris-doux); }
.t-depot .ico { width: 28px; height: 28px; }

/* ---- saisie (A) ---- */
.t-banniere { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: var(--bleu-clair); color: var(--bleu-fonce); font-size: 12px; flex: 0 0 auto; }
.t-banniere span { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-banniere .ico { width: 14px; height: 14px; flex: 0 0 auto; }
.t-attente { display: flex; flex-wrap: wrap; gap: 6px; padding: 7px 10px 0; flex: 0 0 auto; border-top: 1px solid var(--bordure); }
.t-puce-fichier { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--bordure); border-radius: 7px; padding: 4px 4px 4px 8px; font-size: 11px; max-width: 100%; }
.t-puce-fichier .ico { width: 13px; height: 13px; }
.t-puce-fichier button { border: none; background: var(--chrome); color: #fff; border-radius: 50%; width: 16px; height: 16px; font-size: 11px; line-height: 1; cursor: pointer; }
.t-saisie { position: relative; display: flex; align-items: flex-end; gap: 4px; padding: 8px; border-top: 1px solid var(--bordure); background: var(--blanc); flex: 0 0 auto; }
.t-attente + .t-saisie { border-top: 0; }
.t-saisie .t-ib { color: var(--gris); }
.t-saisie .t-ib:hover { background: var(--chrome-clair); color: var(--chrome-texte); }
.t-saisie textarea { flex: 1 1 auto; min-width: 0; resize: none; border: 1px solid var(--bordure); border-radius: 16px; padding: 7px 12px; font: inherit; line-height: 1.35; max-height: 110px; }
.t-saisie textarea:focus { outline: none; border-color: var(--chrome); }
.t-envoyer { width: 34px; height: 34px; flex: 0 0 auto; border-radius: 50%; border: none; background: var(--chrome); color: var(--accent); display: grid; place-items: center; cursor: pointer; }
.t-envoyer .ico { width: 16px; height: 16px; }
.t-suggestions { position: absolute; left: 8px; right: 8px; bottom: calc(100% + 4px); background: var(--blanc); border: 1px solid var(--bordure); border-radius: 8px; box-shadow: 0 8px 22px rgba(0,0,0,.16); padding: 4px 0; max-height: 220px; overflow-y: auto; z-index: 6; }
.t-sug { display: flex; gap: 8px; align-items: center; padding: 6px 10px; cursor: pointer; font-size: 12.5px; }
.t-sug.on, .t-sug:hover { background: var(--chrome-clair); }
.t-sug-appel span { display: flex; flex-direction: column; min-width: 0; }
.t-sug-appel small { color: var(--gris-doux); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-sug .ico { width: 14px; height: 14px; flex: 0 0 auto; color: var(--bleu); }

/* ---- vues secondaires : charte (B), groupes, signalement (C), suivi ---- */
.t-corps { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.t-charte-point { display: flex; gap: 10px; border: 1px solid var(--bordure); border-radius: 8px; padding: 9px 10px; }
.t-charte-point > div { display: flex; flex-direction: column; gap: 2px; }
.t-charte-point span:not(.t-rond) { font-size: 11.5px; color: var(--gris-doux); line-height: 1.4; }
.t-rond { width: 32px; height: 32px; border-radius: 50%; background: var(--chrome); color: var(--accent); display: grid; place-items: center; flex: 0 0 auto; }
.t-rond .ico { width: 16px; height: 16px; }
.t-note { margin: 0; font-size: 11.5px; color: var(--gris-doux); line-height: 1.45; }
.t-note .ico { width: 12px; height: 12px; vertical-align: -2px; }
.t-champ { display: flex; flex-direction: column; gap: 4px; font-size: 11px; font-weight: 700; color: #3f4a52; }
.t-champ input, .t-champ textarea { font: inherit; font-weight: 400; font-size: 13px; border: 1px solid var(--bordure); border-radius: 6px; padding: 6px 9px; resize: vertical; }
.t-pastilles { display: flex; flex-wrap: wrap; gap: 6px; }
.t-large { align-self: flex-start; }
.t-actions-fiche { display: flex; flex-wrap: wrap; gap: 6px; }
.t-etapes { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.t-etapes > i { flex: 1 1 10px; height: 2px; background: var(--bordure); }
.t-etape { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 700; border-radius: 999px; padding: 2px 8px; background: var(--chrome-clair); color: var(--gris-texte); }
.t-etape.on { background: var(--chrome); color: var(--accent); }
.t-etape.ok { background: var(--vert); color: var(--vert-texte); }
.t-etape .ico { width: 11px; height: 11px; }
.t-motifs { display: flex; flex-wrap: wrap; gap: 6px; }
.t-motif { border: 1px solid var(--bordure); border-radius: 999px; background: var(--blanc); padding: 4px 11px; font: inherit; font-size: 12px; cursor: pointer; }
.t-motif.on { background: var(--chrome); color: #fff; border-color: var(--chrome); }
.t-accord { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; font-weight: 600; }
.t-boutons { display: flex; justify-content: space-between; gap: 8px; margin-top: auto; }
.t-suivi { border: 1px solid var(--bordure); border-radius: 8px; padding: 9px 10px; display: flex; flex-direction: column; gap: 6px; }
.t-suivi-tete { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; }
.t-suivi-tete span { color: var(--gris-doux); font-size: 11px; }

/* ---- carte de mention (B) ---- */
.tchat-mention {
  position: fixed; right: 18px; bottom: calc(46px + 12px + 40px + 10px + 50px); z-index: 261;
  width: 280px; background: var(--blanc); border: 2px solid var(--accent); border-radius: 10px;
  box-shadow: 0 14px 40px rgba(0,0,0,.3); overflow: hidden; animation: tchat-onde 1.6s ease-out 3;
}
.tm-tete { display: flex; align-items: center; gap: 7px; background: var(--chrome); color: #fff; padding: 7px 10px; font-weight: 700; font-size: 12.5px; }
.tm-tete .ico { width: 15px; height: 15px; color: var(--accent); }
.tm-tete span { flex: 1 1 auto; }
.tm-x { border: none; background: none; color: #aeb8bf; font-size: 18px; cursor: pointer; }
.tm-corps { display: flex; gap: 8px; padding: 10px 11px 6px; font-size: 12.5px; line-height: 1.4; overflow-wrap: anywhere; }
.tm-actions { display: flex; gap: 6px; padding: 4px 11px 11px; }
.tm-actions .ico { width: 13px; height: 13px; }

/* ---- modération (A + C + E) ---- */
.tchat-moderation { position: fixed; inset: 0; z-index: 300; background: rgba(27,34,40,.45); display: grid; place-items: center; padding: 20px; }
.t-mod-fenetre { width: min(1080px, 100%); height: min(680px, 100%); background: var(--blanc); border-radius: 10px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 16px 44px rgba(0,0,0,.35); }
.t-mod-fenetre > .t-tete > .ico { width: 18px; height: 18px; color: var(--accent); }
.t-mod-onglets { display: flex; gap: 2px; border-bottom: 1px solid var(--bordure); padding: 0 10px; flex: 0 0 auto; }
.t-mod-onglet { display: inline-flex; gap: 6px; align-items: center; border: none; background: none; padding: 8px 12px; font: inherit; font-weight: 700; font-size: 12.5px; color: var(--gris-doux); border-bottom: 3px solid transparent; cursor: pointer; }
.t-mod-onglet.on { color: var(--chrome-texte); border-bottom-color: var(--chrome); }
.t-mod-onglet .ico { width: 14px; height: 14px; }
.t-mod-corps { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.t-mod-deux { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: 300px 1fr; }
.t-mod-liste { border-right: 1px solid var(--bordure); overflow-y: auto; }
.t-mod-detail { display: flex; flex-direction: column; min-height: 0; }
.t-mod-detail-tete { padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; border-bottom: 1px solid var(--bordure); }
.t-mod-detail-tete span { color: var(--gris-doux); font-size: 12px; }
.t-mod-passage { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.t-mod-msg { border: 1px solid var(--bordure); border-radius: 8px; padding: 7px 10px; font-size: 12.5px; line-height: 1.4; }
.t-mod-msg.signale { outline: 2px solid var(--rouge); outline-offset: 1px; }
.t-mod-msg-tete { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 11.5px; margin-bottom: 3px; }
.t-mod-msg-tete span { color: var(--gris-doux); }
.t-mod-msg-tete .btn { margin-left: auto; }
.t-version { margin-top: 4px; font-size: 11.5px; color: var(--gris-doux); border-left: 3px solid var(--bordure); padding-left: 7px; }
.t-journal { display: flex; gap: 10px; font-size: 12px; border-bottom: 1px solid #eef0f2; padding: 5px 0; }
.t-journal span { color: var(--gris-doux); width: 110px; flex: 0 0 auto; }
.t-mod-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 9px 12px; border-top: 1px solid var(--bordure); }
.t-mod-actions select, .t-corps select { font: inherit; border: 1px solid var(--bordure); border-radius: 6px; padding: 5px 8px; }
.t-mod-actions .btn:last-child { margin-left: auto; }
.t-mod-marque { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; flex: 0 0 auto; }
.t-mod-marque .ico { width: 15px; height: 15px; }
.t-puce { display: inline-flex; font-size: 10.5px; font-weight: 700; font-style: normal; border-radius: 999px; padding: 1px 8px; background: var(--chrome-clair); color: var(--chrome-texte); }
.t-rouge { background: var(--rouge-clair); color: #8a1f1f; }
.t-bleu { background: var(--bleu-clair); color: var(--bleu-fonce); }
.t-vert { background: var(--vert); color: var(--vert-texte); }
.tchat-bascule { border: 1px solid var(--bordure); border-radius: 999px; background: var(--blanc); padding: 3px 12px; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; color: var(--gris-doux); }
.tchat-bascule.on { background: var(--chrome); color: var(--accent); border-color: var(--chrome); }

@media (max-width: 520px) {
  .tchat-panneau { right: 8px; left: 8px; width: auto; }
  .t-mod-deux { grid-template-columns: 1fr; }
}

/* Bloc « Tchat » de la fiche utilisateur (16/10/2026) */
#user-modal .us-tchat { border-top: 1px solid var(--bordure, #d8dde1); padding-top: 10px; margin-top: 2px; }
#user-modal .us-tchat-titre { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--gris-doux, #5b6670); margin-bottom: 6px; display: block; }
#user-modal .us-tchat .bascules { display: flex; flex-wrap: wrap; gap: 8px; }
#user-modal .us-tchat .bsc:has(input:disabled) { opacity: .5; }
.tchat-panneau .t-danger { color: var(--rouge, #d33f3f); }
.tchat-panneau .t-danger:hover { background: #fdeaea; }

/* Gestion des groupes du tchat (16/10/2026) */
.tchat-panneau .t-epingle, .tchat-moderation .t-epingle { display: flex; align-items: center; gap: 8px; padding: 7px 12px; background: var(--chrome-clair, #eef0f2); border-bottom: 1px solid var(--bordure, #d8dde1); font-size: 12.5px; color: var(--chrome, #1b2228); }
.t-epingle > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-epingle .ico { width: 15px; height: 15px; flex: 0 0 auto; }
.t-annonce { display: flex; align-items: center; gap: 8px; padding: 10px 12px; font-size: 12.5px; color: var(--gris-doux, #5b6670); background: var(--chrome-clair, #eef0f2); }
.t-annonce .ico { width: 16px; height: 16px; flex: 0 0 auto; }
.t-chef { align-self: flex-start; display: inline-flex; align-items: center; gap: 3px; margin-left: 6px; font-size: 11px; font-weight: 600; color: var(--chrome, #1b2228); background: #f5f9d0; border-radius: 999px; padding: 1px 7px; }
.t-chef .ico { width: 11px; height: 11px; }
.t-gestion { display: flex; flex-direction: column; gap: 10px; }
.t-reglage { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; font-size: 13px; }
.t-reglage input { margin-top: 3px; accent-color: var(--chrome, #1b2228); }
.t-reglage-txt { display: flex; flex-direction: column; }
.t-reglage-txt span { font-size: 12px; color: var(--gris-doux, #5b6670); }
.t-g-titre { display: flex; align-items: center; justify-content: space-between; }
.t-g-actions { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.t-g-actions .btn { padding: 3px 8px; font-size: 12px; }
.t-g-ajout { max-height: 180px; overflow-y: auto; border: 1px solid var(--bordure, #d8dde1); border-radius: 8px; }
.t-item.t-archive { opacity: .6; }
/* « Gestion du tchat » : le détail d'un groupe et l'onglet Comptes défilent
   (16/10/2026, signalé : pas d'ascenseur sur un groupe). */
#tchat-gestion .t-mod-deux { grid-template-rows: minmax(0, 1fr); }
#tchat-gestion .t-mod-detail { overflow-y: auto; }
#tchat-gestion .t-mod-detail > .t-gestion { padding: 12px; }
#tchat-gestion .t-mod-corps > .t-corps { overflow-y: auto; min-height: 0; flex: 1 1 auto; }

/* Liste du tchat en deux rubriques (17/10/2026) : messages privés, puis groupes */
.tchat-panneau .t-rubrique { display: flex; align-items: center; gap: 6px; width: 100%; padding: 8px 12px 5px; background: none; border: 0; cursor: pointer; font: 700 11px/1.2 inherit; letter-spacing: .06em; text-transform: uppercase; color: var(--gris-doux, #5b6670); text-align: left; }
.tchat-panneau .t-rubrique + .t-item, .tchat-panneau .t-rubrique + .t-vide { border-top: 0; }
.tchat-panneau .t-item + .t-rubrique, .tchat-panneau .t-vide + .t-rubrique { margin-top: 4px; border-top: 1px solid var(--bordure, #d8dde1); }
.tchat-panneau .t-rubrique .ico { width: 14px; height: 14px; }
.tchat-panneau .t-rubrique:hover { color: var(--chrome, #1b2228); }
.tchat-panneau .t-rubrique:focus-visible { outline: 2px solid var(--chrome, #1b2228); outline-offset: -2px; }
.tchat-panneau .t-rubrique-fl { margin-left: auto; display: inline-flex; transition: transform .15s; }
.tchat-panneau .t-rubrique.replie .t-rubrique-fl { transform: rotate(-90deg); }
.tchat-panneau .t-vide-sm { padding: 6px 12px 10px; font-size: 12px; }

/* « En train d'écrire » (17/10/2026) : trois points qui sautillent */
.tchat-panneau .t-ecrit .t-bulle { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; }
.t-points { display: inline-flex; gap: 4px; align-items: center; height: 10px; }
.t-points i { width: 6px; height: 6px; border-radius: 50%; background: var(--gris-doux, #5b6670); animation: t-saut 1.2s infinite ease-in-out; }
.t-points i:nth-child(2) { animation-delay: .15s; }
.t-points i:nth-child(3) { animation-delay: .3s; }
@keyframes t-saut { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-4px); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .t-points i { animation-duration: 2.4s; } }

/* ------------------- Application de bureau (18/10/2026) ------------------- */
/* Proposition 4 : bouton en bas de la colonne anthracite de la connexion.
   --accent (#dafe0a) sur l'anthracite seulement - jamais sur du clair. */
.login-bureau { margin-top: auto; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.login-bureau:not(.hidden) ~ .login-version { margin-top: 0; }
.login-bureau-btn {
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px;
  background: var(--accent);
  color: var(--chrome-texte);
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 700;
  text-align: center;
}
.login-bureau-btn .ico { width: 22px; height: 22px; stroke: currentColor; stroke-width: 1.8; }
.login-bureau-btn:hover { filter: brightness(0.94); }
.login-bureau-btn:focus-visible { outline: 2px solid var(--blanc); outline-offset: 2px; }
.login-bureau-version { color: #ced5d9; font-size: 11px; }
/* Sous 700 px la colonne devient un bandeau : pas de place, et un téléphone
   n'installe pas une application Windows. */
@media (max-width: 700px) { .login-bureau { display: none; } }

/* Proposition 7 : bannière d'annonce, centrée sous le bandeau. Habillage
   neutre (gris clair d'habillage), aucune couleur de statut. */
.bureau-banniere {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 14px;
  padding: 8px 16px;
  background: var(--chrome-clair);
  border-bottom: 1px solid #d6dbdf;
  color: var(--chrome-texte);
  font-size: 13px;
}
.bureau-banniere.hidden { display: none; }
.bureau-banniere .ico { width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.8; flex: 0 0 auto; }
.bureau-telecharger {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 14px;
  background: var(--chrome);
  color: var(--blanc);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
}
.bureau-telecharger:hover { background: var(--chrome-fonce); }
.bureau-plus-tard {
  height: 28px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: #3f4a52;
  font: inherit;
  font-size: 12px;
  text-decoration: underline;
  cursor: pointer;
}
.bureau-plus-tard:hover { color: var(--chrome-texte); }
/* ------------------------ Diapason (18/10/2026) ------------------------ */
/* Connexion A + bandeau A, retenus par l'utilisateur : le produit (Diapason)
   et le logo du CLIENT (InfoCaisse) cohabitent. Le symbole est un SVG au
   trait, comme les autres icônes : fourche en vert-jaune (sur anthracite
   SEULEMENT, 13,91:1), onde en blanc. Police : celle de l'outil, aucune
   ressource extérieure (pas de Google Fonts). */
.diapason-symbole { flex: 0 0 auto; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.diapason-symbole .fourche { stroke: var(--accent); stroke-width: 4; }
.diapason-symbole .onde { stroke: var(--blanc); stroke-width: 3; }

/* Bandeau : symbole + nom à la place de l'ancien logo. */
.topbar-logo { gap: 8px; }
.topbar-logo .diapason-symbole { width: 24px; height: 24px; }
/* Tous les logos Diapason se cliquent et jouent le son (20/10/2026) : la
   fourche vibre et l'onde pulse le temps que le son s'éteint. Joue même si le
   système limite les animations, comme la cloche. Pivots dans le repère du
   dessin (48 × 48) : le pied de la fourche, le centre de l'onde. */
.diapason-symbole, .diapason-tuile { cursor: pointer; }
.diapason-symbole.vibre .fourche, .diapason-tuile.vibre .fourche {
  animation: diapason-vibre 1.6s cubic-bezier(.2, .6, .3, 1) both;
}
.diapason-symbole.vibre .onde, .diapason-tuile.vibre .onde {
  animation: diapason-onde 1.6s ease-out both;
}
.diapason-symbole .fourche { transform-origin: 22px 42px; }
.diapason-symbole .onde { transform-origin: 22px 19px; }
.diapason-tuile .fourche { transform-origin: 22px 39px; }
.diapason-tuile .onde { transform-origin: 22px 20px; }
@keyframes diapason-vibre {
  0%   { transform: rotate(0); }
  6%   { transform: rotate(-5deg); }
  12%  { transform: rotate(4.5deg); }
  18%  { transform: rotate(-4deg); }
  24%  { transform: rotate(3.4deg); }
  30%  { transform: rotate(-2.8deg); }
  38%  { transform: rotate(2.2deg); }
  46%  { transform: rotate(-1.6deg); }
  56%  { transform: rotate(1.1deg); }
  68%  { transform: rotate(-.6deg); }
  82%  { transform: rotate(.3deg); }
  100% { transform: rotate(0); }
}
@keyframes diapason-onde {
  0%, 100% { opacity: 1; transform: scale(1); }
  10% { opacity: .35; transform: scale(1.18); }
  25% { opacity: 1; transform: scale(1.08); }
  40% { opacity: .5; transform: scale(1.14); }
  60% { opacity: 1; transform: scale(1.04); }
}
.diapason-nom { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; color: var(--blanc); white-space: nowrap; }
/* Le logo du client, à droite, séparé de « Déconnexion » par un filet. */
.topbar-client { display: flex; align-items: center; padding-left: 14px; border-left: 1px solid rgba(255, 255, 255, .12); }
.topbar-client img { height: 18px; width: auto; display: block; }
/* Mesuré le 18/10/2026 avec « Vincent DEFOLIE (VD) », Ma journée et le menu
   Administration : 27 px de marge à 1 440 px ; à 1 366 px, le logo du client
   fait passer onglets et nom sur deux lignes (sans lui : 80 px de marge). On le
   masque donc sous 1 420 px : Diapason reste, l'outil reste sur une ligne. */
@media (max-width: 1419px) { .topbar-client { display: none; } }

/* ---- Client de bureau SANS FENÊTRE (22/10/2026) ---- voir app.js
   Le logo InfoCaisse réduit la fenêtre : il doit donc rester visible. Mesuré
   le 22/10/2026 à 1 366 px : 188 px de marge dans le bandeau (compte
   responsable, le plus large) pour les 126 px du logo. */
html.bureau-sans-fenetre .topbar-client { display: flex; cursor: pointer; }
html.bureau-sans-fenetre .topbar-client:hover { opacity: .8; }
html.bureau-sans-fenetre .topbar-client:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.bureau-actions { border-top: 1px solid var(--bordure); margin-top: 4px; padding-top: 4px; }
/* « Quitter Diapason » en bas à droite de l'écran de connexion. Dans l'écran
   de connexion, il disparaît avec lui une fois connecté. */
.login-quitter {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: var(--radius);
  background: rgba(14, 17, 20, .88);
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.login-quitter:hover { background: #c42b1c; border-color: #c42b1c; }
.login-quitter:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.login-quitter .ico { width: 18px; height: 18px; }
/* La bande de déplacement : au-dessus de tout (fenêtres 100/200, tchat 260),
   anthracite liseré de vert-jaune comme la bannière de version. Elle se saisit
   comme une barre de titre ; ses boutons, non. */
.bureau-bande {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 300;
  height: 34px;
  display: flex;
  align-items: stretch;
  padding-left: 16px;
  background: #0e1114;
  border-bottom: 2px solid var(--accent);
  color: #fff;
  font-size: 12.5px;
  user-select: none;
  app-region: drag;
  -webkit-app-region: drag;
}
.bureau-bande-texte { flex: 1; display: flex; align-items: center; opacity: .85; }
.bureau-bande-btn {
  width: 46px;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  app-region: no-drag;
  -webkit-app-region: no-drag;
}
.bureau-bande-btn:hover { background: rgba(255, 255, 255, .12); }
.bureau-bande-quitter:hover { background: #c42b1c; }
.bureau-bande-btn .ico { width: 16px; height: 16px; }
/* Connexion : sous-titre de colonne, titre de carte, signature. */
.login-titre-diapason { display: flex; align-items: center; gap: 10px; }
.diapason-tuile { width: 32px; height: 32px; flex: 0 0 auto; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.diapason-tuile rect { fill: var(--chrome); stroke: none; }
.diapason-tuile .fourche { stroke: var(--accent); stroke-width: 4; }
.diapason-tuile .onde { stroke: var(--blanc); stroke-width: 3; }
.login-signature {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid #333d44;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ced5d9;
  font-size: 11px;
}
.login-signature .diapason-symbole { width: 20px; height: 20px; }
.login-signature b { color: var(--blanc); }
.login-signature .login-version { margin: 0; color: #8c979f; font-size: 11px; }
.login-signature-l1 { display: block; }
.login-bureau:not(.hidden) ~ .login-signature { margin-top: 18px; }
@media (max-width: 700px) {
  .login-signature { margin: 0 0 0 auto; padding: 0; border: 0; }
}
/* ---- Bulles de notification en bas à gauche (20/10/2026) ----
   Carte anthracite liserée de vert-jaune (habillage, aucune couleur de
   statut). Au-dessus de la pagination (--pager-h, 46 px) et du bouton
   « Précédent » ; sous les fenêtres (z-index 90 < 100).
   🔴 Les animations jouent même si le système demande de les limiter :
   même décision que l'onde de la cloche (effets d'animation coupés sur le
   serveur, réglage que personne n'a choisi pour l'outil). */
.bulles-notif {
  position: fixed;
  left: 16px;
  bottom: calc(46px + 12px);
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 320px;
  max-width: calc(100vw - 32px);
  pointer-events: none;
}
.bulle-notif {
  pointer-events: auto;
  display: flex;
  align-items: stretch;
  background: var(--chrome);
  color: #fff;
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .28);
  overflow: hidden;
  animation: bulle-entree .38s cubic-bezier(.2, .9, .3, 1.15) both;
}
@keyframes bulle-entree {
  from { opacity: 0; transform: translateX(-28px) scale(.97); }
  to   { opacity: 1; transform: none; }
}
/* Sortie (20/10/2026) : la bulle part en poussière, dessinée sur un canevas
   (app.js, desintegrerBulle) ; elle-même devient invisible en gardant sa
   place, puis se replie. Sans canevas : l'ancien fondu (.fondu). */
/* Rappel (27/10/2026) : liseré et icône lavande, la bulle reste affichée. */
.bulle-notif.bulle-rappel { border-left-color: #a99cf0; }
.bulle-notif.bulle-rappel .bulle-ico { stroke: #a99cf0; }
.bulle-notif.part { animation: none; pointer-events: none; }
.bulle-notif.poussiere { visibility: hidden; }
.bulle-notif.replie {
  max-height: 0 !important;
  margin-top: -8px;              /* referme aussi l'espace (gap) laissé */
  transition: max-height .35s ease, margin-top .35s ease;
}
.bulle-notif.fondu {
  opacity: 0;
  transform: translateX(-12px);
  transition: opacity .3s ease, transform .3s ease, max-height .35s ease .1s, margin-top .35s ease .1s;
}
.bulle-poussiere { position: fixed; z-index: 91; pointer-events: none; }
.bulle-corps {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 11px 6px 11px 13px;
  background: none;
  border: 0;
  color: inherit;
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.bulle-corps:hover { background: rgba(255, 255, 255, .05); }
.bulle-corps:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.bulle-ico {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.bulle-texte { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.bulle-texte b { font-size: 14px; }
.bulle-texte span {
  font-size: 12.5px;
  color: #ced5d9;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.bulle-croix {
  flex: 0 0 auto;
  width: 28px;
  background: none;
  border: 0;
  color: #8b979f;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  align-self: flex-start;
  padding: 8px 0;
}
.bulle-croix:hover { color: #fff; }

/* ==========================================================================
   MODE SOMBRE (22/10/2026) - serveur de test d'abord
   ==========================================================================
   Maquette « B1 » retenue par l'utilisateur : gris doux, lignes en FONDS
   TEINTÉS (le code couleur de l'Excel est gardé, seule la luminosité change),
   bandeau plus foncé encore, fonds foncés d'un cran à sa demande. Interrupteur
   dans le menu du nom, choix porté par le COMPTE (`users.mode_sombre`), posé en
   classe `sombre` sur <html>.

   🔴 TOUT L'OUTIL depuis le soir du 22/10/2026 (d'abord le tableau et la fiche
   d'appel, puis « passe-le sur la totalité »). Les variables sont redéfinies
   sur `html.sombre` ; ce qui suit reprend une à une les couleurs ÉCRITES EN DUR
   (inventaire mesuré : 125 déclarations hors écran de connexion). Une nouvelle
   couleur en dur dans la feuille doit donc avoir sa réplique ici.
   Restent clairs dans tous les cas : l'écran de connexion (il n'appartient à
   personne), les PDF et leur aperçu, les mails - ce sont des documents.

   ⚠️ `--chrome` n'est PAS redéfini : il sert de FOND (pastilles d'initiales,
   bouton principal, bascules cochées, bulles « moi » du tchat), qui restent
   anthracite. Ses emplois en TEXTE sont repris un par un plus bas.
   ⚠️ `--blanc` devient la SURFACE sombre : ses quelques emplois en TEXTE sur
   l'anthracite (bandeau, bannière de version, nom Diapason) sont rétablis en
   blanc juste en dessous.
   ⚠️ `--rouge` et `--bleu` s'éclaircissent pour se lire en TEXTE sur sombre ;
   les FONDS pleins qui portent du blanc reprennent une teinte profonde (rouge
   #b83232, bleu #2f6fa8 : blanc au-dessus de 5:1). */
html.sombre {
  --fond: #1b1f23;
  --blanc: #22282d;
  --gris-texte: #e6eaee;
  --gris-doux: #aab4bc;
  --bordure: #3c454d;
  --chrome-clair: #2c333a;
  --chrome-texte: #e6eaee;
  --bleu: #6fb0f0;
  --bleu-fonce: #b8daf8;
  --bleu-clair: #1f3a55;
  --vert: #21452c;
  --vert-bord: #5ea872;
  --vert-texte: #97dcaa;
  --jaune: #41381a;
  --jaune-bord: #b39a35;
  --orange: #523f22;
  --orange-bord: #d08a3c;
  --orange-texte: #f6c27f;
  --violet: #3a2d52;
  --violet-bord: #a183d6;
  --sarcelle: #1b3f3b;
  --sarcelle-bord: #4cc0b0;
  --sarcelle-texte: #a6e6dd;
  --rouge: #ef7472;
  --rouge-clair: #44242a;
  --ombre: 0 2px 10px rgba(0, 0, 0, .45);
  color-scheme: dark;   /* barres de défilement, calendriers, listes natives */
}
/* Rouge et bleu PROFONDS, pour les fonds pleins qui portent du blanc. */
html.sombre { --rouge-plein: #b83232; --bleu-plein: #2f6fa8; }

/* ---- Haut de page ---- */
html.sombre .topbar { background: linear-gradient(135deg, #15191c 0%, #0e1114 100%); color: #fff; }
html.sombre .logo-version,
html.sombre .diapason-nom,
html.sombre .bureau-telecharger { color: #fff; }
html.sombre .diapason-symbole .onde { stroke: #fff; }
/* Le bandeau « application de bureau » vit sous la barre, sur tous les écrans. */
html.sombre .bureau-banniere { background: #171b1f; border-bottom-color: #2c333a; color: #e6eaee; }
html.sombre .bureau-plus-tard { color: #c3cbd2; }
html.sombre .bureau-plus-tard:hover { color: #fff; }
html.sombre .bureau-telecharger { box-shadow: 0 0 0 1px #5b666f; }

/* ---- Socle : boutons, champs, bascules, menus, fenêtres ---- */
html.sombre .btn-primary { background: #11161a; border-color: #5b666f; }
html.sombre .btn-primary:hover { background: #0b0e10; }
html.sombre .btn:hover { filter: brightness(1.15); }
html.sombre .btn-danger,
html.sombre .toast.err,
html.sombre .chip-warn.active,
html.sombre .verrou-bande,
html.sombre .licences-encart-bloquees,
html.sombre .t-ib-pas,
html.sombre .env-test span,
html.sombre .contrat-etat { background: var(--rouge-plein); border-color: var(--rouge-plein); }
html.sombre .chip-bill.active { background: #a35608; border-color: #a35608; }
html.sombre .chip-done.active { background: #2e7d32; border-color: #2e7d32; }
html.sombre :is(.cloche-compteur, .t-pas, .tchat-pastille):not(.t-at) { background: var(--bleu-plein); }
html.sombre .tchat-pastille { border-color: #1b1f23; }
html.sombre .t-on { border-color: #22282d; }
html.sombre .btn.en-envoi::after { border-color: rgba(255, 255, 255, .25); border-top-color: #fff; }
html.sombre .chip { color: #c3cbd2; }
html.sombre :is(.tech-opt:hover, .input:focus, .bsc:hover) { border-color: #8a96a0; }
html.sombre .tech-opt.inactif { color: #aab4bc; }
html.sombre .tech-badge { box-shadow: 0 0 0 1px rgba(255, 255, 255, .18); }
html.sombre .tech-badge.import-sans-compte { color: #aab4bc; border-color: #aab4bc; }
html.sombre .bascule-vue .bv-piste { background: #5b666f; }
html.sombre .bascule-vue:hover .bv-piste { background: #6b767f; }
html.sombre .bascule-vue:has(input:checked) .bv-piste { background: #8a96a0; }
html.sombre .bascule-vue .bv-curseur { background: #f1f4f6; }
html.sombre .input-attention { background: #3e301b; }
html.sombre .form-error { color: #f5a3a2; }
html.sombre .modal { box-shadow: 0 6px 24px rgba(0, 0, 0, .5); }
html.sombre .modal-foot { background: #1b1f23; }
html.sombre .modale-dense .modal-head { background: #15191c; }
html.sombre .modal-overlay { background: rgba(0, 0, 0, .6); }
html.sombre .comment { background: #1b1f23; border-left-color: #8a96a0; }

/* ---- Tableaux (.grid, partagé par neuf tableaux) ---- */
html.sombre .grid thead th { background: #2a3137; color: #bcc5cc; border-bottom-color: #4a545d; border-right-color: #3c454d; }
html.sombre .grid tbody td { border-bottom-color: rgba(255, 255, 255, .07); border-right-color: rgba(255, 255, 255, .05); }
html.sombre .grid tbody tr.st-resolu td { background: #1e3828; }
html.sombre .grid tbody tr.st-en_cours td { background: #1f3247; }
html.sombre .grid tbody tr.en-retard td { background: #44242a; }
html.sombre .grid tbody tr.a-facturer td { background: #433420; }
html.sombre .cell-num,
html.sombre .cell-sub { color: #aab4bc; }
html.sombre .cell-motif { color: #f1f4f6; }
html.sombre .meta-grp { color: #c3cbd2; }
html.sombre .date-planning { color: #f6c27f; }
html.sombre .date-retard { color: #f5a3a2; }
html.sombre .date-faite { color: #97dcaa; }
html.sombre .badge-nouveau,
html.sombre .modale-dense .statut-nouveau,
html.sombre :is(.rma-etat-a_envoyer, .modale-dense .select-statut.rma-etat-a_envoyer) { color: #f3dc85; }
html.sombre :is(.flag-bs, .etat-pret, .pastille-bs) { color: #e4d8f5; }
html.sombre :is(.flag-mini, .etat-hs) { background: #3a434b; }
html.sombre :is(.flag-sans-gerant, .rma-recidive) { border-color: #5b666f; }
html.sombre .pret-client.en-retard { color: #f5a3a2; }
html.sombre :is(.lic-etat-abandonnee, .modale-dense .select-statut.lic-etat-abandonnee) { background-color: #2c333a; color: #c3cbd2; }

/* ---- Tableau des appels ---- */
html.sombre #tickets-table thead th { background: var(--blanc); border-bottom-color: #59636c; }
html.sombre #tickets-table tbody td:not(:last-child)::after,
html.sombre #tickets-table thead th:not(:last-child)::after { background: rgba(255, 255, 255, .14); }
html.sombre #tickets-table tbody tr.st-nouveau td { background: #22282d; }
html.sombre #tickets-table tbody tr:hover.st-nouveau td { background: #2c333a !important; }
html.sombre #tickets-table tbody tr:hover.st-en_cours td { background: #283f58 !important; }
html.sombre #tickets-table tbody tr:hover.st-resolu td { background: #264532 !important; }
html.sombre #tickets-table tbody tr:hover.en-retard td { background: #532d33 !important; }
html.sombre #tickets-table tbody tr:hover.a-facturer td { background: #524029 !important; }
html.sombre #tickets-table tbody tr.st-nouveau { --tk-lisere: #e8c440; }
html.sombre #tickets-table tbody tr:hover.st-nouveau td:first-child { box-shadow: inset 3px 0 0 #e8c440; }
/* Changement de jour : l'aubergine du clair disparaîtrait sur sombre. */
html.sombre #tickets-table tbody tr.jour-suivant td { border-top-color: #ff66ff; }

/* ---- Pastilles de filtres ---- */
html.sombre .pastille,
html.sombre .pastille-rma { color: #e6eaee; border-color: #6b767f; }
html.sombre .pastille:hover { background: #353e46; }
html.sombre .pastille-factu { background: var(--orange); }

/* ---- Fiche d'appel (et toutes les fenêtres `.modale-dense`) ---- */
html.sombre .modale-dense .input.repris { background: #1b1f23; color: #c3cbd2; }
html.sombre .modale-dense .input.repris:focus { background: var(--blanc); color: var(--gris-texte); }
html.sombre .modale-dense .bsc .voyant { background: #6b767f; }
/* « Sans contrat » : texte BLANC, le cadre et l'icône gardent leur rouge
   (demandé par l'utilisateur). L'état « sous contrat » garde ses couleurs. */
html.sombre .modale-dense .contrat { color: #fff; }
html.sombre .modale-dense .contrat:has(input:checked) .contrat-etat { background: var(--vert); border-color: var(--vert-bord); }
/* Flèche des listes habillées en pastille : dessinée en gris foncé. */
html.sombre .modale-dense .select-statut {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e6eaee' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6l6-6'/%3E%3C/svg%3E");
}
html.sombre #ticket-modal.consultation :is(.modal-body input, .modal-body select, .modal-body textarea, .modal-foot select, .head-date) { background: #2a3137; }
html.sombre .verrou-bande .verrou-btn { background: #fff; color: #b83232; }

/* ---- Imports (CSV clients, appels ouverts) ---- */
html.sombre .imp-table td,
html.sombre .imp-cell:focus,
html.sombre .imp-retirer { background: var(--blanc); }
html.sombre .imp-table tr.imp-choisie td { background: #2f3a1f; }
html.sombre .imp-table tr.imp-ko td { background: #44242a; }
html.sombre :is(.imp-cadre, .imp-retirer, .imp-cell:hover, .imp-sort.imp-inchange) { border-color: #4a545d; }
html.sombre :is(.imp-table .imp-num, .imp-motif, .import-sous, .import-suivi, .reprise-origine) { color: #aab4bc; }
html.sombre :is(.imp-sort.imp-ecartee, .import-erreurs) { color: #f5a3a2; }
html.sombre .import-appels-liste th { background: #2a3137; }
html.sombre :is(.reprise-repere-perime, .reprise-perime) { background: #41381a; color: #f3dc85; border-color: #b39a35; }

/* ---- Journaux, Statistiques, comptes ---- */
html.sombre :is(.jr-type.jr-suppression, .jr-type.jr-compte_bloque, .jr-type.jr-verrou_force) { color: #f5a3a2; }
html.sombre tr.jr-archivage td { background: #3a2e20; }
html.sombre .sg-resolu { background: #5ea872; }
html.sombre .stats-encart.stats-clic:hover { background: #353e46; }
html.sombre .stats-carte.c-nouveau { --si: var(--jaune-bord); }
/* Barres « par technicien » : unies en anthracite (choix de l'utilisateur, pas
   de couleur de statut). Sur sombre, l'anthracite se confondait avec la piste :
   elles passent au gris clair, toujours neutre. */
html.sombre .stats-remplissage:not(.f-nouveau, .f-encours, .f-resolu):not(:has(.stats-seg)) { background: #8a96a0; }
html.sombre :is(.bandeau-bloque .bloque-titre, .etat-bloque, .purge-compte-attention) { color: #f5a3a2; }
html.sombre #user-modal .us-tchat { border-top-color: #3c454d; }
html.sombre #user-modal .us-tchat-titre { color: #aab4bc; }

/* ---- Ma journée, Bibliothèque, Clients ---- */
html.sombre .mj-compte,
html.sombre .mj-carte-num { color: #aab4bc; }
/* « Terminé aujourd'hui » : ses couleurs vivent dans des variables LOCALES
   (`.mj-termine`), que l'inventaire des déclarations `background: #…` ne voyait
   pas - trouvé par l'utilisateur en production. Même esprit qu'en clair : un
   vert ADOUCI, jamais le vert plein de « Résolu ». Mesuré : badge 5,4:1,
   titre 11,9:1, motif 6:1, liseré et point 5,8:1 sur la page. */
html.sombre .mj-termine {
  --mj-termine-accent: #2f5e3c;
  --mj-termine-fond: #1f2a24;
  --mj-termine-texte: #b5e6c2;
  --mj-termine-doux: #9aa6ae;
}
html.sombre .mj-termine .mj-carte { border-left-color: #5ea872; }
html.sombre .mj-termine .mj-point { background: #5ea872; }
/* Le motif barré reste en retrait, comme en clair : la règle générale du
   motif (plus haut) l'aurait remis en blanc vif. */
html.sombre :is(.mj-termine .mj-carte-motif, .mj-termine .mj-carte-num, .mj-termine .mj-carte-date) { color: var(--mj-termine-doux); }
html.sombre .mj-carte-motif,
html.sombre .mj-report-menu button { color: #f1f4f6; }
html.sombre :is(.bib-mot, .bib-extrait, .clc-ger, .clc-lieu) { color: #c3cbd2; }
html.sombre .bib-suggest-lien:hover { color: #fff; }
html.sombre .clc-ger.clc-a-faire { color: #f5a3a2; }
html.sombre :is(.clc-tuile.clc-manque, .clf-tuile.manque) { background: #2e2226; }
html.sombre .clf-sec > summary { background: #2a3137; }
/* Le bouton vert-jaune du gérant reste sur l'accent : texte anthracite. */
html.sombre .gerant-btn-p:hover { background: #e6ff3d; color: #1b2228; }

/* ---- Tchat ---- */
html.sombre :is(.t-en-ligne, .t-fil) { background: #1b1f23; }
html.sombre :is(.t-item, .t-journal) { border-bottom-color: #2c333a; }
html.sombre :is(.t-coupe, .t-rouge) { color: #f5a3a2; }
html.sombre .t-systeme { background: #433420; border-color: #8a6a30; color: #f6c27f; }
html.sombre .t-systeme .ico { color: #f6c27f; }
html.sombre .t-champ { color: #c3cbd2; }
html.sombre .tchat-panneau .t-danger { color: #f5a3a2; }
html.sombre .tchat-panneau .t-danger:hover { background: #44242a; }
html.sombre :is(.tchat-panneau .t-epingle, .tchat-moderation .t-epingle) { background: #2c333a; border-bottom-color: #3c454d; color: #e6eaee; }
html.sombre .t-annonce { background: #2c333a; color: #c3cbd2; }
html.sombre .t-chef { background: #3a3f1c; color: #eef5b0; }
html.sombre :is(.t-reglage-txt span, .tchat-panneau .t-rubrique) { color: #aab4bc; }
html.sombre .tchat-panneau .t-rubrique:hover { color: #fff; }
html.sombre :is(.t-g-ajout, .tchat-panneau .t-item + .t-rubrique, .tchat-panneau .t-vide + .t-rubrique) { border-color: #3c454d; }
html.sombre .t-msg.lui .t-bulle { background: #2c333a; }
html.sombre .t-msg.moi .t-bulle { background: #11161a; box-shadow: inset 0 0 0 1px #3c454d; }
html.sombre :is(.t-saisie textarea, .t-champ input, .t-champ textarea) { background: var(--blanc); color: var(--gris-texte); }

/* ---- L'interrupteur, dans le menu du nom ---- */
/* `.bascule-vue` est déclarée plus bas que `.admin-item` : sans ces valeurs,
   la ligne prenait sa hauteur de 30 px et son retrait de 4 px. */
.bascule-menu { justify-content: flex-start; height: auto; padding: 9px 12px; gap: 9px; color: var(--gris-texte); }
.bascule-menu .bv-piste { margin-left: auto; }
.bascule-menu input:checked ~ .bv-piste { background: var(--chrome); }

/* Historique des appels du client : une ombre lisible sur fond sombre. */
html.sombre .clh-ticket { box-shadow: 0 1px 4px rgba(0, 0, 0, .55); }
html.sombre .clh-ticket:hover { box-shadow: 0 4px 14px rgba(0, 0, 0, .6); }
/* Filtre actif (puces .chip) : son fond anthracite disparaissait sur les
   surfaces sombres. En sombre, il passe au clair - vu sur l'historique client. */
html.sombre .chip.active { background: #e6eaee; border-color: #e6eaee; color: #1b2228; }
/* Technicien ATTRIBUÉ dans la fiche d'appel et le filtre : la pastille
   anthracite ne se distinguait plus des autres sur fond sombre (vu le
   23/10/2026 sur une capture). Même remède que le filtre actif. */
html.sombre .tech-opt.on,
html.sombre .tech-opt.on:hover { background: #e6eaee; border-color: #e6eaee; color: #1b2228; }
html.sombre .tech-opt.inactif.on,
html.sombre .tech-opt.inactif.on:hover { background: #aab4bc; border-color: #aab4bc; color: #1b2228; }

/* Rappel à heure fixe (27/10/2026) : les indigos du clair, éclaircis. */
html.sombre .jr-type.jr-rappel { background: #2c2850; border-color: #8f84d8; color: #cfc8ff; }
html.sombre .cloche-item.cloche-rappel .cloche-libelle,
html.sombre .heure-rappel { color: #b3a9f5; }
html.sombre .cloche-item.cloche-rappel.non-lu { border-left-color: #8f84d8; }

/* ------------------------------------------------------------------ */
/* Production - borne tactile (30/10/2026)                             */
/* ------------------------------------------------------------------ */
/* Écran 1080x1920 en portrait. Toujours sombre, avec des tickets clairs, quel
   que soit le mode du compte : pas de réplique `html.sombre` à prévoir ici. */
html.borne-plein .topbar,
html.borne-plein #bulles-notif,
html.borne-plein #bureau-banniere,
html.borne-plein #btn-haut { display: none; }
#view-borne:not(.hidden) {
  flex: 1; min-height: 0; display: flex; flex-direction: column;
  padding: 0; margin: 0; max-width: none; width: 100%;
  background: #12181c; color: #e6eaee; user-select: none;
  --tk-h: 344px; --tk-col: 2;
}
#view-borne.bn-compact { --tk-h: 228px; }
#view-borne.bn-dense { --tk-h: 228px; --tk-col: 3; }
.bn-c-nouveau { --c: #e0c94a; }
.bn-c-encours { --c: #1f5f8b; }
.bn-c-resolu { --c: #7cbf6e; }
.bn-bandeau { flex: none; display: flex; align-items: center; gap: 22px; padding: 22px 32px; background: #1b2228; border-bottom: 4px solid #dafe0a; }
.bn-marque { display: flex; align-items: center; gap: 22px; background: none; border: 0; padding: 0; color: #e6eaee; font: inherit; cursor: pointer; text-align: left; }
.bn-marque svg { width: 66px; height: 66px; fill: none; stroke: #dafe0a; stroke-width: 3.2; stroke-linecap: round; }
.bn-marque span { font-size: 42px; font-weight: 700; line-height: 1; }
.bn-marque small { display: block; font-size: 20px; font-weight: 400; color: #aab4bc; margin-top: 6px; }
.bn-compteurs { margin-left: auto; display: flex; gap: 12px; }
.bn-cpt { min-width: 96px; text-align: center; border-radius: 10px; padding: 6px 10px; background: #262e35; border-bottom: 6px solid var(--c); }
.bn-cpt b { display: block; font-size: 40px; line-height: 1.1; }
.bn-cpt span { font-size: 15px; color: #aab4bc; }
.bn-heure { font-size: 62px; font-weight: 300; margin-left: 12px; font-variant-numeric: tabular-nums; }
.bn-rail { flex: 1; min-height: 0; overflow: hidden; padding: 0 28px; }
#view-borne.bn-defile .bn-rail { overflow-y: auto; touch-action: pan-y; }
.bn-titre { display: flex; align-items: baseline; gap: 14px; margin: 22px 0 14px; font-size: 32px; font-weight: 700; color: #e6eaee; }
.bn-titre i { width: 22px; height: 22px; border-radius: 5px; background: var(--c); align-self: center; }
.bn-titre span { font-size: 21px; font-weight: 400; color: #aab4bc; }
.bn-grille { display: grid; grid-template-columns: repeat(var(--tk-col), minmax(0, 1fr)); gap: 20px 22px; }
.bn-vide-groupe { grid-column: 1 / -1; padding: 26px; font-size: 26px; color: #aab4bc; border: 2px dashed #3c454d; border-radius: 10px; text-align: center; }
.bn-tk {
  --c: #e0c94a; --t: #3d2f00;
  height: var(--tk-h); display: flex; flex-direction: column; min-width: 0;
  background: #fbfaf4; color: #1b2228; filter: drop-shadow(0 6px 8px rgba(0,0,0,.45));
  -webkit-mask: linear-gradient(#000,#000) top/100% calc(100% - 9px) no-repeat,
    radial-gradient(circle 9px at 12px 100%, transparent 8.5px, #000 9px) bottom/24px 9px repeat-x;
}
#bn-encours .bn-tk { --c: #1f5f8b; --t: #fff; }
#bn-encours .bn-tk.bn-retard { --c: #d33f3f; }
#bn-encours .bn-tk.bn-rappel { --c: #4f3fb5; }
.bn-souche { display: flex; align-items: center; gap: 12px; padding: 10px 18px; background: var(--c); color: var(--t); }
.bn-num { font-size: 36px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bn-age { margin-left: auto; display: flex; align-items: center; gap: 7px; font-size: 27px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bn-tk svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; flex: none; }
.bn-corps { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 13px 18px 8px; border-top: 3px dashed rgba(27,34,40,.28); }
.bn-client { font-size: 29px; font-weight: 800; line-height: 1.12; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bn-lieu { font-size: 20px; color: #56626b; margin-top: 2px; min-height: 26px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bn-motif { flex: 1; min-height: 0; margin-top: 8px; font-size: 24px; line-height: 1.24; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.bn-pied { flex: none; display: flex; align-items: center; gap: 8px; margin: 8px 0 10px; min-height: 42px; }
.bn-ini { width: 44px; height: 42px; flex: none; display: grid; place-items: center; border-radius: 8px; background: #1b2228; color: #fff; font-size: 20px; font-weight: 700; }
.bn-ini.bn-vide { width: auto; padding: 0 10px; background: none; border: 2px dashed #e08b2e; color: #a35608; font-size: 18px; font-weight: 600; white-space: nowrap; }
.bn-plan { margin-left: auto; display: flex; align-items: center; gap: 7px; font-size: 20px; font-weight: 600; color: #3b444b; white-space: nowrap; }
.bn-retard .bn-plan { color: #d33f3f; }
.bn-rappel .bn-plan { padding: 5px 12px; border-radius: 8px; background: #4f3fb5; color: #fff; font-size: 23px; }
.bn-compact .bn-num { font-size: 30px; }
.bn-compact .bn-souche, .bn-dense .bn-souche { padding: 6px 14px; }
.bn-compact .bn-corps, .bn-dense .bn-corps { padding: 7px 14px 2px; }
.bn-compact .bn-client { font-size: 26px; }
.bn-compact .bn-lieu { display: none; }
.bn-compact .bn-motif { font-size: 22px; margin-top: 3px; -webkit-line-clamp: 2; }
.bn-compact .bn-pied, .bn-dense .bn-pied { margin: 4px 0 8px; min-height: 36px; }
.bn-compact .bn-ini, .bn-dense .bn-ini { height: 36px; }
.bn-dense .bn-grille { gap: 14px 14px; }
.bn-dense .bn-num { font-size: 26px; }
.bn-dense .bn-age { font-size: 20px; }
.bn-dense .bn-tk svg { width: 19px; height: 19px; }
.bn-dense .bn-client { font-size: 22px; }
.bn-dense .bn-lieu { display: none; }
.bn-dense .bn-motif { font-size: 19px; margin-top: 3px; -webkit-line-clamp: 3; }
.bn-dense .bn-ini { width: 38px; font-size: 17px; }
.bn-dense .bn-ini.bn-vide { width: auto; font-size: 15px; }
.bn-dense .bn-plan { font-size: 16px; }
.bn-dense .bn-rappel .bn-plan { font-size: 17px; padding: 4px 8px; }
.bn-bande { flex: none; margin: 20px 28px 24px; padding: 14px 20px; border-radius: 12px; background: #1b2228; }
.bn-bande h3 { margin: 0 0 11px; font-size: 22px; font-weight: 600; color: #97dcaa; }
.bn-bande > div { display: flex; gap: 10px; height: 42px; overflow: hidden; flex-wrap: wrap; }
.bn-puce { flex: none; padding: 8px 13px; border-radius: 8px; background: #21452c; color: #d7f0d2; font-size: 20px; white-space: nowrap; }
.bn-puce b { margin-right: 6px; font-weight: 800; color: #fff; }
/* Fenêtre tactile de la borne : cibles larges pour le doigt. */
/* Marges automatiques, comme `.modal-overlay > .modal` : centrée sans couper le haut. */
#borne-modal .bn-fenetre { --c: #1f5f8b; --t: #fff; margin: auto 0; flex: none; }
.bn-fenetre { width: 980px; max-height: 1760px; display: flex; flex-direction: column; background: #fbfaf4; color: #1b2228; border-radius: 10px; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.bn-fenetre.st-nouveau { --c: #e0c94a; --t: #3d2f00; }
.bn-fenetre.st-en_cours { --c: #1f5f8b; --t: #fff; }
.bn-fenetre.st-resolu { --c: #2f7d3c; --t: #fff; }
.bn-fenetre .bn-souche { flex: none; padding: 14px 18px 14px 26px; }
.bn-fenetre .bn-num { font-size: 44px; }
.bn-fenetre .bn-age { font-size: 30px; }
.bnf-fermer { width: 72px; height: 72px; margin-left: 12px; flex: none; display: grid; place-items: center; background: rgba(0,0,0,.18); border: 0; border-radius: 10px; color: inherit; cursor: pointer; }
.bnf-fermer svg { width: 42px; height: 42px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }
.bnf-corps { flex: 1; min-height: 0; overflow-y: auto; touch-action: pan-y; padding: 22px 26px 28px; }
.bnf-corps h3 { margin: 24px 0 10px; font-size: 24px; font-weight: 700; color: #3b444b; }
.bnf-corps h3.bnf-alerte { color: #d33f3f; }
.bnf-client { font-size: 40px; font-weight: 800; line-height: 1.12; }
.bnf-lieu, .bnf-tels { margin-top: 5px; font-size: 25px; color: #56626b; }
.bnf-tels { font-weight: 600; color: #1b2228; }
.bnf-motif { margin-top: 16px; font-size: 29px; line-height: 1.3; white-space: pre-wrap; }
.bnf-suivis { margin-top: 14px; max-height: 330px; overflow-y: auto; touch-action: pan-y; }
.bnf-suivi { padding: 10px 14px; margin-top: 8px; border-left: 5px solid #aab4bc; background: #eef0f2; font-size: 23px; line-height: 1.28; white-space: pre-wrap; }
.bnf-suivi b { margin-right: 8px; }
.bnf-comptes { display: flex; flex-wrap: wrap; gap: 12px; }
.bnf-compte { width: 104px; height: 84px; background: #eef0f2; border: 3px solid #aab4bc; border-radius: 10px; color: #1b2228; font: inherit; font-size: 31px; font-weight: 800; cursor: pointer; }
.bnf-compte small { display: block; margin-top: 1px; font-size: 15px; font-weight: 600; line-height: 1.1; }
.bnf-compte.sur-appel { background: #e8f1f7; border: 4px solid #1f5f8b; color: #17475f; }
.bnf-compte.choisi { background: #1b2228; border-color: #1b2228; color: #dafe0a; }
.bnf-action { width: 100%; min-height: 92px; padding: 0 14px; background: #1b2228; border: 3px solid #1b2228; border-radius: 10px; color: #fff; font: inherit; font-size: 29px; font-weight: 700; cursor: pointer; }
.bnf-action:active, .bnf-compte:active { transform: scale(.98); }
.bnf-action[aria-busy="true"] { opacity: .6; }
.bnf-statuts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.bnf-statuts .bnf-action { background: #eef0f2; border-color: #aab4bc; color: #1b2228; }
.bnf-statuts .bnf-action.courant { cursor: default; color: #fff; }
.bnf-statuts [data-statut="nouveau"].courant { background: #e0c94a; border-color: #e0c94a; color: #3d2f00; }
.bnf-statuts [data-statut="en_cours"].courant { background: #1f5f8b; border-color: #1f5f8b; }
.bnf-statuts [data-statut="resolu"].courant { background: #2f7d3c; border-color: #2f7d3c; }
.bnf-erreur { margin: 18px 0 0; padding: 14px 18px; background: #fde4e4; border-left: 6px solid #d33f3f; color: #8f2020; font-size: 25px; }
.bn-tk, .bn-puce { cursor: pointer; }
.bn-tk:active, .bn-puce:active { opacity: .82; }
/* ==================== Onglet RMA groupé par geste (24/11/2026) ====================
   Maquette « 4 sobre » choisie par l'utilisateur. Couleurs par variables du
   thème : le mode sombre suit, les deux seules valeurs écrites ont leur
   réplique en fin de bloc. */
.rmx { padding: 14px 16px 90px; }
.rmx-g-recu { --g: var(--sarcelle-bord); --gf: var(--sarcelle); --gt: var(--sarcelle-texte); }
.rmx-g-a_envoyer { --g: var(--jaune-bord); --gf: var(--jaune); --gt: #7a5c00; }
.rmx-g-chez_fabricant { --g: var(--bleu); --gf: var(--bleu-clair); --gt: var(--bleu); }
.rmx-g-clos { --g: var(--vert-bord); --gf: var(--vert); --gt: var(--vert-texte); }
.rmx-g-stock { --g: var(--chrome-texte); --gf: var(--chrome-clair); --gt: var(--chrome-texte); }

.rmx-haut { display: grid; grid-template-columns: 1.15fr 1fr 1.3fr; gap: 12px; margin-bottom: 12px; }
.rmx-boite { background: var(--blanc); border: 1px solid var(--bordure); border-radius: 10px; padding: 10px 14px; min-width: 0; }
.rmx-boite h4 { margin: 0 0 7px; font-size: 11.5px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--gris-doux); }
.rmx-chiffres { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 18px; }
.rmx-chiffres b { font-size: 24px; color: var(--chrome-texte); }
.rmx-mieux { color: var(--vert-texte); font-weight: 700; }
.rmx-moins { color: var(--rouge); font-weight: 700; }
.rmx-etabli { display: flex; gap: 4px; margin: 8px 0 5px; }
.rmx-etabli span { flex: 1; max-width: 40px; height: 8px; border-radius: 2px; background: var(--vert-bord); }
.rmx-etabli span.ko { background: var(--sarcelle-bord); opacity: .55; }
.rmx-jour-l { display: flex; align-items: center; gap: 7px; font-size: 13px; line-height: 1.7; }
.rmx-rouge { color: var(--rouge); }
.rmx-fab { display: grid; grid-template-columns: minmax(0, 120px) 1fr 44px; align-items: center; gap: 8px; font-size: 12px; line-height: 1.75; }
.rmx-fab > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rmx-fab b { text-align: right; }
.rmx-fab-p { height: 7px; border-radius: 4px; background: var(--chrome-clair); overflow: hidden; }
.rmx-fab-p i { display: block; height: 100%; border-radius: 4px; background: #8a96a0; }
.rmx-fab-p i.lent { background: var(--rouge); }

.rmx-compteurs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.rmx-cpt { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--blanc); border: 1px solid var(--bordure); border-radius: 10px; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.rmx-cpt:hover { background: var(--chrome-clair); }
.rmx-cpt.actif { outline: 2px solid var(--chrome-texte); outline-offset: -1px; }
.rmx-cpt b { display: block; font-size: 22px; line-height: 1.1; }
.rmx-pas { width: 38px; height: 38px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--gf); color: var(--gt); }
.rmx-pas .ico { width: 19px; height: 19px; }
.rmx-delta { position: absolute; top: 9px; right: 11px; padding: 1px 7px; border-radius: 9px; background: var(--vert); color: var(--vert-texte); font-size: 11.5px; font-weight: 700; animation: rmx-delta 2.4s ease-out forwards; }
@keyframes rmx-delta { 0%, 60% { opacity: 1; } 100% { opacity: 0; } }

.rmx-groupe { background: var(--blanc); border: 1px solid var(--bordure); border-radius: 8px; overflow: hidden; margin-bottom: 12px; }
.rmx-groupe > header { display: flex; align-items: center; gap: 9px; padding: 8px 14px; background: var(--gf); color: var(--gt); font-weight: 700; font-size: 13.5px; }
.rmx-n { margin-left: auto; }
.rmx-table { table-layout: fixed; width: 100%; border-collapse: collapse; font-size: 13.5px; }
.rmx-table tr { cursor: pointer; }
.rmx-table tr:hover td { background: var(--chrome-clair); }
.rmx-table td { padding: 9px 14px; border: 0; border-top: 1px solid var(--chrome-clair); }
.rmx-sub { margin-top: 2px; font-size: 12px; color: var(--gris-doux); line-height: 1.3; }
.rmx-table td { vertical-align: middle; }
.rmx-table tr:first-child td { border-top: 0; }
.rmx-c-age { width: 170px; }
.rmx-c-age > b { font-size: 14px; font-variant-numeric: tabular-nums; }
.rmx-c-mat { width: 24%; }
.rmx-c-client { width: 18%; }
.rmx-c-fab { width: 13%; }
.rmx-c-dest { width: 12%; }
.rmx-c-geste { text-align: right; white-space: nowrap; }
.rmx-serie { font-family: Consolas, "Cascadia Mono", monospace; }
.rmx-jauge { position: relative; display: block; height: 7px; margin-top: 5px; border-radius: 4px; background: var(--chrome-clair); }
.rmx-jauge i { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 4px; background: var(--g); }
.rmx-jauge i.trop { background: var(--rouge); }
.rmx-jauge i + i.trop { border-radius: 0 4px 4px 0; }
.rmx-jauge u { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: var(--chrome-texte); }
.rmx-moy { display: block; margin-top: 3px; font-size: 11px; color: var(--gris-doux); }
.rmx-moy.trop { color: var(--rouge); font-weight: 700; }
.rmx-frise { display: flex; align-items: center; margin-top: 5px; }
.rmx-frise i { width: 9px; height: 9px; border-radius: 50%; background: #cfd6dc; }
.rmx-frise i.fait { background: var(--vert-bord); }
.rmx-frise i.ici { background: var(--blanc); box-shadow: 0 0 0 2px var(--g); }
.rmx-frise b { width: 16px; height: 2px; background: #d9dee2; }
.rmx-pret { display: inline-flex; align-items: center; gap: 5px; margin-top: 4px; padding: 2px 7px; border-radius: 4px; background: var(--violet); color: var(--chrome-texte); font-size: 11px; font-weight: 600; }
.rmx-geste { display: inline-flex; align-items: center; gap: 6px; margin-left: 6px; padding: 6px 12px; border-radius: 6px; border: 1px solid var(--bordure); background: var(--blanc); color: var(--chrome-texte); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.rmx-geste:hover { background: var(--chrome-clair); }
.rmx-fort { background: var(--chrome-texte); border-color: var(--chrome-texte); color: var(--blanc); }
.rmx-fort:hover { background: var(--chrome-texte); opacity: .88; }
.rmx-relance { border-color: var(--rouge); color: var(--rouge); }
tr.rmx-flash td { animation: rmx-flash 2.2s ease-out; }
@keyframes rmx-flash { from { background: var(--vert); } to { background: transparent; } }
.rmx-vide { display: flex; align-items: center; gap: 14px; padding: 12px 16px; color: var(--gris-texte); }
.rmx-vide .diapason-symbole { width: 40px; height: 40px; flex: none; }
.rmx-vide .diapason-symbole .fourche { stroke: var(--sarcelle-bord); }
.rmx-vide .diapason-symbole .onde { stroke: var(--sarcelle-bord); }
.rmx-vide b { color: var(--chrome-texte); }

.rmx-annuler { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 60; display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 8px; background: #1b2228; color: #fff; box-shadow: var(--ombre); font-size: 13px; }
.rmx-annuler.hidden { display: none; }
.rmx-temps { width: 80px; height: 3px; border-radius: 2px; background: #3c454d; overflow: hidden; }
.rmx-temps i { display: block; height: 100%; background: var(--accent); animation: rmx-temps 6s linear forwards; }
@keyframes rmx-temps { from { width: 100%; } to { width: 0; } }
.rmx-annuler-btn { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; font-weight: 700; cursor: pointer; }

@media (max-width: 1500px) {
  .rmx-haut { grid-template-columns: 1fr 1fr; }
  .rmx-haut .rmx-boite:last-child { grid-column: 1 / -1; }
  .rmx-c-age { width: 130px; }
}
html.sombre .rmx-g-a_envoyer { --gt: var(--jaune-bord); }
html.sombre .rmx-frise i, html.sombre .rmx-frise b { background: #4a545d; }
html.sombre .rmx-frise i.fait { background: var(--vert-bord); }
html.sombre .rmx-frise i.ici { background: var(--blanc); }
html.sombre .rmx-annuler { background: #0f1316; }
/* « Stock occasion » restait anthracite sur une surface anthracite (constaté
   le 24/11/2026 sur l'onglet RMA) : en sombre, l'aplat passe en clair. */
html.sombre .rma-dest-occasion { background: var(--chrome-texte); border-color: var(--chrome-texte); color: #1b2228; }

/* ==================== Onglet Licences (24/11/2026) ====================
   Mêmes briques que l'onglet RMA (.rmx-*), plus l'échéancier et le tiroir.
   Couleurs par variables du thème : le mode sombre suit. */
.lcx-g-rouge { --g: var(--rouge); --gf: var(--rouge-clair); --gt: var(--rouge); }
.lcx-g-orange { --g: var(--orange-bord); --gf: var(--orange); --gt: var(--orange-texte); }
.lcx-g-bleu { --g: var(--bleu); --gf: var(--bleu-clair); --gt: var(--bleu); }
.lcx-g-vert { --g: var(--vert-bord); --gf: var(--vert); --gt: var(--vert-texte); }
.rmx-cpt[disabled] { cursor: default; }
.rmx-cpt[disabled]:hover { background: var(--blanc); }
.lcx-serie { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
.lcx-serie b { font-size: 32px; line-height: 1; color: var(--vert-texte); }
.lcx-serie > span:first-of-type { font-size: 14px; font-weight: 600; color: var(--chrome-texte); }
.lcx-trente { display: flex; gap: 3px; margin: 9px 0 5px; }
.lcx-trente i { flex: 1; height: 8px; border-radius: 2px; background: var(--vert-bord); }
.lcx-trente i.ko { background: var(--rouge); }
.lcx-echeancier-boite { margin-bottom: 12px; }
.lcx-echeancier-boite h4 { display: flex; }
.lcx-echeancier-boite h4 .rmx-sub { margin: 0 0 0 auto; text-transform: none; letter-spacing: 0; font-weight: 600; }
.lcx-echeancier { position: relative; height: 118px; margin: 0 8px; }
.lcx-axe { position: absolute; left: 0; right: 0; top: 52px; height: 2px; background: var(--bordure); }
.lcx-zone { position: absolute; top: 14px; height: 96px; border-left: 1px dashed var(--orange-bord); border-right: 1px dashed var(--orange-bord);
  background: repeating-linear-gradient(135deg, rgba(224, 139, 46, .14) 0 6px, transparent 6px 12px); }
.lcx-zone span { position: absolute; bottom: 1px; left: 6px; font-size: 11px; font-weight: 700; color: var(--orange-texte); white-space: nowrap; }
.lcx-auj { position: absolute; top: 4px; bottom: 6px; width: 2px; background: var(--chrome-texte); }
.lcx-auj span { position: absolute; top: -2px; right: 6px; font-size: 11px; font-weight: 700; white-space: nowrap; color: var(--chrome-texte); }
.lcx-jalon { position: absolute; top: 44px; width: 18px; height: 18px; margin-left: -9px; padding: 0; border-radius: 50%; background: var(--blanc); border: 3px solid var(--g); cursor: pointer; }
.lcx-jalon.plein { background: var(--g); }
.lcx-jalon > * { position: absolute; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 11px; }
.lcx-jalon .dessus { bottom: 20px; } .lcx-jalon .dessous { top: 20px; }
.lcx-jalon b { color: var(--chrome-texte); font-weight: 700; }
.lcx-jalon span { color: var(--gris-doux); }
.lcx-k-rouge { --g: var(--rouge); } .lcx-k-orange { --g: var(--orange-bord); } .lcx-k-bleu { --g: var(--bleu); }
.lcx-grad { position: absolute; top: 98px; transform: translateX(-50%); font-size: 10.5px; color: var(--gris-doux); }
.lcx-rien { position: absolute; left: 50%; top: 66px; transform: translateX(-50%); color: var(--gris-doux); }
.lcx-table col.lcx-c-rebours { width: 130px; }
.lcx-table col.lcx-c-poste { width: 18%; }
.lcx-table col.lcx-c-fin { width: 18%; }
.lcx-table col.lcx-c-tech { width: 6%; }
.lcx-table col.lcx-c-siret { width: 13%; }
.lcx-rebours { font-size: 18px; font-weight: 800; line-height: 1.05; color: var(--gt); }
.lcx-rebours small { display: block; font-size: 11px; font-weight: 600; color: var(--gris-doux); }
.lcx-client td { padding-top: 7px; padding-bottom: 7px; background: var(--fond); font-weight: 700; color: var(--chrome-texte); cursor: default; }
.lcx-table tr.lcx-client:hover td, .lcx-table tr.lcx-tiroir:hover td { background: var(--fond); }
.lcx-tiroir td { padding: 0 14px 12px; background: var(--fond); cursor: default; }
.lcx-boites { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lcx-boites.seule { grid-template-columns: 1fr; }
.lcx-boite { padding: 10px 12px; border: 1px solid var(--bordure); border-radius: 8px; background: var(--blanc); }
.lcx-boite h5 { margin: 0 0 8px; font-size: 11.5px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--gris-doux); }
.lcx-puces { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.lcx-puce { padding: 6px 12px; border: 1px solid var(--bordure); border-radius: 6px; background: var(--blanc); color: var(--chrome-texte); font: inherit; font-weight: 600; cursor: pointer; }
.lcx-puce.on { background: var(--chrome-texte); border-color: var(--chrome-texte); color: var(--blanc); }
.lcx-puces .rmx-geste { margin-left: 0; }
.lcx-date { width: 150px; }
.lcx-siret-champ { width: 210px; font-family: Consolas, "Cascadia Mono", monospace; letter-spacing: 1px; }
.lcx-apercu { margin: 0 4px; }
.lcx-boite .hint { margin-top: 6px; }
.lcx-boite .rmx-sub { margin-top: 6px; }
/* ==================== Bibliothèque poussée plus loin (24/11/2026) ==================== */
.bbx-grille { display: grid; grid-template-columns: 230px minmax(0, 1fr) 360px; gap: 14px; align-items: start; }
.bbx-facettes h5 { margin: 12px 0 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--gris-doux); }
.bbx-facettes h5:first-child { margin-top: 0; }
.bbx-facette { display: flex; justify-content: space-between; width: 100%; padding: 5px 8px; border: 0; border-radius: 6px; background: none; color: var(--gris-texte); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.bbx-facette:hover { background: var(--chrome-clair); }
.bbx-facette span { color: var(--gris-doux); }
.bbx-facette.on { background: var(--chrome-texte); color: var(--blanc); font-weight: 600; }
.bbx-facette.on span { color: var(--blanc); opacity: .75; }
.bbx-nuage { display: flex; flex-wrap: wrap; gap: 4px; }
.bbx-nuage .bib-mot.on { background: var(--chrome-texte); color: var(--blanc); }
.bbx-recherche { display: flex; align-items: center; gap: 10px; padding: 10px 14px; margin-bottom: 10px; border: 2px solid var(--chrome-texte); border-radius: 10px; background: var(--blanc); cursor: text; }
.bbx-recherche .ico { width: 20px; height: 20px; color: var(--chrome-texte); }
.bbx-recherche input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--gris-texte); font: inherit; font-size: 16px; }
.bbx-tri { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.bbx-liste { display: flex; flex-direction: column; gap: 10px; padding: 0; }
.bbx-carte { display: grid; grid-template-columns: minmax(0, 1fr) 180px; gap: 14px; }
.bbx-carte.a-revoir { border-color: var(--orange-bord); }
.bbx-carte-cote { display: flex; flex-direction: column; gap: 5px; padding-left: 14px; border-left: 1px solid var(--chrome-clair); font-size: 12px; color: var(--gris-doux); }
.bbx-regle { color: var(--vert-texte); font-weight: 700; }
.bbx-regle b { font-size: 20px; }
.bbx-regle.zero { color: var(--gris-doux); font-weight: 600; }
.bbx-revoir { display: inline-block; padding: 1px 8px; border-radius: 10px; background: var(--orange); color: var(--orange-texte); font-size: 11px; font-weight: 700; vertical-align: 2px; }
.bbx-raison { margin-top: 6px; font-size: 12px; color: var(--orange-texte); }
.bbx-surligne { background: #fff3a6; color: inherit; border-radius: 2px; padding: 0 1px; }
.bbx-etapes-mini { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.bbx-etapes-mini span { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 10px; background: var(--chrome-clair); font-size: 11.5px; }
.bbx-etapes-mini span i { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--chrome-texte); color: var(--blanc); font-size: 10px; font-style: normal; font-weight: 700; }
.bbx-etapes-mini .ico { width: 13px; height: 13px; }
.bbx-cote { display: flex; flex-direction: column; gap: 12px; }
.bbx-cote .rmx-boite h4 { display: flex; }
.bbx-cote .rmx-boite h4 .rmx-sub { margin: 0 0 0 auto; text-transform: none; letter-spacing: 0; font-weight: 600; }
.bbx-mois-barres { display: flex; align-items: flex-end; gap: 6px; height: 56px; margin: 10px 0 4px; }
.bbx-mois-barres i { flex: 1; border-radius: 3px 3px 0 0; background: var(--vert-bord); }
.bbx-mois-barres i.cette { background: var(--vert-texte); }
.bbx-ligne { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--chrome-clair); }
.bbx-ligne:first-child { border-top: 0; padding-top: 0; }
.bbx-ligne b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bbx-ligne .rmx-geste { margin-left: 0; }
.bbx-ligne .rmx-geste .ico { width: 15px; height: 15px; }
.bbx-top-ligne { display: grid; grid-template-columns: 22px minmax(0, 1fr) 40px; align-items: center; gap: 8px; width: 100%; padding: 5px 0; border: 0; background: none; color: var(--gris-texte); font: inherit; text-align: left; cursor: pointer; }
.bbx-top-ligne:hover span { text-decoration: underline; }
.bbx-top-ligne i { font-style: normal; font-weight: 800; color: var(--gris-doux); }
.bbx-top-ligne span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bbx-top-ligne b { text-align: right; color: var(--vert-texte); }
/* La fiche : étapes et verdict */
.bbx-verdict { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; padding: 10px 12px; border: 1px solid var(--sarcelle-bord); border-radius: 8px; background: var(--sarcelle); color: var(--sarcelle-texte); }
.bbx-verdict .rmx-geste { margin-left: 0; }
.bbx-verdict .rmx-sub { color: inherit; opacity: .85; }
.bbx-etapes { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.bbx-etape { display: grid; grid-template-columns: 32px minmax(0, 1fr) 200px auto; align-items: start; gap: 10px; }
.bbx-num { display: grid; place-items: center; width: 30px; height: 30px; margin-top: 2px; border-radius: 50%; background: var(--chrome-texte); color: var(--accent); font-weight: 800; }
html.sombre .bbx-num { color: #1b2228; }
.bbx-etape-photo { display: flex; flex-direction: column; gap: 6px; }
.bbx-mini { width: 100%; max-height: 120px; object-fit: cover; border-radius: 6px; border: 1px solid var(--bordure); }
.bbx-etape-gestes { display: flex; gap: 2px; }
.bbx-semblables { padding: 4px 12px 10px; font-size: 12px; color: var(--gris-doux); line-height: 1.5; }
/* Proposition d'archivage à la résolution */
.bbx-proposer { bottom: 80px; }
.bbx-proposer .ico { width: 18px; height: 18px; color: var(--accent); }
.bbx-proposer button { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; cursor: pointer; }
.bbx-proposer .bbx-proposer-oui { color: var(--accent); }
.bbx-proposer .bbx-proposer-non { color: #cfd6dc; }
@media (max-width: 1500px) {
  .bbx-grille { grid-template-columns: 200px minmax(0, 1fr); }
  .bbx-cote { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); }
}
html.sombre .bbx-surligne { background: #6b5a12; }.bbx-geste-ico { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--bordure); border-radius: 6px; background: var(--blanc); color: var(--gris-texte); cursor: pointer; }
.bbx-geste-ico .ico { width: 16px; height: 16px; }
.bbx-geste-ico:hover:not(:disabled) { border-color: var(--chrome-texte); }
.bbx-geste-ico[data-etape-retirer]:hover { color: var(--rouge-plein); }
.bbx-geste-ico:disabled { opacity: .35; cursor: default; }
.bbx-mini { max-height: 90px; }

/* ==================== Onglet Boîtiers dans l'esprit RMA (24/11/2026) ==================== */
.bsx-g-retard { --g: var(--rouge); --gf: var(--rouge-clair); --gt: var(--rouge); }
.bsx-g-poser { --g: var(--jaune-bord); --gf: var(--jaune); --gt: var(--chrome-texte); }
.bsx-g-client { --g: var(--violet-bord); --gf: var(--violet); --gt: var(--chrome-texte); }
.bsx-g-depot { --g: var(--vert-bord); --gf: var(--vert); --gt: var(--vert-texte); }
.bsx-zero, .bsx-rouge { color: var(--rouge) !important; }
.bsx-heure span.ko { background: var(--rouge); opacity: 1; }
.bsx-parc { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 10px; margin-bottom: 14px; }
.bsx-ref { background: var(--blanc); border: 1px solid var(--bordure); border-radius: 10px; padding: 10px 12px; }
.bsx-ref.bsx-hs { opacity: .55; }
.bsx-ref-tete { display: flex; align-items: baseline; gap: 10px; width: 100%; margin-bottom: 8px; padding: 0; border: 0; background: none; color: var(--gris-texte); font: inherit; text-align: left; cursor: pointer; }
.bsx-ref-tete b { color: var(--chrome-texte); }
.bsx-ref-tete span { font-size: 12px; color: var(--gris-doux); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bsx-ref-tete em { margin-left: auto; font-style: normal; font-size: 12px; font-weight: 700; color: var(--vert-texte); white-space: nowrap; }
.bsx-cases { display: flex; flex-wrap: wrap; gap: 6px; }
.bsx-case { display: grid; place-items: center; width: 62px; height: 46px; padding: 2px; border-radius: 6px; border: 2px solid var(--g); background: var(--gf); color: var(--gt); font: inherit; font-size: 10px; font-weight: 700; line-height: 1.1; overflow: hidden; text-overflow: ellipsis; word-break: break-word; cursor: pointer; }
.bsx-case .ico { width: 18px; height: 18px; }
.bsx-k-depot { --g: var(--vert-bord); --gf: var(--vert); --gt: var(--vert-texte); cursor: default; }
.bsx-k-client { --g: var(--violet-bord); --gf: var(--blanc); --gt: var(--chrome-texte); border-style: dashed; }
.bsx-k-retard { --g: var(--rouge); --gf: var(--rouge-clair); --gt: var(--rouge); border-style: dashed; }
.bsx-k-poser { --g: var(--jaune-bord); --gf: var(--jaune); --gt: var(--chrome-texte); }
.bsx-table td.rmx-c-age { width: 170px; }
.bsx-c-client { width: 26%; }
.bsx-c-mat { width: 18%; }
.bsx-c-prevu { width: 15%; }
.bsx-c-par { width: 60px; }
.bsx-tel { display: flex; align-items: center; gap: 5px; color: var(--chrome-texte); font-weight: 600; }
.bsx-tel .ico { width: 13px; height: 13px; }
.bsx-vide .diapason-symbole .fourche, .bsx-vide .diapason-symbole .onde { stroke: var(--vert-bord); }
@media (max-width: 1500px) { .bsx-parc { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); } }
/* ==================== Ma journée en lignes (25/11/2026) ==================== */
.mjx-rappel { display: flex; align-items: center; gap: 10px; width: calc(100% - 44px); margin: 0 22px 10px; padding: 9px 14px; border: 1px solid #c9caf3; border-radius: 8px; background: #ecebff; color: #2b2e8a; font: inherit; font-size: 13.5px; text-align: left; cursor: pointer; }
.mjx-rappel.hidden { display: none; }
.mjx-rappel .ico { width: 18px; height: 18px; flex: none; }
.mjx-rappel b { color: inherit; }
.mjx-quand { margin-left: auto; font-size: 15px; white-space: nowrap; }
.mjx-quand.passe { color: var(--rouge); }
.mjx-grille { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 14px; align-items: start; }
.mjx-g-retard { --gf: var(--rouge-clair); --gt: var(--rouge); }
.mjx-g-jour { --gf: var(--bleu-clair); --gt: var(--bleu); }
.mjx-g-termine { --gf: var(--vert); --gt: var(--vert-texte); }
.mjx-ligne { display: grid; grid-template-columns: 150px minmax(0, 1fr) 220px auto; gap: 14px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--chrome-clair); }
.mjx-ligne:first-child { border-top: 0; }
.mjx-ligne:hover { background: var(--chrome-clair); }
.mjx-age > b { display: block; font-size: 14px; font-variant-numeric: tabular-nums; color: var(--chrome-texte); }
.mjx-age .rmx-jauge { max-width: 140px; }
.mjx-ok { display: inline-flex !important; align-items: center; gap: 5px; color: var(--vert-texte) !important; }
.mjx-ok .ico { width: 15px; height: 15px; }
.mjx-pastille { display: inline-block; margin-top: 3px; padding: 1px 8px; border-radius: 10px; background: #ecebff; color: #2b2e8a; font-size: 11px; font-weight: 700; }
.mjx-client b { color: var(--chrome-texte); }
.mjx-client .mj-carte-num { margin-right: 6px; }
.mjx-motif { margin-top: 2px; color: var(--gris-texte); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.mjx-tel { font-size: 12.5px; }
.mjx-tel .mj-carte-tel { margin: 0 0 3px; }
.mjx-gestes { display: flex; align-items: center; justify-content: flex-end; gap: 8px; white-space: nowrap; }
.mjx-gestes .rmx-geste { margin-left: 0; }
.mjx-termine .mjx-ligne { opacity: .8; }
.mjx-termine .mjx-motif { color: var(--gris-doux); }
.mjx-menu { right: 8px; top: calc(100% - 6px); transform: none; }
.mjx-menu-titre { padding: 4px 9px 6px; font-size: 11px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--gris-doux); }
.mjx-cote { display: flex; flex-direction: column; gap: 12px; }
.mjx-arret { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; gap: 8px; width: 100%; padding: 6px 0; border: 0; border-top: 1px solid var(--chrome-clair); background: none; color: var(--gris-texte); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.mjx-arret:first-child { border-top: 0; }
.mjx-arret:disabled { cursor: default; }
.mjx-arret i { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--chrome-texte); color: var(--accent); font-style: normal; font-weight: 800; font-size: 11px; }
.mjx-arret span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mjx-arret small { font-size: 11px; color: var(--gris-doux); }
.mjx-arret.fait i { background: var(--vert-bord); color: #fff; }
.mjx-arret.fait span { text-decoration: line-through; color: var(--gris-doux); }
.mjx-tournee-gestes { display: flex; gap: 6px; margin-top: 8px; }
.mjx-tournee-gestes .rmx-geste { margin-left: 0; text-decoration: none; }
.mjx-jour h5 { display: flex; margin: 8px 0 4px; font-size: 11.5px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; color: var(--gris-doux); }
.mjx-jour:first-child h5 { margin-top: 0; }
.mjx-jour h5 span { margin-left: auto; }
.mjx-sem { display: block; width: 100%; padding: 4px 0; border: 0; background: none; color: var(--gris-texte); font: inherit; font-size: 13px; text-align: left; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mjx-sem:hover { color: var(--chrome-texte); text-decoration: underline; }
.mjx-sem em { font-style: normal; font-size: 11.5px; color: var(--gris-doux); }
@media (max-width: 1500px) { .mjx-grille { grid-template-columns: minmax(0, 1fr) 300px; } .mjx-ligne { grid-template-columns: 120px minmax(0, 1fr) 180px auto; } }
html.sombre .mjx-rappel { background: #2a2b4d; border-color: #46488a; color: #c9caff; }
html.sombre .mjx-pastille { background: #2a2b4d; color: #c9caff; }
html.sombre .mjx-arret.fait i { color: #1b1f23; }/* La page en lignes prend toute la largeur : l'en-tête suit le bord gauche des groupes. */
#view-ma-journee .mj-entete { max-width: none; width: auto; margin: 0 16px 10px; }
#view-ma-journee .mjx-rappel { width: calc(100% - 32px); margin: 0 16px 10px; }
.mjx-sem .mj-carte-num { margin-right: 6px; }
.mjx-tel .cell-tels { display: flex; flex-direction: column; align-items: flex-start; }
/* Les menus Reporter / Prolonger / Posé débordent du groupe : pas de rognage. */
#mjx-groupes .rmx-groupe { overflow: visible; }
#mjx-groupes .rmx-groupe > header { border-radius: 8px 8px 0 0; }
html.sombre .mjx-arret i { color: #1b1f23; }
