/* ChauffApp : l'app habillée comme le site chauffapp.com (owner, 2026-11-27, rapport _design/app-like-site-report.pdf,
   direction A « Full match » : marine pour agir, or pour repérer, titres Archivo, puces du site, menu gris).
   Chargé APRÈS toutes les feuilles de style et AVANT les couleurs de l'abonné (brand_head_html) : les réglages
   Réglages › Design d'un abonné (couleur principale --gold, couleur du texte --text, police) gardent la main.
   Valeurs prises dans site/styles.css et le guide visuel (/fr/guide-visuel). Tout est sous html.dt (design par défaut). */

/* ---------- Couleurs du site (clair) ---------- */
html.dt[data-theme="light"], html.dt:not([data-theme]) {
  --text: #0f1f3d; --muted: #4a5672; --line: #e1e4ec; --gold: #c9a45c; --gold-soft: rgba(201, 164, 92, .14);
  --s-panel: #f4f5f8; --s-on: #ffffff; --s-gold-soft: #f6efe1; --gold-ink: #775a21;
  --live: #12703f; --live-soft: #e3f4ea; --late: #9c4318; --late-soft: #fbeee4;
  --display: "Archivo", "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
}
/* ---------- Couleurs du site (sombre) ---------- */
html.dt:not([data-theme="light"]) {
  --bg: #0b1424; --panel: #0b1424; --panel-2: #131e33; --line: #26324c; --text: #e8ecf4; --muted: #b3bccf;
  --gold: #c9a45c; --gold-soft: rgba(201, 164, 92, .18);
  --s-panel: #131e33; --s-on: #1d2a45; --s-gold-soft: #2b2415; --gold-ink: #dcbf85;
  --live: #4cc48a; --live-soft: #10301f; --late: #f2a273; --late-soft: #3b2215;
  --display: "Archivo", "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ---------- Titres : Archivo 800, la voix du site (police de l'abonné si choisie : --display, brand.php) ---------- */
html.dt :is(h1, h2) { font-family: var(--display); font-weight: 800; letter-spacing: -.02em; }
html.dt .set-layout details.sec > summary { font-family: var(--display); font-weight: 800; letter-spacing: -.02em; }
html.dt .set-layout details.sec > summary small { font-family: Manrope, system-ui, -apple-system, "Segoe UI", sans-serif; font-weight: 400; letter-spacing: 0; }

/* ---------- Boutons : marine pour agir (site : .btn), 14 px d'arrondi, gras ---------- */
html.dt .btn { border-radius: 14px; border-width: 1.5px; font-weight: 700; min-height: 48px; }
html.dt .btn.small { min-height: 40px; border-radius: 12px; font-size: 14px; padding: 6px 14px; }
html.dt .btn.primary, html.dt body .cbook .btn.primary { background: var(--text); border-color: var(--text); color: var(--bg); font-weight: 700; }
html.dt .btn.primary svg { stroke: currentColor; }
html.dt .btn.danger { border-color: color-mix(in srgb, var(--red) 45%, transparent); }
@media (hover: hover) {
  /* Survol comme le site : le marine devient blanc avec un contour marine (0,3 s, souris seulement) */
  html.dt .btn.primary:not(:disabled):hover, html.dt body .cbook .btn.primary:not(:disabled):hover { background: var(--bg); color: var(--text); border-color: var(--text); }
}

/* Bouton rond « + » : marine, carré arrondi comme les boutons du site */
html.dt .fab:not(.fab-archive) { background: var(--text); color: var(--bg); border: 1.5px solid var(--text); border-radius: 18px; }
@media (hover: hover) { html.dt .fab:not(.fab-archive):hover { background: var(--bg); color: var(--text); border-color: var(--text); } }

/* Filtres : le choix actif en marine (site : option choisie .opt) */
html.dt .chip-filter.on { background: var(--text); border-color: var(--text); color: var(--bg); }

/* Interrupteurs : marine quand ils sont actifs */
html.dt :is(.check input[type="checkbox"], .nav-opt input[type="radio"], input.sw):checked { background: var(--text); }
html.dt:not([data-theme="light"]) :is(.check input[type="checkbox"], .nav-opt input[type="radio"], input.sw):checked::before { background: var(--bg); }
html.dt .bk-rt input:checked + .bk-switch, html.dt .di-sw input:checked + i { background: var(--text); }

/* ---------- Étiquettes d'état : puces du site (fond doux, sans contour) ---------- */
html.dt .pill:not(.pill-link) { border-color: transparent; background: var(--s-panel); color: var(--muted); font-weight: 700; font-size: 11.5px; padding: 3px 9px; }
html.dt .pill.ok:not(.pill-link) { background: var(--live-soft); color: var(--live); }
html.dt .pill.gold:not(.pill-link) { background: var(--s-gold-soft); color: var(--gold-ink); }
html.dt .pill.late:not(.pill-link) { background: var(--late-soft); color: var(--late); }
html.dt .pill.bad:not(.pill-link) { background: var(--red-soft); color: var(--red); }

/* ---------- Barre du bas (téléphone) : onglet actif en encre avec un petit trait doré, plus de bloc doré ---------- */
html.dt .tabs.mode-tabs button.on, html.dt .tabs.mode-tabs button.tab-book.on { background: var(--bg); color: var(--text); border-top-color: var(--gold); }
html.dt .tabs.mode-tabs button.on svg { color: var(--text); }

/* ---------- Colonne de gauche (ordinateur) : gris du site, page en cours en blanc avec icône dorée ---------- */
@media (min-width: 1000px) {
  html.dt .tabs.mode-tabs { background: var(--s-panel); border-right-color: transparent; }
  html.dt .tabs.mode-tabs button { border-radius: 12px; font-weight: 600; }
  html.dt .tabs.mode-tabs button.on, html.dt .tabs.mode-tabs button.tab-book.on { background: var(--s-on); color: var(--text); box-shadow: 0 1px 2px rgba(15, 31, 61, .06); }
  html.dt .tabs.mode-tabs button.on svg { color: var(--gold); }
  /* Survol : carte blanche légère comme la page en cours, jamais dorée (pas dans le guide visuel, owner 2026-11-28).
     :not(.tab-signout) pour passer devant la règle dorée de design-thread.css. */
  html.dt .tabs.mode-tabs button:not(.on):not(.tab-signout):hover { background: color-mix(in srgb, var(--s-on) 60%, transparent); color: var(--text); }
  html.dt .tabs.mode-tabs button:not(.on):not(.tab-signout):hover svg { color: var(--text); stroke: currentColor; }
  html.dt .tabs.mode-tabs button.tab-signout:not(.on):hover { background: var(--red); color: #fff; }   /* Se déconnecter : survol rouge, icône et texte blancs (l'icône disparaissait sur le fond clair, owner 2026-11-28) */
  /* Colonne toujours bleu nuit, en thème clair comme en sombre (owner 2026-11-29, comme le back-office chauffapp.com/secure) :
     les couleurs du thème sombre sont redéfinies sur la colonne, tout ce qu'elle contient suit ; logo pour fond sombre (logoSrc(true), app.js). */
  html.dt .tabs.mode-tabs {
    color-scheme: dark;
    --bg: #0f1f3d; --panel: #0f1f3d; --panel-2: #1a2b4d; --line: #2a3a5c; --text: #ffffff; --muted: #b6bfd0;
    --s-panel: #0f1f3d; --s-on: #1f3260; --s-gold-soft: #2b2415; --gold-ink: #dcbf85; --gold-soft: rgba(201, 164, 92, .18);
    background: var(--s-panel); color: var(--text); border-right-color: transparent;
  }
  html.dt .tabs.mode-tabs button.on, html.dt .tabs.mode-tabs button.tab-book.on { box-shadow: none; }
  html.dt .tabs.mode-tabs button:not(.on):not(.tab-signout):hover { background: rgba(255, 255, 255, .08); }
}

/* ---------- Réglages : liste des rubriques comme le menu ---------- */
html.dt .set-nav button { border-radius: 12px; }
html.dt .set-nav button.on { background: var(--s-panel); color: var(--text); font-weight: 700; }
html.dt .set-nav button.on .set-ico, html.dt .set-nav button.on .set-wait { color: var(--gold); }

/* ---------- Bandeaux du haut : alerte en orange doux (site : orange = alerte), invitation en gris, dans la page ---------- */
html.dt .push-bar, html.dt .install-bar { margin: max(10px, env(safe-area-inset-top)) 16px 0; padding: 10px 10px 10px 16px; border-radius: 14px; }
html.dt .push-bar { background: var(--late-soft); color: var(--late); font-weight: 600; }
html.dt .push-bar .btn.small { background: var(--late); border-color: var(--late); color: #fff; }
html.dt .push-bar-x { color: var(--late); }
html.dt .push-bar.cli-bar, html.dt .install-bar { background: var(--s-panel); color: var(--text); font-weight: 600; }
html.dt .push-bar.cli-bar .btn.small, html.dt .install-bar .btn.small { background: var(--text); border-color: var(--text); color: var(--bg); border-radius: 12px; }
@media (hover: hover) {
  html.dt .push-bar .btn.small:hover { background: var(--bg); border-color: var(--late); color: var(--late); }
  html.dt .push-bar.cli-bar .btn.small:hover, html.dt .install-bar .btn.small:hover { background: var(--bg); border-color: var(--text); color: var(--text); }
}
@media (min-width: 1000px) {
  html.dt body:has(.tabs.mode-tabs) :is(.push-bar, .install-bar) { margin: 16px 24px 0 calc(var(--side-w) + 24px); max-width: calc(1500px - var(--side-w) - 48px); }   /* bord droit dans les 1500 px de l'écran, colonne de gauche comprise (owner, 2026-11-28) */
  html.dt[dir="rtl"] body:has(.tabs.mode-tabs) :is(.push-bar, .install-bar) { margin: 16px calc(var(--side-w) + 24px) 0 24px; }
}

/* ---------- Pages de connexion : pas de surtitre (interdit par le guide), titre Archivo, nom de la société en or ---------- */
html.dt .bl-kicker { display: none; }
html.dt .bl-intro h1 { margin-top: 0; letter-spacing: -.03em; line-height: 1.04; }
html.dt .bl-intro h1 em, html.dt .su4-welcome h1 em { font-style: normal; color: var(--gold); }
html.dt .bl-intro.has-photo h1 em { color: #e2c483; }

/* ---------- Création du compte de l'abonné (tenants.js, su4) : 16 px sur les côtés, comme le reste de l'app ---------- */
html.dt .su4 { padding-inline: 16px; }
html.dt .su4-welcome h1 { font-size: clamp(30px, 3.6vw, 44px); line-height: 1.04; letter-spacing: -.03em; margin-bottom: 12px; }
html.dt .su4-welcome > p { font-size: 18px; }
html.dt .su4-welcome ul { gap: 20px; }
html.dt .su4-welcome li { align-items: flex-start; gap: 16px; font-family: var(--display); font-weight: 800; font-size: 17px; letter-spacing: -.01em; }
html.dt .su4-welcome li svg { width: 44px; height: 44px; padding: 11px; border-radius: 50%; background: var(--s-gold-soft); stroke: var(--gold-ink); box-sizing: border-box; margin-top: 0; }
html.dt .su4-welcome li small { font-family: Manrope, system-ui, -apple-system, "Segoe UI", sans-serif; font-weight: 400; font-size: 14.5px; letter-spacing: 0; margin-top: 3px; }
html.dt .su4-link { color: var(--text); text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 1.5px; text-underline-offset: 4px; }

/* Icônes de la rubrique en cours (Réglages) et bouton de l'alerte en sombre */
html.dt .set-nav button.on .set-ico svg { stroke: var(--gold); }
html.dt:not([data-theme="light"]) .push-bar .btn.small { color: var(--bg); }

/* ---------- Réserver (admin, une seule page) : cartes blanches à filet, champs avec le nom dans le trait ---------- */
html.dt .ab-main .abe-blk { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; }
html.dt .ab-main #bkGo { background: transparent; color: var(--text); border-color: var(--line); }   /* « Calculer les prix » est facultatif : bouton contour */
@media (hover: hover) { html.dt .ab-main #bkGo:not(:disabled):hover { background: var(--text); color: var(--bg); border-color: var(--text); } }
html.dt .ab-main .bk-mark.to { background: var(--text); }   /* vert = « en direct » seulement (guide du site) */
html.dt :is(.ab-main, .bl-form) :is(label.f, .bk-field) { position: relative; margin-top: 20px; }
html.dt :is(.ab-main, .bl-form) :is(label.f, .bk-field) > span:first-child:not(:only-child) {
  position: absolute; top: -9px; left: 12px; z-index: 2; margin: 0; padding: 0 6px; max-width: calc(100% - 24px);
  background: var(--panel); font-size: 12px; font-weight: 700; line-height: 18px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
html.dt :is(.ab-main, .bl-form) :is(label.f > input:not([type="checkbox"]):not([type="radio"]), label.f > .sel-btn, .bk-field > .bk-field-in) {
  min-height: 50px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--panel); transition: border-color .3s;
}
html.dt :is(.ab-main, .bl-form) label.f > textarea { border: 1.5px solid var(--line); border-radius: 14px; }
html.dt :is(.ab-main, .bl-form) :is(label.f > input:focus, label.f > textarea:focus, label.f > .sel-btn[aria-expanded="true"], .bk-field > .bk-field-in:focus-visible) { border-color: var(--gold); outline: none; }
html.dt :is(.ab-main, .bl-form) label.f:focus-within > span:first-child { color: var(--gold-ink); }

/* ---------- Bulle de chat ronde : la même que sur chauffapp.com (owner, 2026-11-28) ----------
   58 px (54 px sur téléphone), or, icône bulle à deux lignes de 26 px, ombre du site. Remplace la bulle réduite à 48 px du 2026-11-23. */
.rc-fab-b { width: 58px; height: 58px; background: var(--gold); color: #fff; box-shadow: 0 14px 34px -10px rgba(15, 31, 61, .5); }
.rc-fab-b svg { width: 26px; height: 26px; stroke-width: 1.9; }
@media (max-width: 999px) { .rc-fab-b { width: 54px; height: 54px; } }

/* ---------- Espace comptable (finance.js) au guide visuel (owner, 2026-11-28 : « l'accounting dashboard n'a pas été mis à jour
   avec le visual guide ») : marine pour agir et pour l'état choisi, or seulement pour repérer (icônes, chiffre clé),
   blocs à filet fin arrondi au lieu des fonds gris, en-tête cadré identique ouvert ou fermé, contenu ouvert sans fond. ---------- */
html.dt .fn-page .seg button.on { background: var(--text); color: var(--bg); }
/* Onglets choisis dans toute l'app (owner, 2026-11-28, Utilisateurs › Inviter : « je ne comprends pas les couleurs ») :
   marine comme les options choisies du site (.opts span.on), jamais l'or plein qui ressemble au bouton « offre mise en avant ». */
html.dt .seg button.on { background: var(--text); color: var(--bg); }
/* Même règle pour tous les autres choix marqués d'un fond or plein (owner, 2026-11-28 : « Yes, all of them ») : onglets, filtres,
   jours et heures du calendrier, pourboires, paiement, puces de choix. L'or reste pour les repères : étapes, points, coches
   des cartes choisies, interrupteurs, pastilles d'état, et le vert de l'adresse par défaut (Adresses fréquentes). */
html.dt :is(.set-tabs button, .tview-b, .pct-cut button, .co-acts button, .tpm-seg button, .di-tabs button, .p2-unit button,
  .p2-days button, .p2-pchip, .bk-mode button, .bk-day, .bk-time, .bk-tips button, .t-date, .ctl-head .ctl-tools .t-date, .ctl-head .ctl-tb,
  .chip-filter, .day-pick, .fab-archive, .ab-pay, .abe .abe-pays .ab-pay, .uc-top .uc-pin, .dfb-chip, .dc-f, .dm-m,
  .mr-chip, .km-chip).on,
html.dt :is(.ufb-tile, .ufb-chip)[aria-checked="true"] { background: var(--text); border-color: var(--text); color: var(--bg); box-shadow: none; }
html.dt .day-pick.on b { color: inherit; }
html.dt .day-pick.on small, html.dt .dc-f.on span { color: inherit; opacity: .75; }
html.dt .fn-subnav { gap: 6px; margin-bottom: 16px; }
html.dt .fn-subnav a { padding: 8px 14px; border-radius: 12px; color: var(--muted); font-weight: 700; }
html.dt .fn-subnav a.on { background: var(--text); color: var(--bg); }
html.dt .fn-subnav a i { background: var(--s-gold-soft); color: var(--gold-ink); font-weight: 800; }
html.dt .fn-subnav a.on i { background: color-mix(in srgb, var(--bg) 22%, transparent); color: var(--bg); }
html.dt .fn-per b { font-family: var(--display); font-weight: 800; letter-spacing: -.01em; font-size: 17px; }
/* Chiffres de la période : Archivo, le chiffre clé (TVA nette) repéré en or foncé */
html.dt .fn-figs { border: 1px solid var(--line); border-radius: 16px; }
html.dt .fn-figs > div { padding: 16px 18px; }
html.dt .fn-figs > div + div { padding-inline-start: 18px; }
html.dt .fn-figs b { font-family: var(--display); font-weight: 800; letter-spacing: -.02em; font-size: 24px; }
html.dt .fn-figs b.g, html.dt .fn-calc .g, html.dt .fn-vl.tot b { color: var(--gold-ink); }
html.dt .fn-sync .fn-ic { color: var(--text); }
html.dt .fn-grp-h { font-family: var(--display); font-weight: 800; font-size: 16px; letter-spacing: -.01em; margin-bottom: 10px; }
html.dt .fn-h { font-size: 20px; margin: 32px 0 12px; }
/* Points à traiter : en-tête cadré (même filet ouvert ou fermé), détail posé sur la page */
html.dt .fn-item { margin-bottom: 8px; background: none; border: 0; }
html.dt .fn-item > .fn-row, html.dt .fn-row.fn-pack { border: 1px solid var(--line); border-radius: 14px; background: none; transition: border-color .3s; }
html.dt .fn-row.fn-pack { margin-bottom: 8px; }
html.dt .fn-det { padding: 16px 0 12px 58px; }
html.dt .fn-ri, html.dt .fn-item.open .fn-ri, html.dt .fn-docs-top .fn-ri { background: var(--s-gold-soft); color: var(--gold-ink); border-radius: 50%; }
html.dt .fn-row.done .fn-ri { background: var(--s-panel); color: var(--text); }
html.dt .fn-docs-top .fn-row { background: none; }
html.dt .fn-dlb .fn-ic { color: currentColor; }
html.dt .fn-page .btn:not(.primary):not(.danger):not(.fn-unplug) { color: var(--text); border-color: var(--line); background: none; }
html.dt .fn-grp { margin-bottom: 0; }
html.dt .fn-grp > :last-child { margin-bottom: 0; }
html.dt .fn-acc { margin-top: 8px; }
html.dt .fn-bar { background: color-mix(in srgb, var(--text) 22%, transparent); }
html.dt .fn-bar .fr { background: var(--gold); }
html.dt .fn-xx { color: var(--gold-ink); }
html.dt .fn-neg { color: var(--red); }
/* Listes : lignes à filet, plus de fond gris */
html.dt .fn-list { gap: 8px; }
html.dt .fn-li, html.dt .fn-acc-row { background: none; border: 1px solid var(--line); border-radius: 14px; padding: 13px 16px; }
html.dt .fn-li > .fn-ic { color: var(--muted); transition: color .3s; }
html.dt .fn-tbl th { color: var(--muted); font-weight: 700; border-bottom-color: var(--line); }
html.dt .fn-tbl td { border-bottom-color: var(--line); }
html.dt .fn-tot td { border-top: 1.5px solid var(--text); }
html.dt .fn-ck.on { background: var(--text); border-color: var(--text); color: var(--bg); }
html.dt .fn-vat { border: 1px solid var(--line); border-radius: 16px; padding: 0 18px; }
html.dt .fn-vl:last-child { border-bottom: 0; }
html.dt .fn-vl.tot { font-family: var(--display); font-weight: 800; }
html.dt .fn-vat-x { margin-top: 12px; }
/* Recherche globale : le champ du site (filet de 1,5 px, 14 px d'arrondi, or au focus) */
html.dt .fn-search { margin: 0 0 16px; max-width: 820px; }
html.dt .fn-sbox { display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 0 8px 0 16px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--panel); transition: border-color .3s; cursor: text; }
html.dt .fn-sbox:focus-within { border-color: var(--gold); }
html.dt .fn-sbox input { flex: 1; min-width: 0; border: 0; background: none; padding: 12px 0; font: inherit; font-size: 15px; color: var(--text); outline: none; box-shadow: none; }
html.dt .fn-sbox input::-webkit-search-cancel-button { display: none; }
html.dt .fn-sico { color: var(--muted); }
html.dt .fn-sx { width: 36px; height: 36px; border: 0; border-radius: 50%; background: none; color: var(--muted); display: grid; place-items: center; cursor: pointer; transition: background-color .3s, color .3s; }
html.dt .fn-res-h { margin: 4px 0 12px; color: var(--muted); }
html.dt .fn-res-h b { color: var(--text); }
html.dt .fn-yr { display: inline !important; color: var(--muted); }
/* Plateformes : une carte à filet par source, logo officiel dans un rond */
html.dt .fn-srcs { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
html.dt .fn-src { border: 1px solid var(--line); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
html.dt .fn-src-h { display: flex; align-items: center; gap: 12px; }
html.dt .fn-src-h .fn-rm { flex: 1; }
html.dt .fn-src-h .fn-rm b { font-family: var(--display); font-weight: 800; font-size: 17px; letter-spacing: -.01em; }
html.dt .fn-src-h .pill { flex: none; max-width: 48%; white-space: normal; text-align: end; }
html.dt .fn-logo { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; overflow: hidden; }
html.dt .fn-logo img { width: 26px; height: 26px; border-radius: 6px; }
html.dt .fn-logo-d { background: var(--s-panel); color: var(--text); border-color: transparent; }
html.dt .fn-rm-logo { flex-direction: row; align-items: center; gap: 12px; }
html.dt .fn-rm-logo .fn-logo { width: 36px; height: 36px; }
html.dt .fn-rm-logo > span:last-child { display: flex; flex-direction: column; min-width: 0; }
html.dt .fn-src-figs { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 12px; }
html.dt .fn-src-figs small { display: block; color: var(--muted); font-size: 12.5px; }
html.dt .fn-src-figs b { font-family: var(--display); font-weight: 800; font-size: 18px; letter-spacing: -.01em; font-variant-numeric: tabular-nums; white-space: nowrap; }
html.dt .fn-src .hint { margin: 0; }
html.dt .fn-src-a { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
html.dt .fn-src-a:empty { display: none; }
html.dt .fn-src-a .btn, html.dt .fn-acts .btn { display: inline-flex; align-items: center; gap: 8px; }
html.dt .fn-src-a .btn.busy .fn-ic { animation: fnSpin 1s linear infinite; }
@keyframes fnSpin { to { transform: rotate(360deg); } }
html.dt .fn-unplug { color: var(--red); border-color: color-mix(in srgb, var(--red) 45%, transparent); }
html.dt .fn-files { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
html.dt .fn-files li { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 12px; padding: 4px 4px 4px 12px; min-width: 0; }
html.dt .fn-files a { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; padding: 6px 0; }
html.dt .fn-files a > span { display: flex; flex-direction: column; min-width: 0; }
html.dt .fn-files b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html.dt .fn-files small { color: var(--muted); font-size: 12px; }
html.dt .fn-files .fn-ic { color: var(--gold-ink); }
html.dt .fn-fdel { width: 36px; height: 36px; flex: none; }
/* Zone de dépôt : action → rond marine (le guide garde l'or pour repérer) */
html.dt .fn-page .fn-drop, html.dt .fn-xdlg .fn-drop { margin: 0; background: none; border-color: var(--line); }
html.dt .fn-page .fn-drop .bk-drop-ico, html.dt .fn-xdlg .fn-drop .bk-drop-ico { background: var(--text); color: var(--bg); }
html.dt .fn-drop .bk-drop-ico .fn-ic { width: 20px; height: 20px; }
html.dt .fn-drop.on, html.dt .fn-drop.drag { border-color: var(--text); background: var(--s-panel); }
html.dt .fn-drop .bk-drop-txt { display: flex; flex-direction: column; min-width: 0; }
html.dt .fn-drop .bk-drop-txt b { overflow-wrap: anywhere; }
html.dt .fn-drop .bk-drop-txt small { color: var(--muted); }
/* Dépenses */
html.dt .fn-lead { margin: 0 0 14px; max-width: 70ch; }
html.dt .fn-acts-top { margin: 0 0 16px; }
html.dt .fn-see { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--text); text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 4px; }
html.dt .fn-see .fn-ic { width: 16px; height: 16px; }
html.dt .fn-xact { white-space: nowrap; }
html.dt .fn-xact .icon-btn { width: 34px; height: 34px; }
html.dt .fn-tbl .icon-btn svg, html.dt .fn-fdel svg { width: 17px; height: 17px; }
html.dt .fn-xdlg { max-width: 520px; }
html.dt .fn-xdlg h2 { margin: 0 0 4px; }
html.dt .fn-xdlg form { display: flex; flex-direction: column; gap: 20px; padding-top: 10px; }
html.dt .fn-xdlg .two { gap: 12px; }
html.dt .fn-xdlg .btns { display: flex; justify-content: flex-end; gap: 10px; margin: 0; }
/* Champs des formulaires de l'espace comptable : nom dans le trait, filet arrondi, or pendant la saisie (comme Réserver) */
html.dt :is(.fn-xdlg, .fn-sumup, .fn-inv) label.f { position: relative; margin: 0; display: block; }
html.dt .fn-sumup, html.dt .fn-inv { display: flex; flex-direction: column; gap: 20px; padding-top: 10px; }
html.dt .fn-inv .two { gap: 12px; }
html.dt :is(.fn-xdlg, .fn-sumup, .fn-inv) label.f > span:first-child { position: absolute; top: -9px; left: 12px; z-index: 2; margin: 0; padding: 0 6px; max-width: calc(100% - 24px);
  background: var(--panel); font-size: 12px; font-weight: 700; line-height: 18px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.dt :is(.fn-xdlg, .fn-sumup, .fn-inv) :is(label.f > input, label.f > .sel-btn) { width: 100%; min-height: 50px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--panel); transition: border-color .3s; box-sizing: border-box; }
html.dt :is(.fn-xdlg, .fn-sumup, .fn-inv) :is(label.f > input:focus, label.f > .sel-btn[aria-expanded="true"]) { border-color: var(--gold); outline: none; }
html.dt :is(.fn-xdlg, .fn-sumup, .fn-inv) label.f:focus-within > span:first-child { color: var(--gold-ink); }
html.dt .fn-sumup .btns, html.dt .fn-inv .btns { margin: 0; }
html.dt .fn-xdlg .mf-pick { position: relative; margin: 0; }
html.dt .fn-xdlg .mf-pick > span:first-child { position: absolute; top: -9px; left: 12px; z-index: 2; margin: 0; padding: 0 6px; background: var(--panel); font-size: 12px; font-weight: 700; line-height: 18px; color: var(--muted); }
html.dt .fn-xdlg .mf-pick .mfc-f { width: 100%; min-height: 50px; margin: 0; border: 1.5px solid var(--line); border-radius: 14px; background: var(--panel); transition: border-color .3s; }
/* Encaissements : impayés par ancienneté */
html.dt .fn-aging { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 16px; max-width: 820px; }
html.dt .fn-aging > div { padding: 14px 16px; min-width: 0; display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; }
html.dt .fn-aging > div + div { border-inline-start: 1px solid var(--line); }
html.dt .fn-aging small { grid-column: 1 / -1; color: var(--muted); font-size: 12.5px; }
html.dt .fn-aging b { font-family: var(--display); font-weight: 800; font-size: 19px; letter-spacing: -.01em; font-variant-numeric: tabular-nums; white-space: nowrap; }
html.dt .fn-aging span { align-self: center; font-size: 12px; font-weight: 800; padding: 1px 8px; border-radius: 99px; background: var(--s-panel); color: var(--muted); }
html.dt .fn-aging .late b { color: var(--late); } html.dt .fn-aging .late span { background: var(--late-soft); color: var(--late); }
html.dt .fn-aging .bad b { color: var(--red); } html.dt .fn-aging .bad span { background: var(--red-soft); color: var(--red); }
html.dt .fn-aging .zero b { color: var(--muted); }
/* Documents : tout le dossier d'un clic */
html.dt .fn-zip { display: flex; align-items: center; gap: 14px; width: 100%; max-width: 820px; min-height: 64px; padding: 12px 20px; justify-content: flex-start; text-align: start; margin-bottom: 10px; box-sizing: border-box; }
html.dt .fn-zip > span { display: flex; flex-direction: column; min-width: 0; }
html.dt .fn-zip small { font-weight: 500; opacity: .8; font-size: 13px; }
html.dt .fn-zip .fn-ic { width: 24px; height: 24px; }
html.dt .fn-dls .fn-li { padding-block: 11px; }
@media (hover: hover) {
  html.dt .fn-subnav a:not(.on):hover { background: var(--s-panel); color: var(--text); }
  html.dt .fn-item > .fn-row:hover, html.dt a.fn-li:hover, html.dt .fn-files li:hover { border-color: var(--text); background: none; }
  html.dt .fn-row:not(.sel):hover { background: none; }
  html.dt a.fn-li:hover > .fn-ic { color: var(--text); }
  html.dt .fn-sx:hover { background: var(--text); color: var(--bg); }
  html.dt .fn-page .fn-drop:hover, html.dt .fn-xdlg .fn-drop:hover { border-color: var(--text); }
  html.dt .fn-unplug:hover { background: var(--red); border-color: var(--red); color: #fff; }
  html.dt .fn-page .btn:not(.primary):not(.danger):not(.fn-unplug):not(:disabled):hover { background: var(--text); color: var(--bg); border-color: var(--text); }
  html.dt .fn-see:hover { text-decoration-color: var(--text); }
}
html.dt .fn-ms { display: none !important; }
@media (max-width: 999px) {
  html.dt .fn-ms { display: block !important; color: var(--text) !important; }
  html.dt .fn-per b { white-space: nowrap; }
  html.dt .fn-page .fn-mode { flex: 1 1 100%; margin: 4px 0 0; }
  html.dt .fn-page .fn-mode button { flex: 1; }
  html.dt .fn-figs > div { padding: 14px 14px; }
  html.dt .fn-figs > div:nth-child(odd) { padding-inline-start: 14px; }
  html.dt .fn-figs b { font-size: 19px; }
  html.dt .fn-det { padding: 14px 0 12px; }
  html.dt .fn-srcs { grid-template-columns: minmax(0, 1fr); }
  html.dt .fn-aging { grid-template-columns: 1fr 1fr; }
  html.dt .fn-aging > div:nth-child(3) { border-inline-start: 0; }
  html.dt .fn-aging > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  html.dt .fn-xdlg .two { grid-template-columns: 1fr 1fr; }
}

/* ---------- Guide visuel du site, suite (owner, 2026-11-28 : « this is gold theme, isn't on the visual guide of the website ») :
   « Marine pour agir, or pour repérer » et « jamais de texte or sur blanc ». Restes du design doré remplacés :
   bouton « Nouveau », « + » de la recherche, boutons Modifier / PDF / œil / message, bande du haut d'une course,
   carte choisie dans la liste (client et admin : carte partagée), pastilles d'initiales, liens « 9 transferts ». ---------- */
@media (min-width: 1000px) {   /* ordinateur seulement : sur téléphone le « + » de la barre du bas garde son style */
  html.dt .tabs.mode-tabs > button.tab-plus { background: var(--text) !important; color: var(--bg) !important; }
  html.dt .tabs.mode-tabs > button.tab-plus svg { color: var(--bg); }
}
@media (min-width: 1000px) and (hover: hover) {
  html.dt .tabs.mode-tabs > button.tab-plus:hover { background: var(--bg) !important; color: var(--text) !important; box-shadow: inset 0 0 0 1.5px var(--text); }
  html.dt .tabs.mode-tabs > button.tab-plus:hover svg { color: var(--text); }
}
html.dt .t-new { background: var(--text); border-color: var(--text); color: var(--bg); }
@media (hover: hover) { html.dt .t-new:hover { background: var(--bg); border-color: var(--text); color: var(--text); } }

/* Boutons contour : marine sur blanc (le site : .btn.ghost), jamais d'or */
html.dt .tp-edit, html.dt .tp-eye, html.dt .tp-ico.ct-btn { border-color: var(--line); color: var(--text); }
@media (hover: hover) { html.dt .tp-edit:hover, html.dt .tp-eye:hover, html.dt .tp-ico.ct-btn:hover { background: var(--text); border-color: var(--text); color: var(--bg); } }

/* Bande du haut d'une course : bande marine (le site : bandes sombres), point d'état en or */
html.dt .clh-strip { background: var(--text); color: var(--bg); }
html.dt .clh-strip i { background: var(--gold); }
html.dt .clh-strip .clh-copy { color: inherit; }

/* Carte choisie : fond gris du site et contour marine, plus de crème */
html.dt .tcard.ctl:not(.tk):not(.inv-pick).on .ctl-body { background: var(--s-panel); box-shadow: inset 0 0 0 1.5px var(--text); }

/* Pastilles d'initiales (sans photo) : or clair et texte or foncé, comme les puces du site */
html.dt .drv-ava:not(:has(img)) { background: var(--s-gold-soft); color: var(--gold-ink); }

/* « 9 transferts », « 9 réservations » : lien marine souligné, pas de texte or */
html.dt .tp-count { color: var(--text); text-decoration-color: var(--gold); }
html.dt .tp-ava.tp-cli-ava { color: var(--gold-ink); background: var(--s-gold-soft); }   /* grande pastille du client : texte or foncé sur or clair */

/* ---------- Barre des transferts : « boîte à outils » (owner, 2026-11-28, design 4 de design-lab/barre-transferts-5-designs.html) ----------
   Statut, tri et vue dans un seul bloc à contour de 40 px, séparés par un trait ; chacun montre son choix (« Statut Tous », « Plus récent
   d'abord »). Le lien WhatsApp : logo officiel seul, carré de 40 px à droite. Liste partagée client / admin. */
html .filters.t-tools { container-type: inline-size; display: flex; align-items: center; gap: 10px; flex-wrap: nowrap; max-width: none; overflow: visible; }
html .filters.t-tools > .t-grp { display: inline-flex; align-items: stretch; height: 40px; min-width: 0; max-width: 100%; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--bg); }
html .filters.t-tools > .t-grp > * { flex: none; margin: 0 !important; border: 0 !important; border-radius: 0 !important; border-inline-end: 1px solid var(--line) !important; box-shadow: none !important; height: auto !important; }
html .filters.t-tools > .t-grp > :last-child { border-inline-end: 0 !important; }
html .filters.t-tools .t-grp > button { display: inline-flex; align-items: center; gap: 6px; width: auto !important; padding: 0 10px !important; background: var(--bg) !important; color: var(--text) !important; font-weight: 700; font-size: 13px; line-height: 1; white-space: nowrap; min-width: 0; cursor: pointer; transition: background-color .3s, color .3s; }
html .filters.t-tools .t-grp > button svg { width: 17px; height: 17px; flex: none; stroke: currentColor; fill: none; }
html .filters.t-tools .t-grp > .tf-status { flex: none; }
html .filters.t-tools .t-grp > .t-sort { flex: 0 1 auto; }   /* manque de place : le texte du tri se raccourcit, le statut reste lisible */
html .filters.t-tools .t-grp > .tf-status span { color: var(--muted); font-weight: 600; font-size: 12px; }
html .filters.t-tools .t-grp > .tf-status b { font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
html .filters.t-tools .t-grp > .tf-status.on b { color: var(--text); }
html .filters.t-tools .t-grp > .tf-status.on::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); flex: none; }   /* statut choisi : point or */
html .filters.t-tools .t-grp > .t-sort .t-sort-l { font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
html .filters.t-tools .t-grp > .tview { padding: 0 !important; gap: 0; background: var(--bg) !important; }
html .filters.t-tools .t-grp .tview-b { height: 100%; padding: 0 11px !important; border-radius: 0 !important; background: var(--bg) !important; color: var(--muted) !important; }
html .filters.t-tools .t-grp .tview-b + .tview-b { border-inline-start: 1px solid var(--line) !important; }
html .filters.t-tools .t-grp .tview-b.on { background: var(--text) !important; color: var(--bg) !important; }
@media (hover: hover) {
  html .filters.t-tools .t-grp > button:hover, html .filters.t-tools .t-grp .tview-b:not(.on):hover { background: var(--text) !important; color: var(--bg) !important; }
  html .filters.t-tools .t-grp > button:hover span { color: inherit; }
}
/* Lien WhatsApp : logo officiel en couleurs, seul, dans un carré à contour ; au survol fond noir (règle WhatsApp) */
html .filters.t-tools > .wl-listbtn { flex: none; width: 40px; height: 40px; padding: 0; justify-content: center; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); }
html .filters.t-tools > .wl-listbtn span { display: none; }
html .filters.t-tools > .wl-listbtn .wl-wa-ic { width: 24px; height: 24px; }
@media (hover: hover) { html .filters.t-tools > .wl-listbtn:hover { background: #000; border-color: #000; } }
/* Téléphone : le texte du tri disparaît s'il manque de place (l'icône et l'info-bulle restent) */
@container (max-width: 300px) { .t-grp > .t-sort .t-sort-l { display: none; } }
html .filters.t-tools > .wl-listbtn { margin-inline-start: auto; }   /* au bout de la ligne, aligné sur le « + » de la recherche */
/* Recherche sur toute la largeur de la colonne, alignée sur la barre d'outils (owner, 2026-11-28 : « fill the whole space ») */
html :is(.tlist-wrap, .tsplit-list):has(.filters.t-tools) > .tsearch-wrap { max-width: none; width: 100%; }
html :is(.tlist-wrap, .tsplit-list):has(.filters.t-tools) > .tsearch-wrap > .tsearch-row { width: 100%; }

/* ---------- Charte des chauffeurs au guide visuel (owner, 2026-11-28 : « chart need to follow visual guide ») ----------
   Marine pour agir (Inviter un collègue, Voir comment ça marche, Signer), or pour repérer (trait pointillé des étapes, icônes),
   jamais de texte or sur blanc ni de bloc or plein. Étapes comme ol.steps du site : numéro rond marine en Archivo 800, reliées
   par le trait pointillé or. Plus de petites étiquettes colorées au-dessus des cartes (surtitres interdits) : de vrais titres. */
html.dt .chr { gap: 12px; }
html.dt .chr-grp, html.dt .chr-grp.must, html.dt .chr-grp.road, html.dt .chr-grp.look, html.dt .chr-grp.info { display: block; margin: 20px 0 0; color: var(--text); font-size: 20px; line-height: 1.2; }
html.dt .chr-grp::before { content: none; }
html.dt .chr-head + .chr-grp { margin-top: 8px; }
html.dt .chr-r { border-radius: 16px; background: var(--bg); }
html.dt :is(.chr-acc, .chr-sub-h) h3 { font-family: var(--display); font-weight: 800; letter-spacing: -.02em; font-size: 19px; line-height: 1.2; }
html.dt .chr-acc .chr-acc-lead, html.dt .chr-sub-q { color: var(--muted); }
/* Étapes : numéro marine, trait pointillé or */
html.dt .chr-acc-s { grid-template-columns: 32px 1fr; gap: 14px; }
html.dt .chr-acc-dot, html.dt .chr-acc-s.s1 .chr-acc-dot, html.dt .chr-acc-s.s2 .chr-acc-dot, html.dt .chr-stg .chr-acc-s .chr-acc-dot { width: 32px; height: 32px; border: 0; background: var(--text); color: var(--bg); font: 800 14px/1 var(--display); }
html.dt .chr-acc-s.s3 .chr-acc-dot { background: var(--bg); color: var(--muted); border: 1.5px dashed var(--muted); }   /* dernier recours : en retrait */
html.dt .chr-acc-s:not(:last-child)::after { left: 15px; top: 38px; bottom: 6px; width: 2px; background: repeating-linear-gradient(180deg, var(--gold) 0 6px, transparent 6px 11px); }
html.dt .chr-acc-s b { font-weight: 700; padding-top: 5px; }
/* Boutons : marine, 14 px d'arrondi ; secondaire à contour marine */
html.dt .chr-prac-btn, html.dt .chr-signbtn { border: 1.5px solid var(--text); border-radius: 14px; background: var(--text); color: var(--bg); }
html.dt .chr-prac-btn.done { background: var(--bg); border-color: var(--text); color: var(--text); }
html.dt .chr-acc-inv { min-height: 40px; padding: 8px 14px; border: 1.5px solid var(--text); border-radius: 12px; background: var(--bg); color: var(--text); }
@media (hover: hover) {
  html.dt .chr-prac-btn:hover, html.dt .chr-signbtn:not(:disabled):hover { background: var(--bg); color: var(--text); border-color: var(--text); }
  html.dt .chr-prac-btn.done:hover, html.dt .chr-acc-inv:hover { background: var(--text); color: var(--bg); border-color: var(--text); }
}
html.dt .chr-signbtn:disabled { opacity: .4; }
/* Lien « Voir mes collègues de confiance » : marine souligné or, pas de texte or */
html.dt .chr-sub-link { color: var(--text); text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 4px; }
html.dt .chr-sub-link svg { color: var(--gold); }
@media (hover: hover) { html.dt .chr-sub-link:hover { text-decoration-color: var(--text); } }
/* Icônes des règles : or pour repérer ; les règles non négociables gardent le rouge (vraie interdiction) */
html.dt .chr-r.road .chr-ic, html.dt .chr-r.look .chr-ic { background: var(--s-gold-soft); color: var(--gold-ink); }
html.dt .chr-r.info .chr-ic { background: var(--s-panel); color: var(--muted); }
/* Coches : marine quand c'est coché */
html.dt .chr-tk input:checked + i { background: var(--text); border-color: var(--text); }
html.dt .chr-tk input:checked + i::after { border-color: var(--bg); }
/* Signature : panneau gris du site (sans bordure), texte marine, champ au contour arrondi, bouton marine */
html.dt .chr-end { margin-top: 20px; padding: 20px; border-radius: 16px; background: var(--s-panel); color: var(--text); }
html.dt .chr-end svg { stroke: var(--gold); }
html.dt .chr-end p, html.dt .chr-commit, html.dt .chr-signed { color: var(--text); }
html.dt .chr-commit { border-top-color: var(--line); }
html.dt .chr-sign .chr-note { color: var(--muted); opacity: 1; }
html.dt .chr-name span { color: var(--muted); }
html.dt .chr-name input { border: 1px solid var(--line); background: var(--bg); color: var(--text); }
html.dt .chr-name input:focus { outline: 0; border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
html.dt .chr-name input[readonly] { background: var(--bg); border-style: dashed; }
html.dt .chr-end .chr-tk i { border-color: var(--line); background: var(--bg); }
html.dt .chr-end .chr-tk input:checked + i { background: var(--text); border-color: var(--text); }
html.dt .chr-end .chr-tk input:checked + i::after { border-color: var(--bg); }
/* Signée : vert seulement pour l'état réel (cartes à filet vert, signature en vert doux) */
html.dt .chr.chr-ok .chr-r:not(.chr-red) { background: var(--bg); border-color: color-mix(in srgb, var(--live) 35%, var(--line)); }
html.dt .chr.chr-ok .chr-sign { background: var(--live-soft); }
html.dt .chr.chr-ok .chr-signed { color: var(--live); }
html.dt .chr.chr-ok .chr-name input[readonly] { background: var(--bg); border-color: color-mix(in srgb, var(--live) 35%, var(--line)); }
