/* Mode sombre — fichier GÉNÉRÉ par outils/gen-theme-sombre.mjs à partir de app.css (ne pas modifier à la main : changer le générateur). */
html[data-theme=dark] {
  color-scheme: dark;
  --bg: #0e151c; --panel: #151e27; --panel-2: #18222c; --line: #26323e; --line-2: #1f2a35;
  --text: #e3e9ef; --text-2: #bcc7d2; --muted: #8b99a7; --faint: #66778a;
  --brand: #3a9aa8; --brand-2: #4fb0bd; --brand-3: #3bbfc9; --brand-soft: #16323a; --brand-ink: #82d2dc;
  --side: #070d13; --side-2: #0f1922; --side-text: #9aabbb;
  --green: #4cc27a; --green-soft: #15301f; --red: #f0767b; --red-soft: #3a1f23; --amber: #eeaa55; --amber-soft: #36291a;
  --blue: #6ea8f0; --blue-soft: #18283d; --violet: #a98af0; --violet-soft: #251d3c; --grey-soft: #1f2a35;
  --sh-1: 0 1px 2px rgba(0,0,0,.35); --sh-2: 0 1px 3px rgba(0,0,0,.4), 0 1px 2px rgba(0,0,0,.3);
  --sh-pop: 0 12px 32px rgba(0,0,0,.55), 0 2px 6px rgba(0,0,0,.4);
}
html[data-theme=dark] ::-webkit-scrollbar-thumb { background: #495058; }
html[data-theme=dark] .topbar { background: #1a2128; }
html[data-theme=dark] .search-btn:hover { border-color: #49515a; background: #1a2128; }
html[data-theme=dark] kbd { background: #1a2128; }
html[data-theme=dark] .icon-btn .dot { border: 2px solid #1a2128; }
html[data-theme=dark] .btn { border: 1px solid #3f464d; background: #1a2128; }
html[data-theme=dark] .btn:hover { border-color: #535b64; background: #21262b; }
html[data-theme=dark] .btn.primary { box-shadow: 0 1px 2px rgba(0,0,0,0.51), inset 0 1px 0 rgba(255,255,255,.12); }
html[data-theme=dark] .btn.danger:hover { border-color: #672f32; }
html[data-theme=dark] input.i, html[data-theme=dark] select.i, html[data-theme=dark] textarea.i { border: 1px solid #414951; background: #1a2128; }
html[data-theme=dark] select.i { background: #1a2128 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238dafce' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 9px center / 15px; }
html[data-theme=dark] input.i:hover, html[data-theme=dark] select.i:hover, html[data-theme=dark] textarea.i:hover { border-color: #555e67; }
html[data-theme=dark] input.i::placeholder, html[data-theme=dark] textarea.i::placeholder { color: #a4aeb8; }
html[data-theme=dark] .switch .track { background: #495058; }
html[data-theme=dark] .switch .track::after { background: #1a2128; box-shadow: 0 1px 2px rgba(0,0,0,0.34); }
html[data-theme=dark] .badge.grey { color: #b0b5b9; }
html[data-theme=dark] table.t tbody tr.click:hover td { background: #222e31; }
html[data-theme=dark] .tabs { background: #32383e; }
html[data-theme=dark] .tabs button.on { background: #1a2128; box-shadow: 0 1px 2px rgba(0,0,0,0.17); }
html[data-theme=dark] .tabs button .n { background: rgba(0,0,0,0.102); }
html[data-theme=dark] .list .it:hover { background: #222e31; }
html[data-theme=dark] .ed-head { background: rgba(32,36,39,0.96); }
html[data-theme=dark] .steps .st i { border: 2px solid #444c54; background: #1a2128; }
html[data-theme=dark] .steps .ln { background: #3b4349; }
html[data-theme=dark] .pv-bar { background: #1a2128; }
html[data-theme=dark] .lines-ed tr.sect textarea.i { border-color: #3a5458; }
html[data-theme=dark] .notice { color: #b3c2d5; border: 1px solid #263a57; }
html[data-theme=dark] .notice.warn { color: #e1c7ae; border-color: #71562f; }
html[data-theme=dark] .notice.bad { color: #d4acac; border-color: #612a2d; }
html[data-theme=dark] .notice.ok { color: #bfddcb; border-color: #3d624b; }
html[data-theme=dark] .balance div { background: #1a2128; }
html[data-theme=dark] .menu { background: #1a2128; }
html[data-theme=dark] .modal-bg { background: rgba(0,0,0,0.72); }
html[data-theme=dark] .modal { background: #1a2128; box-shadow: 0 30px 70px rgba(0,0,0,0.476); }
html[data-theme=dark] .palette-bg { background: rgba(0,0,0,0.72); }
html[data-theme=dark] .palette { background: #1a2128; box-shadow: 0 30px 70px rgba(0,0,0,0.51); }
html[data-theme=dark] .palette .row.sel .rico { background: #1a2128; }
html[data-theme=dark] .toast { box-shadow: 0 12px 30px rgba(0,0,0,0.425); }
html[data-theme=dark] .toast svg.ic { color: #7fd3dc; }
html[data-theme=dark] .toast.ok svg.ic { color: #73e8a3; }
html[data-theme=dark] .snav button:hover { background: #32383e; }
html[data-theme=dark] .snav button.on { background: #1a2128; }
html[data-theme=dark] .logo-prev { border: 1px dashed #464e58; background: #1a2128; }
html[data-theme=dark] .drop { border: 2px dashed #49535e; background: #1a2128; }
html[data-theme=dark] .au { background: #262b31; }
html[data-theme=dark] .au-kicker { color: #7fd3dc; }
html[data-theme=dark] .au-hero p { color: #a9bccb; }
html[data-theme=dark] .au-demo-card { background: rgba(29,36,43,0.96); color: #d3d8df; box-shadow: 0 30px 60px rgba(0,0,0,0.595), 0 0 0 1px rgba(255,255,255,.4); }
html[data-theme=dark] .au-demo-no { color: #8dafce; }
html[data-theme=dark] .au-pill { background: #294233; color: #acd7bb; }
html[data-theme=dark] .au-demo-amt small { color: #8dafce; }
html[data-theme=dark] .au-demo-rows i { background: #2b3137; }
html[data-theme=dark] .au-demo-qr { border-top: 1px dashed #495058; color: #8dafce; }
html[data-theme=dark] .au-demo-qr svg.ic { color: #d3d8df; }
html[data-theme=dark] .au-demo-qr b { color: #d3d8df; }
html[data-theme=dark] .au-demo-chip { background: rgba(0,0,0,0.72); box-shadow: 0 14px 30px rgba(0,0,0,0.51); }
html[data-theme=dark] .au-demo-chip svg.ic { color: #7fd3dc; }
html[data-theme=dark] .au-feats li { color: #9cb0bf; }
html[data-theme=dark] .au-feats li svg.ic { color: #7fd3dc; }
html[data-theme=dark] .au-foot { color: #9eb0bc; }
html[data-theme=dark] .au-mark { box-shadow: 0 10px 24px rgba(0,0,0,0.306); }
html[data-theme=dark] .au-in input.i { background: #1a2128; }
html[data-theme=dark] .role-admin { color: #7fd3dc; }
html[data-theme=dark] .cred code { background: #1a2128; }
html[data-theme=dark] .asbar > svg.ic { color: #7fd3dc; }
html[data-theme=dark] .au-install { border: 1px dashed #49535e; }
@media (max-width: 760px) {
html[data-theme=dark] body.nav-open::after { background: rgba(0,0,0,0.72); }
html[data-theme=dark] .tabbar { background: rgba(29,36,43,0.97); }
}
html[data-theme=dark] .setbar { box-shadow: 0 -6px 20px rgba(0,0,0,0.102); }
html[data-theme=dark] .setbar.dirty { background: #423013; color: #e1c7ae; }
html[data-theme=dark] .deposit-btn svg { color: var(--brand, #a5c4c9); }
html[data-theme=dark] .search-btn:focus-within { background: #1a2128; }
@media (max-width: 760px) {
html[data-theme=dark] .tabbar { box-shadow: 0 -4px 14px rgba(0,0,0,0.102); }
}
@media (max-width: 760px) {
html[data-theme=dark] { background: #1a2128; }
html[data-theme=dark] .tabbar { background: #1a2128; }
html[data-theme=dark] .tabbar::after { background: #1a2128; }
}
html[data-theme=dark] .fv-body canvas, html[data-theme=dark] .fv-body img { background: #1a2128; box-shadow: 0 2px 10px rgba(0,0,0,0.51); }
html[data-theme=dark] .fv-wait { color: #cfd8e0; }
html[data-theme=dark] .dep-x { background: rgba(0,0,0,0.72); }
@media (max-width: 760px) {
html[data-theme=dark] .modal-h { background: #1a2128; }
}
html[data-theme=dark] .fv-frame { background: #1a2128; }
html[data-theme=dark] .scan-pdf canvas { background: #1a2128; }
html[data-theme=dark] .search-btn:hover { background: #2c3036; }
html[data-theme=dark] .btn { border-color: #3b4149; }
html[data-theme=dark] .btn:hover { background: #25282e; border-color: #4a5058; }
html[data-theme=dark] .quick a:hover { border-color: #4e565e; }
html[data-theme=dark] table.t th { background: #1a2128; }
html[data-theme=dark] table.t tbody tr.click:hover td, html[data-theme=dark] .list .it:hover { background: #22262d; }
html[data-theme=dark] .tabs { background: #2e3439; }
html[data-theme=dark] .tabs button.on { box-shadow: 0 1px 2px rgba(0,0,0,0.136); }
html[data-theme=dark] input.i, html[data-theme=dark] select.i, html[data-theme=dark] textarea.i { border-color: #40464d; }
html[data-theme=dark] .modal { box-shadow: 0 24px 60px rgba(0,0,0,0.374); }
html[data-theme=dark] .ed-head { background: rgba(33,35,39,0.96); }
html[data-theme=dark] .ib-msg.fid { border-color: #372756; }
html[data-theme=dark] .ib-msg.cl { border-color: #3a5458; }
html[data-theme=dark] .list .it.ib-q { background: #1e1039; }
html[data-theme=dark] .bulkbar { border: 1px solid #3a5458; }
html[data-theme=dark] .lines-ed .fmtbar button.on { border-color: #3a5458; }
html[data-theme=dark] .suivi-frame { background: #25282e; }
html[data-theme=dark] .icon-btn.suivi-btn.on { border-color: #3a5458; }
html[data-theme=dark] .lines-ed tr.sub td:first-child::before { background: var(--brand-soft, #2e4d53); }
html[data-theme=dark] .emp-pv { background: #444b51; }
html[data-theme=dark] .t .post-c { box-shadow: -8px 0 8px -8px rgba(0,0,0,0.306); }
html[data-theme=dark] .pres-lock-card > .card-b > svg.ic { color: var(--amber, #e7b873); }
html[data-theme=dark] .pres-modal { background: rgba(0,0,0,0.72); }
html[data-theme=dark] .pres-modal .pres-lock-card { box-shadow: 0 20px 60px rgba(0,0,0,0.425); }
html[data-theme=dark] .pres-modal .pres-lock-card > .card-b > svg.ic { color: var(--amber, #e7b873); }
html[data-theme=dark] .pres-urg { background: var(--panel-2, #25282e); }
html[data-theme=dark] .cert-prev { background: #1a2128; }
html[data-theme=dark] .upd-bar { box-shadow: 0 12px 40px rgba(0,0,0,0.51); }
html[data-theme=dark] .room-h svg.ic { color: var(--brand, #a5c4c9); }
html[data-theme=dark] .room-h .i { color: var(--brand, #a5c4c9); }
html[data-theme=dark] .lines-ed tr.room .room-h .i { background: #1a2128; color: var(--rc, #a6cad1); }
html[data-theme=dark] .room-add-inline { background: var(--brand-soft, #293c3f); }
html[data-theme=dark] .room-add-inline svg.ic { color: var(--brand, #a6cad1); }
@media (max-width: 760px) {
html[data-theme=dark] .more-sheet { background: rgba(0,0,0,0.72); }
html[data-theme=dark] .more-box { box-shadow: 0 -10px 30px rgba(0,0,0,0.306); }
}
html[data-theme=dark] .lines-add .dict-btn { color: var(--brand-ink, #b5d4da); background: var(--brand-soft, #293c3f); }
html[data-theme=dark] .dict-mic { background: var(--brand-soft, #293c3f); color: var(--brand-ink, #b5d4da); }
html[data-theme=dark] .dict-mic.on { background: #411919; color: var(--red, #e1837a); }
html[data-theme=dark] .asst-bg { background: rgba(0,0,0,0.476); }
html[data-theme=dark] .asst { box-shadow: -12px 0 32px rgba(0,0,0,0.238); }
html[data-theme=dark] .asst-pc.warn { background: #4a3b15; }
html[data-theme=dark] .qx-seg label { background: #1a2128; }
html[data-theme=dark] .qx-drop { border: 1.5px dashed #525b63; }
html[data-theme=dark] .qx-recap div { background: #1a2128; }
html[data-theme=dark] .deposit-btn.deposit-mail { border-color: #2a7a83; background: #133b41; }
html[data-theme=dark] .deposit-btn.deposit-mail svg.ic { color: #a5ced9; }
html[data-theme=dark] .quick.quick-fidu a { border-color: #2a7a83; background: #133b41; }
html[data-theme=dark] .bx-dot { background: #575d64; }
html[data-theme=dark] .bx-body { background: #22262d; border: 1px solid var(--line, #373a40); }
html[data-theme=dark] .ar-list { border: 1px solid var(--line, #373a40); background: #1a2128; }
html[data-theme=dark] .ar-list button:hover { background: var(--brand-soft, #263739); }
html[data-theme=dark] .ar-ic { color: var(--brand, #a5c4c9); }
html[data-theme=dark] .bx-rcp { border: 1px solid var(--line, #373a40); }
html[data-theme=dark] .bx-rcp label { border-bottom: 1px solid var(--line, #2f3236); }
html[data-theme=dark] .bx-shots img { border: 1px solid var(--line, #373a40); }
html[data-theme=dark] .ml-av { background: var(--brand-soft, #2a3e41); color: var(--brand-ink, #c1dce1); }
html[data-theme=dark] .ml-file { border: 1px solid var(--line, #373a40); }
html[data-theme=dark] .ml-meta { border-top: 1px solid var(--line-2, #2f3236); }
html[data-theme=dark] .ptr { background: #1a2128; box-shadow: 0 4px 14px rgba(0,0,0,0.306); }
html[data-theme=dark] .mbx { background: #1a2128; border-top: 1px solid var(--line, #373a40); }
html[data-theme=dark] .mbx-f { border-right: 1px solid var(--line, #373a40); background: var(--panel-2, #22262d); }
html[data-theme=dark] .mbx-fl a:hover { background: rgba(0,0,0,0.068); }
html[data-theme=dark] .mbx-fl a.on { background: var(--brand-soft, #2a3e41); color: var(--brand-ink, #c1dce1); }
html[data-theme=dark] .mbx-fl a b { background: rgba(0,0,0,0.119); }
html[data-theme=dark] .mbx-l { border-right: 1px solid var(--line, #373a40); }
html[data-theme=dark] .mbx-lh { border-bottom: 1px solid var(--line, #373a40); }
html[data-theme=dark] .mbx-chips a { border: 1px solid var(--line, #373a40); background: #1a2128; }
html[data-theme=dark] .mbx-chips a.on { background: var(--brand-soft, #2a3e41); color: var(--brand-ink, #c1dce1); }
html[data-theme=dark] .mbx-chips a.late.on { background: #451a1a; }
html[data-theme=dark] .mbx-row { border-bottom: 1px solid var(--line-2, #2f3236); }
html[data-theme=dark] .mbx-row:hover { background: #232930; }
html[data-theme=dark] .mbx-row.sel { background: var(--brand-soft, #2a3e41); }
html[data-theme=dark] .mbx-av { background: #2e363e; color: #bac1c8; }
html[data-theme=dark] .mbx-row.open .mbx-r2 { color: var(--brand-ink, #c1dce1); }
html[data-theme=dark] .mbx-tag { background: #2b3137; color: #bac1c8; }
html[data-theme=dark] .mbx-tag.violet { background: #221745; color: #9482d9; }
html[data-theme=dark] .mbx-tag.green { background: #274130; color: #acd7bb; }
html[data-theme=dark] .mbx-tag.amber { background: #534018; color: #d9b8a4; }
html[data-theme=dark] .mbx-tag.grey { background: #2b3137; color: #8dafce; }
html[data-theme=dark] .mbx-tag.teal { background: #294946; color: #b0dcd9; }
html[data-theme=dark] .mbx-tag.red { background: #451a1a; color: #eb7970; }
html[data-theme=dark] .mbx-tb { background: #1a2128; border-bottom: 1px solid var(--line, #373a40); }
html[data-theme=dark] .mbx-sep { background: var(--line, #373a40); }
@media (max-width: 760px) {
html[data-theme=dark] .mbx-f { border-bottom: 1px solid var(--line, #373a40); }
html[data-theme=dark] .mbx-fl a { background: #1a2128; border: 1px solid var(--line, #373a40); }
}
@media (max-width: 760px) {
html[data-theme=dark] .snav button { background: var(--panel, #1a2128); }
}
html[data-theme=dark] .ac-box { background: var(--panel, #1a2128); box-shadow: 0 10px 30px rgba(0,0,0,0.306); }
html[data-theme=dark] .ac-it { border-bottom: 1px solid var(--line-2, #2d3137); }
html[data-theme=dark] .ac-it:active { background: var(--brand-soft, #2a3e41); }
html[data-theme=dark] .attach-add { border: 1px dashed var(--line, #444b51); }
html[data-theme=dark] .attach-add:hover { background: var(--brand-soft, #2a3e41); }
html[data-theme=dark] .ct-tbl th, html[data-theme=dark] .ct-tbl td { border-bottom: 1px solid var(--line-2, #2d3137); background: var(--panel, #1a2128); }
html[data-theme=dark] .ct-tbl td:nth-child(2), html[data-theme=dark] .ct-tbl th:nth-child(2) { box-shadow: 1px 0 0 var(--line, #373a40); }
html[data-theme=dark] .planbar { background: #4a3915; color: #e4cfae; border-bottom-color: #786235; }
html[data-theme=dark] .planbar > svg.ic { color: #e7b873; }
html[data-theme=dark] .planbar b { color: #e8d7ba; }
html[data-theme=dark] .planbar .btn { color: #e4cfae; border-color: rgba(0,0,0,0.51); }
html[data-theme=dark] .planbar .btn:hover { background: rgba(0,0,0,0.136); color: #e8d7ba; }
html[data-theme=dark] .planbar.ro { background: #411919; color: #d1a7a7; border-bottom-color: #602e2e; }
html[data-theme=dark] .planbar.ro b { color: #dab3b3; }
html[data-theme=dark] .planbar.ro > svg.ic { color: #df7c7c; }
html[data-theme=dark] .seg button.on { box-shadow: 0 1px 2px rgba(0,0,0,0.136); }
html[data-theme=dark] #lockscr .lk-dots i { border: 2px solid rgba(29,36,43,0.85); }
html[data-theme=dark] #lockscr .lk-dots i.on { background: #1a2128; }
html[data-theme=dark] #lockscr .lk-btn { background: #1a2128; color: #bad5dd; }
html[data-theme=dark] .set-tile { background: var(--card, #1a2128); border: 1px solid var(--line, #373a40); }
html[data-theme=dark] .adm-t .t tbody tr.click:hover { background: var(--brand-soft, rgba(0,0,0,0.102)); }
html[data-theme=dark] .an-card { background: var(--card, #1a2128); border: 1px solid var(--line, #373a40); border-left: 4px solid var(--line, #373a40); }
html[data-theme=dark] .rte { background: var(--card, #1a2128); }
html[data-theme=dark] .rte:focus-within { box-shadow: 0 0 0 3px var(--brand-soft, #2c4145); }
html[data-theme=dark] .rte-bar { background: var(--grey-soft, #232930); }
html[data-theme=dark] .rte-bar button.on { border-color: #3a5458; }
html[data-theme=dark] .rte-ed a { color: var(--brand-ink, #add0d5); }
html[data-theme=dark] .bx-drf { background: #4a3915; color: #d9b8a4; }
html[data-theme=dark] .modal-b::-webkit-scrollbar-track { background: #292f34; }
html[data-theme=dark] .cr-shot img { background: #1a2128; }

/* compléments faits à la main */
html[data-theme=dark] img.logo-dark-fix { filter: none; }
html[data-theme=dark] ::-webkit-scrollbar-thumb { background: #2c3946; background-clip: content-box; border: 3px solid transparent; }
html[data-theme=dark] ::-webkit-scrollbar-thumb:hover { background: #3a4a59; background-clip: content-box; border: 3px solid transparent; }
html[data-theme=dark] input, html[data-theme=dark] select, html[data-theme=dark] textarea { color-scheme: dark; }
html[data-theme=dark] .suivi-frame { background: var(--bg); }
html[data-theme=dark] .ed-preview { background: #0b1117; }
