/* ═════════════════════════════════════════════════════════════════════════════════════════
   TJDP · DA v2 — « langage de la palette Ctrl + K »
   Kit CSS généré le 13/10/2026 à partir de planning-chantier/index.html (branche ui/refonte-v2).
   Principes : voir DA-TJDP-V2.md. Ce fichier est une COPIE FIDÈLE des composants de l'application ;
   ne pas le retoucher à la main : corriger index.html puis régénérer (tools/mkkit.py).
   Police : Inter 500-800 (Google Fonts) ; icônes : SVG de tjdp-da.js (fxIc / fxChip) ; AUCUN emoji.
   ═════════════════════════════════════════════════════════════════════════════════════════ */
:root {
    /* ══════════════════════════════════════════════════════════════
       TJDP CHANTIER — COCKPIT DESIGN SYSTEM
       Style : outil de pilotage bold, data-dense, haute lisibilité.
       Base charte TJDP 2023 (orange hibiscus) + échelle sémantique.
       ══════════════════════════════════════════════════════════════ */

    /* Palette officielle TJDP (Charte 2023) */
    --blanc-craie: #f2efeb;
    --gris-ardoise: #282828;
    --orange-hibiscus: #ff710e;        /* Pantone 2018 C — accent */
    --vert-sauge: #dfe0d5;
    --bleu-hortencia: #d5d9d8;

    /* — Surfaces & texte (échelle neutre AA) — */
    --tjdp-sable: var(--blanc-craie);           /* fond de page */
    --tjdp-blanc: #ffffff;                       /* surface carte */
    --surface-2: #faf8f5;                        /* surface encaissée */
    --tjdp-encre: #1c1c1c;                       /* texte principal (AAA/blanc) */
    --tjdp-noir: #0f0f0f;                         /* titres, chiffres forts */
    --tjdp-gris: #5c5560;                        /* texte secondaire (AA 5.9:1) */
    --tjdp-gris-2: #8a8390;                       /* texte tertiaire / hint */
    --tjdp-gris-clair: #e6e1db;                   /* bordures / dividers */
    --border-strong: #d2ccc4;                     /* bordure marquée */

    /* — Accent (CTA) — */
    --tjdp-vert: var(--orange-hibiscus);         /* accent principal/CTA */
    --tjdp-vert-dark: #e85f00;                    /* accent hover */
    --accent-soft: #fff1e7;                        /* tint accent (fonds) */
    --accent-ring: rgba(255,113,14,0.32);         /* focus ring */

    /* — Statuts sémantiques (couleur + tint fond) — */
    --tjdp-rouge: #dc2626;   --danger: #dc2626;   --danger-soft: #fef2f2;   /* retard / danger */
    --warn:       #b45309;   --warn-soft:  #fffbeb;                          /* alerte / écart */
    --success:    #15803d;   --success-soft:#f0fdf4;                          /* OK / à jour */
    --info:       #1d4ed8;   --info-soft:   #eff6ff;                          /* info / neutre */

    /* — Élévation (échelle unique, flat cockpit) — */
    --shadow-sm: 0 1px 2px rgba(28,28,28,.06), 0 1px 1px rgba(28,28,28,.04);
    --shadow-md: 0 2px 6px rgba(28,28,28,.08), 0 1px 2px rgba(28,28,28,.05);
    --shadow-lg: 0 8px 24px rgba(28,28,28,.12), 0 2px 6px rgba(28,28,28,.06);
    --tjdp-shadow: var(--shadow-sm);              /* alias compat */

    /* — Rayons (charte : boutons 6 · champs 8 · cartes 12 · fenêtres 16) — */
    --r-sm: 6px; --r-field: 8px; --r-md: 12px; --r-lg: 16px; --r-pill: 999px;

    /* — Espacement (échelle 4/8) — */
    --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; --sp-6: 32px;

    /* — Typographie OUTIL — Inter, bold, lisibilité terrain — */
    --font-title: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;

    /* — Échelle typographique : 6 tailles, pas une de plus — */
    --fs-cap: 11px;    /* micro-libellé MAJUSCULES uniquement */
    --fs-sm: 12px;     /* légende, métadonnée */
    --fs-md: 13px;     /* interface : boutons, tableaux, champs */
    --fs-base: 14px;   /* texte courant */
    --fs-lg: 16px;     /* titre de bloc */
    --fs-h1: 22px;     /* titre de page */

    /* — Contrôles : UNE hauteur par taille, pour tout ce qui se clique — */
    --ctl-h: 34px; --ctl-h-sm: 28px; --ctl-h-touch: 44px;

  }
:root {
  --surface-sunken: #ebe6df;   /* fond d'un contrôle segmenté, d'un champ désactivé */
  --surface-3: #f3f0ea;        /* bloc discret posé sur une carte blanche */
  --line: #e6e1db;             /* bordure de carte */
  --line-strong: #d2ccc4;
  --ink-2: #5c5560;
  /* couleurs d'état = celles d'origine (--success / --warn / --danger) */
  --ok: var(--success);   --ok-bg: var(--success-soft);
  --watch: var(--warn);   --watch-bg: var(--warn-soft);
  --act: var(--danger);   --act-bg: var(--danger-soft);
}

/* ── base minimale (dans l'application, ces règles viennent du reste de la feuille) ── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; font-family: var(--font-body); background: var(--tjdp-sable); color: var(--tjdp-encre); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button { font: inherit; cursor: pointer; }
.fx-lbl { }
svg { flex: none; }

/* ═════ boutons, pastilles, lignes, puces d'icône, recherche, séparateurs (section « Fichiers » de l'application) ═════ */
button.fx-btn { display: inline-flex !important; align-items: center; gap: 7px; height: 36px !important; min-height: 0 !important; padding: 0 14px !important; border-radius: 10px !important; font-size: 13px !important; font-weight: 700 !important; border: 1px solid var(--line) !important; background: #fff !important; color: var(--gris-ardoise) !important; box-shadow: none !important; cursor: pointer; transition: border-color .15s, background .15s; }
button.fx-btn:hover { border-color: var(--line-strong) !important; background: var(--surface-3) !important; }
button.fx-btn.pri { background: var(--orange-hibiscus) !important; border-color: var(--orange-hibiscus) !important; color: #fff !important; }
button.fx-btn.pri:hover { background: #e85f00 !important; border-color: #e85f00 !important; }
.fx-btn svg, .fx-back svg, .fx-pill svg, .fx-ic svg, .fx-ib svg, .fx-go svg, .fx-home svg, .fx-path .sep svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fx-btn svg { width: 15px; height: 15px; stroke-width: 2.2; flex: none; }
button.fx-bdg { display: inline-flex !important; align-items: center; gap: 6px; height: 26px !important; min-height: 0 !important; padding: 0 12px !important; border-radius: 999px !important; font-size: 11.5px !important; font-weight: 700 !important; border: 0 !important; box-shadow: none !important; cursor: pointer; }
button.fx-bdg svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
button.fx-bdg.ok { background: var(--success-soft) !important; color: #15803d !important; }
button.fx-bdg.go { background: var(--orange-hibiscus) !important; color: #fff !important; }
button.fx-bdg.go:hover { background: #e85f00 !important; }

/* barre de navigation : Retour · chemin cliquable · compteur */
.fx-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 18px 6px 22px; }
a.fx-back { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px 0 9px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--gris-ardoise); font-size: 13px; font-weight: 700; text-decoration: none; transition: border-color .15s, background .15s; }
a.fx-back:hover { border-color: var(--line-strong); background: var(--surface-3); }
a.fx-back svg { width: 16px; height: 16px; stroke-width: 2.4; }
.fx-path { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; flex: 1; min-width: 0; font-size: 13.5px; }
.fx-path > a, .fx-path > .cur { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px; border-radius: 8px; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; font-weight: 600; color: var(--ink-2); }
.fx-path > a:hover { background: rgba(255,113,14,.09); color: var(--gris-ardoise); }
.fx-path > .cur { color: var(--gris-ardoise); font-weight: 800; }
.fx-path .sep { display: inline-flex; color: #b6b0ba; }
.fx-path .sep svg { width: 13px; height: 13px; stroke-width: 2.4; }
.fx-home { flex: none; width: 24px; height: 24px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; color: #64748b; background: color-mix(in srgb, #64748b 13%, #fff); }
.fx-home svg { width: 14px; height: 14px; }
.fx-count { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--tjdp-gris); white-space: nowrap; }

/* liste à plat : une ligne = une puce d'icône + un titre + une ligne grise (comme la palette) */
.fx-tree { padding: 2px 12px 12px 14px; }
.fx-list { display: grid; gap: 2px; }
.fx-row { position: relative; display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 7px 10px; border-radius: 10px; cursor: pointer; color: inherit; text-decoration: none; transition: background .12s, box-shadow .12s; }
.fx-row:hover, .fx-row:focus-within { background: rgba(255,113,14,.07); }
.fx-row.need { background: rgba(255,113,14,.06); box-shadow: inset 0 0 0 1.5px rgba(255,113,14,.55); }
.fx-row.fx-over { background: rgba(255,113,14,.16) !important; box-shadow: inset 0 0 0 1.5px var(--orange-hibiscus); }
a.fx-back.fx-over { background: rgba(255,113,14,.16) !important; border-color: var(--orange-hibiscus); }
.fx-path > a.fx-over { background: rgba(255,113,14,.16) !important; color: var(--gris-ardoise); }
.fx-file { cursor: default; }
.fx-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; cursor: pointer; }
.fx-ic { flex: none; width: 32px; height: 32px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; color: var(--c, #64748b); background: color-mix(in srgb, var(--c, #64748b) 13%, #fff); }
.fx-ic svg { width: 17px; height: 17px; }
.fx-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.fx-t { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 14px; font-weight: 600; color: var(--gris-ardoise); }
.fx-tn { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-s { font-size: 12px; color: var(--tjdp-gris); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-pill { flex: none; display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 999px; background: var(--surface-3); color: var(--ink-2); font-size: 11px; font-weight: 700; white-space: nowrap; }
.fx-pill svg { width: 11px; height: 11px; }
.fx-pill.ok { background: var(--success-soft); color: #15803d; }
.fx-pill.warn { background: rgba(255,113,14,.14); color: #b8510a; }
.fx-pill.vio { background: #ede9fe; color: #6d28d9; }
.fx-pill.alo { background: var(--orange-hibiscus); color: #fff; }
.fx-act { flex: none; display: flex; gap: 2px; opacity: 0; transition: opacity .12s; }
.fx-row:hover .fx-act, .fx-row:focus-within .fx-act { opacity: 1; }
@media (hover: none) { .fx-act { opacity: 1; } }
button.fx-ib { display: inline-flex !important; align-items: center; justify-content: center; width: 30px !important; height: 30px !important; min-height: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 8px !important; background: transparent !important; color: var(--tjdp-gris) !important; box-shadow: none !important; cursor: pointer; }
button.fx-ib:hover { background: #fff !important; color: var(--gris-ardoise) !important; box-shadow: 0 0 0 1px var(--line) !important; }
button.fx-ib.dan:hover { background: #fee2e2 !important; color: #b91c1c !important; box-shadow: none !important; }
button.fx-ib svg { width: 16px; height: 16px; }
button.fx-pillbtn { flex: none; display: inline-flex !important; align-items: center; height: 26px !important; min-height: 0 !important; padding: 0 12px !important; border: 0 !important; border-radius: 999px !important; background: rgba(255,113,14,.13) !important; color: #b8510a !important; font-size: 12px !important; font-weight: 700 !important; box-shadow: none !important; cursor: pointer; }
button.fx-pillbtn:hover { background: rgba(255,113,14,.22) !important; }
button.fx-pillbtn.n { background: #fff !important; border: 1px solid var(--line) !important; color: var(--ink-2) !important; }
button.fx-pillbtn.n:hover { background: var(--surface-3) !important; border-color: var(--line-strong) !important; }
.fx-go { flex: none; width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; color: #b6b0ba; transition: color .12s, transform .12s; }
.fx-go svg { width: 15px; height: 15px; stroke-width: 2.4; }
.fx-row:hover > .fx-go { color: var(--orange-hibiscus); transform: translateX(2px); }
.fx-s mark, .fx-snip mark { background: rgba(255,113,14,.24); color: inherit; border-radius: 3px; padding: 0 1px; }
.fx-r { flex: none; font-size: 13px; font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; text-align: right; min-width: 84px; }
.fx-snip { font-size: 12px; color: var(--tjdp-gris); padding: 0 10px 6px 66px; margin-top: -3px; }
.fx-empty { padding: 34px 20px; text-align: center; color: var(--tjdp-gris); font-size: 13.5px; }
.fx-empty .fx-ic { width: 44px; height: 44px; border-radius: 12px; margin: 0 auto 12px; }
.fx-empty .fx-ic svg { width: 22px; height: 22px; }
.fx-empty b { display: block; margin-bottom: 4px; font-size: 15px; color: var(--gris-ardoise); }
.fx-search { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 14px; margin: 0 0 8px; background: #fff; border: 1px solid var(--line); border-radius: 999px; color: var(--tjdp-gris); transition: border-color .2s, box-shadow .2s; }
.fx-search:focus-within { border-color: var(--orange-hibiscus); box-shadow: 0 0 0 3px rgba(255,113,14,.22); }
.fx-search svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fx-search input { flex: 1; min-width: 0; height: auto !important; padding: 0 !important; border: 0 !important; outline: 0 !important; background: transparent !important; box-shadow: none !important; font-size: 14px !important; font-weight: 500 !important; color: var(--gris-ardoise) !important; }

/* section « source » (Alobees, factures annulées) : un simple séparateur avec son titre, pas une boîte de plus */
.fx-sec { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 10px 8px; margin-top: 6px; border-top: 1px solid var(--line); }
.fx-sec-t { font-size: 13px; font-weight: 700; color: var(--gris-ardoise); }
.fx-sec-n { font-size: 12px; color: var(--tjdp-gris); }
.fx-sec button { margin-left: auto; }
.fx-det > summary { list-style: none; }
.fx-det > summary::-webkit-details-marker { display: none; }
.fx-annul > summary.fx-sec { cursor: pointer; margin-top: 10px; border-top: 1px solid var(--line); }
.fx-annul > summary.fx-sec::before { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); color: var(--tjdp-gris); transition: transform .15s; margin: 0 6px 0 4px; }
.fx-annul[open] > summary.fx-sec::before { transform: rotate(45deg); color: var(--orange-hibiscus); }
@media (max-width: 640px) {
  .fx-bar { padding: 10px 12px 4px 14px; }
  .fx-tree { padding-left: 6px; padding-right: 6px; }
  .fx-row { gap: 10px; padding: 7px 6px; }
  .fx-pill.hide-sm, .fx-count { display: none; }
  .fx-snip { padding-left: 54px; }
}

/* ═════ boîte de dialogue ═════ */
/* Boîte de dialogue maison (remplace prompt() / confirm()) */
.fd-ov { position: fixed; inset: 0; z-index: 99600; display: flex; align-items: flex-start; justify-content: center; padding: 16vh 16px 16px; overflow-y: auto; background: rgba(28,28,28,.45); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
@media (max-height: 700px) { .fd-ov { padding-top: 4vh; } }
.fd { width: min(440px, 100%); margin-bottom: 16px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 25px 60px rgba(0,0,0,.3); overflow: hidden; }
.fd-h { display: flex; align-items: center; gap: 12px; padding: 18px 20px 4px; }
.fd-t { font-size: 16px; font-weight: 800; color: var(--gris-ardoise); }
.fd-b { padding: 6px 20px 2px 64px; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.fd .fx-search { margin: 14px 20px 0; }
.fd-f { display: flex; justify-content: flex-end; gap: 8px; padding: 18px 20px 18px; }


.fx-go.ph { visibility: hidden; }
.fx-tools { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fx-bar button.fx-pillbtn { height: 30px !important; padding: 0 14px !important; }
button.fx-pillbtn svg { width: 11px; height: 11px; margin-right: 7px; fill: currentColor; stroke: none; }
button.fx-btn.dan { background: #dc2626 !important; border-color: #dc2626 !important; color: #fff !important; }
button.fx-btn.dan:hover { background: #b91c1c !important; border-color: #b91c1c !important; }
.fx-list, .fld-kids, .fld-node { grid-template-columns: minmax(0, 1fr); }
button.fx-pillbtn.fx-ico svg { width: 14px; height: 14px; margin-right: 6px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
button.fx-pillbtn.fx-ico.fx-fill svg { width: 11px; height: 11px; margin-right: 7px; fill: currentColor; stroke: none; }
/* ═════ case à cocher (la coche se dessine) ═════ */
/* 10 · COCHES (aperçu Import IA, tâches du Suivi) : même géométrie, la coche se dessine */
input.mo-cb {
  -webkit-appearance: none; appearance: none; position: relative; flex: none; box-sizing: border-box; padding: 0; margin: 0;
  width: 18px; height: 18px; border: 1.5px solid var(--border-strong); border-radius: 5px; background: #fff; cursor: pointer; vertical-align: middle;
}
input.mo-cb:hover { border-color: var(--orange-hibiscus); }
input.mo-cb:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-ring); }
input.mo-cb:checked { background: var(--orange-hibiscus); border-color: var(--orange-hibiscus); }
input.mo-cb.mo-cb-ok:checked { background: var(--success); border-color: var(--success); }   /* tâche faite = vert de validation */
input.mo-cb::after { content: ""; position: absolute; left: 31%; top: 9%; width: 30%; height: 57%; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); opacity: 0; }
input.mo-cb:checked::after { opacity: 1; }
@media (pointer: coarse) { input.mo-cb { width: 22px; height: 22px; } }   /* mode terrain : zone de tap */
/* ═════ messages ═════ */
/* 42 · MESSAGES — remplaçants des boîtes natives : petits messages qui se rangent tout seuls (même langage que la palette) */
#fx-toasts { position: fixed; z-index: 99700; left: 50%; bottom: 22px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; width: min(460px, calc(100vw - 24px)); pointer-events: none; }
.fx-toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 12px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 14px 38px rgba(0,0,0,.2); animation: fxtIn .2s ease-out; transition: opacity .2s, transform .2s; }
.fx-toast.out { opacity: 0; transform: translateY(6px); }
.fx-toast-t { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600; line-height: 1.4; color: var(--gris-ardoise); overflow-wrap: anywhere; }
.fx-toast button { flex: none; width: 28px; height: 28px; padding: 0 !important; min-height: 0 !important; display: inline-flex; align-items: center; justify-content: center; border: 0 !important; border-radius: 50% !important; background: transparent !important; color: var(--tjdp-gris) !important; box-shadow: none !important; cursor: pointer; }
.fx-toast button:hover { background: var(--surface-3) !important; color: var(--gris-ardoise) !important; }
.fx-toast button svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
@keyframes fxtIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .fx-toast { animation: none; transition: none; } }

/* ═════ boutons-icônes ═════ */
button.fx-icb { flex: none; width: 26px; height: 26px; min-height: 0 !important; padding: 0 !important; gap: 0 !important; display: inline-flex !important; align-items: center; justify-content: center; border: 1px solid var(--line) !important; border-radius: 50% !important; background: #fff !important; color: var(--ink-2) !important; box-shadow: none !important; cursor: pointer; }
button.fx-icb:hover { background: var(--surface-3) !important; border-color: var(--line-strong) !important; color: var(--gris-ardoise) !important; }
button.fx-icb.go { border-color: transparent !important; background: rgba(255,113,14,.13) !important; color: #b8510a !important; }
button.fx-icb.go:hover { background: rgba(255,113,14,.26) !important; }
.fx-icb svg, .fx-icc svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.fx-icc { flex: none; width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--success-soft); color: #15803d; cursor: help; }

/* ═════ sélection multiple ═════ */
.fx-ckw { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; opacity: 0; transition: opacity .12s; cursor: pointer; }
.fx-edit .fx-row:hover .fx-ckw, .fx-row:focus-within .fx-ckw, .fx-sel-on .fx-ckw, .fx-row.sel .fx-ckw, .fx-bar .fx-ckw-all { opacity: 1; }
@media (hover: none) { .fx-ckw { opacity: 1; } }
.fx-bar .fx-ckw-all { margin-right: 2px; }
.fx-row.sel { background: rgba(255,113,14,.1); box-shadow: inset 0 0 0 1.5px rgba(255,113,14,.38); }
.fx-bulk { position: sticky; top: 72px; z-index: 6; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 4px 10px 8px; padding: 8px 12px; background: #fff7ef; border: 1px solid rgba(255,113,14,.38); border-radius: 12px; box-shadow: 0 8px 22px rgba(0,0,0,.1); }
.fx-bulk[hidden] { display: none; }
.fx-bn { font-size: 13px; font-weight: 600; color: var(--gris-ardoise); margin-right: 6px; white-space: nowrap; }
.fx-bn b { font-weight: 800; }
.fx-bulk .fx-bx { margin-left: auto; }
button.fx-pillbtn.dan { background: #fff !important; border: 1px solid rgba(220,38,38,.35) !important; color: #b91c1c !important; }
button.fx-pillbtn.dan:hover { background: #fee2e2 !important; }
.fd-t { text-wrap: balance; }
.fd-list { max-height: min(46vh, 360px); overflow: auto; margin: 12px 20px 0; padding: 4px; border: 1px solid var(--line); border-radius: 12px; }
button.fd-pick { display: flex !important; align-items: center; gap: 10px !important; width: 100%; height: 38px !important; min-height: 0 !important; padding-right: 10px !important; border: 0 !important; border-radius: 9px !important; background: transparent !important; color: var(--gris-ardoise) !important; font-size: 13.5px !important; font-weight: 600 !important; text-align: left; box-shadow: none !important; cursor: pointer; }
button.fd-pick:hover:not(:disabled) { background: rgba(255,113,14,.07) !important; }
button.fd-pick.on { background: rgba(255,113,14,.14) !important; box-shadow: inset 0 0 0 1.5px rgba(255,113,14,.5) !important; }
button.fd-pick:disabled { opacity: .4; cursor: not-allowed; }
button.fd-pick .fx-ic { width: 26px; height: 26px; border-radius: 8px; }
button.fd-pick .fx-ic svg { width: 14px; height: 14px; }
.fx-pbar { height: 5px; margin-top: 7px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.fx-pbar i { display: block; height: 100%; width: 2%; border-radius: 99px; background: var(--orange-hibiscus); transition: width .25s ease; }

/* ═════ sélecteur de date ═════ */
/* 45 · SÉLECTEUR DE DATE — remplace le calendrier du navigateur : cadre blanc arrondi, jour choisi en orange, mois et année cliquables */
input.dp-in { padding-right: 40px !important; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235c5560' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important; background-position: right 12px center !important; background-size: 16px 16px !important; }
.dp-ov { position: fixed; inset: 0; z-index: 99640; background: rgba(28,28,28,.4); }
.dp { position: fixed; z-index: 99650; width: 304px; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 14px 38px rgba(0,0,0,.2); animation: fxtIn .15s ease-out; -webkit-user-select: none; user-select: none; }
.dp-h { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
button.dp-t { display: inline-flex !important; align-items: center; gap: 6px !important; height: 32px !important; min-height: 0 !important; padding: 0 10px !important; border: 0 !important; border-radius: 9px !important; background: transparent !important; color: var(--gris-ardoise) !important; font-size: 14px !important; font-weight: 800 !important; text-transform: capitalize; box-shadow: none !important; cursor: pointer; }
button.dp-t:hover { background: var(--surface-3) !important; }
button.dp-t svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.dp-nav { margin-left: auto; display: flex; gap: 2px; }
button.dp-n { display: inline-flex !important; align-items: center; justify-content: center; width: 30px !important; height: 30px !important; min-height: 0 !important; padding: 0 !important; gap: 0 !important; border: 0 !important; border-radius: 50% !important; background: transparent !important; color: var(--ink-2) !important; box-shadow: none !important; cursor: pointer; }
button.dp-n:hover { background: var(--surface-3) !important; color: var(--gris-ardoise) !important; }
button.dp-n svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.dp-w, .dp-g { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.dp-g { gap: 2px; }
.dp-w span { height: 24px; line-height: 24px; text-align: center; font-size: 10.5px; font-weight: 800; letter-spacing: .06em; color: var(--tjdp-gris); }
button.dp-d { height: 36px !important; min-height: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 10px !important; background: transparent !important; color: var(--gris-ardoise) !important; font-size: 13.5px !important; font-weight: 600 !important; font-variant-numeric: tabular-nums; box-shadow: none !important; cursor: pointer; }
button.dp-d:hover:not(:disabled) { background: rgba(255,113,14,.12) !important; }
button.dp-d.out { color: #b6b0ba !important; font-weight: 500 !important; }
button.dp-d.now { box-shadow: inset 0 0 0 1.5px var(--orange-hibiscus) !important; }
button.dp-d.sel, button.dp-mo.sel { background: var(--orange-hibiscus) !important; color: #fff !important; font-weight: 800 !important; }
button.dp-d.sel:hover, button.dp-mo.sel:hover { background: #e85f00 !important; }
button.dp-d:focus-visible, button.dp-mo:focus-visible, button.dp-n:focus-visible, button.dp-t:focus-visible { outline: 0; box-shadow: 0 0 0 3px rgba(255,113,14,.35) !important; }
button.dp-d:disabled { opacity: .3; cursor: not-allowed; }
.dp-m { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
button.dp-mo { height: 44px !important; min-height: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 10px !important; background: var(--surface-3) !important; color: var(--gris-ardoise) !important; font-size: 13.5px !important; font-weight: 700 !important; box-shadow: none !important; cursor: pointer; }
button.dp-mo:hover { background: rgba(255,113,14,.14) !important; }
button.dp-mo.now { box-shadow: inset 0 0 0 1.5px var(--orange-hibiscus) !important; }
.dp-f { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
@media (max-width: 640px) {
  .dp { left: 0 !important; right: 0; bottom: 0; top: auto !important; width: auto; padding: 14px 14px calc(14px + env(safe-area-inset-bottom)); border-radius: 16px 16px 0 0; border-width: 1px 0 0; }
  button.dp-d { height: 42px !important; }
}
@media (prefers-reduced-motion: reduce) { .dp { animation: none; } }

/* ═════ boîte de choix ═════ */
/* 58 · Boîte de choix (fxDialog { choices }) — « Créer le planning théorique » : une ligne par possibilité, puce d'icône, titre + une phrase */
.fd-chs { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 14px 20px 2px; }
button.fd-ch { display: flex !important; align-items: center; gap: 12px; width: 100%; height: auto !important; min-height: 0 !important; padding: 10px 12px !important; text-align: left; background: #fff !important; color: var(--gris-ardoise) !important; border: 1px solid var(--line) !important; border-radius: 12px !important; cursor: pointer; white-space: normal; transition: background .15s, border-color .15s; }
button.fd-ch:hover, button.fd-ch:focus-visible { background: rgba(255, 113, 14, .06) !important; border-color: rgba(255, 113, 14, .45) !important; outline: none; }
button.fd-ch .fx-ic { flex: none; }
.fd-ch-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.fd-ch-t b { font-size: 14px; font-weight: 800; }
.fd-ch-t em { font-style: normal; font-size: 12.5px; font-weight: 500; line-height: 1.35; color: var(--ink-2); }
button.fd-ch > svg { flex: none; width: 15px; height: 15px; fill: none; stroke: #9a9a9a; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
button.fd-ch:hover > svg { stroke: var(--orange-hibiscus); }

/* ═════ composants génériques propres au kit (dans l'application ils vivent dans des sélecteurs d'écran) ═════ */

/* CADRE — fond blanc, coins arrondis, trait fin. Rien d'autre : pas d'ombre, pas de barre de couleur. */
.da-frame { background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: none; overflow: hidden; overflow: clip; }
.da-frame > .da-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.da-frame .da-title { display: flex; align-items: center; gap: 10px; margin: 0; min-width: 0; font-size: 16px; font-weight: 800; color: var(--gris-ardoise); }
.da-frame .da-title > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* CONTRÔLE SEGMENTÉ — l'onglet actif est orange, texte blanc */
.seg { display: inline-flex; align-items: center; gap: 2px; flex-wrap: wrap; max-width: 100%; padding: 3px; border: 0; border-radius: 10px; background: var(--surface-sunken); }
.seg > button { height: 28px; padding: 0 14px; border: 0; border-radius: 7px; background: transparent; color: var(--ink-2); font-size: 13px; font-weight: 700; letter-spacing: -.01em; }
.seg > button:hover { background: rgba(255,255,255,.6); color: var(--tjdp-noir); }
.seg > button.active { background: var(--orange-hibiscus); color: #fff; }

/* ÉTAT — pastille avec un point de couleur ; le texte reste en encre foncée, seul le point porte la couleur (--ss) */
.da-state { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 12px; border-radius: 999px; background: var(--surface-3); color: var(--ink-2); font-size: 12px; font-weight: 700; white-space: nowrap; }
.da-state::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--ss, var(--tjdp-gris)); }
.da-state.ok { --ss: var(--success); } .da-state.warn { --ss: var(--warn); } .da-state.err { --ss: var(--danger); }

/* CHAMP-PASTILLE — étiquette en petites capitales + valeur en gras, anneau orange au focus */
.da-field { display: inline-flex; align-items: center; gap: 9px; height: 38px; padding: 0 8px 0 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: 13px; color: var(--gris-ardoise); transition: border-color .2s, box-shadow .2s; }
.da-field:focus-within { border-color: var(--orange-hibiscus); box-shadow: 0 0 0 3px rgba(255,113,14,.22); }
.da-field > span:first-child { font-size: 10.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--tjdp-gris); }
.da-field input { height: auto; min-height: 0; padding: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 13.5px; font-weight: 700; color: var(--gris-ardoise); }

/* BOUTON RONDE (barre d'outils) */
.da-round { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 50%; background: transparent; color: var(--ink-2); }
.da-round:hover { background: var(--surface-3); border-color: var(--line); color: var(--gris-ardoise); }
.da-round svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* TÉLÉPHONE : un bouton .fx-resp ne garde que son icône (le libellé .fx-lbl disparaît, l'aria-label reste) */
@media (max-width: 640px) {
  button.fx-btn.fx-resp { width: 38px; padding: 0 !important; justify-content: center; gap: 0; }
  button.fx-btn.fx-resp .fx-lbl, button.fx-pillbtn.fx-resp .fx-lbl { display: none; }
  button.fx-pillbtn.fx-ico.fx-resp { width: 32px; padding: 0 !important; justify-content: center; }
  button.fx-pillbtn.fx-ico.fx-resp svg { margin-right: 0; }
  .fx-row { gap: 10px; padding: 7px 6px; }
  .fx-bulk { top: 8px; margin: 4px 6px 8px; padding: 6px 8px; gap: 6px; }
  /* en-tête de cadre : une seule ligne, titre coupé par « … », boutons réduits à l'icône */
  .da-frame > .da-head { flex-wrap: nowrap; gap: 8px; padding: 12px 14px; }
  .da-frame .da-title { flex: 1 1 auto; min-width: 0; }
  .da-frame > .da-head > .fx-tools { flex: none; flex-wrap: nowrap; }
  /* téléphone : les actions de ligne passent par la barre de sélection (cases toujours visibles) — la place va aux noms */
  .fx-edit .fx-act, .fx-go { display: none; }
  .fx-bar { gap: 8px; }
  .fx-path { flex-wrap: nowrap; overflow: hidden; }
  .fx-path > .cur { flex: 0 1 auto; min-width: 0; }
}
/* un modèle de colonne borné : sans lui, une grille prend la largeur du plus long nom et déborde */
.fx-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; }
