/* Monde « banque privee » du CRM (23/11/2026, demandes de Yossef Haim : « dans le beau style de mes sites et mes CRM », puis
   « c'est affreux, ameliore chaque element »). Transposition du monde RavChessed (DESIGN.md du CRM RavChessed) en hebreu :
   - papier de releve froid (gris argent) + grain, feuilles ivoire a filets fins, coins nets (8-10 px) ;
   - UN navy (#0f2238 / nuit #0a1829) ; or #b08a3e DOSE : ecran courant du menu, bouton principal .primary, double filet sous les en-tetes ;
   - double filet or sous les en-tetes de page et de tableau (le trait de registre) ; chiffres alignes (tabular-nums), les montants sont les heros ;
   - interdits : liseré colore sur carte, degrade sur texte, halo colore, rebond.
   Charge APRES app.css / workspace.css / density.css / col-resize.css et AVANT design.css + reglages de design.php (qui restent maitres).
   Barre laterale : sidebar.css (body.shell-bar). Doc : docs/DESIGN_LANGUAGE.md § Theme banque privee. */
:root {
  --ink: #16202e; --ink2: #475063; --muted: #626b7b;
  --navy: #0f2238; --navy2: #0a1829; --navy3: #1a3453;
  --brand: #0f2238; --brand2: #0a1829; --brand-hover: #0a1829; --brandbg: rgba(15, 34, 56, .06);
  --gold: #b08a3e; --gold2: #7d5f1f; --gold-hi: #d8b86f; --goldbg: rgba(176, 138, 62, .1);
  --bg: #eef1f6; --card: #ffffff; --paper2: #f6f8fb;
  --line: rgba(15, 34, 56, .08); --line2: rgba(15, 34, 56, .16);
  --ok: #276349; --okbg: rgba(39, 99, 73, .1); --warn: #7d5f1f; --warnbg: rgba(176, 138, 62, .12); --bad: #9b3329; --badbg: rgba(155, 51, 41, .09);
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 34, 56, .04), 0 10px 28px -18px rgba(15, 34, 56, .28);
  --ease: cubic-bezier(.2, .7, .2, 1);
}
html { background: var(--bg); }
body {
  color: var(--ink); -webkit-font-smoothing: antialiased; caret-color: var(--navy);
  background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .06 0 0 0 0 .13 0 0 0 0 .22 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
::selection { background: rgba(176, 138, 62, .26); color: var(--ink); }
:focus-visible, a.btn:focus-visible, button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
a { color: var(--navy); text-underline-offset: 3px; }
a:hover { color: var(--navy3); }
.muted, .page-head p { color: var(--muted); }

/* ---------- Titres : encre navy ; en-tete de page = court trait or (23/11 v3, plus leger que le double filet) ---------- */
h1, h2, h3, .page-head h1 { color: var(--navy); letter-spacing: normal; }
.page-head { position: relative; padding-bottom: 1rem; margin-bottom: 1.6rem; }
.page-head::after { content: ""; position: absolute; inset-inline-start: 0; bottom: 0; width: 56px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, #d8b86f, #b08a3e); pointer-events: none; }
.page-head h1 { font-size: 1.85rem; }
.card h2, .bcard h2 { color: var(--navy); font-size: 1.08rem; }

/* ---------- Barre du haut (seulement pour qui a choisi « תפריט בראש המסך ») ---------- */
body:not(.shell-bar) .topbar { background: linear-gradient(180deg, #0f2238, #0a1829); border-bottom: 0; backdrop-filter: none; color: #e9edf4; box-shadow: inset 0 -1px 0 rgba(216, 184, 111, .3); }
body:not(.shell-bar) .topbar .logo, body:not(.shell-bar) .topbar .logo span { color: #fff; }
body:not(.shell-bar) .top-link, body:not(.shell-bar) .nav-group > summary { color: rgba(255, 255, 255, .74); }
body:not(.shell-bar) .top-link:hover, body:not(.shell-bar) .nav-group > summary:hover, body:not(.shell-bar) .nav-group[open] > summary { background: rgba(255, 255, 255, .07); color: #fff; }
body:not(.shell-bar) .top-link.on, body:not(.shell-bar) .nav-group.here > summary { background: rgba(216, 184, 111, .14); color: #fff; box-shadow: inset 0 0 0 1px rgba(216, 184, 111, .24); }
body:not(.shell-bar) .nav-search input { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .12); color: #fff; }
body:not(.shell-bar) .nav-search input::placeholder { color: rgba(255, 255, 255, .5); }
body:not(.shell-bar) .avatar { background: #0f2238; color: #d8b86f; box-shadow: 0 0 0 1px rgba(216, 184, 111, .75); }
body:not(.shell-bar) .topbar .nav-global-search, body:not(.shell-bar) .topbar .nav-mobile { color: rgba(216, 184, 111, .9); background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .12); }
.topbar .logo .mark svg { width: 26px; height: 26px; }
/* Menus deroulants (barre du haut et menu « אני ») : feuille ivoire */
.nav-panel { background: var(--card); border: 1px solid var(--line2); border-radius: 10px; box-shadow: 0 18px 40px -12px rgba(10, 24, 41, .45); }
.me-menu .nav-panel b { color: var(--navy); }
.me-menu .nav-panel a, .me-menu .nav-mode-form button { color: var(--ink); border-radius: 7px; }
.me-menu .nav-panel a:hover, .me-menu .nav-mode-form button:hover { background: var(--goldbg); color: var(--navy); }
body:not(.shell-bar) .nav-row:hover { background: var(--goldbg); }
body:not(.shell-bar) .nav-row a { color: var(--ink); }
body:not(.shell-bar) .nav-row a svg { color: var(--gold); }
body:not(.shell-bar) .nav-row a.on { color: var(--navy); font-weight: 600; }

/* ---------- Boutons : navy plein, coins nets ; un seul bouton or par ecran (.primary) ---------- */
button, a.btn { background: var(--navy); color: #fff; border-radius: 10px; font-weight: 500; letter-spacing: normal; box-shadow: 0 1px 2px rgba(10, 24, 41, .22); transition: background-color .14s var(--ease), color .14s var(--ease), border-color .14s var(--ease); }
button:hover, a.btn:hover { background: var(--navy2); color: #fff; text-decoration: none; }
button:active, a.btn:active { transform: none; }
button.ghost, a.btn.ghost { background: transparent; color: var(--navy); border: 1px solid var(--line2); box-shadow: none; }
button.ghost:hover, a.btn.ghost:hover { background: var(--goldbg); color: var(--navy); border-color: rgba(176, 138, 62, .55); }
button.primary, a.btn.primary, .wizard ~ .card button.primary, .wizard ~ form button.primary { background: var(--gold); color: #fff; box-shadow: 0 1px 2px rgba(125, 95, 31, .35); }
button.primary:hover, a.btn.primary:hover { background: var(--gold2); }
button.small, a.btn.small { border-radius: 7px; }
button:disabled, button[disabled] { opacity: .45; box-shadow: none; cursor: not-allowed; }

/* ---------- Champs : feuille blanche, filet navy fin, focus navy + halo or discret ---------- */
input, select, textarea { background-color: #fff; border: 1px solid var(--line2); border-radius: 10px; color: var(--ink); transition: border-color .14s var(--ease), box-shadow .14s var(--ease); }
input:hover, select:hover, textarea:hover { border-color: rgba(15, 34, 56, .3); }
input:focus, select:focus, textarea:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(176, 138, 62, .18); }
input::placeholder, textarea::placeholder { color: #8a909c; }
input[type=checkbox], input[type=radio] { accent-color: var(--navy); }
.card label { color: var(--ink2); font-weight: 500; }

/* ---------- Feuilles (cartes), encadres, chiffres ---------- */
.card, .bcard, .bkpi, .kpi, .filters, .table-wrap, .tt-wrap, .wizard { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.kpi .ico, .kpi .ico:not(.g):not(.r):not(.y) { background: rgba(15, 34, 56, .06); color: var(--navy); border-radius: 8px; }
.kpi .num, .bkpi .n { color: var(--navy); font-variant-numeric: tabular-nums; font-weight: 600; }
.kpi .lbl, .bkpi .l { color: var(--muted); }
.bkpi:has(a.stretch):hover, .tile:hover, .funnel a:hover, .steps a:hover { border-color: rgba(176, 138, 62, .5); transform: none; }
.bar .fill, .bar .fill[style] { background: var(--navy); }
.bar .track, .hb .tr { background: rgba(15, 34, 56, .07); }
.steps a { background: var(--card); border-color: var(--line); }
.steps i { background: var(--navy); }
.funnel a { background: var(--card); border-color: var(--line); }
.col { background: rgba(15, 34, 56, .05); }
.tile { background: #fff; border-color: var(--line); }
.notice, .notice-sm { background: rgba(176, 138, 62, .1); color: #5b4513; border: 1px solid rgba(176, 138, 62, .28); border-radius: 8px; }
.ok { background: var(--okbg); color: #1d4d38; border-radius: 8px; }
.err { background: var(--badbg); color: #7b2820; border-radius: 8px; }
dl.kv-grid .kv { background: #fff; border-color: var(--line); border-radius: 8px; }

/* ---------- Tableaux : en-tete papier + double filet or, chiffres alignes, survol creme ---------- */
table { font-variant-numeric: tabular-nums; }
.list th, .table-wrap > table > thead > tr:first-child > th, .contacts-scroll thead th, .btable th, table.tt thead th {
  background: var(--paper2); color: var(--ink2); font-weight: 600; font-size: .8rem;
  box-shadow: inset 0 -1px 0 rgba(15, 34, 56, .1);
}
.list th, .list td, .btable th, .btable td, .map td, .map th { border-bottom-color: var(--line); }
.list tbody tr:hover td, .btable tbody tr:hover td, table.tt tr.tt-row:hover td { background: rgba(176, 138, 62, .06); }
.contacts-grid th, .contacts-grid td, table.list.ds-grid th, table.list.ds-grid td { border-color: rgba(15, 34, 56, .12); }
.contacts-grid th, table.list.ds-grid th { background: var(--paper2); color: var(--navy); }
.contacts-grid tbody tr:nth-child(even) td, table.list.ds-grid tbody tr:nth-child(even) td { background: rgba(15, 34, 56, .025); }
.contacts-grid tbody tr:hover td, table.list.ds-grid tbody tr:hover td { background: rgba(176, 138, 62, .08); }
.btable tr.sum td { color: var(--navy); }

/* ---------- Pastilles, segments ---------- */
.pill { background: rgba(15, 34, 56, .06); color: var(--ink2); border-radius: 6px; font-weight: 500; }
.pill.st1 { background: rgba(15, 34, 56, .08); color: var(--navy); }
.pill.st2, .pill.wait { background: var(--warnbg); color: var(--warn); }
.pill.st3, .pill.active { background: var(--okbg); color: var(--ok); }
.pill.st4, .pill.cancel { background: var(--badbg); color: var(--bad); }
.seg, .vseg { background: var(--card); border: 1px solid var(--line); border-radius: 9px; }
.seg a.on, .hq .seg label:has(input:checked), .vseg button[aria-pressed=true] { background: var(--navy); color: #fff; box-shadow: none; }
.seg a:hover:not(.on) { background: var(--goldbg); }
.workday a, .period-custom > summary { background: var(--card); border-color: var(--line); color: var(--ink2); }
.workday a:hover { border-color: rgba(176, 138, 62, .6); color: var(--navy); }

/* ---------- Vente en etapes ---------- */
.wizard a i { background: rgba(15, 34, 56, .07); color: var(--ink2); }
.wizard a:hover { background: var(--goldbg); }
.wizard a.on { background: rgba(15, 34, 56, .06); color: var(--navy); }
.wizard a.on i, .wizard a.on.ok i { background: var(--navy); color: var(--gold-hi); }
.wizard ~ form.card h2::before { background: var(--gold); width: 3px; }
.wizard ~ form .check.big, .wizard ~ form .card label.check.big { background: #fff; border-color: var(--line2); border-radius: 8px; }
.wizard ~ form .check.big:hover { border-color: rgba(176, 138, 62, .55); background: #fff; }
.wizard ~ form .check.big:has(input:checked) { border-color: var(--navy); background: rgba(15, 34, 56, .05); color: var(--navy); }
.wizard ~ form .check.big.best { border-color: rgba(176, 138, 62, .6); }
.wizard ~ form .check.big.best small { color: var(--gold2); }
.wizard ~ form .form-grid.pcrow, .wizard ~ form .hq, .bankbox { background: #fff; border-color: var(--line); border-radius: 8px; }
.wizard ~ form .card.notice-sm { background: rgba(176, 138, 62, .1); border-color: rgba(176, 138, 62, .28); color: #5b4513; }
.wizard ~ form.card .wiz-nav { background: rgba(253, 252, 249, .96); }

/* ---------- Panneau lateral, cibles, rappels ---------- */
.side-panel .sp-backdrop { background: rgba(10, 24, 41, .38); }
.side-panel .sp-sheet { background: var(--bg); }
.sp-head { background: var(--card); }
.sp-current, tr.sp-current > td { background: rgba(176, 138, 62, .1) !important; }
.sp-current:not(tr) { box-shadow: inset -2px 0 0 var(--gold); }
.task:target { outline-color: var(--gold); background: var(--goldbg); }
.tb-site-rem { border-color: rgba(176, 138, 62, .45); background: rgba(176, 138, 62, .08); }

/* ---------- Ancienne coquille a barre laterale (pages qui l'utilisent encore) ---------- */
.side { background: linear-gradient(180deg, #0f2238, #0a1829); color: rgba(255, 255, 255, .74); }
.side nav a { color: rgba(255, 255, 255, .74); }
.side nav a.on { background: rgba(216, 184, 111, .14); color: #fff; box-shadow: inset 0 0 0 1px rgba(216, 184, 111, .24); }

@media (prefers-reduced-motion: reduce) { button, a.btn, input, select, textarea { transition: none; } }

/* ---------- Tableaux : density.css (choix du 18/11) garde la largeur du contenu ; ici seulement l'encre ---------- */
.list td { color: var(--ink); }
.list td a { color: var(--navy); }
/* Liens « איך זה מחושב » et resumes repliables : discrets et alignes */
details.explain > summary, .filters summary { color: var(--navy3); }
details.explain dl { border-inline-start-color: var(--gold); background: rgba(176, 138, 62, .06); border-radius: 0 8px 8px 0; }
