/* Styles communs des applis AOR + Formatype Devis : barre latérale bleu marine, kanban des devis (maquette Projet 1). */
:root {
  --bg: #f4f4f5;
  --panel: #ffffff;
  --ink: #1c1c1e;
  --ink-2: #4a4a4f;
  --muted: #86868b;
  --line: #e3e3e6;
  --line-2: #efeff1;
  --night: #14264a;      /* bleu marine Formatype */
  --night-2: #1d3561;
  --accent: #22397a;      /* remplacé au démarrage par config.ACCENT */
  --accent-soft: color-mix(in srgb, var(--accent) 12%, white);
  --anis: #bbcf00;        /* vert Formatype : actions principales et repères (texte bleu marine dessus, jamais blanc) */
  --anis-fonce: #a7ba00;
  --anis-soft: #f3f7d4;
  --ok: #2f7d4f;
  --ok-soft: #e4f2e9;
  --warn: #b7791f;
  --warn-soft: #fbf1dc;
  --bad: #b8322a;
  --bad-soft: #fae6e4;
  --info: #3b5b8c;
  --info-soft: #e6edf7;
  --r: 10px;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 2px 8px rgba(0,0,0,.04);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 14px;
  color: var(--ink);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
.actions select { width: auto; }
body { margin: 0; background: var(--bg); display: flex; min-height: 100vh; }
a { color: inherit; }
h1 { font-size: 22px; margin: 0; font-weight: 650; letter-spacing: -.01em; }
main h1 { border-left: 4px solid var(--anis); padding-left: 10px; }
h2 { font-size: 15px; margin: 0 0 12px; font-weight: 650; }
h3 { font-size: 13px; margin: 0 0 8px; font-weight: 650; color: var(--ink-2); text-transform: uppercase; letter-spacing: .04em; }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }

/* ---------- barre latérale */
.side { width: 228px; flex: none; overflow-y: auto; background: var(--night); color: #d9d9dc; display: flex; flex-direction: column;
        position: sticky; top: 0; height: 100vh; padding: 16px 12px; z-index: 20; }   /* au-dessus de l'accueil 3D : le panneau des notifications en dépend */
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; padding: 4px 8px 18px; }
.brand img { width: 42px; height: 42px; border-radius: 8px; object-fit: contain; background: #fff; padding: 2px; }
.brand span { font-weight: 700; letter-spacing: .06em; font-size: 16px; line-height: 1.1; }
.brand b { color: #e0413a; }
.brand small { display: block; letter-spacing: .02em; font-weight: 400; font-size: 11.5px; color: #a1a1a6; }
.side nav { display: flex; flex-direction: column; gap: 2px; }
.side nav a { text-decoration: none; padding: 9px 12px; border-radius: 8px; color: #c7c7cc; }
.side nav a:hover { background: var(--night-2); color: #fff; }
.side nav a.active { background: var(--night-2); color: #fff; box-shadow: inset 3px 0 0 var(--anis); }
.side-actions { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }

main { flex: 1; min-width: 0; padding: 26px 32px 60px; }
.loading { color: var(--muted); padding: 40px; }

/* ---------- en-têtes de page */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head .sub { color: var(--muted); margin-top: 4px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line);
       background: var(--panel); color: var(--ink); padding: 7px 13px; border-radius: 8px; cursor: pointer;
       font: inherit; font-weight: 550; text-decoration: none; white-space: nowrap; line-height: 1.3; }
.btn:hover { border-color: #c9c9ce; background: #fafafa; }
.btn.primary, .btn.accent { background: var(--anis); border-color: var(--anis); color: var(--night); font-weight: 650; }
.btn.primary:hover, .btn.accent:hover { background: var(--anis-fonce); border-color: var(--anis-fonce); }
.btn.danger { color: var(--bad); }
.btn.danger:hover { background: var(--bad-soft); border-color: #eab5b0; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--line-2); }
.btn.ghost-light { background: transparent; border-color: #48484d; color: #e5e5ea; }
.btn.ghost-light:hover { background: var(--night-2); }
.btn.sm { padding: 4px 9px; font-size: 12.5px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: default; }
.icon-btn { border: none; background: none; cursor: pointer; color: var(--muted); padding: 4px 6px; border-radius: 6px; font-size: 15px; }
.icon-btn:hover { background: var(--line-2); color: var(--bad); }

/* ---------- cartes */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.card > h2:first-child::before, .carte-tete > h2::before, .tdb-tete > h2::before {
  content: ""; display: inline-block; width: 3px; height: .95em; margin-right: 8px; vertical-align: -2px;
  border-radius: 2px; background: var(--anis); }
.grid > .card + .card, .kpis > .card + .card { margin-top: 0; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span2 { grid-column: span 2; }
.kpi { padding: 16px 18px; }
.kpi .lbl { display: block; padding: 0; border-radius: 0; color: var(--muted); font-size: 12.5px; font-weight: 500; line-height: 1.4; white-space: normal; }
.kpi .val { font-size: 24px; font-weight: 650; margin-top: 4px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.kpi .cmp { font-size: 12px; margin-top: 4px; color: var(--muted); }
.kpi.alert .val { color: var(--bad); }
.up { color: var(--ok); } .down { color: var(--bad); }

/* ---------- tableaux */
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12px; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 9px 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
tr.click { cursor: pointer; }
tr.click:hover td { background: #fafafa; }
tfoot td { font-weight: 650; border-top: 1px solid var(--line); border-bottom: none; }
.table-wrap { overflow-x: auto; }

/* ---------- pastilles de statut */
.chip { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap;
        background: var(--line-2); color: var(--ink-2); }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.bad { background: var(--bad-soft); color: var(--bad); }
.chip.info { background: var(--info-soft); color: var(--info); }
.chip.acc { background: var(--accent-soft); color: var(--accent); }

/* ---------- formulaires */
label.f { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--ink-2); font-weight: 550; }
input, select, textarea { font: inherit; color: var(--ink); border: 1px solid var(--line); border-radius: 7px; padding: 7px 9px;
       background: #fff; width: 100%; min-width: 0; }
input:focus, select:focus, textarea:focus { outline: 3px solid color-mix(in srgb, var(--anis) 55%, transparent); border-color: var(--anis-fonce); }
textarea { resize: vertical; min-height: 36px; }
input[type=checkbox] { width: auto; }
.form-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 14px; }
.form-grid .w2 { grid-column: span 2; } .form-grid .w3 { grid-column: span 3; } .form-grid .w4 { grid-column: span 4; }
.hint { font-size: 12px; color: var(--muted); font-weight: 400; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.filters input, .filters select { width: auto; }
.filters input[type=search] { width: 260px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.seg button { border: none; background: none; padding: 6px 12px; font: inherit; cursor: pointer; color: var(--ink-2); }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--night); color: #fff; box-shadow: inset 0 -3px 0 var(--anis); }

/* ---------- éditeur de document */
.sticky { position: sticky; top: 16px; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.pdf-frame { width: 100%; height: 78vh; border: 1px solid var(--line); border-radius: var(--r); background: #fff; }
.doc-head { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 6px 10px; font-size: 13.5px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; }
.notice { padding: 10px 14px; border-radius: 8px; background: var(--info-soft); color: var(--info); font-size: 13px; margin-bottom: 14px; }
.notice.warn { background: var(--warn-soft); color: #8a5a12; }
.notice.bad { background: var(--bad-soft); color: var(--bad); }
.notice.ok { background: var(--ok-soft); color: var(--ok); }

/* ---------- calendrier des séances */

/* ---------- graphiques */
.bars { display: flex; align-items: flex-end; gap: 6px; height: 170px; padding-top: 8px; }
.bars .b { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; min-width: 0; }
.bars .pair { display: flex; align-items: flex-end; gap: 2px; width: 100%; justify-content: center; height: 100%; }
.bars .bar { width: 44%; max-width: 22px; background: var(--night); border-radius: 3px 3px 0 0; min-height: 1px; }
.bars .bar.prev { background: #cfcfd4; }
.bars .bar.acc { background: var(--anis); }
.bars .m { font-size: 11px; color: var(--muted); }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); margin-top: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.hbar { height: 8px; border-radius: 4px; background: var(--line-2); overflow: hidden; }
.hbar > span { display: block; height: 100%; background: var(--anis); }

/* ---------- onglets */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tabs button { border: none; background: none; padding: 9px 14px; font: inherit; cursor: pointer; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button.on { color: var(--ink); border-bottom-color: var(--anis); font-weight: 600; }

/* ---------- fenêtre modale & notifications */
.modal { position: fixed; inset: 0; background: rgba(20,20,22,.45); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; z-index: 50; overflow-y: auto; }
.modal[hidden] { display: none; }
.modal-box { background: #fff; border-radius: 14px; width: min(640px, 100%); padding: 22px 24px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal-box.wide { width: min(920px, 100%); }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
#toasts { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 60; }
.toast { background: var(--night); color: #fff; padding: 10px 16px; border-radius: 9px; box-shadow: var(--shadow); max-width: 420px; animation: pop .2s ease; }
.toast.err { background: var(--bad); }
@keyframes pop { from { transform: translateY(8px); opacity: 0; } }

.side nav .sep { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: #7c7c82; padding: 12px 12px 4px; }
.meter { height: 10px; border-radius: 5px; background: var(--line-2); overflow: hidden; position: relative; margin-top: 8px; }
.meter > span { display: block; height: 100%; background: var(--ok); border-radius: 5px; }
.meter.warn > span { background: var(--warn); } .meter.bad > span { background: var(--bad); }
.meter > i { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--ink-2); opacity: .5; }
.split { display: flex; height: 12px; border-radius: 6px; overflow: hidden; margin: 10px 0 6px; background: var(--line-2); }
.split > span { display: block; height: 100%; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.c-tva { background: #5b7fb5; } .c-cot { background: #c0863a; } .c-ir { background: #8b6fb0; } .c-ach { background: #9aa0a6; } .c-dispo { background: var(--ok); }
.big { font-size: 30px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
tr.sub td { background: #fafafa; font-weight: 600; }
td.ecart-ok { color: var(--ok); } td.ecart-bad { color: var(--bad); font-weight: 600; }
.empty { text-align: center; color: var(--muted); padding: 28px; }
.list-plain { list-style: none; padding: 0; margin: 0; }
.list-plain li { padding: 8px 0; border-bottom: 1px solid var(--line-2); display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.list-plain li:last-child { border-bottom: none; }
.search-results { max-height: 340px; overflow-y: auto; margin-top: 10px; }
.search-results .r { padding: 10px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 6px; cursor: pointer; }
.search-results .r:hover { border-color: var(--anis-fonce); background: var(--anis-soft); }
code { background: var(--line-2); padding: 1px 5px; border-radius: 4px; font-size: 12.5px; }
ol.steps { margin: 6px 0 0; padding-left: 20px; line-height: 1.7; }

@media (max-width: 1100px) {
  .editor { grid-template-columns: 1fr; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.menu-mobile { display: none; }
@media (max-width: 760px) {
  body { flex-direction: column; }
  .side { width: 100%; height: auto; position: static; }
  /* téléphone : le menu se replie derrière « Menu », le contenu de la page passe en premier */
  .side { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 14px; }
  .side .brand.logo { flex: 1; flex-direction: row; align-items: center; padding: 0; }
  .side .brand.logo img { width: 120px; }
  .side .brand.logo span { display: none; }
  .menu-mobile { display: inline-flex; }
  .side:not(.ouvert) nav, .side:not(.ouvert) .side-actions, .side:not(.ouvert) .cta, .side:not(.ouvert) .ligne-cherche { display: none; }
  .side.ouvert nav, .side.ouvert .side-actions, .side.ouvert .cta { flex-basis: 100%; }
  main { padding: 18px 14px; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr 1fr; }
}

/* écran d'accueil du premier lancement */
.bienvenue { max-width: 640px; }
.bienvenue ol { line-height: 1.8; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* erreur de saisie : champ encadré + message dessous (posés par signalerChamp) */
.invalide, .invalide:focus { border-color: var(--bad); outline: 2px solid color-mix(in srgb, var(--bad) 25%, transparent); }
.err-champ { color: var(--bad); font-size: 12px; font-weight: 500; }
/* résultats de l'annuaire : boutons (atteignables au clavier) */
.search-results button.r { display: block; width: 100%; text-align: left; font: inherit; color: inherit; background: var(--panel); }
.search-results button.r:focus-visible { outline: 2px solid var(--accent); }
td a { color: inherit; text-decoration: none; }
td a:hover, td a:focus-visible { text-decoration: underline; }
@media (max-width: 1100px) { .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .form-grid .w3, .form-grid .w4 { grid-column: span 2; } }

/* =====================================================================
   Formatype Devis
   ===================================================================== */
.side .cta { margin: 0 0 14px; }
.side nav a { display: flex; align-items: center; }
.side nav .cnt { margin-left: auto; background: rgba(255,255,255,.14); border-radius: 99px; padding: 0 7px; font-size: 11px; color: #fff; }
.side nav .cnt:empty { display: none; }
.brand span { letter-spacing: .1em; }
.side nav .sep { color: #8a9bbd; }
.moi { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: #dfe5f1; margin-bottom: 6px; }
.moi-nom { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.moi-actions { display: flex; gap: 12px; }
.moi-actions .lien-mini { color: #a9b6d0; }
/* connexion (lot 5) : écran sans barre latérale */
body.sans-menu .side { display: none; }
body.sans-menu #app { margin-left: 0; max-width: none; }
.cnx { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.cnx-carte { width: min(420px, 100%); display: grid; gap: 12px; }
.cnx-carte h1 { font-size: 21px; margin: 0; }
.cnx-carte form { display: grid; gap: 12px; }
.cnx-carte .f { margin: 0; }
.cnx-logo { width: 220px; height: auto; }
.mdp-provisoire code { font-size: 22px; letter-spacing: .06em; background: var(--accent-soft); padding: 6px 12px; border-radius: 8px; }

/* libellés colorés (statut, type) : texte blanc sur couleur, foncé sur les couleurs claires */
.lbl { display: inline-block; border-radius: 4px; color: #fff; font-size: 12px; font-weight: 600; padding: 2px 9px; white-space: nowrap; line-height: 1.4; }
.lbl.fonce { color: #323338; }
/* paramètres : menu d'entrée */
.p-menu { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); grid-auto-rows: 1fr; gap: 14px; }
.p-carte { display: flex; gap: 14px; align-items: flex-start; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
           padding: 16px 18px; box-shadow: var(--shadow); text-decoration: none; color: inherit; min-height: 112px; }
.p-carte .ico { flex: none; width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center;
                background: color-mix(in srgb, var(--accent) 9%, white); color: var(--accent); }
.p-carte .ico svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.p-carte:hover .ico { background: var(--anis-soft); }
.p-carte .txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.p-carte:hover { border-color: var(--anis-fonce); }
.p-carte:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.p-carte b { font-size: 15px; }
.p-carte .d { color: var(--ink-2); font-size: 13px; }
.p-carte .e { margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.p-carte .e.a-regler { color: var(--warn); font-weight: 600; }
/* ---------- listes de travail (03c-travail.js) : liste + aperçu à droite */
.cherche { display: flex; align-items: center; gap: 8px; width: 100%; border: 1px solid #34466b; background: #1a2d52; color: #aab6cc;
           border-radius: 8px; padding: 7px 10px; cursor: pointer; margin: 0; font: inherit; font-size: 13px; }
.cherche:hover { border-color: #4a5f8a; color: #fff; }
.cherche kbd { margin-left: auto; border: 1px solid #4a5a7e; border-radius: 4px; padding: 0 5px; font-size: 11px; font-family: inherit; background: transparent; color: #8a9bbd; box-shadow: none; }
.side nav .cnt.urg { background: #c0473d; }
.side nav .cnt.acc { background: var(--anis); color: var(--night); font-weight: 700; }
.pa { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; flex-wrap: wrap; row-gap: 1px; }
.pa i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); flex: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 18%, transparent); }
.pa b { font-weight: 600; color: var(--ink); }
.pa span { color: var(--muted); }
.pa.retard { --c: #c0473d; } .pa.retard span { color: var(--bad); font-weight: 600; }
.pa.proche { --c: #e08a1e; } .pa.plus-tard { --c: #5aa36e; } .pa.sans { --c: #b8bec8; }
.tl-zone { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; }
.tl-groupe { margin-bottom: 16px; }
.tl-gt { display: flex; align-items: center; gap: 8px; font-size: 14px; margin: 0 0 7px 2px; }
.tl-gt::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--c, #b8bec8); }
.tl-gt.retard { --c: #c0473d; } .tl-gt.proche { --c: #e08a1e; } .tl-gt.plus-tard { --c: #5aa36e; }
.tl-gt .n { font-size: 12px; font-weight: 700; border-radius: 99px; padding: 1px 8px; background: color-mix(in srgb, var(--c, #b8bec8) 17%, white); color: var(--ink-2); }
.tl-liste { padding: 0; overflow: hidden; }
.tl.tl-dem { grid-template-columns: 24px minmax(0, 1fr) 120px auto; text-decoration: none; color: inherit; }
.tl { display: grid; grid-template-columns: 150px minmax(0, 1fr) 92px 26px auto; gap: 14px; align-items: center; padding: 11px 14px;
      border-top: 1px solid var(--line-2); cursor: pointer; }
.tl:first-child { border-top: 0; }
.tl:hover { background: #f7f9fc; }
.tl.sel { background: #eef3fb; box-shadow: inset 3px 0 0 var(--accent); }
.tl > .pa span { flex-basis: 100%; padding-left: 15px; }
.tl-quoi { min-width: 0; }
.tl-quoi b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-quoi small { color: var(--muted); font-size: 12.5px; }
.tl-m { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.tl .btn { justify-self: end; }
.tl-date { font-size: 12.5px; color: var(--muted); }
.tl-apercu { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; padding: 18px; }
.tl-titre { font-size: 17px; margin: 0 0 4px; }
.tl-cl { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; color: var(--ink-2); margin-bottom: 4px; }
.tl-cl a { font-weight: 650; color: var(--ink); text-decoration: none; }
.tl-cl a:hover { text-decoration: underline; }
.tl-pa { border: 1px solid var(--line); border-left: 4px solid var(--anis); border-radius: 8px; padding: 10px 12px; margin: 12px 0; background: #fcfdf6; }
.tl-pa .q { font-size: 11.5px; color: var(--muted); }
.tl-pa .t { margin: 3px 0 0; }
.tl-bas { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.tl-dl { display: grid; grid-template-columns: 120px 1fr; gap: 6px 10px; font-size: 13px; margin: 12px 0; }
.tl-dl dt { color: var(--muted); }
.tl-dl dd { margin: 0; }
.tl-lignes { font-size: 12.5px; border-top: 1px solid var(--line-2); padding-top: 8px; }
.tl-lignes div { display: flex; justify-content: space-between; gap: 10px; padding: 2px 0; }
.tl-lignes .num { white-space: nowrap; }
/* recherche partout (Ctrl+K) */
.rg-fond { position: fixed; inset: 0; background: rgba(11,20,38,.45); z-index: 200; display: grid; place-items: start center; padding: 12vh 16px 0; }
.rg-boite { width: min(640px, 100%); background: #fff; border-radius: 12px; box-shadow: 0 24px 60px rgba(0,0,0,.3); overflow: hidden; }
.rg-boite input { width: 100%; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 14px 16px; font-size: 16px; outline: none; }
.rg-res { max-height: 52vh; overflow: auto; padding: 6px; }
.rg-sec { font-size: 11.5px; color: var(--muted); padding: 6px 10px 2px; }
.rg-l { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px; color: inherit; text-decoration: none; }
.rg-l:hover, .rg-l.on { background: #eef3fb; }
.rg-l .rg-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rg-l small { color: var(--muted); }
.rg-vide { padding: 12px; color: var(--muted); }
.rg-pied { padding: 8px 14px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line-2); }
.rg-pied kbd { border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; font-family: inherit; font-size: 11px; }
@media (max-width: 1100px) {
  .tl-zone { grid-template-columns: 1fr; }
  .tl-apercu { position: static; max-height: none; }
  .tl { grid-template-columns: 1fr auto; }
  .tl > .pa, .tl > .tl-date { grid-column: 1 / -1; }
  .tl > .av { display: none; }
}
/* étape 2 : mail de relance, report, cartes allégées de « Tous les devis » */
.mail-relance { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font: inherit; font-size: 13px; line-height: 1.45; resize: vertical; margin-top: 8px; background: #fff; }
.report-choix { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 12px 0; }
.report-choix .btn { flex-direction: column; gap: 2px; padding: 9px; }
.report-choix small { color: var(--muted); font-weight: 400; font-size: 11.5px; }
.chip.pa-fiche { display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); }
.chip.pa-fiche .lien-mini { font-size: 12px; }
.kc.kc-legere .t { margin-bottom: 2px; min-height: 0; }   /* titre sur 1 ou 2 lignes, sans réserver la 2e */
.kc-cl { color: var(--muted); font-size: 12.5px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.kc-extra { margin-top: 6px; }
.kc-bas { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.kc-m { font-weight: 650; font-variant-numeric: tabular-nums; font-size: 13px; }
.kc-bas .pa span { white-space: nowrap; }
.kc-av { margin-left: auto; display: inline-flex; }
.kc-av .av { width: 22px; height: 22px; font-size: 9.5px; }
/* ---------- fiche devis en parcours (04-fiche-devis.js) */
.fp-tete { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.fp-titre { min-width: 0; }
.fp-meta { display: flex; gap: 8px 12px; align-items: center; flex-wrap: wrap; margin-top: 8px; color: var(--ink-2); }
.fp-meta > a { color: inherit; text-decoration: none; }
.fp-meta > a:hover b { text-decoration: underline; }
.barre-etapes { display: flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: #fff; flex: none; }
.barre-etapes span { padding: 7px 14px 7px 22px; font-size: 12.5px; color: var(--muted); position: relative; background: #fff; }
.barre-etapes span:first-child { padding-left: 14px; }
.barre-etapes span::after { content: ""; position: absolute; right: -9px; top: 50%; width: 16px; height: 16px; background: inherit; border-top: 1px solid var(--line);
  border-right: 1px solid var(--line); transform: translateY(-50%) rotate(45deg); z-index: 1; }
.barre-etapes span:last-child::after { display: none; }
.barre-etapes span.f { color: var(--night); background: #f2f4f8; }
.barre-etapes span.c { color: var(--night); font-weight: 700; background: var(--anis-soft); }
.fp-suite { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--anis);
  border-radius: var(--r); padding: 11px 16px; margin-bottom: 16px; box-shadow: var(--shadow); }
.fp-suite .q { font-size: 12px; color: var(--muted); }
.fp-suite .t { font-weight: 600; margin-top: 2px; }
.fp-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.menu-plus { position: relative; }
.pop-plus { position: absolute; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 8px 28px rgba(20,38,74,.16); padding: 6px; z-index: 40; min-width: 270px; }
.pop-plus button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 7px; cursor: pointer; font: inherit; }
.pop-plus button:hover { background: var(--line-2); }
.pop-plus button.danger { color: var(--bad); }
.fp-grille { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.fp-section { margin-bottom: 14px; }
.fp-section-t { display: flex; align-items: baseline; justify-content: space-between; margin: 0 0 8px; }
.etapes { list-style: none; margin: 0; padding: 0; }
.etape { position: relative; padding-left: 40px; margin-bottom: 10px; }
.etape::before { content: ""; position: absolute; left: 13px; top: 30px; bottom: -12px; width: 2px; background: var(--line); }
.etape:last-child::before { display: none; }
.etape .pt { position: absolute; left: 0; top: 9px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 12px;
  font-weight: 700; background: #fff; border: 2px solid var(--line); color: var(--muted); }
.etape.faite .pt { background: var(--night); border-color: var(--night); color: #fff; }
.etape.encours .pt { background: var(--anis); border-color: var(--anis); color: var(--night); box-shadow: 0 0 0 4px var(--anis-soft); }
.etape .boite { background: #fff; border: 1px solid var(--line); border-radius: var(--r); }
.etape.avenir .boite { background: transparent; border-style: dashed; }
.etape.encours .boite { box-shadow: var(--shadow); border-color: #cfd6c0; }
.etape .bt { display: flex; align-items: baseline; gap: 10px; padding: 11px 16px; width: 100%; border: 0; background: none; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.etape .bt:disabled { cursor: default; }
.etape .bt h2 { font-size: 14.5px; margin: 0; }
.etape.avenir .bt h2 { color: var(--muted); font-weight: 600; }
.etape .bt .res { color: var(--muted); font-size: 13px; }
.etape .bt .chev { margin-left: auto; color: var(--muted); font-size: 12px; }
.etape .bt:hover:not(:disabled) .chev { color: var(--accent); text-decoration: underline; }
.etape .corps { padding: 2px 16px 16px; }
.etape .corps .card { box-shadow: none; }
.etape .corps .g-fiche { margin-top: 0; }
.controle { list-style: none; padding: 0; margin: 4px 0 0; font-size: 13.5px; }
.controle li { padding: 3px 0; }
.controle .ok::before { content: "✓"; color: var(--ok); font-weight: 700; margin-right: 8px; }
.controle .at::before { content: "!"; color: var(--warn); font-weight: 800; margin: 0 11px 0 3px; }
.fp-lat .card { padding: 14px 16px; margin-bottom: 12px; }
.fp-lat .card + .card { margin-top: 0; }
.fp-lat h2 { font-size: 13.5px; margin: 0 0 8px; }
.note { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; font: inherit; font-size: 13px; resize: vertical; min-height: 38px; }
.fp-note-b { text-align: right; margin: 6px 0 4px; }
.fil { max-height: 420px; overflow: auto; }
.fil .ev { font-size: 12.5px; padding: 7px 0; border-top: 1px solid var(--line-2); }
.fil .ev:first-child { border-top: 0; }
.fil .ev small { display: block; color: var(--muted); font-size: 11.5px; margin-top: 1px; }
.fil .ev.note-i { background: #fffbea; border-radius: 6px; padding: 7px 8px; border-top-color: transparent; }
.btn.a-enregistrer::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #c0473d; margin-left: 2px; }
.etape .corps .g-fiche { grid-template-columns: 1fr; }   /* étape Demande : formulaire sur toute la largeur, champs lisibles */
/* lignes ouvertes : toute la largeur pour chiffrer, le fil, le client et le dossier passent dessous */
.fp-grille.fp-large { grid-template-columns: 1fr; }
.fp-large .fp-lat { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px; align-items: start; }
.fp-large .fp-lat .card { margin: 0; }
@media (max-width: 1100px) { .fp-grille { grid-template-columns: 1fr; } .fp-large .fp-lat { grid-template-columns: 1fr; } .barre-etapes { display: none; } }
/* ---------- demandes reçues (03e-demandes.js) */
.tl.dm { grid-template-columns: 30px minmax(0, 1fr) 120px 26px auto; }
.dm-ico { width: 30px; height: 30px; border-radius: 8px; background: #eef1f6; color: var(--accent); display: grid; place-items: center; }
.dm-tag { font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.dm-tag.ok { color: var(--ok); } .dm-tag.nouveau { color: var(--warn); } .dm-tag.cde { color: var(--accent); }
.dm-texte { background: #fafbfd; border: 1px solid var(--line-2); border-radius: 8px; padding: 10px 12px; font-size: 13px; line-height: 1.45;
  color: var(--ink-2); white-space: pre-wrap; max-height: 220px; overflow: auto; margin: 10px 0; }
.dm-pj { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.dm-attrib { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.dm-attrib select { border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; background: #fff; font: inherit; }
.rt-liste { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; max-height: 50vh; overflow: auto; }
.rt-l { display: flex; gap: 10px; align-items: center; text-align: left; border: 1px solid var(--line-2); background: #fff; border-radius: 8px; padding: 8px 10px; cursor: pointer; font: inherit; }
.rt-l:hover { border-color: var(--accent); background: #f6f8fb; }
.rt-l > span:not(.lbl) { flex: 1; min-width: 0; }
/* étape 5 : vues enregistrées du menu, devis proches */
.side nav a.vue { padding-left: 26px; font-size: 12.5px; color: #a9b6d0; }
/* charge et planning : la frise (une « tôle » par devis, de la réception à la réponse promise) */
:root { --pf-jw: 28px; --pf-nom: 200px; --laser: #e0413a; }
.av.sm { width: 22px; height: 22px; font-size: 9.5px; }
.pf-puces { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pf-puce { display: inline-flex; align-items: center; gap: 7px; background: #fff; border: 1px solid var(--line); border-radius: 99px; padding: 4px 12px 4px 10px; font-size: 13px; color: var(--ink-2); box-shadow: 0 1px 2px rgba(20,38,74,.06); }
.pf-puce b { color: var(--ink); font-weight: 650; }
.pf-puce i { width: 8px; height: 8px; border-radius: 50%; }
.pf-puce.r { background: #fde4e2; border-color: #f6b9b4; color: #9b241d; } .pf-puce.r b { color: #9b241d; } .pf-puce.r i { background: #e5372e; }
.pf-puce.a i { border: 1.5px dashed var(--ink-2); }
.pf-puce.l { background: #fdf1d6; border-color: #f2d48c; color: #7a5200; } .pf-puce.l b { color: #7a5200; }
.pf-puce.l i { background: #e09a00; border-radius: 1px; transform: rotate(45deg); width: 7px; height: 7px; }
.pf-outils { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 0 0 14px; }
.pf-outils .seg button { padding: 5px 11px; font-size: 13px; }
.pf-outils .seg button:disabled { opacity: .4; cursor: default; }
.pf-outils #pf-prec, .pf-outils #pf-suiv { font-size: 16px; line-height: 1; padding: 4px 11px 6px; }
.pf-periode { font-weight: 600; font-size: 13.5px; color: var(--ink-2); white-space: nowrap; }
.pf-aide { margin-left: auto; color: var(--muted); font-size: 12.5px; }
.pf-zone { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; align-items: start; }
.pf-frise { background: #fff; border-radius: 14px; border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(20,38,74,.06), 0 8px 24px rgba(20,38,74,.06); overflow: hidden; min-width: 0; }
.pf-haut { padding: 10px 16px; border-bottom: 1px solid var(--line); background: #fbfcfe; font-size: 12.5px; color: var(--ink-2); }
.pf-leg { display: flex; gap: 6px 14px; flex-wrap: wrap; align-items: center; }
.pf-leg > span { display: inline-flex; align-items: center; gap: 6px; }
.pf-sw { width: 22px; height: 12px; border-radius: 3px 0 3px 3px; clip-path: polygon(0 0, calc(100% - 5px) 0, 100% 5px, 100% 100%, 0 100%); background: var(--a); }
.pf-sw.recu { background: #fff; box-shadow: inset 0 0 0 1.5px #2346b8, inset 3px 0 0 #2346b8; }
.pf-sw.modif { background: repeating-linear-gradient(-45deg, rgba(255,255,255,.3) 0 3px, transparent 3px 6px), #2346b8; }
.pf-sw.pret { background: #c4d0f0; }
.pf-sw.ecoule { background: linear-gradient(90deg, #9db0e6 0 55%, #2346b8 55%); }
.pf-sw.retard { background: repeating-linear-gradient(-45deg, rgba(229,55,46,.35) 0 3px, rgba(229,55,46,.1) 3px 6px); clip-path: none; }
.pf-sw-l { width: 9px; height: 9px; background: linear-gradient(135deg, #ffcf4a, #e09a00); transform: rotate(45deg); border-radius: 1px; }
/* seul le planning défile : en-tête collé en haut, noms collés à gauche */
.pf-defile { overflow: auto; position: relative; overscroll-behavior: contain; }
.pf-grille { position: relative; min-width: calc(var(--pf-nom) + var(--pf-jw) * var(--n)); }
.pf-ent { display: grid; grid-template-columns: var(--pf-nom) 1fr; position: sticky; top: 0; z-index: 8; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 4px 10px -6px rgba(20,38,74,.25); }
.pf-coin { padding: 12px 16px; font-size: 12px; color: var(--muted); display: flex; align-items: flex-end; border-right: 1px solid var(--line);
  background: linear-gradient(180deg, var(--night) 0 46px, #fff 46px); position: sticky; left: 0; z-index: 2; }
.pf-sems { display: flex; background: var(--night); }
.pf-sem { width: calc(var(--pf-jw) * 5); height: 46px; padding: 0 10px; border-left: 1px solid #2a3f68; display: flex; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; flex: none; }
.pf-sem:first-child { border-left: 0; }
.pf-sem b { font-size: 18px; font-weight: 300; color: #fff; letter-spacing: -.01em; }
.pf-sem span { font-size: 12px; color: #aeb8cf; }
.pf-sem.cour { background: linear-gradient(180deg, #203a6b, var(--night)); box-shadow: inset 0 -3px 0 var(--anis); }
.pf-sem.cour b { font-weight: 700; color: var(--anis); }
.pf-sem.cour em { font-style: normal; font-size: 11px; background: var(--anis); color: var(--night); border-radius: 4px; padding: 0 6px; font-weight: 650; }
.pf-jours { display: flex; }
.pf-jour { width: var(--pf-jw); flex: none; text-align: center; font-size: 11px; color: var(--muted); padding: 6px 0 8px; line-height: 1.15; }
.pf-jour b { display: block; font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
.pf-jour.d5 { box-shadow: inset 1px 0 0 var(--line); }
.pf-jour.cour { background: #f6f9e4; }
.pf-jour.auj { color: var(--laser); }
.pf-jour.auj b { color: #fff; background: var(--laser); border-radius: 99px; width: 22px; height: 20px; line-height: 20px; margin: 0 auto; box-shadow: 0 2px 6px rgba(224,65,58,.45); }
.pf-ligne { display: grid; grid-template-columns: var(--pf-nom) 1fr; border-bottom: 1px solid var(--line-2); position: relative; }
.pf-ligne:last-child { border-bottom: 0; }
.pf-ligne.cible .pf-piste { background-color: #eef6c9; }
.pf-ligne.cible .pf-qui { box-shadow: inset 4px 0 0 var(--anis); }
.pf-ligne.va .pf-piste, .pf-ligne.va .pf-qui { background-color: #f7f8fb; }
.pf-qui { padding: 12px 14px 10px 16px; border-right: 1px solid var(--line); display: flex; gap: 11px; align-items: flex-start; background: #fff; position: sticky; left: 0; z-index: 3;
  box-shadow: inset 4px 0 0 var(--p, transparent); min-width: 0; }
.pf-qui > div { min-width: 0; }
.pf-qui .av { width: 34px; height: 34px; font-size: 12px; }
.pf-qui b { display: block; font-weight: 600; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-qui small { color: var(--muted); font-size: 12px; }
.pf-piste { position: relative; background-image: linear-gradient(to right, var(--line-2) 1px, transparent 1px), linear-gradient(to right, var(--line) 1px, transparent 1px);
  background-size: var(--pf-jw) 100%, calc(var(--pf-jw) * 5) 100%; }
.pf-fond-sem { position: absolute; top: 0; bottom: 0; width: calc(var(--pf-jw) * 5); background: rgba(187,207,0,.075); }
.pf-fond-auj { position: absolute; top: 0; bottom: 0; width: var(--pf-jw); background: rgba(224,65,58,.06); }
/* la tôle : coin coupé, reflet du métal ; l'état se lit à la matière */
.pf-barre { position: absolute; height: 34px; filter: drop-shadow(0 1px 1px rgba(20,38,74,.12)); transition: filter .15s, transform .15s; touch-action: none; user-select: none; cursor: grab; }
.pf-barre:hover, .pf-barre:focus-visible { filter: drop-shadow(0 4px 8px rgba(20,38,74,.22)); transform: translateY(-1px); outline: none; z-index: 2; }
.pf-barre:focus-visible .pf-tole { box-shadow: inset 0 0 0 2px var(--anis); }
.pf-tole { position: absolute; inset: 0; border-radius: 5px 0 5px 5px; clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
  background: linear-gradient(180deg, rgba(255,255,255,.28) 0, rgba(255,255,255,.06) 42%, rgba(0,0,0,0) 55%, rgba(0,0,0,.16) 100%), var(--a); color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), inset 0 -2px 0 rgba(0,0,0,.12);
  display: flex; flex-direction: column; justify-content: center; padding: 0 14px 0 10px; overflow: hidden; text-align: left; }
.pf-tole .l1, .pf-tole .l2 { position: relative; z-index: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.25; }
.pf-tole .l1 { font-size: 12.5px; display: flex; gap: 4px; align-items: baseline; }
.pf-tole .l1 b { font-weight: 700; font-variant-numeric: tabular-nums; }
.pf-tole .l1 .des { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-weight: 400; }
.pf-tole .l1 .cli { font-variant-numeric: normal; }
.pf-tole .l2 { font-size: 11px; opacity: .85; }
.pf-tole .ht { margin-left: auto; flex: none; font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums; background: rgba(255,255,255,.2); border-radius: 4px; padding: 0 5px; }
.pf-barre.e-recu .pf-tole { background: linear-gradient(180deg, #fff, color-mix(in srgb, var(--a) 12%, #fff)); color: color-mix(in srgb, var(--a) 85%, #000);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--a) 70%, #fff), inset 4px 0 0 var(--a); }
.pf-barre.e-modif .pf-tole { background: linear-gradient(180deg, rgba(255,255,255,.22), rgba(0,0,0,.14)), repeating-linear-gradient(-45deg, rgba(255,255,255,.2) 0 6px, transparent 6px 12px), var(--a); }
.pf-barre.e-pret .pf-tole { background: linear-gradient(180deg, color-mix(in srgb, var(--a) 18%, #fff), color-mix(in srgb, var(--a) 32%, #fff)); color: color-mix(in srgb, var(--a) 85%, #000);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--a) 45%, #fff); }
.pf-barre.e-pret .l1::before { content: "✓"; font-weight: 700; }
.pf-barre.e-recu .ht, .pf-barre.e-pret .ht { background: color-mix(in srgb, var(--a) 14%, #fff); }
.pf-barre.mini .pf-tole { padding: 0 6px; }
.pf-barre.mini .l2 { display: none; }
.pf-barre.avant .pf-tole { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.pf-ecoule { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, rgba(255,255,255,.42), rgba(255,255,255,.3)); pointer-events: none; border-right: 2px solid rgba(255,255,255,.85); }
.pf-barre.e-recu .pf-ecoule, .pf-barre.e-pret .pf-ecoule { background: rgba(20,38,74,.07); border-right-color: color-mix(in srgb, var(--a) 50%, #fff); }
.pf-poignee { position: absolute; right: -3px; top: 4px; bottom: 4px; width: 10px; cursor: ew-resize; z-index: 2; border-radius: 3px; }
.pf-poignee::after { content: ""; position: absolute; right: 4px; top: 9px; bottom: 9px; width: 2px; border-radius: 1px; background: rgba(255,255,255,.7); opacity: 0; transition: opacity .15s; }
.pf-barre.e-recu .pf-poignee::after, .pf-barre.e-pret .pf-poignee::after { background: color-mix(in srgb, var(--a) 70%, #fff); }
.pf-barre:hover .pf-poignee::after { opacity: 1; }
.pf-barre.glisse { z-index: 20; filter: drop-shadow(0 10px 18px rgba(20,38,74,.32)); transition: none; opacity: .93; cursor: grabbing; }
.pf-barre.etire { z-index: 20; transition: none; }
.pf-etiq { position: absolute; top: -24px; right: -6px; background: var(--night); color: #fff; font-size: 11.5px; border-radius: 6px; padding: 2px 7px; white-space: nowrap; pointer-events: none; }
.pf-depasse { position: absolute; height: 34px; border-radius: 0 5px 5px 0; background: repeating-linear-gradient(-45deg, rgba(229,55,46,.34) 0 5px, rgba(229,55,46,.1) 5px 10px);
  box-shadow: inset 0 0 0 1.5px rgba(229,55,46,.55); display: flex; align-items: center; justify-content: flex-end; padding-right: 7px; font-size: 11px; font-weight: 700; color: #b3241c; pointer-events: none; }
.pf-losange { position: absolute; width: 12px; height: 12px; background: linear-gradient(135deg, #ffcf4a, #e09a00); transform: rotate(45deg); border-radius: 2px; box-shadow: 0 0 0 2px #fff; }
.pf-losange:hover, .pf-losange:focus-visible { outline: none; box-shadow: 0 0 0 2px #fff, 0 0 0 4px #e09a00; }
.pf-bande { position: absolute; left: 0; right: 0; bottom: 6px; height: 22px; display: flex; pointer-events: none; }
.pf-bseg { width: calc(var(--pf-jw) * 5 - 6px); flex: none; margin: 0 3px; padding: 0 7px; display: flex; align-items: center; gap: 6px; border-radius: 6px; background: var(--hb); }
.pf-bseg.n0 { background: transparent; }
.pf-bseg .bb { flex: 1; height: 5px; border-radius: 3px; background: rgba(20,38,74,.08); overflow: hidden; }
.pf-bseg .bb i { display: block; height: 100%; border-radius: 3px; background: var(--h); }
.pf-bseg span:last-child { font-size: 11px; color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.pf-bseg.n4 span:last-child { color: #b3241c; font-weight: 700; } .pf-bseg.n3 span:last-child { color: #8a5a00; font-weight: 600; }
.n0 { --h: #c3c8d2; --hb: #f3f5f8; } .n1 { --h: #2fa36b; --hb: #e3f5ec; } .n2 { --h: #97b800; --hb: #f1f7d2; } .n3 { --h: #f0a000; --hb: #fdf1d6; } .n4 { --h: #e5372e; --hb: #fde4e2; }
/* le trait laser d'aujourd'hui : il balaie la frise à la première ouverture */
.pf-laser { position: absolute; bottom: 0; width: 2px; margin-left: -1px; background: var(--laser); z-index: 5; pointer-events: none; opacity: .9;
  box-shadow: 0 0 4px rgba(224,65,58,.55), 0 0 12px rgba(224,65,58,.22); }
.pf-laser::before { content: ""; position: absolute; top: -5px; left: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--laser); box-shadow: 0 0 10px rgba(224,65,58,.9); }
.pf-laser.balaye { animation: pf-balaye .9s cubic-bezier(.65,.05,.25,1) both; }
@keyframes pf-balaye { from { left: var(--depart); } to { left: var(--arrivee); } }
/* panneau de droite */
.pf-panneau { display: grid; gap: 16px; }
.pf-carte { padding: 16px; margin: 0; }
.pf-carte h2 { margin: 0 0 2px; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.pf-carte h2::before { content: ""; width: 4px; height: 16px; border-radius: 2px; background: var(--anis); }
.pf-s { color: var(--muted); font-size: 12.5px; margin: 0 0 10px; }
.pf-ch { display: grid; grid-template-columns: 24px 1fr auto; gap: 4px 9px; align-items: center; margin: 9px 0; font-size: 13px; }
.pf-ch .bb { grid-column: 2 / 4; height: 8px; border-radius: 4px; background: #eceff4; overflow: hidden; }
.pf-ch .bb i { display: block; height: 100%; background: var(--h); border-radius: 4px; }
.pf-ch .v { font-size: 12.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.pf-ch.n4 .v { color: #b3241c; font-weight: 700; } .pf-ch.n3 .v { color: #8a5a00; font-weight: 600; }
.pf-sug { border-radius: 10px; background: linear-gradient(135deg, #f6fadb, #eaf3b0); border: 1px solid #d3e07a; padding: 12px; font-size: 13px; margin-top: 12px; }
.pf-sug p { margin: 0 0 9px; }
/* fiche rapide et bulle */
.pf-pop { position: fixed; z-index: 50; width: 340px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 36px rgba(20,38,74,.2); overflow: hidden; }
.pf-pop-t { padding: 14px 16px 12px; border-left: 4px solid var(--a); }
.pf-pop-t b { display: block; font-size: 14.5px; font-weight: 650; line-height: 1.25; }
.pf-pop-t small { color: var(--muted); }
.pf-pop-dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; padding: 0 16px 12px 20px; font-size: 12.5px; margin: 0; }
.pf-pop-dl dt { color: var(--muted); } .pf-pop-dl dd { margin: 0; }
.pf-retard { color: var(--bad); font-weight: 600; }
.pf-pop-s { border-top: 1px solid var(--line-2); padding: 8px; }
.pf-pop-s h3 { margin: 2px 8px 4px; font-size: 11.5px; font-weight: 600; color: var(--muted); }
.pf-mi { display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; padding: 6px 8px; border-radius: 8px; font: inherit; font-size: 13px; border: 0; background: none; cursor: pointer; color: var(--ink); }
.pf-mi:hover:not(:disabled), .pf-mi:focus-visible { background: var(--line-2); outline: none; }
.pf-mi:disabled { opacity: .5; cursor: default; }
.pf-mi .mn { flex: 1; min-width: 0; line-height: 1.25; }
.pf-mi small { display: block; color: var(--muted); font-size: 11.5px; }
.pf-jauge { display: inline-block; height: 6px; border-radius: 3px; background: var(--line-2); overflow: hidden; flex: none; }
.pf-jauge i { display: block; height: 100%; background: var(--h); }
.pf-pop-b { display: flex; gap: 8px; padding: 10px 16px 14px; border-top: 1px solid var(--line-2); align-items: center; flex-wrap: wrap; }
.pf-pop-b .btn { white-space: nowrap; }
.pf-dec { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; font-size: 12.5px; color: var(--ink-2); }
.pf-dec button { width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 7px; background: #fff; cursor: pointer; font: inherit; }
.pf-bulle { position: fixed; z-index: 60; pointer-events: none; background: var(--night); color: #e7ebf3; border-radius: 9px; padding: 9px 12px; font-size: 12.5px; line-height: 1.45; max-width: 300px; box-shadow: 0 8px 22px rgba(0,0,0,.22); }
.pf-bulle b { color: #fff; }
.pf-bulle-aide { opacity: .7; }
@media (max-width: 1200px) { .pf-zone { grid-template-columns: 1fr; } .pf-panneau { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); } }
@media (max-width: 760px) { :root { --pf-nom: 150px; } .pf-aide { display: none; } }
@media (prefers-reduced-motion: reduce) { .pf-laser.balaye { animation: none; } .pf-barre { transition: none; } }

/* carte d'activité : une carte par deviseur, anneaux de charge, devis du plus urgent au moins urgent */
/* à gauche ce qui demande une décision (à attribuer, rééquilibrage) ; à droite les cartes des deviseurs, en colonnes sans trou */
.ca-page { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: 16px; align-items: start; }
.ca-gauche { display: grid; gap: 16px; position: sticky; top: 16px; }
.ca-cartes { columns: 400px; column-gap: 16px; }
.ca-cartes > .ca-c { break-inside: avoid; margin: 0 0 16px; }
.ca-gauche > .card + .card, .ca-cartes > .card + .card { margin-top: 0; }   /* l'écart vient de la grille et des colonnes */
@media (max-width: 1000px) { .ca-page { grid-template-columns: 1fr; } .ca-gauche { position: static; } }
.ca-c { margin: 0; padding: 14px 16px 12px; min-width: 0; box-shadow: inset 0 4px 0 var(--p, transparent), var(--shadow); }
.ca-c header { display: flex; align-items: center; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line-2); }
.ca-c h2 { margin: 0; font-size: 15px; line-height: 1.2; }
.ca-c header .id { flex: 1; min-width: 0; }
.ca-c header .m { font-size: 12.5px; color: var(--muted); }
.ca-anns { display: flex; gap: 12px; }
.ca-ann { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.ca-ann svg { display: block; }
.ca-ann .lb { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.ca-ann .lb b { color: var(--ink-2); font-weight: 600; }
.ca-l { list-style: none; margin: 6px 0 0; padding: 0; }
.ca-l li { border-bottom: 1px solid var(--line-2); }
.ca-l li:last-child { border-bottom: 0; }
.ca-ligne { display: grid; grid-template-columns: 10px 46px minmax(0, 1fr) auto auto; gap: 8px; align-items: center; width: 100%; padding: 6px 4px; font: inherit; font-size: 13px;
  background: none; border: 0; border-radius: 6px; text-align: left; cursor: pointer; color: inherit; text-decoration: none; }
.ca-ligne:hover, .ca-ligne:focus-visible { background: #f5f7fb; outline: none; }
.ca-ligne .des { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ca-l li.late .des { color: var(--bad); }
.ca-l li.rel .ca-ligne { color: var(--ink-2); }
.ca-num { font-weight: 650; font-variant-numeric: tabular-nums; }
.ca-ht { font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ca-pa { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--a); flex: none; }
.ca-los { display: inline-block; width: 9px; height: 9px; background: linear-gradient(135deg, #ffcf4a, #e09a00); transform: rotate(45deg); border-radius: 1px; }
.ca-dl { font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; padding: 1px 8px; border-radius: 99px; background: var(--line-2); color: var(--ink-2); }
.ca-dl.warn { background: #fdf1d6; color: #7a5200; }
.ca-dl.bad { background: #fde4e2; color: #9b241d; font-weight: 600; }
.ca-dl.pret { background: #e3eefa; color: #2c4f8a; }
.ca-vide { color: var(--muted); font-size: 13px; padding: 10px 4px 4px; }
.ca-va { border: 2px solid var(--anis); box-shadow: 0 0 0 4px var(--anis-soft), var(--shadow); }
.ca-va header .av { width: 34px; height: 34px; }
.ca-it { padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.ca-it:last-child { border-bottom: 0; }
.ca-it .l1 { display: flex; align-items: center; gap: 7px; font-size: 13.5px; min-width: 0; }
.ca-it .l1 .des { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); }
.ca-it .l2 { font-size: 12.5px; color: var(--muted); margin: 2px 0 8px 17px; }
.ca-it .ac, .ca-sug .ac { display: flex; gap: 6px; flex-wrap: wrap; margin-left: 17px; }
.ca-sug { background: linear-gradient(135deg, #f6fadb, #eaf3b0); border-color: #d3e07a; }
.ca-sug h2 { margin-bottom: 8px; }
.ca-sug .s { padding: 10px 0; border-top: 1px solid #dfe8a3; font-size: 13.5px; }
.ca-sug .s:first-of-type { border-top: 0; padding-top: 2px; }
.ca-sug .s p { margin: 0 0 8px; }
.ca-sug .ac { margin-left: 0; }
.ca-ok { color: var(--ink-2); font-size: 13px; margin: 0; }
.ca-leg { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; font-size: 12.5px; color: var(--ink-2); margin-top: 14px; }
.ca-leg > span { display: inline-flex; align-items: center; gap: 6px; }

/* notifications : cloche à côté de « Rechercher », panneau à droite du menu */
.ligne-cherche { display: flex; gap: 6px; align-items: stretch; margin: 0 0 12px; }
.ligne-cherche .cherche { flex: 1; min-width: 0; }
.cloche { position: relative; flex: none; width: 38px; border: 1px solid #34466b; background: #1a2d52; color: #aab6cc; border-radius: 8px; cursor: pointer; display: grid; place-items: center; }
.cloche:hover, .cloche[aria-expanded="true"] { border-color: #4a5f8a; color: #fff; }
.cloche:focus-visible { outline: 2px solid var(--anis); outline-offset: 1px; }
.cloche svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.cloche .cnt { position: absolute; top: -6px; right: -6px; margin: 0; min-width: 18px; text-align: center; padding: 0 5px; font-size: 10.5px; line-height: 17px;
  border-radius: 99px; background: var(--bad); color: #fff; font-weight: 700; box-shadow: 0 0 0 2px var(--night); }
.cloche .cnt:empty { display: none; }
.notif-panneau { color: var(--ink); position: fixed; left: 252px; top: 150px; width: 380px; max-height: min(560px, calc(100vh - 170px)); overflow-y: auto; z-index: 60;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 40px rgba(20,38,74,.22); }
.notif-tete { display: flex; align-items: center; gap: 10px; padding: 14px 16px 10px; border-bottom: 1px solid var(--line-2); position: sticky; top: 0; background: #fff; }
.notif-tete h2 { margin: 0; font-size: 15px; }
.notif-tete .lien { margin-left: auto; font-size: 12.5px; }
.notif-liste { list-style: none; margin: 0; padding: 4px 0; }
.notif { display: flex; gap: 10px; width: 100%; text-align: left; border: 0; background: none; padding: 10px 16px; cursor: pointer; font: inherit; font-size: 13px; color: var(--ink-2); line-height: 1.45; }
.notif:hover, .notif:focus-visible { background: var(--bg); outline: none; }
.notif i { flex: none; width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; opacity: .35; }
.notif.nouvelle { color: var(--ink); }
.notif.nouvelle { background: #f7f9fd; }
.notif.nouvelle i { opacity: 1; }
.notif b { color: var(--ink); }
.notif small { display: block; color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.notif-panneau .empty { padding: 26px 18px; }
@media (max-width: 760px) { .notif-panneau { left: 8px; right: 8px; width: auto; top: 70px; } }

.t-activites { width: auto; min-width: 520px; font-size: 13px; }
.t-activites th { font-weight: 600; color: var(--muted); font-size: 12px; text-align: left; padding: 4px 10px 4px 0; }
.t-activites td { padding: 4px 10px 4px 0; }
.t-activites input { width: 110px; }

/* pièces jointes d'une demande : à ouvrir d'un clic */
.dm-pj a.fichier { text-decoration: none; color: var(--accent); cursor: pointer; }
.dm-pj a.fichier:hover { text-decoration: underline; border-color: var(--accent); }
.dm-mail { display: inline-block; margin: 2px 0 10px; }

/* lien secondaire d'en-tête (ex. « Voir les demandes traitées ») : discret, pas un bouton */
.lien-discret { font-size: 13px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line); }
.lien-discret:hover { color: var(--accent); text-decoration-color: currentColor; }

/* charge du deviseur, sous la date de réponse */
.charge-dev { font-size: 12.5px; color: var(--muted); margin-top: -4px; }
.charge-dev:empty { display: none; }
.charge-dev.moyenne { color: #8a5a10; }
.charge-dev.forte { color: #b8322a; font-weight: 600; }
/* rubriques réductibles du menu : titre cliquable ; réduite, le titre garde le compteur de ce qu'elle contient */
.side nav button.sep { display: flex; align-items: center; gap: 6px; width: 100%; background: none; border: 0; border-radius: 6px; cursor: pointer; text-align: left; font-family: inherit; }
.side nav button.sep:hover { color: #c9d2e3; }
.side nav button.sep:focus-visible { outline: 2px solid var(--anis); outline-offset: 1px; }
.side nav button.sep::after { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); margin: -3px 2px 0 auto; order: 3; transition: transform .15s; }
.side nav button.sep[aria-expanded="false"]::after { transform: rotate(-45deg); margin-top: 0; }
.side nav button.sep .cnt { margin-left: auto; text-transform: none; letter-spacing: 0; }
.side nav button.sep[aria-expanded="true"] .cnt { display: none; }
.side nav .groupe { display: flex; flex-direction: column; gap: 2px; }
@media (prefers-reduced-motion: reduce) { .side nav button.sep::after { transition: none; } }
.side nav a.vue::before { content: "›"; margin-right: 6px; color: #6f7f9f; }
details.proches { border: 1px dashed #b9c4d6; border-radius: 9px; padding: 10px 12px; margin-bottom: 12px; background: #fafbfd; }
details.proches summary { cursor: pointer; display: flex; gap: 10px; align-items: baseline; }
.devis-proche { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 4px 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line-2); }
.devis-proche:first-of-type { margin-top: 8px; }
.devis-proche > a { color: inherit; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.devis-proche > a:hover { text-decoration: underline; }
.devis-proche > .muted { grid-column: 1; grid-row: 2; }
.devis-proche .num { font-variant-numeric: tabular-nums; font-weight: 600; }
.devis-proche .btn { grid-row: 1 / span 2; grid-column: 4; }
/* « Tous les devis » (maquette D) : outils compacts à droite du titre, colonnes qui tiennent dans l'écran, aperçu en tiroir */
.tous-tete { align-items: flex-start; }
.barre.barre-d { background: none; border: 0; padding: 0; margin: 0; gap: 6px; justify-content: flex-end; }
.barre-d .rech { border: 1px solid var(--line); border-radius: 99px; background: #fff; padding: 0 10px; }
.barre-d .rech input { width: 160px; }
.barre-d .outil { border: 1px solid var(--line); border-radius: 99px; background: #fff; padding: 5px 12px; }
.barre-d .outil.on { border-color: color-mix(in srgb, var(--accent) 35%, white); }
.barre-d .seg { margin-left: 4px; }
.tous-defaut { text-align: right; margin: -12px 0 10px; font-size: 13px; }
.kanban.kanban-d { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); overflow: visible; }
.kanban-d .kcol { min-width: 0; width: auto; max-width: none; flex: none; }
.kanban-d .kc.sel { box-shadow: 0 0 0 2px var(--accent); }
.tous-tiroir { position: fixed; right: 20px; top: 84px; width: 390px; max-height: calc(100vh - 104px); z-index: 30; box-shadow: 0 16px 40px rgba(20,38,74,.22); }
.tous-tiroir .tiroir-fermer { float: right; margin: -6px -6px 0 8px; }
@media (max-width: 1100px) { .kanban.kanban-d { grid-template-columns: repeat(var(--n), 230px); overflow-x: auto; } .tous-tiroir { left: 16px; right: 16px; width: auto; } }
/* harmonisation : montants et libellés d'un seul tenant ; dans les listes, boutons neutres (le vert reste à l'aperçu et à la fiche) */
.kc-m, .tl-m { white-space: nowrap; }
.pa b { white-space: nowrap; }
.tl .btn.primary { background: #fff; border-color: var(--line); color: var(--ink); font-weight: 600; }
.tl .btn.primary:hover { border-color: var(--anis-fonce); background: var(--anis-soft); }
.tl-zone.sans-apercu { grid-template-columns: 1fr; }
/* en-tête commun : titre à gauche, outils compacts à droite (Tous les devis, commandes, clients, tableau de bord, journal) */
.page-head .barre.barre-d { margin-left: auto; }
.barre-d .seg.petit button { padding: 5px 10px; }
.barre-d select { border: 1px solid var(--line); border-radius: 99px; padding: 5px 10px; background: #fff; font: inherit; width: auto; }
.barre-d .bascule-chip { display: inline-flex; gap: 6px; align-items: center; border: 1px solid var(--line); border-radius: 99px; padding: 5px 12px; background: #fff; color: var(--ink-2); cursor: pointer; }
.barre-d .bascule-chip input { width: auto; margin: 0; }
.fiche-origine { margin-top: 12px; font-size: 12.5px; color: var(--muted); display: flex; gap: 6px 16px; flex-wrap: wrap; }
.pastilles-choix { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.pastille-choix { width: 34px; height: 34px; border-radius: 50%; border: 0; color: #fff; font: inherit; font-size: 12px; font-weight: 700;
                  cursor: pointer; box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--line); }
.pastille-choix[aria-pressed="true"] { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--night); }
.pastille-choix:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.lbl.st { background: color-mix(in srgb, var(--c) 17%, white); color: var(--t, color-mix(in srgb, var(--c) 72%, black));
          box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 28%, white); }
.av { width: 24px; height: 24px; border-radius: 50%; color: #fff; display: inline-grid; place-items: center; font-size: 10px; font-weight: 700; flex: none; }
.av.lg { width: 34px; height: 34px; font-size: 12px; }
.qui { display: inline-flex; align-items: center; gap: 6px; }
.jx { font-weight: 600; font-size: 12px; }
.jx.rouge { color: var(--bad); } .jx.orange { color: var(--warn); } .jx.gris { color: var(--muted); }

/* kanban façon Monday */
.kanban { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 10px; align-items: flex-start; }
.kcol { flex: 0 0 258px; background: #f0f2f6; border-radius: 8px; min-height: 140px; transition: background .15s; }
.kcol.survol { background: #e2e9f6; }
.kcol-h { display: flex; align-items: center; gap: 8px; padding: 9px 12px 9px 14px; border-radius: 8px 8px 0 0; font-weight: 650;
          background: #fff; color: var(--night); border-top: 4px solid var(--c); }
.kcol-h .n { margin-left: auto; min-width: 22px; text-align: center; font-size: 12px; border-radius: 99px; padding: 1px 7px;
             background: color-mix(in srgb, var(--c) 17%, white); color: var(--t); }
.kcol-s { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); padding: 6px 14px 0; }
.kcol-b { padding: 8px; display: flex; flex-direction: column; gap: 8px; min-height: 80px; }
.kc { background: #fff; border-radius: 8px; padding: 12px 14px; box-shadow: 0 1px 3px rgba(0,0,0,.12); cursor: pointer; text-decoration: none; color: inherit; display: block; }
.kc:hover { box-shadow: 0 6px 16px rgba(0,0,0,.14); }
.kc:focus-visible { outline: 2px solid var(--accent); }
.kc .t { font-weight: 650; line-height: 1.35; margin-bottom: 9px; }
.kf { display: grid; grid-template-columns: 78px 1fr; gap: 6px 8px; font-size: 13px; align-items: center; }
.kf .k { color: var(--muted); }
.kf .v { display: flex; align-items: center; gap: 6px; min-width: 0; }
.kc .act { display: flex; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line-2); }
.kc .act .btn { flex: 1; }
.btn.vert { background: var(--anis); border-color: var(--anis); color: var(--night); font-weight: 650; }
.btn.vert:hover { background: var(--anis-fonce); border-color: var(--anis-fonce); }
.kadd { border: none; background: none; color: var(--muted); text-align: left; padding: 6px 8px; border-radius: 6px; font: inherit; cursor: pointer; text-decoration: none; }
.kadd:hover { background: #e4e8f0; color: var(--ink); }

/* fiche devis */
.fiche-titre { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.statut-fiche { display: inline-flex; align-items: center; gap: 8px; }
.statut-fiche .lbl { font-size: 13.5px; padding: 4px 12px; border-radius: 6px; }
.statut-detail { color: var(--ink-2); font-size: 13.5px; }
/* onglets de la fiche devis : là où l'on travaille, ils doivent se voir */
.tabs-fiche { gap: 6px; border-bottom: 2px solid var(--line); margin: 6px 0 18px; }
.tabs-fiche button { font-size: 15px; font-weight: 600; color: var(--ink-2); padding: 11px 20px 10px; border-radius: 10px 10px 0 0; border-bottom-width: 3px; margin-bottom: -2px; }
.tabs-fiche button:hover { background: #fff; color: var(--ink); }
.tabs-fiche button.on { background: #fff; color: var(--accent); border-bottom-color: var(--anis); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 128px 38px 1fr; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line-2); font-size: 13.5px; align-items: baseline; }
.timeline li:last-child { border-bottom: none; }
.timeline time { color: var(--muted); font-size: 12.5px; }
.timeline .qui-h { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.arbo .chemin { font-family: Consolas, monospace; font-size: 12.5px; background: var(--line-2); border-radius: 6px; padding: 7px 10px; word-break: break-all; margin-bottom: 12px; }
.arbo .dos { border: 1px solid var(--line-2); border-radius: 8px; margin-bottom: 8px; }
.arbo .dos-h { display: flex; align-items: center; gap: 8px; padding: 8px 12px; font-weight: 600; }
.arbo .dos-h small { margin-left: auto; color: var(--muted); font-weight: 500; }
.arbo .dos-b { padding: 0 12px 9px 36px; display: flex; flex-wrap: wrap; gap: 6px; }
.fichier { display: inline-flex; gap: 6px; align-items: center; border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; font-size: 12.5px; background: #fff; }
.ico-dos { width: 16px; height: 16px; color: #c98a0c; flex: none; }
.radios { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.radios label { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; font-weight: 400; color: var(--ink); }
.radios input { width: auto; margin-top: 3px; }

/* tableau de bord */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); grid-auto-rows: 1fr; gap: 14px; margin-bottom: 16px; }
.kpi { text-decoration: none; color: inherit; display: block; }
a.kpi:hover { border-color: #c4d3ef; }
.hb { display: grid; grid-template-columns: 150px 1fr 46px; gap: 10px; align-items: center; margin: 8px 0; font-size: 13px; }
.hb .num { font-weight: 600; }
.ligne { display: flex; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line-2); text-decoration: none; color: inherit; }
.ligne:last-child { border-bottom: none; }
.ligne .t { flex: 1; min-width: 0; }
.ligne .t b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.ligne:hover b { text-decoration: underline; }

/* utilisateurs */
.check-droits { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; }
.check-droits label { display: flex; gap: 7px; align-items: center; font-weight: 400; color: var(--ink); font-size: 13.5px; }
.check-droits input { width: auto; }
.admin-case { align-items: flex-start; margin-top: 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; width: 100%; }
.admin-case input { margin-top: 3px; }
.admin-case .hint { display: block; }
.case-devis { display: flex; gap: 16px; align-items: center; margin-top: 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }
.case-devis .bascule { flex: 1; align-items: flex-start; }
.case-devis .bascule input { margin-top: 3px; }
.case-devis .hint { display: block; }
.case-devis .u-jours { width: 200px; flex: none; margin: 0; }
.droits-mini { display: flex; gap: 4px; flex-wrap: wrap; }
.droits-mini span { font-size: 11px; border-radius: 4px; padding: 1px 6px; background: var(--line-2); color: var(--muted); }
.droits-mini span.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
tr.inactif td { opacity: .5; }
.bascule { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 13px; }
.bascule input { width: auto; }

/* suivi des devis : barre d'outils façon Monday, menus, filtres actifs */
.crumb { display: inline-block; color: var(--muted); text-decoration: none; font-size: 13px; margin-bottom: 6px; }
.crumb:hover { color: var(--accent); }
.barre { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px; margin-bottom: 12px; }
.barre .rech { display: flex; align-items: center; gap: 6px; padding: 0 8px; color: var(--muted); }
.barre .rech input { border: none; padding: 6px 2px; width: 230px; background: transparent; }
.barre .rech input:focus { outline: none; }
.barre .rech:focus-within { color: var(--accent); }
.barre .sep { width: 1px; height: 22px; background: var(--line); margin: 0 6px; }
.barre svg, .outil svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.outil { display: inline-flex; align-items: center; gap: 7px; border: none; background: none; font: inherit; color: var(--ink-2); padding: 6px 10px; border-radius: 6px; cursor: pointer; text-decoration: none; white-space: nowrap; }
.outil:hover, .outil[aria-expanded] { background: var(--line-2); color: var(--ink); }
.outil.on { background: var(--accent-soft); color: var(--accent); }
.pastille { background: var(--accent); color: #fff; border-radius: 99px; font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; display: inline-grid; place-items: center; padding: 0 5px; }
.barre .compte { margin-left: auto; color: var(--muted); font-size: 13px; padding: 0 8px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pop-zone { position: relative; }
.pop { position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; background: #fff; border: 1px solid var(--line); border-radius: 10px;
       box-shadow: 0 10px 30px rgba(20,38,74,.16); padding: 10px; width: 330px; max-height: 70vh; overflow-y: auto; }
.pop.droite { left: auto; right: 0; }
.pop-t { font-size: 11.5px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin: 10px 4px 6px; }
.pop-t:first-child { margin-top: 2px; }
.pop-l { display: flex; align-items: center; gap: 8px; width: 100%; border: none; background: none; font: inherit; text-align: left; padding: 7px 8px; border-radius: 6px; cursor: pointer; color: var(--ink); }
.pop-l:hover { background: var(--line-2); }
.pop-l.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.pop-l .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pop input[type=search] { width: 100%; margin-bottom: 4px; }
.pop-choix { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 7px 8px; background: var(--accent-soft); border-radius: 6px; font-weight: 600; color: var(--accent); }
.pop-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 2px; }
.chip-c { border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 4px 11px 4px 9px; font: inherit; font-size: 12.5px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); }
.chip-c::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.chip-c:hover { border-color: var(--c); }
.chip-c.on { border-color: var(--c); background: color-mix(in srgb, var(--c) 14%, white); color: var(--ink); font-weight: 600; }
.seg.petit button { padding: 5px 10px; font-size: 12.5px; }
.pop .seg { display: flex; } .pop .seg button { flex: 1; }
.av.vide { background: #fff; border: 1.5px dashed var(--muted); }
.lien { border: none; background: none; color: var(--accent); font: inherit; font-size: 13px; cursor: pointer; padding: 2px 4px; text-decoration: underline; text-underline-offset: 2px; }
.filtres-actifs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: -4px 0 12px; }
.chip-f { border: 1px solid color-mix(in srgb, var(--accent) 30%, white); background: var(--accent-soft); color: var(--accent); border-radius: 99px; padding: 3px 10px; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.chip-f:hover { background: color-mix(in srgb, var(--accent) 20%, white); }
.chip-f span { margin-left: 3px; font-size: 14px; line-height: 1; }
/* kanban à fort volume : chaque colonne défile, la page reste courte */
.kcol-b { max-height: calc(100vh - 290px); overflow-y: auto; }
.kplus { border: 1px dashed #c3cad8; background: none; border-radius: 8px; padding: 8px; font: inherit; font-size: 12.5px; cursor: pointer; color: var(--ink-2); }
.kplus:hover { background: #e4e8f0; }
.kvide { color: var(--muted); font-size: 12.5px; text-align: center; padding: 14px 0 4px; }
/* liste groupée façon Monday */
.groupe + .groupe { margin-top: 18px; }
.groupe-h { display: flex; align-items: baseline; gap: 10px; font-size: 15px; margin: 0 0 6px; color: var(--c); }
.groupe-h small { color: var(--muted); font-weight: 500; font-size: 12.5px; }
.groupe-b { border-left: 4px solid var(--c); padding: 4px 12px; }
@media (max-width: 760px) { .barre .rech input { width: 140px; } .barre .compte { margin-left: 0; } .pop { width: min(330px, calc(100vw - 40px)); } }
.kcol-b > * { flex: none; }
.t-groupe { table-layout: fixed; width: 100%; min-width: 980px; }
.t-groupe td { overflow-wrap: anywhere; }
.qui-cel { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
/* kanban harmonisé : colonnes de même hauteur qui remplissent la largeur, cartes de même gabarit */
.kanban { align-items: stretch; height: max(420px, calc(100vh - 200px)); }
.kcol { flex: 1 0 216px; max-width: 340px; display: flex; flex-direction: column; min-height: 0; }
.kcol-b { flex: 1; min-height: 0; max-height: none; }
.kc .t { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.kf { grid-auto-rows: 24px; }
.kf .v { overflow: hidden; white-space: nowrap; }
.kf .v .lbl { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.kc .kf { grid-template-columns: 64px 1fr; font-size: 12.5px; }
.kc .av { width: 20px; height: 20px; font-size: 9px; }
.kcol-b { padding: 6px; }
.kanban { gap: 10px; }
.kc { padding: 12px; }
.kf .v .qui-cel { min-width: 0; }
/* formats de réponse imposés par le client */
.fmt { display: inline-block; margin-left: 6px; font-size: 10.5px; font-weight: 700; border-radius: 4px; padding: 0 5px; line-height: 17px; white-space: nowrap; }
.fmt.manque { background: var(--warn-soft); color: var(--warn); border: 1px solid #ecc98a; }
.fmt.ok { background: var(--ok-soft); color: var(--ok); border: 1px solid #b7dcc4; }
.depot { border: 1.5px dashed #b9c4d6; border-radius: 9px; padding: 12px 14px; margin-top: 10px; background: #fafbfd; cursor: pointer;
         display: flex; flex-direction: column; gap: 2px; text-align: center; color: var(--accent); font-weight: 600; }
.depot .hint { font-weight: 400; }
.depot:hover, .depot.survol { border-color: var(--accent); background: var(--accent-soft); }
.depot.envoi { opacity: .6; pointer-events: none; }
.depot:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* fichiers et dossiers déposés (04g-depot-fichiers.js) */
.depot-liste { margin-top: 10px; }
.col-droite { display: grid; gap: 16px; align-content: start; min-width: 0; }
.col-droite > .card { margin: 0; }
.depot-liste tr.erreur td:first-child { color: var(--bad); }
.barre-envoi { height: 4px; background: var(--line); border-radius: 2px; margin-top: 4px; overflow: hidden; }
.barre-envoi i { display: block; height: 100%; background: var(--accent); }
.versions, .fc-liste { list-style: none; margin: 6px 0 0; padding: 0; }
.versions li, .fc-liste li { padding: 5px 0; border-bottom: 1px solid var(--line-2); display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.versions li.ancienne { opacity: .65; }
.format-client { border: 1px solid var(--line); border-left: 4px solid var(--warn); background: #fffaf0; border-radius: var(--r); padding: 12px 16px; margin: 0 0 16px; }
.format-client.ok { border-left-color: var(--ok); background: #f4faf6; }
.fc-tete { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; }
.fc-tete > div { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.format-client .etat { font-weight: 650; font-size: 13px; color: var(--warn); }
.format-client.ok .etat { color: var(--ok); }
.fc-consignes { margin: 8px 0 0; white-space: pre-line; color: var(--ink-2); }
.format-client .depot { background: #fff; }
.fc-anciennes { margin-top: 8px; font-size: 13px; } .fc-anciennes summary { cursor: pointer; color: var(--muted); }
/* fiche devis : formulaire + suivi côte à côte, l'un sous l'autre sur écran étroit */
.g-fiche { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 1100px) { .g-fiche { grid-template-columns: 1fr; } }
.kf .v .fmt { margin-left: 0; font-size: 10px; padding: 0 4px; }
/* logo Formatype en tête de la barre latérale (sur fond blanc, comme sur leurs documents) */
.brand.logo { flex-direction: column; align-items: stretch; gap: 6px; padding: 0 0 16px; }
.brand.logo img { width: 100%; height: auto; background: #fff; border-radius: 8px; padding: 8px 12px 6px; object-fit: contain; }
.brand.logo span { font-size: 12.5px; font-weight: 600; letter-spacing: .02em; color: #c7cede; padding: 0 4px; display: flex; justify-content: space-between; align-items: baseline; }
.brand.logo small { display: inline; font-size: 11px; }
/* contacts des clients */
.carte-tete { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.carte-tete h2 { margin: 0; }
.carte-tete .actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.carte-tete input[type=search] { width: 200px; }
.choix-contact { position: relative; }
.choix-contact .cc-saisie { width: 100%; }
.cc-ligne { display: flex; gap: 8px; align-items: center; }
.cc-ligne .cc-saisie { flex: 1; min-width: 0; }
.cc-nouveau { flex: none; white-space: nowrap; }
.cc-copies { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }   /* contacts en copie de la demande */
.cc-copie { display: inline-flex; align-items: center; gap: 2px; padding-right: 4px; }
.cc-copie button { margin-left: 4px; font-size: 14px; line-height: 1; text-decoration: none; }
.cc-ajout { width: auto; min-width: 210px; max-width: 100%; }
.n-fiche-client { margin-top: -6px; }
.cc-liste { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); background: #fff; border: 1px solid var(--line); border-radius: 9px;
            box-shadow: 0 10px 30px rgba(20,38,74,.16); padding: 4px; max-height: 320px; overflow-y: auto; }
.cc-l { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; width: 100%; border: none; background: none; text-align: left; font: inherit;
        padding: 7px 9px; border-radius: 6px; cursor: pointer; color: var(--ink); }
.cc-l .small { flex-basis: 100%; }
.cc-l.on, .cc-l:hover { background: var(--accent-soft); }
.cc-creer { color: var(--accent); font-weight: 600; border-top: 1px solid var(--line-2); border-radius: 0 0 6px 6px; }
.cc-fiche { font-size: 12.5px; color: var(--muted); margin-top: 4px; min-height: 1em; }
div.f { display: flex; flex-direction: column; gap: 4px; }
div.f > span:first-child { font-size: 12.5px; color: var(--ink-2); font-weight: 550; }
/* chargement lent seulement (> 0,25 s) : fine barre en haut de l'écran, le contenu reste visible */
body.charge { cursor: progress; }
body.charge::after { content: ""; position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 100;
  background: linear-gradient(90deg, transparent, var(--accent), transparent); background-size: 40% 100%; background-repeat: no-repeat;
  animation: charge 1s linear infinite; }
@keyframes charge { from { background-position: -40% 0; } to { background-position: 140% 0; } }
@media (prefers-reduced-motion: reduce) { body.charge::after { animation: none; background: var(--accent); opacity: .5; } }
/* vue Tableau : tous les devis dans un seul tableau */
.tableau-complet { padding: 0; overflow: hidden; }
.t-defile { max-height: max(360px, calc(100vh - 215px)); overflow: auto; }
.t-complet { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.5px; }
.t-complet th, .t-complet td { white-space: nowrap; padding: 7px 6px; border-bottom: 1px solid var(--line-2); background: #fff; }
.t-complet thead th { position: sticky; top: 0; z-index: 2; padding: 0; border-bottom: 1px solid var(--line); background: #f7f8fa; }
.t-complet .col-num { position: sticky; left: 0; z-index: 1; box-shadow: inset -1px 0 0 var(--line-2); }
.t-complet thead .col-num { z-index: 3; }
.t-complet .col-desig { white-space: normal; min-width: 150px; max-width: 340px; }
.t-complet .col-txt { white-space: normal; min-width: 80px; max-width: 160px; }
.t-complet td.col-num { white-space: normal; } .t-complet td.col-num .fmt { display: table; margin: 2px 0 0; }
.t-complet .col-desig .small { display: block; }
.t-complet tbody tr { cursor: pointer; }
.t-complet tbody tr:hover td { background: #f3f6fb; }
.t-complet tfoot td { position: sticky; bottom: 0; background: #f7f8fa; font-weight: 650; border-top: 1px solid var(--line); border-bottom: none; }
.t-complet tfoot .col-num { z-index: 2; }
.th-tri { display: flex; align-items: center; gap: 4px; width: 100%; border: none; background: none; font: inherit; font-size: 12px; font-weight: 600;
          color: var(--muted); padding: 9px 6px; cursor: pointer; text-align: left; white-space: nowrap; }
.num .th-tri { justify-content: flex-end; }
.th-tri:hover, .th-tri.on { color: var(--ink); }
.th-tri .fl { font-size: 9px; color: var(--accent); }
.tableau-complet .kplus { margin: 10px; }
.seg .etoile { font-size: 10px; color: var(--anis-fonce); margin-left: 2px; }
.seg button.on .etoile { color: var(--anis); }
.page-head .actions .lien { font-size: 12.5px; }
.raccourcis { display: flex; gap: 8px; margin-top: 2px; } .raccourcis .lien { font-size: 12px; padding: 0; }
tr.click { cursor: pointer; }
/* lot 2 : mail glissé */
.mail-lu { border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; margin-bottom: 14px; background: #fafbfd; }
.mail-tete { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.mail-objet { margin-top: 2px; color: var(--ink-2); }
.mail-lu .notice { margin: 8px 0 0; }
.mail-lu .bascule { display: flex; margin-top: 6px; }
details.recus summary { cursor: pointer; }
details.recus[open] summary { margin-bottom: 8px; }
.ligne-action { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mail-texte { margin-top: 8px; font-size: 13px; } .mail-texte summary { cursor: pointer; color: var(--accent); }
.mail-texte pre { white-space: pre-wrap; font: inherit; font-size: 12.5px; max-height: 260px; overflow: auto; background: #fff; border: 1px solid var(--line-2);
                  border-radius: 6px; padding: 8px 10px; margin: 6px 0 0; }
#n-mail .depot { margin: 0 0 14px; }
table.pieces { width: 100%; font-size: 13px; } table.pieces td { padding: 5px 4px; vertical-align: middle; }
table.pieces td:first-child { word-break: break-all; } table.pieces .small { display: block; word-break: normal; }
table.pieces select { width: auto; font-size: 12.5px; padding: 4px 6px; }
table.pieces tr.ignoree td:first-child { color: var(--muted); text-decoration: line-through; }
#app.depot-mail { outline: 3px dashed var(--accent); outline-offset: -8px; border-radius: 12px; }

/* tableau de bord : indicateurs */
.tdb-filtres { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.tdb-filtres select { width: auto; }
.tdb-grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); gap: 16px; margin-bottom: 16px; }
.tdb-grille > .card { margin: 0; min-width: 0; }
.graphe { width: 100%; height: auto; display: block; }
.graphe text { font-size: 11px; fill: #86868b; font-family: inherit; }
.legende { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--ink-2); margin: -4px 0 6px; }
.legende i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.legende i.trait { width: 16px; height: 0; border-top: 2.5px solid; border-radius: 0; vertical-align: 3px; background: none; }
.legende i.tirets { border-top-style: dashed; }
.tdb-h3 { font-size: 12.5px; color: var(--muted); font-weight: 600; margin: 10px 0 2px; }
table.t-ind { width: 100%; font-size: 13px; }
table.t-ind td, table.t-ind th { padding: 7px 8px; }
.tdb-donnees { margin-top: 16px; }
.tdb-donnees summary { cursor: pointer; }
.tdb-donnees[open] summary { margin-bottom: 10px; }
.tdb-bas { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 16px; margin-top: 16px; align-items: stretch; }
.tdb-bas > .card { margin: 0; min-width: 0; }
@media (max-width: 1100px) { .tdb-bas { grid-template-columns: 1fr; } }
.tdb-tete { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.tdb-tete h2 { margin: 0; }
.tdb-tete .muted { font-weight: 500; }
.cl-liste { max-height: 360px; overflow-y: auto; margin: 0 -8px; padding: 0 8px; }
.cl-ligne { display: grid; grid-template-columns: 24px minmax(110px, 190px) 1fr 132px; grid-template-rows: auto auto; column-gap: 12px; align-items: center;
  padding: 8px 6px; border-bottom: 1px solid var(--line-2); text-decoration: none; color: inherit; border-radius: 6px; }
.cl-ligne:hover, .cl-ligne:focus-visible { background: #f6f8fb; }
.cl-rang { grid-row: span 2; color: var(--muted); font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; }
.cl-nom { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl-barre { position: relative; height: 12px; background: var(--line-2); border-radius: 3px; overflow: hidden; }
.cl-barre span { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; }
.cl-barre .env { background: #a9b9db; }
.cl-barre .acc { background: #2f8a57; }
.cl-m { grid-row: span 2; text-align: right; font-variant-numeric: tabular-nums; line-height: 1.3; }
.cl-m b { display: block; font-size: 13.5px; }
.cl-m small { color: var(--muted); font-size: 11.5px; }
.cl-n { grid-column: 2 / 4; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
@media (max-width: 600px) { .cl-ligne { grid-template-columns: 20px 1fr 110px; } .cl-barre { grid-column: 2; grid-row: 2; } .cl-n { grid-column: 2 / 4; grid-row: 3; } }
/* tableau de bord : encart agrandi */
.tdb-agr { position: relative; }
.tdb-agr > h2, .tdb-agr > .tdb-tete { margin-right: 34px; }
.btn-agrandir { position: absolute; top: 12px; right: 12px; width: 30px; height: 30px; border: 1px solid transparent; border-radius: 7px;
  background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center; padding: 0; }
.btn-agrandir svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn-agrandir:hover, .btn-agrandir:focus-visible { border-color: var(--line); background: #fff; color: var(--ink); }
#agrandi { position: fixed; inset: 0; z-index: 60; background: rgba(20, 38, 74, .45); display: flex; align-items: center; justify-content: center; padding: 3vh 3vw; }
#agrandi > .card { width: min(1400px, 100%); max-height: 94vh; overflow: auto; margin: 0; padding: 22px 26px; }
#agrandi .cl-liste { max-height: none; }
#agrandi .t-ind { font-size: 14.5px; }
#agrandi .hb { font-size: 14px; grid-template-columns: 240px 1fr 50px; }
body.voile-ouvert { overflow: hidden; }

/* ------------------------------------------------------------ fiche devis : lignes du devis (lot 3) */
:root { --t-piece: #22397a; --t-outil: #6b4fa3; --t-frais: #b7791f; --t-livr: #5d6b7d; }

.ind-barre { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.ind-barre .lib { color: var(--muted); font-size: 13px; }
.ind-barre .total { margin-left: auto; text-align: right; }
.ind-barre .total b { display: block; font-size: 22px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.ind-barre .total small { color: var(--muted); font-size: 12px; }
.ecart { font-size: 12.5px; font-weight: 600; margin-left: 6px; }
.ecart.baisse { color: var(--ok); } .ecart.hausse { color: var(--bad); }

.lignes { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.lignes th { position: sticky; top: 0; background: #fafafb; z-index: 1; }
.lignes th.num, .lignes td.num { text-align: right; }
.lignes td { vertical-align: top; padding: 8px 8px; border-bottom: 1px solid var(--line-2); }
.lignes tr.l-ligne > td:first-child { box-shadow: inset 3px 0 0 var(--c, transparent); }
.lignes input, .lignes textarea, .lignes select { font: inherit; border: 1px solid transparent; background: transparent; border-radius: 6px; padding: 4px 6px; width: 100%; color: inherit; }
.lignes input:hover, .lignes textarea:hover { border-color: var(--line); }
.lignes input:focus, .lignes textarea:focus, .lignes select:focus { border-color: var(--accent); background: #fff; outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.lignes input.n { text-align: right; font-variant-numeric: tabular-nums; }
.lignes .ref input { font-weight: 650; text-transform: uppercase; }
.lignes .type-l { display: inline-block; font-size: 11.5px; font-weight: 600; color: #fff; background: var(--c); border-radius: 4px; padding: 2px 7px; white-space: nowrap; margin-top: 5px; }
.lignes .tot { font-weight: 650; font-variant-numeric: tabular-nums; padding-top: 12px; white-space: nowrap; }
.lignes tr.desc td { padding-top: 0; }
.lignes tr.desc textarea { color: var(--ink-2); font-size: 13px; line-height: 1.45; resize: vertical; min-height: 34px; }
.lignes tr.texte-seul textarea { font-style: italic; }
.palier { display: grid; grid-template-columns: 22px 1fr 1fr 1fr 26px; gap: 4px; align-items: center; }
.palier + .palier { margin-top: 2px; }
.palier .plage { display: block; font-size: 11px; color: var(--accent); white-space: nowrap; margin-top: 1px; }   /* prix par plage : 500 à 999 */
.plage-case { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--ink-2); margin-left: 12px; cursor: pointer; }
.palier input[type=radio] { width: auto; accent-color: var(--accent); }
.palier .tot-p { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); padding-right: 6px; }
/* en-tête des paliers : mêmes colonnes que les quantités en dessous, titres alignés sur les chiffres */
.palier-tete span { text-align: right; padding-right: 7px; white-space: nowrap; }
.palier-tete span:nth-child(4) { padding-right: 6px; }
.palier.retenu .tot-p { color: var(--ink); font-weight: 650; }
.lien-mini { border: none; background: none; color: var(--accent); font: inherit; font-size: 12.5px; cursor: pointer; padding: 2px 0; text-decoration: underline; text-underline-offset: 2px; }
.lien-mini.gris { color: var(--muted); }
.source { font-size: 11.5px; color: var(--muted); line-height: 1.35; margin-top: 6px; }
.source b { color: var(--ink-2); font-weight: 600; }
.l-actions { display: flex; gap: 2px; opacity: 0; transition: opacity .12s; }
tr.l-ligne:hover .l-actions, tr.l-ligne:focus-within .l-actions { opacity: 1; }
.l-actions button { border: 1px solid transparent; background: none; border-radius: 6px; width: 26px; height: 26px; cursor: pointer; color: var(--muted); font-size: 14px; line-height: 1; }
.l-actions button:hover { border-color: var(--line); color: var(--ink); background: #fff; }
.l-actions button.suppr:hover { color: var(--bad); border-color: #eab5b0; }
@media (hover: none) { .l-actions { opacity: 1; } }

/* comparaison avec un indice précédent */
.avant { display: block; font-size: 11.5px; color: var(--bad); text-decoration: line-through; text-align: right; padding-right: 6px; }
.avant.txt { text-align: left; padding-left: 6px; }
tr.l-ligne.nouvelle > td:first-child::after { content: "nouvelle"; display: block; font-size: 10.5px; font-weight: 600; color: var(--ok); margin-top: 4px; }
.retirees { margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.retirees s { color: var(--bad); }

.ajout { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 12px 0 2px; }
.ajout .btn i { width: 8px; height: 8px; border-radius: 2px; background: var(--c); display: inline-block; }
.ajout .sep-v { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }

.totaux { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0; border-top: 1px solid var(--line); margin-top: 14px; padding-top: 12px; }
.totaux div { font-size: 12.5px; color: var(--muted); }
.totaux b { display: block; color: var(--ink); font-size: 15px; font-variant-numeric: tabular-nums; margin-top: 2px; }
.totaux .grand b { font-size: 17px; }

.g-conditions { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; align-items: start; margin-top: 16px; }
.reprise { font-size: 11.5px; color: var(--muted); font-weight: 400; }
.contact-dev { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.delai-ligne { display: flex; gap: 8px; align-items: center; }
.delai-ligne input { flex: 0 0 72px; min-width: 0; }
.delai-ligne input[type=date] { flex: 0 1 165px; width: 165px; min-width: 0; }   /* reste dans le cadre à côté de Date / Semaines */
.delai-ligne .seg { flex: none; }
.delai-ligne .muted { white-space: nowrap; }
textarea.tolerances { font-size: 13px; line-height: 1.45; }

.pop-textes { position: absolute; z-index: 30; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 28px rgba(20,38,74,.16); padding: 10px; width: 330px; }
.pop-textes h3 { font-size: 12.5px; margin: 4px 4px 8px; color: var(--muted); font-weight: 600; }
.pop-textes button.t { display: block; width: 100%; text-align: left; border: none; background: none; padding: 7px 8px; border-radius: 7px; font: inherit; font-size: 13px; cursor: pointer; }
.pop-textes button.t:hover, .pop-textes button.t:focus-visible { background: var(--line-2); }
.pop-textes button.t small { display: block; color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pop-import { width: 300px; }
.pop-import button.t[disabled] { opacity: .55; cursor: default; }

@media (max-width: 1100px) { .g-conditions { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------ format 2 : comme le devis */
.f2-barre { padding: 12px 18px; margin-bottom: 14px; }
.f2-barre .ind-barre { margin: 0; }
.f2 { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 16px; align-items: start; }
.f2-page { background: #fff; border: 1px solid var(--line); border-radius: 4px; box-shadow: 0 2px 14px rgba(20,38,74,.10); padding: 34px 38px 30px; font-family: Arial, "Segoe UI", sans-serif; font-size: 13px; max-width: 900px; }
.f2-page input, .f2-page textarea, .f2-page select { font: inherit; border: 1px solid transparent; background: transparent; border-radius: 4px; padding: 3px 5px; width: 100%; color: inherit; }
.f2-page input:hover, .f2-page textarea:hover { border-color: var(--line); }
.f2-page input:focus, .f2-page textarea:focus, .f2-page select:focus { border-color: var(--accent); outline: none; background: #fff; box-shadow: 0 0 0 3px var(--accent-soft); }
.f2-panneau { position: sticky; top: 14px; max-height: calc(100vh - 28px); overflow: auto; }
.f2-panneau h3 { font-size: 12.5px; color: var(--muted); font-weight: 600; margin: 16px 0 6px; display: flex; justify-content: space-between; }
.f2-panneau .f { display: grid; gap: 4px; margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.f2-panneau select, .f2-panneau input { font: inherit; color: var(--ink); }
.f2-panneau .f input, .f2-panneau .f select { border: 1px solid var(--line); border-radius: 7px; padding: 6px 8px; background: #fff; }
.f2-panneau .palier input { border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; width: 100%; background: #fff; text-align: right; }
.f2-panneau .palier input[type=radio] { width: auto; }
.pn-tete { display: flex; justify-content: space-between; align-items: center; }
.pn-tete .type-l { display: inline-block; font-size: 12px; font-weight: 600; color: #fff; background: var(--c); border-radius: 4px; padding: 2px 8px; }
.l-actions.vis { opacity: 1; }
.tt-liste { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tt { border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 3px 10px; font: inherit; font-size: 12px; cursor: pointer; color: var(--ink-2); }
.tt:hover, .tt:focus-visible { border-color: var(--accent); color: var(--accent); }
@media (max-width: 1200px) { .f2 { grid-template-columns: 1fr; } .f2-panneau { position: static; max-height: none; } }

/* ------------------------------------------------------------ format 3 : grille type Excel */
.grille { width: 100%; border-collapse: collapse; font-size: 13px; }
.grille th { background: #fafafb; position: sticky; top: 0; z-index: 1; padding: 6px 6px; }
.grille th.num, .grille td.num { text-align: right; }
.grille td { padding: 0; border-bottom: 1px solid var(--line-2); border-right: 1px solid var(--line-2); vertical-align: middle; height: 34px; }
.grille td:last-child, .grille td:nth-last-child(2) { border-right: none; }
.grille input, .grille select, .grille textarea { font: inherit; border: 0; background: transparent; width: 100%; height: 100%; padding: 6px 7px; color: inherit; border-radius: 0; }
.grille input:focus, .grille select:focus, .grille textarea:focus { outline: 2px solid var(--accent); outline-offset: -2px; background: #fff; }
.grille input.n { text-align: right; font-variant-numeric: tabular-nums; }
.grille .ref input { font-weight: 650; text-transform: uppercase; }
.grille tr.l-ligne > td:first-child { box-shadow: inset 3px 0 0 var(--c, transparent); }
.grille .g-n { width: 34px; text-align: center; color: var(--muted); font-size: 11.5px; }
.grille .g-q { display: flex; align-items: center; height: 34px; }
.grille .g-q input[type=radio] { width: auto; height: auto; margin: 0 0 0 6px; accent-color: var(--accent); }
.grille .g-t { padding: 0 8px; font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
.grille .g-t.ret { color: var(--ink); font-weight: 650; }
.grille tr.g-palier td { background: #fbfbfc; height: 30px; }
.grille .g-autre { text-align: right; color: var(--muted); font-size: 12px; padding-right: 10px; }
.grille tr.g-plus td { height: 24px; }
.grille .g-src { text-align: center; }
.grille .g-src .chip { font-size: 10.5px; padding: 1px 6px; }
.grille .g-pli { border: 0; background: none; cursor: pointer; color: var(--muted); width: 100%; height: 34px; font-size: 13px; }
.grille .g-pli.plein { color: var(--accent); }
.grille tr.g-desc td { padding: 6px 8px 10px; background: #fbfbfc; }
.grille tr.g-desc textarea { border: 1px solid var(--line); border-radius: 6px; background: #fff; height: auto; resize: vertical; line-height: 1.4; }
.grille tr.g-texte input { font-style: italic; }
.grille .avant { font-size: 10.5px; padding: 0 7px 3px; display: block; }
.f3-pied { position: sticky; bottom: 0; background: #fff; border-top: 1px solid var(--line); margin-top: 10px; padding-top: 8px; }
.f3-pied .totaux { border-top: 0; margin-top: 0; padding-top: 0; }
.f3-pied p { margin: 6px 0 0; }
kbd { font: inherit; font-size: 11px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 0 4px; background: #fff; }


.grille td { position: relative; }
.grille .avant { position: absolute; left: 6px; top: 1px; padding: 0; font-size: 10px; line-height: 1; pointer-events: none; }
.grille .avant.txt { left: 7px; top: auto; bottom: 1px; }
.grille .g-addq { border: 1px solid transparent; background: none; color: var(--muted); cursor: pointer; width: 22px; height: 22px; border-radius: 5px; margin-right: 3px; flex: none; opacity: 0; }
.grille tr:hover .g-addq, .grille .g-addq:focus-visible { opacity: 1; }
.grille .g-addq:hover { border-color: var(--line); color: var(--accent); background: #fff; }
.f2-panneau h3 { text-transform: none; letter-spacing: 0; }
@media (hover: none) { .grille .g-addq { opacity: 1; } }


.l3-tete { padding: 12px 16px; margin-bottom: 14px; }
.l3-barre { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; }
.l3-ind { display: inline-flex; align-items: center; gap: 8px; }
.l3-ind select { width: auto; }
.l3-total { margin-left: auto; text-align: right; }
.l3-actions { display: inline-flex; align-items: center; gap: 8px; flex-wrap: nowrap; }
.zl textarea.auto { resize: none; overflow: hidden; line-height: 1.35; }
.l3-total b { display: block; font-size: 20px; font-variant-numeric: tabular-nums; }
.l3-total small { color: var(--muted); font-size: 12px; }
.l3-total .lien-mini { display: block; margin-left: auto; font-size: 12px; }
/* Remise ou hausse */
.aj-reglages { display: flex; gap: 22px; align-items: flex-end; flex-wrap: wrap; margin: 8px 0 12px; }
.aj-reglages .f { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.aj-taux { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; }
.aj-taux input { width: 9ch; font-size: 16px; text-align: right; }
.aj-choix { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.aj-lignes { max-height: 46vh; overflow: auto; }
.aj-lignes .type-l { display: inline-block; font-size: 11px; font-weight: 600; color: #fff; background: var(--c); border-radius: 4px; padding: 1px 6px; margin-right: 4px; }
.aj-total { margin-right: auto; }
.txt-bad { color: var(--bad); }
.l3-note { margin: 10px 0 0; }
.l3-txt { display: inline-block; margin-top: 7px; }
.lignes tr.modif > td:first-child { box-shadow: inset 3px 0 0 #e0a100; }
.tt-plier summary { cursor: pointer; font-size: 12.5px; color: var(--accent); margin-top: 2px; }
.tt-apercu { max-width: 520px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); }
input.calcule { background: var(--line-2); color: var(--ink-2); }
@media (max-width: 760px) {
  .lignes thead { display: none; }
  .lignes, .lignes tbody, .lignes tr, .lignes td { display: block; width: 100%; }
  .lignes td.num { text-align: left; }
  .lignes td:empty { display: none; }
  .lignes td[data-lib]::before { content: attr(data-lib); display: block; font-size: 11px; color: var(--muted); margin: 2px 0 1px 6px; }
  .l-actions { opacity: 1; }
  .l3-total { margin-left: 0; }
}
.f2-page input[type=checkbox], .f2-page input[type=radio] { width: auto; }
.f3 .table-wrap { overflow-x: auto; }
.grille { min-width: 980px; }
.lignes { min-width: 820px; }
@media (max-width: 760px) { .lignes { min-width: 0; } }
.l3-pdf { display: inline-flex; gap: 6px; }
.zl input.n.err, .zl input.err { border-color: var(--bad) !important; box-shadow: 0 0 0 3px rgba(200, 40, 40, .15); }
.toast-action { margin-left: 10px; background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, .6); border-radius: 6px; padding: 2px 10px; font: inherit; cursor: pointer; }
/* « Comme le devis » = devis PDF modèle B (Bahnschrift, bleu Formatype, lignes sur fond clair avec liseré) */
.b-page { --b-bleu: #22397a; --b-anis: #bbcf00; --b-encre: #1a2433; --b-gris: #5b6676; --b-trait: #c9d1dc; --b-fond: #f2f5f9;
  font-family: Bahnschrift, "Segoe UI", Arial, sans-serif; color: var(--b-encre); font-size: 13px; padding: 30px 36px 26px; }
.b-tete { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 14px; }
.b-logo { width: 200px; display: block; }
.b-num { text-align: right; display: flex; flex-direction: column; align-items: flex-end; }
.b-num small { color: var(--b-gris); font-size: 11px; letter-spacing: .04em; }
.b-num span { font-size: 38px; font-weight: 300; line-height: 1.05; font-variant-numeric: tabular-nums; }
.b-num em { font-style: normal; color: var(--b-gris); font-size: 11.5px; margin-top: 2px; }
.b-num em b { color: var(--b-bleu); }
.b-infos { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; border-top: 1px solid var(--b-trait); border-bottom: 1px solid var(--b-trait); padding: 12px 0; margin-bottom: 14px; }
.b-client { display: flex; flex-direction: column; gap: 2px; }
.b-client small { color: var(--b-bleu); font-weight: 600; font-size: 10px; letter-spacing: .05em; }
.b-client b { font-size: 16px; }
.b-mail { color: var(--b-bleu); display: block; }
.b-cond { display: grid; grid-template-columns: 112px 1fr; gap: 1px 10px; margin: 0; align-items: center; }
.b-cond dt { color: var(--b-gris); }
.b-cond dd { margin: 0; min-height: 24px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.b-cond dd .b-mail { flex-basis: 100%; padding-left: 5px; }
.f2-page.b-page .b-cond input, .f2-page.b-page .b-cond select { border-color: var(--line); background: #fff; padding: 2px 6px; }
.b-cond input[type=date] { width: auto; }
.b-cond select { width: auto; max-width: 100%; }
.b-delai .seg.petit button { padding: 3px 8px; font-size: 12px; }
.b-delai input.court { width: 56px; }
.b-titre { font-size: 18px; font-weight: 600; margin: 4px 0 4px; }
.b-intro { color: var(--b-gris); font-size: 11.5px; line-height: 1.4; margin: 0 0 12px; }
table.b-table { border-collapse: separate; border-spacing: 0 5px; width: 100%; }
table.b-table th { color: var(--b-gris); font-weight: 600; font-size: 11.5px; text-align: left; padding: 2px 6px; background: none; border: 0; }
table.b-table th.num { text-align: right; }
table.b-table td { background: var(--b-fond); padding: 6px 6px 4px; vertical-align: top; border: 0; }
table.b-table tr.b-ligne td:first-child { box-shadow: inset 4px 0 0 var(--b-bleu); padding-left: 10px; }
table.b-table tr.b-desc td { padding-top: 0; margin-top: -5px; }
table.b-table tr.b-ligne + tr.b-desc td { position: relative; top: -5px; }
table.b-table .b-ref input { font-weight: 700; text-transform: uppercase; }
table.b-table td.num div { text-align: right; padding: 3px 5px; color: var(--b-gris); font-variant-numeric: tabular-nums; }
table.b-table td.num div.ret { color: var(--b-encre); font-weight: 700; }
table.b-table td.num input { text-align: right; }
table.b-table td.tot { padding-top: 9px; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
table.b-table .b-plan { display: block; color: var(--b-gris); font-size: 11.5px; padding-left: 6px; }
table.b-table tr.b-desc textarea { font-size: 12px; color: #373e4e; line-height: 1.4; resize: vertical; }
table.b-table tr.b-section td { background: none; border-bottom: 1.5px solid var(--b-bleu); padding: 8px 0 2px; }
table.b-table tr.b-section textarea { color: var(--b-bleu); font-weight: 600; }
table.b-table tr.sel td { background: #e8eef8; }
table.b-table tr.modif td:last-child { box-shadow: inset -3px 0 0 #e0a100; }
table.b-table tr.l-ligne { cursor: pointer; }
.b-bas { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 22px; margin-top: 14px; align-items: start; }
.b-tol { font-size: 11.5px; color: var(--b-gris); line-height: 1.45; resize: vertical; }
.b-note { color: var(--b-gris); font-size: 11.5px; margin: 8px 0 2px 5px; }
.f2-page.b-page .b-mention { border-color: var(--line); background: #fff; font-size: 12px; }
.b-droite { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.b-carte { background: var(--b-bleu); color: #d6d8e8; border-radius: 6px; padding: 12px 16px; font-variant-numeric: tabular-nums; }
.b-carte > div { display: flex; justify-content: space-between; gap: 10px; padding: 2px 0; }
.b-carte .b-total { border-top: 1px solid #8c8eb2; margin-top: 6px; padding-top: 8px; color: #fff; align-items: baseline; }
.b-carte .b-total b { font-size: 21px; }
.b-carte.masque { background: var(--b-fond); color: var(--b-gris); }
.b-carte.masque .b-total { border: 0; margin: 0; padding: 0; color: var(--b-gris); }
.b-gras { color: var(--b-gris); text-align: right; font-size: 11px; }
.b-droite .bascule { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; color: var(--b-gris); justify-content: flex-end; }
.b-bpa { margin-top: 18px; border-top: 2px solid var(--b-anis); padding-top: 8px; display: flex; gap: 14px; align-items: baseline; color: var(--b-gris); font-size: 11.5px; }
.b-bpa b { color: var(--b-encre); font-size: 14px; font-weight: 600; }
.b-page textarea { overflow: hidden; resize: none; }
.btn-dossier { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); cursor: pointer; vertical-align: middle; }
.btn-dossier:not(.btn) { margin-left: 6px; padding: 2px; border-radius: 5px; opacity: .55; }
.btn-dossier:not(.btn):hover, .btn-dossier:focus-visible { opacity: 1; background: var(--accent-soft); outline: none; }
.btn-dossier.occupe { opacity: .35; pointer-events: none; }
/* « Importer des lignes… » (lot 3) */
.modal-box.imp-box { width: min(1200px, 100%); padding: 0; }
.imp-tete { display: flex; align-items: flex-start; gap: 12px; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.imp-tete h2 { margin: 0; font-size: 18px; }
.imp-x { margin-left: auto; font-size: 22px; }
.imp-corps { display: grid; grid-template-columns: 290px minmax(0, 1fr); min-height: 460px; }
.imp-g { border-right: 1px solid var(--line); background: #fafafb; padding: 14px 16px; }
.imp-g h3 { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 0 0 8px; font-weight: 600; }
.imp-g h3:not(:first-child) { margin-top: 16px; }
.imp-d { padding: 14px 20px; min-width: 0; }
.imp-fichiers { display: grid; gap: 6px; margin-bottom: 8px; }
.imp-fichier { display: grid; grid-template-columns: 16px 1fr; gap: 8px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 9px; background: #fff; cursor: pointer; font-size: 13px; overflow-wrap: anywhere; }
.imp-fichier.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.imp-fichier small { display: block; color: var(--muted); font-size: 11.5px; }
#imp-depot.depot { padding: 10px; margin-bottom: 4px; }
.modele-ok { display: inline-block; background: var(--ok-soft); color: var(--ok); border-radius: 99px; padding: 2px 10px; font-size: 12px; font-weight: 600; margin-bottom: 8px; }
.imp-dl { display: grid; grid-template-columns: 82px 1fr; gap: 3px 8px; margin: 0; font-size: 13px; }
.imp-dl dt { color: var(--muted); } .imp-dl dd { margin: 0; overflow-wrap: anywhere; }
.imp-options { display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center; margin-bottom: 12px; font-size: 13px; color: var(--ink-2); }
.imp-options label { display: flex; align-items: center; gap: 8px; }
.imp-note { margin: 0 0 12px; }
.imp-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.imp-table th { text-align: left; font-size: 11.5px; color: var(--muted); font-weight: 600; padding: 6px; border-bottom: 1px solid var(--line); }
.imp-table th.num, .imp-table td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.imp-table td { padding: 6px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.imp-table tr td:nth-child(2) { box-shadow: inset 3px 0 0 var(--c, transparent); }
.imp-table tr.off td { opacity: .4; }
.imp-table tr.chg td { background: #fffbea; }
.imp-table .src { display: block; color: var(--muted); font-size: 11px; }
.imp-table .avant { display: block; color: var(--bad); text-decoration: line-through; font-size: 11.5px; }
.imp-table .nouveau { color: var(--ok); }
.imp-txt { white-space: pre-line; color: var(--ink-2); font-size: 12.5px; }
.imp-ref { width: 100%; border: 1px solid var(--line); border-radius: 6px; padding: 3px 6px; text-transform: uppercase; font: inherit; font-weight: 600; }
.imp-ref.manque { border-color: var(--warn); background: var(--warn-soft); }
.imp-ref.manque::placeholder { color: var(--warn); text-transform: none; font-weight: 400; }
.txt-warn { color: var(--warn); }
.imp-total { text-align: right; padding: 8px 6px 0; color: var(--ink-2); font-size: 13px; }
.imp-total b { color: var(--ink); font-size: 15px; font-variant-numeric: tabular-nums; margin-left: 8px; }
.imp-ctl { margin-top: 12px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; display: grid; gap: 6px; font-size: 13px; }
.imp-ctl > div { display: grid; grid-template-columns: 20px 1fr; gap: 8px; align-items: start; }
.imp-ctl .i { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: #fff; margin-top: 1px; }
.imp-ctl .ok .i { background: var(--ok); } .imp-ctl .att .i { background: var(--warn); } .imp-ctl .ko .i { background: var(--bad); }
.imp-ctl small { display: block; color: var(--muted); }
.imp-confirme { display: flex; gap: 8px; align-items: center; padding-top: 4px; font-weight: 600; }
.imp-pied { display: flex; align-items: center; gap: 10px; padding: 12px 22px; border-top: 1px solid var(--line); }
.imp-pied .muted { margin-right: auto; }
@media (max-width: 900px) { .imp-corps { grid-template-columns: 1fr; } .imp-g { border-right: 0; border-bottom: 1px solid var(--line); } }
.modal-box.imp-box { display: flex; flex-direction: column; max-height: 88vh; }
.imp { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.imp .imp-corps { flex: 1; min-height: 0; overflow: auto; }
.imp-attention { margin: -4px 0 12px; padding: 8px 12px; border-radius: 8px; background: var(--bad-soft); color: var(--bad); font-size: 13px; font-weight: 600; }
.imp-txt.imp-titre { color: var(--accent); font-weight: 600; }
.chip.imp-nouv { background: var(--ok-soft); color: var(--ok); }
.chip.imp-main { background: var(--warn-soft); color: var(--warn); }
.imp-deja { color: var(--accent); font-weight: 600; }
.clip-apercu { max-height: 46vh; overflow: auto; margin: 10px 0; }
.clip-ao { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin: 6px 0 10px; }
.clip-ao .f { margin: 0; }
.clip-ao input { width: 30ch; font-family: inherit; text-transform: uppercase; }
/* fenêtre ouverte : les messages passent en haut pour ne pas cacher ses boutons */
body:has(#modal:not([hidden])) #toasts { bottom: auto; top: 20px; }
/* Commande reçue (lot 4) */
.lc-box-fenetre { width: min(980px, 96vw); max-height: calc(100vh - 40px); overflow: auto; }
.lc-box-fenetre .modal-foot { position: sticky; bottom: -1px; background: #fff; padding: 10px 0 2px; margin-top: 12px; border-top: 1px solid var(--line); align-items: center; }
.lc-arrivee { margin-bottom: 14px; border-left: 4px solid var(--ok); }
.lc-arrivee h2 { margin: 0 0 4px; }
.lc-arrivee .ligne-action { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 12px 0 8px; }
.lc-arrivee select { max-width: 560px; margin-left: 6px; }
.lc-tete { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.lc-tete h2 { margin: 0; }
.lc-etapes { margin-left: auto; display: flex; gap: 6px; font-size: 12px; }
.lc-etapes span { padding: 3px 10px; border-radius: 99px; background: var(--line-2, #efeff1); color: var(--muted); }
.lc-etapes .on { background: var(--accent); color: #fff; } .lc-etapes .fait { background: var(--ok-soft); color: var(--ok); }
.lc-box-fenetre section { margin-top: 14px; }
.lc-box-fenetre h3 { font-size: 13.5px; margin: 0 0 8px; }
.lc-champs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.lc-champs .f { margin: 0; }
.lc-depot { margin-top: 10px; }
.lc-ind { width: 100%; border-collapse: collapse; font-size: 13px; }
.lc-ind th { text-align: left; font-size: 11.5px; color: var(--muted); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.lc-ind td { padding: 7px 8px; border-bottom: 1px solid var(--line-2, #efeff1); vertical-align: middle; }
.lc-ind tr.ko td { background: var(--bad-soft); }
.lc-box { display: inline-grid; place-items: center; width: 34px; height: 30px; border: 1.5px solid var(--line); border-radius: 8px; font-weight: 700; font-size: 15px; text-align: center; background: #fff; padding: 0; }
input.lc-box { border-color: var(--accent); color: var(--accent); text-transform: uppercase; }
input.lc-box.ecart { border-color: var(--bad); color: var(--bad); }
.lc-qte { width: 8ch; text-align: right; }
.lc-blocage { margin-top: 10px; border-left: 4px solid var(--bad); background: var(--bad-soft); border-radius: 8px; padding: 10px 14px; font-size: 13px; }
.lc-blocage b { color: var(--bad); }
.lc-docs { border: 1px solid var(--line); border-radius: 10px; max-height: 38vh; overflow: auto; }
.lc-groupe { font-size: 12px; color: var(--muted); padding: 8px 10px 2px; }
.lc-doc { display: flex; gap: 8px; align-items: center; padding: 6px 10px; border-bottom: 1px solid var(--line-2, #efeff1); font-size: 13px; cursor: pointer; }
.lc-doc small { display: block; color: var(--muted); font-size: 11.5px; }
.lc-espace { margin-right: auto; }
.lc-mail { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fafbfe; }
.lc-pieces { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 8px 0 4px; font-size: 13px; }
.lc-existant { margin-top: 8px; }
.lc-existant select { max-width: 100%; }
.lc-bandeau { margin: 10px 0; display: grid; gap: 8px; }
.lc-bandeau-discret { margin: 8px 0; font-size: 13px; }
.lc-bandeau .ligne-action, .lc-bandeau-discret .ligne-action { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.lc-bandeau select, .lc-bandeau-discret select { max-width: 520px; }
.txt-ok { color: var(--ok); }
.lp { max-width: 720px; margin: 0 auto; }
.lp h1 { margin: 0 0 4px; font-size: 21px; }
.lp-infos { display: grid; grid-template-columns: 110px 1fr; gap: 6px 12px; margin: 16px 0; }
.lp-infos dt { color: var(--muted); } .lp-infos dd { margin: 0; }
.lp-etats { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 6px 0 14px; }
.t-commandes .c-lancement { min-width: 190px; }
.t-commandes .c-lancement > div { display: flex; gap: 6px; align-items: center; margin: 2px 0; font-size: 12.5px; }
@media (max-width: 760px) { .lc-champs { grid-template-columns: 1fr; } .lc-etapes { margin-left: 0; } }
/* Devis en commande */
.lien-nu { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.t-commandes .c-clipper { white-space: nowrap; }
.t-commandes .c-clipper .muted { display: block; margin-top: 3px; }

/* ------------------------------------------------------------------ accueil : la tôle découpée en 3D (accueil-3d.js) */
.acc-scene { position: relative; height: calc(100vh - 150px); min-height: 440px; border-radius: 14px; overflow: hidden;
  background: radial-gradient(ellipse at 50% 40%, #f8f9fc, #e3e8f0); }
.acc-scene canvas { display: block; }
.acc-calque { position: absolute; inset: 0; z-index: 0; }   /* z-index : les étiquettes restent sous la bulle */
.acc-aide { position: absolute; left: 14px; bottom: 12px; font-size: 12px; color: var(--muted); background: rgba(255,255,255,.85); border-radius: 8px; padding: 6px 10px; pointer-events: none; z-index: 1; }
.acc-outils { position: absolute; right: 14px; bottom: 12px; z-index: 1; display: flex; gap: 8px; align-items: center; }
.acc-rejouer { width: 32px; height: 32px; border-radius: 50%; border: 1px solid transparent; background: rgba(255,255,255,.6); color: var(--muted);
  display: grid; place-items: center; cursor: pointer; padding: 0; }
.acc-rejouer:hover { background: #fff; border-color: var(--line); color: var(--ink); }
.acc-rejouer:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.acc-rejouer svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.acc-etq { font: inherit; border: 0; background: #fff; border-radius: 8px; padding: 6px 12px 7px; text-align: center; white-space: nowrap; cursor: pointer;
  box-shadow: 0 6px 18px rgba(20,38,74,.16), 0 1px 2px rgba(20,38,74,.12); font-size: 12px; color: var(--muted); transition: box-shadow 160ms ease; }
.acc-etq b { display: block; font-family: Bahnschrift, "Segoe UI", sans-serif; font-size: 15px; color: var(--night); font-weight: 600; }
.acc-etq span { display: block; }
.acc-etq .nb { font-family: Bahnschrift, "Segoe UI", sans-serif; font-size: 26px; line-height: 1; color: var(--night); font-weight: 600; }
.acc-etq.prio { box-shadow: 0 0 0 3px var(--anis), 0 6px 18px rgba(20,38,74,.16); }
.acc-etq.survol { box-shadow: 0 0 0 2px var(--night), 0 10px 22px rgba(20,38,74,.22); }
.acc-etq:focus-visible { outline: none; box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--night), 0 10px 22px rgba(20,38,74,.22); }
.acc-etq.inactif { background: rgba(255,255,255,.6); box-shadow: none; border: 1px dashed #a3a9b6; cursor: default; }
.acc-etq.inactif b { color: var(--muted); }
.acc-bulle { position: absolute; z-index: 2; pointer-events: none; background: var(--night); color: #fff; font-size: 12.5px; border-radius: 8px; padding: 7px 10px; transform: translate(14px, 14px); max-width: 360px; }
.acc-bulle small { display: block; color: #b9c3da; }
.acc-legende { position: absolute; left: 14px; top: 12px; z-index: 1; display: flex; gap: 14px; font-size: 12px; color: var(--ink-2, #4a4a4f);
  background: rgba(255,255,255,.85); border-radius: 8px; padding: 6px 12px; pointer-events: none; white-space: nowrap; }
.acc-legende span { display: inline-flex; align-items: center; gap: 6px; }
.acc-legende i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.acc-liste { display: grid; gap: 8px; max-width: 560px; }
.acc-liste a { display: flex; align-items: center; gap: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; color: var(--ink); text-decoration: none; }
.acc-liste a:hover { border-color: var(--accent); }
.acc-liste b { font-family: Bahnschrift, "Segoe UI", sans-serif; font-size: 20px; color: var(--night); min-width: 30px; }
.acc-liste small { display: block; color: var(--muted); font-size: 12px; }
.clip-code { display: inline-flex; gap: 6px; margin-left: 8px; align-items: center; }
.clip-code input { width: 130px; padding: 4px 8px; }
.page-head .tdb-filtres { margin-bottom: 0; gap: 6px; }
