/* Gestion Leasing — palette chantier : graphite, acier, béton, jaune grue */
:root {
  --graphite: #0F2E57;   /* bleu nuit, texte et fonds sombres */
  --steel: #4F6078;
  --steel-2: #8A99AD;
  --concrete: #EEF2F7;
  --paper: #FFFFFF;
  --line: #D8E0EA;
  --brand: #2263AF;      /* bleu SOMALEV */
  --brand-soft: #EAF1FA;
  --crane: #ED7C2F;      /* orange SOMALEV */
  --crane-soft: #FDEEE3;
  --go: #2E8B57;
  --stop: #C2412D;
  --info: #2263AF;
  --ink: #0F2E57;
  --r: 6px;
  --num: "Barlow Condensed", "Arial Narrow", sans-serif;
  --head: "Exo 2", "Barlow", sans-serif;
  --txt: "Barlow", "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.5 var(--txt); color: var(--ink); background: var(--concrete); }
a { color: var(--info); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--crane); outline-offset: 2px; }
h1 { font: 700 28px/1.2 var(--head); margin: 0 0 4px; letter-spacing: .2px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
h2 { font: 600 18px/1.25 var(--head); color: var(--graphite); margin: 0 0 12px; }
.lead { margin: 0; color: var(--steel); max-width: 75ch; }
.muted { color: var(--steel); }
.small { font-size: 13px; }
code { background: var(--crane-soft); padding: 1px 5px; border-radius: 3px; }

/* ---------- Structure ---------- */
.side { position: fixed; inset: 0 auto 0 0; width: 228px; background: var(--paper); border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: 20; }
.brand { display: flex; flex-direction: column; gap: 6px; padding: 22px 20px 18px; border-bottom: 1px solid var(--line); }
.brand img { width: 170px; height: auto; display: block; }
.brand span { font: 600 12.5px var(--txt); color: var(--steel); letter-spacing: .6px; padding-left: 2px; }
.brand:hover { text-decoration: none; }
.side nav { display: flex; flex-direction: column; padding: 12px 0; }
.side nav a { color: var(--steel); padding: 10px 20px 10px 17px; border-left: 3px solid transparent; font-weight: 500; }
.side nav a:hover { background: var(--concrete); text-decoration: none; color: var(--graphite); }
.side nav a.on { border-left-color: var(--crane); color: var(--brand); background: var(--brand-soft); font-weight: 600; }
.me { margin-top: auto; padding: 16px 20px 20px; border-top: 1px solid var(--line); font-size: 13px; display: flex; flex-direction: column; gap: 2px; color: var(--steel); }
.me strong { color: var(--graphite); font-size: 14px; }
.me a { color: var(--brand); }
.menu-toggle { display: none; }
main.with-side { margin-left: 228px; padding: 0 32px 48px; min-width: 0; }
main.bare { padding: 0 20px 40px; }
.stripe { height: 5px; margin: 0 -32px 26px; background: linear-gradient(90deg, var(--crane) 0 160px, var(--brand) 160px); }
main.bare .stripe { margin: 0 -20px 40px; }

.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.head.small { align-items: center; margin-bottom: 8px; }
.head.small h2 { margin: 0; }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.crumb { margin: 0 0 4px; font-size: 13px; color: var(--steel); }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 20px 22px; margin-bottom: 20px; min-width: 0; }
.card.narrow, .narrow { max-width: 680px; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.cols.wide-left { grid-template-columns: 2fr 1fr; }
.cols > .card { margin-bottom: 20px; }

/* ---------- Indicateurs chiffrés ---------- */
.kpis { display: flex; flex-wrap: wrap; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin-bottom: 20px; }
.kpi { background: var(--paper); padding: 16px 18px; display: flex; flex-direction: column; min-width: 0; flex: 1 1 150px; }
.kpi span { font-size: 13px; color: var(--steel); }
.kpi strong { font: 600 26px/1.15 var(--num); margin: 4px 0 2px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.kpi small { color: var(--steel); font-size: 12.5px; }
.kpi.hero { background: var(--graphite); color: #fff; position: relative; flex: 1.8 1 250px; }
.kpi.hero::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--crane); }
.kpi.hero span, .kpi.hero small { color: #B8C8DE; }
.kpi.hero strong { font-size: 32px; color: #fff; }

/* ---------- Tableaux ---------- */
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); }
.table-wrap.tall { max-height: 72vh; }
.card .table-wrap { border-radius: 4px; }
table.grid { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 13.5px; }
.grid th, .grid td { padding: 7px 10px; border-bottom: 1px solid #E7EAE6; text-align: left; vertical-align: top; }
.grid thead th { position: sticky; top: 0; z-index: 2; background: #F3F6FA; font: 600 13.5px/1.2 var(--num); letter-spacing: .2px; color: var(--steel); border-bottom: 2px solid var(--line); white-space: nowrap; }
.grid tbody tr:hover td { background: #F7FAFD; }
.grid td.n, .grid th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.grid td.strong { font-weight: 600; }
.grid tfoot td { background: #F3F6FA; font-weight: 600; border-top: 2px solid var(--line); position: sticky; bottom: 0; }
.grid td.obj { max-width: 260px; min-width: 180px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grid .s1 { white-space: nowrap; }
.grid.compact td, .grid.compact th { padding: 5px 9px; }
.grid .stick { position: sticky; background: var(--paper); z-index: 1; }
.grid thead .stick { z-index: 3; background: #F3F6FA; }
.grid tfoot .stick { background: #F3F6FA; z-index: 3; }
.grid .s0 { left: 0; min-width: 56px; }
.grid .s1 { left: 56px; min-width: 132px; }
.grid .s2 { left: 188px; min-width: 104px; box-shadow: 2px 0 0 var(--line); }
tr.verify td.s2 { background: var(--crane-soft); }
tr.paid td { color: var(--steel-2); }
tr.cancel td { color: var(--steel-2); text-decoration: line-through; }
tr.next td { background: var(--crane-soft) !important; font-weight: 600; }
tr.vr td { background: #F5F6F4; font-style: italic; }
tr.tot td { font-weight: 600; border-top: 2px solid var(--line); }
.nowrap { white-space: nowrap; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--crane); vertical-align: middle; box-shadow: 0 0 0 2px var(--crane-soft); }

/* Indicateur : jauge de remboursement */
.ind { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; font-size: 12.5px; font-weight: 500; }
.ind b { width: 46px; height: 7px; border-radius: 4px; background: #E3E6E2; overflow: hidden; display: none; }
.ind b i { display: block; height: 100%; background: var(--go); }
.ind.run b, .ind.warn b { display: inline-block; }
.ind.warn b i { background: var(--crane); }
.ind.warn { color: #B4561A; }
.ind.ok { color: var(--go); }
.ind.ok::before, .ind.info::before, .ind.off::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.ind.info { color: var(--info); }
.ind.off { color: var(--steel-2); }
h1 .ind { font: 500 14px var(--txt); background: var(--paper); border: 1px solid var(--line); padding: 3px 10px; border-radius: 20px; }
.share { display: inline-block; width: 60px; height: 6px; background: #E3E6E2; border-radius: 3px; margin-right: 8px; vertical-align: middle; overflow: hidden; }
.share i { display: block; height: 100%; background: var(--crane); }

/* ---------- Formulaires ---------- */
.form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 500; color: var(--steel); margin-bottom: 12px; }
.form label.radio, .form label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--ink); font-size: 14px; }
.form label.check { align-self: end; margin-bottom: 20px; }
input, select, textarea { font: 15px var(--txt); color: var(--ink); padding: 8px 10px; border: 1px solid #C5D2E3; border-radius: 4px; background: #fff; min-width: 0; }
input[type=checkbox], input[type=radio] { width: 17px; height: 17px; accent-color: var(--graphite); }
input:focus, select:focus, textarea:focus { border-color: var(--brand); outline: 2px solid rgba(34,99,175,.25); outline-offset: 0; }
textarea { resize: vertical; }
fieldset { border: 0; border-top: 1px solid var(--line); padding: 14px 0 2px; margin: 0 0 8px; }
legend { font: 600 17px var(--num); padding-right: 10px; color: var(--ink); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 16px; }
.form.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.form.row label { margin-bottom: 0; }
.form.row .grow { flex: 1 1 320px; }
.form.upload { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 8px 0 16px; }
.hint { background: var(--crane-soft); padding: 8px 12px; border-radius: 4px; font-size: 13.5px; margin: 0 0 12px; font-variant-numeric: tabular-nums; }
details summary { cursor: pointer; font-weight: 600; margin-bottom: 8px; }
form.inline { display: inline; }

.btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; background: var(--brand); color: #fff; border: 1px solid var(--brand); border-radius: 4px; font: 600 14.5px var(--txt); cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: #1B4F8F; border-color: #1B4F8F; text-decoration: none; }
.btn.ghost { background: #fff; color: var(--brand); border-color: #C5D2E3; }
.btn.ghost:hover { border-color: var(--brand); background: var(--brand-soft); }
.btn.small { padding: 5px 10px; font-size: 13px; }
.btn.wide { width: 100%; justify-content: center; }
.link { background: none; border: 0; padding: 0 4px; color: var(--info); cursor: pointer; font: inherit; }
.link.danger { color: var(--stop); }

.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filters input[type=search] { min-width: 260px; }
.seg { display: inline-flex; border: 1px solid #C3C9C2; border-radius: 4px; overflow: hidden; background: #fff; }
.seg a, .seg label { padding: 7px 12px; color: var(--ink); font-size: 14px; }
.seg a.on { background: var(--brand); color: #fff; }
.seg a:hover { text-decoration: none; }
.seg.big { margin-bottom: 14px; flex-wrap: wrap; }
.seg.big label { display: flex; flex-direction: row; align-items: center; gap: 6px; margin: 0; color: var(--ink); }
.refdate label { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--steel); margin: 0; }
.refdate input { padding: 7px 8px; }

.tabs { display: flex; gap: 2px; border-bottom: 2px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tabs a { padding: 10px 16px; color: var(--steel); font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap; }
.tabs a.on { color: var(--ink); border-bottom-color: var(--crane); }
.tabs a:hover { text-decoration: none; color: var(--ink); }

.flash { padding: 10px 14px; border-radius: 4px; margin-bottom: 14px; border-left: 4px solid var(--go); background: #E6F2EB; }
.flash.err { border-color: var(--stop); background: #F8E6E2; }
.flash.warn { border-color: var(--crane); background: var(--crane-soft); }
.flash.info { border-color: var(--info); background: #E4EEF5; }

.dl { display: grid; grid-template-columns: minmax(150px, 40%) 1fr; gap: 6px 14px; margin: 0; }
.dl dt { color: var(--steel); font-size: 13.5px; }
.dl dd { margin: 0; font-variant-numeric: tabular-nums; }
.note { background: #F5F6F4; padding: 10px 12px; border-radius: 4px; font-size: 13.5px; }
.av { border-left: 3px solid var(--crane); padding: 4px 0 4px 12px; margin-bottom: 14px; }
.av p { margin: 4px 0; }
.docs { list-style: none; padding: 0; margin: 0 0 8px; }
.docs li { padding: 6px 0; border-bottom: 1px solid #EEF0ED; }
.list { list-style: none; padding: 0; margin: 0 0 16px; }
.list li { padding: 7px 0; border-bottom: 1px solid #EEF0ED; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.list li span { color: var(--steel); font-size: 13.5px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags a { background: var(--crane-soft); padding: 2px 8px; border-radius: 3px; font-size: 13px; color: var(--ink); }
.empty { padding: 40px; text-align: center; color: var(--steel); }
.chart { position: relative; height: 320px; }
.chart.sm { height: 300px; }
table.calc td:first-child { color: var(--steel); }

.login { max-width: 380px; margin: 8vh auto 0; background: var(--paper); padding: 32px; border-radius: var(--r); border: 1px solid var(--line); }
.login h1 { margin-top: 12px; }
.login-logo { width: 240px; max-width: 100%; display: block; margin: 0 auto 8px; }
.login h1, .login > p { text-align: center; }
.login { border-top: 4px solid var(--crane); }

@media (max-width: 1100px) {
  .grid4 { grid-template-columns: repeat(2, 1fr); }
  .cols, .cols.wide-left { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .side { position: sticky; top: 0; width: auto; inset: auto; flex-direction: row; flex-wrap: wrap; align-items: center; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { padding: 10px 16px; border-bottom: 0; }
  .brand img { width: 130px; }
  .brand span { display: none; }
  .menu-toggle { display: block; margin-left: auto; margin-right: 12px; background: none; border: 1px solid #C5D2E3; color: var(--brand); padding: 6px 12px; border-radius: 4px; font: inherit; }
  .side nav, .side .me { display: none; width: 100%; }
  body.nav-open .side nav, body.nav-open .side .me { display: flex; }
  main.with-side { margin-left: 0; padding: 0 14px 40px; }
  .stripe { margin: 0 -14px 18px; }
  .grid2, .grid4 { grid-template-columns: 1fr; }
  .kpi strong { font-size: 22px; }
  .kpi.hero strong { font-size: 26px; }
  .filters input[type=search] { min-width: 0; flex: 1 1 100%; }
  .grid .stick { position: static; box-shadow: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media print {
  .side, .actions, .filters, .tabs, .stripe, form.inline, .menu-toggle { display: none !important; }
  main.with-side { margin: 0; padding: 0; }
  .table-wrap.tall { max-height: none; overflow: visible; }
  body { background: #fff; }
}

/* ---------- Notifications ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.form label.chip { flex-direction: row; align-items: center; gap: 7px; margin: 0; padding: 7px 12px; border: 1px solid #C5D2E3; border-radius: 20px; background: #fff; color: var(--graphite); font-size: 14px; cursor: pointer; }
.form label.chip:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.form label.chip small { color: var(--steel-2); font-weight: 400; }
.form label.chip.off { opacity: .55; cursor: not-allowed; }
.rules { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 16px; margin-bottom: 12px; }
.rule { border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: var(--r); padding: 14px 16px; }
.rule.paused { border-left-color: var(--steel-2); background: #FAFBFC; }
.rule header { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 16px; }
.rule .dl { margin-bottom: 12px; grid-template-columns: 110px 1fr; }
.rule .actions { gap: 6px; }
.testform input { padding: 5px 8px; font-size: 13px; width: 200px; }
.pill { font-size: 12px; padding: 2px 10px; border-radius: 12px; background: #E6EAF0; color: var(--steel); }
.pill.on { background: #E3F2EA; color: var(--go); }
.warn-t { color: #B4561A; font-weight: 600; }
.err-t { color: var(--stop); font-size: 13px; }
pre.cmd { background: var(--graphite); color: #fff; padding: 12px 14px; border-radius: 4px; overflow-x: auto; font-size: 13px; white-space: pre-wrap; word-break: break-all; }
code.wrap { word-break: break-all; }
.steps { padding-left: 20px; margin: 6px 0; }
.testmail { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
@media (max-width: 820px) { .rules { grid-template-columns: 1fr; } }

.card form + h2, .card table + h2, .card ul + h2, .card p + h2 { margin-top: 24px; }

/* ---------- Menu accordéon ---------- */
.side nav.acc { padding: 8px 0; overflow-y: auto; }
.grp { border-bottom: 1px solid var(--line); }
.grp > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 12px 20px; font: 600 13px var(--head); letter-spacing: .5px; text-transform: uppercase; color: var(--graphite); user-select: none; }
.grp > summary::-webkit-details-marker { display: none; }
.grp > summary::after { content: ""; width: 7px; height: 7px; border-right: 2px solid var(--steel-2); border-bottom: 2px solid var(--steel-2); transform: rotate(45deg); transition: transform .15s; margin-top: -3px; }
.grp[open] > summary::after { transform: rotate(225deg); margin-top: 3px; }
.grp > summary:hover { background: var(--concrete); }
.grp > summary::before { content: ""; width: 4px; height: 16px; border-radius: 2px; background: var(--brand); margin-right: 8px; order: -1; }
.grp-cmt > summary::before { background: var(--crane); }
.grp-admin > summary::before { background: var(--steel-2); }
.grp > summary { justify-content: flex-start; }
.grp > summary::after { margin-left: auto; }
.grp[open] { padding-bottom: 8px; }
.side nav.acc a { padding: 8px 20px 8px 32px; font-size: 14.5px; }

[hidden] { display: none !important; }
.grp a { display: block; }

/* ---------- Trésorerie ---------- */
.grp-treso > summary::before { background: #3E8E7E; }
.amt-in { color: var(--go); font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.amt-out { color: var(--stop); font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.neg { color: var(--stop); }
.tq .big { font-size: 22px; font-weight: 600; padding: 10px 12px; font-variant-numeric: tabular-nums; }
.tq-sens { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 4px 0 16px; }
.tq-sens label { flex-direction: column !important; align-items: flex-start !important; gap: 2px !important; margin: 0 !important; padding: 12px 16px; border: 2px solid #C5D2E3; border-radius: 8px; cursor: pointer; background: #fff; }
.tq-sens label b { font: 600 17px var(--head); color: var(--graphite); }
.tq-sens label small { color: var(--steel); font-weight: 400; }
.tq-sens input { position: absolute; opacity: 0; pointer-events: none; }
.tq-sens label.e.on { border-color: var(--go); background: #E6F2EB; }
.tq-sens label.e.on b { color: var(--go); }
.tq-sens label.s.on { border-color: var(--stop); background: #F8E6E2; }
.tq-sens label.s.on b { color: var(--stop); }
.tq-sens label:focus-within { outline: 3px solid rgba(34,99,175,.3); }
.recent .list li { align-items: baseline; }
.egrid td { padding: 3px 4px; vertical-align: middle; }
.egrid input, .egrid select { width: 100%; padding: 6px 7px; font-size: 14px; }
.egrid input.n { text-align: right; font-variant-numeric: tabular-nums; }
.egrid .f-date { width: 108px; } .egrid .f-deb, .egrid .f-cre { width: 120px; }
.egrid .f-cat { min-width: 190px; } .egrid .f-cat.no-rule { border-color: var(--crane); background: var(--crane-soft); }
.egrid tr.bad td { background: #FBECE8; }
.rerr { color: var(--stop); font-size: 12px; margin-top: 2px; }
.egrid td.rn { color: var(--steel-2); width: 34px; }
details.paste { margin: 4px 0 14px; padding: 10px 14px; background: var(--brand-soft); border-radius: 6px; }
details.paste textarea { width: 100%; margin: 6px 0; font: 13px/1.4 monospace; }
.alerts { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.alerts .flash { margin: 0; }
.kpi .amt-in, .kpi .amt-out { font: inherit; }
.share.neg i { background: var(--stop); }
.pv td.lbl { position: sticky; left: 0; background: var(--paper); z-index: 1; min-width: 230px; box-shadow: 2px 0 0 var(--line); }
.pv tr.grp td { font-weight: 600; background: #F7FAFD; }
.pv tr.grp td.lbl { background: #F7FAFD; }
.pv tr.cat td.lbl { padding-left: 26px; color: var(--steel); }
.pv tr.tot td { font-weight: 700; background: #EAF1FA; border-top: 2px solid var(--line); }
.pv tr.tot td.lbl { background: #EAF1FA; }
.pv tr.sf td { font-weight: 700; background: var(--graphite); color: #fff; }
.pv tr.sf td.lbl { background: var(--graphite); }
.pv tr.sf .neg { color: #FFB4A6; }
.pv td.n, .pv th.n { min-width: 92px; }
.badge-intra { font-size: 11px; background: var(--brand-soft); color: var(--brand); padding: 1px 7px; border-radius: 10px; white-space: nowrap; }
.badge-acl { font-size: 11px; background: var(--crane-soft); color: #B4561A; padding: 1px 7px; border-radius: 10px; white-space: nowrap; }
.inl { display: inline-flex; gap: 4px; align-items: center; }
.inl select { padding: 3px 5px; font-size: 12.5px; max-width: 170px; }
.pager { display: flex; gap: 6px; align-items: center; margin: 12px 0; flex-wrap: wrap; }
.pager a, .pager span { padding: 5px 11px; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.pager span.on { background: var(--brand); color: #fff; border-color: var(--brand); }
@media (max-width: 820px) { .tq-sens { grid-template-columns: 1fr; } .egrid .f-cat { min-width: 140px; } }
.dotc { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 7px; vertical-align: middle; }
.small-kpi { font-size: 22px !important; }

.recent .list li { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.recent .list li span { flex: 1; min-width: 0; }
.recent .list li a { white-space: nowrap; }

.gbar { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 14px; }
.gbar a { padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--graphite); font-weight: 600; text-decoration: none; }
.gbar a.on { background: var(--navy, #0F2E57); color: #fff; border-color: var(--navy, #0F2E57); }
a.drill { color: inherit; text-decoration: none; border-bottom: 1px dotted var(--steel-2, #8a9bb0); cursor: zoom-in; }
a.drill:hover { background: var(--brand-soft); border-bottom-color: var(--brand); }
.pv tr.sf a.drill { color: #fff; }
.drill { }
#drill.drill { position: fixed; inset: 0; background: rgba(15,46,87,.45); z-index: 60; display: flex; align-items: center; justify-content: center; padding: 20px; }
#drill[hidden] { display: none; }
.drill-box { background: #fff; border-radius: 10px; width: min(880px, 100%); max-height: 86vh; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.drill-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.drill-head h2 { margin: 0; font-size: 17px; }
#drill-body { overflow: auto; padding: 8px 20px; }
.drill-sum { display: flex; gap: 22px; flex-wrap: wrap; padding: 8px 0 10px; font-size: 14px; }
.drill-foot { padding: 10px 20px 14px; margin: 0; border-top: 1px solid var(--line); text-align: right; }
.filters select[name=soc], .filters select[name=scope] { min-width: 280px; }

/* Sélecteur de groupe en boutons */
.gbar { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 16px; }
.gbar a { display: inline-flex; align-items: center; padding: 10px 22px; border: 2px solid var(--brand); border-radius: 8px; background: #fff; color: var(--brand); font: 700 14.5px var(--txt); text-decoration: none; box-shadow: 0 1px 2px rgba(15,46,87,.12); transition: background .15s, color .15s; }
.gbar a:hover { background: var(--brand-soft); text-decoration: none; }
.gbar a.on { background: var(--brand); color: #fff; box-shadow: 0 2px 6px rgba(34,99,175,.35); }
/* Choix des contrats (tableau de bord CMT) */
.ctrbox { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 0; margin: 0 0 16px; }
.ctrbox > summary { cursor: pointer; padding: 12px 16px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.ctrbox > summary::after { content: '▾'; color: var(--brand); }
.ctrbox[open] > summary::after { content: '▴'; }
.ctrbox .ctrcount { background: var(--brand); color: #fff; border-radius: 999px; padding: 2px 12px; font-size: 13px; }
.ctrbody { padding: 4px 16px 14px; border-top: 1px solid var(--line); }
.ctrgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin: 12px 0; }
.ctrgrid fieldset { border: 1px solid var(--line); border-radius: 6px; padding: 8px 12px 10px; margin: 0; }
.ctrgrid legend { font-weight: 700; padding: 0 6px; color: var(--navy, #0F2E57); }
.ctrgrid label.chk { display: flex; gap: 8px; align-items: baseline; padding: 4px 0; cursor: pointer; font-size: 13.5px; }
.ctrgrid label.chk small { color: var(--steel); }
.ctrbody .actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* Contacts salariés */
.st-act { background: #E6F2EB; color: var(--go); padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.st-off { background: #ECEFF3; color: var(--steel); padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
tr.inactif td { color: var(--steel); }
tr.inactif td a:not(.tel):not(.wa) { color: var(--steel); }
.warn-age { color: #B4561A; cursor: help; font-weight: 700; }
a.tel { font-variant-numeric: tabular-nums; white-space: nowrap; }
a.wa { font-size: 11.5px; background: #E6F2EB; color: #1E7B45; padding: 1px 8px; border-radius: 999px; text-decoration: none; margin-left: 4px; }
a.wa:hover { background: #cfe8d9; }
mark { background: #FFE9B8; color: inherit; padding: 0 1px; border-radius: 2px; }
.sfilters input[type=search] { flex: 1 1 320px; min-width: 240px; font-size: 16px; padding: 10px 14px; }
.segr { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.segr label { padding: 9px 16px; cursor: pointer; font-weight: 600; margin: 0; }
.segr label.on { background: var(--brand); color: #fff; }
.segr input { position: absolute; opacity: 0; pointer-events: none; }
table.kv { width: 100%; border-collapse: collapse; }
table.kv th { text-align: left; font-weight: 600; color: var(--steel); width: 38%; padding: 8px 10px 8px 0; vertical-align: top; }
table.kv td { padding: 8px 0; }
table.kv tr + tr { border-top: 1px solid var(--line); }
a.kpi { text-decoration: none; color: inherit; } a.kpi:hover { background: var(--brand-soft); }
.sfilters .segr { margin-right: 4px; }

/* Refinancement */
.grp-refi > summary::before { background: #8A5CC2; }
.jx { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.jx-late { background: #F8E6E2; color: var(--stop); } .jx-soon { background: #FBE3D2; color: #B4561A; }
.jx-near { background: #FFF1CC; color: #8A6410; } .jx-ok { background: #E6F2EB; color: var(--go); }
.flags { list-style: none; padding: 0; margin: 8px 0; } .flags li { padding: 5px 0; display: flex; gap: 8px; }
.flags li::before { content: '●'; } .flags .err::before { color: var(--stop); } .flags .warn::before { color: var(--crane); } .flags .info::before { color: var(--steel); }

.docrow { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; padding: 6px 0; border-top: 1px solid var(--line); }
.docrow a { font-weight: 600; }

.dbar { margin-top: -6px; align-items: center; }
.dbar a { padding: 5px 16px; border-width: 1.5px; font-size: 13.5px; border-color: var(--steel-2, #8a9bb0); color: var(--steel, #4F6078); }
.dbar a.on { background: #3E8E7E; border-color: #3E8E7E; color: #fff; }
.gbar-l { align-self: center; font-size: 12.5px; color: var(--steel, #4F6078); font-weight: 600; margin-right: 4px; }
.devtag { display: inline-block; background: #E7F3F0; color: #1F6B5D; border-radius: 6px; padding: 1px 9px; font: 700 .55em var(--head, inherit); vertical-align: middle; letter-spacing: .04em; }
td .devtag { font-size: 11px; padding: 0 6px; }

.msub { margin: 10px 0 2px; padding: 6px 14px 4px 30px; font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--steel-2, #8a9bb0); border-top: 1px solid var(--line); }

.pv tr.bal td.lbl, .pv tr.lz td.lbl { padding-left: 26px; color: var(--steel); }
.pv tr.av td { font-weight: 700; background: #EAF1FA; }
.pv tr.av td.lbl { background: #EAF1FA; }
.pv tr.lz td { background: #FFF8EC; }
.pv tr.lz td.lbl { background: #FFF8EC; }
.pv tr.lz2 td { font-weight: 700; background: #FFEFD4; border-top: 1px solid var(--line); }
.pv tr.lz2 td.lbl { background: #FFEFD4; }

details.pt { display: inline-block; text-align: left; } details.pt > summary { cursor: pointer; list-style: none; display: inline-block; }
details.pt[open] { display: block; } .ptbox { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-top: 6px; min-width: 280px; box-shadow: 0 6px 18px rgba(15,46,87,.12); }
.ptbox .form label { margin-bottom: 6px; } .ptbox hr { border: 0; border-top: 1px solid var(--line); margin: 8px 0; }
a.drill-l { color: inherit; text-decoration: none; border-bottom: 1px dotted var(--steel-2, #8a9bb0); } a.drill-l:hover { background: var(--brand-soft); }
.prevrow { display: flex; justify-content: space-between; gap: 10px; width: 100%; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 7px 10px; margin: 0 0 6px; cursor: pointer; font: inherit; font-size: 13px; }
.prevrow:hover { background: var(--brand-soft); border-color: var(--brand); } .prevrow.late { border-left: 4px solid var(--crane); }
.pv tr.si td { font-weight: 600; }
td.ctr { min-width: 250px; }
.chk { display: flex; gap: 6px; align-items: center; font-size: 13px; } .pv tr.hdr td { background: #EEF2F7; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: 11.5px; color: var(--steel, #4F6078); }
table.compact input, table.compact select { max-width: 150px; font-size: 12.5px; padding: 3px 5px; }
.pv tr.pv td.lbl { padding-left: 26px; color: var(--steel, #4F6078); } .pv tr.pv td { background: #FBF7EE; } .pv tr.pvt td { font-weight: 700; background: #F5EBD6; }
.pv th.pm { background: #FFEFC9 !important; color: #7A5200; } .pv td.pm { background-image: linear-gradient(rgba(255,196,64,.10), rgba(255,196,64,.10)); }

nav.acc details.sub { border-top: 1px solid var(--line); margin: 6px 0 0; }
nav.acc details.sub > summary.msub { cursor: pointer; list-style: none; margin: 0; padding: 8px 14px 6px 30px; display: flex; justify-content: space-between; align-items: center; user-select: none; }
nav.acc details.sub > summary.msub::-webkit-details-marker { display: none; }
nav.acc details.sub > summary.msub::after { content: ""; width: 6px; height: 6px; border-right: 2px solid var(--steel-2); border-bottom: 2px solid var(--steel-2); transform: rotate(-45deg); transition: transform .15s; margin-right: 6px; }
nav.acc details.sub[open] > summary.msub::after { transform: rotate(45deg); }
nav.acc details.sub > summary.msub:hover { background: var(--concrete); }
nav.acc details.sub > a { padding-left: 38px; }
table.gsal input { text-align: right; max-width: 112px; } table.gsal input.pointed { background: #E7F4EC; color: #1F6B3A; } details.card > summary { cursor: pointer; padding: 4px 0; } nav.acc details.sub > summary.msub { border-top: 0; }
.lzt td.c-contrat { background: #F3F5F8; } .lzt td.c-pointe { background: #E3F3E8; color: #1F6B3A; font-weight: 600; } .lzt td.c-apointer { background: #FFE9D6; color: #9A4A0B; font-weight: 600; } .lzt td.c-prevu { background: #FFF8E4; }
.legend { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin: 4px 0 8px; } .legend .lg { display: inline-block; width: 14px; height: 14px; border-radius: 3px; border: 1px solid var(--line); margin-right: 4px; vertical-align: middle; }
.legend .c-contrat { background: #F3F5F8; } .legend .c-pointe { background: #E3F3E8; } .legend .c-apointer { background: #FFE9D6; } .legend .c-prevu { background: #FFF8E4; }

.me a.bell.has { color: var(--crane, #E8731A); font-weight: 600; } .me a.bell b { background: var(--crane, #E8731A); color: #fff; border-radius: 9px; padding: 0 6px; font-size: 11px; }
.cs-badge { display: inline-block; padding: 2px 9px; border-radius: 10px; font-size: 12px; font-weight: 600; background: #EEF2F7; color: #4F6078; }
.cs-badge.en_validation { background: #FFF1DD; color: #A55A00; } .cs-badge.validee { background: #E2EEFB; color: #1F5FA8; } .cs-badge.remise { background: #E3F4EA; color: #1F6B3A; } .cs-badge.refusee { background: #FBE4E1; color: #B3261E; } .cs-badge.annulee { background: #EEE; color: #777; }
.cs-tl { list-style: none; margin: 0; padding: 0; } .cs-tl li { position: relative; padding: 8px 0 8px 26px; border-left: 2px solid var(--line); margin-left: 8px; } .cs-tl li::before { content: ""; position: absolute; left: -7px; top: 13px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid var(--steel-2, #8a9bb0); }
.cs-tl li.valide::before { background: #2E9E5B; border-color: #2E9E5B; } .cs-tl li.en_cours::before { background: var(--crane, #E8731A); border-color: var(--crane, #E8731A); } .cs-tl li.refuse::before { background: #B3261E; border-color: #B3261E; } .cs-tl li.attente, .cs-tl li.ignore { color: #8a9bb0; }
nav.acc a b.nb { display: inline-block; min-width: 18px; padding: 0 6px; margin-left: 6px; border-radius: 9px; background: var(--crane, #F28C28); color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
table.gcs input { width: 100%; box-sizing: border-box; font-size: 13px; padding: 4px 6px; }
table.gcs input.n { text-align: right; }
table.gcs tr.gerr td { background: #FDECEA; }
table.gcs tr.gerr input { border-color: #B3261E; }
table.gcs tr.gdel td { background: #F6F0F0; text-decoration: line-through; opacity: .65; }
table.gcs tr.gfocus td { background: #FFF6D6; }
.cs-badge.recue { background: #D7EFE0; color: #1B6B3A; }
.cs-badge.remise { background: #FFF1D6; color: #8A5A00; }
table.gcs { table-layout: fixed; width: 100%; } table.gcs input { max-width: none; } table.gcs td, table.gcs th { overflow: hidden; }
.seg a.on .muted { color: rgba(255,255,255,.85); }
table.gcs input[type=checkbox] { width: auto; }
.actions-row label.chk, label.chk { flex-direction: row !important; align-items: center; gap: 6px; }
.actions-row label.chk input, label.chk input { width: auto; margin: 0; }
.drill-h { margin: 16px 0 6px; font-size: 15px; } .badge-prev { display: inline-block; font-size: 10.5px; font-weight: 600; letter-spacing: .04em; padding: 0 6px; border-radius: 8px; background: #FFF1DD; color: #A55A00; } table.drill-prev tr td { background: #FFFCF5; }

/* ======================= MOBILE v2 ======================= */
.navscrim { display: none; }
html { -webkit-text-size-adjust: 100%; }
img, canvas, svg { max-width: 100%; }
@media (max-width: 900px) {
  body { font-size: 15.5px; }
  /* barre du haut + menu en tiroir */
  .side { position: sticky; top: 0; inset: auto; width: 100%; height: 56px; flex-direction: row; flex-wrap: nowrap; align-items: center; padding: 0 10px 0 8px; z-index: 70; border-right: 0; border-bottom: 1px solid var(--line); box-shadow: 0 1px 8px rgba(15,30,50,.08); background: #fff; }
  .brand { flex-direction: row; align-items: center; padding: 0 6px; border: 0; }
  .brand img { width: auto; height: 34px; }
  .brand span { display: none; }
  .menu-toggle { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 0 auto; min-height: 42px; padding: 0 16px; background: var(--brand); color: #fff; border: 0; border-radius: 10px; font: 600 15px var(--txt); }
  .side nav.acc { position: fixed; top: 56px; left: 0; bottom: 0; width: min(88vw, 340px); background: #fff; z-index: 65; transform: translateX(-105%); visibility: hidden; transition: transform .22s ease, visibility .22s; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 4px 0 130px; display: block !important; box-shadow: 6px 0 28px rgba(15,30,50,.28); }
  .side .me { position: fixed; left: 0; bottom: 0; width: min(88vw, 340px); background: #fff; z-index: 66; transform: translateX(-105%); visibility: hidden; transition: transform .22s ease, visibility .22s; display: flex !important; flex-direction: row; flex-wrap: wrap; gap: 4px 16px; align-items: center; margin: 0; padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
  body.nav-open .side nav.acc, body.nav-open .side .me { transform: none; visibility: visible; }
  .navscrim { display: block; position: fixed; inset: 56px 0 0 0; background: rgba(15,30,50,.45); z-index: 60; opacity: 0; pointer-events: none; transition: opacity .2s; }
  body.nav-open .navscrim { opacity: 1; pointer-events: auto; }
  body.nav-open { overflow: hidden; }
  .side nav.acc a { padding: 13px 20px 13px 32px; font-size: 15.5px; }
  .side nav.acc details > summary { padding: 15px 20px; font-size: 14px; }
  nav.acc .msub { padding: 12px 20px 8px 30px; }
  /* page */
  main.with-side { margin-left: 0; padding: 0 12px calc(40px + env(safe-area-inset-bottom)); }
  .stripe { margin: 0 -12px 14px; height: 4px; }
  h1 { font-size: 24px; line-height: 1.2; }
  .head { flex-direction: column; align-items: stretch; gap: 10px; margin-bottom: 14px; }
  .head .lead { font-size: 14px; }
  .head .actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .head .actions > * { text-align: center; justify-content: center; margin: 0; }
  .head .actions form.inline { display: block; } .head .actions form.inline .btn { width: 100%; }
  .btn, button.btn, a.btn { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; }
  .card { padding: 14px 14px; margin-bottom: 14px; }
  .kpis { display: grid; grid-template-columns: 1fr 1fr; }
  .kpi { padding: 12px 12px; flex: none; }
  .kpi.hero { grid-column: 1 / -1; }
  .kpi strong { font-size: 20px; } .kpi.hero strong { font-size: 25px; }
  .grid2, .grid4, .cols, .cols.wide-left { grid-template-columns: 1fr !important; }
  .rules { grid-template-columns: 1fr; }
  /* formulaires tactiles */
  .form input:not([type=checkbox]):not([type=radio]), .form select, .form textarea, .filters input, .filters select { font-size: 16px; min-height: 42px; }
  .filters { gap: 8px; }
  .filters > * { flex: 1 1 calc(50% - 8px); min-width: 130px; max-width: 100%; }
  .filters > .seg, .filters > a { flex: 1 1 100%; }
  .filters input[type=search] { flex: 1 1 100%; min-width: 0; }
  .seg { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .seg a, .seg label { white-space: nowrap; padding: 10px 14px; }
  nav.gbar { flex-wrap: wrap; }
  /* tableaux : défilement doux, en-têtes figés dans la zone */
  .table-wrap { -webkit-overflow-scrolling: touch; max-width: 100%; }
  .table-wrap.tall { max-height: none; }
  .grid .stick { position: static; box-shadow: none; }
  /* fenêtre de détail en plein écran */
  .drill-box { width: 100% !important; max-width: none !important; height: 100% !important; max-height: none !important; border-radius: 0 !important; margin: 0 !important; }
  .drill-box .table-wrap { max-height: none; }
  details.card > summary { padding: 6px 0; min-height: 40px; }
  .actions-row { display: flex; flex-wrap: wrap; gap: 8px; }
  .actions-row .btn { flex: 1 1 auto; }
}
/* tableaux de liste empilés en cartes (téléphone) */
@media (max-width: 680px) {
  table.grid.stk, table.grid.stk tbody, table.grid.stk tfoot, table.grid.stk tr, table.grid.stk td { display: block; width: 100% !important; box-sizing: border-box; }
  table.grid.stk thead { display: none; }
  table.grid.stk tr { border: 1px solid var(--line); border-radius: 10px; margin: 0 0 10px; background: #fff; padding: 6px 12px; }
  table.grid.stk tr.inactif { opacity: .7; }
  table.grid.stk td { border: 0; border-bottom: 1px dashed #E7EAE6; padding: 7px 0; display: flex; justify-content: space-between; align-items: baseline; gap: 14px; text-align: right; white-space: normal; position: static; min-width: 0 !important; }
  table.grid.stk td:last-child { border-bottom: 0; }
  table.grid.stk td::before { content: attr(data-label); flex: 0 0 38%; max-width: 38%; text-align: left; font-weight: 600; font-size: 12.5px; color: var(--steel); }
  table.grid.stk td > * { max-width: 100%; }
  table.grid.stk td.full { display: block; text-align: left; } table.grid.stk td.full::before { display: none; }
  table.grid.stk td.e { display: none; }
  table.grid.stk tfoot tr { background: #F3F6FA; }
  .table-wrap:has(> table.grid.stk) { border: 0; background: transparent; overflow: visible; }
  .card .table-wrap:has(> table.grid.stk) { border: 0; }
}
/* plans de trésorerie : une seule vue (ajustée à la largeur de l'écran) */
.fit-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 8px; }
.fit-bar .seg a, .fit-bar .seg button { padding: 7px 12px; border: 0; background: #fff; font: inherit; font-size: 14px; cursor: pointer; color: var(--ink); }
.fit-bar .seg button.on { background: var(--brand); color: #fff; }
body.fit-on .fitwrap { overflow: hidden; max-height: none; }
body.fit-on table.pv { font-size: 12px; table-layout: auto; }
body.fit-on table.pv th, body.fit-on table.pv td { padding: 3px 6px; line-height: 1.2; white-space: nowrap; }
body.fit-on table.pv td.lbl, body.fit-on table.pv th.lbl { position: static; box-shadow: none; min-width: 0; max-width: 210px; white-space: normal; }
body.fit-on table.pv thead th { position: static; }
.fitwrap { max-height: none; }
body.fit-on table.pv td.n, body.fit-on table.pv th.n { min-width: 0; }
body.fit-on table.pv td.lbl, body.fit-on table.pv th.lbl { min-width: 175px; max-width: 235px; }
body.fit-on table.pv tr td { height: 21px; }
.fit-hint { display: none; font-size: 12.5px; color: var(--steel); }
@media (max-width: 700px) { .fit-hint { display: block; flex: 1 1 100%; } }
@media (max-width: 900px) {
  #drill.drill { padding: 0 !important; align-items: stretch !important; }
  #drill .drill-box { display: flex; flex-direction: column; overflow: hidden; }
  #drill .drill-head { padding: 12px 14px; position: sticky; top: 0; background: #fff; z-index: 2; }
  #drill #drill-body { overflow-y: auto; flex: 1 1 auto; padding: 0 12px 12px; -webkit-overflow-scrolling: touch; }
  #drill .drill-foot { padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); }
  .drill-sum { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; }
  #drill table.grid { display: block; } #drill table.grid tbody { display: block; }
  #drill table.grid tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 9px 2px; border-bottom: 1px solid var(--line); }
  #drill table.grid td { display: block; border: 0; padding: 0; white-space: normal; min-width: 0; }
  #drill table.grid td:nth-child(1) { grid-column: 1; grid-row: 1; font-weight: 600; }
  #drill table.grid td:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
  #drill table.grid td:nth-child(3) { grid-column: 1 / -1; grid-row: 3; }
  #drill table.grid td:last-child { grid-column: 2; grid-row: 1; text-align: right; font-weight: 600; }
  #drill .table-wrap { border: 0; overflow: visible; }
}
@media (max-width: 900px) { #drill.drill { z-index: 200 !important; } }
@media (max-width: 900px) { .grid2 > *, .grid4 > * { grid-column: 1 / -1 !important; } .form label, .form input, .form select, .form textarea { max-width: 100%; box-sizing: border-box; } }
@media (max-width: 900px) { .segr { display: flex !important; flex-wrap: wrap; max-width: 100%; } .segr label { flex: 1 1 auto; text-align: center; white-space: nowrap; } }

/* ---- Accueil ---- */
nav.acc a.homelink { display: flex; align-items: center; gap: 8px; padding: 12px 20px; font-weight: 600; color: var(--brand); border-left: 3px solid transparent; border-bottom: 1px solid var(--line); }
nav.acc a.homelink.on { background: var(--brand-soft); border-left-color: var(--crane); }
nav.acc a.homelink .nb { background: var(--crane, #F28C28); color: #fff; border-radius: 9px; padding: 0 7px; font-size: 11px; line-height: 18px; }
.ntf { display: grid; grid-template-columns: 1fr auto; gap: 1px 12px; padding: 9px 10px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.ntf:hover { background: var(--brand-soft); } .ntf.new .ntf-t { font-weight: 700; } .ntf.new { background: #FFF9EE; }
.ntf-t { grid-column: 1; } .ntf-m { grid-column: 1; font-size: 13px; color: var(--steel); } .ntf-d { grid-column: 2; grid-row: 1; font-size: 12px; color: var(--steel-2, #8a9bb0); white-space: nowrap; }
.todo { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px; padding: 10px 6px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.todo:hover { background: var(--brand-soft); } .todo-i { font-size: 18px; text-align: center; } .todo-n { font: 700 17px var(--num); min-width: 28px; text-align: center; }
.todo.warn .todo-n { background: #FFF1DD; color: #A55A00; border-radius: 14px; padding: 1px 9px; } .todo.err .todo-n { background: #FDECEA; color: #B3261E; border-radius: 14px; padding: 1px 9px; } .todo.info .todo-n { background: #E7EEF8; color: #1F4E8C; border-radius: 14px; padding: 1px 9px; }
.todo.sub { padding-left: 22px; font-size: 14px; } .todo.sub .todo-i { font-size: 13px; color: var(--steel); font-weight: 600; }
.homekpi { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.hk { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; color: inherit; text-decoration: none; background: #fff; }
.hk:hover { border-color: var(--brand); background: var(--brand-soft); } .hk span { font-size: 13px; color: var(--steel); } .hk strong { font: 600 22px var(--num); } .hk small { color: var(--steel); font-size: 12.5px; }
@media (max-width: 900px) { .ntf { grid-template-columns: 1fr; } .ntf-d { grid-column: 1; grid-row: auto; } .homekpi { grid-template-columns: 1fr 1fr; } .hk strong { font-size: 18px; } }

/* ---- Plan : vue par mois (téléphone) ---- */
.mview, .mtoggle { display: none; }
@media (max-width: 700px) {
  .mtoggle { display: inline-flex; margin: 4px 0 10px; width: 100%; } .mtoggle button { flex: 1; padding: 11px 8px; border: 0; background: #fff; font: 600 14.5px var(--txt); color: var(--ink); } .mtoggle button.on { background: var(--brand); color: #fff; }
  body.mview-on .mview { display: block; } body.mview-on .fitwrap, body.mview-on .fit-bar { display: none; }
  .fit-bar #fit-btn { display: none; } .fit-hint { display: none !important; }
  .mchips { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 10px; -webkit-overflow-scrolling: touch; scrollbar-width: none; } .mchips::-webkit-scrollbar { display: none; }
  .mchips button { flex: 0 0 auto; padding: 9px 14px; border: 1px solid #C5D2E3; border-radius: 20px; background: #fff; font: 600 14px var(--txt); color: var(--ink); } .mchips button.on { background: var(--brand); border-color: var(--brand); color: #fff; } .mchips button.pm:not(.on) { background: #FFF1D6; border-color: #EBCB8B; }
  .mr { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 9px 12px; background: #fff; border-bottom: 1px solid var(--line); font-size: 15px; }
  .mr .ml { flex: 1; min-width: 0; } .mr .mv { white-space: nowrap; font-variant-numeric: tabular-nums; } .mr .mv a { color: inherit; text-decoration: none; border-bottom: 1px dotted var(--steel-2, #8a9bb0); } .mr b { font-weight: 600; } .mr b.neg { color: #B3261E; }
  .mr.t-cat { padding-left: 26px; font-size: 14px; color: var(--steel); background: #FBFCFE; } .mr.t-grp { font-weight: 600; background: #F7FAFD; } .mr.t-tot { background: #E9F0F9; font-weight: 700; } .mr.t-tot .ml, .mr.t-tot b { font-weight: 700; }
  .mr.t-si { background: #F3F6FA; color: var(--steel); } .mr.t-sf { background: #0F2E57; color: #fff; font-size: 16px; } .mr.t-sf b.neg { color: #FF9B93; } .mr.t-bal { color: var(--steel); font-size: 14px; } .mr.t-av { background: #E2EEFB; font-weight: 700; } .mr.t-lz, .mr.t-lz2, .mr.t-pv, .mr.t-pvt { background: #FFF8EC; } .mr.t-lz2, .mr.t-pvt { font-weight: 700; }
  .mh { margin: 14px 0 4px; font: 700 12px var(--txt); letter-spacing: .06em; text-transform: uppercase; color: var(--steel); }
  #mbody { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
  /* tableau complet : défilement, colonne des libellés figée, police lisible */
  body:not(.mview-on) .fitwrap { overflow: auto; -webkit-overflow-scrolling: touch; max-height: 75vh; }
  body:not(.mview-on) table.pv { font-size: 13px; } body:not(.mview-on) table.pv td.lbl, body:not(.mview-on) table.pv th.lbl { position: sticky; left: 0; z-index: 3; min-width: 128px; max-width: 140px; white-space: normal; background: #fff; box-shadow: 2px 0 0 var(--line); }
  body:not(.mview-on) table.pv td.n, body:not(.mview-on) table.pv th.n { min-width: 88px; } body:not(.mview-on) table.pv thead th { position: sticky; top: 0; z-index: 4; }
}

details.mflt > summary.mflt-s { display: none; }
@media (max-width: 700px) {
  details.mflt { background: #fff; border: 1px solid var(--line); border-radius: 10px; margin: 0 0 10px; padding: 0 12px; } details.mflt[open] { padding-bottom: 8px; }
  details.mflt > summary.mflt-s { display: block; list-style: none; cursor: pointer; padding: 12px 0; font-weight: 600; font-size: 14.5px; color: var(--brand); }
  details.mflt > summary.mflt-s::after { content: ' ▾'; } details.mflt[open] > summary.mflt-s::after { content: ' ▴'; }
  .head.small { flex-direction: row; align-items: center; justify-content: space-between; } .head.small .actions { display: flex; gap: 10px; } .head.small h2 { font-size: 18px; text-align: left; }
}
.cs-badge.executee { background: #D7EFE0; color: #1B6B3A; } .cs-badge.brouillon { background: #EEF2F7; color: #4F6078; }

.pj-row { display: flex; gap: 8px; align-items: center; margin: 0 0 8px; } .pj-row select { flex: 0 0 190px; } .pj-row input[type=file] { flex: 1 1 auto; min-width: 0; }
@media (max-width: 680px) { .pj-row { flex-wrap: wrap; } .pj-row select { flex: 1 1 100%; } .pj-row input[type=file] { flex: 1 1 calc(100% - 40px); } }
#lg td:first-child input { width: 100%; max-width: none; box-sizing: border-box; }
#lg td:first-child { width: 72%; }
.ce-b { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 11.5px; font-weight: 600; background: #EEF2F7; color: #4F6078; }
.ce-b.late { background: #FDECEA; color: #B3261E; } .ce-b.now { background: #FFF1DD; color: #A55A00; } .ce-b.ok { background: #D7EFE0; color: #1B6B3A; }
.ce-b.encaisse, .ce-b.paye { background: #D7EFE0; color: #1B6B3A; } .ce-b.impaye, .ce-b.annule { background: #FDECEA; color: #B3261E; } .ce-b.remis, .ce-b.escompte, .ce-b.emis, .ce-b.a_payer { background: #E2EEFB; color: #1F5FA8; } .ce-b.portefeuille { background: #FFF1DD; color: #A55A00; }

/* ---- Gasoil dépôt ---- */
.gd-bar { display: inline-block; width: 100%; height: 8px; background: #EAEFF5; border-radius: 4px; overflow: hidden; vertical-align: middle; } .gd-bar i { display: block; height: 100%; border-radius: 4px; }
.gd-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; } .gd-chip i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.gd-st { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 11.5px; font-weight: 600; background: #EEF2F7; color: #4F6078; } .gd-st.ok { background: #D7EFE0; color: #1B6B3A; } .gd-st.warn { background: #FFF1DD; color: #A55A00; } .gd-st.ko { background: #FDECEA; color: #B3261E; }
.gd-grid { display: grid; gap: 14px; margin: 0 0 14px; } .gd-2 { grid-template-columns: 2fr 1fr; } .gd-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .gd-eq { grid-template-columns: 1fr 1fr; }
@media (max-width: 980px) { .gd-2, .gd-3, .gd-eq { grid-template-columns: 1fr; } }
.gd-card { background: #fff; border: 1px solid var(--line, #E3E9F1); border-radius: 10px; padding: 14px 16px; min-width: 0; } .gd-card h2 { margin: 0 0 2px; font-size: 15px; } .gd-card .sub { margin: 0 0 10px; color: #6B7A8C; font-size: 12.5px; }
.gd-chart { position: relative; height: 250px; } .gd-chart.sm { height: 210px; }
.gd-rank { width: 100%; border-collapse: collapse; font-size: 13.5px; } .gd-rank td { padding: 5px 4px; border-top: 1px solid #EEF2F7; vertical-align: middle; } .gd-rank tr:first-child td { border-top: 0; } .gd-rank .n { text-align: right; white-space: nowrap; } .gd-rank td.b { width: 24%; }
.gd-rank tr[data-d] { cursor: pointer; } .gd-rank tr[data-d]:hover { background: var(--brand-soft, #EAF1FB); }
.kpis .kpi[data-d] { cursor: pointer; } .kpis .kpi[data-d]:hover { box-shadow: inset 0 0 0 2px var(--brand-soft, #CFE0F5); }
.gd-alert { background: #FFF6E5; border: 1px solid #F2D49B; color: #7A4B00; border-radius: 8px; padding: 9px 14px; margin: 0 0 14px; font-size: 13.5px; } .gd-alert a, .gd-alert button.link { color: #7A4B00; font-weight: 600; }
.gd-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; background: #F3F7FC; border: 1px solid #DCE6F3; border-radius: 8px; padding: 10px 12px; margin: 8px 0 12px; font-size: 13px; } .gd-info b { display: block; font-size: 15px; } .gd-info span.l { color: #6B7A8C; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; }
.gd-info.ko { background: #FDECEA; border-color: #F2B8B0; } .gd-info.ok { background: #EAF6EF; border-color: #BFE3CE; }
.gd-msg { border-radius: 8px; padding: 8px 12px; margin: 6px 0; font-size: 13.5px; } .gd-msg.ko { background: #FDECEA; color: #8F1D14; } .gd-msg.warn { background: #FFF1DD; color: #7A4B00; }
.gd-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 12px; } .gd-tabs a { padding: 6px 14px; border-radius: 18px; background: #EEF2F7; color: #38506B; text-decoration: none; font-weight: 600; font-size: 13.5px; } .gd-tabs a.on { background: var(--brand, #1F5FA8); color: #fff; }
.gd-days { display: flex; align-items: flex-end; gap: 2px; height: 70px; } .gd-days i { flex: 1; background: #1F5FA8; border-radius: 2px 2px 0 0; min-height: 2px; }
.gd-sum { display: flex; gap: 24px; flex-wrap: wrap; margin: 4px 0 12px; } .gd-sum div { min-width: 110px; } .gd-sum b { display: block; font-size: 19px; } .gd-sum span { color: #6B7A8C; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
/* gasoil dépôt */
.gz-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; } .gz-grid .card { margin-bottom: 0; }
.gz-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 16px; align-items: start; }
.gz-jauge { height: 7px; background: rgba(255,255,255,.18); border-radius: 4px; margin-top: 10px; overflow: hidden; } .gz-jauge i { display: block; height: 100%; border-radius: 4px; }
.gz-rule { background: var(--brand-soft); border: 1px solid #C5D2E3; border-radius: 4px; padding: 10px 14px; margin: 4px 0 12px; font-size: 14.5px; }
.chip { display: inline-block; padding: 2px 9px; border-radius: 10px; background: color-mix(in srgb, var(--c, #4F6078) 14%, #fff); color: var(--c, #4F6078); border: 1px solid color-mix(in srgb, var(--c, #4F6078) 40%, #fff); font-weight: 600; font-size: 12.5px; }
.crumbs { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; } .crumbs .chip { text-decoration: none; }
table.grid tr.on td { background: var(--brand-soft); } table.grid tr.gz-in td { background: #F3FAF5; } .dotc { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: -1px; }
h3.small { font: 600 14px var(--head); margin: 0 0 8px; color: var(--steel); }
@media (max-width: 980px) { .gz-grid, .gz-two { grid-template-columns: minmax(0, 1fr); } }

/* ===== Gasoil dépôt : tableau de bord (palette contrastée, lecture simple) ===== */
.gz-cit { display: flex; gap: 8px; flex-wrap: wrap; margin: 2px 0 12px; }
.gz-cit a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; background: #fff; border: 1.5px solid #B8C4D6; border-radius: 999px; color: #0B1F3A; font-weight: 600; font-size: 14px; text-decoration: none; }
.gz-cit a i { width: 11px; height: 11px; border-radius: 50%; background: var(--c); } .gz-cit a small { color: #2B3A4F; font-weight: 700; background: #E7EDF6; border-radius: 999px; padding: 1px 8px; font-size: 12.5px; }
.gz-cit a.on { background: #0B1F3A; color: #fff; border-color: #0B1F3A; } .gz-cit a.on small { background: rgba(255,255,255,.2); color: #fff; }
.gz-bar { display: grid; grid-template-columns: auto repeat(3, minmax(130px, 1fr)) auto auto; gap: 10px 12px; align-items: end; background: #fff; border: 1.5px solid #B8C4D6; border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; }
.gz-bar label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #2B3A4F; } .gz-bar select, .gz-bar input { min-height: 42px; width: 100%; box-sizing: border-box; font-size: 15px; color: #0B1F3A; border: 1.5px solid #8FA1BA; border-radius: 9px; padding: 0 10px; background: #fff; }
.gz-bar-dates { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; padding-right: 14px; border-right: 2px solid #E1E8F2; } .gz-bar-dates > b { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: #0B5ED7; align-self: center; width: 100%; margin-bottom: -4px; } .gz-bar-dates label { flex: 1 1 140px; }
.gz-unit { display: inline-flex; border: 1.5px solid #8FA1BA; border-radius: 9px; overflow: hidden; height: 42px; } .gz-unit a { padding: 0 16px; display: flex; align-items: center; font-weight: 700; color: #0B1F3A; text-decoration: none; background: #fff; } .gz-unit a.on { background: #0B5ED7; color: #fff; }
.gz-bar-go { display: flex; gap: 8px; } .gz-bar-go .btn { min-height: 42px; }
.gz-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; } .gz-chips span, .gz-chips a { display: inline-flex; align-items: center; padding: 6px 13px; border-radius: 999px; font-size: 13.5px; font-weight: 700; text-decoration: none; border: 1.5px solid; } .gz-chips .warn { background: #FFF1D6; color: #8A4B00; border-color: #F2B138; } .gz-chips .ko { background: #FFE3E3; color: #B02525; border-color: #F08A8A; } .gz-chips .info { background: #E3EFFF; color: #0B4DA8; border-color: #8DB7F2; }
.gz-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 10px; margin-bottom: 4px; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.gz-tabs a { flex: 0 0 auto; padding: 10px 18px; border-radius: 999px; background: #fff; border: 1.5px solid #B8C4D6; color: #0B1F3A; font-weight: 700; font-size: 14px; text-decoration: none; white-space: nowrap; } .gz-tabs a.on { background: #E8590C; border-color: #E8590C; color: #fff; }
.gzgrid { display: grid; gap: 12px; margin-bottom: 14px; } .gzgrid.k6 { grid-template-columns: repeat(6, minmax(0, 1fr)); } .gzgrid.k5 { grid-template-columns: repeat(5, minmax(0, 1fr)); } .gzgrid.k4 { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 12px 0; }
.gzk { background: #fff; border: 1.5px solid #B8C4D6; border-left: 6px solid var(--k, #0B5ED7); border-radius: 12px; padding: 13px 15px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.gzk span { font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #2B3A4F; } .gzk strong { font: 800 clamp(20px, 2.1vw, 28px)/1.15 var(--num, inherit); color: #0B1F3A; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; } .gzk small { color: #3D4F68; font-size: 13px; font-weight: 500; display: flex; flex-direction: column; gap: 4px; }
.gzk.out { --k: #E8590C; } .gzk.cost { --k: #C92A2A; } .gzk.in { --k: #0B5ED7; } .gzk.stock { --k: #2B8A3E; } .gzk.price { --k: #7048E8; } .gzk.act { --k: #495057; }
em.dl { font-style: normal; font-weight: 800; font-size: 12.5px; padding: 1px 8px; border-radius: 999px; margin-right: 4px; } em.dl.up { background: #FFE3E3; color: #B02525; } em.dl.dn { background: #D3F9D8; color: #1F6B31; }
.gz-gauge { display: block; height: 10px; background: #E1E8F2; border-radius: 6px; overflow: hidden; } .gz-gauge b { display: block; height: 100%; background: #2B8A3E; border-radius: 6px; } .gz-gauge b.low { background: #F08C00; } .gz-gauge b.neg { background: #C92A2A; }
.gzrow { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; } .gzrow.r21 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); } .gzrow .card, .gzrow section { margin: 0; min-width: 0; }
.gzrow h2, .card h2 { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; font-size: 16px; color: #0B1F3A; } .gz-leg { margin-left: auto; font: 600 13px var(--txt, inherit); color: #2B3A4F; display: inline-flex; gap: 5px; align-items: center; } .gz-leg i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-left: 8px; } .gz-unit-l { margin-left: auto; font-size: 12px; font-weight: 800; color: #0B5ED7; background: #E3EFFF; border-radius: 999px; padding: 2px 10px; }
.gzc { position: relative; height: 330px; } .gzc.s { height: 270px; }
.gzbars { display: flex; flex-direction: column; gap: 4px; } .gzbars a { display: grid; grid-template-columns: minmax(96px, 150px) 1fr auto auto; gap: 10px; align-items: center; padding: 6px 4px; border-radius: 8px; text-decoration: none; color: #0B1F3A; font-size: 14px; } .gzbars a:hover { background: #EEF3FA; }
.gzbars a span { display: flex; align-items: center; gap: 8px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .gzbars a span i { width: 12px; height: 12px; border-radius: 3px; flex: 0 0 auto; } .gzbars em { display: block; height: 14px; background: #E8EEF6; border-radius: 7px; overflow: hidden; } .gzbars em b { display: block; height: 100%; border-radius: 7px; }
.gzbars strong { font-variant-numeric: tabular-nums; font-weight: 800; } .gzbars small { color: #3D4F68; font-weight: 700; min-width: 36px; text-align: right; }
.gzcount { font: 700 13px var(--txt, inherit); color: #2B3A4F; background: #E7EDF6; border-radius: 999px; padding: 3px 11px; margin-left: 8px; }
details.gzf { background: #fff; border: 1.5px solid #B8C4D6; border-radius: 12px; margin-bottom: 10px; overflow: hidden; }
details.gzf > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px 24px; flex-wrap: wrap; padding: 14px 18px; border-left: 8px solid var(--c); } details.gzf > summary::-webkit-details-marker { display: none; } details.gzf > summary:hover { background: #EEF3FA; }
.gzfn { font: 800 17px var(--head, inherit); color: #0B1F3A; display: flex; flex-direction: column; } .gzfn small { font: 600 12.5px var(--txt, inherit); color: #3D4F68; } .gzfs { display: flex; gap: 8px 26px; flex-wrap: wrap; } .gzfs > span { display: flex; flex-direction: column; } .gzfs small { font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #3D4F68; } .gzfs b { font-size: 16px; color: #0B1F3A; font-variant-numeric: tabular-nums; }
.gzt td { vertical-align: top; } table.gzsub { width: 100%; border: 0; } table.gzsub td { padding: 2px 8px; border: 0; font-size: 13px; }
.gz-mbar { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin-bottom: 10px; } .gz-seg { display: inline-flex; border: 1.5px solid #8FA1BA; border-radius: 9px; overflow: hidden; } .gz-seg a { padding: 8px 14px; font-weight: 700; font-size: 13.5px; color: #0B1F3A; text-decoration: none; background: #fff; } .gz-seg a.on { background: #0B5ED7; color: #fff; }
.gz-matrix { overflow: auto; max-height: 72vh; border: 1.5px solid #B8C4D6; border-radius: 12px; background: #fff; } .gz-matrix table { border-collapse: separate; border-spacing: 0; min-width: 100%; font-size: 13px; }
.gz-matrix thead th { position: sticky; top: 0; background: #0B1F3A !important; color: #fff !important; z-index: 2; white-space: nowrap; padding: 8px 10px; font-weight: 800; } .gz-matrix thead th.s2 { top: 35px; background: #0B5ED7 !important; font-size: 11.5px; } .gz-matrix th.c { text-align: center; border-left: 1px solid rgba(255,255,255,.3); }
.gz-matrix td.sticky, .gz-matrix th.sticky { position: sticky; left: 0; z-index: 3; background: #fff; min-width: 140px; box-shadow: 2px 0 0 #B8C4D6; } .gz-matrix th.sticky { background: #0B1F3A !important; z-index: 4; }
.gz-matrix tr.gz-fam td { background: #E3EFFF; font-weight: 800; color: #0B1F3A; } .gz-matrix tr.gz-fam td.sticky { background: #E3EFFF; border-left: 6px solid var(--c); } .gz-matrix tr.gz-tot td { background: #0B1F3A; color: #fff; position: sticky; bottom: 0; z-index: 2; } .gz-matrix tr.gz-tot td.sticky { background: #0B1F3A; }
.gz-matrix td { white-space: nowrap; padding: 6px 10px; border-bottom: 1px solid #E1E8F2; color: #0B1F3A; } .gz-matrix td.heat { background: rgba(11,94,215,var(--a)); color: #0B1F3A; font-weight: 600; } .gz-matrix td.muted { color: #8393AB; }
.gz-eh { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; } .gz-eh h2 { margin: 0; } .chip { display: inline-block; padding: 3px 12px; border-radius: 999px; background: var(--c); color: #fff; font-size: 12.5px; font-weight: 800; letter-spacing: .03em; }
.gz-tag { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 800; background: #E7EDF6; color: #1F3350; } .gz-tag.in { background: #D3F9D8; color: #1F6B31; } .gz-tag.warn { background: #FFF1D6; color: #8A4B00; }
.gz-fam-dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; background: var(--c); vertical-align: middle; }
@media (max-width: 1180px) { .gzgrid.k6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .gzgrid.k5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .gzrow.r21 { grid-template-columns: 1fr; } .gz-bar { grid-template-columns: 1fr 1fr 1fr; } .gz-bar-dates { grid-column: 1 / -1; border-right: 0; padding-right: 0; } }
@media (max-width: 760px) { .gzgrid.k6, .gzgrid.k5, .gzgrid.k4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .gzrow { grid-template-columns: 1fr; } .gz-bar { grid-template-columns: 1fr 1fr; padding: 10px; } .gz-bar-go, .gz-unit { grid-column: auto; } .gz-bar-go .btn { flex: 1; justify-content: center; } .gzc { height: 260px; } .gzc.s { height: 220px; } .gz-cit a { flex: 1 1 100%; } .gzbars a { grid-template-columns: 92px 1fr auto; } .gzbars a small { display: none; } .gzfs { gap: 8px 16px; } .gzk strong { font-size: 20px; } }
@media (max-width: 420px) { .gz-bar { grid-template-columns: 1fr; } .gzgrid.k6, .gzgrid.k5, .gzgrid.k4 { grid-template-columns: 1fr 1fr; } }

/* ===== Gasoil : page Mouvements ===== */
.gzm-filtre { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 12px; align-items: end; background: #fff; border: 1.5px solid #B8C4D6; border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; }
.gzm-filtre label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #2B3A4F; } .gzm-filtre select, .gzm-filtre input[type=date], .gzm-filtre input[type=search] { min-height: 40px; width: 100%; box-sizing: border-box; font-size: 14.5px; color: #0B1F3A; border: 1.5px solid #8FA1BA; border-radius: 9px; padding: 0 9px; background: #fff; }
.gzm-filtre .gzm-chk { flex-direction: row; align-items: center; gap: 8px; min-height: 40px; text-transform: none; font-size: 14px; } .gzm-filtre .gzm-chk input { width: 18px; height: 18px; } .gzm-btn { display: flex; gap: 8px; flex-wrap: wrap; } .gzm-q { grid-column: span 2; }
.gzm-tot { display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 8px 4px 12px; font-size: 15px; color: #1F3350; } .gzm-tot b { color: #0B1F3A; font-size: 17px; }
.gzm-msg { padding: 10px 14px; border-radius: 10px; margin-bottom: 8px; font-weight: 700; } .gzm-msg.ok { background: #D3F9D8; color: #1F6B31; } .gzm-msg.ko { background: #FFE3E3; color: #B02525; }
table.gzm td, table.gzm th { padding: 9px 10px; } table.gzm tr.gz-in td { background: #F1F7FF; } table.gzm tr.gz-warn td:first-child { box-shadow: inset 5px 0 0 #F08C00; } table.gzm tr.saved td { background: #D3F9D8 !important; transition: background 1.5s; }
table.gzm tr.editing td { background: #FFF8E1 !important; vertical-align: middle; } table.gzm tr.editing input { min-height: 36px; padding: 0 8px; border: 1.5px solid #0B5ED7; border-radius: 7px; font-size: 14px; max-width: 150px; text-align: right; } table.gzm tr.editing input[name=engin], table.gzm tr.editing input[name=chauffeur], table.gzm tr.editing input[name=date_mv] { text-align: left; }
.acts { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } button.gzq, button.gzs-ok, button.gzs-no { border: 1.5px solid #0B5ED7; background: #E3EFFF; color: #0B4DA8; font-weight: 800; border-radius: 8px; padding: 6px 12px; cursor: pointer; font-size: 13px; } button.gzs-ok { background: #0B5ED7; color: #fff; } button.gzs-no { background: #fff; color: #2B3A4F; border-color: #8FA1BA; }
@media (max-width: 760px) { .gzm-q { grid-column: 1 / -1; } table.gzm td, table.gzm th { padding: 7px 6px; font-size: 13px; } }

/* ===== Gasoil : écran de saisie ===== */
.gzs { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 16px; align-items: start; } .gzs-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.gzs-step { padding: 16px 18px; margin: 0; } .gzs-step h2 { display: flex; align-items: center; gap: 10px; font-size: 16px; margin: 0 0 12px; } .gzs-step h2 i { width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff; font: 700 14px/26px var(--num, inherit); text-align: center; font-style: normal; }
.gzs .grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; } .gzs .grid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; } .gzs label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--steel); font-weight: 600; }
.gzs input.big { font-size: 22px; font-weight: 700; padding: 10px 12px; min-height: 50px; color: var(--ink); font-variant-numeric: tabular-nums; } .gzs input, .gzs select { min-height: 42px; }
.gzs-hint { font-size: 12.5px; color: var(--steel); font-weight: 500; min-height: 16px; }
.gzs-status { margin: 12px 0 4px; padding: 12px 14px; border-radius: 10px; background: var(--concrete); color: var(--steel); font-size: 14px; border-left: 5px solid var(--steel-2); } .gzs-status.ok { background: #E4F4EA; color: #1B5E3A; border-left-color: #2E8B57; } .gzs-status.ko { background: #FBE9E6; color: #8C2A1B; border-left-color: #C2412D; font-weight: 600; }
.gzs-side { position: sticky; top: 12px; display: flex; flex-direction: column; gap: 12px; } .gzs-card { padding: 14px 16px; margin: 0; } .gzs-card h3 { margin: 0 0 6px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--steel); }
.gzs-big { font: 700 30px/1.1 var(--num, inherit); color: var(--ink); font-variant-numeric: tabular-nums; } .gzs-big small { font-size: 15px; color: var(--steel); } .gzs-lab { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--steel-2); font-weight: 700; } .gzs-fam { font-weight: 700; margin-bottom: 6px; color: var(--brand); }
.gz-gauge { height: 10px; background: var(--concrete); border-radius: 6px; overflow: hidden; margin: 8px 0 4px; } .gz-gauge i { display: block; height: 100%; background: #2E8B57; border-radius: 6px; transition: width .2s; } .gz-gauge i.low { background: #ED7C2F; } .gz-gauge i.neg { background: #C2412D; }
table.gzs-h { width: 100%; font-size: 12.5px; border-collapse: collapse; } table.gzs-h td { padding: 3px 4px; border-bottom: 1px solid var(--concrete); } .gzs-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; } .gzs-actions .btn.big { padding: 13px 28px; font-size: 16px; }
@media (max-width: 900px) { .gzs { grid-template-columns: 1fr; } .gzs-side { position: static; order: -1; } .gzs .grid3, .gzs .grid2 { grid-template-columns: 1fr; } .gzs-actions .btn { flex: 1 1 100%; justify-content: center; } }
.gzs .grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .gzs .grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .gzs .grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.gzs label input, .gzs label select { width: 100%; min-width: 0; box-sizing: border-box; } .gzs-step { overflow: hidden; }
@media (max-width: 900px) { .gzs .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.gzs-info { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; padding: 11px 14px; margin: 0 0 12px; border-radius: 10px; background: #EEF3FA; border: 1.5px dashed #8FA1BA; color: #2B3A4F; font-size: 14px; } .gzs-info.on { background: #E3EFFF; border: 1.5px solid #0B5ED7; color: #0B1F3A; } .gzs-info span { font-weight: 800; text-transform: uppercase; font-size: 12px; letter-spacing: .05em; color: #0B4DA8; } .gzs-info b { font-size: 22px; font-variant-numeric: tabular-nums; } .gzs-info small { color: #3D4F68; font-size: 13px; }
.gzs-status { border-left-width: 6px; font-weight: 600; } .gzs-status.ok { background: #D3F9D8; color: #1F6B31; border-left-color: #2B8A3E; } .gzs-status.ko { background: #FFE3E3; color: #B02525; border-left-color: #C92A2A; }

.gzk strong u { font-size: .5em; font-weight: 800; text-decoration: none; color: #3D4F68; margin-left: 3px; letter-spacing: .02em; } .gzbars a { grid-template-columns: minmax(110px, 175px) 1fr auto auto; }
@media (min-width: 900px) { table.gzm td.acts { white-space: nowrap; } table.gzm .acts { flex-wrap: nowrap; } }

/* ===== Gasoil Beni Amir ===== */
.gzdual { display: flex; flex-direction: column; gap: 3px; } .gzdual a { display: grid; grid-template-columns: minmax(110px, 170px) 1fr 70px; gap: 10px; align-items: center; padding: 6px 4px; border-radius: 8px; text-decoration: none; color: #0B1F3A; font-size: 14px; } .gzdual a:hover { background: #EEF3FA; }
.gzdual a span { display: flex; align-items: center; gap: 8px; font-weight: 600; } .gzdual a span i { width: 12px; height: 12px; border-radius: 3px; flex: 0 0 auto; } .gzdual div { display: grid; grid-template-columns: 1fr 52px; gap: 2px 8px; align-items: center; } .gzdual em { display: block; height: 9px; background: #E8EEF6; border-radius: 5px; overflow: hidden; } .gzdual em b { display: block; height: 100%; border-radius: 5px; } .gzdual small { font-weight: 700; color: #2B3A4F; font-size: 12px; text-align: right; } .gzdual strong { text-align: right; font-variant-numeric: tabular-nums; }
.gz-note { color: #3D4F68; font-size: 13px; margin: 10px 2px 0; } tr.gz-totr td { background: #E3EFFF; border-top: 2px solid #0B5ED7; } table.gzmain th a { color: inherit; text-decoration: none; } table.gzmain th a.srt { color: #E8590C; } table.gzmain td, table.gzmain th { white-space: nowrap; }
@media (max-width: 760px) { .gzdual a { grid-template-columns: 1fr 64px; } .gzdual a span { grid-column: 1 / -1; } }

.gz-bar[hidden] { display: none; }

/* ===== Gestion commerciale ===== */
.no-print { } .cm-print-head { display: none; } .cm-cl { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; align-items: flex-start; margin-bottom: 6px; } .cm-kp { text-align: right; background: #EEF3FA; border: 1.5px solid #B8C4D6; border-radius: 12px; padding: 10px 16px; } .cm-kp span { display: block; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #3D4F68; } .cm-kp b { font-size: 24px; font-variant-numeric: tabular-nums; } .cm-kp small { display: block; color: #3D4F68; }
table.cm-bal th, table.cm-bal td { white-space: nowrap; } table.cm-rel td { vertical-align: top; }
@media print { .no-print, .side, .topbar, nav.gz-tabs, .gz-bar, .actions, .head { display: none !important; } .cm-print-head { display: flex !important; align-items: center; gap: 16px; border-bottom: 3px solid #0B5ED7; padding-bottom: 8px; margin-bottom: 10px; } .card { box-shadow: none !important; border: 0 !important; } body { background: #fff !important; } .main, main { margin: 0 !important; padding: 0 !important; } table.grid { font-size: 11.5px; } }
.cm-reg { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid #E1E8F2; font-size: 13.5px; } .seg-l { padding: 8px 14px; font-weight: 700; font-size: 13.5px; color: #0B1F3A; background: #fff; display: flex; gap: 6px; align-items: center; cursor: pointer; }

.gzgrid.k3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .gzrow.r3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .gzrow.r3 .gzbars a { grid-template-columns: minmax(90px, 130px) 1fr auto auto; }
.gzs input[type=checkbox], .gz-bar input[type=checkbox], .gzm-filtre input[type=checkbox] { width: 20px !important; height: 20px; min-height: 20px !important; padding: 0; }
@media (max-width: 1180px) { .gzrow.r3 { grid-template-columns: 1fr; } } @media (max-width: 760px) { .gzgrid.k3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* recherche rapide (cm.js) */
.cmf { position: relative; } .cmf-sel { position: absolute; opacity: 0; pointer-events: none; height: 0; width: 0; } .cmf-i { width: 100%; box-sizing: border-box; }
.cmf-l { position: absolute; z-index: 60; left: 0; right: 0; top: 100%; max-height: 280px; overflow: auto; background: #fff; border: 1.5px solid #0B5ED7; border-radius: 10px; box-shadow: 0 10px 28px rgba(11,31,58,.22); margin-top: 3px; min-width: 260px; }
.cmf-o { padding: 8px 12px; cursor: pointer; font-size: 14px; border-bottom: 1px solid #EEF2F8; } .cmf-o.on, .cmf-o:hover { background: #E3EEFF; } .cmf-o span { color: #3D4F68; } .cmf-o small { color: #6B7A90; float: right; } .cmf-n { padding: 10px 12px; color: #6B7A90; font-size: 13px; }
.cmf-eng .cmf-l { min-width: 340px; } table .cmf-eng .cmf-i { min-width: 110px; } .req::after { content: ' *'; color: #C92A2A; font-weight: 800; }

#lt { table-layout: fixed; width: 100%; } #lt input, #lt select { width: 100%; min-width: 0; box-sizing: border-box; } #lt td, #lt th { padding-left: 4px; padding-right: 4px; } #lt .cmf { min-width: 0; } #lt .ttc { white-space: nowrap; font-size: 13px; }

.cm-mob { grid-column: span 2; display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; border: 1.5px dashed #B8C4D6; border-radius: 10px; padding: 8px 12px; background: #F6F9FE; } .cm-mob .chk { margin: 0 6px 6px 0; } .cm-mob label[hidden] { display: none; } .cm-mob label:not(.chk) { flex: 1; min-width: 240px; }

.cm-depbar { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; background: #EEF3FA; border: 1.5px solid #B8C4D6; border-radius: 12px; padding: 8px 14px; margin-bottom: 8px; position: sticky; top: 0; z-index: 5; } .cm-depbar label { margin: 0; } .cm-depbar .chk { align-self: center; }
.cm-pt-tot { display: flex; gap: 22px; flex-wrap: wrap; background: #EEF3FA; border: 1.5px solid #B8C4D6; border-radius: 12px; padding: 10px 16px; margin: 10px 0; } .cm-pt-tot div span { display: block; font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #3D4F68; } .cm-pt-tot b { font-size: 20px; font-variant-numeric: tabular-nums; }

/* choix multiple (cm.js) */
.cmm { position: relative; min-width: 0; width: 100%; } .cmm-b { width: 100%; text-align: left; background: #fff; border: 1.5px solid #B8C4D6; border-radius: 10px; padding: 10px 12px; min-height: 42px; font: inherit; font-size: 14px; color: #6B7A90; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .cmm-b.on { color: #0B1F3A; border-color: #0B5ED7; background: #EEF5FF; font-weight: 700; } .cmm-b::after { content: '▾'; float: right; color: #3D4F68; }
.cmm-p { position: absolute; z-index: 70; top: 100%; left: 0; min-width: 280px; background: #fff; border: 1.5px solid #0B5ED7; border-radius: 12px; box-shadow: 0 12px 30px rgba(11,31,58,.25); margin-top: 3px; padding: 8px; } .cmm-q { width: 100%; box-sizing: border-box; margin-bottom: 6px; } .cmm-l { max-height: 260px; overflow: auto; } .cmm-l label { display: flex; gap: 8px; align-items: center; padding: 5px 6px; margin: 0; font-size: 14px; font-weight: 500; text-transform: none; letter-spacing: 0; cursor: pointer; border-radius: 6px; } .cmm-l label:hover { background: #E3EEFF; } .cmm-l label[hidden] { display: none; } .cmm-l input { width: 17px; min-height: 17px; } .cmm-f { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; } .cmm-f button { background: none; border: 0; color: #0B5ED7; font-weight: 700; cursor: pointer; font: inherit; }
a.gzk { text-decoration: none; color: inherit; display: block; } a.gzk:hover { box-shadow: 0 6px 18px rgba(11,31,58,.18); transform: translateY(-1px); } .heat a { color: inherit; text-decoration: none; font-weight: 700; } .heat a:hover { text-decoration: underline; }

.cmm-l label, .gz-bar .cmm-l label { flex-direction: row !important; align-items: center; justify-content: flex-start; text-align: left; color: #0B1F3A; gap: 8px; } .cmm-l label span { flex: 1; }
.cmm-q { margin: 0 0 6px; }

.cmm-b { display: flex; align-items: center; justify-content: space-between; gap: 8px; } .cmm-b::after { float: none !important; flex: none; } .cmm-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }

/* ===== Adaptation mobile ===== */
.mfilt { display: none; width: 100%; box-sizing: border-box; margin: 0 0 10px; padding: 12px 14px; border: 1.5px solid #0B5ED7; border-radius: 12px; background: #EEF5FF; color: #0B3A8C; font: inherit; font-weight: 800; font-size: 15px; text-align: left; cursor: pointer; } .mfilt[hidden] { display: none !important; }
.c-tog { display: none; }
@media (max-width: 760px) {
  .mfilt { display: block; } form.mf-off { display: none !important; }
  input:not([type=checkbox]):not([type=radio]), select, textarea { font-size: 16px !important; }
  .btn, button.btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; } .actions { gap: 8px; } .actions .btn { flex: 1 1 calc(50% - 8px); }
  .gz-tabs, nav.tabs, .tabs { display: flex; overflow-x: auto; flex-wrap: nowrap; white-space: nowrap; -webkit-overflow-scrolling: touch; gap: 6px; padding-bottom: 6px; scrollbar-width: none; } .gz-tabs a, .tabs a { flex: none; }
  .grid2, .grid3, .grid4 { grid-template-columns: 1fr !important; }
  .gzs { display: block; } .gzs-side { margin-top: 12px; } .gzs-actions { position: sticky; bottom: 0; z-index: 25; background: #fff; border-top: 1.5px solid #B8C4D6; padding: 10px; margin: 0 -4px; display: flex; gap: 8px; } .gzs-actions .btn { flex: 1; }
  .cmf-l, .cmm-p { min-width: 0 !important; max-width: calc(100vw - 28px); } .cmf-eng .cmf-l { min-width: 0 !important; }
  .table-wrap, .table-wrap.tall { max-height: none; } .gzc { height: 220px !important; } .gzc.s { height: 200px !important; } .cm-pt-tot { gap: 12px; } .cm-pt-tot b { font-size: 17px; } .cm-depbar { position: static; }
  td a, td button.link { display: inline-block; padding: 6px 2px; min-height: 28px; }
  main, .main, .with-side { padding-left: 12px !important; padding-right: 12px !important; }
  h1 { font-size: 23px !important; line-height: 1.2; } .head { gap: 8px; }
  .gz-chips span { font-size: 13px; } .gzk strong { font-size: 24px; }
  /* facture : lignes empilées */
  #lt { table-layout: auto; } #lt thead, #lt colgroup, #lt tfoot { display: none; } #lt, #lt tbody { display: block; width: 100%; } #lt tr { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; border: 1.5px solid #D5DEEA; border-radius: 12px; padding: 10px; margin-bottom: 10px; background: #fff; }
  #lt td { display: block; padding: 0 !important; border: 0 !important; } #lt td::before { display: block; font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: #5B6B80; margin-bottom: 2px; }
  #lt td:nth-child(1) { grid-column: 1 / -1; } #lt td:nth-child(1)::before { content: 'Engin'; } #lt td:nth-child(2) { grid-column: 1 / -1; } #lt td:nth-child(2)::before { content: 'Désignation'; } #lt td:nth-child(3)::before { content: 'Réalisation'; } #lt td:nth-child(4)::before { content: 'Montant HT'; } #lt td:nth-child(5)::before { content: 'TVA'; } #lt td:nth-child(6)::before { content: 'TTC'; } #lt td:nth-child(6) { align-self: end; font-size: 16px; } #lt td:nth-child(7) { grid-column: 1 / -1; text-align: right; } #lt .cmf-i { width: 100%; }
  /* tableaux en cartes */
  table[data-cards] { display: block; width: 100%; } table[data-cards] thead { display: none; } table[data-cards] tbody { display: block; }
  table[data-cards] tr { display: block; background: #fff; border: 1.5px solid #D5DEEA; border-radius: 12px; margin: 0 0 10px; padding: 10px 12px; }
  table[data-cards] td { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 4px 0 !important; border: 0 !important; text-align: right; max-width: none; white-space: normal; }
  table[data-cards] td[data-label]:not(.c-title):not([data-label=""])::before { content: attr(data-label); font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: #5B6B80; text-align: left; flex: none; }
  table[data-cards] td.c-title { display: block; text-align: left; font-size: 16px; padding: 0 0 6px !important; margin-bottom: 4px; border-bottom: 1px dashed #D5DEEA !important; }
  table[data-cards] td:empty { display: none; } table[data-cards] td[colspan] { display: block; text-align: center; } table[data-cards] tr.gz-totr, table[data-cards] tr.gz-fam { background: #EEF3FA; }
  table[data-cards] td.c-more { display: none; } table[data-cards] tr.open td.c-more { display: flex; } table[data-cards] td.c-tog { display: block; text-align: center; color: #0B5ED7; font-weight: 800; padding: 8px 0 2px !important; cursor: pointer; }
  table[data-cards] td input:not([type=checkbox]) { width: 55%; } table[data-cards] .sticky, table[data-cards] .stick { position: static; }
}

@media (max-width: 760px) { td a, td button.link { display: inline-flex; align-items: center; padding: 8px 5px; min-height: 38px; } table[data-cards] td a { min-height: 40px; padding: 9px 8px; } table[data-cards] td.c-title a { padding: 2px 0; min-height: 0; } .brand, .side a { min-height: 40px; } }

@media (max-width: 760px) {
  table[data-cards] td.c-empty { display: none; } .table-wrap:has(> table[data-cards]) { border: 0 !important; background: transparent !important; box-shadow: none !important; padding: 0 !important; overflow: visible; }
  .gzk { padding: 12px 14px; } .gzk span { font-size: 11px; } .gzk strong { font-size: 19px !important; line-height: 1.25; } .gzk strong u { font-size: 11px; } .gzk small { font-size: 12px; } .gzgrid { gap: 8px; }
  .card { padding: 14px 12px; } .card h2 { font-size: 17px; flex-wrap: wrap; gap: 6px; }
}

@media (max-width: 760px) {
  table[data-cards] tr { display: flex; flex-direction: column; } table[data-cards] td.c-title { order: -1; } table[data-cards] td[data-label=""]:has(input[type=checkbox]) { order: -2; padding-bottom: 2px !important; } table[data-cards] td.c-tog { order: 99; }
}

@media (max-width: 760px) {
  #lt td { background: transparent !important; } #lt .cmf, #lt .cmf-eng, #lt input, #lt select { width: 100% !important; max-width: 100%; box-sizing: border-box; } #lt td:nth-child(4)::before { content: 'HT'; } #lt td:nth-child(1) .cmf { display: block; }
}

.cm-anc { align-items: center; } .cm-anc-l { padding: 8px 12px; font-weight: 800; color: #0B1F3A; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }

/* ===== Notifications en direct ===== */
.nf-bell { position: fixed; right: 18px; bottom: 18px; z-index: 90; width: 52px; height: 52px; border-radius: 50%; border: 0; background: #1F4E8C; color: #fff; font-size: 23px; cursor: pointer; box-shadow: 0 6px 20px rgba(11,31,58,.35); display: flex; align-items: center; justify-content: center; } .nf-bell.has { background: #E8590C; animation: nfpulse 2.4s ease-in-out infinite; }
.nf-n { position: absolute; top: -4px; right: -4px; min-width: 22px; height: 22px; padding: 0 5px; box-sizing: border-box; border-radius: 11px; background: #C92A2A; color: #fff; font: 800 12px/22px Barlow, sans-serif; text-align: center; border: 2px solid #fff; } .nf-n[hidden] { display: none; } @keyframes nfpulse { 0%, 100% { box-shadow: 0 6px 20px rgba(11,31,58,.35), 0 0 0 0 rgba(232,89,12,.5); } 50% { box-shadow: 0 6px 20px rgba(11,31,58,.35), 0 0 0 12px rgba(232,89,12,0); } }
.nf-panel { position: fixed; right: 18px; bottom: 82px; z-index: 91; width: min(410px, calc(100vw - 24px)); max-height: min(72vh, 620px); overflow: auto; background: #fff; border: 1.5px solid #B8C4D6; border-radius: 14px; box-shadow: 0 16px 44px rgba(11,31,58,.32); } .nf-panel[hidden] { display: none; }
.nf-h { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid #E3EAF4; position: sticky; top: 0; background: #fff; } .nf-h b { font-size: 16px; } .nf-h span { color: #5B6B80; font-size: 13px; flex: 1; } .nf-close { border: 0; background: none; font-size: 18px; cursor: pointer; color: #3D4F68; }
.nf-todo { display: block; padding: 10px 14px; background: #FFF4E6; color: #7C3A00; text-decoration: none; border-bottom: 1px solid #FFE0B8; font-size: 14px; } .nf-todo:hover { background: #FFE8CC; }
.nf-it { display: block; padding: 10px 14px; border-bottom: 1px solid #EEF2F8; text-decoration: none; color: #14243B; } .nf-it:hover { background: #F2F7FF; } .nf-it.un { background: #F0F6FF; border-left: 4px solid #0B5ED7; } .nf-it.act.un { border-left-color: #E8590C; background: #FFF8F0; } .nf-it b { display: block; font-size: 14px; } .nf-it span { display: block; font-size: 13px; color: #3D4F68; margin-top: 2px; } .nf-it small { color: #8A9BB0; font-size: 11.5px; }
.nf-empty { padding: 18px; text-align: center; color: #6B7A90; margin: 0; } .nf-f { display: flex; justify-content: space-between; gap: 10px; padding: 10px 14px; border-top: 1px solid #E3EAF4; } .nf-o { background: #F6F9FE; flex-wrap: wrap; justify-content: flex-start; } .nf-link { background: none; border: 0; color: #0B5ED7; font: inherit; font-weight: 700; font-size: 13.5px; cursor: pointer; text-decoration: none; padding: 0; } .nf-link:disabled { color: #A5B2C4; cursor: default; } .nf-opt { font-size: 13px; display: flex; gap: 6px; align-items: center; color: #3D4F68; }
.nf-toasts { position: fixed; top: 14px; right: 14px; z-index: 95; display: flex; flex-direction: column; gap: 10px; width: min(390px, calc(100vw - 28px)); pointer-events: none; }
.nf-toast { pointer-events: auto; display: flex; gap: 12px; background: #fff; border: 1.5px solid #B8C4D6; border-left: 6px solid #0B5ED7; border-radius: 12px; padding: 12px 14px; box-shadow: 0 12px 34px rgba(11,31,58,.30); animation: nfin .28s ease-out; } .nf-toast.act { border-left-color: #E8590C; background: #FFFBF6; } .nf-toast.out { opacity: 0; transform: translateX(30px); transition: all .25s; }
.nf-ti { font-size: 22px; line-height: 1; } .nf-tb { flex: 1; min-width: 0; } .nf-tb b { display: block; font-size: 14.5px; color: #0B1F3A; } .nf-tb p { margin: 3px 0 8px; font-size: 13px; color: #3D4F68; overflow-wrap: anywhere; } .nf-ta { display: flex; gap: 14px; align-items: center; } .nf-open { background: #1F4E8C; color: #fff; padding: 6px 14px; border-radius: 8px; text-decoration: none; font-weight: 700; font-size: 13px; } .nf-toast.act .nf-open { background: #E8590C; } .nf-x { background: none; border: 0; color: #5B6B80; cursor: pointer; font: inherit; font-size: 13px; }
@keyframes nfin { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
@media (max-width: 760px) { .nf-bell { bottom: 88px; right: 12px; width: 48px; height: 48px; } .nf-panel { bottom: 146px; right: 10px; } .nf-toasts { top: 8px; right: 8px; } }
@media print { .nf-bell, .nf-panel, .nf-toasts { display: none !important; } }

.nf-pushbox { padding: 10px 14px; border-top: 1px solid #E3EAF4; background: #F8FBFF; font-size: 13px; color: #3D4F68; } .nf-pushbox p { margin: 4px 0; } .nf-pushbox .ok { color: #2B8A3E; font-weight: 700; } .nf-pb { display: flex; gap: 14px; align-items: center; margin-top: 6px; } .nf-pbtn { background: #1F4E8C; color: #fff; border: 0; border-radius: 8px; padding: 9px 14px; font: inherit; font-weight: 700; font-size: 13.5px; cursor: pointer; } .nf-pbtn:disabled { opacity: .6; } .nf-pm { color: #7C3A00; min-height: 1em; }

.nf-pushbox .bad { color: #C92A2A; font-weight: 700; margin: 4px 0; }
