/* =====================================================================
   « Comptoir » — panneau FalPay et portail agent
   17/11/2026 (1) : refonte unslop (Damir Sokolovsky, @heydamir, CC BY 4.0).
   17/11/2026 (2) : alignement sur la maquette Figma validée
                    (ANBWS78G0OyTDJhS72hnKv, « 01 · Fondations » et « 02 · Composants »).

   Direction (inchangée)
   - Produit : l'outil de l'équipe FalPay pour monter puis veiller sur les
     plateformes de recharge de ses agents (dépôts Flooz / Mixx confirmés par SMS).
   - Caractère : posé, exact, un peu chaleureux.
   - Monde : un comptoir Mobile Money de quartier à Lomé.
   - Signature : la pastille d'état (vert, ambre, rouge).

   Ce que l'alignement Figma change, et pourquoi
   - Police : Inter variable (auto-hébergée) remplace DM Sans : c'est celle de la maquette.
   - Typo : sept styles seulement (Display, Titre 1/2/3, Corps, Corps fort, Petit,
     Étiquette). Les tailles bâtardes (12/13/14/17 px, .8rem, .9rem) convergent.
   - Formes : rayons 14 / 10 / 8 / 999. Filets 1 px « Ligne » partout, AUCUNE ombre,
     sauf les éléments flottants (menu « ⋯ », dialogues), et alors très douce.
   - Espacement : grille de 8 ; marges d'écran 40, gouttières 24, padding de carte 24,
     ligne de liste 67 px.
   - Boutons : M 40 px / S 32 px, rayon 10, quatre variantes (Primaire, Doux,
     Discret, Danger). Champs : 44 px, rayon 10.

   Chargé APRÈS app.css, saas.css et admin.css, seulement sur body.cpt.
   Aucune classe HTML n'est retirée : les anciennes pointent vers les nouveaux jetons.
   ===================================================================== */

@font-face { font-family: "Inter"; src: url("/static/fonts/Inter-var.woff2") format("woff2-variations"),
  url("/static/fonts/Inter-var.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

/* ============================================================== JETONS
   1. La palette brute de la maquette, préfixée --fp- (les noms courts --encre,
      --bleu, --vert… existent déjà dans app.css comme ALIAS : on ne les écrase pas
      par des valeurs fixes, sinon le mode sombre ne pourrait plus les suivre).
   2. Les jetons sémantiques que tout le CSS utilise (--ink, --line, --brand…),
      branchés sur la palette. C'est eux que le mode sombre redéfinit.
   3. Les anciens alias (app.css, soft.css, Python en ligne) rebranchés sur ces
      jetons sémantiques, pour que var(--vert) ou var(--success) donne la même
      couleur que la maquette à l'intérieur du panneau. */
body.cpt {
  /* 1. palette Figma — valeurs exactes */
  --fp-encre: #17181A; --fp-encre-2: #4A4C52; --fp-ardoise: #73757B; --fp-ligne: #E4E4E0;
  --fp-fond: #F5F5F3; --fp-surface: #FFFFFF; --fp-creux: #EFEFEC;
  --fp-bleu: #143C72; --fp-bleu-doux: #E8EDF4; --fp-bleu-fonce: #0E2B52;
  --fp-vert: #1F8A55; --fp-ambre: #B76E00; --fp-rouge: #C2362B;

  /* 2. jetons sémantiques */
  --bg: var(--fp-fond); --surface: var(--fp-surface); --surface-sunken: var(--fp-creux); --raised: var(--fp-creux);
  --line: var(--fp-ligne); --line-forte: var(--fp-ligne); /* la maquette n'a qu'un filet : « Ligne » */
  --ink: var(--fp-encre); --ink-2: var(--fp-encre-2); --ink-muted: var(--fp-ardoise);
  --brand: var(--fp-bleu); --brand-fort: var(--fp-bleu-fonce); --brand-doux: var(--fp-bleu-doux); --brand-ink: #FFFFFF;
  --brand-texte: var(--fp-bleu-fonce); /* texte posé sur --brand-doux (bouton Doux) */
  --ok: var(--fp-vert); --warn: var(--fp-ambre); --ko: var(--fp-rouge);
  --ok-doux: #E7F3EC; --warn-doux: #FBF0DE; --ko-doux: #FBE9E7; /* fonds d'avis, repris de saas.css */
  --pastille-neutre: var(--fp-ardoise);

  /* 3. anciens alias → jetons sémantiques */
  --bleu: var(--brand); --bleu-600: var(--brand); --bleu-400: var(--brand); --bleu-100: var(--brand-doux);
  --bleu-50: var(--surface-sunken); --encre: var(--ink); --ardoise: var(--ink-muted); --gris: var(--ink-muted);
  --fond: var(--bg); --bord: var(--line); --vert: var(--ok); --vert-100: var(--ok-doux);
  --rouge: var(--ko); --rouge-100: var(--ko-doux); --ambre-100: var(--warn-doux); --or-100: var(--warn-doux);
  --success: var(--ok); --warning: var(--warn); --danger: var(--ko); --brand-soft: var(--brand-doux);
  --success-soft: var(--ok-doux); --warning-soft: var(--warn-doux); --danger-soft: var(--ko-doux);
  --raise: none; --raise-sm: none; --press: none; --ombre: none;

  /* formes */
  --radius-lg: 14px; --radius-md: 10px; --radius-sm: 8px; --radius-pill: 999px;
  --r-l: var(--radius-lg); --r-m: var(--radius-md); --r-s: var(--radius-sm);
  /* la seule ombre permise : celle d'un élément qui flotte (menu, dialogue) */
  --ombre-flottante: 0 8px 24px rgba(23, 24, 26, .08), 0 1px 2px rgba(23, 24, 26, .04);
  --anneau: 0 0 0 3px var(--brand-doux);

  /* espacement (grille de 8) */
  --marge-ecran: 40px; --goutiere: 24px; --pad-carte: 24px; --ligne-liste: 67px;

  /* typographie : les sept styles de la maquette, en raccourci « font » */
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --police: var(--font-sans);
  --t-display:    600 40px/44px var(--font-sans);
  --t-titre-1:    600 28px/34px var(--font-sans);
  --t-titre-2:    600 20px/26px var(--font-sans);
  --t-titre-3:    500 17px/24px var(--font-sans);
  --t-corps:      400 15px/22px var(--font-sans);
  --t-corps-fort: 500 15px/22px var(--font-sans);
  --t-petit:      400 13px/18px var(--font-sans);
  --t-etiquette:  500 12px/16px var(--font-sans); /* + letter-spacing: var(--etiquette-ls) */
  --etiquette-ls: .06em;

  --courbe: cubic-bezier(.22, 1, .36, 1);
  font: var(--t-corps); color: var(--ink); background: var(--bg);
  font-feature-settings: "cv11", "ss01"; /* Inter : chiffres et « a » plus lisibles au guichet */
}

/* Mode sombre. Il n'était pas écrit ici, mais existait déjà par saas.css
   (:root… body.app, plus spécifique que .cpt). On le prolonge pour les jetons
   ajoutés ci-dessus, avec les valeurs sombres DÉJÀ présentes dans le projet
   (saas.css pour les neutres, soft.css pour le bleu #7BAAF0) — la maquette n'a
   pas de variante sombre. La page de connexion (sans .app) reste claire, comme avant. */
:root[data-theme="dark"] body.app.cpt {
  --fp-fond: #0E0E0F; --fp-surface: #161618; --fp-creux: #1E1E21; --fp-ligne: #27272B;
  --fp-encre: #EDEDEE; --fp-encre-2: #C4C5C9; --fp-ardoise: #8E9096;
  --bg: var(--fp-fond); --surface: var(--fp-surface); --surface-sunken: var(--fp-creux); --line: var(--fp-ligne);
  --ink: var(--fp-encre); --ink-2: var(--fp-encre-2); --ink-muted: var(--fp-ardoise);
  --brand: #7BAAF0; --brand-ink: #0B1A2E; --brand-fort: #A3C4F5; --brand-doux: rgba(123, 170, 240, .14); --brand-texte: #A3C4F5;
  --ok: #4CC38A; --warn: #E0A341; --ko: #F07A6E;
  --ok-doux: rgba(76, 195, 138, .12); --warn-doux: rgba(224, 163, 65, .12); --ko-doux: rgba(240, 122, 110, .12);
  --ombre-flottante: 0 8px 24px rgba(0, 0, 0, .40);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body.app.cpt {
    --fp-fond: #0E0E0F; --fp-surface: #161618; --fp-creux: #1E1E21; --fp-ligne: #27272B;
    --fp-encre: #EDEDEE; --fp-encre-2: #C4C5C9; --fp-ardoise: #8E9096;
    --bg: var(--fp-fond); --surface: var(--fp-surface); --surface-sunken: var(--fp-creux); --line: var(--fp-ligne);
    --ink: var(--fp-encre); --ink-2: var(--fp-encre-2); --ink-muted: var(--fp-ardoise);
    --brand: #7BAAF0; --brand-ink: #0B1A2E; --brand-fort: #A3C4F5; --brand-doux: rgba(123, 170, 240, .14); --brand-texte: #A3C4F5;
    --ok: #4CC38A; --warn: #E0A341; --ko: #F07A6E;
    --ok-doux: rgba(76, 195, 138, .12); --warn-doux: rgba(224, 163, 65, .12); --ko-doux: rgba(240, 122, 110, .12);
    --ombre-flottante: 0 8px 24px rgba(0, 0, 0, .40);
  }
}

/* ------------------------------------------------------------- bases */
body.cpt *, body.cpt *::before, body.cpt *::after { letter-spacing: 0; }
body.cpt h1 { font: var(--t-titre-1); margin: 0 0 8px; }
body.cpt h2 { font: var(--t-titre-2); margin: 0 0 8px; }
body.cpt h3 { font: var(--t-titre-3); margin: 0 0 8px; }
body.cpt b, body.cpt strong { font-weight: 600; }
body.cpt a { color: var(--brand); font-weight: 500; }
body.cpt a:hover { text-decoration: none; color: var(--brand-fort); }
/* focus clavier : anneau 2 px Bleu, décalé de 2 px, sur tout ce qui se tabule */
body.cpt :focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
body.cpt .small, body.cpt small { font: var(--t-petit); }
body.cpt .muted { color: var(--ink-muted); }
/* Étiquette : petit libellé en casse de phrase, interlettré +6 % */
body.cpt .etiquette { font: var(--t-etiquette); letter-spacing: var(--etiquette-ls); color: var(--ink-muted); }

/* ------------------------------------------------------------- coquille
   Changement : marges d'écran 40, entrée de navigation 40 px, icône 20, libellé
   Corps ; l'actif reprend la barre verticale de 3 px de la maquette. */
body.cpt .app-shell { min-height: 100vh; }
body.cpt .side { width: 248px; background: var(--surface) !important; border-right: 1px solid var(--line); padding: 24px 16px;
  display: flex; flex-direction: column; gap: 24px; }
body.cpt .side .brand { display: flex; align-items: center; gap: 8px; padding: 4px 12px; color: var(--ink);
  font: var(--t-titre-3); font-weight: 600; text-decoration: none; }
body.cpt .side .brand .logo { width: 24px; height: 24px; color: var(--brand); }
body.cpt .side .brand small { margin-left: auto; font: var(--t-etiquette); letter-spacing: var(--etiquette-ls); color: var(--ink-muted); }
body.cpt .side nav { display: flex; flex-direction: column; gap: 2px; }
/* Entrée de navigation */
body.cpt .side nav a { display: flex; align-items: center; gap: 12px; height: 40px; min-height: 40px; padding: 0 12px;
  border: 0; border-radius: var(--radius-sm); color: var(--ink-2); font: var(--t-corps); text-decoration: none; position: relative;
  transition: background-color .15s var(--courbe), color .15s var(--courbe); box-shadow: none; }
body.cpt .side nav a::before { content: ""; display: block; position: absolute; left: -8px; top: 10px; bottom: 10px; width: 3px;
  border-radius: var(--radius-pill); background: transparent; }
body.cpt .side nav a svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round; color: var(--ink-muted); }
body.cpt .side nav a:hover { background: var(--surface-sunken); color: var(--ink); }
body.cpt .side nav a.on { background: var(--brand-doux); color: var(--brand); border: 0; font-weight: 500;
  /* 17/11/2026 : la barre de 3 px est peinte DANS la pastille (inset), plus par
     un pseudo-élément à left:-8px : le `overflow: clip` qui garde chaque entrée
     sur une ligne coupait ce débordement, la barre n'apparaissait jamais. */
  box-shadow: inset 3px 0 0 var(--brand); }
body.cpt .side nav a.on::before { background: transparent; }
body.cpt .side nav a.on svg { color: var(--brand); }
body.cpt .side-foot { margin-top: auto; background: transparent !important; border: 0; border-top: 1px solid var(--line); border-radius: 0;
  box-shadow: none; padding: 16px 8px 0; display: flex; flex-direction: column; gap: 16px; }
body.cpt .cpt-moi { display: flex; align-items: center; gap: 12px; }
body.cpt .cpt-moi b { display: block; font: var(--t-corps-fort); }
body.cpt .cpt-moi span { display: block; font: var(--t-petit); color: var(--ink-muted); }
body.cpt .cpt-moi .adm-avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; flex: none;
  font: var(--t-etiquette); background: var(--surface-sunken); color: var(--ink-2); }
body.cpt .cpt-liens { display: flex; gap: 16px; font: var(--t-petit); }
body.cpt .cpt-liens a, body.cpt .cpt-liens button { color: var(--ink-muted); font: var(--t-petit);
  background: none; border: 0; padding: 0; cursor: pointer; }
body.cpt .cpt-liens a:hover, body.cpt .cpt-liens button:hover { color: var(--ink); }
/* compteur de la navigation : une pastille, pas une étiquette carrée */
body.cpt .adm-pastille { min-width: 20px; height: 20px; padding: 0 6px; font: var(--t-etiquette);
  color: var(--warn); background: var(--warn-doux); border-radius: var(--radius-pill); }

body.cpt .app-main { min-width: 0; }
body.cpt .app-top { position: static; background: transparent; backdrop-filter: none; border: 0;
  padding: 40px var(--marge-ecran) 0; display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; min-height: 0; }
body.cpt .app-top .cpt-titre { flex: 1; min-width: 0; }
body.cpt .app-top h1 { margin: 0; font: var(--t-titre-1); }
body.cpt .app-top .cpt-sous, body.cpt .app-top .sous { display: block; margin-top: 4px; font: var(--t-corps); color: var(--ink-muted); }
body.cpt .app-top .cpt-actions { display: flex; gap: 8px; }
/* le corps : gouttière 24 entre blocs, portée par le gap (app.css le met en colonne) */
body.cpt .app-body { padding: var(--goutiere) var(--marge-ecran) 48px; max-width: 1440px; gap: var(--goutiere); }
body.cpt .app-body > .card, body.cpt .app-body > .notice, body.cpt .app-body > .cpt-barre,
body.cpt .app-body > .cpt-chiffres { margin-bottom: 0; }
body.cpt .burger { background: var(--surface); border: 1px solid var(--line); box-shadow: none; border-radius: var(--radius-md);
  font: var(--t-corps-fort); }
@media (max-width: 900px) {
  body.cpt { --marge-ecran: 16px; }
  body.cpt .app-top { padding-top: 24px; }
  body.cpt .app-body { padding: 16px var(--marge-ecran) 40px; }
  body.cpt .app-top h1 { font: var(--t-titre-2); }
}

/* ---------------------------------------------------------- composants */

/* Carte : surface, filet 1 px, rayon 14 ; l'en-tête (titre + action) est séparé
   du corps par un filet — c'est le changement le plus visible. Padding 24. */
body.cpt .card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: none; margin: 0 0 var(--goutiere); padding: 0; overflow: hidden; }
body.cpt .card-hd { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 12px var(--pad-carte);
  border-bottom: 1px solid var(--line); flex-wrap: wrap; }
body.cpt .card-hd h2 { flex: 1; margin: 0; font: var(--t-corps-fort); }
body.cpt .card-hd a, body.cpt .card-act { font: var(--t-petit); font-weight: 500; }
body.cpt .card-bd { padding: var(--pad-carte); }
body.cpt .card-ft { padding: 16px var(--pad-carte); border-top: 1px solid var(--line); background: transparent; }

/* Bouton : M 40 / S 32, rayon 10.
   .btn seul = Discret (filet Ligne, texte Encre 2) ; .primary = Primaire ;
   .doux = Doux ; .danger = Danger ; .ghost (existant) = Discret sans filet. */
body.cpt .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 16px; border-radius: var(--radius-md); font: var(--t-corps-fort);
  background: var(--surface); color: var(--ink-2); border: 1px solid var(--line); box-shadow: none; transform: none;
  transition: background-color .15s var(--courbe), border-color .15s var(--courbe), color .15s var(--courbe), transform .12s var(--courbe); }
body.cpt .btn:hover { background: var(--surface-sunken); color: var(--ink); transform: none; text-decoration: none; }
body.cpt .btn:active { transform: scale(.98); box-shadow: none; }
body.cpt .btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
body.cpt .btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
body.cpt .btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
body.cpt .btn.primary:hover { background: var(--brand-fort); border-color: var(--brand-fort); color: var(--brand-ink); }
body.cpt .btn.doux { background: var(--brand-doux); border-color: var(--brand-doux); color: var(--brand-texte); }
body.cpt .btn.doux:hover { background: color-mix(in srgb, var(--brand) 12%, var(--brand-doux));
  border-color: transparent; color: var(--brand-texte); }
body.cpt .btn.discret { background: var(--surface); border-color: var(--line); color: var(--ink-2); }
body.cpt .btn.danger { background: var(--surface); border-color: var(--line); color: var(--ko); }
body.cpt .btn.danger:hover { background: var(--surface-sunken); color: var(--ko); }
body.cpt .btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
body.cpt .btn.ghost:hover { background: var(--surface-sunken); color: var(--ink); }
body.cpt .btn.ghost.danger { color: var(--ko); }
body.cpt .btn.sm { min-height: 32px; padding: 0 12px; font: var(--t-petit); font-weight: 500; border-radius: var(--radius-sm); }
/* .lg n'existe pas dans la maquette : gardé pour la connexion, aligné sur la hauteur d'un champ */
body.cpt .btn.lg { min-height: 44px; padding: 0 20px; font: var(--t-corps-fort); }

/* Champ : libellé Étiquette, zone 44 px, filet Ligne, focus = filet Bleu + anneau,
   aide en Petit Ardoise, erreur en Rouge (aria-invalid ou .erreur). */
body.cpt input:not([type=checkbox]):not([type=radio]):not([type=color]), body.cpt select, body.cpt textarea {
  height: 44px; padding: 0 12px; border-radius: var(--radius-md) !important; border: 1px solid var(--line) !important;
  background: var(--surface) !important; box-shadow: none !important; font: var(--t-corps); color: var(--ink); }
body.cpt textarea { height: auto; min-height: 88px; padding: 10px 12px; }
body.cpt input::placeholder, body.cpt textarea::placeholder { color: var(--ink-muted); opacity: 1; }
body.cpt input:focus, body.cpt select:focus, body.cpt textarea:focus { outline: none; border-color: var(--brand) !important;
  box-shadow: var(--anneau) !important; }
body.cpt input:focus-visible, body.cpt select:focus-visible, body.cpt textarea:focus-visible { outline: none; }
body.cpt input[aria-invalid="true"], body.cpt select[aria-invalid="true"], body.cpt textarea[aria-invalid="true"],
body.cpt .erreur input, body.cpt .erreur select, body.cpt .erreur textarea,
body.cpt input.erreur, body.cpt select.erreur, body.cpt textarea.erreur { border-color: var(--ko) !important; }
body.cpt input[aria-invalid="true"]:focus, body.cpt .erreur input:focus, body.cpt input.erreur:focus {
  box-shadow: 0 0 0 3px var(--ko-doux) !important; }
body.cpt .form { display: grid; gap: 16px; }
body.cpt .form > div { gap: 8px; }
body.cpt .form label, body.cpt label { display: block; margin-bottom: 8px; font: var(--t-etiquette); letter-spacing: var(--etiquette-ls);
  color: var(--ink-2); text-transform: none; }
body.cpt .form > div > label { margin-bottom: 0; } /* le gap de 8 suffit */
body.cpt label.case, body.cpt .case { display: flex; align-items: center; gap: 8px; font: var(--t-corps); letter-spacing: 0; color: var(--ink); }
body.cpt .cases { gap: 8px 24px; }
body.cpt .form input:not([type=checkbox]):not([type=radio]), body.cpt .form select { width: 100%; }
body.cpt .aide { display: block; margin-top: 4px; font: var(--t-petit); color: var(--ink-muted); }
body.cpt .aide.erreur, body.cpt .erreur .aide, body.cpt .warn-t { color: var(--ko); }

/* Avis : plat, filet, fond doux de la couleur d'état */
body.cpt .notice { border-radius: var(--radius-md); padding: 12px 16px; font: var(--t-corps); margin: 0 0 var(--goutiere);
  background: var(--brand-doux); color: var(--ink); border: 1px solid var(--line); }
body.cpt .notice.ok { background: var(--ok-doux); } body.cpt .notice.warn { background: var(--warn-doux); }
body.cpt .notice.ko { background: var(--ko-doux); }

/* Badge d'état : pastille 8 px + libellé, fond Creux, sans filet. La couleur
   ne sert qu'à la pastille — le texte reste en Encre 2.
   .ok = Actif, .warn = En attente, .ko = Suspendu, sans classe = Neutre. */
body.cpt .badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px;
  border: 0; border-radius: var(--radius-pill); font: var(--t-etiquette); letter-spacing: 0; text-transform: none;
  background: var(--surface-sunken); color: var(--ink-2); white-space: nowrap; }
body.cpt .badge::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--pastille-neutre); }
body.cpt .badge.ok, body.cpt .badge.warn, body.cpt .badge.ko { background: var(--surface-sunken); color: var(--ink-2); }
body.cpt .badge.ok::before { background: var(--ok); }
body.cpt .badge.warn::before { background: var(--warn); }
body.cpt .badge.ko::before { background: var(--ko); }

body.cpt .empty { margin: 8px 0; color: var(--ink-muted); font: var(--t-corps); }

/* Ligne de liste : 67 px, repère 20 px, titre Corps fort, sous-titre Petit Ardoise,
   valeur à droite en chiffres tabulaires, action à droite. */
body.cpt .list-item { display: flex; align-items: center; gap: 12px; min-height: var(--ligne-liste); padding: 12px 0;
  border-bottom: 1px solid var(--line); }
body.cpt .list-item:last-child { border-bottom: 0; }
body.cpt .li-ico { width: 20px; height: 20px; border-radius: 0; background: none; box-shadow: none; color: var(--ink-muted);
  font: var(--t-etiquette); }
body.cpt .li-ico svg { width: 20px; height: 20px; }
body.cpt .li-ico:empty { display: none; }
body.cpt .li-t { font: var(--t-corps-fort); color: var(--ink); }
body.cpt .li-s { font: var(--t-petit); color: var(--ink-muted); }
body.cpt .li-fin { gap: 12px; font: var(--t-corps-fort); font-variant-numeric: tabular-nums; }
body.cpt .li-val { margin-left: auto; font: var(--t-corps-fort); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }

/* La signature : la pastille d'état (téléphones, agents, tâches). Plate, 8 px :
   le halo de 3 px était une ombre, la maquette n'en a pas. */
body.cpt .pt, body.cpt .tel-dot { flex: none; display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--pastille-neutre); box-shadow: none; }
body.cpt .pt.ok, body.cpt .tel-dot.ok { background: var(--ok); box-shadow: none; }
body.cpt .pt.warn, body.cpt .tel-dot.warn { background: var(--warn); box-shadow: none; }
body.cpt .pt.ko, body.cpt .tel-dot.ko { background: var(--ko); box-shadow: none; }
body.cpt .tel-dot.off { background: var(--line); }
body.cpt .g-voyant { font: var(--t-petit); font-weight: 500; }
body.cpt .g-voyant i, body.cpt .g-voyant-ok i, body.cpt .g-voyant-warn i, body.cpt .g-voyant-ko i { box-shadow: none; }

/* KPI : libellé Étiquette, valeur Titre 1, variation en Petit colorée.
   Trois familles dans le HTML : .cpt-chiffre (admin), .kpi et .d-kpi (portail). */
body.cpt .cpt-chiffre span, body.cpt .kpi-l, body.cpt .d-kpi-l {
  display: block; font: var(--t-etiquette); letter-spacing: var(--etiquette-ls); color: var(--ink-muted); text-transform: none; }
body.cpt .cpt-chiffre b, body.cpt .kpi strong, body.cpt .d-kpi-v {
  display: block; margin: 8px 0 4px; font: var(--t-titre-1); color: var(--ink); letter-spacing: -.01em;
  font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.cpt .cpt-chiffre small, body.cpt .kpi-s, body.cpt .d-kpi-s { display: block; margin: 0; min-height: 0; font: var(--t-petit); color: var(--ink-muted); }
body.cpt .d-pastille { padding: 0; background: none !important; font: var(--t-petit); font-weight: 500; font-variant-numeric: tabular-nums; }
body.cpt .d-pastille.up { color: var(--ok); } body.cpt .d-pastille.down { color: var(--ko); }
body.cpt .kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: none;
  padding: var(--pad-carte); gap: 0; }
body.cpt .kpis { gap: var(--goutiere); }
/* le portail passe d'une bande de chiffres à des cartes KPI séparées, comme la maquette */
body.cpt .d-kpis { gap: var(--goutiere); background: none; border: 0; border-radius: 0; overflow: visible; }
body.cpt .d-kpis .d-kpi, body.cpt .d-kpis .d-kpi:first-child, body.cpt .d-kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 20px var(--pad-carte); box-shadow: none; }
@media (max-width: 1100px) { body.cpt .d-kpis .d-kpi:nth-child(3) { border-left: 1px solid var(--line); }
  body.cpt .d-kpis .d-kpi:nth-child(n+3) { border-top: 1px solid var(--line); } }
@media (max-width: 560px) { body.cpt .d-kpis .d-kpi { padding: 16px; } body.cpt .d-kpi-v { font: var(--t-titre-2); font-variant-numeric: tabular-nums; } }

/* Tableaux et onglets du portail : même échelle */
body.cpt .table { font: var(--t-corps); font-variant-numeric: tabular-nums; }
body.cpt .table th, body.cpt .table td { padding: 12px; border-bottom: 1px solid var(--line); }
body.cpt .table th { font: var(--t-etiquette); letter-spacing: var(--etiquette-ls); color: var(--ink-muted); text-transform: none; }
body.cpt .tabs { gap: 8px; }
body.cpt .tab { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: var(--radius-sm);
  background: transparent; border: 1px solid transparent; box-shadow: none; font: var(--t-petit); font-weight: 500; color: var(--ink-2); }
body.cpt .tab:hover { background: var(--surface-sunken); color: var(--ink); text-decoration: none; }
body.cpt .tab.on { background: var(--brand-doux); color: var(--brand); box-shadow: none; }
body.cpt code, body.cpt kbd, body.cpt pre { font-size: 13px; line-height: 18px; }
body.cpt details.regle { border-radius: var(--radius-md); padding: 12px 16px; background: var(--surface-sunken); }
body.cpt details.regle summary { font: var(--t-corps-fort); }
body.cpt .qr { box-shadow: none; border: 1px solid var(--line); }
body.cpt .sms-row { border-radius: var(--radius-md); }
body.cpt .sms-head { font: var(--t-corps-fort); }
body.cpt .sms-body { font-size: 13px; line-height: 18px; }
body.cpt .sms-lu { font: var(--t-petit); }

/* ---------------------------------------------------------- vue d'ensemble */
body.cpt .cpt-chiffres { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--goutiere); margin-bottom: var(--goutiere); }
body.cpt .cpt-chiffre { display: block; padding: 20px var(--pad-carte); background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); color: var(--ink); text-decoration: none; transition: border-color .15s var(--courbe); }
body.cpt a.cpt-chiffre:hover { border-color: var(--ink-muted); }
/* 17/11/2026 : les quatre chiffres de la vue d'ensemble sont en Encre, comme la
   maquette. La classe « cle » (4e chiffre) les colorait en Bleu, ce qui faisait
   lire ce chiffre comme un lien au milieu des trois autres. */
body.cpt .cpt-chiffre.cle b { color: var(--ink); }
body.cpt .cpt-rangee { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: var(--goutiere); align-items: start; }
body.cpt .cpt-rangee > .card, body.cpt .cpt-pile > .card { margin: 0; }
body.cpt .cpt-pile { display: grid; gap: var(--goutiere); }
body.cpt .cpt-rangee + .cpt-rangee { margin-top: var(--goutiere); }
body.cpt .d-grille { gap: var(--goutiere); }
body.cpt .d-grille + .d-grille, body.cpt .d-grille + .card, body.cpt .card + .d-grille { margin-top: var(--goutiere); }
body.cpt .d-grille > div > .card + .card { margin-top: var(--goutiere); }
/* bandeau en pied de carte : il déborde du padding de 24 pour toucher les bords */
body.cpt .d-bandeau { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: var(--pad-carte) calc(-1 * var(--pad-carte)) calc(-1 * var(--pad-carte)); border-top: 1px solid var(--line); }
body.cpt .d-bandeau > div { padding: 12px var(--pad-carte); border: 0; }
body.cpt .d-bandeau > div + div { border-left: 1px solid var(--line); }
body.cpt .d-bandeau span { display: block; font: var(--t-etiquette); letter-spacing: var(--etiquette-ls); color: var(--ink-muted); text-transform: none; }
body.cpt .d-bandeau b { display: block; margin-top: 4px; font: var(--t-corps-fort); font-variant-numeric: tabular-nums; }
body.cpt .g-vide { margin: 0; padding: 48px 0; text-align: center; color: var(--ink-muted); font: var(--t-corps); }
body.cpt .g-axe { font-size: 12px; }
body.cpt .g-legende, body.cpt .g-leg, body.cpt .g-barres-t { font: var(--t-petit); }
body.cpt .g-barres-s, body.cpt .g-centre span, body.cpt .g-jauge-v span { font: var(--t-etiquette); }
body.cpt .g-centre b, body.cpt .g-jauge-v b { font: var(--t-titre-2); font-variant-numeric: tabular-nums; }
/* « état » et « à traiter » : lignes courtes (un seul texte), 44 px */
body.cpt .cpt-etat { list-style: none; margin: 0; padding: 0; }
body.cpt .cpt-etat li { display: flex; align-items: center; gap: 12px; min-height: 44px; border-bottom: 1px solid var(--line); font: var(--t-corps); }
body.cpt .cpt-etat li:last-child { border-bottom: 0; }
body.cpt .cpt-etat a { display: flex; align-items: center; gap: 12px; flex: 1; min-height: 44px; color: var(--ink); font-weight: 400; text-decoration: none; }
body.cpt .cpt-etat a:hover span:not(.pt) { color: var(--brand); }
body.cpt .cpt-etat .t { flex: 1; min-width: 0; }
body.cpt .cpt-etat .n { font: var(--t-corps-fort); font-variant-numeric: tabular-nums; color: var(--ink-2); }
/* fil d'activité : titre + sous-titre + heure = une ligne de liste, 67 px */
body.cpt .cpt-fil { list-style: none; margin: 0; padding: 0; }
body.cpt .cpt-fil li { display: grid; grid-template-columns: 1fr auto; align-content: center; gap: 2px 12px; min-height: var(--ligne-liste);
  padding: 12px 0; border-bottom: 1px solid var(--line); }
body.cpt .cpt-fil li:last-child { border-bottom: 0; }
body.cpt .cpt-fil .t { font: var(--t-corps-fort); } body.cpt .cpt-fil .d { font: var(--t-petit); color: var(--ink-muted); }
body.cpt .cpt-fil time { grid-row: 1 / span 2; grid-column: 2; align-self: center; font: var(--t-petit); color: var(--ink-muted); font-variant-numeric: tabular-nums; }
/* anciennes listes de admin.css (« À traiter ») */
body.cpt .adm-todo a { padding: 12px 0; }
body.cpt .adm-todo .adm-todo-t { font: var(--t-corps); }
body.cpt .adm-todo b { font: var(--t-etiquette); font-variant-numeric: tabular-nums; border-radius: var(--radius-pill); }
body.cpt .adm-calme { font: var(--t-corps); }
@media (max-width: 1100px) { body.cpt .cpt-chiffres { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.cpt .cpt-rangee { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { body.cpt .cpt-chiffres { grid-template-columns: minmax(0, 1fr); }
  body.cpt .d-bandeau { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.cpt .d-bandeau > div:nth-child(3) { border-left: 0; } body.cpt .d-bandeau > div:nth-child(n+3) { border-top: 1px solid var(--line); } }

/* --------------------------------------------------------- téléphones */
body.cpt .tel-grille { gap: var(--goutiere); }
body.cpt .tel-carte { padding: var(--pad-carte); gap: var(--goutiere); border-radius: var(--radius-lg); }
body.cpt .tel-nom { font: var(--t-titre-3); }
body.cpt .tel-op { font: var(--t-petit); }
body.cpt .tel-etat { font: var(--t-corps); }
body.cpt .tel-pct { font: var(--t-titre-1); font-variant-numeric: tabular-nums; }
body.cpt .tel-pct small { font: var(--t-petit); margin-top: 4px; }
body.cpt .tel-faits span { font: var(--t-etiquette); letter-spacing: var(--etiquette-ls); }
body.cpt .tel-faits b { font: var(--t-corps-fort); font-variant-numeric: tabular-nums; }
body.cpt .d-tel { min-height: var(--ligne-liste); padding: 12px 0; }
body.cpt .d-tel-n b { font: var(--t-corps-fort); } body.cpt .d-tel-n span { font: var(--t-petit); }
body.cpt .d-tel-b { font: var(--t-petit); font-variant-numeric: tabular-nums; }
body.cpt .d-sante-l span { font: var(--t-petit); }
body.cpt .d-sante-l b { font: var(--t-titre-2); font-variant-numeric: tabular-nums; }
body.cpt .d-sante2 small, body.cpt .d-sante-tel { font: var(--t-petit); }
/* batterie (maquette : 24 × 12, rayon 2, trait 2 px) pour la petite variante */
body.cpt .batt.petite .batt-corps { width: 24px; height: 12px; border-width: 2px; border-radius: 2px; padding: 1px; }

/* --------------------------------------------------------------- agents */
body.cpt .cpt-barre { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: var(--goutiere); }
/* filtres : boutons S discrets ; l'actif prend le bleu doux de la navigation */
body.cpt .adm-filtre { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 12px;
  border-radius: var(--radius-sm); font: var(--t-petit); font-weight: 500;
  color: var(--ink-2); background: transparent; border: 1px solid transparent; text-decoration: none; }
body.cpt .adm-filtre b { margin-left: 4px; font: var(--t-petit); color: var(--ink-muted); font-variant-numeric: tabular-nums; }
body.cpt .adm-filtre:hover { background: var(--surface-sunken); color: var(--ink); text-decoration: none; }
body.cpt .adm-filtre.on { background: var(--brand-doux); border-color: transparent; color: var(--brand); }
body.cpt .adm-filtre.on b { color: var(--brand); }
body.cpt .adm-recherche { margin-left: auto; flex: 0 1 320px; display: flex; gap: 8px; }
body.cpt .adm-recherche input { flex: 1; height: 32px !important; font: var(--t-petit); }
body.cpt .adm-recherche .btn { min-height: 32px; }

/* La fiche agent, façon reçu de comptoir : une ligne de liste de 67 px. */
body.cpt .cpt-agents { list-style: none; margin: 0; padding: 0; }
body.cpt .cpt-agent { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr) 200px;
  align-items: center; gap: 16px; min-height: var(--ligne-liste); padding: 12px var(--pad-carte); border-bottom: 1px solid var(--line); }
body.cpt .cpt-agent:last-child { border-bottom: 0; }
body.cpt .cpt-agent .qui { display: flex; align-items: center; gap: 12px; min-width: 0; }
body.cpt .cpt-agent .nom { display: block; font: var(--t-corps-fort); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.cpt .cpt-agent .contact { display: block; font: var(--t-petit); color: var(--ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.cpt .cpt-agent .champ span { display: block; font: var(--t-etiquette); letter-spacing: var(--etiquette-ls); color: var(--ink-muted); }
body.cpt .cpt-agent .champ b { display: block; font: var(--t-corps); font-variant-numeric: tabular-nums; }
body.cpt .cpt-agent .champ b.ko { color: var(--ko); } body.cpt .cpt-agent .champ b.warn { color: var(--warn); }
body.cpt .cpt-agent .gestes { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
body.cpt .cpt-agent form { margin: 0; }
body.cpt .cpt-agent .nouveau { margin-left: 8px; font: var(--t-etiquette); color: var(--warn); }
/* menu « ⋯ » : élément flottant, donc la seule ombre (douce) du panneau */
body.cpt .cpt-plus { position: relative; }
body.cpt .cpt-plus > summary { list-style: none; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px;
  border-radius: var(--radius-sm); color: var(--ink-2); cursor: pointer; border: 1px solid transparent; }
body.cpt .cpt-plus > summary::-webkit-details-marker { display: none; }
body.cpt .cpt-plus > summary:hover, body.cpt .cpt-plus[open] > summary { background: var(--surface-sunken); }
body.cpt .cpt-plus > summary svg { width: 20px; height: 20px; fill: currentColor; }
body.cpt .cpt-menu { position: absolute; right: 0; top: 40px; z-index: 10; width: 248px; padding: 8px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--ombre-flottante);
  display: grid; gap: 8px; animation: cpt-ouvre .18s var(--courbe); }
body.cpt .cpt-menu .ligne { display: flex; gap: 8px; align-items: center; }
body.cpt .cpt-menu select { flex: 1; height: 32px !important; font: var(--t-petit); }
body.cpt .cpt-menu .btn { width: 100%; justify-content: flex-start; }
body.cpt .cpt-menu .ligne .btn { width: auto; }
body.cpt .cpt-menu .btn.danger { color: var(--ko); }
@keyframes cpt-ouvre { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (max-width: 900px) {
  body.cpt .cpt-agent { grid-template-columns: minmax(0, 1fr) auto; padding: 12px 16px; }
  body.cpt .cpt-agent .champ { display: none; }
  body.cpt .adm-recherche { margin-left: 0; flex: 1 1 100%; }
}
body.cpt .cpt-contact { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; font: var(--t-corps); }
body.cpt .cpt-contact p { flex: 1; margin: 0; min-width: 240px; }

/* Dialogues (nouvel agent, contact du site) : flottants, donc ombre douce ; rayon 14, padding 24 */
body.cpt .adm-modale { padding: var(--pad-carte); border-radius: var(--radius-lg); width: min(480px, calc(100vw - 32px));
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--ombre-flottante); }
body.cpt .adm-modale::backdrop { background: rgba(23, 24, 26, .4); }
body.cpt .adm-modale h2 { margin: 0 0 4px; font: var(--t-titre-2); }
body.cpt .adm-modale .cpt-intro { margin: 0 0 16px; font: var(--t-corps); color: var(--ink-muted); }
body.cpt .adm-canal .case { font: var(--t-corps-fort); }
body.cpt .cpt-2col, body.cpt .adm-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 520px) { body.cpt .cpt-2col, body.cpt .adm-2col { grid-template-columns: 1fr; } }
body.cpt .adm-modale-pied { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
body.cpt .adm-modale-pied .btn, body.cpt .cpt-menu .ligne .btn, body.cpt .cpt-agent .btn, body.cpt .adm-recherche .btn { width: auto; }
/* app.css met chaque enfant direct d'un .form en colonne : pas le pied ni la rangée double */
body.cpt .form > .adm-modale-pied { flex-direction: row; justify-content: flex-end; align-items: center; }
body.cpt .form > .cpt-2col { display: grid; }
body.cpt .form > .cpt-2col > div { display: flex; flex-direction: column; }

/* -------------------------------------------------------------- connexion
   Le panneau est posé sur la photo, il ne flotte pas : filet, pas d'ombre. */
body.cpt.cpt-auth { margin: 0; min-height: 100vh; display: grid; grid-template-columns: minmax(380px, 464px) 1fr;
  background: #10294f url("/static/img/admin/comptoir.webp") 70% center / cover no-repeat; }
body.cpt-auth .cpt-auth-panneau { display: flex; flex-direction: column; justify-content: center; gap: var(--goutiere);
  padding: 48px var(--marge-ecran); margin: 24px 0 24px 24px; background: var(--surface); border-radius: var(--radius-lg);
  border: 1px solid var(--line); box-shadow: none; }
body.cpt-auth .cpt-auth-marque { display: flex; align-items: center; gap: 8px; color: var(--ink); font: var(--t-titre-3); font-weight: 600; }
body.cpt-auth .cpt-auth-marque .logo { width: 24px; height: 24px; color: var(--brand); }
body.cpt-auth h1 { margin: 0 0 4px; font: var(--t-titre-1); }
body.cpt-auth .adm-auth-intro { margin: 0; font: var(--t-corps); color: var(--ink-muted); }
body.cpt-auth .adm-auth-alt { margin: 16px 0 0; }
body.cpt-auth .btn.lg { width: 100%; }
body.cpt-auth .adm-code { height: 56px !important; font: var(--t-titre-2) !important; letter-spacing: .3em; text-align: center;
  font-variant-numeric: tabular-nums; }
body.cpt-auth .cpt-auth-pied { margin: 0; font: var(--t-petit); color: var(--ink-muted); }
body.cpt-auth .cpt-auth-pied a { color: var(--ink-2); }
@media (max-width: 760px) {
  body.cpt.cpt-auth { grid-template-columns: 1fr; align-content: start; background-size: auto 220px; background-position: 70% top;
    background-color: var(--bg); padding-top: 176px; }
  body.cpt-auth .cpt-auth-panneau { margin: 0 16px 24px; padding: 32px 24px; }
}
/* compte (admin_compte.py) */
body.cpt .adm-ligne { margin-bottom: 8px; }
body.cpt .adm-actions { gap: 8px; }

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

/* 17/11/2026 : portail d'un agent ouvert par « Gérer » — ses écrans se rangent
   sous « Agents » (le parent, en encre), au nom de l'agent ; « on » ne marque
   que l'écran du portail en cours. Alignement Figma : mêmes entrées de 40 px ;
   la barre de l'actif est masquée ici, le filet du sous-menu fait déjà repère. */
body.cpt .side nav a.parent { color: var(--ink); }
body.cpt .side nav a.parent svg { color: var(--ink); }
body.cpt .side nav .nav-agent { display: flex; flex-direction: column; gap: 2px; margin: 0 0 8px 20px;
  padding-left: 8px; border-left: 1px solid var(--line); }
body.cpt .side nav .nav-agent a.on::before { background: transparent; }
body.cpt .side nav .nav-agent-nom { padding: 0 12px; margin: 24px 0 8px; font: var(--t-etiquette); letter-spacing: var(--etiquette-ls);
  color: var(--ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.cpt .side nav .nav-agent-nom:first-child { margin-top: 8px; }
/* 17/11/2026 : une entrée = une ligne. Le libellé est un nœud texte nu dans le <a>
   (portal.py, admin.py) : en flex il devient un élément anonyme qui passe à la ligne
   (« Téléphones FalSMS » : 2 × 22 px dans 40 px) et qu'on ne peut pas cibler. Le <a>
   redevient donc un bloc d'UNE ligne de 40 px, coupé en ellipse ; l'icône est posée
   à 10 px du haut (10 + 20 + 10 = 40), centrée quelle que soit la longueur du texte.
   La barre de l'actif n'est plus un débordement (left:-8px) mais un liseré intérieur,
   sinon ce clip la coupait : voir `a.on` plus haut. */
body.cpt .side nav a { display: block; height: 40px; line-height: 40px; white-space: nowrap;
  overflow: hidden; overflow: clip; overflow-clip-margin: 8px; text-overflow: ellipsis; }
body.cpt .side nav a svg { display: inline-block; vertical-align: top; margin: 10px 12px 0 0; }
