/* Facturation Bâtiment – feuille de style unique, sans dépendance */
:root {
  --brand: #1f5ad6; --brand-dark: #1b48ad; --brand-50: #eef6ff; --nav: #14284f;
  --text: #1e293b; --muted: #64748b; --border: #e2e8f0; --bg: #f8fafc;
  --green: #047857; --green-bg: #d1fae5; --red: #be123c; --red-bg: #ffe4e6;
  --amber: #92400e; --amber-bg: #fef3c7; --blue: #1d4ed8; --blue-bg: #dbeafe;
  --surface: #fff; --surface-2: #f8fafc; --soft: #f1f5f9; --heading: #0f172a; --field: #cbd5e1; --btn-text: #334155; --hover-row: #fafcff;
  color-scheme: light;
}
/* Thème sombre (bouton « Thème » du bandeau) */
[data-theme=dark] {
  --brand-50: #172a4d; --nav: #0b1424; --brand-dark: #7fa8ff;
  --text: #e2e8f0; --muted: #94a3b8; --border: #273449; --bg: #0f172a;
  --green: #6ee7b7; --green-bg: #064e3b; --red: #fda4af; --red-bg: #4c0519;
  --amber: #fcd34d; --amber-bg: #451a03; --blue: #93c5fd; --blue-bg: #1e3a8a;
  --surface: #162033; --surface-2: #1b263b; --soft: #1e293b; --heading: #f1f5f9; --field: #334155; --btn-text: #e2e8f0; --hover-row: #1b2740;
  color-scheme: dark;
}
[data-theme=dark] .doc { --brand-dark: #1b48ad; --nav: #14284f; --border: #e2e8f0; --muted: #64748b; --soft: #f1f5f9; color-scheme: light; }
[data-theme=dark] .alert.ok { background: var(--green-bg); } [data-theme=dark] .alert.err { background: var(--red-bg); }
[data-theme=dark] .alert.warn { background: var(--amber-bg); border-color: #78350f; } [data-theme=dark] .badge.violet { background: #3b0764; color: #d8b4fe; }
[data-theme=dark] .input:focus { box-shadow: 0 0 0 3px #1e3a8a; } [data-theme=dark] .btn-danger { border-color: #7f1d1d; } [data-theme=dark] .btn-danger:hover { background: #3f0a17; }
* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--text); background: var(--bg); }
a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 24px; margin: 0; font-weight: 600; color: var(--heading); }
h2 { font-size: 17px; margin: 0; font-weight: 600; color: var(--heading); }
code { background: var(--soft); padding: 1px 4px; border-radius: 4px; }

/* Mise en page */
.shell { display: flex; min-height: 100vh; }
.sidebar { width: 240px; flex-shrink: 0; background: var(--nav); color: #cbd5e1; display: flex; flex-direction: column; }
.app-brand { display: flex; align-items: center; gap: 10px; padding: 18px 20px 6px; color: #fff; }
.app-brand:hover { text-decoration: none; }
.app-brand img { width: 34px; height: 34px; }
.wordmark { font-weight: 800; font-size: 21px; letter-spacing: -.02em; color: #fff; margin: 0; }
.wordmark span { color: #fbbf24; }
.wordmark.big { font-size: 28px; color: var(--nav); }
.wordmark.big span { color: var(--brand); }
[data-theme=dark] .wordmark.big { color: var(--heading); } [data-theme=dark] .wordmark.big span { color: #7fa8ff; }
.auth-logo { width: 64px; height: 64px; display: block; margin: 0 auto 10px; }
.sidebar .brand { display: flex; gap: 12px; align-items: center; margin: 8px 12px 12px; padding: 10px 8px; border-top: 1px solid rgba(255,255,255,.08); border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar .logo { width: 36px; height: 36px; border-radius: 6px; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; overflow: hidden; }
.sidebar .logo img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.sidebar .company { color: #fff; font-weight: 600; font-size: 14px; }
.sidebar .user { font-size: 12px; color: #94a3b8; }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; padding: 0 12px; }
.sidebar nav a { color: #cbd5e1; padding: 8px 12px; border-radius: 8px; display: flex; gap: 10px; }
.sidebar nav a:hover { background: rgba(255,255,255,.06); text-decoration: none; }
.sidebar nav a.active { background: rgba(255,255,255,.12); color: #fff; font-weight: 500; }
.sidebar nav a.module { margin-top: 10px; color: #fff; font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.sidebar nav a.module.open { background: rgba(255,255,255,.06); }
.sidebar nav a.sub { margin-left: 22px; padding: 5px 12px; font-size: 13px; color: #94a3b8; border-left: 1px solid rgba(255,255,255,.15); border-radius: 0 8px 8px 0; }
.sidebar nav a.sub.active { color: #fff; }
/* Sous-menus en onglets : uniquement sur petit écran, où le bandeau n'affiche pas les sous-menus */
@media (min-width: 801px) { .tabs.module-tabs { display: none; } }
.sidebar .foot { margin-top: auto; padding: 16px 12px; display: flex; gap: 4px; }
.sidebar .foot .logout { flex: 1; margin: 0; }
.sidebar .foot button { width: 100%; text-align: left; background: none; border: 0; color: #94a3b8; padding: 8px 12px; border-radius: 8px; cursor: pointer; font: inherit; }
.main { flex: 1; min-width: 0; padding: 32px; display: flex; flex-direction: column; }
.container { width: 100%; max-width: 1150px; margin: 0 auto; }
.credit { margin-top: auto; padding-top: 32px; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 11px; letter-spacing: .08em; color: var(--muted, #94a3b8); opacity: .7; text-decoration: none; }
.credit img { height: 30px; width: auto; }
.credit:hover { opacity: 1; }
.auth-bg { flex-direction: column; }
.auth-bg .credit { margin-top: 24px; padding-top: 0; color: rgba(255,255,255,.75); }
.auth-bg .credit img { background: rgba(255,255,255,.9); border-radius: 4px; padding: 2px 4px; }
@media print { .credit { display: none; } }
@media (max-width: 800px) {
  .shell { flex-direction: column; }
  .sidebar { width: 100%; }
  .sidebar nav { flex-direction: row; overflow-x: auto; padding-bottom: 12px; }
  .sidebar .foot { display: none; }
  .sidebar nav a.sub { display: none; }
  .main { padding: 20px 16px; }
}

.page-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 24px; }
.page-header .sub { color: var(--muted); margin-top: 4px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.spacer { flex: 1; }

/* Composants */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.card + .card, .mb { margin-bottom: 24px; }
.pad { padding: 20px; }
.card-head { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; align-items: center; padding: 14px 16px; }
.scroll { overflow-x: auto; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span2 { grid-column: span 2; } .span4 { grid-column: 1 / -1; }
@media (max-width: 800px) { .g2, .g4 { grid-template-columns: 1fr; } .span2 { grid-column: auto; } }
.split { display: grid; grid-template-columns: 1fr 330px; gap: 24px; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }

.btn, .btn-primary, .btn-danger { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 7px; font: 500 13px/1.3 inherit; cursor: pointer; border: 1px solid var(--field); background: var(--surface); color: var(--btn-text); white-space: nowrap; }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); text-decoration: none; }
.btn-danger { color: var(--red); border-color: #fecdd3; }
.btn-danger:hover { background: #fff1f2; }
.btn-sm { padding: 3px 8px; font-size: 12px; }
form.inline { display: inline; margin: 0; }

label.field { display: block; }
.label { display: block; margin-bottom: 3px; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.input, select.input, textarea.input { width: 100%; padding: 4px 8px; border: 1px solid var(--field); border-radius: 6px; background: var(--surface); font: inherit; font-size: 13px; line-height: 1.4; color: inherit; }
select.input { padding-right: 4px; }
form.grid, form .grid { gap: 10px 16px; }
form { font-size: 13px; }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px #d9eaff; }
textarea.input { min-height: 56px; resize: vertical; }
.input.num, td .input[type=number] { text-align: right; }
.check { display: flex; gap: 8px; align-items: center; }

.badge { white-space: nowrap; display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 500; }
.badge.gray { background: var(--soft); color: var(--btn-text); } .badge.blue { background: var(--blue-bg); color: var(--blue); }
.badge.green { background: var(--green-bg); color: var(--green); } .badge.red { background: var(--red-bg); color: var(--red); }
.badge.amber { background: var(--amber-bg); color: var(--amber); } .badge.violet { background: #ede9fe; color: #6d28d9; }

.alert { padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; }
.alert.ok { background: #ecfdf5; color: var(--green); } .alert.err { background: #fff1f2; color: var(--red); }
.alert.warn { background: #fffbeb; color: var(--amber); border: 1px solid #fde68a; }
.alert.info { background: var(--brand-50); color: var(--nav); }

table.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--surface-2); padding: 8px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 8px 12px; border-bottom: 1px solid var(--soft); vertical-align: middle; }
.table tr.section td { background: var(--brand-50); font-weight: 600; }
.table tbody tr:hover { background: var(--hover-row); }
.num { text-align: right !important; font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); } .small { font-size: 12px; } .strong { font-weight: 600; }
.empty { text-align: center; padding: 40px; color: var(--muted); }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; margin-bottom: 28px; }
@media (max-width: 900px) { .stats { grid-template-columns: repeat(2, minmax(0,1fr)); } }
.stat { padding: 16px; }
.stat .v { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.progress { height: 8px; border-radius: 99px; background: var(--soft); overflow: hidden; }
.progress div { height: 100%; background: var(--brand); }
.totals .row { display: flex; justify-content: space-between; gap: 12px; padding: 2px 0; }
.totals .row.big { border-top: 1px solid var(--border); padding-top: 6px; margin-top: 4px; font-weight: 700; font-size: 15px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 24px; overflow-x: auto; }
.tabs a { padding: 8px 12px; border-bottom: 2px solid transparent; color: var(--muted); white-space: nowrap; }
.tabs a.active { border-color: var(--brand); color: var(--brand-dark); font-weight: 500; }
.tabs a:hover { text-decoration: none; color: var(--text); }
.pills { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.pills a { padding: 4px 12px; border-radius: 99px; background: var(--surface); border: 1px solid var(--border); color: var(--muted); font-size: 13px; }
.pills a.active { background: var(--brand); color: #fff; border-color: var(--brand); }

.icon-btn { background: none; border: 0; cursor: pointer; color: #94a3b8; padding: 2px 4px; font-size: 14px; }
.icon-btn:hover { color: var(--btn-text); }

/* Connexion */
.auth-bg { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--nav), var(--brand-dark)); padding: 16px; }
.auth-card { width: 100%; max-width: 380px; padding: 32px; }
.auth-card .mark { width: 48px; height: 48px; margin: 0 auto 12px; border-radius: 12px; background: var(--brand); color: #fff; font-weight: 700; font-size: 18px; display: flex; align-items: center; justify-content: center; }
.auth-card form > * + * { margin-top: 12px; }

/* Documents A4 (aperçu et impression) */
.print-bg { background: #e2e8f0; padding: 24px 0; min-height: 100vh; }
.print-bar { max-width: 210mm; margin: 0 auto 16px; display: flex; justify-content: flex-end; gap: 8px; }
/* Documents (aperçu, impression) : mêmes couleurs que les PDF, vert armée foncé et vert pastel */
.doc { --doc-head: #4b5320; --doc-soft: #e5ead3; max-width: 210mm; margin: 0 auto; background: #fff; padding: 32px; font-size: 13px; color: #1e293b; }
.doc .head { display: flex; justify-content: space-between; gap: 24px; }
.doc .head img { max-height: 80px; max-width: 160px; object-fit: contain; }
.doc .kind { font-size: 26px; font-weight: 700; text-transform: uppercase; color: var(--doc-head); letter-spacing: .04em; }
.doc .parties { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 24px; }
.doc .box { border: 1px solid var(--border); border-radius: 8px; padding: 12px; }
.doc table.lines { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 16px; }
.doc table.lines th { background: var(--doc-head); color: #fff; font-weight: 500; padding: 6px; text-align: left; }
.doc table.lines td { padding: 5px 6px; border-bottom: 1px solid #f1f5f9; vertical-align: top; }
.doc table.lines tr.section td { background: var(--doc-soft); font-weight: 600; }
.doc .doc-totals { width: 290px; margin-left: auto; margin-top: 16px; }
.doc .mentions { margin-top: 20px; font-size: 11px; color: #475569; }
.doc .mentions p { margin: 3px 0; }
.doc footer { margin-top: 28px; border-top: 1px solid var(--border); padding-top: 10px; font-size: 10.5px; color: var(--muted); }
.doc .sign { margin-left: auto; width: 50%; height: 110px; border: 1px solid #cbd5e1; border-radius: 8px; padding: 10px; font-size: 12px; margin-top: 24px; }
.pre { white-space: pre-line; }
@media print {
  @page { size: A4; margin: 12mm; }
  .no-print { display: none !important; }
  body, .print-bg { background: #fff; padding: 0; }
  .doc { padding: 0; max-width: none; }
}
.nowrap { white-space: nowrap; }
.sidebar .foot button:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar .foot .theme-btn { width: auto; white-space: nowrap; }
[data-theme=dark] .credit img { background: rgba(255,255,255,.9); border-radius: 4px; padding: 2px 4px; }

/* Graphiques du tableau de bord */
:root { --series-1: #2a78d6; --series-2: #eb6834; --good: #0ca30c; --warning: #fab219; --critical: #d03b3b; --grid: #e8ecf1; --axis: #64748b; }
[data-theme=dark] { --series-1: #3987e5; --series-2: #d95926; --grid: #26334a; --axis: #94a3b8; }
.chart-card .card-head { align-items: flex-start; }
.chart { display: grid; grid-template-columns: auto 1fr; grid-template-rows: 200px auto; column-gap: 8px; padding: 8px 16px 4px; font-size: 11px; color: var(--axis); }
.chart-y { display: flex; flex-direction: column; justify-content: space-between; text-align: right; margin: -7px 0; white-space: nowrap; }
.chart-plot { position: relative; display: flex; align-items: flex-end; }
.chart .grid-line { position: absolute; left: 0; right: 0; height: 0; border-top: 1px solid var(--grid); }
.chart .grid-line.base { border-top-color: var(--axis); opacity: .5; }
.chart .col { position: relative; flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; border-radius: 4px; }
.chart .col:hover { background: color-mix(in srgb, var(--text) 5%, transparent); }
.chart .stack { width: 56%; max-width: 32px; display: flex; flex-direction: column; gap: 2px; border-radius: 4px 4px 0 0; overflow: hidden; }
.chart .stack span { display: block; flex-basis: 0; min-height: 2px; }
.chart .s1 { background: var(--series-1); } .chart .s2 { background: var(--series-2); }
.chart-x { grid-column: 2; display: flex; padding-top: 6px; }
.chart-x span { flex: 1; text-align: center; white-space: nowrap; overflow: hidden; }
@media (max-width: 800px) { .chart { grid-template-rows: 160px auto; } .chart-x span:nth-child(even) { visibility: hidden; } }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.sw.s1 { background: var(--series-1); } .sw.s2 { background: var(--series-2); }
.chart-table { padding: 0 16px 12px; font-size: 12px; }
.chart-table summary { cursor: pointer; color: var(--muted); }
.chart-table table { margin-top: 8px; }
.stackbar { display: flex; gap: 2px; height: 14px; border-radius: 4px; overflow: hidden; margin: 6px 0 16px; }
.stackbar > div { min-width: 4px; flex-basis: 0; }
.good { background: var(--good); } .warning { background: var(--warning); } .critical { background: var(--critical); }
.cash-legend { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.cash-legend > div { display: flex; flex-direction: column; gap: 2px; font-size: 12px; }
.cash-legend b { font-size: 16px; font-variant-numeric: tabular-nums; }
.cash-legend .dot { width: 22px; height: 4px; border-radius: 2px; margin-bottom: 4px; }
.kpi { text-align: right; } .kpi b { display: block; font-size: 20px; line-height: 1.1; }
.hbars, .sites { display: flex; flex-direction: column; gap: 10px; }
.hbar, .site { display: grid; grid-template-columns: 90px 1fr 150px; gap: 12px; align-items: center; font-size: 13px; }
.site { grid-template-columns: minmax(0, 1.3fr) 1fr 190px; color: inherit; padding: 4px 6px; margin: 0 -6px; border-radius: 6px; }
.site:hover { background: var(--hover-row); text-decoration: none; }
.site-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-track { height: 10px; background: var(--soft); border-radius: 4px; overflow: hidden; }
.hbar-fill { display: block; height: 100%; background: var(--series-1); border-radius: 0 4px 4px 0; }
.hbar-fill.muted-fill { background: var(--axis); opacity: .55; }
.hbar-value { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.chart-tip { position: fixed; z-index: 50; pointer-events: none; background: var(--heading); color: var(--bg); padding: 6px 10px; border-radius: 6px; font-size: 12px; line-height: 1.45; box-shadow: 0 4px 12px rgba(0,0,0,.18); max-width: 260px; }
.chart-tip b { font-weight: 600; display: block; }
@media (max-width: 800px) {
  .hbar { grid-template-columns: 70px 1fr 110px; }
  .site { grid-template-columns: 1fr; gap: 4px; }
  .site .hbar-value { text-align: left; }
  .cash-legend { grid-template-columns: 1fr; }
}

/* Historique des communications */
.timeline { list-style: none; margin: 0; padding: 4px 16px 8px; }
.timeline li { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--soft); }
.timeline li:first-child { border-top: 0; }
.tl-icon { flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; background: var(--brand-50); color: var(--brand-dark); }
.tl-icon.telephone { background: var(--green-bg); color: var(--green); }
.tl-icon.rdv { background: var(--amber-bg); color: var(--amber); }
.tl-icon.courrier, .tl-icon.note { background: var(--soft); color: var(--muted); }
.tl-body { flex: 1; min-width: 0; }
.tl-head { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; font-size: 13px; }
.tl-text summary { cursor: pointer; list-style: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-text[open] summary { display: none; }
.tl-text .pre { margin-top: 4px; padding: 8px 10px; background: var(--surface-2); border-radius: 6px; }
.tl-add { padding: 10px 16px 14px; border-top: 1px solid var(--border); }
.tl-add summary { cursor: pointer; color: var(--brand-dark); }

/* Vignette Pennylane (état d'envoi des factures) */
.pl-badge { display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px 1px 2px; border-radius: 999px; font-size: 11.5px; font-weight: 500; white-space: nowrap; background: var(--soft); color: var(--muted); border: 1px solid var(--border); }
.pl-badge b { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%; font-size: 10px; font-weight: 800; background: #94a3b8; color: #fff; }
.pl-badge.ok { background: var(--green-bg); color: var(--green); border-color: transparent; }
.pl-badge.ok b { background: #0ca30c; }
.pl-badge.err { background: var(--red-bg); color: var(--red); border-color: transparent; }
.pl-badge.err b { background: #d03b3b; }

/* Paramètres > Utilisateurs : niveau et droits par module */
.role-choice { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.role-opt { display: flex; gap: 8px; align-items: flex-start; border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; cursor: pointer; }
.role-opt:has(input:checked) { border-color: var(--accent, #2563eb); background: var(--blue-bg); }
.role-opt span { display: flex; flex-direction: column; } .role-opt small { color: var(--muted); font-size: 11px; }
.rights .table th.center, .rights .table td.center { text-align: center; }
@media (max-width: 800px) { .role-choice { grid-template-columns: 1fr; } }
.read-only .tl-add { display: none; }

/* Fiches : plusieurs emails avec leur service */
.emails-field { display: flex; flex-direction: column; gap: 6px; }
.emails-rows { display: flex; flex-direction: column; gap: 6px; }
.emails-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) auto; gap: 6px; align-items: center; }
.email-picks { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; margin-top: -4px; }
@media (max-width: 800px) { .emails-row { grid-template-columns: 1fr auto; } .emails-row input[type=email] { grid-column: 1; grid-row: 2; } }

/* Devis : lignes « tâche » puis « article », de plus en plus discrètes sous l'ouvrage */
#lines tr.tache td, #lines tr.article td { background: var(--surface-2, transparent); }
#lines tr.tache textarea, #lines tr.article textarea { font-size: 12px; }
.line-tag { display: inline-block; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 2px; }
.lib-lot td { background: var(--soft); }
#lines .line-code { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
#lines tr.tache .line-code { font-weight: 400; padding-left: 10px; color: var(--muted); }
#lines tr.article .line-code { font-weight: 400; padding-left: 20px; color: var(--muted); font-size: 11px; }
#lines tr.article td:nth-child(3) { padding-left: 18px; }
#lines tr.text-line textarea { font-style: italic; }
.text-line td { font-style: italic; }

/* Devis : propositions de la bibliothèque sous le champ Réf. */
.lib-suggest { position: absolute; z-index: 50; width: 520px; max-width: calc(100vw - 32px); max-height: 320px; overflow-y: auto; background: var(--surface, #fff); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 10px 30px rgba(15, 23, 42, .18); font-size: 13px; }
.lib-suggest-head { padding: 6px 10px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); border-bottom: 1px solid var(--border); }
.lib-opt { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: baseline; padding: 7px 10px; cursor: pointer; }
.lib-opt span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-opt em { font-style: normal; color: var(--muted); white-space: nowrap; }
.lib-opt.active, .lib-opt:hover { background: var(--blue-bg); }
.lib-empty { padding: 10px; color: var(--muted); }

/* Devis : saisie des lignes compacte */
#lines td { padding: 3px 5px; }
#lines .input, #lines select.input, #lines textarea.input { padding: 2px 6px; font-size: 12px; line-height: 1.35; border-radius: 4px; }
#lines textarea.input { min-height: 26px; height: 26px; resize: vertical; }
#lines .icon-btn { padding: 0 3px; font-size: 12px; }
#lines .line-tag { font-size: 9px; margin: 0; }
#lines { font-size: 12px; }
#quote-form .table th { padding: 6px 5px; font-size: 10.5px; }
#lines tr.lot-subtotal td { background: var(--soft); font-size: 12px; padding: 5px; border-bottom: 2px solid var(--border); }
#lines tr.lot-subtotal td:nth-child(2) { color: var(--muted); }
.doc table.lines tr.lot-subtotal td { background: var(--doc-soft); font-weight: 600; border-bottom: 6px solid #fff; }

/* Paramètres > Journal de sécurité */
.table tr.log-alert td { background: color-mix(in srgb, var(--red-bg) 40%, transparent); }
