/*
 * enzo.immo — espace de travail (/app/). Feuille commune : polices, alias des jetons, coquille, composants partagés.
 * Guide à suivre : design/GUIDE_PRESENTATION.md. Les règles propres à un écran vont dans ecrans/<écran>.css
 * (chargées après cette feuille par base.html), jamais ici.
 *
 * Thème Super Panda (15/10/2026, « Go pour l'étape 3 avec les choix recommandés » ; brief design/superpanda/,
 * décisions D-172 et D-173 de Super Panda) : chrome noir, blanc et gris ; mode clair seul.
 * - Jetons : tokens.css (copie exacte de Super Panda, mêmes noms) est chargé AVANT cette feuille, en développement
 *   (base.html) comme dans le paquet de production (espace/storage.py). Aucune couleur écrite ici : les anciens noms
 *   d'Enzo (--fond, --encre, --discret…) sont des alias var(--…) de tokens.css (bloc :root ci-dessous), pour que les
 *   feuilles d'écran gardent leurs noms ; une couleur en dur ne vit que dans tokens.css.
 * - Polices : Bricolage Grotesque (enseigne, titres, menu, boutons, pastilles, en-têtes de tableau, chiffres clés) et
 *   Instrument Sans (corps, champs, cellules, montants), auto-hébergées (fonts/, licences SIL OFL) ; mono système
 *   (--mono) pour les seuls identifiants (codes de lot, IBAN masqués, références, libellés bancaires exacts).
 * - Boutons à deux couleurs (design/superpanda/PALETTE-BOUTONS.md) : lime pour l'action principale de la zone
 *   (.btn-principal), rouge vif pour l'acte irréversible (.btn-destructeur) ; tout le reste blanc à contour gris
 *   (secondaire) ou fantôme ; texte et contour noirs, ombre dure de 2 px, survol inversé.
 * - Signaux : la couleur ne porte que des signaux, par petites touches (pastilles de paiement, chiffre du solde,
 *   ligne en problème, points d'état) ; encarts, onglets, filtres, compteurs et tons du robot restent gris.
 * - Mise en page d'Enzo inchangée (gouttières, gap, panneau, hauteurs de boutons) hors de la coquille : menu de
 *   246 px (68 px replié), barre du haut de 64 px, 40 px d'air sous l'enseigne. Téléphone (< 768 px) : barre
 *   d'onglets en bas, panneau → tiroir, lignes de tableau → cartes. Aucun style en ligne dans les gabarits. Les
 *   autres valeurs de mise en page reprises du brief (entrées du menu, enseigne, pastilles, tailles d'icônes…) sont
 *   listées dans design/GUIDE_PRESENTATION.md § 2, « Mise en page : écarts assumés », à confirmer par Baptiste.
 */

/* ------------------------------------------------------------------ polices
   15/10/2026, thème Super Panda : deux familles variables auto-hébergées (paquets @fontsource-variable 5.3.0,
   sous-ensembles latin et latin-ext). Les trois descripteurs d'ajustement donnent aux deux familles la boîte et la
   ligne de base d'Inter : aucune ligne ne saute au basculement de font-display: swap. Pas d'italique chargé
   (font-synthesis: none sur le corps). Déclarées ici, dans le dossier de paquet.css : l'URL relative fonts/… reste
   juste une fois les feuilles concaténées par espace/storage.py. */
@font-face {
  font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("fonts/bricolage-grotesque-latin-wght-normal.ada540c0e24a.woff2") format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
  ascent-override: 96.875%; descent-override: 24.121%; line-gap-override: 0%;
}
@font-face {
  font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("fonts/bricolage-grotesque-latin-ext-wght-normal.b1ae2c312cfb.woff2") format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
  ascent-override: 96.875%; descent-override: 24.121%; line-gap-override: 0%;
}
@font-face {
  font-family: "Instrument Sans"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("fonts/instrument-sans-latin-wght-normal.fa41c43a3d8e.woff2") format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
  ascent-override: 96.875%; descent-override: 24.121%; line-gap-override: 0%;
}
@font-face {
  font-family: "Instrument Sans"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("fonts/instrument-sans-latin-ext-wght-normal.1ff13d113ba4.woff2") format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
  ascent-override: 96.875%; descent-override: 24.121%; line-gap-override: 0%;
}

/* ------------------------------------------------------------------ jetons
   15/10/2026, thème Super Panda : pont entre les anciens noms d'Enzo et les jetons de tokens.css (chargé avant).
   Aucune valeur en dur : chaque ancien nom renvoie à un jeton de tokens.css (design/superpanda/prototype/
   alias-jetons.css). --accent, --accent-bouton et --info renvoient à --ink (même noir que --accent de tokens.css) :
   une propriété qui se citerait elle-même serait invalide au calcul. Mode clair seul. */
:root {
  color-scheme: light;
  /* surfaces et filets */
  --fond: var(--cream);
  --surface: var(--paper);
  --surface-2: var(--soft);
  --bordure: var(--line);
  --bordure-forte: var(--field-line);
  --bordure-douce: var(--line-soft);
  /* textes */
  --encre: var(--text);
  --encre-2: var(--text-2);
  --discret: var(--muted);
  /* accent : noir (élément actif, focus) ; le bouton principal est lime par la règle .btn-principal */
  --accent: var(--ink);
  --accent-fort: var(--accent-dark);
  --accent-doux: var(--accent-bg);
  --accent-bouton: var(--ink);
  --accent-bouton-fort: var(--accent-dark);
  --sur-accent: var(--on-accent);
  /* tons des pastilles : gris, la gravité monte avec le gris du fond (ok < info < warn < danger) */
  --sur: var(--ok);               --sur-fond: var(--ok-bg);          --sur-bord: var(--ink);
  --info: var(--ink);             --info-fond: var(--info-bg);
  --neutre: var(--neutral);       --neutre-fond: var(--neutral-bg);
  --verifier: var(--warn);        --verifier-fond: var(--warn-bg);   --verifier-bord: var(--ink);
  --probleme: var(--danger);      --probleme-fond: var(--danger-bg); --probleme-bord: var(--ink);
  /* points d'état de 6 à 8 px : gris et noir (les points VIFS de 10 px à anneau noir sont .hk-dot et .point-sante) */
  --point-ok: var(--muted);
  --point-attention: var(--ink);
  --point-probleme: var(--ink);
  --point-arrete: var(--handle);
  --point-info: var(--muted);
  --case-bord: var(--field-line);
  /* toast : noir, texte blanc, action lime */
  --toast-fond: var(--toast-bg);
  --toast-texte: var(--toast-ink);
  --toast-bord: var(--toast-bg);
  --toast-coche: var(--toast-ok);
  --toast-discret: var(--soft-2);
  --voile: var(--overlay);
  --ombre-flottant: var(--shadow-md);
  --ombre-panneau: var(--shadow-lg);
  --ombre-tiroir: var(--shadow-lg);
  --ombre-toast: var(--shadow-lg);
  /* rayons : 4 / 6 / 8 (pastilles en 999) */
  --rayon-s: var(--radius-sm);
  --rayon-m: var(--radius);
  --rayon-l: var(--radius-lg);
  --rayon-rond: 999px;
  /* polices */
  --police: var(--font);
  --police-titre: var(--font-display);
  --police-mono: var(--mono);
  /* coquille : menu 246 px (68 px replié), barre du haut 64 px ; panneau, gouttière et durée inchangés */
  --largeur-barre: var(--sidebar-w);
  --largeur-barre-repliee: 68px;
  --hauteur-entete: var(--topbar-h);
  --largeur-panneau: 440px;
  --gouttiere: 32px;
  --duree: 150ms;
}

/* ------------------------------------------------------------------ base
   Brief, « Typographie » et « Accessibilité » : corps Instrument Sans 14 px / 1,5 (téléphone compris), titres en
   police d'enseigne. Piège : button, input, select, textarea { font: inherit }, donc chaque composant en police
   d'enseigne redéclare font-family: var(--font-display). Chiffres tabulaires sur tout le texte (le « 1 » de
   Bricolage est très étroit). */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  font-weight: 400;
  letter-spacing: 0;
  background: var(--cream);
  color: var(--text);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--ink); }
h1 { font-size: 28px; line-height: 1.2; font-weight: 700; letter-spacing: -0.9px; text-wrap: balance; }
h2 { font-size: 18px; line-height: 1.3; font-weight: 700; letter-spacing: -0.3px; text-wrap: balance; }
h3 { font-size: 14px; line-height: 1.35; font-weight: 700; letter-spacing: -0.1px; }
a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--field-line); text-underline-offset: 2px; }
a:hover { color: var(--ink); text-decoration-color: var(--ink); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
/* Focus : UNE règle globale, contour noir de 3 px décalé de 2 px (19,8:1 sur blanc, au moins 5,3:1 sur chaque fluo).
   Seuls les champs (bordure noire et halo, plus bas) et la zone principale (cible du lien d'évitement) s'en passent. */
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.principal:focus { outline: none; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
/* Identifiants en mono 12 px (codes de lot, IBAN masqués, références, libellés bancaires exacts). */
.mono { font-family: var(--mono); font-size: 12px; }
/* 15/10/2026, thème Super Panda : montants en Instrument Sans (police du corps) 13 px à chiffres tabulaires,
   la mono restant réservée aux identifiants ; l'espacement des mots rend lisible l'espace insécable étroite. */
.montant-texte { font-family: var(--font); font-size: 13px; font-variant-numeric: tabular-nums; word-spacing: .12em; }
.discret { color: var(--muted); }
.petit { font-size: 12px; }
.fort { font-weight: 600; }
/* Négatif hors montant : noir 600, aucun rouge (brief, « Signaux » : les messages d'erreur restent noirs). */
.negatif { color: var(--ink); font-weight: 600; }
.a-droite { text-align: right; }
.visuellement-cache {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
/* Les textes réservés aux lecteurs d'écran restent dans leur conteneur (pas de défilement horizontal parasite). */
.onglets, .onglet, .puces, .puce, .filtre-texte, .recherche, .mois, .btn, .nav-lien, .nav-pied, .nav-repli, .ligne,
.cellule, .candidat, .toast, .un-mois, .liste-liens a { position: relative; }
/* Lien d'évitement : version de l'admin Super Panda (.skip-link), visible au focus clavier ; classe et cible
   (#contenu) d'Enzo gardées. */
.evitement {
  position: fixed; left: 20px; top: -100px; z-index: 100; padding: 10px 15px; border-radius: 5px;
  background: var(--accent-dark); color: var(--on-accent); font-family: var(--font-display); font-weight: 700;
  text-decoration: none;
}
.evitement:focus { top: 10px; color: var(--on-accent); }
.icone { flex-shrink: 0; }
/* Étiquette de bloc : sur-titre (eyebrow) du brief, 11 / 15 px figé, 700, +1,1 px, en capitales, gris du menu. */
.etiquette {
  font-family: var(--font-display); font-size: 11px; line-height: 15px; font-weight: 700; letter-spacing: 1.1px;
  text-transform: uppercase; color: var(--nav-label);
}
/* Lien « Voir la fiche dans Données » / « Toutes les données du … » : il se lit comme un lien partout (texte noir 500,
   souligné noir de 1,5 px décalé de 3 px, aplat lime au survol et au focus, comme .liens-detail a plus bas), pas comme une
   ligne grise sans soulignement qu'on ne repère pas (revue UX 27/10/2026, incidents-1-09). */
.expert {
  color: var(--ink); font-family: var(--font); font-size: 12px; font-weight: 500;
  text-decoration: underline; text-decoration-thickness: 1.5px; text-decoration-color: var(--ink); text-underline-offset: 3px;
}
a.expert:is(:hover, :focus-visible) { background: var(--cta-create); color: var(--ink); }

/* ------------------------------------------------------------------ coquille
   Brief, « Mise en page et coquille » (valeurs de shell.css) : menu blanc de 246 px à filet noir (signature du
   thème), enseigne en Bricolage, entrées noires pleines quand elles sont actives, barre du haut de 64 px à filet noir,
   page sur --cream. */
.coquille { display: flex; min-height: 100vh; }
.barre {
  width: var(--largeur-barre); flex-shrink: 0; background: var(--paper); border-right: 1px solid var(--sidebar-line);
  display: flex; flex-direction: column; gap: 2px; padding: 26px 16px 18px 16px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
/* Enseigne Hokaido (05/11/2026, kit de logos) : symbole (.marque-picto) puis lettrage (.marque-lettrage), deux SVG
   inlinés en currentColor de même hauteur (16 px) séparés de 5 px, soit les proportions du logo horizontal (écart de
   28 unités pour 88 de haut), 182 px de large pour les 196 px utiles du menu de 246 px ; 13 px puis 12 px de haut
   dans les menus de 214 et 200 px (--hauteur-logo, plus bas) ; sous-titre en capitales sous le lettrage, aligné à droite. Menu replié : le symbole seul. 40 px d'air
   sous l'enseigne dans le menu (38 px de marge + 2 px d'écart entre les éléments du menu). */
.marque {
  display: flex; align-items: flex-start; gap: 5px; color: var(--brand); text-decoration: none;
  font-family: var(--font-display);
}
.barre .marque { padding: 0 9px; margin-bottom: 38px; }
.marque:hover { color: var(--brand); text-decoration: none; }
.marque-picto { flex-shrink: 0; display: block; color: var(--brand); }
.marque-picto svg { display: block; height: var(--hauteur-logo, 16px); width: auto; aspect-ratio: 257.659 / 88; fill: currentColor; }
.marque-texte { display: block; }
.marque-lettrage { display: block; height: var(--hauteur-logo, 16px); width: auto; aspect-ratio: 715.3 / 88; fill: currentColor; }
.marque-texte small {
  display: block; margin-top: 4px; font-family: var(--font-display); font-size: 8px; line-height: 11.7px;
  font-weight: 700; letter-spacing: 0.9px; text-transform: uppercase; color: var(--nav-label);
  /* Aligné à droite sous le lettrage ; la marge négative reprend l'espacement laissé après la dernière lettre. */
  text-align: right; margin-right: -0.9px;
}
/* Entrées du menu : Bricolage 13 / 18,75 px figé / 500, icône 18 px gris foncé ; survol gris ; active noire pleine,
   texte et icône blancs, 700, sans autre marque. */
.nav-lien {
  display: flex; align-items: center; gap: 11px; padding: 8px 12px; border-radius: var(--radius);
  color: var(--nav-ink); font-family: var(--font-display); font-size: 13px; line-height: 18.75px; font-weight: 500;
  letter-spacing: 0; text-decoration: none; min-height: 38px;
}
.nav-lien .icone, .nav-pied .icone { width: 18px; height: 18px; color: var(--nav-icon); }
.nav-lien:hover { background: var(--nav-hover); color: var(--ink); text-decoration: none; }
.nav-lien:hover .icone, .nav-pied:hover .icone { color: var(--ink); }
.nav-lien[aria-current="page"] {
  background: var(--nav-active); color: var(--nav-ink-active); font-weight: 700; box-shadow: none;
}
.nav-lien[aria-current="page"] .icone, .nav-pied[aria-current="page"] .icone { color: var(--nav-ink-active); }
.nav-lien .nav-texte { flex: 1; min-width: 0; }
/* Compteur « à traiter » : pastille grise à texte noir, même sur l'entrée active. */
.nav-compteur {
  font-family: var(--font-display); font-size: 10px; font-weight: 700; line-height: 17px; min-width: 20px;
  text-align: center; padding: 0 6px; border-radius: 999px; background: var(--danger-bg); color: var(--ink);
}
.nav-externe { color: var(--subtle); }
.barre-espace { flex: 1; }
.barre-trait { border-top: 1px solid var(--line); margin: 8px 0 4px 0; }
.nav-pied {
  display: flex; align-items: center; gap: 11px; padding: 8px 12px; border-radius: var(--radius);
  color: var(--nav-ink); font-family: var(--font-display); font-size: 13px; line-height: 18.75px; font-weight: 500;
  letter-spacing: 0; text-decoration: none; background: none; border: 0; width: 100%; text-align: left; min-height: 38px;
}
.nav-pied:hover { background: var(--nav-hover); color: var(--ink); text-decoration: none; }
.nav-pied[aria-current="page"] { background: var(--nav-active); color: var(--nav-ink-active); font-weight: 700; }
.nav-pied .nav-texte, .nav-repli .nav-texte { flex: 1; min-width: 0; }
/* Bouton « Replier le menu » / « Déplier le menu » (bas du menu ; aria-pressed posé par le script du menu) : corps
   12 px / 17,25 px gris, chevron de 18 px, 34 px de haut ; survol gris. */
.nav-repli {
  display: flex; align-items: center; gap: 11px; width: 100%; min-height: 34px; padding: 7px 12px; border: 0;
  border-radius: var(--radius); background: none; text-align: left; color: var(--subtle);
  font-family: var(--font); font-size: 12px; line-height: 17.25px; font-weight: 500;
}
.nav-repli .icone { width: 18px; height: 18px; color: currentColor; }
.nav-repli:hover { background: var(--nav-hover); color: var(--ink); }
/* Menu replié (15/10/2026, état gardé par le navigateur, classe menu-replie posée sur <html> avant l'affichage) :
   68 px, pictogramme seul centré, entrées centrées en icône seule (libellé gardé pour les lecteurs d'écran, info-bulle
   native posée par le script), compteur en absolu en haut à droite, 22 px entre l'enseigne et la première entrée.
   La page suit : la barre est dans le flux de .coquille. Téléphone : pas de menu, rien ne change. */
@media (min-width: 768px) {
  html.menu-replie { --largeur-barre: var(--largeur-barre-repliee); }
  html.menu-replie .barre { padding-left: 10px; padding-right: 10px; }
  html.menu-replie .barre .marque { justify-content: center; padding: 0; margin-bottom: 20px; }
  html.menu-replie .barre .marque-texte, html.menu-replie .barre .nav-externe { display: none; }
  html.menu-replie .barre :is(.nav-lien, .nav-pied, .nav-repli) { justify-content: center; gap: 0; padding-left: 0; padding-right: 0; }
  html.menu-replie .barre .nav-texte {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0);
    white-space: nowrap; border: 0; flex: none;
  }
  /* Compteur décalé vers le coin, dans les 10 px de marge du menu (68 px) : il ne mord plus sur le pictogramme de
     18 px (toit de la banque, fléau de la balance) ni sur l'entrée du dessus. 15/10/2026, thème Super Panda. */
  html.menu-replie .barre .nav-compteur {
    position: absolute; top: 0; right: -8px; min-width: 16px; line-height: 15px; padding: 0 4px;
  }
  html.menu-replie .nav-repli .icone { transform: scaleX(-1); }
}

.colonne { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.entete {
  height: var(--hauteur-entete); flex-shrink: 0; display: flex; align-items: center; gap: 16px;
  padding: 0 var(--gouttiere); background: var(--topbar); border-bottom: 1px solid var(--ink);
  position: sticky; top: 0; z-index: 20;
}
/* Recherche : gris clair sans filet au repos, blanche à contour noir et halo au focus ; loupe de 16 px ; le champ
   fait au moins 24 px de haut (cible, WCAG 2.5.8). */
.recherche {
  display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; margin: 0;
  border: 1px solid transparent; border-radius: var(--radius); background: var(--search-bg);
  width: 420px; max-width: 100%; color: var(--subtle);
}
.recherche:hover { border-color: var(--field-line); }
.recherche:focus-within { background: var(--paper); border-color: var(--focus); box-shadow: 0 0 0 3px var(--focus-ring); }
.recherche .icone { width: 16px; height: 16px; }
.recherche input { flex: 1; min-width: 0; min-height: 24px; border: 0; background: transparent; outline: none; color: var(--text); text-overflow: ellipsis; }
.recherche input::placeholder { color: var(--subtle); font-size: 13px; letter-spacing: -0.1px; }
/* Touche « / » : 20 px de haut, filet gris épaissi en bas (1 + 17 + 2 px). */
.touche {
  font-family: var(--font); font-size: 11px; font-weight: 600; line-height: 17px; color: var(--muted);
  background: var(--paper); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px;
}
/* Suggestions sous le champ de recherche : liste remplie au fil de la frappe (espace/recherche/_suggestions.html),
   ouverte, refermée et parcourue au clavier par espace.js. Contour noir (un filet gris serait invisible sur la page) ;
   ligne choisie aux flèches : grise à anneau noir. */
.suggestions {
  position: absolute; top: calc(100% + 6px); left: -1px; z-index: 1; width: 560px;
  max-width: calc(100vw - var(--largeur-barre) - 2 * var(--gouttiere));
  max-height: min(70vh, 560px); overflow-y: auto; padding: 6px;
  background: var(--paper); border: 1px solid var(--ink); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md); color: var(--text);
}
.suggestions-titre {
  padding: 6px 10px 4px 10px; font-family: var(--font-display); font-size: 12px; font-weight: 700; color: var(--muted);
}
.suggestions-titre .compte { font-weight: 400; }
.suggestions-groupe + .suggestions-groupe { margin-top: 4px; }
.suggestions-groupe:last-of-type, .suggestions-vide {
  padding-bottom: 6px; margin-bottom: 6px; border-bottom: 1px solid var(--line-soft);
}
.suggestions-vide { padding: 8px 10px 12px 10px; font-size: 13px; color: var(--muted); }
.suggestion {
  display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 5px 10px;
  border-radius: var(--radius); color: var(--text); text-decoration: none;
}
.suggestion:hover, .suggestion[aria-selected="true"] { background: var(--nav-hover); color: var(--text); text-decoration: none; }
.suggestion[aria-selected="true"] { background: var(--soft-2); box-shadow: inset 0 0 0 2px var(--ink); }
.suggestion > .icone { color: var(--muted); }
.suggestion-texte { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.suggestion-titre, .suggestion-detail { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggestion-titre { color: var(--text-2); }
.suggestion-titre mark { background: none; color: var(--ink); font-weight: 700; }
.suggestion-detail { font-size: 12px; color: var(--muted); }
.suggestion-etat { flex-shrink: 0; font-size: 12px; color: var(--muted); white-space: nowrap; }
.entete-espace { flex: 1; }
.btn.entete-planning, .btn.entete-raccourci { color: var(--ink); }
/* Statistiques et Robots, sortis du menu de gauche (18/11/2026) : l'icône de l'écran ouvert prend le plein noir de
   l'entrée active du menu, seul repère restant de l'endroit où l'on est. */
.entete .btn.entete-raccourci[aria-current="page"] { background: var(--nav-active); border-color: var(--nav-active); color: var(--nav-ink-active); }
.moi { display: flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; }
.moi:hover { text-decoration: none; }
.moi-nom { font-family: var(--font-display); font-weight: 600; line-height: 16px; font-size: 12px; color: var(--ink); }
.moi-role { display: block; font-size: 10.5px; line-height: 15px; color: var(--muted); font-weight: 400; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; background: var(--accent-bg); color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-display);
  font-weight: 700; font-size: 12px; flex-shrink: 0;
}
.avatar--grand { width: 36px; height: 36px; }
/* Avatar du compte (barre du haut) : disque noir à initiales blanches, comme le compte du menu de Super Panda. */
.moi .avatar { background: var(--ink); color: var(--on-accent); font-size: 11px; letter-spacing: 0.3px; }
.entete-mobile, .btn.recherche-mobile { display: none; }
/* Bouton de recherche du téléphone (44 px) : loupe noire. */
.btn.recherche-mobile { color: var(--ink); }

/* ------------------------------------------------------------------ page : en-tête, zone d'actions, rythme */
.principal {
  flex: 1; min-width: 0; padding: 32px var(--gouttiere) 48px var(--gouttiere);
  display: flex; flex-direction: column; gap: 24px;
}
/* Le panneau latéral ne recouvre plus la liste sur grand écran : la page se rétrécit. */
@media (min-width: 1280px) {
  body:has(#panneau:not(:empty)) .principal { padding-right: calc(var(--largeur-panneau) + var(--gouttiere)); }
}
/* Le fragment HTMX d'un écran (#ecran) empile ses blocs avec le même rythme que la page. */
.ecran { display: flex; flex-direction: column; gap: 24px; }
/* Un formulaire porteur de champs cachés (ciblé par form= des boutons) n'occupe aucune place. */
.formulaire-cache { display: none; }
/* En-tête en grille : le titre et la zone d'actions partagent TOUJOURS la première rangée (titre à gauche,
   actions à droite, même quand la page se rétrécit sous le panneau) ; le sous-titre passe dessous, sur toute la
   largeur. .page-titres s'efface (display: contents) pour que ses deux enfants soient placés par la grille. */
.page-tete {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 24px; row-gap: 4px; align-items: center;
}
.page-titres { display: contents; }
/* Titre de page (h1 du brief) : Bricolage 28 / 1,2 / 700 / -0,9 px, au bureau comme au téléphone ; 33,6 px de
   haut, sous les 36 px de .page-actions : la rangée ne bouge pas au bureau. */
.page-titre {
  grid-column: 1; grid-row: 1; min-width: 0;
  font-family: var(--font-display); font-size: 28px; font-weight: 700; letter-spacing: -0.9px; line-height: 1.2;
  color: var(--ink);
  /* Un titre sans espace (adresse e-mail, référence) se coupe au bord de la page au lieu de la déborder à 390 px
     (revue UX 27/10/2026, nouveaux-parametres-3-20 et 3-22). */
  overflow-wrap: anywhere;
}
/* Engrenage à droite du titre d'une rubrique (Recouvrement, demande du dirigeant du 12/10/2026) : le lien direct
   vers ses paramètres, sans texte visible (aria-label et title), discret jusqu'au survol. */
.page-titre-reglage {
  display: inline-flex; align-items: center; margin-left: 6px; padding: 2px;
  /* Posé sur la ligne de base du titre (18/11/2026, Commercialisation) : le bas de l'engrenage tombe sur le bas du mot,
     comme le libellé des raccourcis ci-dessous (une icône sans texte donne son bord bas pour ligne de base). */
  vertical-align: baseline;
  color: var(--subtle); border-radius: var(--radius); text-decoration: none;
}
.page-titre-reglage:hover, .page-titre-reglage:focus-visible { color: var(--ink); background: var(--nav-hover); text-decoration: none; }
/* La même roue crantée en bouton, à droite du titre d'une carte (« Mandat de gestion », 06/11/2026) : ouvre le tiroir. */
button.page-titre-reglage { border: 0; background: none; font: inherit; cursor: pointer; min-height: 0; }
/* Planning et Journal du Recouvrement à droite de l'engrenage (demande du dirigeant du 06/11/2026) : même lien discret,
   avec son libellé en texte courant (pas la police du titre) ; la page ouverte reste marquée. */
.page-titre-raccourci {
  gap: 4px; margin-left: 4px; padding: 2px 6px;
  font-family: var(--font); font-size: 13px; font-weight: 500; letter-spacing: 0; line-height: 1.4;
  /* Posé sur la ligne de base du titre (demande du dirigeant du 18/11/2026, Locataires) : le bas du libellé tombe sur
     le bas du mot « Locataires », au lieu de flotter à mi-hauteur (vertical-align: middle de l'engrenage). Le libellé
     donne sa ligne de base au lien (align-self: baseline), l'icône reste centrée sur lui. */
  vertical-align: baseline; align-items: baseline;
}
.page-titre-raccourci > span, .page-titre-raccourci > svg { align-self: baseline; }
.page-titre-raccourci[aria-current="page"] { color: var(--ink); background: var(--nav-hover); }
/* Raccourci qui ouvre un tiroir (Bailleurs : Réglages, Nouveau bailleur) : un <button>, sans l'habillage du navigateur. */
button.page-titre-reglage { border: 0; background: none; cursor: pointer; }
.page-sous-titre { grid-column: 1 / -1; grid-row: 2; color: var(--muted); font-size: 13px; max-width: 720px; }
.page-actions {
  grid-column: 2; grid-row: 1; display: flex; align-items: center; justify-content: flex-end; gap: 8px;
  flex-wrap: nowrap; min-height: 36px;
}
.page-tete > :not(.page-titres):not(.page-actions) { grid-column: 1 / -1; }
/* Zone d'actions sur deux étages (bouton + note dessous, ex. Export Vilogi) : elle occupe les deux rangées et le
   sous-titre reste collé au titre, dans la colonne de gauche. */
.page-tete:has(.page-actions-colonne) { align-items: start; }
.page-tete:has(.page-actions-colonne) .page-titre { min-height: 36px; display: flex; align-items: center; }
.page-tete:has(.page-actions-colonne) .page-actions { grid-row: 1 / span 2; }
.page-tete:has(.page-actions-colonne) .page-sous-titre { grid-column: 1; }
/* En-tête dont la zone d'actions est LARGE (les trois autopilotes du Pilotage du recouvrement, quatre actions et plus :
   Finances, régularisation des charges, ou un écran qui la déclare large par la classe page-tete--actions-larges : le
   Quittancement, dont « Envoyer les avis » et « Quittancer <mois> » restent en place, actifs ou grisés) : sur tablette
   et au bureau étroit (1280 px, panneau ouvert), la colonne « auto » de la grille prend toute la largeur de ses boutons
   et ne laisse au titre que quelques pixels : « Recouvrement » se coupait en trois, « Les Cigognes — exercice 2025 » en
   cinq lignes (revue UX 28/10/2026). Un titre de page ne se coupe jamais au milieu d'un mot : l'en-tête passe en flex
   qui va à la ligne (modèle des Biens), le titre garde sa largeur naturelle (il ne rétrécit pas : flex 1 0 auto, borné
   à la largeur de la page) et les actions descendent sous lui, alignées à gauche, quand la place manque ; le sous-titre
   reste en dernier. Quand tout tient, la rangée est celle de la grille (titre à gauche, actions à droite). Au
   téléphone, la grille validée (actions sur leur propre rangée) reste en place : règles réservées aux écrans de 768 px
   et plus. */
@media (min-width: 768px) {
  .page-tete:has(> .page-actions > .pilotes), .page-tete:has(> .page-actions > :nth-child(4)),
  .page-tete--actions-larges {
    display: flex; flex-wrap: wrap; align-items: center;
  }
  .page-tete:has(> .page-actions > .pilotes) { row-gap: 8px; }
  :is(.page-tete:has(> .page-actions > .pilotes), .page-tete:has(> .page-actions > :nth-child(4)),
      .page-tete--actions-larges) .page-titre {
    flex: 1 0 auto; max-width: 100%;
  }
  :is(.page-tete:has(> .page-actions > .pilotes), .page-tete:has(> .page-actions > :nth-child(4)),
      .page-tete--actions-larges) .page-actions {
    flex: 0 1 auto; flex-wrap: wrap; justify-content: flex-start; gap: 4px 8px;
  }
  :is(.page-tete:has(> .page-actions > .pilotes), .page-tete:has(> .page-actions > :nth-child(4)),
      .page-tete--actions-larges) .page-sous-titre {
    order: 1; flex-basis: 100%;
  }
}
/* Boutons sobres de l'en-tête qui passent en icône seule quand la place manque (texte gardé pour les lecteurs
   d'écran). Le title (info-bulle) est posé par espace.js (poserInfobulles) sur tout .btn-sobre-compact qui n'en a
   pas : un gabarit n'a rien à écrire (revue UX 27/10/2026, finances-1-14). Au téléphone le texte revient : voir le
   bloc « téléphone ». */
.btn-sobre-compact .btn-texte { display: inline; }
@media (max-width: 1100px) {
  .btn-sobre-compact { width: 36px; padding: 0; }
  .btn-sobre-compact .btn-texte { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (min-width: 1280px) {
  body:has(#panneau:not(:empty)) .btn-sobre-compact { width: 36px; padding: 0; }
  body:has(#panneau:not(:empty)) .btn-sobre-compact .btn-texte { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
.page-actions-note { font-size: 12px; color: var(--muted); }
/* Titre de section (h2 du brief) : 18 / 1,3 / 700 / -0,3 px. */
.titre-section {
  font-family: var(--font-display); font-size: 18px; line-height: 1.3; font-weight: 700; letter-spacing: -0.3px;
  color: var(--ink);
}
/* Regroupements : l'en-tête et ses onglets, la barre d'outils et son tableau, se tiennent à 16 px ; tout le reste à 24 px. */
.page-tete + .onglets, .page-tete + .barre-outils { margin-top: -8px; }
.barre-outils + .tableau, .barre-outils + .carte, .barre-outils + .ligne-statut, .ligne-statut + .tableau { margin-top: -8px; }
/* Fil d'Ariane : 12 px gris, section courante en noir 500. Il passe à la ligne MAILLON PAR MAILLON : chaque élément
   (lien, section courante) est insécable (« Contre- / passer » n'existe plus), un élément plus long que la ligne se
   termine par « … » (son title est posé par espace.js, TRONQUES) et les chevrons ne rétrécissent jamais (revue UX
   27/10/2026, nouveaux-finances-1-14). */
.fil-ariane { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; min-width: 0; font-size: 12px; color: var(--subtle); }
.fil-ariane > a, .fil-ariane > span { flex: none; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Le nom de l'objet (« Pièce AN26000001 », « Exercice 2026 »), seul maillon qui peut être long : il se réduit sur sa
   ligne, avec son ellipse, au lieu de pousser la page ou de passer seul à la ligne suivante (finances-1-13). */
.fil-ariane > .fil-objet { flex: 0 1 auto; min-width: 0; }
/* Le chevron n'est plus un élément de la ligne : l'icône posée par les gabarits entre deux maillons (123 écrans) reste dans
   le HTML mais ne s'affiche plus, et le même tracé (« droite » du jeu d'icônes, 14 px) est dessiné au DÉBUT du maillon qui
   le suit. Quand le fil passe à la ligne, le maillon et son chevron tombent ensemble : plus de chevron seul en bout de
   ligne (revue UX 27/10/2026, finances-1-13). Rendu à une ligne identique à l'ancien : maillon, 4 px, chevron, 4 px, maillon. */
.fil-ariane > svg { flex: none; display: none; }
.fil-ariane > svg + a::before, .fil-ariane > svg + span::before {
  content: ""; display: inline-block; width: 14px; height: 14px; margin-right: 4px; vertical-align: -3px;
  background: var(--subtle);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 5 7 7-7 7'/%3E%3C/svg%3E") center / 14px 14px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 5 7 7-7 7'/%3E%3C/svg%3E") center / 14px 14px no-repeat;
}
.fil-ariane a { color: var(--subtle); text-decoration: none; }
.fil-ariane a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--ink); }
.fil-ariane > span { font-weight: 500; color: var(--ink); }

/* ------------------------------------------------------------------ onglets
   Brief, « Composants » (onglets) : rail à filet gris, onglet Bricolage 13 / 700 dans tous les états (la largeur ne
   bouge pas), gris au repos, noir actif avec un trait noir de 2 px. */
.onglets {
  display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; overflow-y: hidden;
  scrollbar-width: thin;
}
.onglet {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px 10px 12px; margin-bottom: -1px;
  border-bottom: 2px solid transparent; color: var(--muted); font-family: var(--font-display); font-size: 13px;
  font-weight: 700; text-decoration: none; white-space: nowrap;
}
.onglet:hover { color: var(--ink); text-decoration: none; }
.onglet[aria-current="page"] { border-bottom-color: var(--ink); color: var(--ink); font-weight: 700; }
.onglet .nav-compteur { margin-left: 2px; }   /* pastille d'un onglet (Locataires › Dépôts à rendre) */
/* Barre d'onglets qui déborde (page rétrécie par le panneau, fenêtre étroite) : fondu à droite au lieu d'un
   onglet coupé net. Au téléphone (≤ 767 px) les onglets et les puces s'enroulent sur plusieurs lignes, sans
   défilement ni fondu (demande du dirigeant du 28/09/2026, UX-D3) : voir le bloc « téléphone ». Animation liée au défilement de la barre elle-même : sans débordement
   la chronologie est inactive, donc aucun fondu ; arrivé au bout, le fondu disparaît. Le masque ne lit que l'opacité :
   le jeton --ink y vaut « opaque ». */
@keyframes fondu-onglets {
  from { -webkit-mask-image: linear-gradient(90deg, var(--ink) calc(100% - 48px), transparent); mask-image: linear-gradient(90deg, var(--ink) calc(100% - 48px), transparent); }
  96% { -webkit-mask-image: linear-gradient(90deg, var(--ink) calc(100% - 48px), transparent); mask-image: linear-gradient(90deg, var(--ink) calc(100% - 48px), transparent); }
  to { -webkit-mask-image: none; mask-image: none; }
}
@supports (animation-timeline: scroll()) {
  .onglets, .puces { animation: fondu-onglets linear both; animation-timeline: scroll(self inline); }
}

/* ================================================================== classeur : navigation à deux niveaux (début du bloc)
   Un bloc .classeur tient une barre d'onglets (.onglets) et, quand l'onglet actif a des rubriques, leur bandeau blanc
   (.classeur-rubriques). Quatre écrans : Finances (espace/finances/_onglets.html, 06/11/2026), la fiche du locataire
   (espace/locataires/_zone_onglet.html), Recouvrement (espace/recouvrement/_tete.html) et, dans Locataires, les vues de
   « Sorties en cours » et de « Dépôts à rendre » (espace/locataires/_tete.html).
   - Demande du dirigeant du 19/11/2026 : en puces, les rubriques se confondaient avec les puces de filtre de la barre
     d'outils (même forme, même hauteur, juste en dessous). Une rubrique est un lien de texte (.classeur-rubrique),
     l'active noire et soulignée de 2 px ; la puce reste aux filtres.
   - Dès 660 px de large (les cinq onglets de Finances et leurs pastilles tiennent sur une ligne ; le même seuil
     partout), l'onglet actif devient un intercalaire blanc soudé au bandeau : le menu forme un seul bloc blanc, posé
     sur le gris de la page. Le coin haut gauche du bandeau est droit sous le premier onglet, arrondi sinon. Un
     intercalaire a la largeur de l'onglet ordinaire (11 px + 1 px de bord) : rien ne bouge d'un onglet à l'autre.
   - Plus étroit (téléphone, page rétrécie par le panneau) : les onglets passent à la ligne au lieu de défiler (jamais
     de défilement horizontal, demande du 28/09/2026 : ni masque ni fondu), un intercalaire ne toucherait plus le
     bandeau ; l'onglet actif garde donc le soulignement des onglets, le bandeau se détache de 10 px.
   - Sans bandeau (onglet à une seule rubrique) : la barre d'onglets ordinaire.
   - [aria-current] sans valeur dans les sélecteurs : selon l'écran, l'onglet actif porte « true » et la rubrique
     « page », ou l'inverse ; et l'élément cliqué devient actif avant la réponse (espace.js, rendreActif), avec la
     valeur de l'ancien.
   - .classeur--large, pour une barre d'onglets plus longue que celle de Finances (les six onglets de Locataires et
     leurs pastilles font 800 px) : le seuil passe à 840 px. Une requête de conteneur lit la largeur du CONTENU du
     bloc : 180 px de marge intérieure à droite la réduisent d'autant, et les deux barres reprennent la pleine largeur
     par une marge négative. Sans cela, à 714 px (fenêtre de 1024 px), le sixième onglet passait à la ligne et
     séparait l'intercalaire de son bandeau. Bureau seulement : au téléphone le bloc est sous le seuil de toute façon,
     et .onglets y a une largeur imposée. */
.classeur { display: flex; flex-direction: column; container: classeur / inline-size; }
@media (min-width: 768px) {
  .classeur--large { padding-right: 180px; }
  .classeur--large > * { margin-right: -180px; }
}
.page-tete + .classeur { margin-top: -8px; }
.classeur > .onglets { flex-wrap: wrap; overflow: visible; animation: none; -webkit-mask-image: none; mask-image: none; }
.classeur > .onglets .onglet[aria-current] { border-bottom-color: var(--ink); color: var(--ink); font-weight: 700; }
.classeur-rubriques {
  display: flex; flex-wrap: wrap; gap: 0 22px; margin-top: 10px; padding: 0 12px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg);
}
.classeur-rubrique {
  display: inline-flex; align-items: center; gap: 6px; min-height: 42px; color: var(--muted);
  font-family: var(--font-display); font-size: 12px; font-weight: 700; line-height: 1.2; word-spacing: 0.12em;
  text-decoration: none; white-space: nowrap;
}
.classeur-rubrique:hover { color: var(--ink); text-decoration: none; }
.classeur-rubrique[aria-current] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink); }
@container classeur (min-width: 660px) {
  .classeur:has(.classeur-rubriques) > .onglets { border-bottom: 0; }
  .classeur:has(.classeur-rubriques) .onglet {
    z-index: 1; padding: 9px 11px 10px 11px; border: 1px solid transparent; border-bottom: 0;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }
  .classeur:has(.classeur-rubriques) .onglet[aria-current] { background: var(--paper); border-color: var(--line); }
  .classeur-rubriques { margin-top: 0; }
  .classeur:has(.onglet:first-child[aria-current]) .classeur-rubriques { border-top-left-radius: 0; }
}
/* ================================================================== classeur (fin du bloc) */

/* ------------------------------------------------------------------ boutons : principal (lime), destructeur (rouge vif), secondaire (blanc), fantôme
   Brief, « Composants » (boutons) et PALETTE-BOUTONS.md (panel UX du 15/10/2026) : DEUX couleurs. Lime pour l'action
   principale de la zone, quel que soit le verbe ; rouge vif pour exécuter un acte qu'Enzo ne sait pas défaire.
   Texte et contour noirs sur un fluo (le contour ne disparaît d'AUCUN état : un fluo fait 1,2 à 3,7:1 sur blanc),
   ombre dure de 2 px, survol inversé (fond noir, texte de la couleur), appui gris très foncé et glissement de 1 px.
   Hauteurs et remplissages d'Enzo gardés (36 px, 44 px au téléphone ; petit 32 px). */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 12px;
  border-radius: var(--radius); border: 1px solid var(--field-line); background: var(--paper);
  color: var(--ink); font-family: var(--font-display); font-size: 13px; font-weight: 650; letter-spacing: 0;
  text-decoration: none; line-height: 1.2; white-space: nowrap; box-shadow: none;
  min-height: 36px;
  transition: background .12s, border-color .12s, box-shadow .12s, color .12s, transform .06s;
}
/* Icône d'un bouton affichée à 16 px (brief, « Icônes ») : trait de 1,85 quelle que soit la taille demandée. */
.btn .icone { width: 16px; height: 16px; }
.btn svg.icone { stroke-width: 1.85; }
/* Secondaire (bouton nu) : blanc, texte noir, bordure de champ ; survol inversé noir et blanc ; appui gris très foncé. */
.btn:hover { background: var(--cta-hover-bg); color: var(--on-accent); border-color: var(--cta-ink); text-decoration: none; }
.btn:active {
  background: var(--cta-press-bg); color: var(--on-accent); border-color: var(--cta-ink); transform: translate(1px, 1px);
}
/* Rôle d'un bouton fluo : une variable --cta, posée par la variante (lime par défaut, rouge vif pour le destructeur)
   puis par la classe utilitaire, placée après pour l'emporter. */
.btn-principal { --cta: var(--cta-create); padding: 0 14px; }
.cta-create { --cta: var(--cta-create); }
.btn-destructeur, .cta-danger { --cta: var(--cta-danger); }
.cta-done { --cta: var(--cta-done); }   /* clore une étape (« Terminer l'entrée »), 10/11/2026 */
.btn:is(.btn-principal, .btn-destructeur, .cta-create, .cta-danger, .cta-done) {
  background: var(--cta); color: var(--cta-ink); border-color: var(--cta-ink); box-shadow: var(--cta-shadow);
}
.btn:is(.btn-principal, .btn-destructeur, .cta-create, .cta-danger, .cta-done):hover {
  background: var(--cta-hover-bg); color: var(--cta); border-color: var(--cta-ink);
}
.btn:is(.btn-principal, .btn-destructeur, .cta-create, .cta-danger, .cta-done):active {
  background: var(--cta-press-bg); color: var(--cta); box-shadow: var(--cta-shadow-press); transform: translate(1px, 1px);
}
/* Teinté : action courante qu'on veut voir sans fluo (Facturer, Écrire, Préavis de la fiche, 10/11/2026) : fond gris
   clair, contour noir ; survol et appui hérités de .btn (noir et blanc inversé). */
.btn-teinte { background: var(--soft-2); border-color: var(--cta-ink); }
/* Fantôme (sobre, discret) : transparent, texte noir ; survol gris et souligné. */
.btn-discret, .btn-sobre { background: transparent; border-color: transparent; color: var(--ink); }
.btn-discret:hover, .btn-sobre:hover {
  background: var(--nav-hover); border-color: transparent; color: var(--ink);
  text-decoration: underline; text-underline-offset: 3px;
}
.btn-discret:active, .btn-sobre:active { background: var(--soft-2); border-color: transparent; color: var(--ink); transform: none; }
/* Lien rouge (ouvre une confirmation ou retire une ligne) : fantôme noir ; au survol et au focus, le « danger doux »
   du brief : fond blanc, contour noir, anneau intérieur rouge vif de 2 px. Jamais rouge plein. */
.btn-lien-rouge { background: transparent; border-color: transparent; color: var(--ink); }
.btn-lien-rouge:hover, .btn-lien-rouge:focus-visible {
  background: var(--paper); border-color: var(--cta-ink); color: var(--ink); box-shadow: inset 0 0 0 2px var(--cta-danger);
}
.btn-lien-rouge:active { background: var(--paper); color: var(--ink); transform: none; }
.btn-icone { width: 36px; height: 36px; padding: 0; min-height: 0; }
.btn-petit { min-height: 32px; height: 32px; padding: 0 10px; font-size: 12px; border-radius: var(--radius); }
/* Boutons d'icône (valider une ligne, recherche du téléphone) : blancs à bordure de champ, jamais d'aplat fluo ;
   « valider » s'inverse en noir et blanc au survol, l'icône seule s'encre de noir. Un bouton d'icône fantôme
   (btn-sobre, btn-lien-rouge) garde l'aspect de sa variante. */
.btn-valider-icone {
  width: 32px; height: 32px; min-height: 0; padding: 0; border-radius: var(--radius-sm); border-color: var(--field-line);
  background: var(--field); color: var(--text-2);
}
.btn-icone:not(.btn-sobre, .btn-discret, .btn-lien-rouge) { background: var(--field); border-color: var(--field-line); color: var(--text-2); }
.btn-valider-icone:hover, .btn-valider-icone:focus-visible {
  background: var(--ink); color: var(--on-accent); border-color: var(--ink);
}
/* Inactif exclu (15/10/2026, thème Super Panda) : sans cela, ce survol (0,3,0) l'emporterait sur .btn[disabled]
   (0,2,0) et un − / + grisé redeviendrait noir et blanc sous la souris. */
.btn-icone:not(.btn-sobre, .btn-discret, .btn-lien-rouge, [disabled], [aria-disabled="true"]):hover {
  background: var(--paper); border-color: var(--ink); color: var(--ink);
}
.btn-plein { width: 100%; }
/* Inactif : gris plat, contour --handle, sans ombre (un fluo n'est jamais « à moitié actif ») ; placé après les
   survols pour l'emporter. */
.btn[disabled], .btn[aria-disabled="true"] {
  background: var(--soft-2); border-color: var(--handle); color: var(--subtle); cursor: not-allowed;
  box-shadow: none; transform: none;
}
.btn:is(.btn-principal, .btn-destructeur, .cta-create, .cta-danger, .cta-done):is([disabled], [aria-disabled="true"]) {
  background: var(--soft-2); color: var(--subtle); border-color: var(--handle); box-shadow: none; transform: none;
}
/* Envoi en cours : jamais d'atténuation par opacity sur du texte ; l'anneau tournant dit que l'action est partie. */
.btn.htmx-request { cursor: progress; }
/* Bouton en cours (espace.js) : bloqué pendant la requête, un indicateur qui tourne à la place de l'icône ; il garde
   sa couleur (pas l'aspect « désactivé ») pour qu'on voie que l'action est partie. */
button[aria-busy="true"], input[type="submit"][aria-busy="true"] { pointer-events: none; cursor: progress; }
.btn[aria-busy="true"] svg { display: none; }
/* Canaux d'un bouton d'envoi ({% canaux_envoi %}, 20/11/2026, demande du dirigeant : voir sur le bouton par où le
   message partira) : devant le libellé, l'enveloppe, le SMS et WhatsApp, puis un filet qui les sépare du libellé.
   Icônes et filet prennent la couleur du texte : ils suivent tous les états du bouton (fluo, survol inversé,
   inactif). Pendant l'envoi, l'anneau tournant prend leur place. */
.canaux-envoi { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.btn .canaux-envoi { padding-right: 8px; border-right: 1px solid currentColor; }
.btn[aria-busy="true"] .canaux-envoi { display: none; }
/* Balise posée dans un <span> de libellé (libellés basculés par une case ou un script) : ce <span> ne reçoit plus
   l'écart du bouton, on le lui rend. Sans poids (:where) : toute règle qui masque le <span> l'emporte. */
:where(.btn > span:has(> .canaux-envoi):not([hidden])) { display: inline-flex; align-items: center; gap: 8px; }
/* Envoi décidé par une case à cocher ({% canaux_envoi canaux si="prevenir" %}) : case décochée, rien ne part, les
   icônes disparaissent. La case est dans le formulaire du bouton, ou dans le même tiroir quand le bouton du pied
   est relié par form= ; un champ caché du même nom ne compte pas (l'envoi est alors imposé). Une règle par nom de
   case (CASES_ENVOI de templatetags/espace.py ; test_canaux_envoi vérifie que les deux listes se suivent). */
:is(form, dialog):has(input[type="checkbox"][name="prevenir"]:not(:checked)) .canaux-envoi[data-si-coche="prevenir"],
:is(form, dialog):has(input[type="checkbox"][name="envoyer"]:not(:checked)) .canaux-envoi[data-si-coche="envoyer"],
:is(form, dialog):has(input[type="checkbox"][name="inviter"]:not(:checked)) .canaux-envoi[data-si-coche="inviter"],
:is(form, dialog):has(input[type="checkbox"][name="envoyer_ar"]:not(:checked)) .canaux-envoi[data-si-coche="envoyer_ar"],
:is(form, dialog):has(input[type="checkbox"][name="envoyer_lien"]:not(:checked)) .canaux-envoi[data-si-coche="envoyer_lien"],
:is(form, dialog):has(input[type="checkbox"][name="confirmer"]:not(:checked)) .canaux-envoi[data-si-coche="confirmer"] { display: none; }
.btn[aria-busy="true"]::before {
  content: ""; flex: none; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent; animation: tourner 0.7s linear infinite;
}
@keyframes tourner { to { transform: rotate(360deg); } }
label[aria-busy="true"] { pointer-events: none; cursor: progress; }
.piece-etat--encours { color: var(--text); }
.piece-etat--encours::before {
  content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 6px; vertical-align: -1px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent; animation: tourner 0.7s linear infinite;
}
.piece-resultat { color: var(--text-2); }
form.en-ligne { display: inline; margin: 0; }
/* « Joindre » : le champ fichier est visuellement caché ; l'étiquette sert de bouton et porte l'anneau de focus (Finances, Assurances). */
.joindre label.btn { cursor: pointer; }
.joindre input[type="file"]:focus-visible + label { outline: 3px solid var(--focus); outline-offset: 2px; }
.rang { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.rang--droite { justify-content: flex-end; }

/* Liens d'action (.link-btn du brief, « un bouton qui se lit comme un lien » ; panel UX du 15/10/2026) : texte noir
   500, souligné noir de 1,5 px décalé de 3 px, SANS surligneur au repos, aplat lime au survol et au focus. Liens
   d'en-tête de carte, liens de détail du panneau, liens de pied de tableau, action d'une ligne « À traiter ». Jamais
   de fluo au repos dans une ligne de liste. Les boutons d'icône d'un en-tête de carte restent des fantômes. */
:is(.carte-tete, .carte-entete-legere) .btn-sobre:not(.btn-icone), .liens-detail a, .tableau-pied a:not(.btn), .a-traiter-action, .link-btn {
  color: var(--ink); font-family: var(--font); font-weight: 500;
  text-decoration: underline; text-decoration-thickness: 1.5px; text-decoration-color: var(--ink); text-underline-offset: 3px;
}
:is(.carte-tete, .carte-entete-legere) .btn-sobre:not(.btn-icone):is(:hover, :focus-visible), .liens-detail a:is(:hover, :focus-visible),
.tableau-pied a:not(.btn):is(:hover, :focus-visible), .link-btn:is(:hover, :focus-visible) {
  background: var(--cta-create); border-color: transparent; color: var(--ink);
  text-decoration-line: underline; text-decoration-thickness: 1.5px; text-decoration-color: var(--ink);
}
:is(.carte-tete, .carte-entete-legere) .btn-sobre:not(.btn-icone):active { background: var(--cta-create); transform: none; }

/* ------------------------------------------------------------------ pastilles : grises (tons du robot, statuts), colorées pour le paiement
   Brief, « Composants » (pastilles) et « Signaux » (règles D-173) : 999 px, Bricolage 11 / 600 / 18 px, anneau
   intérieur noir à 22 % (ni bordure ni hauteur en plus), point de 6 px et icône de 12 px en currentColor. Les tons
   restent gris, la gravité monte avec le gris du fond : Sûr (ok, anneau noir plein), Info, Neutre, À vérifier
   (warn), Problème (danger : noir plein, texte blanc). Seules les pastilles de PAIEMENT (classe pay, posée par
   {% pastille %} avec famille="pay") et de STATUT dans deux contextes prennent les jetons de signal. */
.pastille {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 999px;
  font-family: var(--font-display); font-size: 11px; font-weight: 600; line-height: 18px; letter-spacing: 0;
  white-space: nowrap; border: 0; background: var(--neutral-bg); color: var(--neutral);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 22%, transparent);
}
.pastille .point { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; background: currentColor; }
.pastille .icone { width: 12px; height: 12px; color: currentColor; }
.pastille--neutre { background: var(--neutral-bg); color: var(--neutral); }
.pastille--sur { background: var(--ok-bg); color: var(--ok); box-shadow: inset 0 0 0 1px var(--ink); }
.pastille--info { background: var(--info-bg); color: var(--info); }
.pastille--verifier { background: var(--warn-bg); color: var(--warn); }
.pastille--probleme { background: var(--danger); color: var(--on-accent); box-shadow: none; }
/* Paiement, coloré partout où il apparaît : réglé (vert), reste à payer (rouge), en attente (ambre) ; « Prélèvement
   le … » reste gris (pay sans ton). */
.pastille.pay.ok { background: var(--sig-ok-bg); color: var(--sig-ok); box-shadow: inset 0 0 0 1px var(--sig-ok-edge); }
.pastille.pay.danger { background: var(--sig-due-bg); color: var(--sig-due); box-shadow: inset 0 0 0 1px var(--sig-due-edge); }
.pastille.pay.warn { background: var(--sig-wait-bg); color: var(--sig-wait); box-shadow: inset 0 0 0 1px var(--sig-wait-edge); }
/* Statut du bail : coloré SEULEMENT là où le statut est l'information de la ligne (en-tête de la fiche du
   locataire, fil de l'accueil) ; ailleurs, et en particulier dans une liste où le paiement porte déjà la couleur,
   il reste gris (une touche par ligne). Ciblé sur l'état, pas sur le ton. Congé donné, « Préavis en cours » et bail
   terminé restent gris (décision B du 15/10/2026). */
:is(.loc-titre-ligne, .aujourdhui-mise) .pastille.status-arrivee {
  background: var(--sig-info-bg); color: var(--sig-info); box-shadow: inset 0 0 0 1px var(--sig-info-edge);
}
:is(.loc-titre-ligne, .aujourdhui-mise) .pastille.status-entre {
  background: var(--sig-ok-bg); color: var(--sig-ok); box-shadow: inset 0 0 0 1px var(--sig-ok-edge);
}
:is(.loc-titre-ligne, .aujourdhui-mise) .pastille.status-signature {
  background: var(--sig-wait-bg); color: var(--sig-wait); box-shadow: inset 0 0 0 1px var(--sig-wait-edge);
}
/* Score de confiance en chiffres à côté du mot (Finances, panneau) : Instrument tabulaire, gris ; noir 600 si
   problème ou < 70 % (aucun rouge). */
.c-score { font-family: var(--font); font-size: 13px; color: var(--text-2); white-space: nowrap; }
.c-score--probleme { color: var(--ink); font-weight: 600; }
.etiquette-imputation {
  display: inline-block; padding: 0 6px; border-radius: var(--radius-sm); font-family: var(--font-display);
  font-size: 11px; font-weight: 600; line-height: 18px; border: 1px solid var(--line); color: var(--text-2); white-space: nowrap;
}
.etiquette-imputation--neutre { color: var(--muted); }
/* Même composant que la pastille, ancien nom (Connexions). */
.badge {
  display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; border: 0;
  font-family: var(--font-display); font-size: 11px; font-weight: 600; line-height: 18px;
  background: var(--neutral-bg); color: var(--neutral); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 22%, transparent);
}
.badge--neutre { background: var(--neutral-bg); color: var(--neutral); }
.badge--sur { background: var(--ok-bg); color: var(--ok); box-shadow: inset 0 0 0 1px var(--ink); }
.badge--verifier { background: var(--warn-bg); color: var(--warn); }
.badge--probleme { background: var(--danger); color: var(--on-accent); box-shadow: none; }
/* Points d'état VIFS (brief, .hk-dot) : 10 px, anneau noir de 1,5 px sur tous les états, fonds --hk-* ; jamais une
   surface, toujours un libellé à côté.
   - .hk-dot : statut d'un logement (Biens › Logements, espace/biens/rendu.py, POINTS_STATUT), posé devant son
     libellé : Libre disque blanc cerclé (hk-libre), Occupé et En préavis vert (hk-en-ordre), En travaux hachures
     (hk-indisponible), En vente bleu à point central (hk-visite), incident rouge vif (hk-probleme) ; les noms des
     jetons de Super Panda (hk-clean, hk-oos, hk-inspected, hk-dirty) valent aussi ;
   - .point-sante : santé d'un robot ; actif vert, attention hachures, problème rouge vif, arrêté blanc cerclé.
   Les hachures de --hk-oos sont trop larges pour 10 px (une seule diagonale) : traits de 1,5 px tous les 3 px. */
.hk-dot {
  display: inline-block; flex-shrink: 0; vertical-align: middle; width: 10px; height: 10px; margin-inline-end: 6px;
  border-radius: 50%; background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--ink);
}
.hk-dot:is(.hk-en-ordre, .hk-clean) { background: var(--hk-clean); }
.hk-dot:is(.hk-probleme, .hk-dirty) { background: var(--hk-dirty); }
.hk-dot:is(.hk-visite, .hk-inspected) { background: var(--hk-inspected); }
.hk-dot:is(.hk-indisponible, .hk-oos) { background: repeating-linear-gradient(45deg, var(--ink) 0 1.5px, var(--paper) 1.5px 3px); }
.hk-dot.hk-libre { background: var(--paper); }
.point-sante {
  width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; background: var(--paper);
  box-shadow: inset 0 0 0 1.5px var(--ink);
}
.point-sante--ok { background: var(--hk-clean); }
.point-sante--attention { background: repeating-linear-gradient(45deg, var(--ink) 0 1.5px, var(--paper) 1.5px 3px); }
.point-sante--probleme { background: var(--hk-dirty); }
.point-sante--off { background: var(--paper); }

/* ------------------------------------------------------------------ filtres, champs
   Brief, « Composants » (champs, segmenté, puces) : bordure --field-line (4,7:1), rayon 6 px, focus bordure noire et
   halo sans contour ; étiquette Bricolage 12 / 700, aide 11 px grise, erreur 11 / 600 noire ; l'état choisi est
   noir à texte blanc. */
.barre-outils { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.barre-outils .espace { flex: 1 1 0; }
.mois {
  display: inline-flex; align-items: center; height: 36px; border: 1px solid var(--field-line);
  border-radius: var(--radius); background: var(--field);
}
.mois-fleche {
  width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-2); border-radius: var(--radius-sm); text-decoration: none; border: 0; background: none;
}
.mois-fleche:hover { background: var(--nav-hover); color: var(--ink); }
.mois-fleche[aria-disabled="true"] { color: var(--handle); pointer-events: none; }
.mois-libelle {
  padding: 0 8px; font-family: var(--font-display); font-weight: 700; min-width: 130px; text-align: center;
  font-size: 13px; color: var(--ink);
}
.puces { display: flex; gap: 6px; flex-wrap: wrap; }
/* Puces de filtre : pastilles grises à anneau noir à 22 %, la puce active noire pleine à texte blanc. */
.puce {
  display: inline-flex; align-items: center; padding: 0 10px; min-height: 32px; border-radius: 999px;
  border: 1px solid transparent; background: var(--soft-2); color: var(--text-2);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 22%, transparent);
  font-family: var(--font-display); font-size: 12px; font-weight: 700; text-decoration: none; white-space: nowrap; line-height: 1.2;
}
.puce:hover { border-color: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); text-decoration: none; }
.puce[aria-current="true"], .puce[aria-pressed="true"] {
  background: var(--ink); border-color: transparent; color: var(--on-accent); font-weight: 700; box-shadow: none;
}
.puce[aria-current="true"] .point, .puce[aria-pressed="true"] .point { background: currentColor; }
/* Segmenté : piste grise bordée de noir, choix de rayon 6 px, choisi noir plein à texte blanc ; 700 dans tous les
   états (la largeur ne bouge pas). Enzo colle ses choix au bord de la piste (mise en page inchangée). */
.segments {
  display: inline-flex; border: 1px solid var(--ink); border-radius: var(--radius-lg); overflow: hidden; background: var(--soft-2);
}
.segment {
  padding: 0 10px; border: 0; border-right: 1px solid transparent; border-radius: var(--radius); background: transparent;
  color: var(--text-2); font-family: var(--font-display); font-size: 12px; font-weight: 700; white-space: nowrap;
  text-decoration: none; display: inline-flex; align-items: center; min-height: 32px;
}
.segment:last-child { border-right: 0; }
.segment:hover { color: var(--ink); text-decoration: none; }
.segment[aria-pressed="true"], .segment[aria-current="true"] { background: var(--ink); color: var(--on-accent); font-weight: 700; box-shadow: none; }
.segment--actif[aria-pressed="true"] { background: var(--ink); color: var(--on-accent); }
.champ { display: flex; flex-direction: column; gap: 6px; }
.champ-etiquette { font-family: var(--font-display); font-size: 12px; font-weight: 700; color: var(--ink); }
.champ-aide { font-size: 11px; color: var(--muted); }
/* Erreur de champ : noir 600, aucun rouge ; le champ invalide prend une bordure noire et une barre intérieure. */
.champ-erreur { font-size: 11px; font-weight: 600; color: var(--ink); }
.saisie {
  height: 36px; padding: 0 12px; border: 1px solid var(--field-line); border-radius: var(--radius);
  background: var(--field); color: var(--text); width: 100%;
}
textarea.saisie { height: auto; padding: 8px 12px; }
/* Menu déroulant : la flèche du système colle au trait du champ (retour du dirigeant du 18/11/2026, filtres de
   Locataires). On la remplace par un chevron dessiné dans le champ, à 12 px du bord et centré, avec la place qu'il
   lui faut à droite (le texte ne passe jamais dessous). Hors liste à choix multiple, et hors .pilotage-choix, qui pose
   son propre chevron (icône du gabarit). */
select.saisie:not([multiple], [size]):not(.pilotage-choix select) {
  appearance: none; -webkit-appearance: none; padding-right: 32px; text-overflow: ellipsis; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%),
                    linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 17px) center, calc(100% - 12px) center;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
.saisie:hover { border-color: var(--field-hover); }
.saisie:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px var(--focus-ring); }
.saisie[aria-invalid="true"] { border-color: var(--ink); box-shadow: inset 3px 0 0 var(--ink); }
.saisie[aria-invalid="true"]:focus { box-shadow: inset 3px 0 0 var(--ink), 0 0 0 3px var(--focus-ring); }
.saisie-etroite { width: auto; }
.barre-outils .saisie { width: auto; min-width: 180px; }
.case-ligne { display: flex; align-items: center; gap: 8px; min-height: 36px; font-size: 13px; color: var(--text); }
.filtre-texte {
  display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px; border: 1px solid var(--field-line);
  border-radius: var(--radius); background: var(--field); color: var(--subtle); margin: 0;
}
.barre-outils .filtre-texte { flex: 1 1 200px; min-width: 200px; max-width: 320px; }
.filtre-texte:hover { border-color: var(--field-hover); }
.filtre-texte:focus-within { border-color: var(--focus); box-shadow: 0 0 0 3px var(--focus-ring); }
.filtre-texte input { flex: 1; min-width: 0; min-height: 24px; border: 0; background: transparent; outline: none; color: var(--text); }
.filtre-texte input::placeholder { color: var(--subtle); }
/* Cases et boutons radio natifs : noirs une fois cochés. */
input[type="checkbox"], input[type="radio"] { accent-color: var(--ink); }

/* ------------------------------------------------------------------ cartes, indicateur, bandeaux
   Brief, « Mise en page et coquille » (cartes : fond blanc, filet gris, rayon 8 px, ombre d'un pixel) et
   « Composants » (encarts : gris ; la gravité se lit au gris du fond et au contour, noir plein en problème). */
.carte {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px 20px;
  box-shadow: var(--shadow-sm);
}
.carte:has(> .carte-tete) { padding: 0; }
.carte-tete { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; row-gap: 2px; padding: 12px 20px; border-bottom: 1px solid var(--line); min-height: 48px; }
.carte-tete .espace, .carte-entete-legere .espace { flex: 1; }
.carte-tete + .carte-corps, .carte > .detail-corps { padding: 16px 20px; }
/* Titre de carte : Bricolage 16 px sur un interligne figé de 18 px, 700, -0,2 px. */
.carte-titre {
  font-family: var(--font-display); font-size: 16px; line-height: 18px; font-weight: 700; letter-spacing: -0.2px;
  color: var(--ink);
}
.carte-titre .compte { font-family: var(--font); color: var(--muted); font-weight: 500; letter-spacing: 0; }
.carte-explication { font-size: 12px; color: var(--muted); }
/* Tête de carte dont l'explication est longue : le titre garde sa largeur et son compte, l'explication prend le reste de
   la ligne ou passe sous le titre quand il n'y a plus la place (panneau ouvert, téléphone), au lieu d'écraser le titre en
   colonne de quelques lettres. Remplace la classe .carte-tete--explique posée à la main sur chaque en-tête (finances-loyers).
   Cette règle est écrite pour un en-tête EN RANGÉE : la base de 22 rem y est une largeur. Un en-tête qui passe en colonne
   (flex-direction: column : .reglage, .a-traiter, .ap-analyse) doit poser `flex: none` sur son explication, sinon la base de
   22 rem y devient une HAUTEUR : un vide de 352 px sous le titre (revue UX 27/10/2026, régression R1). */
.carte-tete > .carte-explication { flex: 1 1 22rem; min-width: 0; }
.carte-tete:has(> .carte-explication) > .carte-titre { flex: none; max-width: 100%; }
.carte-tete:has(> .carte-explication) > .espace { display: none; }
.carte--liste { padding: 0; overflow: hidden; }
.carte-entete-legere { display: flex; align-items: center; gap: 8px; }
.carte-entete-legere .fort {
  font-family: var(--font-display); font-size: 16px; line-height: 18px; font-weight: 700; letter-spacing: -0.2px;
  color: var(--ink);
}
.carte-pied {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 20px;
  border-top: 1px solid var(--line);
}
.compteur-accent {
  font-family: var(--font-display); font-size: 12px; background: var(--soft-2); color: var(--ink); border-radius: var(--radius-sm);
  padding: 0 6px; font-weight: 700; line-height: 20px;
}
/* Indicateur du mois : une ligne de statut sobre, jauge fine grise ; valeur en chiffre clé (Bricolage 700). */
.indicateur {
  display: flex; align-items: center; gap: 12px; padding: 0; background: transparent; border: 0; flex-wrap: wrap;
  font-size: 13px; color: var(--text-2);
}
.ligne-statut { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--text-2); min-height: 24px; }
.indicateur-valeur {
  font-size: 14px; font-weight: 700; font-family: var(--font-display); letter-spacing: -0.3px; color: var(--ink);
}
.jauge { width: 120px; height: 8px; flex-shrink: 0; overflow: visible; }
/* Jauges grises : fond gris clair, niveau gris foncé, seuil noir. */
.jauge-fond { fill: var(--soft-2); }
.jauge-niveau { fill: var(--subtle); }
.jauge-niveau--haut { fill: var(--text-2); }
.jauge-seuil { fill: var(--ink); }
.indicateur-texte { font-size: 13px; flex: 1; min-width: 240px; }
.indicateur-ok { color: var(--text-2); font-weight: 500; }
.indicateur-ko { color: var(--ink); font-weight: 600; }
.bandeau {
  display: flex; align-items: flex-start; gap: 10px; padding: 10px 14px; border-radius: var(--radius);
  background: var(--soft); border: 1px solid var(--line); color: var(--text); flex-wrap: wrap; font-size: 13px;
}
.bandeau-point { width: 8px; height: 8px; border-radius: 50%; background: var(--ink); flex-shrink: 0; margin-top: 6px; }
.bandeau-titre { font-weight: 600; color: var(--ink); }
.bandeau--info { background: var(--info-bg); border-color: var(--line); color: var(--text); }
.bandeau--info .bandeau-point { display: none; }
/* Problème : gris soutenu à contour noir plein ; --muted y échoue (4,1:1), le texte secondaire passe à --text-2. Un TRAIT
   PLEIN de 4 px à gauche le distingue au premier coup d'œil du bandeau d'information (gris clair, filet fin) : la
   différence ne repose plus sur deux teintes de gris voisines (revue UX 27/10/2026, nouveaux-finances-1-17). */
.bandeau--probleme { background: var(--danger-bg); border-color: var(--ink); border-left-width: 4px; }
.bandeau--probleme .bandeau-point { background: var(--ink); }
.bandeau--probleme .bandeau-titre { color: var(--ink); font-weight: 600; }
.bandeau--probleme .discret { color: var(--text-2); }
.bandeau-texte { flex: 1; min-width: 240px; }
.bandeau .btn { align-self: center; }
/* Bandeau d'une ligne avec son unique bouton (bordé, 32 px) aligné à droite. */
.bandeau--action { align-items: center; gap: 12px 16px; padding: 10px 12px 10px 16px; }
.bandeau--action .bandeau-texte { color: var(--text); }
.bandeau--action .btn { margin-left: auto; flex-shrink: 0; }
/* Alertes de trésorerie en tête des écrans Finances (espace/finances/_bandeau_alertes.html, 03/10/2026) : le titre
   en noir, le détail à l'encre secondaire, les boutons à droite ; empilés sur téléphone. */
.zone-alertes { display: contents; }   /* la zone (rechargée après « Annuler ») n'a pas de boîte : vide, aucune place */
.bandeau-alertes { align-items: center; gap: 8px 12px; padding: 12px 12px 12px 16px; }
.bandeau-alertes .bandeau-point { align-self: flex-start; margin-top: 7px; }
.bandeau-alertes .bandeau-texte { display: flex; flex-direction: column; gap: 2px; }
.bandeau-alertes .bandeau-titre { font-size: 14px; font-weight: 600; }
.bandeau-detail { color: var(--text-2); }
.bandeau-liste { list-style: none; margin: 2px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.bandeau-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; flex-shrink: 0; }
.fait-bandeau {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius);
  background: var(--soft); color: var(--text-2); border: 1px solid var(--line);
}
.fait-bandeau .icone { color: var(--muted); }
.fait-bandeau .texte { flex: 1; font-weight: 500; }
.fait-bandeau .btn { min-height: 32px; padding: 0 10px; font-size: 13px; }
.confirmation { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: var(--radius); background: var(--paper); border: 1px solid var(--field-line); }
.texte-fait { font-size: 13px; color: var(--text-2); font-weight: 500; }
.texte-corrige { color: var(--ink); font-weight: 600; }

/* ------------------------------------------------------------------ tableau (grilles, jamais <table>)
   Brief, « Composants » (tableaux) : fond blanc, filet gris, en-têtes Bricolage 11 / 700 / +0,2 px gris sur --soft,
   séparateurs --line-soft, survol --row-hover, ligne ouverte ou cochée à anneau intérieur noir ; montants en
   Instrument tabulaire, identifiants en mono 12 px. */
.tableau {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: clip;
  display: flex; flex-direction: column;
}
.tableau-tete, .ligne { display: grid; gap: 12px; align-items: center; padding: 8px 16px; }
.tableau-tete {
  border-bottom: 1px solid var(--line); font-family: var(--font-display); font-size: 11px; font-weight: 700;
  letter-spacing: 0.2px; text-transform: none; color: var(--muted); background: var(--soft); min-height: 36px;
  position: sticky; top: var(--hauteur-entete); z-index: 5;
}
.tableau .carte-tete + .tableau-tete { position: static; }
.ligne { border-bottom: 1px solid var(--line-soft); background: var(--paper); min-height: 48px; }
.ligne:last-child { border-bottom: 0; }
.ligne:hover { background: var(--row-hover); }
.ligne.ouverte { background: var(--row-hover); box-shadow: inset 0 0 0 1px var(--ink); }
/* Une ligne cochée par sa case de SÉLECTION (colonne .cellule--case des listes Données, .c-case des autres listes) se
   cadre ; un interrupteur de réglage dans une ligne (« Actif », « Compte des loyers » des comptes bancaires) n'est pas
   une sélection : la ligne ne s'encadre pas (revue UX-D). */
.ligne:has(:is(.cellule--case, .c-case) .case:checked) { background: var(--row-hover); box-shadow: inset 0 0 0 1px var(--ink); }
.ligne--faite { background: var(--soft); }
.ligne--cliquable { text-decoration: none; color: inherit; }
/* Longues listes (biens, annonces, registre d'ouverture, quittancement, courrier…) : au-delà des 30 premières
   lignes d'un groupe, le navigateur ne calcule style et mise en page d'une ligne qu'à l'approche de l'écran. Place
   réservée en attendant : la hauteur moyenne des lignes déjà dessinées de la même liste, mesurée par espace.js
   (--hauteur-ligne). Dès qu'une ligne approche de l'écran, espace.js la marque data-dessinee et elle redevient une
   ligne ordinaire : le confinement qu'impose content-visibility décalait d'un demi-pixel les lignes de hauteur
   fractionnaire et effaçait un séparateur sur deux. Écran seulement : l'impression rend tout. Les en-têtes
   collants (.tableau-tete) et les listes courtes ne sont pas concernés. */
@media screen {
  [role="rowgroup"] > .ligne:nth-child(n+31):not([data-dessinee]) {
    content-visibility: auto; contain-intrinsic-size: auto var(--hauteur-ligne, 41px);
  }
}
.cellule { min-width: 0; }
.c-date { font-size: 13px; color: var(--text-2); }
/* Montants : Instrument Sans tabulaire 13 px / 500 (plus de mono) ; l'espace insécable d'Instrument est très
   étroite (« 670,00 € » se lisait « 670,00€ ») : un léger espacement des mots la rend lisible. */
.c-montant {
  text-align: right; font-weight: 500; white-space: nowrap; font-family: var(--font); font-size: 13px;
  word-spacing: 0.12em;
}
/* Un débit n'est pas un problème : le signe suffit, la pastille porte l'état. */
.c-montant.negatif { color: var(--text-2); font-weight: 500; }
.detail-montant.negatif { color: var(--text-2); font-weight: 700; }
.c-actions { display: flex; justify-content: flex-end; align-items: center; gap: 6px; flex-wrap: wrap; }
.c-qui { min-width: 0; }
.lien-qui {
  display: flex; flex-direction: column; gap: 2px; min-width: 0; text-align: left; color: inherit;
  text-decoration: none; border-radius: 4px;
}
.lien-qui:hover { color: inherit; text-decoration: none; }
.lien-qui:hover .libelle { text-decoration: underline; text-decoration-color: var(--ink); }
/* Nom d'une société ou d'une personne en lien vers sa fiche (_lien_societe.html…) : couleur du texte qui l'entoure,
   souligné au survol seulement, comme le nom du locataire de la liste des logements. */
a.lien-nom { color: inherit; text-decoration: none; }
a.lien-nom:hover { color: inherit; text-decoration: underline; text-decoration-color: currentColor; }
/* Identifiant (code de lot) en mono 12 px ; interligne figé à l'ancienne hauteur (13 px × 1,5) : la taille baisse,
   la ligne du tableau ne bouge pas. */
.libelle {
  font-family: var(--mono); font-size: 12px; line-height: 19.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 100%; color: var(--ink);
}
/* Deuxième ligne d'une cellule (logement, adresse, motif, date secondaire) : une seule ligne coupée par « … » au bureau
   (l'info-bulle title du texte entier est posée au survol par espace.js, poserInfobulleTronquee) ; DEUX lignes au
   téléphone et dans le mode étroit du panneau ouvert (blocs plus bas), sans rien écrire dans le gabarit. Un écran
   qui a une classe maison pour cette ligne (.c-robot-nom .sous-ligne…) peut ajouter .sous-ligne à côté de la sienne
   plutôt que de redéclarer troncature et clamp. */
.sous-ligne {
  display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  word-spacing: 0.12em;
}
.c-pourquoi { display: flex; flex-direction: column; gap: 1px; min-width: 0; align-items: flex-start; }
.c-pourquoi > * { max-width: 100%; }
.c-pourquoi .nom { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; color: var(--text); text-decoration: none; }
.c-pourquoi a.nom:hover { text-decoration: underline; text-decoration-color: var(--ink); }
.c-etat { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
/* Colonne « État » : espace.css étirait la pastille à 92 px (invisible quand elle était transparente) ; colorée,
   elle se lirait comme une jauge : largeur du contenu, comme sous 720 px. */
.c-etat .pastille { min-width: 0; justify-content: flex-start; }
.c-etat-ligne { display: flex; align-items: center; gap: 8px; }
/* L'avis du robot explique l'état : en entier, sans survol (demande du dirigeant, 28/09). */
.c-avis { font-size: 12px; line-height: 1.35; color: var(--muted); overflow-wrap: anywhere; }
.avis-points { margin: 0; padding-left: 14px; }
.avis-points li { margin: 0 0 1px; }
.avis-points li::marker { color: var(--subtle); }
.avis-points .avis-attention { color: var(--text); font-weight: 500; }
.avis-points .avis-ia { color: var(--text-2); }
/* Sous le bail proposé : loyer, écart avec le montant reçu, solde du compte — lisible sans ouvrir le panneau. */
.chiffres-bail { display: block; font-size: 12px; line-height: 1.35; color: var(--muted); white-space: normal; }
.chiffres-bail .ecart-recu { color: var(--ink); font-weight: 500; }
.c-avis .ia { font-weight: 500; color: var(--text-2); }
.case { width: 16px; height: 16px; margin: 0; accent-color: var(--ink); cursor: pointer; }
.tableau-pied {
  display: flex; align-items: center; gap: 12px; padding: 8px 16px; border-top: 1px solid var(--line);
  font-size: 12px; color: var(--muted); flex-wrap: wrap; min-height: 36px; word-spacing: 0.12em;
}
.tableau-pied .espace { flex: 1; }
/* Liens du pied : liens d'action (règle commune, section boutons) ; les boutons du pied (« Suivante ») restent des
   boutons. */
/* Tri des tableaux (dirigeant, 07/10/2026) : une flèche ↑ et une flèche ↓ à côté du titre de chaque colonne. Posées
   par tri-local.js (toutes les lignes sont dans la page) ou par le gabarit espace/_tri_fleches.html (tri au serveur),
   même aspect : grises au repos, la flèche choisie noire pleine à flèche blanche. Téléphone (en-têtes masqués) :
   la liste « Trier » que pose tri-local.js au-dessus des lignes. */
.tri-fleches { display: inline-flex; align-items: center; vertical-align: middle; margin-left: 2px; white-space: nowrap; }
/* En-tête à flèches : dans une colonne trop étroite pour le titre et les flèches, les flèches passent sous le titre
   (jamais un titre coupé) ; le titre seul plus large que la colonne (.tri-titre, posé par tri-local.js) se coupe avec
   des points de suspension. Affichage en spécificité nulle (:where) : une règle d'écran qui
   masque une colonne (display: none) passe toujours devant ; sens et alignement plus forts qu'une règle de cellule
   partagée avec l'en-tête (.c-immeuble en colonne, par exemple). */
:where([role="columnheader"]:has(> .tri-fleches)) { display: flex; min-width: 0; }
[role="row"] > [role="columnheader"]:has(> .tri-fleches) { flex-flow: row wrap; align-items: center; gap: 0 2px; }
[role="row"] > [role="columnheader"].a-droite:has(> .tri-fleches), [role="row"] > .tri-a-droite { justify-content: flex-end; }
[role="row"] > .tri-au-centre { justify-content: center; }
.tri-titre { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
[role="columnheader"] > .tri-fleches { flex: none; margin-left: 0; }
.tri-fleche {
  display: inline-flex; align-items: center; justify-content: center; width: 14px; height: 20px; padding: 0; border: 0;
  border-radius: var(--radius-sm); background: none; color: var(--muted); font: inherit; cursor: pointer;
}
/* Cible (WCAG 2.2, 2.5.8) : la flèche mesure 14 × 20 px et les deux flèches d'une colonne se touchent. Sans agrandir
   la flèche ni l'en-tête, sa zone cliquable est portée à 24 × 24 px par un pseudo-élément transparent : 2 px de plus
   en haut et en bas, 11 px vers l'EXTÉRIEUR du couple (à gauche pour la première, à droite pour la seconde), pour que
   les deux zones ne se recouvrent jamais ; une flèche seule déborde de 5 px de chaque côté. */
.tri-fleche::after { content: ""; position: absolute; top: -2px; bottom: -2px; left: -5px; right: -5px; }
.tri-fleche:first-child:not(:only-child)::after { left: -11px; right: 0; }
.tri-fleche:last-child:not(:only-child)::after { left: 0; right: -11px; }
.tri-fleche { position: relative; }
.tri-fleche:hover { color: var(--ink); background: var(--paper); text-decoration: none; }
.tri-fleche[aria-pressed="true"], .tri-fleche[aria-current="true"] {
  color: var(--on-accent); background: var(--ink); box-shadow: none;
}
.tri-fleche.htmx-request { cursor: progress; }
.tableau-tete [aria-sort="ascending"], .tableau-tete [aria-sort="descending"] { color: var(--ink); }
.tri-telephone { display: none; }
.barre-selection {
  display: none; align-items: center; gap: 8px; padding: 0 0 0 4px; border-radius: var(--radius);
  color: var(--text-2);
}
.ecran:has(.case:checked) .barre-selection { display: flex; }
.ecran:has(.case:checked) .btn-valider-surs { display: none; }   /* jamais deux boutons principaux */
.barre-selection .compte { font-weight: 500; font-size: 13px; padding-right: 4px; }

/* ------------------------------------------------------------------ état vide */
.vide {
  border: 1px dashed var(--field-line); border-radius: var(--radius-lg); padding: 32px 20px; margin: 16px;
  display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; color: var(--text);
}
.vide .icone { color: var(--muted); margin-bottom: 4px; }
.vide-titre { font-family: var(--font-display); font-weight: 700; font-size: 14px; color: var(--ink); }
.vide-texte { font-size: 13px; color: var(--muted); max-width: 420px; }
.vide a.fort { font-weight: 500; font-size: 13px; margin-top: 8px; }
/* La marge de 16 px est prévue pour un état vide posé DANS une carte ou une cellule de tableau. Posé directement dans la
   page (enfant de .ecran ou de .principal), l'encadré s'aligne sur le titre et sur les puces : sans marge (revue UX
   27/10/2026, nouveaux-parametres-3-37). Les écrans qui l'enveloppent d'un conteneur gardent leur propre règle. */
.ecran > .vide, .principal > .vide { margin: 0; }

/* ------------------------------------------------------------------ panneau latéral / tiroir
   Brief, « Composants » (panneau latéral : bordure gauche noire, ombre large ; fenêtres : contour noir, ombre dure). */
.panneau:empty { display: none; }
.panneau {
  position: fixed; top: var(--hauteur-entete); right: 0; bottom: 0; width: var(--largeur-panneau); max-width: 100%;
  background: var(--paper); border-left: 1px solid var(--ink); box-shadow: var(--shadow-lg);
  z-index: 30; display: flex; flex-direction: column; animation: glisser-gauche var(--duree) ease-out;
}
@keyframes glisser-gauche { from { transform: translateX(16px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes monter { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
/* min-width: 0 : le détail est un enfant flex du panneau (de largeur fixe) ; sans lui, un mot long ou un tableau étroit
   aurait élargi le détail au-delà du panneau (revue UX-F, panneaux-deborde). Le glissement d'entrée du panneau
   (glisser-gauche, 16 px, 150 ms) est la seule fois où il sort de l'écran : il est fixe, aucune barre de défilement. */
.detail { display: flex; flex-direction: column; min-height: 0; min-width: 0; flex: 1; overflow-wrap: break-word; }
.detail-tete {
  display: flex; align-items: flex-start; gap: 12px; padding: 16px 20px 14px 20px; border-bottom: 1px solid var(--line);
}
.detail-tete .titres { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.detail-contexte { font-size: 12px; color: var(--muted); }
/* Nom du locataire en titre et logement dans le contexte d'un panneau : liens vers leurs fiches (_lien_locataire.html,
   _lien_logement.html), même aspect que le texte, soulignés au survol. */
.detail-titre-lien, .detail-contexte-lien { color: inherit; text-decoration: none; }
.detail-titre-lien:hover, .detail-titre-lien:focus-visible, .detail-contexte-lien:hover, .detail-contexte-lien:focus-visible { text-decoration: underline; text-decoration-color: var(--ink); }
/* Titre du panneau (cible du focus à l'ouverture, tabindex="-1") : montant en chiffre clé, Bricolage 22 px / 700
   tabulaire ; titre de texte en police d'enseigne 19 px (brief, « Panneau latéral »). 15/10/2026, thème Super Panda :
   plus d'« outline: none » ; la règle globale :focus-visible montre où le focus arrive quand le panneau s'ouvre au
   clavier, rien après un clic (heuristique :focus-visible du navigateur). */
.detail-montant {
  font-family: var(--font-display); font-size: 22px; font-weight: 700; letter-spacing: -0.4px; line-height: 1.25;
  color: var(--ink); word-spacing: 0.12em;
}
.detail-titre-texte { font-family: var(--font-display); font-size: 19px; font-weight: 700; letter-spacing: -0.3px; word-spacing: normal; }
.detail-etat { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.detail-etat:empty { display: none; }
.btn-fermer {
  width: 32px; height: 32px; border-radius: var(--radius-sm); border: 1px solid transparent; background: transparent;
  display: inline-flex; align-items: center; justify-content: center; color: var(--muted); padding: 0; flex-shrink: 0;
  text-decoration: none;
}
.btn-fermer:hover { background: var(--nav-hover); color: var(--ink); }
.poignee { display: none; }
.detail-corps { flex: 1; overflow: auto; padding: 16px 20px 20px 20px; display: flex; flex-direction: column; gap: 20px; }
.bloc { display: flex; flex-direction: column; gap: 6px; }
/* Titre de bloc : étiquette du brief, Bricolage 12 / 700, noir. */
.bloc-titre { font-family: var(--font-display); font-size: 12px; line-height: 1.5; font-weight: 700; letter-spacing: 0; color: var(--ink); }
.libelle-exact { font-family: var(--mono); font-size: 12px; line-height: 19.5px; word-break: break-word; }
.deux-colonnes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.deux-colonnes .titre { font-size: 12px; color: var(--muted); }
.robot {
  border-radius: var(--radius); background: var(--soft); border: 1px solid var(--line); padding: 12px 14px;
  display: flex; flex-direction: column; gap: 8px;
}
.robot-grille { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 6px 12px; align-items: start; }
.robot-cle { font-size: 12px; font-weight: 500; color: var(--muted); padding-top: 2px; }
.robot-valeur { font-size: 13px; }
.robot-ia { border-top: 1px solid var(--line); padding-top: 8px; font-size: 13px; display: flex; gap: 12px; }
/* Même colonne de clés que .robot-grille : « Agents IA » ne se casse plus en deux lignes. */
.robot-ia .robot-cle { width: 132px; flex-shrink: 0; white-space: nowrap; }
.proposition {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius);
  border: 1px solid var(--line);
}
.proposition .centre { flex: 1; min-width: 0; }
.proposition .nom { font-weight: 500; text-decoration: none; }
.proposition a.nom:hover { text-decoration: underline; }
.proposition .droite { text-align: right; white-space: nowrap; }
.proposition .droite .fort { font-family: var(--font); font-size: 13px; font-weight: 500; word-spacing: 0.12em; }
.proposition-vide {
  padding: 10px 12px; border-radius: var(--radius); border: 1px dashed var(--field-line); font-size: 13px;
  color: var(--text-2);
}
.lignes-lot { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); }
.lignes-lot .l {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; padding: 8px 12px; align-items: center;
  border-bottom: 1px solid var(--line-soft); font-size: 13px;
}
.lignes-lot .l:last-child { border-bottom: 0; }
.lignes-lot .fort { font-family: var(--font); font-weight: 500; word-spacing: 0.12em; }
.actions-panneau { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.actions-panneau .rang { display: flex; gap: 8px; flex-wrap: wrap; }
.actions-panneau .rang form { display: flex; }
.actions-panneau .rang--secondaire .btn { font-size: 13px; }
.actions-panneau .aide { font-size: 12px; color: var(--muted); }
.correction { display: flex; flex-direction: column; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); }
.correction-tete { display: flex; align-items: center; gap: 8px; }
/* Tête de correction : sur-titre en capitales, sur l'interligne d'origine (13 px × 1,5) pour que la hauteur ne bouge pas. */
.correction-tete .etiquette, .correction-tete .bloc-titre {
  flex: 1; font-family: var(--font-display); font-size: 11px; line-height: 19.5px; font-weight: 700; letter-spacing: 1.1px;
  text-transform: uppercase; color: var(--nav-label);
}
.candidat {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--paper); text-align: left; width: 100%; min-height: 40px;
}
.candidat:hover { border-color: var(--ink); background: var(--row-hover); }
.candidat--propose { border-color: var(--ink); background: var(--soft); }
.candidat .nom { flex: 1; font-weight: 500; min-width: 0; }
.candidat .note { font-size: 12px; color: var(--muted); text-align: right; max-width: 45%; }
.historique { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.historique .evt { display: flex; gap: 10px; }
.historique .quand { font-family: var(--font); font-size: 12px; color: var(--muted); width: 96px; flex-shrink: 0; padding-top: 1px; }
.liens-detail { display: flex; gap: 12px; font-size: 12px; flex-wrap: wrap; margin-top: 4px; }
.page-detail { max-width: 760px; }
.page-detail .detail { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.page-detail .detail-corps { overflow: visible; }
.page-detail-large { max-width: 1040px; }

/* Tiroir = fenêtre modale centrée (<dialog>) ; brief, « Fenêtres » : contour noir de 1 px, rayon 8 px, ombre dure de
   6 px. Le contour est un anneau (box-shadow), pas une bordure, pour que la fenêtre garde sa taille ; l'ombre dure
   part de cet anneau. Voile noir à 55 %. */
.tiroir {
  border: 0; padding: 0; margin: auto; width: min(560px, calc(100% - 32px)); max-height: 85vh;
  background: var(--paper); color: var(--text); border-radius: var(--radius-lg);
  box-shadow: 0 0 0 1px var(--ink), 6px 6px 0 1px var(--ink);
}
.tiroir::backdrop { background: var(--overlay); }
.tiroir[open] { animation: monter var(--duree) ease-out; }
/* Un tiroir rendu ouvert par le serveur (adresse ?ajouter=1, formulaire renvoyé avec ses erreurs) n'a que l'attribut open :
   c'est un dialogue NON modal, sans voile ni couche supérieure, que les barres fixes du téléphone recouvrent. espace.js le
   promeut en dialogue modal (promouvoirTiroirs) ; ce repli, sans script, le pose au-dessus des barres avec le même voile
   (revue UX 27/10/2026, nouveaux-mixte-1-08 et 2-22). */
.tiroir[open]:not(:modal) { position: fixed; inset: 0; z-index: 80; box-shadow: 0 0 0 1px var(--ink), 6px 6px 0 1px var(--ink), 0 0 0 100vmax var(--overlay); }
.tiroir-contenu { padding: 8px 20px 20px 20px; display: flex; flex-direction: column; gap: 12px; }
.tiroir-poignee { width: 40px; height: 4px; border-radius: 2px; background: var(--handle); margin: 4px auto 0 auto; }
.tiroir-tete { display: flex; align-items: center; gap: 10px; }
/* Emplacement dont le chargement a échoué (espace.js, data-echec : bloc de l'accueil, carte Chiffres, formulaire d'un
   tiroir, liste d'un <select>) : le message du gabarit et « Réessayer » à la place de l'attente. */
.chargement-echec { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0; font-size: 13px; color: var(--text-2); }
.carte--liste > .chargement-echec { padding: 16px 20px; }
/* Titre de fenêtre : 17 px / 700 / -0,3 px sur l'interligne du h2. */
.tiroir-titre {
  flex: 1; font-family: var(--font-display); font-size: 17px; line-height: 1.3; font-weight: 700; letter-spacing: -0.3px;
  color: var(--ink);
}

/* ------------------------------------------------------------------ toast
   Brief, « Composants » (toasts) : noir, texte blanc 13 px, rayon 6 px, ombre large ; action « Annuler » en lime,
   icônes blanches ou lime, contour de focus blanc. */
.zone-toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60;
  width: max-content; max-width: min(760px, calc(100% - 32px));
}
.toast {
  display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: var(--radius); min-width: min(520px, calc(100vw - 32px));
  background: var(--toast-bg); color: var(--toast-ink); box-shadow: var(--shadow-lg); font-size: 13px;
  animation: monter var(--duree) ease-out;
}
.toast .icone { color: var(--toast-ok); }
.toast--erreur .icone { color: var(--toast-ink); }
.toast :focus-visible { outline-color: var(--toast-ink); }
.toast-texte { flex: 1; }
.toast .btn-annuler {
  padding: 0 12px; border-radius: var(--radius); border: 1px solid transparent; background: transparent;
  color: var(--toast-ok); font-weight: 600; min-height: 32px;
}
.toast .btn-annuler:hover { background: color-mix(in srgb, var(--toast-ink) 8%, transparent); }
.toast-fermer {
  width: 28px; height: 28px; border-radius: var(--radius-sm); border: 0; background: transparent; color: var(--soft-2);
  display: inline-flex; align-items: center; justify-content: center; padding: 0;
}
.toast-fermer:hover { color: var(--toast-ink); }
/* Toast à détails (la suite d'un rejet traité, 11/11/2026) : une phrase par locataire, un lien ; fermé à la croix. */
.toast--details { align-items: flex-start; }
.toast-corps { flex: 1; display: grid; gap: 6px; }
.toast-details { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.toast-lien { color: var(--toast-ok); font-weight: 600; }

/* ------------------------------------------------------------------ pages socle (menu, Avancés, refus) */
.grille-cartes { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.liste-liens { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.liste-liens li { border-bottom: 1px solid var(--line-soft); }
.liste-liens li:last-child { border-bottom: 0; }
.liste-liens a, .liste-liens button {
  display: flex; align-items: center; gap: 10px; padding: 10px 2px; text-decoration: none; color: var(--text);
  min-height: 44px; width: 100%; text-align: left; background: none; border: 0; font-size: inherit;
}
.liste-liens a:hover, .liste-liens button:hover { color: var(--ink); background: var(--nav-hover); }
.liste-liens a .espace, .liste-liens button .espace { flex: 1; }
.texte-long { max-width: 720px; color: var(--text-2); }
.texte-long p + p { margin-top: 8px; }
.flex-1 { flex: 1; min-width: 0; }
.liste-points { margin: 4px 0 0 0; padding-left: 18px; }
.liste-points li { margin-bottom: 2px; }

/* ------------------------------------------------------------------ éléments partagés par plusieurs écrans */
/* Liste libellé : valeur. La colonne de valeur est BORNÉE à 60 % de la liste (fit-content) : une valeur qui est une phrase
   n'écrase plus le libellé sur sept lignes et ne le recouvre plus ; une valeur sans espace se coupe (overflow-wrap) au lieu
   de déborder de la carte (revue UX 27/10/2026, nouveaux-parametres-3-24 et 4-24). */
.champs-cle-valeur { display: grid; grid-template-columns: minmax(0, 1fr) fit-content(60%); gap: 6px 10px; font-size: 13px; }
.champs-cle-valeur dt { color: var(--muted); min-width: 0; }
.champs-cle-valeur dd { margin: 0; min-width: 0; text-align: right; font-weight: 500; overflow-wrap: anywhere; }
/* Dans une carte de réglages (.reglage), au bureau : deux colonnes qui se partagent la place, comme Équipe
   (.equipe-cle-valeur) ; la valeur commence toujours au même endroit, à gauche de sa colonne, au lieu d'être collée au bord
   droit à 1 100 px de son libellé, et un lien posé après la valeur (« Régler dans Robots ») se range à droite de la colonne :
   les liens sont alignés d'une ligne à l'autre (nouveaux-parametres-4-04). Les sélecteurs sont à spécificité minimale
   (:where) : une feuille d'écran (Équipe, Robots) garde la main sur sa propre liste. Téléphone : bloc « téléphone ». */
:where(.reglage) .champs-cle-valeur:where(:not(.equipe-cle-valeur)) { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }
:where(.reglage) .champs-cle-valeur:where(:not(.equipe-cle-valeur)) dd { text-align: left; justify-content: space-between; }
.deux-colonnes-info { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 8px 16px; font-size: 13px; }
.deux-colonnes-info dt { color: var(--muted); }
.deux-colonnes-info dd { margin: 0; font-size: 14px; }
.agenda-ligne { display: flex; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line-soft); align-items: baseline; }
.agenda-heure { width: auto; min-width: 48px; flex-shrink: 0; white-space: nowrap; }
.ligne-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ligne-actions .saisie { width: auto; flex: 1 1 200px; max-width: 320px; }
.actions-ligne { display: flex; gap: 8px; flex-wrap: wrap; }
.etape-liste { display: flex; flex-direction: column; }
.carte--liste .etape-liste { padding: 0 20px; }
.etape { display: flex; align-items: flex-start; gap: 14px; padding: 11px 0; border-top: 1px solid var(--line-soft); }
.etape-liste > .etape:first-child { border-top: 0; }
.etape-texte { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.etape .avatar { margin-top: 1px; }
.carte-espacee { display: flex; flex-direction: column; gap: 10px; }
.carte--verifier { border-color: var(--ink); background: var(--warn-bg); }
/* Méta-lignes à séparateurs « · » : l'espace d'Instrument Sans est étroite et le point médian a peu d'approche ;
   un léger espacement des mots rend aux séparateurs l'air qu'ils avaient. */
.carte-explication, .carte-titre .compte, .puce, .page-sous-titre, .agenda-ligne .petit { word-spacing: 0.12em; }

/* ------------------------------------------------------------------ barre d'onglets du téléphone, HTMX */
.onglets-mobile, .action-mobile { display: none; }
.htmx-indicator { opacity: 0; transition: opacity var(--duree) ease-out; }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { opacity: 1; }

/* Retour visuel dès le clic (espace.js) : barre fine en haut de la fenêtre pendant un changement de page ordinaire
   (navigation-en-cours, retirée au retour arrière) ou une requête HTMX lancée par l'utilisateur (requete-en-cours).
   Elle n'apparaît qu'après 120 ms : une réponse rapide ou une page préparée au survol ne clignote pas. Mouvement
   réduit : barre fixe, sans progression. Pendant une lecture, la zone qui va être remplacée porte zone-en-attente
   (espace.js) : 15/10/2026, thème Super Panda, elle ne s'estompe plus (une opacity de 0,55 sur du texte tombe à
   2,9:1, interdit par le brief) ; la barre de progression suffit, la liste garde seulement le curseur d'attente. */
.navigation-en-cours body::after, .requete-en-cours body::after {
  content: ""; position: fixed; top: 0; left: 0; right: 0; z-index: 200; height: 2px; background: var(--ink);
  pointer-events: none; transform-origin: 0 50%;
  animation: progression 8s cubic-bezier(0.1, 0.6, 0.3, 1) 0.12s both;
}
@keyframes progression { from { transform: scaleX(0); } to { transform: scaleX(0.92); } }
.zone-en-attente :is(.tableau, [role="table"]), .zone-en-attente:is(.tableau, [role="table"]) { cursor: progress; }
:is(.puce, .segment, .onglet, .mois-fleche).htmx-request { cursor: progress; }

/* ================================================================== téléphone
   15/10/2026, thème Super Panda : corps à 14 px comme au bureau (le brief n'a qu'une taille), champs à 16 px (pas
   de zoom automatique d'iOS), titre de page à 28 px, barre du haut à 64 px comme au bureau. */
@media (max-width: 767px) {
  :root { --gouttiere: 16px; }
  .barre { display: none; }
  .entete { gap: 10px; padding: 0 var(--gouttiere); }
  .entete .recherche, .btn.entete-planning, .btn.entete-raccourci, .moi-texte { display: none; }
  .entete-mobile { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
  .btn.recherche-mobile { display: inline-flex; }
  .entete-espace { display: none; }
  .entete-mobile .marque { padding: 0; }
  .btn-icone { width: 44px; height: 44px; }
  .principal { padding: 20px var(--gouttiere) 176px var(--gouttiere); gap: 20px; }
  .ecran { gap: 20px; }
  .page-tete { gap: 12px; }
  .page-sous-titre { display: none; }
  /* Sous-titre qui EXPLIQUE la page (variante page-sous-titre--aide) : il reste visible, sur deux lignes au plus, et les
     actions de l'en-tête passent sur la rangée 3, sous lui (nouveaux-finances-1-18). Sans la variante, le sous-titre
     reste masqué au téléphone. */
  .page-sous-titre.page-sous-titre--aide { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
  /* Actions de l'en-tête (revue UX 27/10/2026, contrat C1) : elles restent TOUTES joignables au téléphone, sur leur
     propre rangée sous le titre, à la ligne si elles sont nombreuses. Le sous-titre est masqué : la rangée 2 est libre.
     Le bouton principal, relayé par la barre collante .action-mobile, n'est pas redit dans l'en-tête (une seule
     action pleine par zone) ; sans barre collante il reste dans l'en-tête. Un gabarit n'a rien à écrire ; pour
     masquer volontairement une zone au téléphone : class="page-actions actions-bureau". */
  .page-actions, .page-tete:has(.page-actions-colonne) .page-actions {
    grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; flex-wrap: wrap; min-height: 0;
  }
  .page-tete:has(.page-actions-colonne) .page-titre { min-height: 0; }
  /* Sous-titre d'aide visible : les actions descendent sur la rangée 3 (après la règle ci-dessus, à égalité de poids). */
  .page-tete:has(.page-sous-titre--aide) .page-actions { grid-row: 3; }
  .page-actions > .btn:not(.btn-icone) { flex: 1 1 auto; }
  body:has(.action-mobile) .page-actions .btn-principal { display: none; }
  .page-actions.actions-bureau,
  .page-actions:not(:has(> :not(.btn-principal-bureau, .formulaire-cache))),
  body:has(.action-mobile) .page-actions:not(:has(> :not(.btn-principal, .btn-principal-bureau, .formulaire-cache))) { display: none; }
  /* Bouton compact : sur sa propre rangée il a la place de son texte (il ne se réduit à l'icône qu'au bureau). */
  .btn-sobre-compact { width: auto; padding: 0 12px; }
  .btn-sobre-compact .btn-texte { position: static; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; white-space: nowrap; }
  .btn { min-height: 44px; }
  .btn-petit { min-height: 44px; height: auto; padding: 0 14px; font-size: 12px; }
  .btn-icone { min-height: 0; }
  .barre-outils { gap: 8px; }
  /* Puces, onglets et filtres s'ENROULENT sur plusieurs lignes, comme nav.liens-sous-ecrans de Paramètres : aucune
     barre ne défile, la puce ou l'onglet actif est donc toujours à l'écran (revue UX 27/10/2026, contrat C2,
     UX-D3 ; plus de masque dégradé, plus de recentrage en JavaScript). */
  .puces, .onglets { flex-wrap: wrap; overflow: visible; width: 100%; padding: 0; animation: none;
    mask-image: none; -webkit-mask-image: none; }
  .onglets { row-gap: 0; }
  /* Segmentés : les choix passent à la ligne eux aussi (six choix « Fils · Tous · Reçus · Envoyés · Demandes · Accusés »
     ne tiennent pas sur 390 px) et se partagent la rangée. Pas de largeur imposée : un segmenté posé à côté d'un libellé
     (« Trier par », « Les 3 : ») garde sa place, et un écran qui veut la pleine largeur ajoute width: 100%. */
  .segments { flex-wrap: wrap; max-width: 100%; overflow: visible; gap: 2px; padding: 2px; }
  .segment { flex: 1 1 auto; justify-content: center; }
  .puce, .segment, .onglet { min-height: 40px; }
  .filtre-texte { width: 100%; min-width: 0; height: 44px; }
  .barre-outils .filtre-texte { max-width: none; flex-basis: 100%; }
  .barre-outils .saisie { width: 100%; }
  .mois { height: 44px; }
  .mois-fleche { width: 44px; height: 42px; }
  .saisie { height: 44px; }
  .saisie, .filtre-texte input { font-size: 16px; }
  /* Champ fichier : un toucher ouvre le sélecteur de fichiers, sans clavier ni zoom d'iOS ; il garde ses 14 px et peut
     rétrécir, sinon « Choisir un fichier » en 16 px élargit la page de 10 px sur 375 px (Biens › Déclaration
     d'occupation). 15/10/2026, thème Super Panda. */
  .saisie[type="file"] { font-size: 14px; min-width: 0; max-width: 100%; }
  .case-ligne { min-height: 44px; }
  .btn-principal-bureau { display: none; }
  .barre-selection, .ecran:has(.case:checked) .barre-selection { display: none; }
  .carte { padding: 14px 16px; }
  .carte-tete { flex-wrap: wrap; padding: 12px 16px; }
  .carte-tete + .carte-corps, .carte > .detail-corps { padding: 14px 16px; }

  /* tableaux → cartes à filet gris */
  .tableau { background: transparent; border: 0; border-radius: 0; overflow: visible; gap: 10px; }
  .tableau-tete { display: none !important; }
  .ligne {
    border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 12px 14px; gap: 6px 8px; min-height: 0;
    align-items: start; text-align: left;
  }
  .ligne:last-child { border-bottom: 1px solid var(--line); }
  .ligne.ouverte { border-color: var(--ink); background: var(--paper); box-shadow: none; }
  [role="rowgroup"] > .ligne:nth-child(n+31):not([data-dessinee]) { contain-intrinsic-size: auto var(--hauteur-ligne, 114px); }
  .c-date { font-size: 12px; color: var(--muted); }
  .c-etat { flex-direction: row; align-items: center; }
  .c-etat .pastille { min-width: 0; }
  /* Montants des cartes : 16 px par défaut (chaque liste garde la taille que lui donne sa feuille) ; seule la
     police change (Instrument tabulaire). */
  .c-montant { font-size: 16px; }
  .lien-qui .libelle { white-space: normal; font-size: 12px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.35; }
  .sous-ligne { white-space: normal; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; }
  /* Liste libellé : valeur d'une carte de réglages : le libellé prend toute la ligne, la valeur (phrase, pastille, lien)
     passe dessous, alignée à gauche, avec de l'air entre deux paires ; plus de libellé écrasé sur sept lignes ni collé à
     sa pastille (nouveaux-parametres-3-24, 4-08, 4-14, 4-18, 4-24). Équipe garde sa grille équilibrée. */
  :where(.reglage) .champs-cle-valeur:where(:not(.equipe-cle-valeur)) { grid-template-columns: minmax(0, 1fr); }
  :where(.reglage) .champs-cle-valeur:where(:not(.equipe-cle-valeur)) dd { margin: -4px 0 6px; justify-content: flex-start; }
  :where(.reglage) .champs-cle-valeur:where(:not(.equipe-cle-valeur)) dd:last-child { margin-bottom: 0; }
  .c-pourquoi { flex-direction: row; gap: 8px; align-items: baseline; flex-wrap: wrap; }
  /* Le nom s'enroule, il n'est plus coupé : deux lignes au plus au lieu de « M. Théo FOUR… » (UX-D3 : on enroule, on ne
     coupe pas). Même deux lignes que .sous-ligne. */
  .c-pourquoi .nom { white-space: normal; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; }
  .c-actions { justify-content: stretch; }
  .c-actions > *, .c-actions form { flex: 1; display: flex; }
  .c-actions .btn { flex: 1; min-height: 44px; height: auto; font-size: 13px; }
  .c-actions .btn-petit { font-size: 12px; }
  .c-actions .btn-valider-icone { width: auto; }
  .c-actions .btn-valider-icone::after { content: "Valider"; font-weight: 650; }
  .tableau-pied { border: 0; padding: 4px 2px; }
  .deux-colonnes { grid-template-columns: minmax(0, 1fr); }
  .deux-colonnes-info { grid-template-columns: minmax(0, 1fr); gap: 2px 0; }
  .deux-colonnes-info dd + dt { margin-top: 10px; }
  .grille-cartes { gap: 16px; }
  .bandeau { align-items: flex-start; }
  .bandeau--action { flex-direction: column; align-items: stretch; padding: 12px 14px; }
  .bandeau--action .bandeau-texte { min-width: 0; }
  .bandeau--action .btn { margin-left: 0; width: 100%; min-height: 44px; }
  .bandeau-alertes .bandeau-texte { min-width: 0; }
  /* Alertes de trésorerie (revue UX 27/10/2026, finances-1-37) : une ligne et « Voir » ; le détail et la liste sont
     sur l'écran des prévisions. */
  .bandeau-alertes .bandeau-detail, .bandeau-alertes .bandeau-liste { display: none; }
  .bandeau-actions { width: 100%; margin-left: 0; gap: 8px; }
  .bandeau-actions > * { flex: 1; display: flex; }
  .bandeau-actions .btn { flex: 1; }
  .robot-ia { flex-direction: column; gap: 2px; }
  .robot-ia .robot-cle { width: auto; }

  /* panneau → tiroir en bas : feuille basse sans filet gauche, angles hauts de 16 px, voile noir */
  .panneau {
    top: auto; left: 0; right: 0; bottom: 0; width: 100%; max-height: 88vh; border-left: 0;
    border-radius: 16px 16px 0 0; box-shadow: var(--shadow-lg), 0 0 0 100vmax var(--overlay);
    animation-name: monter; z-index: 70;
  }
  .panneau .poignee { display: block; width: 40px; height: 4px; border-radius: 2px; background: var(--handle); margin: 8px auto 0 auto; }
  .panneau .detail-tete { padding: 8px 16px 12px 16px; }
  .panneau .detail-corps { padding: 12px 16px calc(20px + env(safe-area-inset-bottom)) 16px; }
  .detail-contexte-long { display: none; }
  .robot-grille { grid-template-columns: minmax(0, 1fr); gap: 2px 0; }
  .robot-grille .robot-valeur + .robot-cle { margin-top: 8px; }
  .btn-fermer { width: 44px; height: 44px; border-radius: var(--radius); }
  .actions-panneau .rang { flex-direction: column; align-items: stretch; }
  .actions-panneau .rang > *, .actions-panneau .rang form, .actions-panneau .rang .btn, .actions-panneau .rang a { width: 100%; flex: 1; }
  .actions-panneau .btn { min-height: 44px; }
  .actions-panneau .btn-principal { min-height: 48px; font-size: 13px; }
  .candidat { min-height: 48px; }
  .page-detail .detail { border-radius: var(--radius-lg); }

  /* barre d'action collante (le bouton principal lime pleine largeur, 48 px) + onglets en bas */
  .action-mobile {
    display: block; position: fixed; left: 0; right: 0; bottom: calc(64px + env(safe-area-inset-bottom)); z-index: 25;
    padding: 10px 16px; background: var(--cream); border-top: 1px solid var(--line);
  }
  .action-mobile :is(.btn-principal, .btn-destructeur) { width: 100%; min-height: 48px; font-size: 13px; border-radius: var(--radius); }
  /* Barre d'onglets du bas : blanche, filet noir en haut ; entrée active noire à texte blanc en Bricolage 700, avec
     un peu d'air autour du libellé (4 px 8 px, rayon 6 px). */
  .onglets-mobile {
    display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); position: fixed; left: 0; right: 0;
    bottom: 0; z-index: 26; background: var(--paper); border-top: 1px solid var(--ink);
    padding: 6px 4px calc(8px + env(safe-area-inset-bottom)) 4px;
  }
  .onglet-mobile {
    min-height: 48px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    padding: 4px 8px; text-decoration: none; color: var(--muted); font-family: var(--font-display); font-size: 10.5px;
    font-weight: 600; letter-spacing: -0.2px; border-radius: var(--radius);
  }
  .onglet-mobile .icone { color: currentColor; }
  .onglet-mobile[aria-current="page"] { background: var(--nav-active); color: var(--nav-ink-active); font-weight: 700; }
  .zone-toast { bottom: calc(80px + env(safe-area-inset-bottom)); width: calc(100% - 24px); }
  body:has(.action-mobile) .zone-toast { bottom: calc(146px + env(safe-area-inset-bottom)); }
  .toast { min-width: 0; gap: 10px; padding: 12px 14px; font-size: 13px; }
  .toast-fermer { width: 36px; height: 36px; }
}

@media (min-width: 768px) and (max-width: 1100px) {
  :root { --gouttiere: 24px; }
}
/* Largeur du menu déplié selon la fenêtre (brief) : 214 px de 861 à 1120 px ; de 768 à 860 px, le brief prévoit un
   tiroir qu'Enzo n'a pas : le menu y garde ses 200 px. */
@media (min-width: 861px) and (max-width: 1120px) {
  :root { --largeur-barre: 214px; --hauteur-logo: 13px; }
}
@media (min-width: 768px) and (max-width: 860px) {
  :root { --largeur-barre: 200px; --hauteur-logo: 12px; }
}

/* Mouvement réduit (brief, « Accessibilité ») : animations et transitions ramenées à rien ; le bouton en cours
   (anneau tournant) devient un bord en pointillé immobile. Lecture d'une facture (ecrans/mandants.css, chargée
   après cette feuille : d'où le sélecteur plus précis) : même pointillé pour l'étape en cours, faisceau retiré. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important; animation-iteration-count: 1 !important;
    transition: none !important; scroll-behavior: auto !important;
  }
  .btn[aria-busy="true"]::before, .piece-etat--encours::before,
  .lecture-facture .lecture-facture-etape[data-etat="encours"] .lecture-facture-puce { border-style: dotted; border-right-color: currentColor; }
  .lecture-facture .lecture-facture-faisceau { display: none; }
}

@media print {
  .barre, .entete, .onglets-mobile, .action-mobile, .zone-toast, .panneau, .c-actions { display: none !important; }
}

/* ==================================================================================================================
   RÈGLES HÉRITÉES PROPRES À UN ÉCRAN — à déplacer dans ecrans/<écran>.css par le groupe concerné (Locataires :
   fait, règles dans ecrans/locataires.css ; Incidents et Courrier & factures : fait, les anciennes grilles —
   grille-incidents, fiche-colonnes, ligne-journal, grille-courrier, visionneuse-pdf… — sont supprimées, seule source
   ecrans/incidents.css et ecrans/courrier.css ; restent Robots/Réglages/Recherche), puis à supprimer ici. Elles
   sont conservées, avec les deux blocs @media autrefois jamais refermés (lignes 982 et 1101 de l'ancienne feuille)
   corrigés, pour que ces écrans ne se cassent pas d'ici là. Rien de ce qui suit ne concerne Aujourd'hui, Finances,
   Incidents ni Courrier & factures.
   ================================================================================================================== */

/* ------------------------------------------------------------------ robots (E39), connexions (E40) */
.resume-robots { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.resume-robots .carte { display: flex; flex-direction: column; gap: 2px; }
.resume-chiffre { font-size: 22px; font-weight: 700; letter-spacing: -0.4px; font-family: var(--font-display); color: var(--ink); }
.groupe-robots { padding: 0; overflow: clip; }
.groupe-titre {
  padding: 10px 20px; border-bottom: 1px solid var(--line); background: var(--soft); font-family: var(--font-display);
  font-size: 13px; font-weight: 700; color: var(--ink);
}
.grille-robots { grid-template-columns: 16px minmax(0, 1.2fr) minmax(0, 1.5fr) 130px 260px 84px; }
.c-robot-nom { display: flex; flex-direction: column; gap: 2px; min-width: 0; text-align: left; color: inherit; text-decoration: none; }
.c-robot-nom .nom { font-weight: 500; }
.c-robot-etat { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.c-robot-etat .bilan { font-size: 12px; color: var(--muted); }
.c-robot-dernier { font-size: 12px; color: var(--muted); }
.cellule--marches { display: flex; flex-direction: column; gap: 6px; }
.marche-bloc { display: flex; flex-direction: column; gap: 4px; }
.marche-bloc .source { font-size: 12px; color: var(--muted); }
.connexions-grille { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.connexion-tete { display: flex; align-items: center; gap: 10px; }
.connexion-tete .titre { flex: 1; font-weight: 600; }
@media (max-width: 767px) {
  .grille-robots { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
  .grille-robots > * { min-width: 0; width: 100%; }
  .grille-robots .point-sante { display: none; }
  .c-robot-nom .sous-ligne { white-space: normal; }
  .connexions-grille { grid-template-columns: minmax(0, 1fr); }
  .resume-robots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .connexion-tete { flex-wrap: wrap; }
}

/* ------------------------------------------------------------------ réglages (E41) */
.grille-comptes { grid-template-columns: minmax(0, 1fr) 150px minmax(0, 1fr) 150px 80px; }
.grille-libelles { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 90px; }
.grille-routage { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); }
.grille-utilisateurs { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 150px 90px 150px; }
.societe-carte { border-top: 1px solid var(--line-soft); padding: 14px 0; display: flex; flex-direction: column; gap: 10px; }
.societe-carte:first-child { border-top: 0; }
.grille-champs-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grille-champs-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.reglage-serveur { color: var(--text-2); background: var(--paper); }
.section-verrouillee { display: flex; align-items: center; gap: 12px; color: var(--muted); }
.carte--horizontale { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.carte--horizontale-texte { flex: 1; min-width: 220px; }
@media (max-width: 767px) {
  .grille-champs-3, .grille-champs-2 { grid-template-columns: minmax(0, 1fr); }
  .grille-comptes, .grille-libelles, .grille-routage, .grille-utilisateurs { display: flex; flex-direction: column; gap: 8px; }
}

/* ------------------------------------------------------------------ recherche globale (E42) */
.recherche-champ { max-width: 560px; height: 44px; }
.recherche-mise { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.recherche-colonne { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.recherche-aside { display: flex; flex-direction: column; gap: 24px; }
.groupe-recherche { padding: 0; overflow: clip; }
.resultat-ligne {
  display: flex; align-items: center; gap: 14px; padding: 10px 20px; border-bottom: 1px solid var(--line-soft);
  text-decoration: none; color: var(--text);
}
.groupe-recherche .resultat-ligne:last-child { border-bottom: 0; }
.resultat-ligne:hover { background: var(--row-hover); text-decoration: none; }
.resultat-ligne .icone { flex-shrink: 0; color: var(--muted); }
.resultat-texte { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.resultat-titre { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-transform: none; }
.resultat-detail { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.resultat-ligne .pastille { flex-shrink: 0; }
.carte-meilleur { display: flex; flex-direction: column; gap: 10px; }
.carte-meilleur .resultat-ligne { padding: 0; border-bottom: 0; }
.liste-astuces { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; font-size: 13px; }
.liste-astuces .mono { background: var(--soft); border-radius: var(--radius-sm); padding: 1px 6px; margin-right: 6px; }
@media (max-width: 767px) {
  .recherche-champ { width: 100%; max-width: none; height: 44px; }
  .recherche-mise { grid-template-columns: minmax(0, 1fr); }
  .resultat-ligne { padding: 12px 14px; }
  .resultat-titre, .resultat-detail { white-space: normal; }
}
/* ------------------------------------------------------------------ solde du compte locataire (lot grand livre)
   Dérogation du dirigeant (26/09/2026, design/ARCHITECTURE_GESTION.md § 3), revue le 15/10/2026 (thème Super Panda,
   brief « Signaux », montant coloré sur fond gris) : seul le CHIFFRE du solde se colore, avec les jetons de signal de
   tokens.css ; le libellé reste gris. Positif = en avance (vert, à rembourser ou imputer ; ambre jusqu'au 03/11/2026,
   confondu avec le rouge, demande du dirigeant), nul = à jour (vert, avec sa coche), négatif = doit (rouge). Ces jetons ne servent qu'aux classes .solde-locataire*
   (ecrans/compte_locataire.css). Contraste ≥ 6,3:1 sur blanc et sur --soft. */
:root { --solde-positif: var(--sig-ok); --solde-nul: var(--sig-ok); --solde-negatif: var(--sig-due); }

/* Tri des tableaux au téléphone : les en-têtes sont masqués, la liste « Trier » les remplace (tri-local.js). */
@media (max-width: 767px) {
  .tri-telephone { display: flex; align-items: center; justify-content: flex-end; gap: 8px; font-size: 13px; color: var(--muted); }
  .tri-telephone .saisie { width: auto; max-width: 75%; }
}

/* ------------------------------------------------------------------ mode étroit des grilles (panneau ouvert)
   Revue UX 27/10/2026, contrat C4. Au bureau (≥ 1280 px) le panneau de 440 px ouvert rétrécit la page (voir
   .principal) : la zone d'un tableau tombe sous 600 px. Deux niveaux, sans rien écrire dans les gabarits au-delà des
   classes ci-dessous :
   1. Automatique, pour TOUT .tableau : les cellules peuvent rétrécir (min-width: 0, sinon une colonne « 1fr » garde sa
      largeur de contenu et pousse la grille hors de la page) et la sous-ligne d'une cellule passe sur 2 lignes au lieu
      d'une troncature (même rendu qu'au téléphone).
   2. Sur demande, pour une grille qui change de colonnes : la classe .grille-adaptative sur l'en-tête ET sur chaque
      ligne, avec deux variables CSS déclarées par la feuille de l'écran :
         .grille-x { --colonnes: 96px 1fr 1fr 120px 100px; --colonnes-etroit: 1fr 1fr 100px; }
      et la classe .col-secondaire sur les cellules (et leur en-tête) retirées en mode étroit : --colonnes-etroit ne
      décrit QUE les colonnes restantes. Sans --colonnes-etroit la grille garde ses colonnes (--colonnes-etroit vaut
      alors --colonnes, voir la règle :where(.grille-adaptative) ci-dessous). --colonnes est obligatoire avec la
      classe. Plus de règle « body:has(#panneau:not(:empty)) .grille-x » à écrire écran par écran. */
:where(.tableau-tete, .ligne).grille-adaptative { --colonnes: none; --colonnes-etroit: var(--colonnes); }
@media (min-width: 768px) {                                  /* au téléphone, les cartes gardent les règles de leur écran */
  :where(.tableau-tete, .ligne).grille-adaptative { grid-template-columns: var(--colonnes); }
}
@media (min-width: 1280px) {
  body:has(#panneau:not(:empty)) :where(.tableau-tete, .ligne).grille-adaptative { grid-template-columns: var(--colonnes-etroit); gap: 10px; }
  body:has(#panneau:not(:empty)) :where(.tableau-tete, .ligne).grille-adaptative > .col-secondaire { display: none; }
  body:has(#panneau:not(:empty)) .principal .tableau :is(.tableau-tete, .ligne) > * { min-width: 0; }
  body:has(#panneau:not(:empty)) .principal .tableau .sous-ligne {
    white-space: normal; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical;
  }
}

/* Page de suivi d'un envoi de relances (recouvrement/_envoi_suivi.html, 25/10/2026) : la roue tourne tant que
   l'envoi n'est pas fini, chaque locataire a ses pas franchis sous son nom. */
.envoi-suivi { display: flex; flex-direction: column; gap: 14px; }
.envoi-suivi .bandeau { align-items: center; }
.envoi-roue {
  width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--ink);
  animation: tourner 0.9s linear infinite; flex-shrink: 0;
}
.envoi-resultat-texte { margin: 0; font-weight: 500; }
.lignes-lot .l.envoi-ligne { align-items: start; grid-template-columns: minmax(0, 1fr) auto; }
.envoi-qui { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.envoi-pastille { padding-top: 2px; }
.envoi-pas { list-style: none; margin: 6px 0 0; padding: 0 0 0 10px; border-left: 2px solid var(--line); display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--text-2); }
.envoi-pas li { display: flex; gap: 8px; align-items: baseline; }
.envoi-pas .mono { flex-shrink: 0; }
.envoi-pas--probleme { color: var(--danger); font-weight: 500; }
.envoi-pas--envoyee { color: var(--ink); font-weight: 500; }
.envoi-pas--general { margin: 0; }
.envoi-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ------------------------------------------------------------------ bulle des conversations
   31/10/2026, messagerie multicanal (base.html, bulle.js, messagerie/vues_bulle.py) : un bouton rond noir en bas à
   droite de chaque page de /app/ pour qui peut voir la Boîte, avec le nombre de conversations à traiter et, au clic,
   les huit plus récentes. Monochrome comme le reste du thème (aucun jeton --cta-* : ce n'est pas un bouton d'action),
   jetons de tokens.css seulement. Étage 28 : au-dessus des barres du téléphone (25 et 26), sous le panneau et les
   fenêtres (30 et plus) et sous le toast (60). La racine reste cachée (attribut hidden) tant que bulle.js n'a pas reçu
   de réponse : jamais un bouton qui n'ouvre rien.
   05/11/2026, comme la liste de Guarana (demande de Baptiste) : chaque ligne porte la pastille du canal de son dernier
   message, seule couleur de la bulle (identité du canal, jetons --ch-*, jamais un degré de gravité), et son nombre de
   messages à traiter. Un clic ouvre la conversation dans le panneau, devenu boîte de discussion (bulle-conv--chat) :
   ici son en-tête ; la discussion garde les styles de l'écran Conversations, resserrés dans la section
   « conversations : dans la bulle » de messagerie.css. */
.bulle-conv {
  position: fixed; z-index: 28; width: 56px; height: 56px;
  right: calc(24px + env(safe-area-inset-right)); bottom: calc(24px + env(safe-area-inset-bottom));
}
.bulle-conv-bouton {
  position: relative; display: grid; place-items: center; width: 56px; height: 56px; padding: 0;
  border: 1px solid var(--ink); border-radius: 50%; background: var(--ink); color: var(--on-accent);
  box-shadow: var(--shadow-md);
}
.bulle-conv-bouton:hover { background: var(--text-2); border-color: var(--text-2); }
.bulle-conv-bouton[aria-expanded="true"] { background: var(--paper); border-color: var(--ink); color: var(--ink); }
.bulle-conv-bouton[aria-expanded="true"]:hover { background: var(--nav-hover); }
.bulle-conv-bouton:focus-visible { border-radius: 50%; }          /* la règle globale du focus pose un rayon de 4 px */
/* Le badge : le nombre, en pastille blanche à contour noir sur l'angle du bouton. Il ne capte pas le clic. À zéro il se
   cache sans quitter l'arbre : la zone vivante annonce encore « Aucune conversation à traiter ». */
.bulle-conv-nombre {
  position: absolute; top: -6px; right: -6px; display: flex; align-items: center; justify-content: center;
  min-width: 24px; height: 24px; padding: 0 6px; border: 2px solid var(--ink); border-radius: var(--rayon-rond);
  background: var(--paper); color: var(--ink); font: 700 12px/1 var(--font-display);
  font-variant-numeric: tabular-nums; pointer-events: none;
}
.bulle-conv-nombre--aucun { opacity: 0; }
/* Un message plus récent que le dernier vu : un anneau autour du badge, qui pulse trois fois (attente-pulsation) puis
   reste fixe jusqu'à l'ouverture du panneau. Mouvement réduit : l'anneau seul, sans pulsation. */
.bulle-conv--nouveau .bulle-conv-nombre::after {
  content: ""; position: absolute; inset: -6px; border: 2px solid var(--ink); border-radius: var(--rayon-rond);
}
@media (prefers-reduced-motion: no-preference) {
  .bulle-conv--nouveau .bulle-conv-nombre::after { animation: attente-pulsation 1.6s ease-in-out 3; }
}
/* Le panneau : une fenêtre (contour noir, ombre large) posée au-dessus du bouton, alignée sur son bord droit. */
.bulle-conv-panneau {
  position: absolute; right: 0; bottom: calc(100% + 12px); display: flex; flex-direction: column;
  width: min(380px, calc(100vw - 32px)); max-height: max(240px, min(560px, calc(100dvh - 180px)));
  overflow: hidden; background: var(--paper); color: var(--text); border: 1px solid var(--ink);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); animation: monter var(--duree) ease-out;
}
.bulle-conv-panneau:focus-visible { border-radius: var(--radius-lg); }
.bulle-conv-tete {
  display: flex; flex: none; align-items: center; justify-content: space-between; gap: 8px;
  padding: 6px 6px 6px 16px; border-bottom: 1px solid var(--line);
}
.bulle-conv-titre { font: 700 15px/1.3 var(--font-display); letter-spacing: -0.2px; color: var(--ink); }
.bulle-conv-fermer, .bulle-conv-retour, .bulle-conv-page, .bulle-conv-quitter {
  display: inline-flex; flex: none; align-items: center; justify-content: center; width: 44px; height: 44px;
  padding: 0; border: 1px solid transparent; border-radius: var(--radius-sm); background: transparent;
  color: var(--muted);
}
.bulle-conv-fermer:hover, .bulle-conv-retour:hover, .bulle-conv-page:hover, .bulle-conv-quitter:hover {
  background: var(--nav-hover); color: var(--ink);
}
.bulle-conv-liste {
  flex: 1 1 auto; min-height: 0; margin: 0; padding: 0; list-style: none; overflow-y: auto;
  overscroll-behavior: contain;
}
.bulle-conv-ligne + .bulle-conv-ligne { border-top: 1px solid var(--line-soft); }
/* Une ligne : la pastille du canal, le nom, « • logement » et l'heure ; dessous, l'extrait et le nombre à traiter. */
.bulle-conv-lien {
  display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: center; gap: 12px; min-height: 56px;
  padding: 10px 16px; color: var(--text); text-decoration: none;
}
.bulle-conv-lien:hover { background: var(--row-hover); }
/* Le contour de focus de la règle globale se dessine à l'intérieur de la ligne : le panneau coupe ce qui dépasse. */
.bulle-conv-lien:focus-visible, .bulle-conv-tout:focus-visible { outline-offset: -3px; }
.bulle-conv-corps { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.bulle-conv-haut { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.bulle-conv-libelle {
  flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink);
  font: 700 14px/1.3 var(--font-display);
}
.bulle-conv-sous {
  flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted);
  font-size: 12px;
}
.bulle-conv-sous::before { content: "\2022"; content: "\2022" / ""; margin-right: 6px; }
.bulle-conv-quand {
  flex: none; margin-left: auto; color: var(--muted); font-size: 12px; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.bulle-conv-bas { display: flex; align-items: center; gap: 8px; min-width: 0; }
.bulle-conv-extrait {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2);
  font-size: 13px;
}
/* La pastille noire du nombre de messages à traiter (le texte caché de la ligne le dit déjà : aria-hidden). */
.bulle-conv-compte {
  flex: none; min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--rayon-rond); background: var(--ink);
  color: var(--on-accent); font: 700 11px/20px var(--font-display); text-align: center;
  font-variant-numeric: tabular-nums;
}
/* La pastille du canal, clonée par bulle.js du modèle <template class="bulle-conv-icones"> de base.html : couleur
   d'identité du canal, glyphe blanc. */
.bulle-conv-icones { display: none; }
.bulle-conv-picto {
  display: grid; flex: none; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--ch-other-bg); color: var(--ch-on);
}
.bulle-conv-picto--email { background: var(--ch-email-bg); }
.bulle-conv-picto--whatsapp { background: var(--ch-whatsapp-bg); }
.bulle-conv-picto--leboncoin, .bulle-conv-picto--journal { background: var(--ch-other-bg); }
.bulle-conv-vide, .bulle-conv-attente { padding: 28px 16px; color: var(--muted); font-size: 13px; text-align: center; }
.bulle-conv-tout {
  display: flex; flex: none; align-items: center; justify-content: center; min-height: 48px; padding: 0 16px;
  border-top: 1px solid var(--line); color: var(--ink); font: 650 13px/1.2 var(--font-display);
  text-decoration: underline; text-underline-offset: 3px;
}
.bulle-conv-tout:hover { background: var(--row-hover); }
/* La conversation ouverte dans le panneau (bulle-conv--chat), comme la boîte de discussion de Guarana : 640 px de
   haut au plus, la liste, son titre et son pied s'effacent. En tête : « ← », la pastille du canal, le nom et la
   situation, « pleine page » et la croix ; dessous, le solde et « Marquer comme traité ». */
.bulle-conv--chat .bulle-conv-panneau { height: 640px; }
.bulle-conv--chat .bulle-conv-tete, .bulle-conv--chat .bulle-conv-liste, .bulle-conv--chat .bulle-conv-vide,
.bulle-conv--chat .bulle-conv-tout { display: none; }
.bulle-conv-chat, .bulle-conv-conversation { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; }
.bulle-conv-chat-tete {
  display: grid; flex: none; grid-template-columns: 44px 40px minmax(0, 1fr) 44px 44px; align-items: center;
  gap: 6px; padding: 6px; border-bottom: 1px solid var(--line);
}
.bulle-conv-chat-tete .bulle-conv-picto { width: 40px; height: 40px; }
.bulle-conv-qui { min-width: 0; }
.bulle-conv-nom, .bulle-conv-situation { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bulle-conv-nom { color: var(--ink); font: 700 15px/1.3 var(--font-display); letter-spacing: -0.2px; }
.bulle-conv-situation { color: var(--muted); font-size: 12px; }
.bulle-conv-chat-barre {
  display: flex; flex: none; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-height: 44px; padding: 2px 12px;
  border-bottom: 1px solid var(--line-soft);
}
.bulle-conv-solde { display: inline-flex; align-items: center; min-height: 40px; text-decoration: none; }
.bulle-conv-chat-barre > .conv-traiter { margin-left: auto; }
/* Là où elle gênerait : la barre « Annuler / Enregistrer » collée en bas d'une fiche (donnees.css) passe sous la bulle,
   qui monte ; le panneau du dossier en pleine largeur et les fenêtres ouvertes la remplacent à l'écran ; à l'impression
   elle n'a rien à faire. Une fenêtre ouverte DEPUIS la bulle (le tiroir « Fixer la visite » de la carte « Action
   suggérée », chargé dans la conversation) est un descendant de la bulle : display: none l'effacerait avec elle, et la
   page resterait bloquée derrière une fenêtre qu'on ne voit pas. La bulle devient alors invisible sans quitter la page
   (visibility), sa fenêtre reste visible, et la conversation revient telle quelle à la fermeture. */
body:has(.fiche-formulaire > .fiche-pied) .bulle-conv { bottom: calc(72px + env(safe-area-inset-bottom)); }
body:has(#panneau > [data-panneau-large]) .bulle-conv,
body:has(dialog[open]) .bulle-conv:not(:has(dialog[open])) { display: none; }
.bulle-conv:has(dialog[open]) { visibility: hidden; }
.bulle-conv dialog[open] { visibility: visible; }
@media (min-width: 768px) {
  /* Le panneau de détail (440 px, collé au bord droit) ne recouvre pas la bulle : elle se pose à sa gauche. */
  body:has(#panneau:not(:empty)) .bulle-conv {
    right: calc(var(--largeur-panneau) + 24px + env(safe-area-inset-right));
  }
  body:has(#panneau:not(:empty)) .bulle-conv-panneau { width: min(380px, calc(100vw - var(--largeur-panneau) - 40px)); }
  /* La boîte de discussion prend toute la hauteur utile, jusqu'à ses 640 px. */
  .bulle-conv--chat .bulle-conv-panneau { max-height: max(320px, calc(100dvh - 180px)); }
  /* La fin de la page reste lisible : la bulle ne recouvre pas la dernière ligne. */
  body:has(.bulle-conv:not([hidden])) .principal { padding-bottom: 104px; }
}
/* Téléphone : au-dessus de la barre d'onglets (64 px), plus haut encore au-dessus de la barre d'action et de la barre
   d'une fiche (mêmes hauteurs que le toast) ; le tiroir du bas la remplace à l'écran. */
@media (max-width: 767px) {
  .bulle-conv { right: calc(16px + env(safe-area-inset-right)); bottom: calc(80px + env(safe-area-inset-bottom)); }
  body:has(.action-mobile) .bulle-conv, body:has(.fiche-formulaire > .fiche-pied) .bulle-conv {
    bottom: calc(146px + env(safe-area-inset-bottom));
  }
  .bulle-conv-panneau { max-height: max(200px, calc(100dvh - 240px)); }
  body:has(.action-mobile) .bulle-conv-panneau, body:has(.fiche-formulaire > .fiche-pied) .bulle-conv-panneau {
    max-height: max(200px, calc(100dvh - 300px));
  }
  body:has(#panneau:not(:empty)) .bulle-conv { display: none; }
  body:has(.bulle-conv:not([hidden])):has(.action-mobile, .fiche-formulaire > .fiche-pied) .principal {
    padding-bottom: 224px;
  }
}
@media print {
  .bulle-conv { display: none; }
}

/* ================================================================== dépôt de photos
   Gabarit espace/_depot_photos.html, script espace/depot-photos.js : la même zone partout où l'on ajoute des photos.
   Le champ fichier transparent couvre la zone (clic et dépôt sans script) ; le focus clavier se voit sur la zone. */
.depot-photos { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.depot-photos-libelle { margin: 0; }
.depot-photos-zone {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 132px; padding: 20px 16px; text-align: center; font-size: 13px; color: var(--muted);
  background: var(--surface); border: 1.5px dashed var(--bordure-forte); border-radius: var(--rayon-m);
  transition: background-color .15s ease, border-color .15s ease;
}
.depot-photos-saisie { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; font-size: 0; }
.depot-photos-consigne strong { color: var(--ink); font-weight: 600; }
.depot-photos-lien { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.depot-photos-icone {
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--surface-2); color: var(--ink);
}
.depot-photos-etat:empty { display: none; }
.depot-photos-etat { font-size: 12px; color: var(--ink); font-weight: 500; }
.depot-photos-zone:hover, .depot-photos--survol .depot-photos-zone { border-color: var(--ink); background: var(--surface-2); }
.depot-photos--survol .depot-photos-zone { border-style: solid; }
.depot-photos--survol .depot-photos-icone { background: var(--accent); color: var(--on-accent); }
.depot-photos-zone:has(.depot-photos-saisie:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.depot-photos--erreur .depot-photos-zone { border-color: var(--danger); }
.depot-photos-erreur { margin: 0; font-size: 12px; font-weight: 600; color: var(--danger); }
.depot-photos--envoi .depot-photos-zone { cursor: progress; }
.depot-photos--envoi .depot-photos-saisie { pointer-events: none; }
.depot-photos--plein .depot-photos-zone { background: var(--surface-2); }
.depot-photos--plein .depot-photos-saisie { cursor: not-allowed; }
.depot-photos--plein .depot-photos-zone:hover { border-color: var(--bordure-forte); }
.depot-photos-apercus { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.depot-photos-apercus[hidden] { display: none; }
.depot-photos-apercu { display: flex; flex-direction: column; gap: 4px; min-width: 0; font-size: 11px; }
.depot-photos-apercu-vue {
  display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius-sm); background: var(--surface-2);
  border: 1px solid var(--bordure);
}
.depot-photos-apercu-vue img { display: block; width: 100%; height: 100%; object-fit: cover; }
.depot-photos--envoi .depot-photos-apercu-vue img { filter: grayscale(1); }   /* pas d'opacité intermédiaire (test_theme) */
.depot-photos-apercu-nom { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--muted); }
.depot-photos-retirer {
  align-self: flex-start; padding: 0; border: 0; background: none; font: inherit; font-weight: 600; color: var(--ink);
  text-decoration: underline; cursor: pointer;
}
/* Écran tactile : rien à glisser, la consigne devient « Choisir des photos » (le sélecteur propose aussi l'appareil). */
.depot-photos-tactile { display: none; }
@media (hover: none) and (pointer: coarse) {
  .depot-photos-souris { display: none; }
  .depot-photos-tactile { display: inline; }
}
.depot-photos-envoyer { display: flex; justify-content: flex-end; }
.depot-photos-js [data-depot-auto] .depot-photos-envoyer { display: none; }
@media (max-width: 767px) {
  .depot-photos-zone { min-height: 112px; }
  .depot-photos-retirer { min-height: 44px; }
  .depot-photos-envoyer .btn { width: 100%; }
}

/* Bulle d'information d'un interrupteur d'autopilote (espace/_bulle_pilote.html, 11/11/2026 : Recouvrement, Révision
   des loyers, Diffusion, Paramètres) : au survol ou au focus clavier, ce qu'implique l'autopilote, activé et coupé ; la
   position du moment est soulignée. Alignée à droite de l'interrupteur, sous la barre collante (20), sous le tiroir
   (30). Pas d'interaction dans la bulle : rien ne la retient. Au téléphone : posée en haut de l'écran, pleine largeur, au-dessus des barres du bas (action, onglets). */
.pilote { position: relative; display: inline-flex; }
/* Autopilote activé : le bouton passe au VERT (demande du dirigeant du 11/11/2026, « quand il est activé, le bouton
   doit être vert », sur toutes les pages : Recouvrement, Révision des loyers, Diffusion). Fond --sig-ok-bg, contour et
   piste --sig-ok-edge (4,6:1 sur ce fond, curseur blanc 5:1), texte noir inchangé ; en lecture (sans le droit de le
   basculer), le pointillé reste et le survol ne change rien. Seuls les interrupteurs d'autopilote (dans .pilote) :
   l'interrupteur d'un bail (révision du loyer de la fiche) garde sa piste noire. */
.pilote .interrupteur[aria-checked="true"], .pilote .interrupteur[aria-checked="true"]:hover {
  background: var(--sig-ok-bg); border-color: var(--sig-ok-edge);
}
.pilote .interrupteur[aria-checked="true"]:not(.interrupteur--lecture):hover { border-color: var(--sig-ok); }
.pilote .interrupteur[aria-checked="true"] .interrupteur-piste { background: var(--sig-ok-edge); }
.pilote-bulle {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 25; width: min(340px, calc(100vw - 32px));
  display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; text-align: left; white-space: normal;
  font-size: 13px; line-height: 1.45; color: var(--encre-2); background: var(--surface);
  border: 1px solid var(--bordure-forte); border-radius: 8px; box-shadow: var(--ombre-flottant);
  visibility: hidden; opacity: 0; transition: opacity .12s ease-out, visibility 0s linear .12s; pointer-events: none;
}
.pilote:hover .pilote-bulle, .pilote:focus-within .pilote-bulle {
  visibility: visible; opacity: 1; transition-delay: .15s, .15s;
}
.pilote-bulle strong { color: var(--encre); font-weight: 600; }
.pilote-bulle-tete { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pilote-bulle-etat {
  font-size: 12px; padding: 1px 8px; border-radius: 999px; color: var(--neutre); background: var(--neutre-fond);
}
.pilote-bulle-etat--actif { color: var(--sig-ok); background: var(--sig-ok-bg); }   /* vert, comme l'interrupteur */
.pilote-bulle-ligne { display: block; padding-left: 8px; border-left: 2px solid transparent; }
.pilote-bulle-ligne--courante { border-left-color: var(--encre); }
/* Bulle courte (une ligne de texte, ex. le bouton « Démarrer les relances » des Assurances) : largeur au contenu. */
.pilote-bulle--courte { width: max-content; max-width: min(460px, calc(100vw - 32px)); }
.pilote-bulle-pied { display: block; padding-top: 6px; border-top: 1px solid var(--bordure-douce); font-size: 12px; color: var(--discret); }
@media (prefers-reduced-motion: reduce) { .pilote-bulle { transition: none; } }
@media (max-width: 767px) {
  .pilote-bulle {
    position: fixed; top: 12px; left: 16px; right: 16px; width: auto; z-index: 40;
    max-height: calc(100dvh - 24px); overflow-y: auto;
  }
}
