/* RankFlux — thème et composants du socle UI (lot 0, refonte V2-04 DS1).
 * Palette : charte obtp.fr (jetons de :root ci-dessous, seule source des couleurs). Contrastes WCAG 2.2 AA mesures
 * (SP/v2/ds1/ACCESSIBILITE.md). Les classes des vues existantes (.card, .btn, .form-control, .badge-grey, .main-header,
 * .liste-filtres, .pagination, .ligne-row, .choix-liste, .empty-state...) sont conservees ; aucun selecteur retire.
 * Le bloc :root reste EN TETE du fichier, termine par une ligne « } » seule : src/views/public.js, pages-publiques.js,
 * pdf-tools.js et routes/public.js l'extraient par expression reguliere (/:root\s*\{[\s\S]*?\n\}/), ainsi que les
 * @font-face (/@font-face\s*\{[^}]*\}/g). Contrat des jetons : SP/v2/contrats/JETONS.md.
 */

:root {
  /* ---- Jetons de base : charte obtp.fr (scratchpad/obat-ref/CHARTE-OBTP.md, releve du 20/10/2026), contrastes
     WCAG AA calcules sur --fond et --surface. Toute couleur de l'interface derive de ces jetons : aucune couleur en
     dur ailleurs. Les documents (PDF) gardent les couleurs choisies par chaque entreprise dans ses Parametres. ---- */
  --primaire: #0064fd;
  --primaire-fonce: #0047b3;
  --primaire-clair: #e6f0ff;
  --accent: #00b589;
  --fond: #f4f5f7;
  --surface: #ffffff;
  --texte: #0a0b0d;
  --texte-secondaire: #69707f;
  --bordure: #ebebec;
  --succes: #008231;
  --alerte: #9c6500;
  --erreur: #dd1645;
  --info: #156ae7;
  /* ---- Complements de la charte ---- */
  --sur-primaire: #ffffff;
  --sur-accent: #06281f;
  --bordure-champ: #7c8392; /* DS1 : 3,68:1 sur blanc, 3,40:1 sur --fond (contour de composant >= 3:1) */
  --police: "Onest", "Helvetica Neue", system-ui, -apple-system, sans-serif;
  /* ---- Jetons derives (fonds teintes a 10 % et textes fonces, tous >= 4,5:1 ; surfaces sombres du site) ---- */
  --texte-sur-primaire: var(--sur-primaire);
  --texte-sur-accent: var(--sur-accent);
  --texte-tertiaire: #5f6675;
  --bordure-forte: var(--bordure-champ);
  --primaire-fond: var(--primaire-clair);
  --primaire-texte: var(--primaire-fonce);
  --accent-fonce: #008f6c;
  --accent-fond: #ccf0e7;
  --succes-fond: #e6f2ea;
  --succes-texte: #00632a;
  --alerte-fond: #fbecd7;
  --alerte-texte: #7a4f00;
  --erreur-fond: #fce8ec;
  --erreur-texte: #b0113a;
  --info-fond: #e6f0ff;
  --info-texte: #0047b3;
  --violet-fond: #f0eafb;
  --violet-texte: #5b21b6;
  --neutre-fond: #edeef0;
  --neutre-texte: #3f4654;
  --neutre-contour: #7c8392;
  --surface-survol: #f7f8fa;
  --surface-accent: #f0f5ff;
  --surface-notification: #eef4ff;
  --sombre: #0d1117;
  --sombre-2: #161b22;
  --sombre-bordure: #30363d;
  --sombre-texte: #f0f6fc;
  --sombre-texte-2: #c9d1d9;
  --sombre-texte-3: #8b949e;
  --sombre-primaire: #2f80ff; /* bleu des boutons sur fond sombre : jamais sous un texte blanc (3,7:1) */
  --encre-bleu: #70a9ff; /* DS1 : texte et icones bleus sur --sombre (7,6:1), anneau de focus sur sombre */
  --menu-texte: var(--sombre-texte-2);
  --menu-texte-2: var(--sombre-texte-3);
  --menu-texte-3: var(--sombre-texte-3);
  --menu-texte-4: var(--sombre-texte-3); /* DS1 : 5,9:1 (etait 40 % d'opacite, 3,6:1) */
  --menu-survol: rgba(240, 246, 252, .06);
  --menu-actif: rgba(47, 128, 255, .16);
  --menu-filet: var(--sombre-bordure);
  --menu-sous-fond: rgba(0, 0, 0, .25);
  --voile: rgba(10, 11, 13, .55);
  --voile-leger: rgba(10, 11, 13, .45);
  --avatar-1: #0e7490; --avatar-2: #6d28d9; --avatar-3: #9c6500; --avatar-4: #008231; --avatar-5: #be123c;
  --ombre-carte: 0 1px 2px rgba(10, 11, 13, .04), 0 8px 24px rgba(10, 11, 13, .06);
  --ombre-menu: 0 2px 6px rgba(10, 11, 13, .06), 0 18px 50px rgba(10, 11, 13, .12);
  --ombre-panneau: 0 2px 6px rgba(10, 11, 13, .08), 0 18px 50px rgba(10, 11, 13, .18);
  --ombre-defilement: rgba(10, 11, 13, .14);
  /* ---- Focus (DS1) : anneau opaque a 2 px de l'element (outline) ; --focus garde sa forme box-shadow pour les
     feuilles des modules (anneau double : 2 px de surface puis 3 px de primaire, >= 3:1 sur --fond et --surface) ---- */
  --focus-anneau: var(--primaire);
  --focus-anneau-sombre: var(--encre-bleu);
  --focus: 0 0 0 2px var(--surface), 0 0 0 5px var(--focus-anneau);
  /* ---- Motif « plan » des surfaces sombres (pages de compte) : grille bleue tres legere, cote ---- */
  --plan-grille: rgba(112, 169, 255, .08);
  --plan-grille-forte: rgba(112, 169, 255, .18);
  --plan-trait: var(--encre-bleu);
  /* ---- Typographie (DS1) : Onest seule ; 16 px de base, 14 px minimum pour tout texte lu, 12 px seulement pour les
     badges en capitales ; titres en 800 resserres ; chiffres tabulaires pour les montants ---- */
  --t-xs: 12px; --t-sm: 14px; --t-nav: 15px; --t-md: 16px; --t-lg: 18px; --t-xl: 22px; --t-2xl: 28px; --t-3xl: 36px;
  --poids-titre: 800; --suivi-titre: -0.02em; --interligne: 1.5;
  /* ---- Mesures (site : rayons 12 / 18 / 26 px, boutons en pilule) ---- */
  --rayon: 18px;
  --rayon-sm: 12px;
  --rayon-lg: 26px;
  --rayon-xs: 8px;
  --rayon-bouton: 999px;
  --rayon-champ: 12px;
  --e1: 4px; --e2: 8px; --e3: 12px; --e4: 16px; --e5: 20px; --e6: 24px; --e8: 32px; --e10: 40px; --e12: 48px;
  --sidebar-w: 220px;
  --barre-h: 56px;
  --onglets-h: 56px;
  /* ---- Cibles (DS1) : >= 24 px partout, >= 44 px sur telephone (html de la requete @media 768 px) ---- */
  --cible: 44px; --btn-h: 40px; --btn-h-sm: 32px; --champ-h: 44px; --case: 24px;
  /* ---- Anciens noms (vues existantes et plan) ---- */
  --bleu-nuit-900: var(--sombre);
  --bleu-nuit-700: var(--primaire-fonce);
  --bleu-nuit-500: var(--primaire);
  --bleu-nuit-100: var(--primaire-clair);
  --vert: var(--succes);
  --vert-fond: var(--succes-fond);
  --lien: var(--info);
  --carte: var(--surface);
  --texte-2: var(--texte-secondaire);
  --texte-3: var(--texte-tertiaire);
  --danger: var(--erreur);
  --danger-fond: var(--erreur-fond);
  --avertissement: var(--alerte-texte);
  --avertissement-fond: var(--alerte-fond);
  --primary: var(--primaire-fonce);
  --primary-light: var(--primaire);
  --primary-dark: var(--sombre);
  --bg: var(--fond);
  --card: var(--surface);
  --text: var(--texte);
  --text-light: var(--texte-secondaire);
  --border: var(--bordure);
  --success: var(--succes);
  --warning: var(--alerte);
  --orange: var(--alerte);
  --bleu: var(--primaire);
  --bord: var(--bordure);
  --gris: var(--texte-secondaire);
  /* ---- Lot TIRAGE (24/10) : direction « Tirage » (plan d'architecte) du site public, des pages de connexion et
     d'inscription et des emails, validee par l'editeur le 24/10. Profondeur du bleu nuit vers le bleu de la marque ;
     textes poses dessus : blanc (>= 8,2:1 sur --primaire-fonce), --tirage-sur-bleu-2 (>= 6,1:1 sur --primaire-fonce,
     jamais sur --primaire : 3,7:1), --tirage-trait (traits du plan, 9,9:1 sur --tirage-nuit). Bouton vert : texte
     --sur-accent (7,2:1 sur --accent-vif, 6,0:1 sur --accent, 4,9:1 sur --accent-profond). Contrastes mesures au pixel
     sur les degrades : SP/v2/construction/RAPPORT-TIRAGE.md. Les pages de l'application connectee n'utilisent pas ces
     jetons. ---- */
  --tirage-abysse: #040f26;
  --tirage-nuit: #061633;
  --tirage-marine: #0b1d45;
  --tirage-cobalt: #0a2a6b;
  --tirage-trait: #9cc3ff;
  --tirage-sur-bleu-2: #cfe0ff;
  --accent-vif: #12c798;
  --accent-profond: #00a37b;
}
/* Variante sombre (valeurs .app-dark du site) : opt-in par <html data-theme="dark"> ; aucun basculement automatique. */
:root[data-theme="dark"] {
  --primaire: #2f80ff; --sur-primaire: #0a0b0d; --primaire-fonce: #0066ff; --primaire-clair: #07111e; --primaire-texte: #70a9ff;
  --accent: #20dda0; --fond: #0d1117; --surface: #161b22; --texte: #f0f6fc; --texte-secondaire: #8b949e; --texte-tertiaire: #8b949e;
  --bordure: #30363d; --bordure-champ: #8b949e; --succes: #34d8a6; --alerte: #f0b45e; --erreur: #f85149; --info: #70a9ff;
  --surface-survol: #1c2128; --neutre-fond: #21262d; --neutre-texte: #c9d1d9;
}
/* Telephone et tablette : cibles de 44 px, champs de 48 px. Second bloc :root du fichier : l'extraction par
   expression reguliere (sans drapeau g) ne prend que le premier, celui des jetons ci-dessus. */
@media (max-width: 768px) {
  :root { --btn-h: 44px; --btn-h-sm: 44px; --champ-h: 48px; --case: 24px; }
}
/* Ecran tactile plus large que 768 px (pliable ouvert 669 x 951 / 951 x 669, tablette, contrat MOB.md § 5) : memes
   mesures de cible que le telephone, sans changer la mise en page (menu lateral, barre du haut, tableaux restent ceux
   du bureau) ; les petits liens des pages de compte et du pied prennent aussi 44 px. */
@media (pointer: coarse) and (min-width: 769px) {
  :root { --btn-h: 44px; --btn-h-sm: 44px; --champ-h: 48px; --case: 24px; }
  .marque, .compte-liens a, .compte-liens span, .mdp-voir, .partenaire, .sidebar-pied a, .sidebar-nav .sous a, .vues .vue, details.plus > summary, .form-case label, .compte-panneau-pied .partenaire { min-height: var(--cible); }
  .marque { padding: 0 2px; }
  .pastille-lien { min-width: var(--cible); min-height: var(--cible); margin: -10px -8px; }
  .chip-x { width: 36px; height: 36px; }
  .chips-saisie { min-height: 36px; }
  .fiche-badge .menu-deroulant > summary { min-height: var(--cible); }
  table.liste td[data-fixe] > a { display: inline-flex; align-items: center; min-height: var(--cible); margin: -10px 0; }
  .tri-lien { min-height: 32px; }
}

/* Police Onest (SIL OFL 1.1, LICENSES.md), variable 100-900, servie par le Worker : graisses 400, 500, 600, 700, 800 */
@font-face { font-family: 'Onest'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/static/polices/Onest-latin.woff2) format('woff2-variations'), url(/static/polices/Onest-latin.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; }
@font-face { font-family: 'Onest'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/static/polices/Onest-latin-ext.woff2) format('woff2-variations'), url(/static/polices/Onest-latin-ext.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; }

/* ------------------------------------------------------------------ Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  font-family: var(--police);
  font-size: var(--t-md);
  line-height: var(--interligne);
  background: var(--fond);
  color: var(--texte);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--lien); }
a:not([class]) { text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:not([class]):hover { text-decoration-thickness: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { letter-spacing: var(--suivi-titre); line-height: 1.2; text-wrap: balance; }
strong, b { font-weight: 600; }
small { font-size: var(--t-sm); }
svg.ico { flex: none; vertical-align: -3px; }
/* Icones courtes (lot I12) : <svg class="ico ico-c i16" aria-hidden="true"><use href="/static/icones-….svg#nom"/></svg>.
   Trait et taille portes ici avec une specificite nulle (:where), comme les attributs de presentation de la forme
   complete : toute autre regle (feuille d'un module, .menu-item .ico...) garde la priorite. */
:where(svg.ico-c) { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; width: 16px; height: 16px; }
:where(svg.ico-c.i10) { width: 10px; height: 10px; } :where(svg.ico-c.i11) { width: 11px; height: 11px; }
:where(svg.ico-c.i12) { width: 12px; height: 12px; } :where(svg.ico-c.i13) { width: 13px; height: 13px; }
:where(svg.ico-c.i14) { width: 14px; height: 14px; } :where(svg.ico-c.i15) { width: 15px; height: 15px; }
:where(svg.ico-c.i18) { width: 18px; height: 18px; } :where(svg.ico-c.i20) { width: 20px; height: 20px; }
:where(svg.ico-c.i22) { width: 22px; height: 22px; } :where(svg.ico-c.i24) { width: 24px; height: 24px; }
:where(svg.ico-c.i28) { width: 28px; height: 28px; } :where(svg.ico-c.i32) { width: 32px; height: 32px; }
:where(svg.ico-c.i36) { width: 36px; height: 36px; } :where(svg.ico-c.i40) { width: 40px; height: 40px; }
:where(svg.ico-c.i44) { width: 44px; height: 44px; } :where(svg.ico-c.i48) { width: 48px; height: 48px; }
:where(svg.ico-c.i56) { width: 56px; height: 56px; }
/* Focus visible (WCAG 2.4.7 et 2.4.11) : anneau opaque de 3 px a 2 px de l'element, sur tout element focalisable, par
   outline (independant des ombres et des fonds des composants : aucune regle ne peut l'annuler sans le dire). Les
   surfaces sombres passent a l'anneau clair. La forme box-shadow var(--focus) reste disponible pour les modules. */
:focus-visible { outline: 3px solid var(--focus-anneau); outline-offset: 2px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline-offset: 0; border-color: var(--primaire); }
.sidebar :focus-visible, .page-compte .compte-panneau :focus-visible, .barre-selection :focus-visible, .toast :focus-visible { outline-color: var(--focus-anneau-sombre); }
@media (max-width: 768px) { .mode-app .barre-haut :focus-visible { outline-color: var(--focus-anneau-sombre); } }
.visuellement-cache { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* Lien d'evitement (WCAG 2.4.1) : premier element de la page, visible au focus */
.evitement { position: fixed; top: 8px; left: 8px; z-index: 300; padding: 12px 18px; min-height: var(--cible); display: inline-flex; align-items: center; background: var(--sombre); color: var(--sombre-texte); font-weight: 700; border-radius: var(--rayon-bouton); text-decoration: none; transform: translateY(-200%); opacity: 0; }
.evitement:focus, .evitement:focus-visible { transform: none; opacity: 1; outline-color: var(--focus-anneau); } /* anneau primaire : >= 3:1 sur la page claire comme sur la barre sombre */
.main:focus, .main:focus-visible { outline: none; } /* cible du lien d'evitement (tabindex -1) : focus programme seulement */
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* ------------------------------------------------------------------ Barre du haut */
.barre-haut {
  position: fixed; top: 0; left: var(--sidebar-w); right: 0; height: var(--barre-h); z-index: 110;
  display: flex; align-items: center; gap: var(--e3); padding: 0 var(--e5);
  background: var(--carte); border-bottom: 1px solid var(--bordure);
}
.barre-haut .burger { display: none; }
.marque { display: inline-flex; align-items: center; gap: var(--e2); text-decoration: none; color: var(--texte); font-weight: 700; letter-spacing: .3px; position: relative; border-radius: var(--rayon-xs); }
.marque-logo { display: block; height: 30px; width: auto; }
.partenaire { color: var(--texte-tertiaire); font-size: var(--t-sm); text-decoration: none; white-space: nowrap; display: inline-flex; align-items: center; min-height: 24px; }
.partenaire:hover { text-decoration: underline; }
.sidebar-pied .partenaire { color: var(--menu-texte-4); }
.sidebar-pied .partenaire:hover { color: var(--sombre-texte); }
.pied-app { margin-top: var(--e8); padding: var(--e4) 0; text-align: center; border-top: 1px solid var(--bordure); }
.marque-picto { display: block; width: 30px; height: 30px; border-radius: 8px; }
.marque-texte { font-weight: 700; }
.mode-app .barre-haut .marque { display: none; }
.sidebar-marque { display: flex; align-items: center; justify-content: center; min-height: var(--barre-h); padding: 10px 14px; border-bottom: 1px solid var(--menu-filet); }
.sidebar-marque .marque-logo { height: 32px; }
.barre-droite { margin-left: auto; display: flex; align-items: center; gap: var(--e2); }
.btn-rond {
  display: inline-flex; align-items: center; justify-content: center; width: var(--btn-h); height: var(--btn-h); border-radius: 999px;
  border: 1px solid transparent; background: var(--fond); color: var(--texte-2); text-decoration: none; position: relative; flex: none;
  transition: background .15s, color .15s;
}
.btn-rond:hover { background: var(--primaire-clair); color: var(--primaire-texte); }
.btn-rond.actif, .btn-rond[aria-current] { background: var(--primaire); color: var(--sur-primaire); }
.raccourcis { display: flex; gap: var(--e2); }
.recherche-globale {
  flex: 1 1 200px; max-width: 520px; min-width: 0; height: var(--btn-h); display: flex; align-items: center; gap: var(--e2); padding: 0 var(--e3);
  border: 1px solid var(--bordure); border-radius: var(--rayon-bouton); background: var(--fond); color: var(--texte-3); text-align: left; font-size: var(--t-nav);
  transition: border-color .15s, color .15s;
}
.recherche-globale:hover { border-color: var(--bordure-forte); color: var(--texte-2); }
.recherche-texte { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.raccourci-clavier { font-family: inherit; font-size: var(--t-xs); font-weight: 600; color: var(--texte-3); border: 1px solid var(--bordure-forte); border-radius: 6px; padding: 1px 6px; line-height: 1.4; }
.entreprise-courante span { max-width: 180px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* Menu « + Créer » */
.creer > summary { gap: var(--e1); padding-left: 10px; }
.creer .plus-ico { display: inline-flex; }
.creer .menu { min-width: 240px; }

/* Notifications */
.notifications .compteur { position: absolute; top: 0; right: 0; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--primaire); color: var(--sur-primaire); font-size: var(--t-xs); font-weight: 700; line-height: 20px; text-align: center; box-shadow: 0 0 0 2px var(--surface); }
.notifications-panneau { width: 400px; max-width: calc(100vw - 24px); padding: 0; }
.notifications-entete { display: flex; align-items: center; justify-content: space-between; gap: var(--e2); padding: var(--e3) var(--e4); border-bottom: 1px solid var(--bordure); }
.notifications-liste { list-style: none; max-height: 440px; overflow-y: auto; }
.notifications-liste li { border-bottom: 1px solid var(--bordure); }
.notifications-liste li:last-child { border-bottom: 0; }
.notifications-liste a { display: grid; grid-template-columns: 36px 1fr auto; gap: var(--e3); align-items: center; padding: var(--e3) var(--e4); text-decoration: none; color: var(--texte); min-height: var(--cible); }
.notifications-liste a:hover { background: var(--fond); }
.notifications-liste a:focus-visible { outline-offset: -3px; }
.notifications-liste .carre { width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; color: var(--texte-sur-primaire); }
.notifications-liste .carre-vert { background: var(--succes); }
.notifications-liste .carre-rouge { background: var(--erreur); }
.notifications-liste .carre-bleu { background: var(--primaire); }
.notifications-liste .carre-orange { background: var(--alerte); }
.notifications-liste .titre { font-weight: 600; }
.notifications-liste .sous { color: var(--texte-2); font-size: var(--t-sm); }
.notifications-liste .quand { color: var(--texte-3); font-size: var(--t-sm); white-space: nowrap; font-variant-numeric: tabular-nums; }
.notifications-liste li.nouvelle a { background: var(--surface-notification); }
.notifications-vide { padding: var(--e4); text-align: center; }
/* Lot NOTIFS (26/10) : message de l'editeur sans lien (bouton « marquer comme lu », meme presentation qu'une ligne a lien) et
   texte du message sur plusieurs lignes */
.notifications-liste .notification-bouton { display: grid; grid-template-columns: 36px 1fr auto; gap: var(--e3); align-items: center; width: 100%; padding: var(--e3) var(--e4); min-height: var(--cible); border: 0; background: var(--surface-notification); color: var(--texte); font: inherit; text-align: left; cursor: pointer; }
.notifications-liste .notification-bouton:hover { background: var(--fond); }
.notifications-liste .notification-bouton:focus-visible { outline-offset: -3px; }
.notifications-liste .sous-message { white-space: pre-line; overflow-wrap: anywhere; }
/* (fin du bloc Lot NOTIFS (26/10)) */

/* ------------------------------------------------------------------ Menu lateral */
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; width: var(--sidebar-w); z-index: 120;
  background: var(--sombre); color: var(--sombre-texte); display: flex; flex-direction: column;
  transition: transform .2s ease;
}
.compte { border-bottom: 1px solid var(--menu-filet); position: relative; }
.compte > summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 10px 14px; cursor: pointer; min-height: 60px; }
.compte > summary::-webkit-details-marker { display: none; }
.compte > summary:hover { background: var(--menu-survol); }
.compte > summary:focus-visible { outline-offset: -3px; }
.compte-textes { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.compte-nom { font-weight: 600; font-size: var(--t-nav); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.compte-entreprise { font-size: var(--t-sm); color: var(--menu-texte-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.compte .chevron { color: var(--menu-texte-3); transition: transform .15s; }
.compte[open] .chevron { transform: rotate(180deg); }
.compte .menu { position: absolute; left: 10px; right: 10px; top: calc(100% - 4px); color: var(--texte); z-index: 5; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 8px; }
.sidebar-nav a {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px 9px 12px; color: var(--menu-texte);
  text-decoration: none; font-size: var(--t-nav); font-weight: 500; border-radius: 10px; min-height: var(--btn-h); position: relative;
  transition: background .15s, color .15s;
}
.sidebar-nav a:hover { background: var(--menu-survol); color: var(--sombre-texte); }
.sidebar-nav a .ico { color: var(--menu-texte-3); transition: color .15s; }
.sidebar-nav a:hover .ico { color: var(--sombre-texte); }
/* Entree active : fond bleu nuit, texte blanc, icone bleu encre et point bleu a droite (motif du logo) */
.sidebar-nav a.actif, .sidebar-nav a[aria-current="page"] { background: var(--menu-actif); color: var(--sombre-texte); font-weight: 600; }
.sidebar-nav a.actif .ico, .sidebar-nav a[aria-current="page"] .ico { color: var(--encre-bleu); }
.sidebar-nav a[aria-current="page"]::after { content: ""; position: absolute; right: 12px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 999px; background: var(--encre-bleu); }
.sidebar-nav a:focus-visible, .sidebar-admin a:focus-visible, .sidebar-pied a:focus-visible { outline-offset: -3px; }
.sidebar-nav .groupe-entree { display: flex; align-items: stretch; gap: 2px; }
.sidebar-nav .groupe-entree a { flex: 1; min-width: 0; }
.sidebar-nav .groupe-entree a[aria-current="page"]::after { content: none; }
.sidebar-nav .deplier { width: var(--btn-h); border: 0; background: none; color: var(--menu-texte-3); display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; flex: none; }
.sidebar-nav .deplier:hover { color: var(--sombre-texte); background: var(--menu-survol); }
.sidebar-nav .deplier svg { transition: transform .15s; }
.sidebar-nav .groupe.ouvert .deplier svg { transform: rotate(180deg); }
.sidebar-nav .sous { padding: 2px 0 6px; }
.sidebar-nav .sous a { padding: 7px 10px 7px 40px; font-size: var(--t-sm); min-height: 36px; color: var(--menu-texte-2); font-weight: 500; }
.sidebar-nav .sous a::before { content: ""; position: absolute; left: 20px; top: 0; bottom: 0; width: 2px; background: var(--menu-filet); }
.sidebar-nav .sous a.actif { background: none; color: var(--sombre-texte); font-weight: 600; }
.sidebar-nav .sous a.actif::before { background: var(--encre-bleu); }
.sidebar-nav .sous a.actif::after { content: none; }
.sidebar-admin { border-top: 1px solid var(--menu-filet); padding: 6px 8px; }
.sidebar-admin a { display: flex; align-items: center; gap: 10px; padding: 9px 10px 9px 12px; min-height: var(--btn-h); color: var(--menu-texte); text-decoration: none; font-size: var(--t-nav); font-weight: 500; border-radius: 10px; }
.sidebar-admin a:hover { background: var(--menu-survol); color: var(--sombre-texte); }
.sidebar-admin a.actif { background: var(--menu-actif); color: var(--sombre-texte); font-weight: 600; }
.sidebar-admin a.actif .ico { color: var(--encre-bleu); }
.sidebar-pied { padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--menu-filet); font-size: var(--t-sm); display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.sidebar-pied a { color: var(--menu-texte-2); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; border-radius: 8px; padding: 0 4px; margin: 0 -4px; }
.sidebar-pied a:hover { color: var(--sombre-texte); }
.sidebar-pied .version { color: var(--menu-texte-4); font-size: var(--t-sm); letter-spacing: .5px; }
/* Lot AVIS-REPRISE-GROUPE (consigne 199, point 13) : pied du menu sur deux lignes, sans « · » isole en fin de ligne */
.sidebar-pied .pied-marque { display: flex; flex-direction: column; align-items: flex-start; }
.sidebar-pied .pied-sep { display: none; }
/* (fin du bloc Lot AVIS-REPRISE-GROUPE) */
.sidebar-overlay { position: fixed; inset: 0; background: var(--voile); z-index: 115; }
.sidebar-overlay[hidden] { display: none; }

/* ------------------------------------------------------------------ Zone principale */
.main { margin-left: var(--sidebar-w); padding: calc(var(--barre-h) + var(--e6)) var(--e6) var(--e8); min-height: 100vh; }
.main-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--e6); flex-wrap: wrap; gap: var(--e3); }
.main-header h1, .main-header h2 { font-size: var(--t-2xl); font-weight: var(--poids-titre); color: var(--texte); letter-spacing: var(--suivi-titre); line-height: 1.15; }
.main-titre { display: flex; align-items: center; gap: var(--e3); flex-wrap: wrap; }
.main-sous-titre { color: var(--texte-2); font-size: var(--t-md); margin-top: 2px; }
.onglets-mobile { display: none; }

/* Mode editeur (plein ecran, sans menu) et mode public */
.mode-editeur .barre-haut { left: 0; }
.mode-editeur .main { margin-left: 0; max-width: 1040px; margin-right: auto; margin-left: auto; padding-left: var(--e4); padding-right: var(--e4); }
.editeur-titre { font-size: var(--t-md); font-weight: 700; color: var(--texte); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; letter-spacing: 0; }
.editeur-onglets { margin: 0 var(--e2); border-bottom: 0; }
.editeur-actions { gap: var(--e2); }
.fermer-editeur { background: transparent; }
.mode-public .main { margin: 0; padding: var(--e6) var(--e4); max-width: 720px; margin: 0 auto; }

/* ------------------------------------------------------------------ Pages de compte (connexion, inscription, mot de passe)
   Scene en deux volets sur grand ecran : a gauche le panneau sombre (logo, accroche, « cote » du parcours devis ->
   signature -> facture -> encaissement, sur une grille de plan) ; a droite le formulaire sur fond clair. Sous 900 px,
   le panneau devient un bandeau en tete et le formulaire prend toute la largeur. Aucune image : grille et cote dessinees
   en CSS avec les jetons. */
body.page-compte { background: var(--fond); }
.page-compte .main { max-width: none; min-height: 100vh; margin: 0; padding: 0; display: block; }
.compte-scene { display: grid; grid-template-columns: minmax(360px, 5fr) minmax(0, 7fr); min-height: 100vh; }
.compte-panneau {
  position: relative; display: flex; flex-direction: column; gap: var(--e8); padding: var(--e8) var(--e10) var(--e8);
  background: var(--sombre); color: var(--sombre-texte); overflow: hidden; isolation: isolate;
}
.compte-panneau::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--plan-grille) 1px, transparent 1px), linear-gradient(90deg, var(--plan-grille) 1px, transparent 1px),
    linear-gradient(var(--plan-grille-forte) 1px, transparent 1px), linear-gradient(90deg, var(--plan-grille-forte) 1px, transparent 1px);
  background-size: 24px 24px, 24px 24px, 120px 120px, 120px 120px;
  background-position: -1px -1px;
  mask-image: radial-gradient(120% 90% at 100% 0%, rgba(0, 0, 0, .85), rgba(0, 0, 0, .25) 55%, transparent 85%);
  -webkit-mask-image: radial-gradient(120% 90% at 100% 0%, rgba(0, 0, 0, .85), rgba(0, 0, 0, .25) 55%, transparent 85%);
}
.compte-panneau .marque { align-self: flex-start; }
.compte-panneau .marque-logo { height: 34px; }
.compte-panneau-corps { margin-top: auto; display: flex; flex-direction: column; gap: var(--e6); max-width: 440px; }
.compte-accroche { font-size: var(--t-2xl); font-weight: var(--poids-titre); letter-spacing: var(--suivi-titre); line-height: 1.15; text-wrap: balance; }
.compte-accroche-2 { color: var(--sombre-texte-2); font-size: var(--t-md); max-width: 38ch; }
/* La cote : une ligne de mesure avec ses quatre reperes (devis, signature, facture, encaissement) */
.cote { list-style: none; display: flex; justify-content: space-between; gap: var(--e3); position: relative; padding-top: 18px; margin-top: var(--e2); }
.cote::before { content: ""; position: absolute; left: 0; right: 0; top: 7px; height: 2px; background: var(--plan-trait); opacity: .9; }
.cote li { position: relative; font-size: var(--t-sm); font-weight: 600; color: var(--sombre-texte-2); white-space: nowrap; }
.cote li::before { content: ""; position: absolute; left: 0; top: -18px; width: 2px; height: 16px; background: var(--plan-trait); }
.cote li:last-child::after { content: ""; position: absolute; right: 0; top: -18px; width: 2px; height: 16px; background: var(--plan-trait); }
.cote li:first-child::before { width: 10px; height: 10px; top: -15px; left: -4px; border-radius: 999px; }
.cote li:last-child::after { width: 10px; height: 10px; top: -15px; right: -4px; border-radius: 999px; background: var(--accent); }
.compte-panneau-pied { margin-top: auto; display: flex; flex-wrap: wrap; gap: var(--e2) var(--e4); align-items: center; font-size: var(--t-sm); color: var(--menu-texte-2); }
.compte-panneau-pied .partenaire { color: inherit; min-height: 36px; display: inline-flex; align-items: center; }
.compte-panneau-pied .partenaire:hover { color: var(--sombre-texte); }
.compte-volet { display: flex; align-items: center; justify-content: center; padding: var(--e10) var(--e6); }
.carte-compte { width: 100%; max-width: 460px; background: var(--surface); border: 1px solid var(--bordure); border-radius: var(--rayon-lg); padding: var(--e8) var(--e8) var(--e6); box-shadow: var(--ombre-carte); }
.carte-compte .marque-bandeau { display: none; }
.carte-compte .marque { justify-content: center; margin-bottom: var(--e4); }
.carte-compte .marque-texte { display: inline; font-size: 18px; }
.carte-compte h1 { font-size: var(--t-2xl); color: var(--texte); margin-bottom: var(--e2); font-weight: var(--poids-titre); letter-spacing: var(--suivi-titre); line-height: 1.15; }
.carte-compte .sous-titre { color: var(--texte-secondaire); margin-bottom: var(--e6); font-size: var(--t-md); }
.carte-compte form { margin-top: var(--e2); }
.carte-compte .form-group > label { font-size: var(--t-sm); }
.carte-compte .form-control { min-height: 48px; font-size: var(--t-md); }
.carte-compte .btn-primary { width: 100%; min-height: 48px; font-size: var(--t-md); margin-top: var(--e2); }
.carte-compte .form-renvoi .btn { width: 100%; min-height: 48px; }
.carte-compte .form-legende { margin: calc(-1 * var(--e2)) 0 var(--e4); }
.compte-liens { display: flex; justify-content: space-between; gap: var(--e2) var(--e3); flex-wrap: wrap; margin-top: var(--e4); font-size: var(--t-sm); color: var(--texte-2); align-items: center; }
.compte-liens a { color: var(--primaire-texte); font-weight: 600; display: inline-flex; align-items: center; min-height: 36px; text-underline-offset: 3px; }
.compte-liens span { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 0 6px; min-height: 36px; }
.form-group .compte-liens { margin-top: 0; }
.compte-pied { text-align: center; color: var(--texte-tertiaire); font-size: var(--t-sm); margin-top: var(--e5); }
.compte-pied .partenaire { color: inherit; }
.carte-compte .compte-etapes { margin: var(--e6) 0 0; padding: var(--e5); border-radius: var(--rayon); background: var(--fond); border-color: var(--bordure); box-shadow: none; }
.carte-compte .compte-etapes h2, .carte-compte .compte-etapes h3 { font-size: var(--t-md); font-weight: 700; margin-bottom: var(--e2); letter-spacing: -0.01em; }
.carte-compte .compte-etapes ol { padding-left: 22px; font-size: var(--t-sm); display: grid; gap: 4px; }
.carte-compte .compte-etapes .form-aide { margin-top: var(--e2); font-size: var(--t-sm); }
@media (max-width: 899px) {
  .compte-scene { grid-template-columns: 1fr; min-height: 0; }
  .compte-panneau { gap: var(--e5); padding: calc(var(--e4) + env(safe-area-inset-top)) var(--e5) var(--e5); }
  .compte-panneau .marque-logo { height: 30px; }
  .compte-panneau-corps { margin-top: 0; gap: var(--e3); }
  .compte-accroche { font-size: var(--t-xl); }
  .compte-accroche-2 { display: none; }
  .cote { margin-top: 0; gap: var(--e2); }
  .compte-panneau-pied { display: none; }
  .compte-volet { padding: var(--e5) var(--e4) calc(var(--e6) + env(safe-area-inset-bottom)); align-items: flex-start; }
  .carte-compte { padding: var(--e6) var(--e5); max-width: 520px; }
}
@media (max-width: 480px) { .carte-compte { padding: var(--e5) var(--e4); border-radius: var(--rayon); } }

/* ------------------------------------------------------------------ Cartes */
.card, .carte { background: var(--carte); border: 1px solid var(--bordure); border-radius: var(--rayon); padding: var(--e5); margin-bottom: var(--e5); box-shadow: var(--ombre-carte); }
.card-header, .carte-entete { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--e4); flex-wrap: wrap; gap: var(--e2); }
.card h3, .carte h3, .card-header h3 { font-size: var(--t-lg); font-weight: 700; color: var(--texte); letter-spacing: -0.01em; }
.carte-sous-titre { color: var(--texte-2); font-size: var(--t-sm); margin-top: 2px; }
.carte-actions { display: flex; gap: var(--e2); flex-wrap: wrap; }
.grille-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--e5); }
.grille-2 > * { min-width: 0; }
@media (max-width: 768px) { .grille-2 { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ Boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 16px; min-height: var(--btn-h);
  border: 1px solid transparent; border-radius: var(--rayon-bouton); font-size: var(--t-nav); font-weight: 700; line-height: 1.3;
  box-shadow: none; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, color .15s, transform .1s;
}
.btn:hover { filter: brightness(.96); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primaire); color: var(--sur-primaire); }
.btn-primary:hover { background: var(--primaire-fonce); filter: none; }
.btn-accent { background: var(--accent); color: var(--sur-accent); }
.btn-accent:hover { background: var(--accent-fonce); filter: none; }
.btn-success { background: var(--vert); color: var(--texte-sur-primaire); }
.btn-warning { background: var(--alerte); color: var(--texte-sur-primaire); }
.btn-danger { background: var(--danger); color: var(--texte-sur-primaire); }
.btn-outline { background: var(--carte); border-color: var(--bordure-forte); color: var(--texte); }
.btn-outline:hover { background: var(--fond); filter: none; }
.btn-outline.actif { background: var(--primaire-clair); border-color: var(--primaire); color: var(--primaire-texte); }
.btn-discret { background: transparent; color: var(--texte-2); }
.btn-discret:hover { background: var(--fond); color: var(--texte); filter: none; }
.btn-discret.actif { background: var(--primaire-clair); color: var(--primaire-texte); }
.btn-sm { padding: 4px 12px; font-size: var(--t-sm); min-height: var(--btn-h-sm); }
.btn-icone { padding-left: 8px; padding-right: 8px; min-width: var(--btn-h); }
.btn-sm.btn-icone { min-width: var(--btn-h-sm); }
.btn[aria-disabled=true], .btn:disabled { opacity: .45; pointer-events: none; }
.btn .chevron { margin-left: -2px; opacity: .7; }
.flex-gap { display: flex; gap: var(--e2); align-items: center; flex-wrap: wrap; }

/* ------------------------------------------------------------------ Tableaux */
.table-wrap { position: relative; overflow-x: auto; -webkit-overflow-scrolling: touch; } /* relative : un element en position absolue (texte cache) reste dans le conteneur, la page ne s elargit pas a 390 px */
/* Indice de defilement (DS1) : ombres aux bords d'un tableau plus large que sa carte, dessinees par le fond lui-meme
   (les voiles attaches au contenu couvrent l'ombre tant que le bord n'est pas atteint) ; rien quand tout tient */
.table-wrap {
  background: linear-gradient(90deg, var(--surface) 30%, transparent) 0 0, linear-gradient(90deg, transparent, var(--surface) 70%) 100% 0,
    radial-gradient(farthest-side at 0 50%, var(--ombre-defilement), transparent) 0 0, radial-gradient(farthest-side at 100% 50%, var(--ombre-defilement), transparent) 100% 0;
  background-repeat: no-repeat; background-size: 40px 100%, 40px 100%, 14px 100%, 14px 100%; background-attachment: local, local, scroll, scroll;
}
.table-wrap:focus-visible { outline-offset: -3px; }
table { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
th, td { padding: 9px 9px; text-align: left; border-bottom: 1px solid var(--bordure); vertical-align: middle; }
th { background: var(--fond); font-weight: 600; color: var(--texte-2); font-size: var(--t-sm); white-space: nowrap; }
tbody tr:hover { background: var(--surface-survol); }
td.montant, th.montant, .text-right { text-align: right; font-variant-numeric: tabular-nums; }
table.liste tr[data-fiche], table.liste tr[data-href] { cursor: pointer; }
table.liste tr[data-fiche]:focus-visible, table.liste tr[data-href]:focus-visible { outline-offset: -3px; }
table.liste td.actions, table.liste th.actions { width: 44px; text-align: right; padding-left: 4px; padding-right: 8px; }
table.liste td[hidden], table.liste th[hidden] { display: none; }
.tri-lien { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; min-height: 24px; }
.tri-lien .tri-ico { opacity: .45; }
.tri-lien.actif, .tri-lien:hover .tri-ico { color: var(--primaire-texte); }
.tri-lien.actif .tri-ico { opacity: 1; }
/* Liens dans une cellule (numero de document, montant d'une tranche) : zone de 24 px de haut sans changer la ligne */
td a:not([class]), td a.lien-cellule { display: inline-block; min-height: 24px; line-height: 24px; vertical-align: middle; }
.cellule-2 { display: flex; flex-direction: column; line-height: 1.3; }
.cellule-2 small, .cellule-2 .second { color: var(--texte-2); font-size: var(--t-sm); }

/* Selection multiple (tableauListe) */
table.liste th.selection, table.liste td.selection { width: 36px; padding-left: 8px; padding-right: 4px; }
table.liste td.selection input, table.liste th.selection input { display: block; }
table.liste tr.selectionne { background: var(--primaire-clair); }
.barre-selection {
  position: sticky; bottom: 12px; z-index: 100; display: flex; align-items: center; gap: var(--e3); flex-wrap: wrap;
  margin: var(--e3) 0 0; padding: 10px var(--e4); background: var(--sombre); color: var(--sombre-texte);
  border-radius: var(--rayon); box-shadow: var(--ombre-panneau);
}
.barre-selection[hidden] { display: none; }
.barre-selection .selection-compteur { font-weight: 600; }
.barre-selection .selection-filtre { color: var(--texte-sur-primaire); text-decoration: underline; background: none; border: 0; padding: 6px 0; font: inherit; min-height: 36px; }
.barre-selection .selection-actions { display: flex; gap: var(--e2); flex-wrap: wrap; margin-left: auto; }
.barre-selection .btn-discret { color: inherit; }
.barre-selection .btn-outline { background: transparent; color: var(--texte-sur-primaire); border-color: var(--menu-texte-3); }
.barre-selection .btn-outline:hover { background: var(--menu-survol); }
@media (max-width: 768px) {
  table.liste td.selection { position: absolute; top: 10px; left: 10px; width: auto; padding: 0; }
  table.liste td.selection::before { content: none; }
  table.liste tr.avec-selection td[data-fixe] { padding-left: 36px; }
  .barre-selection { bottom: calc(var(--onglets-h) + 8px + env(safe-area-inset-bottom)); }
  .barre-selection .selection-actions { margin-left: 0; width: 100%; }
}

/* ------------------------------------------------------------------ Formulaires */
.form-group { margin-bottom: var(--e4); }
.form-group > label { display: block; font-size: var(--t-sm); font-weight: 600; color: var(--texte); margin-bottom: 6px; }
.form-group .requis { color: var(--erreur); font-weight: 700; }
.form-legende { font-size: var(--t-sm); color: var(--texte-2); margin-bottom: var(--e4); }
.form-legende .requis { color: var(--erreur); font-weight: 700; }
.form-control {
  width: 100%; padding: 8px 14px; min-height: var(--champ-h); border: 1px solid var(--bordure-forte); border-radius: var(--rayon-champ);
  font-size: var(--t-md); background: var(--carte); color: var(--texte); transition: border-color .15s, box-shadow .15s;
}
.form-control::placeholder { color: var(--texte-3); opacity: 1; }
.form-control:focus { outline: 3px solid var(--focus-anneau); outline-offset: 0; border-color: var(--primaire); }
.form-control:disabled, .form-control[readonly] { background: var(--fond); color: var(--texte-2); }
select.form-control { appearance: auto; }
textarea.form-control { min-height: 96px; resize: vertical; }
.form-aide { font-size: var(--t-sm); color: var(--texte-3); margin-top: 4px; }
.form-erreur .form-control { border-color: var(--danger); box-shadow: inset 0 0 0 1px var(--danger); }
.form-message-erreur { font-size: var(--t-sm); color: var(--erreur-texte); margin-top: 4px; font-weight: 600; display: flex; gap: 6px; align-items: flex-start; }
.form-case label { display: flex; align-items: center; gap: 10px; font-weight: 500; color: var(--texte); min-height: 28px; padding: 2px 0; }
/* Mot de passe avec bouton Afficher / Masquer (data-voir-mdp) : le bouton vit dans le champ, a droite */
.champ-mdp { position: relative; }
.champ-mdp .form-control { padding-right: 96px; }
.mdp-voir { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); min-height: 36px; min-width: 44px; padding: 0 12px; border: 0; border-radius: 999px; background: var(--fond); color: var(--primaire-texte); font-size: var(--t-sm); font-weight: 600; }
.mdp-voir:hover { background: var(--primaire-clair); }
.mdp-voir[aria-pressed="true"] { background: var(--primaire-clair); }
/* Champ piege des formulaires publics (lot V2-03) : hors ecran, jamais display:none */
.champ-piege { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--e4); }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: var(--e4); }
@media (max-width: 600px) { .form-row, .form-row-3 { grid-template-columns: 1fr; } }
.form-centre { max-width: 560px; margin: 0 auto; }
input[type=checkbox], input[type=radio] { accent-color: var(--primaire); width: var(--case); height: var(--case); flex: none; margin: 0; }

.segmente { display: inline-flex; border: 1px solid var(--bordure-forte); border-radius: var(--rayon-champ); overflow: hidden; background: var(--carte); margin-bottom: var(--e4); }
.segmente legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.segmente input { position: absolute; opacity: 0; pointer-events: none; }
.segmente label { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; min-height: var(--btn-h); cursor: pointer; color: var(--texte-2); border-right: 1px solid var(--bordure); font-weight: 500; font-size: var(--t-nav); }
.segmente label:last-of-type { border-right: 0; }
.segmente input:checked + label { background: var(--primaire); color: var(--sur-primaire); }
.segmente input:focus-visible + label { outline: 3px solid var(--focus-anneau); outline-offset: -3px; }
.segmente input:disabled + label { opacity: .5; cursor: not-allowed; }
details.plus > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; color: var(--lien); font-weight: 600; margin-bottom: var(--e3); min-height: 32px; border-radius: var(--rayon-xs); }
details.plus > summary::-webkit-details-marker { display: none; }
details.plus[open] > summary .chevron { transform: rotate(90deg); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px; border: 1px solid var(--bordure-forte); border-radius: var(--rayon-champ); background: var(--carte); min-height: var(--champ-h); }
.chips:focus-within { border-color: var(--primaire); outline: 3px solid var(--focus-anneau); outline-offset: 0; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px 2px 12px; border-radius: 999px; background: var(--primaire-clair); color: var(--primaire-texte); font-size: var(--t-sm); font-weight: 500; }
.chip-x { border: 0; background: none; color: inherit; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0; border-radius: 999px; }
.chip-x:hover { background: var(--primaire-fond); }
.chips-saisie { flex: 1; min-width: 120px; border: 0; outline: none; padding: 4px; background: transparent; font-size: var(--t-md); }
.chips-saisie:focus-visible { outline: none; }

/* ------------------------------------------------------------------ Badges, pastilles, barres */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; min-height: 22px; border-radius: 999px; font-size: var(--t-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; line-height: 1.5; }
.badge-brouillon, .badge-grey { background: var(--neutre-fond); color: var(--neutre-texte); }
.badge-envoye, .badge-emise, .badge-blue { background: var(--info-fond); color: var(--info-texte); }
.badge-consulte { background: var(--violet-fond); color: var(--violet-texte); }
.badge-signe, .badge-payee, .badge-green { background: var(--succes-fond); color: var(--succes-texte); }
.badge-refuse, .badge-annulee { background: var(--fond); color: var(--texte); box-shadow: inset 0 0 0 1px var(--neutre-contour); }
.badge-red { background: var(--erreur-fond); color: var(--erreur-texte); }
.badge-expire, .badge-relancer { background: var(--alerte-fond); color: var(--alerte-texte); }
.badge-partiel, .badge-orange { background: var(--alerte-fond); color: var(--alerte-texte); }
.badge-retard { background: var(--erreur-fond); color: var(--erreur-texte); }
.badge-pro { background: var(--accent); color: var(--sur-accent); }
a.badge { text-decoration: none; }
.badge .ico { vertical-align: 0; }
.oeil { display: inline-flex; vertical-align: middle; color: var(--primaire); }
.oeil-non { color: var(--texte-3); }
.pastille { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 999px; font-size: var(--t-xs); font-weight: 700; margin-right: 2px; }
.pastille-lien { text-decoration: none; display: inline-flex; min-width: 24px; min-height: 24px; align-items: center; justify-content: center; border-radius: 999px; }
.pastille-statut { display: inline-block; width: 10px; height: 10px; border-radius: 999px; flex: none; margin-top: 6px; }
.barre { display: block; height: 6px; border-radius: 999px; background: var(--bordure); overflow: hidden; min-width: 60px; margin: 3px 0; }
.barre > span { display: block; height: 100%; border-radius: 999px; background: var(--primaire); }
.barre-vert > span { background: var(--succes); }
.barre-orange > span { background: var(--alerte); }
.barre-rouge > span { background: var(--erreur); }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: var(--taille, 28px); height: var(--taille, 28px); border-radius: 999px; font-size: calc(var(--taille, 28px) * .4); font-weight: 700; color: var(--sur-primaire); background: var(--primaire); flex: none; letter-spacing: 0; }
.avatar-1 { background: var(--avatar-1); } .avatar-2 { background: var(--avatar-2); } .avatar-3 { background: var(--avatar-3); } .avatar-4 { background: var(--avatar-4); } .avatar-5 { background: var(--avatar-5); }
/* Avatar du menu sombre : initiales bleu nuit sur pastille claire (7,2:1), le blanc sur bleu clair ne passait pas (3,7:1) */
.compte .avatar { width: 34px; height: 34px; font-size: var(--t-sm); background: var(--primaire-clair); color: var(--primaire-fonce); }

/* ------------------------------------------------------------------ Stats, alertes, divers (classes conservees) */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--e4); margin-bottom: var(--e6); }
.stat-card { background: var(--carte); border: 1px solid var(--bordure); border-radius: var(--rayon); padding: var(--e4) var(--e5); box-shadow: var(--ombre-carte); }
.stat-card .stat-label { font-size: var(--t-sm); color: var(--texte-2); font-weight: 500; margin-bottom: 4px; }
.stat-card .stat-value { font-size: var(--t-2xl); font-weight: var(--poids-titre); color: var(--texte); font-variant-numeric: tabular-nums; letter-spacing: var(--suivi-titre); line-height: 1.1; }
.stat-card .stat-suffix { font-size: var(--t-sm); color: var(--texte-2); font-weight: 500; letter-spacing: 0; }
.alert { padding: 12px 16px; border-radius: var(--rayon-champ); margin-bottom: var(--e4); font-size: var(--t-sm); border: 1px solid transparent; line-height: 1.45; }
.alert-success { background: var(--succes-fond); color: var(--succes-texte); border-color: var(--succes-fond); }
.alert-error { background: var(--erreur-fond); color: var(--erreur-texte); border-color: var(--erreur-fond); }
.alert-info { background: var(--info-fond); color: var(--info-texte); border-color: var(--info-fond); display: flex; gap: 8px; align-items: flex-start; }
.alert-info > .ico { flex: none; margin-top: 2px; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-muted { color: var(--texte-2); }
.mt-2 { margin-top: 8px; } .mt-4 { margin-top: 16px; } .mb-2 { margin-bottom: 8px; } .mb-4 { margin-bottom: 16px; }
.bandeau-lecture { background: var(--avertissement-fond); border: 1px solid var(--alerte-fond); color: var(--avertissement); padding: 10px 14px; border-radius: var(--rayon-champ); margin-bottom: var(--e4); font-size: var(--t-sm); }
.empty-state { text-align: center; padding: 40px 20px; color: var(--texte-2); }
.empty-state .icon { font-size: 40px; margin-bottom: 8px; color: var(--primaire); }
.empty-state .empty-titre { font-size: var(--t-lg); font-weight: 700; color: var(--texte); letter-spacing: -0.01em; }
.empty-aide { margin-top: var(--e3); font-size: var(--t-sm); }
/* Montants (DS1) : chiffres tabulaires, decimales et devise plus discretes */
.montant-grand { font-variant-numeric: tabular-nums; font-weight: var(--poids-titre); letter-spacing: var(--suivi-titre); font-size: var(--t-2xl); line-height: 1.1; }
.montant-grand .decimales, .montant-grand .devise { font-size: .6em; font-weight: 600; color: var(--texte-2); letter-spacing: 0; }

/* Anciennes listes (barreRecherche) */
form.liste-filtres { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
form.liste-filtres .form-control { width: auto; max-width: 100%; }
form.liste-filtres input[type=search] { flex: 1 1 200px; min-width: 0; }
.pagination-haut { margin-left: auto; font-size: var(--t-sm); color: var(--texte-2); }
.pagination { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; margin: 12px 0 0; font-size: var(--t-sm); color: var(--texte-2); }
.pagination-pages { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.pagination-page { min-width: var(--btn-h-sm); }
.pagination-ellipse { padding: 0 4px; }
.pagination-taille label { display: inline-flex; align-items: center; gap: 6px; font-weight: 400; color: var(--texte-2); margin: 0; }
.pagination-taille select { width: auto; min-height: var(--btn-h-sm); padding: 2px 8px; font-size: var(--t-md); }

/* Choix par recherche (formulaires > 200 fiches) */
.choix-recherche { position: relative; }
.choix-liste { position: absolute; z-index: 50; left: 0; right: 0; top: 100%; margin: 2px 0 0; padding: 4px 0; list-style: none; background: var(--carte); border: 1px solid var(--bordure); border-radius: var(--rayon-champ); box-shadow: var(--ombre-menu); max-height: 300px; overflow-y: auto; }
.choix-liste li { padding: 8px 14px; cursor: pointer; font-size: var(--t-md); overflow-wrap: anywhere; min-height: 36px; }
.choix-liste li small { display: block; color: var(--texte-2); font-size: var(--t-sm); }
.choix-liste li[aria-selected=true], .choix-liste li:hover { background: var(--primaire-clair); }
.choix-liste li.choix-info { cursor: default; color: var(--texte-2); background: none; }

/* Lignes dynamiques (editeurs actuels) */
.ligne-row { display: grid; grid-template-columns: 3fr 80px 80px 120px 100px 120px 40px; gap: 8px; align-items: start; margin-bottom: 8px; }
@media (max-width: 900px) { .ligne-row { grid-template-columns: 1fr; } }
.ligne-row > * { min-width: 0; }
.ligne-row input, .ligne-row select { padding: 6px 8px; border: 1px solid var(--bordure-forte); border-radius: 6px; font-size: var(--t-md); min-height: 40px; }
.ligne-row .remove-ligne { background: none; border: none; color: var(--danger); font-size: 18px; cursor: pointer; padding: 6px; min-width: 32px; min-height: 32px; }

/* ------------------------------------------------------------------ Menus deroulants (details) */
.menu-deroulant { position: relative; display: inline-block; }
.menu-deroulant > summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; user-select: none; }
.menu-deroulant > summary::-webkit-details-marker { display: none; }
.menu {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 130; min-width: 220px; padding: 6px; background: var(--carte);
  border: 1px solid var(--bordure); border-radius: var(--rayon-sm); box-shadow: var(--ombre-menu);
}
.menu-droite > .menu { left: auto; right: 0; }
.menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; min-height: var(--btn-h); border: 0; background: none; border-radius: 8px;
  color: var(--texte); text-decoration: none; text-align: left; font-size: var(--t-nav); cursor: pointer; white-space: nowrap; font-weight: 500;
}
.menu-item:hover { background: var(--fond); }
.menu-item:focus-visible { background: var(--fond); outline-offset: -3px; }
.menu-item.danger { color: var(--erreur-texte); }
.menu-item.desactive { color: var(--texte-3); cursor: not-allowed; }
.menu-item .ico { color: var(--texte-2); }
.menu-item.danger .ico { color: inherit; }
.menu-item.coche .coche { color: var(--vert); }
.menu-item input[type=checkbox], .menu-item input[type=radio] { margin: 0; }
.menu-item .compteur { margin-left: auto; font-size: var(--t-sm); color: var(--texte-3); font-variant-numeric: tabular-nums; }
.menu-form { margin: 0; }
.menu-sep { border: 0; border-top: 1px solid var(--bordure); margin: 6px 0; }
/* Menus « … » de ligne construits au clic (lot I12) : points du bouton, ouverture vers le haut (dernieres lignes) */
.pts::before { content: "\22EF"; font-size: 20px; line-height: 1; font-weight: 700; }
.menu-haut > .menu { top: auto; bottom: calc(100% + 6px); }
.menu-titre { padding: 8px 10px 4px; font-size: var(--t-sm); color: var(--texte-3); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-pied { display: flex; justify-content: flex-end; gap: 6px; padding: 6px 4px 2px; border-top: 1px solid var(--bordure); margin-top: 4px; }
.menu-sous { position: relative; }
.menu-sous > summary { list-style: none; }
.menu-sous > summary::-webkit-details-marker { display: none; }
.menu-sous > summary .chevron { margin-left: auto; }
.menu-sous > .menu { top: -6px; left: calc(100% - 4px); }
@media (max-width: 768px) { .menu-sous > .menu { position: static; box-shadow: none; border: 0; padding-left: 16px; } }

/* ------------------------------------------------------------------ En-tete de liste, filtres, synthese, onglets */
.liste-entete { margin-bottom: var(--e4); }
.liste-entete-ligne { display: flex; align-items: center; gap: var(--e2); flex-wrap: wrap; }
.liste-titre { font-size: var(--t-2xl); font-weight: var(--poids-titre); color: var(--texte); margin-right: var(--e2); letter-spacing: var(--suivi-titre); line-height: 1.15; }
.liste-recherche { flex: 1 1 220px; min-width: 160px; position: relative; display: flex; align-items: center; }
.liste-recherche .ico { position: absolute; left: 14px; color: var(--texte-3); pointer-events: none; }
.liste-recherche input { padding-left: 38px; border-radius: var(--rayon-bouton); }
.filtres-bouton { position: relative; }
.filtres-bouton .point { position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 999px; background: var(--primaire); box-shadow: 0 0 0 2px var(--surface); }
.liste-entete .liste-filtres { display: flex; flex-wrap: wrap; gap: var(--e2); align-items: center; margin-top: var(--e3); }
.liste-entete .liste-filtres[hidden] { display: none; }
.filtre .compteur { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--bordure); color: var(--texte-3); font-size: var(--t-xs); font-weight: 700; } /* Lot PETITS-C284 (03/11) : meme correction ; etait --texte-2 */
.filtre .compteur.actif { background: var(--primaire); color: var(--sur-primaire); }
.filtre .menu { min-width: 240px; }
.filtre label.menu-item { cursor: pointer; }
.tri-ligne { justify-content: space-between; }
.tri-sens { display: inline-flex; gap: 2px; }
.periode-texte { font-variant-numeric: tabular-nums; }
.periode-menu { width: 600px; max-width: calc(100vw - 32px); padding: var(--e3); }
.periode-raccourcis { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: var(--e3); }
.periode-calendriers { display: grid; grid-template-columns: 1fr 1fr; gap: var(--e4); }
.periode-champs { display: flex; gap: var(--e3); margin-top: var(--e3); flex-wrap: wrap; }
.periode-champs label { display: flex; align-items: center; gap: 6px; font-weight: 500; }
.periode-champs .form-control { width: auto; min-height: var(--btn-h); }
.cal { font-size: var(--t-sm); }
.cal-entete { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; font-weight: 600; }
.cal-grille { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.cal-grille .cal-jour-nom { font-size: var(--t-sm); font-weight: 600; color: var(--texte-3); padding: 2px 0; }
.cal-grille button { border: 0; background: none; border-radius: 8px; min-height: 34px; min-width: 34px; padding: 0; color: var(--texte); font-variant-numeric: tabular-nums; }
.cal-grille button:hover { background: var(--primaire-clair); }
.cal-grille button.hors { color: var(--texte-3); opacity: .6; }
.cal-grille button.dans { background: var(--primaire-clair); border-radius: 0; }
.cal-grille button.borne { background: var(--primaire); color: var(--sur-primaire); border-radius: 8px; }
.cal-grille button.aujourdhui { font-weight: 700; text-decoration: underline; }
@media (max-width: 640px) { .periode-calendriers { grid-template-columns: 1fr; } .cal:last-child { display: none; } }

/* Bascule de vue Liste | Tableau : piste claire bordee, texte 14 px (le gris sur gris de l'ancienne piste ne passait pas) */
.vues { display: inline-flex; gap: 2px; margin-top: var(--e3); padding: 3px; background: var(--surface); border: 1px solid var(--bordure-forte); border-radius: var(--rayon-bouton); }
.vues .vue { display: inline-flex; align-items: center; gap: 6px; padding: 5px 14px; min-height: 32px; border-radius: 999px; text-decoration: none; color: var(--texte-2); font-weight: 600; font-size: var(--t-sm); }
.vues .vue:hover { color: var(--texte); }
.vues .vue.actif { background: var(--primaire); color: var(--sur-primaire); }

.synthese { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--e3); margin-bottom: var(--e4); }
.synthese-carte { display: flex; flex-direction: column; gap: 2px; padding: var(--e3) var(--e4); background: var(--carte); border: 1px solid var(--bordure); border-left: 4px solid var(--bordure-forte); border-radius: var(--rayon); text-decoration: none; color: var(--texte); box-shadow: var(--ombre-carte); }
a.synthese-carte:hover { border-color: var(--primaire); }
.synthese-carte.actif { border-left-color: var(--primaire); background: var(--surface-accent); }
.synthese-carte .libelle { font-size: var(--t-sm); color: var(--texte-2); font-weight: 500; }
.synthese-carte .nombre { font-size: var(--t-xl); font-weight: var(--poids-titre); color: var(--texte); font-variant-numeric: tabular-nums; line-height: 1.2; letter-spacing: var(--suivi-titre); }
.synthese-carte .montant { font-size: var(--t-sm); color: var(--texte-2); font-variant-numeric: tabular-nums; }
.synthese-carte .info { font-size: var(--t-sm); color: var(--texte-3); }
.synthese-vert { border-left-color: var(--succes); } .synthese-orange { border-left-color: var(--alerte); } .synthese-rouge { border-left-color: var(--erreur); } .synthese-bleu { border-left-color: var(--primaire); }

.onglets { display: flex; gap: 2px; border-bottom: 1px solid var(--bordure); margin-bottom: var(--e4); overflow-x: auto; }
.onglet { display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px; min-height: var(--btn-h); border: 0; background: none; color: var(--texte-2); text-decoration: none; font-weight: 600; font-size: var(--t-nav); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; cursor: pointer; border-radius: var(--rayon-xs) var(--rayon-xs) 0 0; }
.onglet:hover { color: var(--texte); }
.onglet:focus-visible { outline-offset: -3px; }
.onglet.actif, .onglet[aria-selected="true"] { color: var(--primaire-texte); border-bottom-color: var(--primaire); }
.onglet .compteur { font-size: var(--t-xs); font-weight: 700; background: var(--bordure); border-radius: 999px; padding: 1px 7px; color: var(--texte-3); } /* Lot PETITS-C284 (03/11) : --texte-3, 4,84:1 sur --bordure ; etait --texte-2, 4,17:1 (axe) */
[data-onglet-section][hidden] { display: none; }
[hidden] { display: none !important; }

/* ------------------------------------------------------------------ Panneau lateral de fiche */
.panneau { position: fixed; top: 0; right: 0; bottom: 0; width: 70%; min-width: 640px; max-width: 1100px; z-index: 140; background: var(--fond); box-shadow: var(--ombre-panneau); overflow-y: auto; transform: translateX(0); }
.panneau[hidden] { display: none; }
.panneau-fond { position: fixed; inset: 0; background: var(--voile-leger); z-index: 135; }
.panneau-fond[hidden] { display: none; }
.panneau-corps { padding: var(--e5); }
.panneau-chargement { padding: var(--e8); text-align: center; color: var(--texte-2); }
.fiche-entete { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--e3); margin-bottom: var(--e4); }
.fiche-titre h2 { font-size: var(--t-xl); font-weight: var(--poids-titre); color: var(--texte); letter-spacing: var(--suivi-titre); }
.fiche-badge { margin-bottom: 6px; }
.fiche-badge .menu-deroulant > summary { padding: 0; min-height: 24px; border: 0; background: none; }
@media (max-width: 768px) { .fiche-badge .menu-deroulant > summary { min-height: var(--cible); } }
.fiche-sous-titre { color: var(--texte-2); font-size: var(--t-sm); margin-top: 2px; }
.fiche-outils { display: flex; gap: 4px; flex: none; }
.fiche-actions { display: flex; flex-wrap: wrap; gap: var(--e2); margin-bottom: var(--e4); }
.fiche-cartes > .card:last-child { margin-bottom: 0; }
.main .fiche { max-width: 1040px; }
.dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--e3) var(--e5); }
.dl dt { font-size: var(--t-sm); color: var(--texte-2); font-weight: 500; }
.dl dd { margin: 0; font-size: var(--t-md); overflow-wrap: anywhere; }
.historique { list-style: none; }
.historique li { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--bordure); }
.historique li:last-child { border-bottom: 0; }
.historique-meta { font-size: var(--t-sm); color: var(--texte-3); }

/* ------------------------------------------------------------------ Modales et palette */
dialog { border: 0; padding: 0; background: transparent; color: inherit; max-width: 100vw; max-height: 100vh; }
dialog::backdrop { background: var(--voile); }
.modale { margin: auto; }
.modale .modale-boite { width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px); display: flex; flex-direction: column; background: var(--carte); border-radius: var(--rayon); box-shadow: var(--ombre-panneau); }
.modale-large .modale-boite { width: min(960px, calc(100vw - 32px)); }
.modale-plein .modale-boite { width: calc(100vw - 32px); height: calc(100vh - 32px); }
.modale-entete { display: flex; align-items: center; justify-content: space-between; gap: var(--e3); padding: var(--e4) var(--e5); border-bottom: 1px solid var(--bordure); }
.modale-entete h2 { font-size: var(--t-lg); font-weight: 700; letter-spacing: -0.01em; }
.modale-corps { padding: var(--e5); overflow-y: auto; }
.modale-pied { display: flex; justify-content: flex-end; gap: var(--e2); padding: var(--e3) var(--e5); border-top: 1px solid var(--bordure); }
.palette { margin: 10vh auto auto; }
.palette-boite { width: min(640px, calc(100vw - 32px)); background: var(--carte); border-radius: var(--rayon); box-shadow: var(--ombre-panneau); overflow: hidden; }
.palette-champ { display: flex; align-items: center; gap: var(--e2); padding: var(--e3) var(--e4); border-bottom: 1px solid var(--bordure); color: var(--texte-3); }
.palette-champ input { flex: 1; border: 0; font-size: var(--t-md); min-width: 0; background: transparent; min-height: var(--btn-h); }
.palette-champ input:focus-visible { outline: none; }
.palette-resultats { max-height: min(60vh, 480px); overflow-y: auto; padding: 6px; }
.palette-groupe { padding: 8px 10px 4px; font-size: var(--t-sm); font-weight: 600; color: var(--texte-3); }
.palette-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; min-height: var(--btn-h); border-radius: 8px; text-decoration: none; color: var(--texte); cursor: pointer; font-size: var(--t-nav); }
.palette-item .ico { color: var(--texte-2); flex: none; }
.palette-item .second { color: var(--texte-2); font-size: var(--t-sm); margin-left: auto; white-space: nowrap; }
.palette-item[aria-selected="true"], .palette-item:hover { background: var(--primaire-clair); }
.palette-vide { padding: var(--e5); text-align: center; color: var(--texte-2); }
.palette-pied { display: flex; gap: var(--e4); padding: 8px var(--e4); border-top: 1px solid var(--bordure); font-size: var(--t-sm); color: var(--texte-3); }
.palette-pied kbd { font-family: inherit; border: 1px solid var(--bordure-forte); border-radius: 4px; padding: 0 5px; margin-right: 2px; }
/* Lot RESERVES-G (14/11/2026, P7) : texte secondaire de l'element surligne en couleur du texte (avant : --texte-2 sur --primaire-clair, 4,32:1) ;
   aides clavier (naviguer, ouvrir, fermer) masquees sous 720 px : elles ne servent pas sur un telephone (C536 point 4). Aucun mot change. */
.palette-item[aria-selected="true"] .second, .palette-item:hover .second { color: var(--texte); }
@media (max-width: 720px) { .palette-pied { display: none; } }
/* (fin du bloc Lot RESERVES-G) */

/* Tiroir des colonnes */
.tiroir { position: fixed; top: 0; right: 0; bottom: 0; width: 360px; max-width: 100vw; z-index: 145; background: var(--carte); box-shadow: var(--ombre-panneau); display: flex; flex-direction: column; }
.tiroir[hidden] { display: none; }
.tiroir-entete { display: flex; align-items: center; justify-content: space-between; padding: var(--e4) var(--e5); border-bottom: 1px solid var(--bordure); }
.tiroir-corps { flex: 1; overflow-y: auto; padding: var(--e3) var(--e5); }
.tiroir-pied { display: flex; justify-content: flex-end; gap: var(--e2); padding: var(--e3) var(--e5) calc(var(--e3) + env(safe-area-inset-bottom)); border-top: 1px solid var(--bordure); }
.colonne-ligne { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--bordure); min-height: var(--cible); }
.colonne-ligne .poignee { cursor: grab; color: var(--texte-3); display: inline-flex; }
.colonne-ligne label { flex: 1; display: flex; align-items: center; gap: 10px; font-weight: 500; margin: 0; min-height: 32px; }
.colonne-ligne.fixe { color: var(--texte-3); }
.colonne-ligne .fleches { display: inline-flex; gap: 2px; }

/* Toasts */
.toasts { position: fixed; bottom: calc(16px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); z-index: 150; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { pointer-events: auto; padding: 12px 18px; border-radius: var(--rayon-champ); background: var(--sombre); color: var(--sombre-texte); box-shadow: var(--ombre-menu); font-size: var(--t-sm); font-weight: 500; max-width: calc(100vw - 32px); }
.toast-error { background: var(--erreur); }
.toast-success { background: var(--succes); color: var(--sur-primaire); }

/* ------------------------------------------------------------------ Impression */
@media print {
  .sidebar, .barre-haut, .sidebar-overlay, .onglets-mobile, .panneau, .panneau-fond, .no-print, .toasts, .evitement { display: none !important; }
  .main { margin: 0; padding: 0; }
  body { background: var(--surface); }
}

/* ------------------------------------------------------------------ Mobile et tablette */
@media (max-width: 1023px) {
  .panneau { width: 100%; min-width: 0; max-width: none; }
}
@media (max-width: 768px) {
  .barre-haut { left: 0; padding: 0 var(--e3); padding-top: env(safe-area-inset-top); height: calc(var(--barre-h) + env(safe-area-inset-top)); gap: var(--e2); background: var(--sombre); border-bottom: 0; color: var(--sombre-texte); }
  .barre-haut .burger { display: inline-flex; background: transparent; color: var(--sombre-texte); }
  .mode-app .barre-haut .marque { display: inline-flex; color: var(--sombre-texte); margin: 0 auto; order: 2; }
  .mode-app .barre-haut .marque-logo { height: 28px; }
  .marque-texte { display: inline; }
  .barre-haut .creer { order: 1; }
  .creer > summary { width: var(--cible); height: var(--cible); padding: 0; border-radius: 999px; justify-content: center; }
  .creer .creer-texte { display: none; }
  .creer .menu { left: 0; }
  .raccourcis, .recherche-globale, .entreprise-courante { display: none; }
  .barre-droite { order: 3; margin-left: 0; }
  .barre-haut .btn-rond { background: transparent; color: var(--sombre-texte); }
  .barre-haut .btn-rond:hover { background: var(--menu-filet); }
  .notifications .compteur { box-shadow: 0 0 0 2px var(--sombre); }
  .notifications-panneau { position: fixed; left: 8px; right: 8px; top: calc(var(--barre-h) + env(safe-area-inset-top) + 4px); width: auto; }
  .sidebar { transform: translateX(-100%); top: 0; padding-top: env(safe-area-inset-top); width: min(320px, 86vw); }
  .sidebar.ouvert { transform: translateX(0); }
  .compte .menu { position: static; margin: 0 10px 8px; }
  .main { margin-left: 0; padding: calc(var(--barre-h) + env(safe-area-inset-top) + var(--e4)) var(--e4) calc(var(--onglets-h) + var(--e5) + env(safe-area-inset-bottom)); }
  .main-header h1, .main-header h2, .liste-titre { font-size: var(--t-xl); }
  .onglets-mobile {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 110;
    height: calc(var(--onglets-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: var(--carte); border-top: 1px solid var(--bordure);
  }
  /* Libelles de la barre d'onglets : 12 px sous l'icone (convention des barres d'onglets iOS / Android ; exception
     argumentee dans SP/v2/ds1/ACCESSIBILITE.md), sur deux lignes au plus, jamais tronques */
  .onglets-mobile a, .onglets-mobile button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 0; background: none; color: var(--texte-2); text-decoration: none; font-size: var(--t-xs); font-weight: 600; letter-spacing: .01em; line-height: 1.1; min-height: var(--cible); padding: 4px 2px; overflow: hidden; text-align: center; }
  .onglets-mobile a span, .onglets-mobile button span { max-width: 100%; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .onglets-mobile a:focus-visible, .onglets-mobile button:focus-visible { outline-offset: -3px; }
  .onglets-mobile a.actif, .onglets-mobile a[aria-current] { color: var(--primaire-texte); font-weight: 700; }
  .onglets-mobile a.actif svg { background: var(--primaire-clair); border-radius: 10px; padding: 3px 8px; box-sizing: content-box; }
  /* Barre de l'editeur sur deux lignes (titre + actions, puis onglets) : collante et dans le flux plutot que fixe, le
     contenu commence sous la barre quelle que soit sa hauteur (plus de premiers pixels masques) ; --barre-h reste le
     jeton de sa hauteur minimale et obtp-ui.js recopie sa hauteur reelle dans --barre-h sur <main> (elements collants
     des pages : top: var(--barre-h)). */
  .mode-editeur .main { padding-top: var(--e4); padding-bottom: var(--e6); }
  .mode-editeur .onglets-mobile { display: none; }
  .mode-editeur .barre-haut { position: sticky; top: 0; height: auto; padding-top: calc(6px + env(safe-area-inset-top)); background: var(--carte); color: var(--texte); border-bottom: 1px solid var(--bordure); }
  .mode-editeur .barre-haut .btn-rond { color: var(--texte-2); }
  .editeur-onglets { order: 10; width: 100%; }
  .barre-editeur { flex-wrap: wrap; height: auto; min-height: var(--barre-h); padding-top: 6px; padding-bottom: 0; }
  /* Les actions deviennent des elements de la barre : 1re ligne marque, titre (abrege) et X ; 2e ligne les actions,
     repliees si besoin ; 3e ligne les onglets. Rien ne deborde de l'ecran. */
  .barre-editeur .editeur-actions { display: contents; }
  .barre-editeur .editeur-titre { flex: 1 1 auto; }
  .barre-editeur .editeur-actions > * { order: 2; }
  .barre-editeur .editeur-actions > .fermer-editeur { order: 1; margin-left: auto; }
  /* Telephone : titre, puis la recherche sur toute la largeur, puis les boutons (filtres, periode, colonnes, Nouveau) */
  .liste-titre { width: 100%; order: -2; }
  .liste-recherche { flex-basis: 100%; order: -1; }
  table.liste, table.liste tbody, table.liste tr, table.liste td { display: block; width: 100%; }
  table.liste thead { display: none; }
  table.liste tr { background: var(--carte); border: 1px solid var(--bordure); border-radius: var(--rayon); margin-bottom: var(--e3); padding: 8px 14px; box-shadow: var(--ombre-carte); position: relative; }
  table.liste td { display: flex; justify-content: space-between; align-items: center; gap: 12px; border: 0; padding: 6px 0; text-align: left !important; font-size: var(--t-sm); }
  table.liste td[hidden] { display: none; }
  table.liste td::before { content: attr(data-libelle); color: var(--texte-2); font-size: var(--t-sm); font-weight: 500; flex: none; }
  table.liste td[data-fixe]::before { content: none; }
  table.liste td[data-fixe] { font-weight: 600; font-size: var(--t-md); padding: 8px 48px 8px 0; min-height: var(--cible); border-bottom: 1px solid var(--bordure); margin-bottom: 4px; }
  table.liste td.actions { position: absolute; top: 8px; right: 8px; width: auto; padding: 0; }
  table.liste td.actions::before { content: none; }
  .pagination { justify-content: center; }
  .panneau-corps { padding: var(--e4); }
  .fiche-actions .btn { flex: 1 1 auto; }
  .modale-plein .modale-boite, .modale .modale-boite { width: 100vw; max-height: 100vh; border-radius: 0; }
  .modale { margin: 0; }
  .modale-pied, .tiroir-pied { padding-bottom: calc(var(--e3) + env(safe-area-inset-bottom)); }
  .palette { margin: 0; }
  .palette-boite { width: 100vw; border-radius: 0; }
  .palette-resultats { max-height: calc(100vh - 120px); }
  .tiroir { width: 100vw; }
  .form-case label { min-height: var(--cible); }
  .marque, .compte-liens a, .compte-liens span, .mdp-voir, .partenaire, .sidebar-pied a, .sidebar-nav .sous a, .vues .vue, details.plus > summary { min-height: var(--cible); }
  .marque { padding: 0 2px; }
  table.liste td[data-fixe] > a { display: inline-flex; align-items: center; min-height: var(--cible); margin: -10px 0; }
  .chip-x { width: 36px; height: 36px; }
  .chip { padding-top: 0; padding-bottom: 0; }
  .chips-saisie { min-height: 36px; }
  .tri-lien { min-height: 32px; }
  .pastille-lien { min-width: var(--cible); min-height: var(--cible); margin: -10px -8px; }
}
@media (max-width: 480px) {
  .synthese { grid-template-columns: 1fr 1fr; }
}

/* Lot V2-09 DS2 : cibles tactiles des ecrans des modules. Les regles `min-height: var(--cible)` posees plus haut (bloc
   pointer: coarse) sont placees AVANT les regles de base de .partenaire, .tri-lien, .vues .vue, .pastille-lien : elles
   etaient donc ecrasees (meme specificite, regle plus tardive). On les repose ici, en fin de fichier. */
@media (max-width: 768px), (pointer: coarse) {
  .partenaire, .compte-panneau-pied .partenaire, .vues .vue, .tri-lien, .sidebar-nav .sous a, .sidebar-pied a, .sidebar-admin a { min-height: var(--cible); }
  .pastille-lien { min-width: var(--cible); min-height: var(--cible); }
  /* lien seul dans une cellule de tableau (email, telephone, numero, montant) : cible de 44 px sans agrandir la ligne */
  table td > a:only-child, table th > a:only-child:not(.tri-lien) { display: inline-flex; align-items: center; min-height: var(--cible); margin-block: -10px; }
  /* lien-badge seul (ex. « Invitation envoyee ») */
  td > a.badge:only-child { min-height: var(--cible); }
  /* cases et boutons radio avec leur texte : l'etiquette entiere est la cible */
  main label:has(> input[type="checkbox"]), main label:has(> input[type="radio"]) { min-height: var(--cible); display: inline-flex; align-items: center; gap: 8px; }
}

/* Lot V2-09 DS2 : texte lu >= 14 px dans les ecrans de liste dont la feuille (obtp-editeur.css, lot EDIT, non modifiee ici)
   ecrit encore 12-13 px. Le prefixe `main` donne la priorite quel que soit l'ordre de chargement des feuilles. */
main table[data-tableau="devis"] td[data-col="client"] > small,
main .modele-carte p, main .kanban-carte .kc-haut, main .kanban-carte .kc-client, main .kanban-tout,
main table.liste-relances td[data-col="suivi"] small, main table.liste-factures td[data-col="client"] small { font-size: var(--t-sm); }
.onglet .compteur, .filtre .compteur { font-size: var(--t-sm); }
/* Lot V2-09 DS2 : liens empiles d'une cellule (emails, telephones : plusieurs liens dans .cellule-liste), liens-badges,
   elements des listes laterales, exposants (appel de note) : 24 px au moins, 44 px au toucher, texte >= 14 px. */
td .cellule-liste > a { display: flex; align-items: center; min-height: 24px; }
a.badge { display: inline-flex; align-items: center; min-height: 24px; }
sup { font-size: max(var(--t-sm), .75em); }
@media (max-width: 768px), (pointer: coarse) {
  td .cellule-liste > a, a.badge { min-height: var(--cible); }
  .suivi-liste a, .pastilles a { min-height: var(--cible); display: flex; align-items: center; justify-content: center; }
  .suivi-liste a { justify-content: space-between; }
}

/* Lot V2-12 MOB (vague 3) : parcours complet au telephone (WebKit 390, Android 360) et aux tailles de l'iPhone Duo
   (466 x 678 plie, 669 x 951 et 951 x 669 ouvert), SP/v2/mob/RAPPORT.md § 7. Regles en fin de feuille pour passer
   apres les regles de base (meme specificite) ; prefixe `body` / `main` la ou une feuille de module charge plus tard. */
@media (max-width: 768px) {
  /* Liste des relances en cartes : « 1 relance envoyee » etait coupe au bord de la carte (360 et 390 px) a cote du
     badge « Relancee le ... » ; la cellule passe a la ligne, le compteur reste entier. */
  main table.liste-relances td[data-col="suivi"] { flex-wrap: wrap; justify-content: flex-end; row-gap: 4px; }
  main table.liste-relances td[data-col="suivi"] small { white-space: nowrap; }
  /* Barre d'onglets du bas : libelles a 14 px (au lieu de 12), sur deux lignes au plus ; barre de 64 px pour que la
     deuxieme ligne (« Suivi du temps ») ne soit plus coupee sous l'icone (56 px : 2 x 13 px + icone 22 + marges). */
  body.mode-app { --onglets-h: 64px; }
  .onglets-mobile a, .onglets-mobile button { font-size: var(--t-sm); letter-spacing: 0; gap: 1px; padding: 3px 1px; }
}
/* tres petit ecran (320 px, hors des tailles du contrat) : « Recherche » ne tient pas dans ses 64 px a 13 ou 14 px ;
   les libelles gardent la taille d'avant (12 px, exception DS1 des barres d'onglets) */
@media (max-width: 340px) {
  .onglets-mobile a, .onglets-mobile button { font-size: var(--t-xs); }
}
/* Lien « Telecharger a nouveau : <fichier> (<taille>) » d'un export (obtp-exports.client.js, bouton .btn sur une ligne) :
   passe a la ligne au lieu de deborder de 62 px a 360 px */
a.btn[data-export-fichier] { white-space: normal; max-width: 100%; overflow-wrap: anywhere; text-align: center; }
/* Documents lies d'une fiche (numero DEV-/FAC-) : le numero n'est plus coupe sur 3 lignes dans une colonne de 42 px
   (360 et 466 px) ; le tableau defile dans son cadre (.table-wrap) */
table.docs-lies .num-doc { white-space: nowrap; }
/* Barre du haut fixe (application) ou collante (editeur, parametres) : un element atteint par Tab ou par une ancre ne
   passe plus dessous (releve d'ATT / EXPORT a 951 px) ; au telephone, ni sous la barre d'onglets du bas. */
/* :where() : specificite nulle, les reglages propres d'un module (ATT : html:has(.att-pied)) restent prioritaires */
:where(html:has(> body.mode-app), html:has(> body.mode-editeur)) { scroll-padding-top: calc(var(--barre-h) + env(safe-area-inset-top) + var(--e4)); }
@media (max-width: 768px) {
  :where(html:has(> body.mode-editeur)) { scroll-padding-top: calc(2 * var(--barre-h) + env(safe-area-inset-top) + var(--e4)); }
  :where(html:has(> body.mode-app)) { scroll-padding-bottom: calc(var(--onglets-h) + env(safe-area-inset-bottom) + var(--e4)); }
}
/* Pastille du nombre de notifications : 14 px (chiffre lu) dans sa bulle de 20 px */
.notifications .compteur { font-size: var(--t-sm); }
/* Fiche (panneau) d'un devis ou d'une facture : texte lu a 14 px la ou obtp-editeur.css (lot EDIT, non modifiee) ecrit
   13 px, comme le bloc DS2 ci-dessus pour les listes. */
body .fiche-resume .client-adresse, body .fiche-resume .dates, body .fiche-resume .text-muted, body .fiche-conditions,
body .fiche-avancement, body .mentions-manquantes { font-size: var(--t-sm); }
/* Tableaux de bureau sur un ecran moyen (951 px : Duo ouvert en paysage, menu lateral affiche) : une adresse email
   n'est plus coupee lettre par lettre dans une colonne de 42 px ; le tableau defile dans son cadre (.table-wrap). */
@media (min-width: 769px) {
  table.liste td[data-col="emails"], table td.cellule-email { min-width: 13em; }
  table.liste td[data-col="telephones"] .cellule-liste > a { white-space: nowrap; }
}
@media (max-width: 768px), (pointer: coarse) {
  /* liens seuls d'une fiche (email, telephone, client), d'un bloc « A faire », d'une liste de controles, d'un
     en-tete de planning, d'une cellule (utilisateurs, demandes) : 44 px au doigt */
  body .dl dd > a:only-child, body .af-suite > a:only-child, body a.af-item-titre, body .parametres-controles li > a,
  body th .res a, body td.cellule-email > a, body .bv-contact > a, body .bv-2l > a.bv-nom, body a.lien-plus,
  body .compte-liens a {
    display: inline-flex; align-items: center; min-height: var(--cible);
  }
  body .bv-contact > a, body .bv-2l > a.bv-nom { display: flex; }
  /* sommaires de blocs repliables (« Detail des roles », « Nouveau client », « Plus ») et menus d'etat */
  body details > summary:not(.btn) { min-height: var(--cible); align-content: center; }
  /* case du composant champ() (etiquette de 42 px), nom d'un employe a cote de son avatar */
  body .form-case label { min-height: var(--cible); }
  body .emp-cell > a { display: inline-flex; align-items: center; min-height: var(--cible); }

  body details.plus > summary, body details.bon-nouveau-client > summary, body summary.statut-ouvreur { min-height: var(--cible); }
  body summary.btn, body .fiche-badge .menu-deroulant > summary { min-height: var(--cible); }
  body .mdp-voir { min-height: var(--cible); }
  body .tri-lien { min-width: var(--cible); min-height: var(--cible); }
  body .chips-saisie { min-height: var(--cible); }
  /* pastilles de couleur (employe) : l'etiquette ronde est la cible */
  body .choix-couleur label { display: inline-flex; align-items: center; justify-content: center; min-width: var(--cible); min-height: var(--cible); }
  /* champ de code a copier (formulaire de demande a integrer) : 16 px, pas de zoom de Safari iOS */
  body textarea.parametres-code { font-size: 16px; }
}
/* lignes cliquables d'un tableau de bureau sur ecran tactile (43 px a 951 px) ; jamais en dessous de 769 px, ou les
   lignes deviennent des cartes */
@media (pointer: coarse) and (min-width: 769px) {
  body table tr[tabindex] > td { height: var(--cible); }
}
/* Fin du bloc Lot V2-12 MOB */

/* Lot RESTE-VERIFUX (24/10) : inscription, robustesse du mot de passe (texte « faible / moyen / fort » toujours ecrit ;
   la jauge n'est qu'un renfort visuel) et etat de la confirmation ; pied « rankflux.fr · En partenariat avec OBTP.fr » */
.mdp-force { margin: 0 0 var(--e3); }
.mdp-force-jauge { display: block; height: 6px; border-radius: 3px; background: var(--bordure); overflow: hidden; }
.mdp-force-jauge > span { display: block; height: 100%; width: 0; background: var(--erreur); }
.mdp-force[data-niveau="faible"] .mdp-force-jauge > span { width: 33%; background: var(--erreur); }
.mdp-force[data-niveau="moyen"] .mdp-force-jauge > span { width: 66%; background: var(--alerte); }
.mdp-force[data-niveau="fort"] .mdp-force-jauge > span { width: 100%; background: var(--succes); }
.mdp-force .form-aide { margin-top: 4px; }
.mdp-confirmation-etat:empty { display: none; }
.mdp-confirmation-etat[data-etat="different"] { color: var(--erreur-texte); }
.pied-marque { color: var(--texte-tertiaire); font-size: var(--t-sm); }
.sidebar-pied .pied-marque { color: var(--menu-texte-4); }
.compte-pied .pied-marque { color: inherit; }
/* Fin du bloc Lot RESTE-VERIFUX (24/10) */

/* Lot TIRAGE (24/10) : connexion, inscription et mot de passe oublie (body.compte-tirage, pageCompteTirage de
   src/views/login.js) dans la direction « Tirage » validee par l'editeur : toute la page sur la nuit du plan (degrade et
   trame), carte du formulaire en verre sombre. Dans la carte, jetons locaux (memes composants) : textes clairs, champs
   sombres a bord --tirage-trait (9,9:1), liens --tirage-sur-bleu-2, bouton principal vert en degrade (texte
   --sur-accent). Les messages (succes, erreur, information) gardent leurs fonds clairs. Mouvement : entree de la carte une
   seule fois, seulement sous prefers-reduced-motion: no-preference. Les autres pages de compte ne changent pas. */
body.page-compte.compte-tirage {
  background-color: var(--tirage-nuit);
  background-image:
    radial-gradient(900px 700px at 78% 30%, color-mix(in srgb, var(--primaire) 45%, transparent), transparent 70%),
    radial-gradient(600px 500px at 0% 90%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 70%),
    linear-gradient(180deg, var(--tirage-abysse) 0%, var(--tirage-nuit) 30%, var(--tirage-cobalt) 75%, var(--tirage-marine) 100%);
  background-attachment: scroll; color: var(--sombre-texte);
}
.compte-tirage .compte-scene { position: relative; isolation: isolate; }
.compte-tirage .compte-scene::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(color-mix(in srgb, var(--tirage-trait) 11%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in srgb, var(--tirage-trait) 11%, transparent) 1px, transparent 1px),
    linear-gradient(color-mix(in srgb, var(--tirage-trait) 5%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in srgb, var(--tirage-trait) 5%, transparent) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px; }
.compte-tirage .compte-panneau { background: transparent; }
.compte-tirage .compte-panneau::before { display: none; }
.compte-tirage .compte-accroche { font-size: clamp(26px, 2vw + 12px, 44px); line-height: 1.05; letter-spacing: -.03em; color: var(--sur-primaire); }
.compte-tirage .compte-accroche-2 { color: var(--tirage-sur-bleu-2); }
.compte-tirage .cote li { color: var(--tirage-sur-bleu-2); }
.compte-tirage .cote::before { background: linear-gradient(90deg, var(--tirage-trait), var(--accent)); }
.compte-tirage .carte-compte {
  --texte: var(--sombre-texte); --texte-2: var(--tirage-sur-bleu-2); --texte-3: var(--tirage-sur-bleu-2);
  --texte-secondaire: var(--tirage-sur-bleu-2); --texte-tertiaire: var(--tirage-sur-bleu-2);
  --carte: color-mix(in srgb, var(--tirage-abysse) 55%, transparent); --surface: var(--carte);
  --fond: color-mix(in srgb, var(--tirage-trait) 10%, transparent);
  --bordure: color-mix(in srgb, var(--tirage-trait) 26%, transparent); --bordure-forte: var(--tirage-trait); --bordure-champ: var(--tirage-trait);
  --primaire-texte: var(--tirage-sur-bleu-2); --primaire-clair: color-mix(in srgb, var(--tirage-trait) 18%, transparent);
  --lien: var(--tirage-sur-bleu-2); --focus-anneau: var(--encre-bleu); --primaire: var(--encre-bleu);
  position: relative; color: var(--texte); border: 0; border-radius: var(--rayon-lg);
  background-color: var(--tirage-nuit); background-image: linear-gradient(155deg, var(--tirage-cobalt) 0%, var(--tirage-nuit) 100%);
  box-shadow: 0 1px 0 color-mix(in srgb, var(--sur-primaire) 12%, transparent) inset, 0 40px 80px -40px var(--tirage-abysse);
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .compte-tirage .carte-compte { background-color: color-mix(in srgb, var(--tirage-abysse) 50%, transparent); background-image: linear-gradient(155deg, color-mix(in srgb, var(--tirage-cobalt) 55%, transparent) 0%, color-mix(in srgb, var(--tirage-abysse) 40%, transparent) 100%);
    -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%); }
}
.compte-tirage .carte-compte::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; pointer-events: none;
  background: linear-gradient(135deg, color-mix(in srgb, var(--tirage-trait) 85%, transparent) 0%, color-mix(in srgb, var(--tirage-trait) 15%, transparent) 40%, color-mix(in srgb, var(--accent) 60%, transparent) 75%, color-mix(in srgb, var(--tirage-trait) 50%, transparent) 100%);
  -webkit-mask: linear-gradient(rgb(0 0 0) 0 0) content-box, linear-gradient(rgb(0 0 0) 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.compte-tirage .carte-compte :focus-visible { outline-color: var(--encre-bleu); }
.compte-tirage .carte-compte a:not(.btn) { color: var(--tirage-sur-bleu-2); }
.compte-tirage .carte-compte a:not(.btn):hover { color: var(--sur-primaire); }
.compte-tirage .carte-compte .form-control { background: color-mix(in srgb, var(--tirage-abysse) 60%, transparent); color: var(--sombre-texte); caret-color: var(--encre-bleu); }
.compte-tirage .carte-compte .form-control:disabled { background: color-mix(in srgb, var(--tirage-trait) 8%, transparent); color: var(--tirage-sur-bleu-2); }
.compte-tirage .carte-compte .form-case input[type="checkbox"] { accent-color: var(--accent); }
.compte-tirage .carte-compte .btn-primary { background-color: var(--accent); background-image: linear-gradient(135deg, var(--accent-vif) 0%, var(--accent) 60%, var(--accent-profond) 100%); color: var(--sur-accent); border-color: transparent;
  box-shadow: 0 1px 0 color-mix(in srgb, var(--sur-primaire) 40%, transparent) inset, 0 6px 14px -10px color-mix(in srgb, var(--accent) 70%, transparent); }
.compte-tirage .carte-compte .btn-primary:hover { background-color: var(--accent-profond); background-image: linear-gradient(135deg, var(--accent) 0%, var(--accent-profond) 100%); }
.compte-tirage .carte-compte .btn-primary:disabled { opacity: .7; }
.compte-tirage .carte-compte .btn-outline { color: var(--sombre-texte); }
/* textes d'erreur hors encadre et asterisques : rose clair (--erreur-fond) sur la nuit, plus lisible que le rouge */
.compte-tirage .carte-compte .form-message-erreur, .compte-tirage .carte-compte .requis, .compte-tirage .carte-compte .mdp-confirmation-etat[data-etat="different"] { color: var(--erreur-fond); }
.compte-tirage .compte-pied { border-top: 1px solid var(--bordure); padding-top: var(--e4); }
@media (max-width: 899px) {
  .compte-tirage .compte-panneau { padding-bottom: var(--e2); }
}
/* Lot INSCRIPTION-STICKY (26/10) : a deux colonnes (>= 900 px), le panneau de gauche reste visible pendant le defilement du
   formulaire (inscription, connexion, mot de passe oublie). Avant : panneau etire sur toute la hauteur de la grille, sans
   position fixe (align-self: stretch par defaut, overflow: hidden). Au-dela de 100vh de contenu : defilement interne. */
@media (min-width: 900px) {
  .compte-tirage .compte-panneau { position: sticky; top: 0; align-self: start; height: 100vh; max-height: 100vh; overflow-y: auto; /* avant : overflow: hidden */ }
}
/* Fin Lot INSCRIPTION-STICKY (26/10) */
@media (prefers-reduced-motion: no-preference) {
  @keyframes tirage-carte { from { opacity: 0; transform: translate3d(0, 18px, 0); } to { opacity: 1; transform: none; } }
  .compte-tirage .carte-compte { animation: tirage-carte .8s cubic-bezier(.16, 1, .3, 1) .1s both; }
  .compte-tirage .compte-panneau-corps { animation: tirage-carte .8s cubic-bezier(.16, 1, .3, 1) both; }
}
/* Fin du bloc Lot TIRAGE (24/10) */

/* Lot CORR-FIN (24/10) : titre de la cloche lisible (il heritait de la couleur du bandeau sombre : 1,08:1) */
.notifications-panneau, .notifications-entete { color: var(--texte); }
/* Fin du bloc Lot CORR-FIN (24/10) */

/* Lot FINITIONS-UI (26/10) : menu mobile de l'application (consigne 81). Le tiroir s'ouvre SOUS la barre du haut : le bouton
 * du menu reste visible et cliquable (il referme le menu) ; avant, le tiroir (top: 0, z-index 120) et le voile (z-index 115)
 * recouvraient la barre (z-index 110) et le bouton. Page derriere immobile (overflow: hidden ; iOS : touchmove annule par
 * obtp-ui.js), le menu defile seul (overscroll-behavior: contain). Tiroir ferme : visibility hidden apres l'animation, ses
 * liens ne recoivent plus le focus hors de l'ecran. */
@media (max-width: 768px) {
  html:has(> body.menu-ouvert) { overflow: hidden; }
  body.menu-ouvert .barre-haut { z-index: 125; }
  .sidebar { top: calc(var(--barre-h) + env(safe-area-inset-top)); padding-top: 0; overscroll-behavior: contain; visibility: hidden; transition: transform .2s ease, visibility 0s linear .2s; } /* avant : top: 0; padding-top: env(safe-area-inset-top) */
  .sidebar.ouvert { visibility: visible; transition: transform .2s ease; }
  .sidebar-nav { overscroll-behavior: contain; }
  .mode-app .sidebar-marque { display: none; } /* le logo est deja dans la barre du haut, juste au-dessus */
}
/* Fin du bloc Lot FINITIONS-UI (26/10) */

/* ---------------------------------------------------------------------------------------------- Lot CORR-VERIF (27/10)
   Verification generale (axe, cibles, polices). Le prefixe `main` donne la priorite quel que soit l'ordre de chargement
   des feuilles ; obtp-editeur.css (lot EDIT) n'est pas modifiee pour ces tailles. */
/* Vue Tableau (kanban) des devis : texte >= 14 px ; « Aucun devis » et le compteur sur le fond gris des colonnes (#edeef0) en
   --texte-3 (#5f6675, 4,96:1) au lieu de --texte-2 (#69707f, 4,28:1) ; objet et dates sur la carte blanche gardent --texte-2 (4,97:1). */
main .kanban-vide, main .kanban-entete .compteur { font-size: var(--t-sm); color: var(--texte-3); }
main .kanban-carte .kc-objet, main .kanban-carte .kc-bas { font-size: var(--t-sm); }
/* Liste des devis (769 px et plus), modale « Nouveau devis », badge de mise en page : 14 px */
main table[data-tableau="devis"] th, main table[data-tableau="devis"] th .tri-lien, main table[data-tableau="devis"] th .visuellement-cache { font-size: var(--t-sm); }
main .modeles-liste .modele-detail, main .mep-doc-badge { font-size: var(--t-sm); }
.form-modele { margin: 0; display: inline-block; } /* « Utiliser ce modele » : formulaire POST (plus un lien GET) */
/* Apercu du devis ou de la facture : le cadre qui recoit le focus clavier porte un anneau visible (classe posee par obtp-editeur.client.js) */
.apercu-document iframe.cadre-actif, .apercu-document iframe:focus-visible { outline: 3px solid var(--primaire); outline-offset: -3px; }
/* /admin/exports a 951 px : les deux dates passent l'une sous l'autre quand le formulaire est etroit (plus de debordement de 42 px) */
.export-console .form-row { grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); }
/* ---------------------------------------------------------------------------------------------- fin Lot CORR-VERIF (27/10) */
/* ---------------------------------------------------------------------------------------------- Lot GET-ECRITURES (27/10) */
/* Action qui modifie des donnees : formulaire POST a un bouton, meme place et meme apparence que l'ancien lien */
.form-action { margin: 0; display: inline-block; }
.form-action.a-droite { margin-left: auto; }
/* Suppression placee dans une rangee dont le premier bouton enregistre : declaree apres lui dans le DOM, affichee avant */
.form-actions > .ordre-debut { order: -1; }
/* Lien d'action en bouton (ex. « Supprimer » d'une ligne de tableau) : meme apparence que le lien, cible 24 px (44 px sur mobile) */
.lien-action { background: none; border: 0; padding: 0; color: var(--lien); font: inherit; text-decoration: underline; cursor: pointer; min-height: 24px; display: inline-flex; align-items: center; }
@media (max-width: 768px), (pointer: coarse) { .lien-action { min-height: var(--cible); } }
/* ---------------------------------------------------------------------------------------------- fin Lot GET-ECRITURES (27/10) */

/* Lot EXPORTS (28/10) : bouton « Exporter en CSV » des listes et bloc « Export des heures » du pointage */
.btn-export-csv { white-space: nowrap; }
.export-heures { padding: var(--e4); margin-bottom: var(--e4); }
.export-heures h3 { margin: 0 0 var(--e2); }
.export-heures-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--e3); margin: var(--e3) 0; }
.export-heures-form .form-group { margin: 0; min-width: 160px; }
.export-heures-case { display: inline-flex; align-items: center; gap: var(--e2); min-height: var(--cible); cursor: pointer; }
.export-heures-case input { width: var(--case); height: var(--case); flex: 0 0 auto; }

/* Lot PETITS-BATUP (29/10) : menu deroulant cale dans l'ecran par obtp-ui.client.js (classe .menu-borne, posee
   seulement quand le menu sortirait a gauche) : largeur bornee a l'ecran, libelles longs a la ligne. */
.menu-borne > .menu { width: max-content; max-width: calc(100vw - 16px); }
.menu-borne > .menu .menu-item { white-space: normal; }
/* Lot PETITS-BATUP (29/10) : liens « Itineraire » et « Ouvrir dans Waze » sous l'adresse (fiches client et chantier) :
   44 px au doigt, chacun sur sa ligne. */
@media (max-width: 768px), (pointer: coarse) {
  a.lien-adresse { display: inline-flex; align-items: center; gap: 4px; min-height: var(--cible); }
}
/* Fin Lot PETITS-BATUP */
/* Lot ACCESSIBILITE-IMPRESSION (30/10, constat D7 de l'audit final) : sur ordinateur, liens seuls de moins de 24 px de haut
   (WCAG 2.5.8) : email et telephone d'une fiche client (21 px), « + Nouveau client » du devis express (21 px), « modifier »
   des modes de reglement d'une facture (21 px), numero d'une facture en retard (/relances, listes : 18 px). Lien en ligne
   (email, telephone, numero) : marge interne verticale seulement, la ligne de texte ne bouge pas. Au doigt, les regles
   44 px existantes (plus haut et obtp-editeur.css) restent seules appliquees. */
@media (min-width: 769px) and (pointer: fine) {
  body .dl dd > a:only-child { padding-block: 2px; }
  body a.num-retard { padding-block: 3px; }
  body .express a.lien-plus { min-height: 24px; }
}
@media (min-width: 1025px) and (pointer: fine) {
  body label.case-mode > a { min-height: 24px; }
}
/* Fin Lot ACCESSIBILITE-IMPRESSION */
/* Lot MENU-OUTILS (30/10/2026, consigne 195) : aucun panneau de menu deroulant ne sort de la fenetre. Sur ordinateur, le menu du
   compte (barre laterale fixe, en haut) mesure environ 600 px : avec le zoom du navigateur a 150 % (fenetre de 667 px de haut ou
   moins), son bas sortait de l'ecran, sans moyen de l'atteindre. Il garde sa taille quand elle tient et defile en lui-meme
   sinon (aucune entree retiree). Telephone (max-width: 768px) : inchange (menu dans le tiroir, position static). */
@media (min-width: 769px) {
  .compte .menu { max-height: calc(100vh - var(--barre-h) - 76px); overflow-y: auto; overscroll-behavior: contain; }
}
/* Fin Lot MENU-OUTILS */
/* Lot UI-BARRE-BAS (31/10/2026, consigne 216 point 5 et reserve 2 du GO-1 de MENU-OUTILS) */
/* Barre d'onglets du bas (telephone) : au moins 8 px entre le texte de chaque onglet et le bord de l'ecran, zones sures
   comprises. Avant : « Recherche » a 3,3 px du bord droit a 390 px (WebKit iPhone) et coupe a 360 px (texte de 71 px dans
   72 px) ; « Suivi du temps » (deux lignes) a 3,3 px du bas. Ce qui change :
   - colonnes au moins aussi larges que leur libelle (minmax(min-content, 1fr)), le reste partage a parts egales ;
   - la barre s'arrete aux zones sures gauche et droite (encoche en paysage) ; le premier et le dernier onglet gardent
     12 px de marge interieure cote bord (la cible va toujours jusqu'au bord de la zone sure) ;
   - icones alignees en haut (6 px), libelles dessous : barre de 72 px (au lieu de 64) pour que la 2e ligne d'un libelle
     reste a 8 px du bas ; la pastille de l'onglet actif ne change plus la hauteur de l'onglet. */
@media (max-width: 768px) {
  body.mode-app { --onglets-h: 72px; }
  .onglets-mobile { grid-auto-columns: minmax(min-content, 1fr); padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); }
  .onglets-mobile > a, .onglets-mobile > button { justify-content: flex-start; padding-top: 6px; }
  /* Reprise 1 : 12 px (au lieu de 8) pour garder 4 px de reserve au-dessus du minimum de 8 px (zoom du texte de Safari) */
  .onglets-mobile > :first-child { padding-left: 12px; }
  .onglets-mobile > :last-child { padding-right: 12px; }
  .onglets-mobile a.actif svg { margin-block: -3px; }
}
/* Menu « Creer » de l'application : avec le zoom du navigateur a 125 ou 150 % ou une fenetre basse (600-650 px de haut
   utile), ses 13 entrees (environ 535 px) sortaient du bas de la fenetre, les dernieres inatteignables. Il garde sa
   taille quand elle tient et defile en lui-meme sinon (aucune entree retiree), comme le menu du compte (lot MENU-OUTILS).
   Telephone : sous la barre du haut et au-dessus de la barre d'onglets du bas. 100dvh quand le navigateur le connait. */
.creer .menu { max-height: calc(100vh - var(--barre-h) - 16px); max-height: calc(100dvh - var(--barre-h) - 16px); overflow-y: auto; overscroll-behavior: contain; }
@media (max-width: 768px) {
  .creer .menu {
    max-height: calc(100vh - var(--barre-h) - env(safe-area-inset-top, 0px) - var(--onglets-h) - env(safe-area-inset-bottom, 0px) - 16px);
    max-height: calc(100dvh - var(--barre-h) - env(safe-area-inset-top, 0px) - var(--onglets-h) - env(safe-area-inset-bottom, 0px) - 16px);
  }
}
/* Fin Lot UI-BARRE-BAS */
/* Lot NAV-VERRE (03/11/2026, C288) */
/* Barre d'onglets du bas (telephone, site et application) : barre « verre » flottante. Bureau inchange : tout est sous
   max-width: 768px, seuls les jetons --verre-* sont poses plus largement (ils ne servent qu'ici).
   Contraste : le pire fond possible sous un verre clair est le noir, sous un verre sombre le blanc (le flou et la
   saturation restent bornes a 0-255 par canal). Calcul pour un opaque a 66 % sur noir : gris 168 -> texte --texte 8,3:1 ;
   a 72 % sur blanc : gris 84 -> --sombre-texte 7,0:1. Mesure sur pixels : nav-verre/outils/test_verre.py.
   Sombre : selon le reglage du telephone, ou <html data-theme="dark"> ; data-theme="light" impose le clair. Second
   bloc :root du fichier : l'extraction par expression reguliere ne prend que le premier. */
:root {
  --verre-fond: rgba(255, 255, 255, .66);
  --verre-fond-repli: rgba(255, 255, 255, .96);
  --verre-fond-plein: #ffffff;
  --verre-bordure: rgba(255, 255, 255, .7);
  --verre-ombre: 0 1px 3px rgba(10, 11, 13, .1), 0 10px 30px rgba(10, 11, 13, .2);
  --verre-texte: #0a0b0d;
  --verre-survol: rgba(10, 11, 13, .08);
  --verre-actif-fond: #0047b3;
  --verre-actif-texte: #ffffff;
  --verre-focus: #0047b3;
}
:root[data-theme="dark"] {
  --verre-fond: rgba(13, 17, 23, .72);
  --verre-fond-repli: rgba(13, 17, 23, .96);
  --verre-fond-plein: #0d1117;
  --verre-bordure: rgba(255, 255, 255, .2);
  --verre-ombre: 0 1px 3px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .45);
  --verre-texte: #f0f6fc;
  --verre-survol: rgba(255, 255, 255, .12);
  --verre-actif-fond: #70a9ff;
  --verre-actif-texte: #0d1117;
  --verre-focus: #70a9ff;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --verre-fond: rgba(13, 17, 23, .72);
    --verre-fond-repli: rgba(13, 17, 23, .96);
    --verre-fond-plein: #0d1117;
    --verre-bordure: rgba(255, 255, 255, .2);
    --verre-ombre: 0 1px 3px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .45);
    --verre-texte: #f0f6fc;
    --verre-survol: rgba(255, 255, 255, .12);
    --verre-actif-fond: #70a9ff;
    --verre-actif-texte: #0d1117;
    --verre-focus: #70a9ff;
  }
}
@media (max-width: 768px) {
  /* --onglets-espace : hauteur totale reservee en bas d'ecran (barre, marge de 12 px, zone de geste). Pose aussi sur <html>
     pour scroll-padding, qui se lit sur <html> (--onglets-h de body.mode-app n'y arrive pas). */
  html:has(> :is(body.mode-app, body.page-pilotage, body.page-planning)) { --onglets-h: 72px; --onglets-espace: calc(var(--onglets-h) + 12px + env(safe-area-inset-bottom, 0px)); }
  :is(body.mode-app, body.page-pilotage, body.page-planning) { --onglets-h: 72px; --onglets-espace: calc(var(--onglets-h) + 12px + env(safe-area-inset-bottom, 0px)); }
  /* Pilotage et Planning (mode editeur ; Lot NAV-VERRE-2, C305, C309) portent la barre : ce sont des onglets de la barre, leur pastille doit s'y voir */
  .mode-editeur:is(.page-pilotage, .page-planning) .onglets-mobile { display: grid; }
  .onglets-mobile {
    left: calc(12px + env(safe-area-inset-left, 0px)); right: calc(12px + env(safe-area-inset-right, 0px)); bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    height: var(--onglets-h); padding: 4px;
    border: 1px solid var(--verre-bordure); border-radius: 28px; box-shadow: var(--verre-ombre);
    background: var(--verre-fond-repli); /* repli sans backdrop-filter : presque opaque, lisible */
  }
  @supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .onglets-mobile { background: var(--verre-fond); -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%); }
  }
  .onglets-mobile a, .onglets-mobile button { color: var(--verre-texte); border-radius: 23px; }
  .onglets-mobile > a, .onglets-mobile > button, .onglets-mobile > :first-child, .onglets-mobile > :last-child { justify-content: center; padding: 4px 2px; } /* 2 px : a 360 px « Suivi du » tient sur sa ligne (3 lignes coupees sinon) ; hauteur utile 54 px : icone 22 + 1 + deux lignes 30,8 */
  .onglets-mobile a:hover, .onglets-mobile button:hover, .onglets-mobile a:active, .onglets-mobile button:active { background: var(--verre-survol); }
  .onglets-mobile a:focus-visible, .onglets-mobile button:focus-visible { outline-color: var(--verre-focus); }
  /* Element actif : pastille pleine autour de l'icone et du libelle (l'ancienne pastille de l'icone seule s'efface) */
  .onglets-mobile a.actif, .onglets-mobile a[aria-current] { background: var(--verre-actif-fond); color: var(--verre-actif-texte); }
  .onglets-mobile a.actif svg { background: none; padding: 0; margin-block: 0; }
  .onglets-mobile a.actif:focus-visible, .onglets-mobile a[aria-current]:focus-visible { outline-color: var(--verre-actif-texte); }
  /* Le contenu ne passe jamais sous la barre : fin de page, elements collants, messages, menu « Creer » */
  :is(body.mode-app, body.page-pilotage, body.page-planning) .main { padding-bottom: calc(var(--onglets-espace) + var(--e5)); }
  :is(body.mode-app, body.page-pilotage, body.page-planning) :is(.barre-selection, .form-actions, .att-pied, .toasts) { bottom: calc(var(--onglets-espace) + 8px); }
  /* Lot NAV-VERRE-2 : dans une modale (au-dessus de la barre), les actions du formulaire restent collees au bas de la modale (Nouvelle tache) */
  body.page-planning dialog .form-actions { bottom: 0; }
  /* Bandeau de consentement : aujourd'hui jamais sur une page a barre (visiteur sans session) ; s'il y venait, au-dessus d'elle */
  :is(body.mode-app, body.page-pilotage, body.page-planning) .rfc { bottom: var(--onglets-espace); max-height: calc(100vh - var(--onglets-espace)); }
  :where(html:has(> :is(body.mode-app, body.page-pilotage, body.page-planning))) { scroll-padding-bottom: calc(var(--onglets-espace) + var(--e4)); }
  html:has(> body.mode-app):has(.att-pied) { scroll-padding-bottom: calc(var(--onglets-espace) + 128px); }
  :is(body.mode-app, body.page-pilotage, body.page-planning) .creer .menu {
    max-height: calc(100vh - var(--barre-h) - env(safe-area-inset-top, 0px) - var(--onglets-espace) - 16px);
    max-height: calc(100dvh - var(--barre-h) - env(safe-area-inset-top, 0px) - var(--onglets-espace) - 16px);
  }
}
/* Lot NAV-VERRE-2 : Planning en paysage sur telephone (640 x 360) : barre du haut collante de 155 px + barre du bas, il resterait 121 px de contenu. La barre du haut defile avec la page. */
@media (max-width: 768px) and (max-height: 480px) {
  .mode-editeur.page-planning .barre-haut { position: static; }
  html:has(> body.page-planning) { scroll-padding-top: var(--e4); }
}
/* Tres petit ecran ou texte agrandi (Safari a 125 % : 288 px CSS) : marges de 6 px pour que les 5 onglets tiennent */
@media (max-width: 340px) {
  .onglets-mobile { left: calc(6px + env(safe-area-inset-left, 0px)); right: calc(6px + env(safe-area-inset-right, 0px)); padding: 3px; }
  .onglets-mobile > a, .onglets-mobile > button, .onglets-mobile > :first-child, .onglets-mobile > :last-child { padding: 4px 1px; }
}
/* Clavier ouvert : la barre s'efface sans bouger la page (position fixe, hors du flux). Sans cela, selon le navigateur,
   elle reste derriere le clavier ou remonte au-dessus de lui. Ecran tactile seulement : un clavier physique ne cache rien. */
@media (max-width: 768px) and (pointer: coarse) {
  /* Lot NAV-VERRE-2 (03/11) : ni les champs d'un dialog (la modale recouvre deja la barre, et son bouton « Recherche » doit pouvoir reprendre le focus a la fermeture ; /recherche ouvre la palette au chargement), ni le clavier replie par le geste retour (html.clavier-replie, obtp-ui.client.js). Ancienne regle : :is(body.mode-app, body.page-pilotage):has(input:not([type="checkbox"], [type="radio"], [type="button"], [type="submit"], [type="reset"], [type="file"], [type="range"], [type="color"]):focus, textarea:focus, [contenteditable="true"]:focus) .onglets-mobile { visibility: hidden; } */
  html:not(.clavier-replie) > :is(body.mode-app, body.page-pilotage, body.page-planning):has(:is(input:not([type="checkbox"], [type="radio"], [type="button"], [type="submit"], [type="reset"], [type="file"], [type="range"], [type="color"]), textarea, [contenteditable="true"]):focus:not(dialog *)) .onglets-mobile { visibility: hidden; }
}
/* Reglages du telephone : transparence reduite ou contraste renforce, fond plein et plus de flou ; couleurs imposees,
   pastille marquee par un contour. Mouvement reduit : la barre n'a aucune animation ni transition. */
@media (max-width: 768px) and (prefers-reduced-transparency: reduce), (max-width: 768px) and (prefers-contrast: more) {
  .onglets-mobile { background: var(--verre-fond-plein); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (max-width: 768px) and (forced-colors: active) {
  .onglets-mobile { -webkit-backdrop-filter: none; backdrop-filter: none; border-color: CanvasText; }
  .onglets-mobile a.actif, .onglets-mobile a[aria-current] { outline: 2px solid Highlight; outline-offset: -3px; }
}
/* Fin Lot NAV-VERRE */
