/* desktop-audit (batch 1) — Lambert admin desktop fixes. Nothing here changes the mobile layout (<768px). */

/* D15: the dashboard KPI grid asks for xl:grid-cols-4 but the class was missing from the compiled CSS */
@media (min-width:1280px){.xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}

/* D12: visible keyboard focus everywhere (only on keyboard focus, so mouse/touch look is unchanged) */
a:focus-visible,button:focus-visible,summary:focus-visible,[role=button]:focus-visible,[role=combobox]:focus-visible,[role=tab]:focus-visible,
[tabindex]:not([tabindex="-1"]):focus-visible,input[type=checkbox]:focus-visible,input[type=radio]:focus-visible,input[type=file]:focus-visible{
  outline:2px solid #bd141b!important;outline-offset:2px!important;border-radius:4px}
/* D12: skip link, hidden until it gets keyboard focus */
.lbm-skip{position:fixed;left:12px;top:-60px;z-index:1000;background:#fff;color:#bd141b;font-weight:600;font-size:14px;
  padding:10px 16px;border-radius:8px;box-shadow:0 4px 14px rgba(0,0,0,.18);text-decoration:none;transition:top .12s}
.lbm-skip:focus,.lbm-skip:focus-visible{top:12px}
#lbm-main-target:focus{outline:none}

/* D02: rows that open on click (the real link is inside the row) */
tr.lbm-rowl{cursor:pointer}
a.lbm-rowlink{color:inherit;text-decoration:none}
a.lbm-rowlink:hover{text-decoration:underline}

/* D14: same AA text/background tokens as the mobile layout (ff2e6c2), now from 768px up */
@media (min-width:768px){
  .text-gray-400{color:#6b7280!important}
  .text-green-600{color:#15803d!important}
  .text-yellow-600{color:#92400e!important}
  .text-orange-600{color:#c2410c!important}
  .text-red-500{color:#b91c1c!important}
  .bg-orange-600{background-color:#c2410c!important}
  .bg-green-600{background-color:#15803d!important}
  .hover\:bg-green-700:hover{background-color:#166534!important}
  .hover\:bg-orange-700:hover{background-color:#9a3412!important}
  input::placeholder,textarea::placeholder{color:#6b7280}
}

/* Client page "Ajouter un véhicule": the 6 borderless 24px fields get the standard bordered input (desktop only; mobile already styled) */
@media (min-width:768px){
  .lbm-dfield{padding:.5rem .75rem!important;border:1px solid #d1d5db!important;border-radius:.5rem!important;background:#fff;line-height:1.5rem;font-size:.875rem}
  .lbm-dfield:focus{outline:2px solid transparent;outline-offset:2px;border-color:rgb(232 51 58)!important;box-shadow:0 0 0 2px rgb(232 51 58)!important}
}

/* ---- desktop-audit batch 2 (all rules >=768px; mobile untouched) ---- */
.lbm-rail{display:none}
@media (min-width:768px){
  .lbm-dhide{display:none!important}
  /* D01 status chips + dense contracts table */
  .lbm-dchips{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 12px}
  .lbm-dchip{display:inline-flex;align-items:center;gap:8px;height:36px;padding:0 14px;border:1px solid #d1d5db;border-radius:9999px;background:#fff;font-size:14px;font-weight:500;color:#374151;cursor:pointer}
  .lbm-dchip:hover{background:#f3f4f6}
  .lbm-dchip[aria-pressed=true]{background:#111827;border-color:#111827;color:#fff}
  .lbm-dchip-n{font-size:12px;font-weight:600;color:#4b5563}
  .lbm-dchip[aria-pressed=true] .lbm-dchip-n{color:#e5e7eb}
  .lbm-dchip-late .lbm-dchip-n{color:#b91c1c}
  .lbm-dchip-late[aria-pressed=true] .lbm-dchip-n{color:#fecaca}
  table.lbm-ctable td{height:44px;padding-top:4px;padding-bottom:4px}
  tr.lbm-late td:first-child{box-shadow:inset 3px 0 0 #b91c1c}
  .lbm-pill{display:inline-block;padding:2px 8px;border-radius:9999px;font-size:12px;font-weight:600;white-space:nowrap;line-height:18px}
  .lbm-pill-open{background:#dbeafe;color:#1e40af}
  .lbm-pill-late{background:#fee2e2;color:#991b1b}
  .lbm-pill-dep,.lbm-pill-ret{background:#fef3c7;color:#92400e}
  .lbm-pill-off{background:#f3f4f6;color:#374151}
  table.lbm-ctable .lbm-ractc{position:relative;width:0;padding:0!important;border:0}
  .lbm-ctrunc{max-width:15rem}
  .lbm-racts{position:absolute;right:8px;top:50%;transform:translateY(-50%);display:flex;gap:6px;padding-left:24px;background:linear-gradient(to right,rgba(249,250,251,0),#f9fafb 24px);opacity:0;pointer-events:none;transition:opacity .12s}
  tr:hover .lbm-racts,tr:focus-within .lbm-racts{pointer-events:auto}
  tr:hover .lbm-racts,tr:focus-within .lbm-racts{opacity:1}
  .lbm-ract{display:inline-flex;align-items:center;height:30px;padding:0 10px;border:1px solid #d1d5db;border-radius:6px;background:#fff;font-size:13px;font-weight:500;color:#374151;white-space:nowrap;text-decoration:none}
  .lbm-ract:hover{background:#f3f4f6;color:#111827}
  /* D07 contract detail: sticky header + tabs */
  .lbm-dsticky{position:sticky;top:0;z-index:30}
  .lbm-tabs{position:sticky;top:var(--lbm-hh,0px);z-index:20;background:#f9fafb}
  .lbm-dmeta{font-size:13px;color:#4b5563;margin-top:2px}
  /* D07 side rail on pages without the sidebar */
  html.lbm-has-rail body{padding-left:64px}
  .lbm-rail{display:flex;position:fixed;left:0;top:0;bottom:0;width:64px;flex-direction:column;align-items:center;gap:4px;padding:12px 0;background:#fff;border-right:1px solid #e5e7eb;z-index:40;overflow-y:auto}
  .lbm-rail a{width:44px;height:44px;flex:none;display:flex;align-items:center;justify-content:center;border-radius:10px;color:#4b5563}
  .lbm-rail a:hover{background:#f3f4f6;color:#111827}
  .lbm-rail a[aria-current=page]{background:#fef2f2;color:#bd141b}
  .lbm-rail hr{width:32px;border:0;border-top:1px solid #e5e7eb;margin:6px 0}
  /* t452: on desktop the drawer fills from the sidebar (overlay already inset by #lbm-sb). */
  .lbm-drawer-ov{justify-content:flex-end!important;align-items:stretch!important;padding:0!important}
  .lbm-drawer-ov #lbm-close-dlg{max-width:none!important;width:100%;max-height:none!important;height:100vh;height:100dvh;border-radius:0!important;overflow:hidden;display:flex;flex-direction:column;animation:lbmSlide .18s ease-out}
  .lbm-fuel{display:flex;gap:6px}
  .lbm-fuelb{flex:1;height:40px;border:1px solid #d1d5db;border-radius:8px;background:#fff;font-weight:600;font-size:14px;color:#374151;cursor:pointer}
  .lbm-fuelb:hover{background:#f9fafb}
  .lbm-fuelb[aria-checked=true]{border-color:#bd141b;background:#fef2f2;color:#991b1b;box-shadow:inset 0 0 0 1px #bd141b}
  .lbm-dsum{display:grid;gap:6px;border:1px solid #e5e7eb;border-radius:10px;padding:14px 16px;background:#f9fafb;font-size:14px;color:#374151}
  .lbm-dsum-r{display:flex;justify-content:space-between;gap:12px}
  .lbm-dsum-r b{font-weight:600;color:#111827;text-align:right}
  .lbm-dsum-tot{border-top:1px solid #e5e7eb;padding-top:8px;margin-top:2px;font-size:15px}
  .lbm-dsum-tot b{font-size:17px;font-weight:700}
  .lbm-chk{display:flex;align-items:center;gap:10px;min-height:32px;cursor:pointer;color:#111827}
  .lbm-chk input{width:18px;height:18px;accent-color:#bd141b}
  .lbm-dsum-n{font-size:12px;color:#6b7280;margin:2px 0 0}
  .lbm-drawer-ov .lbm-dfoot{position:sticky;bottom:0;background:#fff;padding:16px 24px;margin-top:12px;border-top:1px solid #e5e7eb;z-index:2;grid-column:1/-1}
  .lbm-printbar{position:fixed;right:24px;bottom:24px;z-index:60;display:flex;align-items:center;gap:10px;padding:12px 14px;background:#fff;border:1px solid #e5e7eb;border-radius:10px;box-shadow:0 10px 25px rgba(0,0,0,.15);font-size:14px;color:#111827}
}
@media (min-width:768px) and (hover:none){.lbm-racts{opacity:1;pointer-events:auto}}
@media (min-width:1024px){
  .lbm-dbody .lg\:grid-cols-3>div:last-child{position:sticky;top:calc(var(--lbm-hh,0px) + 56px);align-self:start}
}
@keyframes lbmSlide{from{transform:translateX(40px);opacity:.6}to{transform:none;opacity:1}}
@media (prefers-reduced-motion:reduce){.lbm-drawer-ov #lbm-close-dlg{animation:none}}

/* Desktop audit batch 3. Mobile stays unchanged; payment components are not selected. */
@media(min-width:768px){
 .lbm-pageheading{font-size:24px!important;line-height:32px!important;font-weight:700!important}
 html body select:not([disabled]):not(.lbm-pm *):not(.lbm-only *){background-color:#fff}
 .lbm-page .bg-blue-50 .text-blue-600,.lbm-page .bg-blue-100 .text-blue-600,.lbm-page .text-blue-600.bg-blue-50,.lbm-page .text-blue-600.bg-blue-100{color:#1d4ed8!important}
 .lbm-icon32{display:inline-flex!important;align-items:center;justify-content:center;min-width:32px;min-height:32px;border-radius:8px}
 .lbm-icon32 svg{width:16px;height:16px}
 .lbm-icon32:hover{background-color:#f3f4f6}
 .lbm-action32{display:inline-flex;align-items:center;min-height:32px;padding-left:8px;padding-right:8px;border-radius:8px}
 .lbm-btnstd{min-height:40px;border-radius:8px;font-size:14px;font-weight:600}
 .lbm-btnstd svg{width:16px;height:16px}
 /* D16 menu: summary is keyboard native, Escape/outside closes; dangerous action separated */
 .lbm-more{position:relative}
 .lbm-more summary{list-style:none;cursor:pointer;user-select:none}
 .lbm-more summary::-webkit-details-marker{display:none}
 .lbm-more-dots{font-size:22px;line-height:16px}
 .lbm-more-m{position:absolute;right:0;top:calc(100% + 8px);z-index:50;min-width:260px;background:white;border:1px solid #e5e7eb;border-radius:10px;padding:6px;box-shadow:0 8px 24px rgba(0,0,0,.12)}
 .lbm-more-i{display:flex;align-items:center;gap:10px;width:100%;min-height:40px;text-align:left;padding:8px 10px;border-radius:6px;font-size:14px;color:#374151}
 .lbm-more-i:hover{background:#f3f4f6}
 .lbm-more-danger{color:#b91c1c;margin-top:6px;border-top:1px solid #e5e7eb;border-radius:0 0 6px 6px}
 /* D08 Create action bar and total; D28 dirty-state settings save bar */
 .lbm-createbar{position:sticky;bottom:12px;z-index:15;border:1px solid #e5e7eb;padding:14px 18px!important;box-shadow:0 -4px 18px rgb(0 0 0 / .07)!important}
 .lbm-cbsum{display:flex;align-items:center;gap:12px;margin-right:auto;color:#4b5563;font-size:14px}
 .lbm-cbsum b{color:#111827;font-size:20px;font-weight:700}
 .lbm-cbsum kbd{font-size:11px;border:1px solid #d1d5db;border-radius:4px;padding:2px 4px;color:#6b7280}
 .lbm-savebar{position:sticky;bottom:12px;z-index:20;align-items:center;gap:18px;background:white;border:1px solid #e5e7eb;border-radius:10px;padding:12px 16px;box-shadow:0 -4px 18px rgb(0 0 0 / .07)}
 .lbm-savemsg{margin-right:auto;font-size:14px;font-weight:500;color:#4b5563}
 .lbm-savemsg::before{content:"Aucune modification"}
 .lbm-dirty .lbm-savemsg{color:#92400e}
 .lbm-dirty .lbm-savemsg::before{content:"Modifications non enregistr\0000e9es"}
 .lbm-settingsnav{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 20px}
 .lbm-settingsnav a{font-size:13px;color:#374151;background:white;border:1px solid #d1d5db;border-radius:9999px;padding:6px 12px}
 .lbm-settingsnav a:hover{background:#f3f4f6}
 form h2,form h3{scroll-margin-top:32px}
 /* Keyboard help (no automatic opening). */
 #lbm-keyhelp{margin:auto;width:480px;max-width:calc(100vw - 48px);border:1px solid #e5e7eb;border-radius:12px;padding:24px;color:#111827;box-shadow:0 20px 40px rgba(0,0,0,.2)}
 #lbm-keyhelp::backdrop{background:rgba(0,0,0,.45)}
 #lbm-keyhelp h2{font-size:20px;font-weight:700;margin:0 0 18px}
 #lbm-keyhelp dl{display:grid;grid-template-columns:110px 1fr;gap:12px;font-size:14px}
 #lbm-keyhelp dt{font-family:monospace;font-weight:700;color:#374151}
 #lbm-keyhelp button{margin-top:22px;float:right;min-height:40px;padding:0 18px;border:1px solid #d1d5db;border-radius:8px;font-weight:600}
}

/* desktop-audit batch 4: Contrat tab full-width preview (>=768 only) */
@media(min-width:768px){
 .lbm-ctrgrid{grid-template-columns:minmax(0,1fr)!important}
 .lbm-ctrcard{grid-column:1/-1!important;margin-bottom:0!important}
 .lbm-ctrhead{flex-wrap:wrap;gap:12px;margin-bottom:16px!important}
 .lbm-ctrbar{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
 .lbm-ctrprev{background:#f3f4f6;overflow:hidden!important}
 .lbm-ctrprev iframe{background:#f3f4f6}
}

/* desktop-audit batch 5: New contract two columns + sticky summary (D08), quick durations, in-place vehicle drawer (D09). Mobile (<768) untouched. */
@media(min-width:768px){
 .lbm-quick{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:20px;padding-top:16px;border-top:1px solid #f3f4f6;font-size:14px;font-weight:500;color:#374151}
 .lbm-quick>span{margin-right:2px}
 .lbm-quick-b{min-height:34px;min-width:48px;padding:0 10px;border:1px solid #d1d5db;border-radius:8px;background:#fff;font-size:13px;font-weight:600;color:#374151}
 .lbm-quick-b:hover{background:#f3f4f6}
 .lbm-quick-b.is-on{border-color:#dc2626;color:#b91c1c;background:#fef2f2}
 .lbm-csum{display:none!important}
 /* D09 drawer */
 dialog.lbm-drawer{margin:0 0 0 auto;height:100vh;max-height:100vh;width:480px;max-width:100vw;border:0;padding:0;box-shadow:-8px 0 30px rgba(0,0,0,.18);color:#111827}
 dialog.lbm-drawer::backdrop{background:rgba(17,24,39,.45)}
 .lbm-drawer form{display:flex;flex-direction:column;height:100%}
 .lbm-drawer header{display:flex;align-items:center;justify-content:space-between;padding:20px 24px 4px}
 .lbm-drawer h2{font-size:20px;font-weight:700}
 .lbm-drawer .lbm-x{width:36px;height:36px;border-radius:8px;font-size:24px;line-height:1;color:#4b5563}
 .lbm-drawer .lbm-x:hover{background:#f3f4f6}
 .lbm-drawer-sub{padding:0 24px 12px;font-size:13px;color:#4b5563}
 .lbm-vgrid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:14px 16px;padding:8px 24px;overflow:auto}
 .lbm-vf{display:flex;flex-direction:column;gap:6px;font-size:14px;font-weight:500;color:#374151}
 .lbm-vf i{color:#dc2626;font-style:normal}
 .lbm-vf-wide{grid-column:1/-1}
 .lbm-vf input{width:100%;min-width:0;box-sizing:border-box;height:40px;border:1px solid #d1d5db;border-radius:8px;padding:0 12px;font-size:15px;background:#fff;color:#111827}
 .lbm-vf input:focus{outline:2px solid #2563eb;outline-offset:1px}
 .lbm-verr{margin:8px 24px 0;padding:10px 12px;border-radius:8px;background:#fef2f2;border:1px solid #fecaca;color:#b91c1c;font-size:14px}
 .lbm-drawer footer{margin-top:auto;display:flex;justify-content:flex-end;gap:10px;padding:16px 24px;border-top:1px solid #e5e7eb}
}
@media(min-width:1280px){
 .lbm-cwrap{max-width:1600px!important}
 .lbm-cform{display:grid;grid-template-columns:minmax(0,1fr) 380px;column-gap:24px;row-gap:24px;align-items:start}
 .lbm-cform>*{grid-column:1;margin-top:0!important;margin-bottom:0!important}
 .lbm-cform>.lbm-csum{display:block!important;grid-column:2;grid-row:1/span 40;position:sticky;top:96px;align-self:start}
 .lbm-cform>.lbm-createbar{display:none!important}
 .lbm-csum-card{background:#fff;border:1px solid #e5e7eb;border-radius:10px;box-shadow:0 1px 3px rgba(0,0,0,.06);padding:20px}
 .lbm-csum-h{font-size:16px;font-weight:700;margin-bottom:12px;color:#111827}
 .lbm-csum-dl{display:flex;flex-direction:column;gap:8px;font-size:14px}
 .lbm-csum-r{display:flex;justify-content:space-between;gap:12px}
 .lbm-csum-r dt{color:#6b7280;flex:none}
 .lbm-csum-r dd{color:#111827;font-weight:500;text-align:right;min-width:0;overflow-wrap:anywhere}
 .lbm-csum-sep{border-top:1px solid #e5e7eb;padding-top:10px;margin-top:4px}
 .lbm-csum-tot{display:flex;justify-content:space-between;align-items:baseline;border-top:1px solid #e5e7eb;margin-top:12px;padding-top:12px;font-weight:700;color:#111827}
 .lbm-csum-tot b{font-size:22px}
 .lbm-csum-miss{margin-top:10px;font-size:13px;color:#92400e}
 .lbm-csum-ok{margin-top:10px;font-size:13px;color:#047857}
 .lbm-csum-go{width:100%;justify-content:center;min-height:44px;margin-top:12px}
 .lbm-csum-go kbd{margin-left:8px;font-size:11px;border:1px solid rgba(255,255,255,.6);border-radius:4px;padding:1px 4px}
 .lbm-csum-cancel{display:block;text-align:center;margin-top:12px;font-size:14px;color:#4b5563}
 .lbm-csum-cancel:hover{text-decoration:underline}
 .lbm-csum-note{margin-top:10px;font-size:12px;color:#6b7280;padding:0 4px}
 .lbm-csum-link{color:#b91c1c;font-weight:600;text-decoration:underline}
}

/* hotfix-b5-scroll: the sticky Résumé spans 40 implicit grid rows; with row-gap each empty row added 24px (~936px of blank page).
   Use no row gap (empty rows collapse to 0) and space the cards with margins instead. */
@media(min-width:1280px){
 .lbm-cform{row-gap:0!important}
 .lbm-cform>*:not(.lbm-csum){margin-bottom:24px!important}
 .lbm-cform>*:not(.lbm-csum):last-child,.lbm-cform>.lbm-createbar,.lbm-cform>*:has(+.lbm-createbar){margin-bottom:0!important}
}

/* desktop-audit batch 6 (D23): Scanner le permis. Mobile (<768) untouched. */
@media(min-width:768px){
 .lbm-permis{display:inline-flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:8px}
 .lbm-permis-hd{margin-left:auto;margin-top:0}
 .lbm-permis-btn{display:inline-flex;align-items:center;gap:6px;min-height:32px;padding:0 10px;border:1px solid #d1d5db;border-radius:8px;background:#fff;font-size:13px;font-weight:600;color:#374151}
 .lbm-permis-btn:hover{background:#f3f4f6}
 .lbm-permis-st{display:inline-flex;align-items:center;gap:6px;font-size:12px;color:#047857}
 .lbm-permis-st:empty{display:none}
 .lbm-permis-x{width:24px;height:24px;border-radius:6px;font-size:16px;line-height:1;color:#4b5563}
 .lbm-permis-x:hover{background:#e5e7eb}
}
@media(min-width:768px){
 .flex:has(>.lbm-permis-hd){flex-wrap:wrap;gap:8px}
 .lbm-permis-hd{justify-content:flex-end}
 .flex:has(>.lbm-permis-hd)>h2{flex:1 1 auto}
}

/* desktop-audit batch 7 (D17): Clients / Véhicules list columns */
@media(min-width:768px){
 .lbm-lopen{line-height:1.3}
 .lbm-llate{color:#b91c1c;font-weight:600}
 .lbm-ldue{color:#b91c1c}
 .lbm-lwait{display:inline-block;width:56px;height:10px;border-radius:4px;background:#f3f4f6}
 th.lbm-lr{text-align:right!important}
}
@media(min-width:768px) and (max-width:1279px){
 td:has(>.lbm-lopen){white-space:normal!important;min-width:150px}
 .lbm-lopen .text-xs{white-space:normal}
 .lbm-lopen a{white-space:nowrap}
 table:has(.lbm-lopen) :is(th,td){padding-left:12px!important;padding-right:12px!important}
}

/* hotfix-d23-spacing: « + Ajouter un nouveau client » and « Scanner le permis » on one row, 16px apart, 8px below the Client field, vertically centred; the file chip wraps under the button */
@media(min-width:768px){
 div:has(>:is(a,button)+.lbm-permis:not(.lbm-permis-hd)){display:flex;flex-wrap:wrap;align-items:flex-start;column-gap:16px}
 div:has(>:is(a,button)+.lbm-permis:not(.lbm-permis-hd))>*{flex:0 0 100%}
 div:has(>:is(a,button)+.lbm-permis:not(.lbm-permis-hd))>:is(a,button):has(+.lbm-permis){flex:0 0 auto;margin-top:12px}
 .lbm-permis:not(.lbm-permis-hd){flex:1 1 150px!important;display:flex;flex-wrap:wrap;align-items:center;column-gap:8px;row-gap:6px;margin:8px 0 0}
 .lbm-permis:not(.lbm-permis-hd) .lbm-permis-st{flex:1 1 100%;min-width:0}
 .lbm-permis-btn{flex:0 0 auto;white-space:nowrap;min-height:28px;height:28px;padding:0 10px;font-size:12px}
}

/* desktop-audit batch 8 (D22): Planning view (vehicles x days) on Calendrier */
@media(min-width:768px){
 .lbm-plan-on .lbm-cal-month{display:none!important}
 .lbm-plan{margin-bottom:16px}
 .lbm-ptool{display:flex;flex-wrap:wrap;align-items:center;gap:12px 16px;margin-bottom:12px}
 .lbm-psegs{display:inline-flex;background:#f3f4f6;border-radius:8px;padding:3px}
 .lbm-pseg{height:32px;padding:0 14px;border-radius:6px;font-size:14px;font-weight:600;color:#4b5563}
 .lbm-pseg.on{background:#fff;color:#111827;box-shadow:0 1px 2px rgba(0,0,0,.08)}
 .lbm-pnav{display:inline-flex;align-items:center;gap:6px}
 .lbm-pbtn{height:32px;min-width:32px;padding:0 10px;border:1px solid #d1d5db;border-radius:8px;background:#fff;font-size:14px;font-weight:600;color:#374151}
 .lbm-pbtn:hover{background:#f9fafb}
 .lbm-prange{margin-left:6px;font-size:14px;font-weight:600;color:#111827}
 .lbm-plegend{display:flex;flex-wrap:wrap;align-items:center;gap:6px 14px;font-size:12px;color:#4b5563;width:100%}
 .lbm-plegend>span{display:inline-flex;align-items:center;gap:6px}
 .lbm-plg{display:inline-block;width:16px;height:10px;border-radius:3px}
 .lbm-plg-on{background:#fde2e2;border:1px solid #f5a3a3}
 .lbm-plg-late{background:#dc2626}
 .lbm-plg-done{background:#e5e7eb;border:1px solid #d1d5db}
 .lbm-plg-dep{width:4px;height:12px;background:#16a34a;border-radius:2px}
 .lbm-plg-ret{width:4px;height:12px;background:#111827;border-radius:2px}
 .lbm-pnote{color:#6b7280;margin-left:auto}
 .lbm-pgrid{--lbm-vw:200px;background:#fff;border:1px solid #e5e7eb;border-radius:8px;overflow:clip;box-shadow:0 1px 3px rgba(0,0,0,.06)}
 .lbm-prow{display:grid;grid-template-columns:var(--lbm-vw) minmax(0,1fr);border-top:1px solid #eef0f2}
 .lbm-prow:first-child{border-top:0}
 .lbm-phead{background:#f9fafb;position:sticky;top:0;z-index:3}
 .lbm-pveh{display:flex;flex-direction:column;justify-content:center;padding:6px 12px;border-right:1px solid #e5e7eb;min-width:0;font-size:12px;color:#6b7280}
 a.lbm-pveh:hover .lbm-pvn{color:var(--lbm-red,#dc2626)}
 .lbm-pvn{font-size:13px;font-weight:600;color:#111827;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .lbm-pvp{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .lbm-pcells{display:grid;grid-template-columns:repeat(14,minmax(0,1fr));height:100%}
 .lbm-pday{display:flex;flex-direction:column;align-items:center;padding:6px 0;font-size:11px;color:#6b7280;text-transform:capitalize;border-left:1px solid #f1f2f4}
 .lbm-pday b{font-size:14px;color:#111827}
 .lbm-pday.wk{background:#f3f4f6}
 .lbm-pday.today{background:#fef2f2}.lbm-pday.today b{color:#dc2626}
 .lbm-ptrack{position:relative;--lbm-pw:calc(100% / 14)}
 .lbm-ptrack .lbm-pcells{position:absolute;inset:0}
 .lbm-pcell{border-left:1px solid #f1f2f4;display:flex;align-items:center;justify-content:center}
 .lbm-pcell.wk{background:#fafafa}
 .lbm-pcell.today{background:#fff5f5}
 .lbm-pcell.free span{opacity:0;font-size:18px;font-weight:600;color:#9ca3af;line-height:1}
 .lbm-pcell.free:hover{background:#f0fdf4}.lbm-pcell.free:hover span,.lbm-pcell.free:focus-visible span{opacity:1;color:#16a34a}
 .lbm-pcell.free:focus-visible{outline:2px solid #16a34a;outline-offset:-2px}
 .lbm-pbar{position:absolute;z-index:2;height:26px;margin-left:2px;display:flex;align-items:center;gap:6px;padding:0 8px;border-radius:6px;font-size:12px;font-weight:600;white-space:nowrap;overflow:hidden}
 .lbm-pbar.on{background:#fde2e2;color:#7f1d1d;border:1px solid #f5a3a3}
 .lbm-pbar.late{background:#dc2626;color:#fff;border:1px solid #b91c1c}
 .lbm-pbar.done{background:#f3f4f6;color:#4b5563;border:1px solid #d1d5db}
 .lbm-pbar:hover{filter:brightness(.96);text-decoration:none}
 .lbm-pbar:focus-visible{outline:2px solid #111827;outline-offset:1px}
 .lbm-pbar.cl{border-top-left-radius:0;border-bottom-left-radius:0}
 .lbm-pbar.cr{border-top-right-radius:0;border-bottom-right-radius:0}
 .lbm-ptxt{overflow:hidden;text-overflow:ellipsis;min-width:0;flex:1 1 auto}
 .lbm-pdep{flex:0 0 4px;width:4px;height:16px;border-radius:2px;background:#16a34a;margin-left:-4px}
 .lbm-pret{flex:0 0 4px;width:4px;height:16px;border-radius:2px;background:#111827;margin-right:-4px}
 .lbm-plate{flex:0 0 auto;font-size:11px;background:rgba(255,255,255,.22);border-radius:4px;padding:0 4px}
 .lbm-pempty{padding:24px;text-align:center;color:#6b7280;font-size:14px}
}
@media(min-width:768px) and (max-width:1279px){.lbm-pgrid{--lbm-vw:150px}.lbm-pnote{margin-left:0}}

/* desktop-audit batch 9: D24 button sizes, D25 headings + blue restored (never inside the Payments tab), D27 page-width templates */
@media(min-width:768px){
 .lbm-btnmd,.lbm-btnlg{border-radius:8px!important;font-size:14px!important;font-weight:600!important;line-height:20px!important}
 .lbm-btnmd{min-height:40px}
 .lbm-btnlg{min-height:44px}
 a.lbm-btnmd,a.lbm-btnlg{display:inline-flex;align-items:center;justify-content:center;gap:8px}
 a.lbm-btnmd.w-full,a.lbm-btnlg.w-full,a.lbm-btnmd.flex,a.lbm-btnlg.flex{display:flex}
 .lbm-btnmd svg,.lbm-btnlg svg{width:16px!important;height:16px!important;flex-shrink:0}
 h1.text-3xl,h1.lbm-pageheading{font-size:24px!important;line-height:32px!important;font-weight:700!important}
 .text-blue-500:not(.lbm-pay *){color:#3b82f6}
 .text-blue-600:not(.lbm-pay *){color:#2563eb}
 .bg-blue-500:not(.lbm-pay *){background-color:#3b82f6}
 .bg-blue-600:not(.lbm-pay *){background-color:#2563eb}
 .border-blue-500:not(.lbm-pay *){border-color:#3b82f6}
 .hover\:bg-blue-600:hover:not(.lbm-pay *){background-color:#2563eb}
 .hover\:bg-blue-700:hover:not(.lbm-pay *){background-color:#1d4ed8}
 .hover\:text-blue-900:hover:not(.lbm-pay *){color:#1e3a8a}
 .from-blue-600:not(.lbm-pay *){--tw-gradient-from:#2563eb var(--tw-gradient-from-position);--tw-gradient-to:rgba(37,99,235,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}
 [data-lbm-tpl=list] .max-w-7xl.mx-auto{max-width:1600px}
 [data-lbm-tpl=form] .max-w-3xl.mx-auto,[data-lbm-tpl=form] .max-w-2xl.mx-auto,[data-lbm-tpl=form] .max-w-4xl.mx-auto{max-width:912px}
 [data-lbm-tpl=settings] .max-w-4xl{margin-left:auto;margin-right:auto}
}

/* t853: hide the icon rail when the wide lg sidebar is visible (frais static shell and any other page). Mobile <768 unchanged. */
@media (min-width:1024px){
  html.lbm-has-rail:has(aside.hidden.lg\:flex) body,
  html.lbm-has-rail:has(aside[class*="lg:flex"]) body{padding-left:0}
  html:has(aside.hidden.lg\:flex) .lbm-rail,
  html:has(aside[class*="lg:flex"]) .lbm-rail{display:none!important}
}

/* t352: compact contract detail header on desktop. No icon; Réf / Créé le live in
   the information tab (and remain in the mobile header via lbm-dhide). Mobile <768
   is unchanged: these rules are inside min-width 768px. */
@media (min-width:768px){
  .lbm-dhead{padding-top:12px!important;padding-bottom:12px!important}
  .lbm-dhead h1{display:flex;align-items:center;flex-wrap:wrap;column-gap:.5rem;row-gap:.25rem;line-height:1.25}
  .lbm-dtitle{align-items:center}
  .lbm-dhead .ms-toolbar{align-items:center}
}

/* t452: date inputs that reserve left padding for an icon (same slot as the KM gauge).
   Chrome's native date appearance paints over that padding, so the icon looked missing. */
.relative:has(> input[type=date]) > svg.absolute,
.relative:has(> input[type="date"]) > svg{
  z-index:2;pointer-events:none;color:#9ca3af!important
}
.relative:has(> input[type=date]) input[type=date],
input[type=date]{
  background-color:transparent!important;color-scheme:light
}

/* t452: close drawer is full-screen on mobile and tablet; two columns on desktop. */
.lbm-drawer-ov{justify-content:stretch!important;align-items:stretch!important;padding:0!important}
.lbm-drawer-ov #lbm-close-dlg{
  max-width:none!important;width:100%;max-height:none!important;
  height:100vh;height:100dvh;border-radius:0!important;
  display:flex;flex-direction:column;overflow:hidden;animation:lbmSlide .18s ease-out
}
.lbm-drawer-ov #lbm-close-dlg > :first-child{flex:none}
.lbm-drawer-ov #lbm-close-dlg form.lbm-close-form,
.lbm-drawer-ov #lbm-close-dlg form{flex:1 1 auto;overflow:auto;min-height:0}
/* t452: fuel, totals and a pinned footer also apply on mobile, now that the drawer is full-screen. The footer is a sibling of the form, not sticky inside it. */
.lbm-fuel{display:flex;gap:6px}
.lbm-fuelb{flex:1;height:40px;border:1px solid #d1d5db;border-radius:8px;background:#fff;font-weight:600;font-size:14px;color:#374151;cursor:pointer}
.lbm-fuelb:hover{background:#f9fafb}
.lbm-fuelb[aria-checked=true]{border-color:#bd141b;background:#fef2f2;color:#991b1b;box-shadow:inset 0 0 0 1px #bd141b}
.lbm-dsum{display:grid;gap:6px;border:1px solid #e5e7eb;border-radius:10px;padding:14px 16px;background:#f9fafb;font-size:14px;color:#374151}
.lbm-dsum-r{display:flex;justify-content:space-between;gap:12px}
.lbm-dsum-r b{font-weight:600;color:#111827;text-align:right}
.lbm-dsum-tot{border-top:1px solid #e5e7eb;padding-top:8px;margin-top:2px;font-size:15px}
.lbm-dsum-tot b{font-size:17px;font-weight:700}
.lbm-chk{display:flex;align-items:center;gap:10px;min-height:32px;cursor:pointer;color:#111827}
.lbm-chk input{width:18px;height:18px;accent-color:#bd141b}
.lbm-dsum-n{font-size:12px;color:#6b7280;margin:2px 0 0}
.lbm-drawer-ov #lbm-close-dlg > .lbm-dfoot,
.lbm-drawer-ov .lbm-dfoot{
  flex:none;position:static;width:100%;background:#fff;
  padding:16px 24px;margin-top:0;border-top:1px solid #e5e7eb;z-index:2
}
/* t452: show the close-drawer totals on mobile too (they were desktop-only). */
.lbm-drawer-ov #lbm-close-dlg .lbm-dsum.lbm-desk,
.lbm-drawer-ov #lbm-close-dlg .lbm-dsum{display:grid!important}
@media (min-width:768px) and (max-width:1023px){
  /* tablet: cover the whole page, including the sidebar */
  html.lbm-has-rail.lbm-sidebar-expanded .lbm-drawer-ov.fixed.inset-0,
  html.lbm-has-rail.lbm-sidebar-collapsed .lbm-drawer-ov.fixed.inset-0,
  html.lbm-sb .lbm-drawer-ov.fixed.inset-0{left:0!important}
}
@media (min-width:1024px){
  .lbm-drawer-ov #lbm-close-dlg form.lbm-close-form{
    display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);
    gap:8px 40px;align-content:start
  }
  .lbm-drawer-ov #lbm-close-dlg .lbm-close-alert{grid-column:1/-1}
  .lbm-drawer-ov #lbm-close-dlg .lbm-close-col-ret{grid-column:1;grid-row:2 / span 8}
  .lbm-drawer-ov #lbm-close-dlg .lbm-close-col-notes,
  .lbm-drawer-ov #lbm-close-dlg .lbm-close-col-fees,
  .lbm-drawer-ov #lbm-close-dlg .lbm-dsum{grid-column:2}
  .lbm-drawer-ov #lbm-close-dlg .lbm-dfoot{grid-column:1/-1}
}

