.evidence-summary{margin-top:18px}.evidence-summary p{color:var(--muted)}.evidence-summary.complete{border-color:#31d3a466}.evidence-summary.incomplete{border-color:#f4c86f66}.evidence-summary strong{color:var(--yellow)}
.control-actions{display:flex;gap:8px;margin-top:10px;flex-wrap:wrap}.control-action{padding:7px 9px;font-size:.75rem}
.remove-user{margin-top:10px}
.audit-history{margin-top:18px}.audit-history small{color:var(--muted)}
.brand-logo{width:40px;height:40px}.header-actions{display:flex;align-items:center;gap:12px}.language-switcher{display:flex;gap:3px;padding:3px;border:1px solid #ffffff18;border-radius:9px}.language-button{border:0;border-radius:6px;padding:6px 8px;background:transparent;color:var(--muted);cursor:pointer;font-weight:700}.language-button.active{background:#72b9ff22;color:var(--text)}
.system-status-bar{display:flex;gap:8px;flex-wrap:wrap;margin:-16px 0 24px}.system-status-bar span{pointer-events:none;padding:7px 10px;border:1px solid #ffffff14;border-radius:999px;background:#ffffff06;color:var(--muted);font-size:.78rem;font-weight:800}.system-status-bar .system-pill{color:var(--text)}.system-status-bar .online{border-color:#31d3a466;background:#31d3a414}.system-status-bar .offline{border-color:#f77d7d66;background:#f77d7d14}
.schedule-panel{margin-top:18px}.schedule-panel h3{margin:0}.schedule-panel .list-item strong{color:var(--yellow)}
.risk-indicator{margin-bottom:18px;padding:16px 20px;border:1px solid #f4c86f66;border-left:4px solid var(--yellow);border-radius:12px;background:#f4c86f12}.risk-indicator strong{display:block;margin-top:5px;font-size:1.15rem}.risk-indicator.risk-red{border-color:#f77d7d66;border-left-color:var(--red);background:#f77d7d12}.risk-indicator.risk-orange{border-left-color:var(--yellow);background:#f4c86f12}.risk-indicator.risk-green{border-color:#31d3a466;border-left-color:var(--green);background:#31d3a412}
.ai-panel{margin-top:18px}.ai-panel p{color:var(--muted)}
.auto-analysis-answer{margin:12px 0;padding:14px;border:1px solid #31d3a444;border-radius:12px;background:#31d3a410}.auto-analysis-answer p{margin:8px 0 0;white-space:pre-wrap;color:var(--text)}
.auto-analysis-confirm-notice{margin-top:8px;padding:8px 12px;border:1px solid #f4c86f66;border-left:3px solid var(--yellow);border-radius:8px;background:#f4c86f14;color:var(--text);font-size:.82rem;font-weight:700}
.auto-analysis-image-grid{display:flex;flex-wrap:wrap;gap:10px;margin-top:8px}.auto-analysis-image-grid img{width:140px;height:140px;object-fit:cover;border-radius:10px;border:1px solid #ffffff18;background:#fff;cursor:zoom-in}
.document-group{display:grid;gap:8px;margin-top:14px}.document-group:first-child{margin-top:0}.document-group h4{margin:0;color:var(--blue);font-size:.85rem;letter-spacing:.03em;text-transform:uppercase}
.document-chantier-group{margin-top:22px;padding-top:16px;border-top:1px solid var(--border-soft,#ffffff14)}.document-chantier-group:first-child{margin-top:0;padding-top:0;border-top:0}
.document-chantier-group>summary{display:flex;align-items:center;gap:8px;margin:0 0 10px;font-size:.82rem;font-weight:700;color:var(--muted);cursor:pointer;list-style:none}
.document-chantier-group>summary::-webkit-details-marker{display:none}
.document-chantier-group>summary::before{content:'';flex:none;width:7px;height:7px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(-45deg);transition:transform .15s ease;margin-left:1px}
.document-chantier-group[open]>summary::before{transform:rotate(45deg)}
.document-chantier-group>summary .nav-icon{width:15px;height:15px;opacity:.85;color:#2563eb;fill:currentColor;stroke:none}
.budget-folder>summary{color:var(--yellow);flex-wrap:wrap}
.budget-folder>summary span{color:var(--text);font-size:.92rem}
.budget-folder>summary small{flex-basis:100%;margin-left:23px;color:var(--muted);font-size:.74rem;font-weight:500}
.document-chantier-group-body{display:grid;gap:8px}
.quantity-source-badge{display:block;margin-top:-6px;padding:6px 10px;border-radius:8px;background:#f4c86f1c;color:var(--yellow);font-weight:700}
.panel-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:14px;flex-wrap:wrap}
.panel-head h3{margin:0}
.panel-toolbar{display:flex;align-items:center;gap:8px}
.panel-toolbar input[type="search"]{width:200px;padding:7px 11px;font-size:.82rem;border-radius:8px}
.panel-toolbar .icon-button{width:32px;height:32px}
.document-thumb{display:block;width:100%;max-width:240px;height:150px;object-fit:cover;border-radius:10px;margin-bottom:10px;background:#ffffff08;border:1px solid #ffffff14;cursor:zoom-in}
.document-explanation{margin-top:10px;padding:14px;border:1px solid #31d3a444;border-radius:12px;background:#31d3a410}.document-explanation strong{color:var(--green)}.document-explanation p{margin:8px 0 0;color:var(--text);line-height:1.5}
.time-month-group{margin-top:10px;padding:10px 12px;border:1px solid #ffffff14;border-radius:12px;background:#ffffff05}.time-month-group:first-child{margin-top:0}.time-month-group summary{cursor:pointer;font-weight:800;color:var(--yellow);list-style:none;display:flex;align-items:center;gap:8px}.time-month-group summary::-webkit-details-marker{display:none}.time-month-group summary::before{content:'▸';transition:transform .15s}.time-month-group[open] summary::before{transform:rotate(90deg)}.time-month-group .list-item{margin-top:8px}.time-entry-actions{display:flex;gap:8px;flex-wrap:wrap}
.worker-detail-calendar{border-left:3px solid transparent;padding-left:12px;transition:border-color .2s}.worker-detail-calendar.payment-critical{border-left-color:var(--status-critical)}.worker-detail-calendar.payment-attention{border-left-color:var(--status-attention)}.worker-detail-calendar.payment-pending{border-left-color:var(--status-pending)}.worker-detail-calendar.payment-good{border-left-color:var(--status-good)}.worker-detail-calendar .work-calendar-head{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.worker-detail-calendar .work-calendar-head .worker-status{padding:2px 7px;font-size:.65rem}.worker-detail-calendar .work-calendar-head small{flex-basis:100%;order:3}
.worker-paid-quick{width:36px;min-height:36px!important;padding:0!important;border-radius:999px;font-size:.95rem!important;line-height:1;flex:none}
.status-swatches{display:flex;gap:8px;align-items:center}.status-swatch{width:28px;height:28px;min-height:28px!important;padding:0!important;border-radius:50%;border:2px solid transparent;cursor:pointer;opacity:.55;transition:opacity .15s,transform .15s,border-color .15s}.status-swatch:hover{opacity:.85}.status-swatch.active{opacity:1;border-color:#fff;transform:scale(1.08)}.status-swatch-pending{background:var(--status-pending)}.status-swatch-critical{background:var(--status-critical)}.status-swatch-paid{background:var(--status-good)}
button.worker-status{background:transparent;font:inherit;cursor:pointer;transition:transform .1s,box-shadow .15s}button.worker-status:not(:disabled):hover{transform:scale(1.04);box-shadow:0 0 0 3px currentColor inset}button.worker-status:disabled{cursor:default;opacity:.7}
.worker-detail-entries-inline{margin-top:12px;padding-top:12px;border-top:1px solid var(--roster-line)}
.worker-actions-cell{width:150px}
.measure-actions{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.measure-actions .secondary{margin-top:0}.ar-meter-overlay,.photo-meter-overlay{position:fixed;inset:0;z-index:50;display:flex;flex-direction:column;background:#000;touch-action:none}.ar-meter-overlay canvas,.photo-meter-overlay canvas{position:relative;flex:1;width:100%;min-height:0}.ar-meter-panel{position:relative;left:auto;right:auto;bottom:auto;flex:none;margin:12px;display:grid;gap:8px;padding:14px;border:1px solid #ffffff30;border-radius:14px;background:#08131fcc;backdrop-filter:blur(8px);max-height:45vh;overflow-y:auto}.ar-meter-panel strong{font-size:1.1rem}.ar-meter-panel span{color:var(--green);font-weight:800}.ar-meter-panel .secondary{margin-top:0}.photo-meter-finish-row{display:grid;grid-template-columns:1fr 1fr;gap:8px}.photo-meter-finish-row .primary{margin-top:0}
.photo-meter-accuracy-warning{display:block;color:var(--yellow);font-weight:700;line-height:1.4}
.production-panel{margin-top:18px}.production-head p{margin:6px 0 0;color:var(--muted)}.production-form{gap:18px}.production-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.production-grid fieldset{display:grid;gap:12px;margin:0;padding:16px;border:1px solid #ffffff14;border-radius:14px;background:linear-gradient(180deg,#ffffff08,#ffffff03)}.production-grid legend{padding:0 6px;color:var(--blue);font-weight:800;letter-spacing:.02em}.production-submit{justify-self:end;min-width:240px}.production-results{display:grid;grid-template-columns:.85fr 1.15fr;gap:16px;align-items:start}.production-results .list{margin-top:16px}#capture-metadata{display:grid;gap:12px;padding-top:4px}.production-panel input[readonly]{border-color:#31d3a466;background:#0b241f;color:#bdf7e6;font-weight:800}
.rge-layout{align-items:start}.rge-modules-panel{margin-top:18px}.rge-modules{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:12px;margin-top:18px}.rge-module{padding:16px}.rge-module h3{margin:0 0 10px;color:var(--blue)}.rge-module ul{margin:0;padding-left:18px;color:var(--muted)}.rge-module li{margin-bottom:7px}
*[hidden]{display:none!important}
:root{--bg:#08131f;--panel:#102235;--panel2:#142b43;--text:#edf5ff;--muted:#9fb3c9;--blue:#72b9ff;--green:#31d3a4;--yellow:#f4c86f;--red:#f77d7d}*{box-sizing:border-box}body{margin:0;background:radial-gradient(circle at 20% 0,#163a59 0,#08131f 32%,#07111d 100%);color:var(--text);font-family:Inter,Segoe UI,sans-serif}.app-shell{display:grid;grid-template-columns:250px 1fr;min-height:100vh}.sidebar{position:sticky;top:0;height:100vh;display:flex;flex-direction:column;gap:30px;padding:24px;background:#071321e8;border-right:1px solid #ffffff12;backdrop-filter:blur(16px)}.brand{display:flex;align-items:center;gap:12px}.brand-mark{display:grid;place-items:center;width:36px;height:36px;border-radius:10px;background:linear-gradient(135deg,var(--blue),#3c8ef7);color:#071522;font-weight:900}.sidebar nav{display:grid;gap:8px}.nav,.secondary,.primary{border:0;border-radius:10px;padding:12px 14px;font:inherit;font-weight:700;cursor:pointer;transition:transform .15s ease,border-color .15s ease,background .15s ease}.nav,.nav-sub{background:transparent;color:var(--muted);text-align:left}.nav.active,.nav:hover,.nav-sub:hover{background:#72b9ff18;color:var(--text)}.nav:hover,.secondary:hover,.primary:hover{transform:translateY(-1px)}.secondary{margin-top:auto;background:#ffffff08;border:1px solid #ffffff18;color:var(--text)}main{padding:32px;max-width:1400px;width:100%}header,.section-head{display:flex;justify-content:space-between;align-items:center;gap:20px}header{margin-bottom:28px;padding:18px 20px;border:1px solid #ffffff10;border-radius:18px;background:#08131f99;backdrop-filter:blur(14px)}h1,h2{margin:5px 0 0}h2{font-size:1.7rem}small{color:var(--muted)}.status{padding:6px 10px;border-radius:999px;background:#31d3a41c;color:var(--green)}.view{display:none}.view.active{display:block}.hero,.panel,article{border:1px solid #ffffff14;border-radius:18px;background:linear-gradient(180deg,#132842e8,#0d1d30e8);box-shadow:0 18px 50px #0004}.hero{padding:32px;margin-bottom:18px}.hero h2{font-size:clamp(.95rem,1.2vw,1.15rem);max-width:700px}.hero p{color:var(--muted);max-width:620px;font-size:.85rem}.cards{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.cards article{padding:22px}.cards strong{display:block;font-size:1.6rem;margin-top:10px}.panel{padding:22px}.grid-two{display:grid;grid-template-columns:1.1fr .9fr;gap:18px}.list{display:grid;gap:10px;margin-top:18px}.list-item{padding:15px;border:1px solid #ffffff12;border-radius:12px;background:#ffffff07}.list-item strong,.list-item small{display:block}.list-item small{margin-top:5px}.ok{border-left:3px solid var(--green)}.warn{border-left:3px solid var(--yellow)}.bad{border-left:3px solid var(--red)}form{display:grid;gap:12px;margin-top:18px}label{display:grid;gap:6px;color:var(--muted);font-size:.85rem}input,select,textarea{width:100%;padding:11px 12px;border:1px solid #ffffff18;border-radius:9px;background:#071522;color:var(--text);font:inherit}input:focus,select:focus,textarea:focus{outline:2px solid #72b9ff66;border-color:#72b9ff66}textarea{min-height:90px;resize:vertical}.primary{background:linear-gradient(135deg,var(--blue),#3c8ef7);color:#061522;box-shadow:0 10px 28px #3c8ef72e}.form-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}.metric{font-size:2.5rem;color:var(--green);margin-top:24px}.modal{position:fixed;inset:0;z-index:10;display:grid;place-items:center;background:#030b14dd;backdrop-filter:blur(8px)}.modal.hidden{display:none}.login-card{width:min(400px,calc(100% - 32px));padding:28px;border:1px solid #72b9ff33;border-radius:18px;background:#102235}.login-card h1{margin:28px 0}.error{color:var(--red);min-height:20px}.toast{position:fixed;right:22px;top:22px;z-index:20;padding:13px 16px;border-radius:10px;background:#183a31;color:var(--text);opacity:0;transform:translateY(-8px);transition:.2s}.toast.show{opacity:1;transform:translateY(0)}@media(max-width:850px){.app-shell{grid-template-columns:1fr}.sidebar{position:static;height:auto;border-right:0;border-bottom:1px solid #ffffff12}.sidebar nav{grid-template-columns:repeat(2,1fr)}main{padding:20px}header{margin-bottom:20px;padding:16px}.grid-two,.cards,.measure-actions,.production-grid,.production-results{grid-template-columns:1fr}.form-row{grid-template-columns:1fr}.production-submit{justify-self:stretch;min-width:0}.section-head{align-items:flex-start;flex-direction:column}}

/* Professional layout polish */
.app-shell{grid-template-columns:280px minmax(0,1fr)}
.sidebar{gap:12px;padding:16px 14px}
.sidebar .brand{padding:6px 8px 10px;gap:8px;border-bottom:1px solid #ffffff12}
.sidebar .brand-logo{width:26px;height:26px}
.sidebar .brand strong{font-size:.92rem}
.sidebar nav{gap:6px;overflow:auto;padding-right:4px}
.nav-group{margin:14px 10px 4px;color:#72b9ff;text-transform:uppercase;letter-spacing:.12em;font-size:.68rem;font-weight:900}
.nav,.nav-sub{border:1px solid transparent;border-radius:10px;padding:8px 10px}
.nav.active,.nav-sub.active{border-color:#72b9ff33;background:linear-gradient(135deg,#72b9ff22,#31d3a414)}
.sidebar>.secondary{margin-top:0}
.sidebar nav+.secondary{margin-top:auto}
main{min-width:0;margin:0 auto;padding:28px;width:min(100%,1500px)}
header{position:relative;margin-bottom:18px;background:linear-gradient(135deg,#0d2035e8,#08131fcc);box-shadow:0 18px 50px #0003}
.system-status-bar{margin:0 0 22px}
.view.active{animation:fadeIn .16s ease-out}
@keyframes fadeIn{from{opacity:.65;transform:translateY(4px)}to{opacity:1;transform:none}}
.hero{display:grid;gap:8px;margin-bottom:16px;padding:28px;border-color:#72b9ff24;background:linear-gradient(135deg,#173554e8,#0d1d30e8)}
.hero h2{max-width:850px}
.risk-indicator{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:16px}
.risk-indicator strong{margin:0}
.cards{grid-template-columns:repeat(auto-fit,minmax(190px,1fr))}
.cards article,.panel,.hero,.list-item{box-shadow:0 14px 34px #00000024}
.section-head{margin-bottom:16px;padding-bottom:10px;border-bottom:1px solid #ffffff10}
.grid-two{grid-template-columns:minmax(320px,.92fr) minmax(340px,1.08fr);align-items:start}
form.panel{margin-top:0}
form.panel h3,.panel h3{margin-top:0}
label{font-weight:700}
input,select,textarea{min-height:44px;border-radius:11px;background:#061421}
input[type="checkbox"],input[type="radio"]{min-height:0;width:18px;height:18px;flex:none}
.primary,.secondary{min-height:40px;padding:9px 14px;font-weight:600}
.list{margin-top:12px}
.list-item{display:grid;gap:6px;border-radius:14px;background:linear-gradient(180deg,#ffffff09,#ffffff04)}
.list-item button{justify-self:start}
.input-with-button{display:flex;gap:6px;align-items:center}
.input-with-button input{flex:1}
.input-with-button button{min-height:36px;padding:6px 10px;white-space:nowrap}
.panel-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:10px}
#budget-summary .list-item,#documents .list-item,#users .list-item,#messages .list-item,#time-entries .list-item{border-left:3px solid #72b9ff55}
.project-switcher{min-width:200px;margin-top:8px;padding:6px 8px;border:1px solid #72b9ff26;border-radius:10px;background:#07152299;color:var(--blue);font-size:.64rem;font-weight:600}
.project-switcher select{margin-top:3px;padding:5px 7px;font-size:.72rem;font-weight:600;background:#061421}
.chantier-progress{border-left:3px solid var(--green);background:linear-gradient(135deg,#31d3a418,#72b9ff10)}
.time-live-calculation{margin:14px 0;padding:14px;border:1px solid #f4c86f44;border-radius:14px;background:#f4c86f10}
.quick-worker-form{margin-top:18px;padding:16px;border:1px solid #72b9ff26;border-radius:16px;background:linear-gradient(180deg,#72b9ff10,#ffffff04)}
.quick-worker-form h3{margin:0}
.quick-workers{margin-top:14px}.worker-actions{display:flex;gap:8px;flex-wrap:wrap}
select[data-project-assignment][multiple]{min-height:120px;padding:7px}
select[data-project-assignment][multiple] option{padding:7px 8px}
select[data-project-assignment][multiple]:focus-visible{outline:2px solid var(--blue);outline-offset:2px}
.hours-pdf-panel{margin-top:14px;padding:12px;border:1px solid #31d3a433;border-radius:14px;background:#31d3a40f}.hours-pdf-panel small{display:block;margin-top:8px}
.time-live-calculation.ready{border-color:#31d3a466;background:#31d3a412}
.time-live-calculation strong{display:block;color:var(--yellow);font-size:1.05rem}
.time-live-calculation.ready strong{color:var(--green)}
.work-calendar{margin:16px 0;padding:18px;border:1px solid #ffffff14;border-radius:18px;background:linear-gradient(180deg,#ffffff08,#ffffff03);box-shadow:0 14px 34px #00000024}
.work-calendar-head{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:14px;flex-wrap:wrap}
.calendar-title{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.calendar-title>small{color:var(--muted);font-size:.72rem;font-weight:900;letter-spacing:.06em;text-transform:uppercase}
.calendar-nav{display:flex;align-items:center;gap:10px}
.calendar-nav-btn{width:30px;height:30px;padding:0;border:1px solid #ffffff20;border-radius:9px;background:#ffffff08;color:var(--text);font-size:1rem;line-height:1;cursor:pointer;display:grid;place-items:center;transition:background .15s,border-color .15s,transform .1s}
.calendar-nav-btn:hover{background:#72b9ff22;border-color:#72b9ff55;transform:translateY(-1px)}
.calendar-nav-btn:focus-visible{outline:2px solid var(--blue);outline-offset:2px}
.calendar-month-label{min-width:150px;text-align:center;font-size:1.05rem;text-transform:capitalize}
.calendar-nav-today{padding:7px 12px;font-size:.78rem;border:1px solid #ffffff20;border-radius:999px;background:#ffffff08;color:var(--text);cursor:pointer;font-weight:800;transition:background .15s,border-color .15s}
.calendar-nav-today:hover:not(:disabled){background:#72b9ff22;border-color:#72b9ff55}
.calendar-nav-today:disabled{opacity:.4;cursor:default}
.calendar-stats{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:12px}
.calendar-stat{display:flex;flex-direction:column;gap:2px;padding:8px 14px;border:1px solid #ffffff12;border-radius:12px;background:#071522}
.calendar-stat strong{font-size:1.05rem;color:var(--text)}
.calendar-stat small{color:var(--muted);font-size:.68rem;font-weight:800;text-transform:uppercase;letter-spacing:.04em}
.calendar-weekdays,.calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px}
.calendar-weekdays span{color:var(--muted);font-size:.72rem;font-weight:900;text-align:center;text-transform:uppercase}
.calendar-hint{margin:8px 0 10px;color:var(--muted);font-size:.82rem}
.calendar-legend{display:inline-flex;gap:12px;flex-wrap:wrap}
.legend-work,.legend-rendezvous{display:inline-flex;align-items:center;gap:5px}
.legend-work::before,.legend-rendezvous::before{content:'';width:8px;height:8px;border-radius:50%}
.legend-work{color:var(--green)}
.legend-work::before{background:var(--green)}
.legend-rendezvous{color:var(--yellow)}
.legend-rendezvous::before{background:var(--yellow)}
.calendar-cell{min-height:58px;padding:8px 7px;border:1px solid #ffffff12;border-radius:12px;background:#071522;color:var(--text);display:grid;gap:4px;place-items:center;text-align:center;cursor:pointer;font:inherit;transition:border-color .15s,transform .1s,box-shadow .15s}
.calendar-cell-weekday{display:none}
.calendar-cell:hover{border-color:#72b9ff66;transform:translateY(-1px);box-shadow:0 8px 18px #00000030}
.calendar-cell:focus-visible{outline:2px solid var(--blue);outline-offset:2px}
.calendar-cell small{font-size:.68rem;color:var(--green)}
.calendar-cell.weekend{opacity:.5;background:#ffffff05}
.calendar-cell.today{border-color:var(--blue);box-shadow:0 0 0 1px var(--blue) inset}
.calendar-cell.today strong{color:var(--blue)}
.calendar-cell.worked{border-color:#31d3a466;background:#31d3a418;color:#dffcf4}
.calendar-cell.worked.entry-pending{border-color:#f4c86f88;background:#f4c86f22;color:#fff6df}
.calendar-cell.worked.entry-rejected{border-color:#f77d7d88;background:#f77d7d22;color:#ffe1e1}
.calendar-cell.has-rendezvous{border-color:#f4c86f99;background:#f4c86f12}
.calendar-cell.has-rendezvous.worked{background:linear-gradient(135deg,#31d3a418,#f4c86f18)}
.calendar-quick-edit{display:flex;align-items:center;justify-content:center;gap:3px;margin:2px auto 0;padding:1px 3px 1px 6px;border:1px solid currentColor;border-radius:999px;background:#00000030;color:inherit;font:inherit;font-size:.68rem;font-weight:800;transition:transform .1s,background .15s}
button.calendar-quick-edit{cursor:pointer}
button.calendar-quick-edit:hover{transform:scale(1.06);background:#00000050}
.calendar-icon-btn{display:inline-flex;align-items:center;justify-content:center;width:15px;height:15px;padding:0;border:0;border-radius:50%;background:#ffffff22;color:inherit;font-size:.6rem;line-height:1;cursor:pointer}
.calendar-icon-btn:hover{background:#ffffff40}
.calendar-icon-btn.danger{color:#ffd5d5}
.calendar-icon-btn.danger:hover{background:#f77d7d55}
.production-live-calc{margin-top:8px;padding:10px 12px;border:1px solid #31d3a444;border-radius:10px;background:#31d3a40d;font-weight:800;font-variant-numeric:tabular-nums;color:var(--green)}
.quick-workers-group{margin-top:14px;padding:12px 14px;border:1px solid #ffffff14;border-radius:12px;background:#ffffff05}
.quick-workers-group summary{cursor:pointer;font-weight:800;color:var(--yellow);list-style:none;display:flex;align-items:center;gap:8px}
.quick-workers-group summary::-webkit-details-marker{display:none}
.quick-workers-group summary::before{content:'▸';transition:transform .15s}
.quick-workers-group[open] summary::before{transform:rotate(90deg)}
.chantier-controls-details{margin-top:14px;padding:12px 14px;border:1px solid #ffffff14;border-radius:12px;background:#ffffff05}
.chantier-controls-details summary{cursor:pointer;font-weight:800;color:var(--yellow);list-style:none;display:flex;align-items:center;gap:8px}
.chantier-controls-details summary::-webkit-details-marker{display:none}
.chantier-controls-details summary::before{content:'▸';transition:transform .15s}
.chantier-controls-details[open] summary::before{transform:rotate(90deg)}
.chantier-controls-details .list-item{margin-top:10px}
.quick-workers-search{width:100%;margin-top:10px}
.quick-workers-list{display:grid;gap:8px;margin-top:10px}
.time-year-summary{margin-top:10px;padding:12px 14px;border:1px solid #31d3a444;border-radius:12px;background:#31d3a40d}.time-year-summary strong{display:block;color:var(--green)}.time-year-summary small{color:var(--muted)}
.quick-edit-popover{position:absolute;z-index:80;display:grid;gap:8px;width:200px;padding:12px;border:1px solid #9bd5ff35;border-radius:12px;background:#102235;box-shadow:0 18px 40px #0008;color:var(--text)}.quick-edit-popover strong{font-size:.8rem;color:var(--blue)}.quick-edit-popover label{display:grid;gap:4px;font-size:.75rem;color:var(--muted)}.quick-edit-popover input{min-height:38px}.quick-edit-actions{display:flex;flex-wrap:wrap;gap:6px}.quick-edit-actions button{flex:1;min-width:0;min-height:36px;padding:6px 8px;font-size:.75rem}.quick-edit-actions .danger{background:#f77d7d1f;color:#ffb3b3;border-color:#f77d7d55}
.calendar-rendezvous{display:block;max-width:100%;overflow:hidden;color:var(--yellow);font-size:.64rem;font-weight:900;line-height:1.1;text-overflow:ellipsis;white-space:nowrap}
.calendar-rendezvous.calendar-absence{color:var(--red)}
.calendar-add-rdv{border-style:dashed;opacity:.4;background:transparent;transition:opacity .15s,transform .1s}
.calendar-cell:hover .calendar-add-rdv,.calendar-add-rdv:hover,.calendar-add-rdv:focus-visible{opacity:1}
.calendar-cell.empty{border:0;background:transparent;pointer-events:none}
.worker-month-summary{margin:16px 0;padding:14px;border:1px solid #72b9ff26;border-radius:16px;background:linear-gradient(180deg,#72b9ff10,#ffffff04)}
.worker-month-summary .section-head{margin-bottom:10px}
.worker-month-summary h3{margin:0}
.worker-month-summary-table-wrap{overflow-x:auto}
.worker-month-summary-table{width:100%;border-collapse:collapse;min-width:520px}
.worker-month-summary-table th,.worker-month-summary-table td{padding:10px 8px;border-bottom:1px solid #ffffff12;text-align:left;vertical-align:top}
.worker-month-summary-table thead th{color:var(--muted);font-size:.74rem;text-transform:uppercase;letter-spacing:.04em}
.worker-month-summary-table tbody th{color:var(--text)}
.worker-month-summary-table tbody td{color:var(--green);font-variant-numeric:tabular-nums}
.worker-month-summary-table tbody td small{color:var(--muted);font-size:.72rem}
.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.document-actions,.control-actions{display:flex;flex-wrap:wrap;align-items:center;gap:6px}
.document-actions .secondary{padding:7px 11px;font-size:.78rem;border-radius:8px}
.document-actions .document-more>summary{padding:6px 10px;font-size:.78rem}
.document-more-menu .secondary{padding:7px 11px;font-size:.78rem;border-radius:8px}
.rge-modules{grid-template-columns:repeat(auto-fit,minmax(280px,1fr))}
.production-panel,.ai-panel,.schedule-panel,.audit-history,.rge-modules-panel{margin-top:18px}
@media(max-width:1050px){.app-shell{grid-template-columns:230px minmax(0,1fr)}main{padding:22px}.grid-two{grid-template-columns:1fr}.risk-indicator{align-items:flex-start;flex-direction:column}}
@media(max-width:850px){.app-shell{grid-template-columns:1fr}.sidebar{gap:14px}.sidebar nav{grid-template-columns:1fr 1fr;max-height:none}.nav-group{grid-column:1/-1;margin-top:10px}.sidebar nav+.secondary{margin-top:0}main{padding:16px}.hero{padding:22px}.cards{grid-template-columns:1fr}.header-actions{width:100%;justify-content:space-between}}

/* Legacy product refinement: clearer auth, task-first mobile navigation, and stronger states. */
:root{--surface-0:#06111d;--surface-1:#0b1b2c;--surface-2:#102235;--border-soft:#ffffff14;--border-focus:#9bd5ff;--radius-control:11px;--radius-panel:16px;--shadow-panel:0 18px 44px #0000002e}
body{background:linear-gradient(180deg,var(--surface-0),#071522 62%,#06111d);font-family:Inter,Segoe UI,sans-serif;color:var(--text)}
button,a,input,select,textarea{ -webkit-tap-highlight-color:transparent }
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid var(--border-focus);outline-offset:3px}
.modal{align-items:center;overflow-y:auto;padding:max(16px,env(safe-area-inset-top)) 16px max(16px,env(safe-area-inset-bottom));background:#020a14f5;backdrop-filter:none}
.modal .login-card{max-height:calc(100dvh - 32px);overflow:auto;scrollbar-gutter:stable;background:linear-gradient(180deg,#112941,#0d2033);border-color:#9bd5ff35;box-shadow:0 24px 70px #0008}
.modal .login-card::-webkit-scrollbar{width:8px}.modal .login-card::-webkit-scrollbar-thumb{border-radius:99px;background:#9bd5ff45}
body:has(#login-modal:not(.hidden)){overflow:hidden}body:has(#login-modal:not(.hidden)) .app-shell{visibility:hidden;pointer-events:none}
.login-card .brand{padding-bottom:12px;gap:8px;border-bottom:1px solid var(--border-soft)}.login-card .brand-logo{width:28px;height:28px}.login-card .brand strong{font-size:.95rem}.login-card h1{margin:22px 0 12px;font-size:clamp(1.9rem,4vw,2.55rem);letter-spacing:-.04em}.login-card p:not(.error){line-height:1.55}.login-card label{color:var(--text);font-weight:700}.login-card input,.login-card select{min-height:48px;border-radius:var(--radius-control);background:#061421;border-color:#ffffff20}.login-card input:focus,.login-card select:focus{border-color:var(--border-focus);box-shadow:0 0 0 4px #72b9ff18;outline:none}.login-card button{min-height:46px}.login-card button[disabled]{cursor:progress;opacity:.7;transform:none}.login-card button[aria-busy=true]{position:relative;color:transparent}.login-card button[aria-busy=true]::after{content:'';position:absolute;width:16px;height:16px;border:2px solid #07152266;border-top-color:#071522;border-radius:50%;animation:spin .7s linear infinite}.error[role=alert]{padding:10px 12px;border:1px solid #f77d7d66;border-radius:var(--radius-control);background:#f77d7d12;color:#ffd5d5;line-height:1.4}.error:empty{display:none}
.toast{max-width:min(440px,calc(100vw - 32px));border:1px solid #31d3a466;background:#0d3028;color:#e7fff7;box-shadow:var(--shadow-panel);line-height:1.4}.toast.show{animation:toastIn .2s ease-out}.status{border:1px solid #31d3a466;background:#31d3a412}
.cards article{min-height:116px;display:flex;flex-direction:column;justify-content:center;gap:8px}.cards article small{letter-spacing:.04em}.panel,.hero,.cards article{box-shadow:var(--shadow-panel)}.list-item{border-color:#ffffff18}.list-item:has(button,a):hover{border-color:#72b9ff55;background:#72b9ff0d}.nav,.nav-sub{min-height:44px}.nav.active,.nav-sub.active{box-shadow:inset 3px 0 0 var(--blue)}
.mobile-nav-toggle,.mobile-nav-backdrop{display:none}
@keyframes spin{to{transform:rotate(360deg)}}@keyframes toastIn{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:none}}
@media(max-width:850px){.mobile-nav-toggle{position:fixed;top:12px;right:14px;z-index:40;display:inline-flex;align-items:center;justify-content:center;min-width:64px;min-height:44px;padding:0 12px;border:1px solid #72b9ff55;border-radius:12px;background:#0d2035ee;color:var(--text);font-weight:800;box-shadow:0 12px 30px #0005}.mobile-nav-backdrop{position:fixed;inset:0;z-index:25;border:0;background:#020a14b8}.app-shell.mobile-nav-open .mobile-nav-backdrop{display:block}.sidebar{position:fixed;inset:0 auto 0 0;z-index:30;width:min(300px,86vw);height:100dvh;transform:translateX(-105%);transition:transform .2s cubic-bezier(.16,1,.3,1);box-shadow:18px 0 50px #0008}.app-shell.mobile-nav-open .sidebar{transform:none}.sidebar nav{grid-template-columns:1fr;overflow:auto}.nav-group{grid-column:auto}.app-shell main{padding-top:72px}.app-shell.mobile-nav-open main{pointer-events:none}.header-actions{padding-right:70px}.modal .login-card{max-height:calc(100dvh - 24px);width:min(460px,100%)} }
@media(max-width:850px){header{align-items:flex-start;flex-direction:column}.header-actions{width:100%;padding-right:0}}
.risk-indicator #project-risk-detail{display:block;flex:1;color:var(--muted);font-size:.84rem}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important;transition-duration:.01ms!important}}
.user-row{display:grid;grid-template-columns:minmax(180px,.8fr) minmax(220px,1.25fr) auto;align-items:center;gap:16px;padding:15px 16px;border:1px solid var(--border-soft);border-left:3px solid #72b9ff55;border-radius:14px;background:linear-gradient(180deg,#ffffff09,#ffffff04)}
.user-row+.user-row{margin-top:10px}.user-identity{display:flex;align-items:center;gap:9px;min-width:0}.user-identity strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.user-role{display:inline-flex;flex:none;padding:4px 8px;border:1px solid #72b9ff38;border-radius:999px;color:var(--blue);font-size:.72rem;font-weight:800}.user-meta{display:grid;gap:4px;min-width:0;color:var(--text)}.user-meta span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.user-meta small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.user-row-actions{display:flex;justify-content:flex-end;gap:7px;flex-wrap:wrap}.user-row-actions button{min-height:38px;padding:8px 10px;font-size:.78rem}.user-row-actions .danger{border-color:#f77d7d55;color:#ffd5d5;background:#f77d7d0d}.user-row-actions .danger:hover{border-color:var(--red);background:#f77d7d20}.user-row-actions button[disabled]{cursor:not-allowed;opacity:.4}.user-empty{display:grid;gap:6px;padding:28px 16px;border:1px dashed #72b9ff44;border-radius:14px;color:var(--muted);text-align:center}.user-empty strong{color:var(--text)}.user-edit-modal{z-index:60}.user-edit-modal .login-card{width:min(580px,calc(100% - 28px));max-height:calc(100dvh - 28px);overflow:auto;margin:0}.user-edit-modal .section-head{align-items:flex-start;margin-bottom:16px}.user-edit-modal .section-head h2{font-size:1.35rem}.icon-close{width:40px;height:40px;border:1px solid #ffffff20;border-radius:10px;background:#ffffff08;color:var(--text);font-size:1.4rem;line-height:1}.icon-close:hover{border-color:#9bd5ff66;background:#72b9ff12}.user-edit-summary{display:grid;gap:3px;padding:12px 14px;border:1px solid #72b9ff2e;border-radius:12px;background:#72b9ff0b}.user-edit-summary strong{font-size:1.05rem}.user-edit-readonly{display:grid;grid-template-columns:auto 1fr;gap:5px 12px;padding:12px 14px;border:1px solid var(--border-soft);border-radius:12px;background:#ffffff05}.user-edit-readonly span{color:var(--muted);font-size:.8rem}.user-edit-readonly strong{font-size:.85rem}.user-edit-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:4px}.user-edit-actions button{min-width:120px}.user-edit-modal .error{margin:0}
@media(max-width:850px){.user-row{grid-template-columns:1fr;gap:9px}.user-identity{align-items:flex-start;flex-direction:column;gap:4px}.user-meta small{white-space:normal}.user-row-actions{justify-content:stretch}.user-row-actions button{flex:1}.user-edit-actions{position:sticky;bottom:-1px;padding-top:12px;background:linear-gradient(180deg,transparent,var(--surface-2) 20%)}.user-edit-actions button{flex:1}}

/* Workforce roster: dense comparison first, operational detail on demand. */
:root{--status-critical:#f77d7d;--status-critical-bg:#f77d7d14;--status-attention:#f39a4a;--status-attention-bg:#f39a4a14;--status-pending:#f4c86f;--status-pending-bg:#f4c86f14;--status-good:#31d3a4;--status-good-bg:#31d3a414;--roster-line:#ffffff12;--roster-header:#9fb3c9;--drawer-width:min(780px,100vw)}
.worker-roster-shell{display:grid;gap:14px}.worker-roster-toolbar,.worker-roster-panel,.worker-add-panel{border:1px solid var(--roster-line);border-radius:var(--radius-panel);background:var(--surface-1);box-shadow:0 14px 34px #0000001c}.worker-roster-toolbar{padding:20px}.worker-roster-heading,.worker-roster-panel-head,.worker-add-panel-head,.worker-detail-header,.worker-detail-period,.worker-detail-section-head{display:flex;justify-content:space-between;align-items:flex-start;gap:18px}.worker-roster-heading h2{margin:5px 0 7px;font-size:clamp(1.55rem,3vw,2.15rem);letter-spacing:-.04em}.worker-roster-heading p,.worker-add-panel-head p{margin:0;color:var(--muted);max-width:650px}.worker-roster-toolbar-actions{display:flex;align-items:flex-end;gap:10px}.roster-month-field{min-width:150px}.worker-roster-toolbar label{color:var(--muted);font-size:.78rem;font-weight:800}.worker-roster-toolbar input,.worker-roster-toolbar select{margin-top:5px;min-height:44px}.worker-add-toggle{white-space:nowrap}.roster-control-row{display:grid;grid-template-columns:minmax(260px,1fr) 190px;gap:10px;margin-top:18px;padding-top:16px;border-top:1px solid var(--roster-line)}.roster-search-field{min-width:0}.worker-roster-summary{display:grid;grid-template-columns:repeat(4,minmax(120px,1fr));gap:0;margin:18px 0 0;padding:14px 0 0;border-top:1px solid var(--roster-line)}.worker-roster-summary>div{display:grid;gap:3px;padding:0 16px;border-left:1px solid var(--roster-line)}.worker-roster-summary>div:first-child{padding-left:0;border-left:0}.worker-roster-summary dt{color:var(--roster-header);font-size:.74rem;font-weight:800;text-transform:uppercase;letter-spacing:.06em}.worker-roster-summary dd{margin:0;color:var(--text);font-size:1.45rem;font-weight:850;font-variant-numeric:tabular-nums}.worker-roster-summary small{font-size:.73rem}.worker-roster-summary .summary-critical dd{color:var(--status-critical)}.worker-roster-summary .summary-attention dd{color:var(--status-attention)}.worker-roster-summary .summary-total dd{color:var(--status-good)}.worker-roster-panel{padding:0;overflow:hidden}.worker-roster-panel-head{padding:16px 18px 13px;border-bottom:1px solid var(--roster-line);align-items:center}.worker-roster-panel-head h3{margin:0}.worker-roster-panel-head small{font-size:.76rem}.worker-roster-scroll{overflow-x:auto}.worker-roster-table{width:100%;border-collapse:collapse;min-width:960px;font-size:.83rem}.worker-roster-table th,.worker-roster-table td{padding:13px 12px;border-bottom:1px solid var(--roster-line);text-align:left;vertical-align:middle}.worker-roster-table thead th{background:#071522;color:var(--roster-header);font-size:.69rem;font-weight:850;letter-spacing:.07em;text-transform:uppercase;white-space:nowrap}.worker-roster-table thead th:first-child,.worker-roster-table tbody th{padding-left:18px}.worker-roster-table tbody tr{background:transparent;transition:background .15s ease}.worker-roster-table tbody tr:hover{background:#72b9ff08}.worker-roster-table tbody tr:last-child th,.worker-roster-table tbody tr:last-child td{border-bottom:0}.worker-roster-table tbody th{font-weight:400}.worker-roster-table td strong{font-size:.95rem;font-variant-numeric:tabular-nums}.worker-roster-table td small,.worker-roster-table th small{display:block;margin-top:3px;color:var(--muted);font-size:.72rem}.numeric-heading{text-align:right!important}.worker-name-cell{display:flex;align-items:center;gap:8px;min-width:190px}.worker-detail-primary{display:grid;gap:3px;min-width:0;padding:0;border:0;background:transparent;color:var(--text);text-align:left;font:inherit;cursor:pointer}.worker-detail-primary strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.worker-detail-primary span{color:var(--blue);font-size:.69rem;font-weight:800;opacity:0;transform:translateX(-4px);transition:opacity .15s ease,transform .15s ease}.worker-roster-table tbody tr:hover .worker-detail-primary span,.worker-detail-primary:focus-visible span{opacity:1;transform:none}.worker-contact,.worker-projects{max-width:225px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.worker-projects{color:var(--muted)}.user-role{padding:3px 7px}.worker-roster-table td:nth-child(2),.worker-roster-table td:nth-child(3),.worker-amount{text-align:right;font-variant-numeric:tabular-nums}.worker-roster-table td:nth-child(4) span,.worker-roster-table td:nth-child(4) small{white-space:nowrap}.worker-payment-cell{min-width:165px}.worker-status{display:inline-flex;align-items:center;gap:6px;padding:5px 8px;border:1px solid currentColor;border-radius:999px;font-size:.7rem;font-weight:850;line-height:1.1;white-space:nowrap}.worker-status-dot{width:7px;height:7px;border-radius:50%;background:currentColor;box-shadow:0 0 0 3px currentColor;background-clip:padding-box}.worker-status-detail{max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.status-critical{color:var(--status-critical)}.status-attention{color:var(--status-attention)}.status-pending{color:var(--status-pending)}.status-good{color:var(--status-good)}.status-empty{color:var(--muted)}.worker-status.status-critical{background:var(--status-critical-bg)}.worker-status.status-attention{background:var(--status-attention-bg)}.worker-status.status-pending{background:var(--status-pending-bg)}.worker-status.status-good{background:var(--status-good-bg)}.worker-status.status-empty{background:#ffffff06}.worker-next-rdv{display:block;white-space:nowrap}.worker-actions-cell{width:112px}.worker-row-actions{display:flex;align-items:center;justify-content:flex-end;gap:6px}.worker-row-actions button{min-height:44px}.worker-detail-action{padding:9px 11px!important;color:var(--blue);font-size:.77rem!important}.worker-action-menu-wrap{position:relative}.worker-action-menu-trigger{width:44px;padding:0!important;font-size:1.35rem!important;line-height:1}.worker-action-menu{position:absolute;right:0;top:calc(100% + 6px);z-index:12;display:grid;min-width:220px;padding:5px;border:1px solid #9bd5ff35;border-radius:12px;background:#102235;box-shadow:0 18px 40px #0008}.worker-action-menu[hidden]{display:none}.worker-action-menu button{min-height:42px;padding:9px 10px;border:0;border-radius:8px;background:transparent;color:var(--text);font:inherit;font-size:.8rem;text-align:left;cursor:pointer}.worker-action-menu button:hover,.worker-action-menu button:focus-visible{background:#72b9ff12}.worker-action-menu button.danger{color:#ffd5d5}.worker-roster-state{display:grid;place-items:center;gap:7px;padding:34px 18px;text-align:center}.worker-roster-state strong{color:var(--text)}.worker-roster-state small{max-width:420px}.worker-roster-state button{margin-top:4px}.worker-add-panel{padding:18px}.worker-add-panel-head{align-items:center;margin-bottom:12px}.worker-add-panel-head h3{margin:4px 0}.worker-add-panel .panel{margin-top:0;box-shadow:none;background:#ffffff04}.worker-add-actions{display:flex;justify-content:flex-end;gap:9px}.worker-add-actions button{min-width:150px}.worker-detail-modal{z-index:70;display:flex;justify-content:center;align-items:stretch;padding:0;background:var(--surface-0,#06111d)}.worker-detail-card{display:grid;align-content:start;gap:16px;width:100%;max-width:900px;height:100dvh;overflow:auto;padding:24px;background:var(--surface-1,#0b1b2c)}.worker-detail-header{align-items:flex-start;padding-bottom:14px;border-bottom:1px solid var(--roster-line)}.worker-detail-header h2{margin:5px 0 5px;font-size:1.6rem}.worker-detail-header p{margin:0;color:var(--muted);line-height:1.45}.worker-detail-period{align-items:flex-end}.worker-detail-period label{flex:1;max-width:190px;color:var(--muted);font-size:.78rem;font-weight:800}.worker-detail-period input{margin-top:5px}.worker-detail-period>.worker-status{align-self:center}.worker-detail-summary{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:1px;border:1px solid var(--roster-line);border-radius:14px;overflow:hidden;background:var(--roster-line)}.worker-detail-summary>div{display:grid;gap:4px;padding:12px 10px;background:#0c2032}.worker-detail-summary small{font-size:.7rem}.worker-detail-summary strong{font-size:1.1rem;font-variant-numeric:tabular-nums}.worker-detail-summary span{color:var(--muted);font-size:.7rem}.worker-detail-summary .detail-summary-amount strong{color:var(--status-good)}.worker-detail-section{padding:15px;border:1px solid var(--roster-line);border-radius:14px;background:#ffffff04}.worker-detail-section-head{align-items:center;margin-bottom:10px}.worker-detail-section-head h3{margin:4px 0 0}.worker-detail-section-head small{font-size:.69rem}.worker-detail-calendar{margin:0;padding:0;border:0;background:transparent}.worker-detail-calendar .work-calendar-head{margin-bottom:10px}.worker-detail-calendar .calendar-hint{margin:0 0 10px}.worker-detail-calendar .calendar-cell{min-height:48px;padding:6px}.worker-detail-columns{display:grid;grid-template-columns:1fr 1fr;gap:14px}.worker-detail-payment{min-height:80px}.detail-payment-status{display:grid;gap:7px;padding:13px;border-left:3px solid currentColor;border-radius:10px;background:#ffffff05}.detail-payment-status>div{display:flex;justify-content:space-between;align-items:center;gap:12px}.detail-payment-status>div>strong{font-size:1.25rem;font-variant-numeric:tabular-nums}.detail-payment-status p{margin:0;color:var(--text);font-size:.86rem}.detail-payment-status>small{color:var(--muted)}.detail-payment-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:5px}.detail-payment-actions button{min-height:42px}.worker-detail-list{display:grid;gap:8px}.detail-list-item{padding:10px;border:1px solid var(--roster-line);border-radius:10px;background:#071522}.detail-list-item strong,.detail-list-item small{display:block}.detail-list-item small{margin-top:4px}.detail-list-filter{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px}.detail-list-filter button{min-height:36px;padding:6px 9px;font-size:.75rem}.worker-detail-modal .icon-close{flex:none}.worker-detail-modal .modal{display:none}
@media(max-width:1050px){.worker-roster-table{min-width:900px}.worker-detail-summary{grid-template-columns:repeat(3,1fr)}.worker-detail-summary .detail-summary-amount{grid-column:span 1}}

/* Targeted professional refinement: risk-first dashboard, denser KPI summary, calmer surfaces. */
#dashboard-view .hero{position:relative;padding:14px 16px 12px;margin-bottom:14px;background:linear-gradient(135deg,#173554e8,#0d1d30e8);box-shadow:0 16px 34px #00000022}
#dashboard-view .hero small{color:#a9d6f8;font-weight:600;letter-spacing:.02em;font-size:.6rem}
.hero-progress{margin-top:8px;height:7px;border-radius:999px;background:#EEF1F7;overflow:hidden;box-shadow:none}
.hero-progress-bar{height:100%;border-radius:999px;background:var(--blue);box-shadow:none;transition:width .4s ease}
.site-progress-panel .section-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.site-progress-label{font-size:1.5rem;letter-spacing:-.02em;background:linear-gradient(135deg,var(--text) 40%,#9bd5ff);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}
.site-progress-panel .hero-progress{margin-bottom:16px}
#dashboard-view .risk-indicator{display:grid;grid-template-columns:1fr auto;gap:6px 18px;align-items:center;padding:17px 20px;margin-bottom:16px;border-radius:14px;box-shadow:0 12px 28px #00000022}
#dashboard-view .risk-indicator-heading{display:flex;align-items:center;gap:10px;grid-column:1/-1}
#dashboard-view .risk-indicator-heading small{font-size:.75rem;font-weight:850;letter-spacing:.08em;text-transform:uppercase}
#dashboard-view .risk-state{padding:4px 8px;border:1px solid currentColor;border-radius:999px;font-size:.68rem;font-weight:850;line-height:1.1;text-transform:uppercase}
#dashboard-view .risk-indicator strong{grid-column:1;margin:0;font-size:1.15rem;letter-spacing:-.02em}
#dashboard-view .risk-indicator #project-risk-detail{grid-column:1;color:var(--muted);font-size:.88rem}
#dashboard-view .risk-action{grid-column:1/-1;padding-top:9px;border-top:1px solid #ffffff18;color:var(--text);font-size:.82rem;font-weight:750}
#dashboard-view .risk-red .risk-state{color:var(--red);background:#f77d7d14}
#dashboard-view .risk-orange .risk-state{color:var(--yellow);background:#f4c86f14}
#dashboard-view .risk-green .risk-state{color:var(--green);background:#31d3a414}
#dashboard-view .cards{grid-template-columns:repeat(3,minmax(0,1fr));gap:0;border:1px solid var(--roster-line);border-radius:14px;overflow:hidden;background:#0b1b2c}
#dashboard-view .cards article{min-height:98px;padding:17px 16px;border:0;border-right:1px solid var(--roster-line);border-bottom:1px solid var(--roster-line);border-radius:0;background:transparent;box-shadow:none}
#dashboard-view .cards article:nth-child(3n){border-right:0}
#dashboard-view .cards article:nth-child(n+4){border-bottom:0}
#dashboard-view .cards article:last-child{border-right:0}
#dashboard-view .cards article small{font-size:.73rem;line-height:1.3}
#dashboard-view .cards article strong{font-size:1.65rem;letter-spacing:-.03em;font-variant-numeric:tabular-nums}
#dashboard-view .schedule-panel{box-shadow:none}
.primary{background:var(--blue);box-shadow:none}
.primary:hover{background:#8bc8ff}
.primary:active,.secondary:active,.nav:active{transform:translateY(1px)}
/* Global professional system: calm surfaces, consistent rhythm, semantic emphasis. */
:root{
	--surface-0:#06111d;--surface-1:#0b1b2c;--surface-2:#102235;--surface-3:#142b43;
	--text:#edf5ff;--muted:#9fb3c9;--blue:#72b9ff;--blue-strong:#3c8ef7;
	--green:#31d3a4;--yellow:#f4c86f;--red:#f77d7d;--focus:#9bd5ff;
	--border-soft:#ffffff14;--border-strong:#ffffff22;--roster-line:#ffffff12;
	--radius-control:11px;--radius-card:14px;--radius-panel:16px;--radius-modal:18px;
	--shadow-panel:0 18px 44px #0000002e;--shadow-drawer:-24px 0 70px #0008;
	--content-width:1500px;
}
html{background:var(--surface-0);color-scheme:dark;scroll-behavior:smooth}
body{min-width:320px;background:linear-gradient(180deg,var(--surface-0),#071522 62%,#06111d);font-size:16px;line-height:1.45;letter-spacing:-.005em}
main{width:min(100%,var(--content-width));padding:28px 32px}
.sidebar{background:#071321f2;border-right:1px solid var(--border-soft);box-shadow:12px 0 36px #00000012}
.sidebar .brand{padding-bottom:10px}
.brand-mark{background:var(--blue);box-shadow:0 8px 20px #72b9ff26}
header{border-color:var(--border-soft);background:#0b1b2ce6;box-shadow:0 12px 28px #0000001a}
header h1{font-size:clamp(1.45rem,2vw,2rem);letter-spacing:-.035em}
h2{letter-spacing:-.035em}
.section-head{gap:24px}
.section-head>span{color:var(--muted);font-size:.8rem}
.hero,.panel,.cards article{box-shadow:var(--shadow-panel)}
.panel,.hero{border-color:var(--border-soft)}
.list-item{border-color:var(--border-soft);box-shadow:none}
.list-item strong{line-height:1.3}
label{font-size:.82rem;line-height:1.35}
input,select,textarea{border-color:var(--border-soft);border-radius:var(--radius-control)}
input:hover,select:hover,textarea:hover{border-color:var(--border-strong)}
.primary,.secondary{border-radius:var(--radius-control);font-size:.9rem;letter-spacing:.005em}
.primary{background:var(--blue);color:#061522;box-shadow:none}
.primary:hover{background:#8bc8ff}
.secondary{background:#ffffff09;border-color:var(--border-strong)}
.secondary:hover{background:#ffffff12;border-color:#72b9ff55}
.nav-group{color:#a9d6f8}
.status{background:#31d3a412;color:var(--green);border:1px solid #31d3a466}
.metric{font-variant-numeric:tabular-nums}
.cards article strong,.worker-detail-summary strong,.worker-roster-table td strong{font-variant-numeric:tabular-nums}
.error[role=alert]{font-size:.84rem}
.toast{border-radius:var(--radius-control);box-shadow:var(--shadow-panel)}
.view.active{animation:fadeIn .18s cubic-bezier(.16,1,.3,1)}
/* Worker-owned profile photo: manager forms never edit worker avatars. */
#user-form .image-field,#user-edit-form .image-field{display:none!important}
.worker-profile-panel{display:grid;gap:16px;margin-top:14px;padding:18px;background:linear-gradient(135deg,#102b43,#0b1b2c);border-color:#72b9ff35}
.worker-profile-heading{display:flex;align-items:center;gap:13px}
.worker-profile-heading h3{margin:3px 0 4px}
.worker-profile-heading p{margin:0;color:var(--muted);font-size:.86rem}
.worker-avatar--profile{width:64px;height:64px;border-radius:16px;font-size:1rem}
.worker-profile-actions{display:flex;gap:9px;flex-wrap:wrap}
.worker-profile-actions .file-trigger{margin:0;min-height:44px}
.worker-profile-status{display:block;min-height:20px}
.worker-profile-status[data-state="loading"]{color:var(--yellow)}
.worker-profile-status[data-state="success"]{color:var(--green)}
.worker-profile-status[data-state="error"]{color:var(--red)}
/* Identity: company branding, worker recognition, chantier assignment matrix */
:root{--identity-surface:#ffffff05;--identity-border:#ffffff12;--identity-fallback:#102b44;--identity-initials:#bde0ff;--assignment-cell-size:48px;--company-drawer-width:min(480px,100vw)}
.company-identity-strip{display:flex;align-items:center;gap:10px;padding:10px;margin:-4px 0 4px;border:1px solid var(--identity-border);border-radius:12px;background:var(--identity-surface)}
.company-identity-copy{display:grid;gap:1px;min-width:0;flex:1}
.company-identity-copy strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.86rem}
.company-identity-copy small{font-size:.68rem}
#company-identity-strip{gap:7px;padding:6px 8px;margin:-2px 0 2px}
#company-identity-strip .identity-logo{width:24px;height:24px;font-size:.56rem}
#company-identity-strip .company-identity-copy strong{font-size:.76rem}
#company-identity-strip .company-identity-copy small{font-size:.6rem}
#company-identity-strip .icon-button{width:24px;height:24px;font-size:.78rem}
.icon-button{flex:none;width:32px;height:32px;padding:0;border:1px solid var(--identity-border);border-radius:8px;background:transparent;color:var(--muted);font-size:.95rem;cursor:pointer;transition:background .15s ease,border-color .15s ease,color .15s ease}
.icon-button:hover,.icon-button:focus-visible{border-color:#72b9ff66;background:#72b9ff12;color:var(--text)}
.login-company-preview{display:flex;align-items:center;gap:10px;padding:9px 10px;margin-top:-2px;border:1px solid var(--identity-border);border-radius:11px;background:var(--identity-surface)}
.login-company-preview strong{display:block;font-size:.85rem}
.login-company-preview small{font-size:.7rem}
.identity-logo,.worker-avatar{display:inline-flex;align-items:center;justify-content:center;flex:none;overflow:hidden;font-weight:850;letter-spacing:.02em;text-transform:uppercase;background:var(--identity-fallback);color:var(--identity-initials)}
.identity-logo img,.worker-avatar img{width:100%;height:100%;object-fit:cover;display:block}
.identity-logo{width:34px;height:34px;border-radius:8px;border:1px solid var(--identity-border);font-size:.68rem}
.identity-logo--login{width:32px;height:32px;font-size:.66rem}
.identity-logo--form{width:72px;height:72px;font-size:1.1rem;border-radius:12px}
.worker-avatar{width:30px;height:30px;border-radius:50%;border:1px solid #9bd5ff24;font-size:.62rem}
.worker-avatar--drawer{width:44px;height:44px;font-size:.78rem}
.worker-avatar--form{width:72px;height:72px;font-size:1.1rem}
.worker-detail-heading{display:flex;align-items:flex-start;gap:12px;min-width:0}
.image-field{display:grid;gap:8px;padding:14px;border:1px solid var(--roster-line);border-radius:12px;background:#ffffff04}
.image-field-label{display:flex;align-items:center;gap:6px;color:var(--text);font-size:.82rem;font-weight:800}
.image-field-label small{color:var(--muted);font-weight:700;text-transform:none}
.image-field-row{display:flex;align-items:center;gap:12px}
.image-field-actions{display:flex;gap:8px;flex-wrap:wrap}
.file-trigger{display:inline-flex;align-items:center;justify-content:center;min-height:42px;padding:0 14px;margin:0;cursor:pointer}
.assignment-card{width:100%;max-width:1100px}
.assignment-search-field{color:var(--muted);font-size:.78rem;font-weight:800}
.assignment-search-field input{margin-top:5px;min-height:44px}
.assignment-scroll{overflow:auto;border:1px solid var(--roster-line);border-radius:14px}
.assignment-table{width:100%;border-collapse:collapse;min-width:520px}
.assignment-table th,.assignment-table td{padding:9px 10px;border-bottom:1px solid var(--roster-line);text-align:center;vertical-align:middle}
.assignment-table thead th{position:sticky;top:0;background:#071522;color:var(--roster-header);font-size:.68rem;font-weight:850;text-transform:uppercase;letter-spacing:.05em;white-space:nowrap}
.assignment-table tbody th{position:sticky;left:0;z-index:2;background:#0c2032;text-align:left;display:flex;align-items:center;gap:8px;white-space:nowrap}
.assignment-table thead th:first-child{position:sticky;left:0;z-index:3;text-align:left}
.assignment-cell{width:var(--assignment-cell-size);height:var(--assignment-cell-size);display:inline-flex;align-items:center;justify-content:center;padding:0;border:1px solid #ffffff24;border-radius:8px;background:transparent;cursor:pointer;transition:border-color .12s ease}
.assignment-cell:hover,.assignment-cell:focus-visible{border-color:#72b9ff66}
.assignment-cell span{width:12px;height:12px;border-radius:50%}
.assignment-cell--assigned{border-color:var(--status-good)}
.assignment-cell--assigned span{background:var(--status-good)}
.assignment-savebar{position:sticky;bottom:0;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;margin-top:4px;border:1px solid #9bd5ff35;border-radius:12px;background:#0d2033;box-shadow:0 -12px 28px #0006}
.assignment-savebar>div{display:flex;gap:8px}
.worker-assignment-toggle{white-space:nowrap}
@media(max-width:850px){.company-identity-strip{margin:-2px 0 6px}.assignment-card{width:100%;padding:18px 15px}.assignment-table tbody th{min-width:140px}.assignment-savebar{flex-direction:column;align-items:stretch}.assignment-savebar>div{justify-content:stretch}.assignment-savebar>div button{flex:1}}
@media(max-width:850px){
	#dashboard-view .hero{padding:16px 16px 14px}
	#dashboard-view .hero h2{font-size:clamp(.95rem,3.2vw,1.15rem)}
	#dashboard-view .risk-indicator{grid-template-columns:1fr;gap:7px;padding:16px 17px}
	#dashboard-view .risk-indicator strong,#dashboard-view .risk-indicator #project-risk-detail{grid-column:1}
	#dashboard-view .risk-action{grid-column:1;margin-top:3px}
	#dashboard-view .cards{grid-template-columns:repeat(2,minmax(0,1fr));border-radius:14px}
	#dashboard-view .cards article{min-height:82px;padding:14px 13px}
	#dashboard-view .cards article:nth-child(2n){border-right:0}
	#dashboard-view .cards article:nth-child(n+5){border-bottom:0}
}
.list{display:grid;gap:10px}
.list-item{padding:16px 18px;transition:border-color .15s ease,background .15s ease,transform .1s ease}
.list-item:has(button,a):hover{transform:translateY(-1px)}
.list-item strong{font-size:.93rem;letter-spacing:-.01em}
.list-item small{color:var(--muted);font-size:.78rem;line-height:1.5}
.worker-roster-table thead th{border-bottom:2px solid var(--roster-line);padding:0}
.sort-header{display:inline-flex;align-items:center;gap:5px;width:100%;padding:13px 12px;border:0;background:transparent;color:inherit;font:inherit;text-transform:inherit;letter-spacing:inherit;text-align:inherit;cursor:pointer}
.numeric-heading .sort-header{justify-content:flex-end}
.sort-header:hover{color:var(--text)}
.sort-header::after{content:'';width:0;height:0;border-left:4px solid transparent;border-right:4px solid transparent;border-bottom:5px solid currentColor;opacity:.35;transition:opacity .15s,transform .15s}
.sort-header.active::after{opacity:1}
.sort-header[aria-sort="descending"]::after{transform:rotate(180deg)}
.worker-roster-table tbody tr:hover{background:#72b9ff0f}
.detail-list-item{transition:border-color .15s ease}
.detail-list-item:hover{border-color:#72b9ff40}
button[disabled],button[aria-busy="true"]{cursor:not-allowed;opacity:.6}
.time-entries-scroll{overflow-x:auto;margin-top:8px}
.time-entries-table{width:100%;min-width:640px;border-collapse:collapse;font-size:.8rem}
.time-entries-table th,.time-entries-table td{padding:9px 10px;border-bottom:1px solid var(--roster-line,#ffffff14);text-align:left;vertical-align:middle;white-space:nowrap}
.time-entries-table thead th{color:var(--muted);font-size:.66rem;font-weight:850;letter-spacing:.06em;text-transform:uppercase}
.time-entries-table tbody tr:last-child td{border-bottom:0}
.time-entries-table tbody tr:hover{background:#72b9ff08}
.entry-status-pill{display:inline-block;padding:3px 8px;border-radius:999px;border:1px solid currentColor;font-size:.68rem;font-weight:800}
.entry-status-approved{color:var(--green)}
.entry-status-pending{color:var(--yellow)}
.entry-status-rejected{color:var(--red)}
.time-entries-table .time-entry-actions{display:flex;gap:6px;flex-wrap:wrap}
.time-entries-table .time-entry-actions button{min-height:34px;padding:5px 8px;font-size:.72rem}
.chat-recipient-field{margin-bottom:10px}
.chat-thread{display:flex;flex-direction:column;gap:8px;max-height:360px;min-height:120px;overflow-y:auto;padding:12px;border:1px solid var(--roster-line,#ffffff14);border-radius:14px;background:#071522}
.chat-empty{align-self:center;margin:auto;color:var(--muted)}
.chat-bubble-row{display:flex;align-items:flex-end;gap:6px;max-width:88%}
.chat-bubble-row.received{align-self:flex-start}
.chat-bubble-row.sent{align-self:flex-end;flex-direction:row-reverse}
.chat-avatar{width:26px;height:26px;font-size:.56rem}
.chat-bubble{min-width:0;padding:8px 11px;border-radius:14px;font-size:.85rem;line-height:1.4}
.chat-bubble.received{border-bottom-left-radius:4px;background:#16324a;color:var(--text)}
.chat-bubble.sent{border-bottom-right-radius:4px;background:#1c5f8a;color:#eaf6ff}
.chat-bubble-text{white-space:pre-wrap;word-break:break-word}
.chat-bubble-meta{display:flex;align-items:center;justify-content:flex-end;gap:6px;margin-top:4px}
.chat-bubble-meta small{color:#ffffffa8;font-size:.66rem}
.chat-ticks{font-size:.72rem;letter-spacing:-1px;color:#ffffff80}
.chat-ticks.read{color:#53b7ff}
.chat-delete{border:0;background:transparent;color:#ffffff90;font-size:.75rem;line-height:1;padding:2px 4px;cursor:pointer}
.chat-delete:hover{color:#fff}
.production-summary-card{display:grid;gap:5px;padding:14px 16px;border:1px solid #72b9ff2e;border-radius:14px;background:#72b9ff0b}
.production-summary-card strong{font-size:1.02rem}
.production-summary-card span{color:var(--text);font-size:.85rem}
.production-summary-card small{color:var(--muted)}
.production-report-list{display:grid;gap:8px}
.production-report-row{padding:10px 12px;border:1px solid var(--roster-line,#ffffff14);border-radius:12px;background:#ffffff04}
.production-report-main{display:flex;align-items:center;justify-content:space-between;gap:10px}
.production-report-row>small{display:block;margin-top:3px;color:var(--muted)}
.production-report-meta{display:flex;flex-wrap:wrap;gap:8px;margin-top:6px;font-size:.78rem;color:var(--text)}
.production-method-tag{padding:2px 7px;border:1px solid #9bd5ff35;border-radius:999px;color:var(--blue);font-size:.68rem;font-weight:800}
.duplicate-tag{border-color:#f4c86f66;color:var(--yellow);margin-left:8px}
.plan-type-existant-tag{border-color:#f77d7d66;color:var(--red);margin-left:8px}
.ai-badge{padding:8px 12px;border:1px solid #f77d7d66;border-radius:10px;background:#f77d7d14;color:var(--red);font-size:.82rem;font-weight:600;margin-bottom:10px}
.ai-confirm-field{display:flex!important;flex-direction:row;align-items:flex-start;gap:8px;padding:10px 12px;border:1px solid #f77d7d66;border-radius:10px;background:#f77d7d14;color:var(--red);font-size:.82rem;font-weight:600}
.ai-confirm-field input{width:auto;margin-top:2px}
.dxf-analyze-section{display:flex;flex-direction:column;gap:12px;overflow-y:auto}
#dxf-analyze-modal [role="tablist"] button[aria-pressed="true"]{background:#72b9ff22;border-color:#72b9ff66;color:var(--text)}
.plan-type-nouveau-tag{border-color:#31d3a466;color:var(--green);margin-left:8px}
.budget-line-items-detail{margin-top:10px;padding:10px 12px;border:1px solid var(--roster-line,#ffffff14);border-radius:12px;background:#ffffff04}
.budget-line-items-detail summary{cursor:pointer;font-weight:800;font-size:.84rem}
.budget-line-items-category{margin-top:10px}
.budget-line-items-category>strong{display:block;font-size:.72rem;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);margin-bottom:4px}
.budget-line-item-row{display:grid;grid-template-columns:1fr auto auto auto;gap:10px;padding:5px 0;font-size:.82rem;border-top:1px solid var(--roster-line,#ffffff0f)}
.budget-line-item-row:first-child{border-top:0}
.budget-line-item-row>span:not(:first-child){text-align:right;color:var(--muted);font-variant-numeric:tabular-nums}
.production-method-ar{border-color:#31d3a466;color:var(--green)}
.production-method-photo{border-color:#f4c86f66;color:var(--yellow)}
.production-method-ai{border-color:#f77d7d66;color:var(--red)}
.production-method-manual{border-color:#9bd5ff35;color:var(--blue)}
.production-report-actions{display:flex;gap:6px;margin-top:8px}
.production-report-actions button{min-height:34px;padding:5px 10px;font-size:.75rem}
::selection{background:#72b9ff4a;color:#fff}
::-webkit-scrollbar{width:10px;height:10px}
::-webkit-scrollbar-track{background:transparent}
::-webkit-scrollbar-thumb{background:#72b9ff30;border-radius:999px;border:2px solid transparent;background-clip:padding-box}
::-webkit-scrollbar-thumb:hover{background:#72b9ff55;background-clip:padding-box}
.view.active{animation:viewFadeIn .25s ease}
@keyframes viewFadeIn{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
.nav,.nav-sub{position:relative;transition:transform .15s ease,background .15s ease,color .15s ease}
.nav.active,.nav-sub.active{font-weight:800}
.nav.active::before{content:'';position:absolute;left:-2px;top:50%;transform:translateY(-50%);width:3px;height:60%;border-radius:999px;background:linear-gradient(180deg,var(--blue),#3c8ef7)}
.brand-mark{box-shadow:0 8px 20px #3c8ef755}
h1,h2,h3{letter-spacing:-.01em}
.hero h2{background:linear-gradient(135deg,var(--text) 40%,#9bd5ff);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}
.hero,.panel,article,.login-card{transition:border-color .2s ease,box-shadow .2s ease}
.list-item,.cards article,article.list-item{transition:transform .15s ease,border-color .15s ease,box-shadow .15s ease}
.list-item:hover{transform:translateY(-2px);border-color:#72b9ff3a;box-shadow:0 10px 24px #0006}
.status{transition:background .2s ease}
.primary,.secondary,.nav,button{transition:transform .15s ease,background .15s ease,border-color .15s ease,box-shadow .15s ease,opacity .15s ease}
.primary:active:not(:disabled){transform:scale(.97)}
.secondary:hover{border-color:#72b9ff44;background:#72b9ff10}
.worker-roster-row{transition:background .15s ease}
.worker-status{transition:transform .15s ease}
button.worker-status:hover:not(:disabled){transform:scale(1.04)}
input:focus-visible,select:focus-visible,textarea:focus-visible,button:focus-visible{outline:2px solid #72b9ff88;outline-offset:2px}
.chat-bubble{transition:transform .12s ease}
::placeholder{color:#9fb3c980}
.nav-badge{position:absolute;top:6px;right:8px;min-width:18px;height:18px;padding:0 5px;border-radius:999px;background:var(--red);color:#fff;font-size:.66rem;font-weight:800;display:flex;align-items:center;justify-content:center;box-shadow:0 0 0 2px #071321;animation:navBadgePop .2s ease}
@keyframes navBadgePop{from{transform:scale(.4);opacity:0}to{transform:scale(1);opacity:1}}
body{background:radial-gradient(circle at 15% -10%,#2a5c8a55 0,transparent 45%),radial-gradient(circle at 100% 0,#31d3a422 0,transparent 40%),radial-gradient(circle at 20% 0,#163a59 0,#08131f 32%,#07111d 100%)}
header{position:relative;overflow:hidden;border-color:#72b9ff2a}
header::before{content:'';position:absolute;inset:0 0 auto 0;height:3px;background:linear-gradient(90deg,var(--blue),var(--green),var(--yellow),var(--red))}
.brand-mark{background:linear-gradient(135deg,var(--blue),#7c5cff);box-shadow:0 10px 26px #7c5cff4c}
.hero,.panel,article{border-color:#72b9ff26;box-shadow:0 20px 48px #0006,inset 0 1px 0 #ffffff0a}
.hero{position:relative;overflow:hidden}
.hero::before{content:'';position:absolute;top:-60%;right:-20%;width:60%;height:220%;background:radial-gradient(circle,#72b9ff28 0,transparent 65%);pointer-events:none}
.cards article{position:relative;border-left:3px solid var(--blue)}
.cards article:nth-child(2){border-left-color:var(--green)}
.cards article:nth-child(3){border-left-color:var(--yellow)}
.cards article:nth-child(4){border-left-color:#7c5cff}
.cards article:nth-child(5){border-left-color:var(--red)}
.cards strong{background:linear-gradient(135deg,var(--text),#9bd5ff);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}
.primary{background:linear-gradient(135deg,#8fd0ff,var(--blue) 45%,#3c8ef7);box-shadow:0 14px 32px #3c8ef755;font-weight:800;letter-spacing:.01em}
.secondary{border-color:#72b9ff2e}
.status{border:1px solid #31d3a444;font-weight:800}
.sidebar{border-right-color:#72b9ff1c}
.nav.active,.nav-sub.active{background:linear-gradient(90deg,#72b9ff22,transparent)}
::-webkit-scrollbar-thumb{background:linear-gradient(180deg,var(--blue),#7c5cff)}
@media(max-width:700px){.time-entries-table{min-width:0}.time-entries-table thead{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.time-entries-table,.time-entries-table tbody,.time-entries-table tr,.time-entries-table td{display:block;width:100%}.time-entries-table tr{padding:10px 0;border-bottom:1px solid var(--roster-line,#ffffff14)}.time-entries-table tr:last-child{border-bottom:0}.time-entries-table td{display:grid;grid-template-columns:90px 1fr;gap:8px;padding:4px 0;border:0;white-space:normal}.time-entries-table td::before{content:attr(data-label);color:var(--muted);font-size:.68rem;font-weight:800;text-transform:uppercase}}

@media(max-width:850px){.grid-two > *{min-width:0}.panel{min-width:0}.worker-roster-heading,.worker-roster-panel-head,.worker-add-panel-head{align-items:flex-start;flex-direction:column}.worker-roster-toolbar-actions{width:100%;min-width:0;align-items:stretch;flex-direction:column}.roster-month-field{width:100%;flex:1}.worker-add-toggle{width:100%;min-width:0;flex:1}.roster-control-row{grid-template-columns:1fr}.worker-roster-summary{grid-template-columns:repeat(2,1fr);gap:14px 0}.worker-roster-summary>div{padding:0 12px}.worker-roster-summary>div:nth-child(odd){padding-left:0;border-left:0}.worker-roster-summary>div:nth-child(n+3){padding-top:12px;border-top:1px solid var(--roster-line)}.worker-roster-table{display:block;min-width:0}.worker-roster-table thead{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.worker-roster-table tbody,.worker-roster-table tr,.worker-roster-table th,.worker-roster-table td{display:block;width:100%}.worker-roster-table tr{padding:14px 15px;border-bottom:1px solid var(--roster-line)}.worker-roster-table tr:last-child{border-bottom:0}.worker-roster-table th,.worker-roster-table td{padding:6px 0;border:0;text-align:left}.worker-roster-table th{padding-bottom:10px}.worker-roster-table td{display:grid;grid-template-columns:105px 1fr;align-items:center;gap:8px}.worker-roster-table td::before{content:attr(data-label);color:var(--roster-header);font-size:.7rem;font-weight:850;text-transform:uppercase;letter-spacing:.05em}.worker-roster-table td:nth-child(2),.worker-roster-table td:nth-child(3),.worker-amount{text-align:left}.worker-roster-table td[data-label="Actions"]{display:block;padding-top:10px}.worker-roster-table td[data-label="Actions"]::before{display:none}.worker-name-cell{justify-content:space-between;min-width:0}.worker-detail-primary span{opacity:1;transform:none}.worker-contact,.worker-projects{max-width:none;white-space:normal}.worker-payment-cell{min-width:0}.worker-status-detail{max-width:none;white-space:normal}.worker-row-actions{justify-content:stretch}.worker-row-actions>.worker-detail-action{flex:1}.worker-action-menu{right:0;left:auto}.worker-add-actions{flex-direction:column-reverse}.worker-add-actions button{width:100%}.worker-detail-card{width:100%;padding:18px 15px}.worker-detail-summary{grid-template-columns:repeat(2,1fr)}.worker-detail-summary .detail-summary-amount{grid-column:span 2}.worker-detail-columns{grid-template-columns:1fr}.worker-detail-period{align-items:stretch;flex-direction:column}.worker-detail-period label{max-width:none;width:100%}.worker-detail-period>.worker-status{align-self:flex-start}.worker-detail-calendar .calendar-cell{min-height:46px;padding:5px 2px}.worker-detail-calendar .calendar-rendezvous{font-size:.58rem}.detail-payment-status>div{align-items:flex-start;flex-direction:column}}
@media(max-width:850px),(pointer:coarse){main{padding:10px}.hero{padding:16px}.panel{padding:14px}.grid-two{gap:10px}header{padding:12px}#dashboard-view .hero{padding:14px 12px}#dashboard-view .cards article{padding:10px 9px}.worker-roster-toolbar{padding:12px}.worker-roster-panel-head{padding:12px 12px 10px}.worker-add-panel{padding:12px}.chat-thread{padding:8px;max-height:320px}.chat-bubble-row{max-width:96%}fieldset{padding:12px}.work-calendar{padding:6px;margin:12px 0}.worker-detail-card{padding:12px 6px}.worker-detail-section{padding:8px}.calendar-grid{gap:3px;grid-auto-rows:min-content}.calendar-cell-weekday{display:none}.calendar-icon-btn{display:none}.calendar-cell{min-width:0;height:auto;padding:3px 2px 5px;min-height:62px;font-size:.95rem;gap:2px}.calendar-quick-edit{min-width:0;padding:1px 5px;font-size:.62rem}.calendar-rendezvous{font-size:.58rem}.calendar-add-rdv{font-size:.58rem;padding:1px 5px}.worker-detail-calendar .calendar-cell{padding:3px 2px 5px;min-height:62px;height:auto}}

/* ===== Light professional theme override (appended; does not touch dark rules above) ===== */
html{color-scheme:light}
:root{
	--bg:#f4f6f9;--panel:#ffffff;--panel2:#f8fafc;
	--surface-0:#f4f6f9;--surface-1:#ffffff;--surface-2:#ffffff;--surface-3:#f8fafc;
	--text:#1a2733;--muted:#64748b;
	--blue:#2a2e35;--blue-strong:#15181d;--green:#16a34a;--yellow:#d97706;--red:#dc2626;--focus:#2a2e35;
	--border-soft:#0f172a14;--border-focus:#2a2e35;--border-strong:#0f172a26;--roster-line:#0f172a14;--roster-header:#64748b;
	--shadow-panel:0 18px 44px #0f172a1a;--shadow-drawer:-24px 0 70px #0f172a33;
	--status-critical:#dc2626;--status-critical-bg:#fee2e2;
	--status-attention:#ea580c;--status-attention-bg:#ffedd5;
	--status-pending:#d97706;--status-pending-bg:#fef3c7;
	--status-good:#16a34a;--status-good-bg:#dcfce7;
	--identity-surface:#f8fafc;--identity-border:#0f172a14;--identity-fallback:#dbeafe;--identity-initials:#15181d;
}
body{background:#F3F4F6;color:var(--text)}
.sidebar{background:#ffffffe8;border-right-color:#0f172a12;box-shadow:12px 0 36px #0f172a0d}
header{background:linear-gradient(135deg,#ffffffe8,#ffffffcc);border-color:#0f172a10;box-shadow:0 12px 28px #0f172a12}
header::before{opacity:.85}
.mobile-nav-toggle{background:#ffffffee;color:var(--text);border-color:#2a2e3555;box-shadow:0 12px 30px #0f172a1f}
.mobile-nav-backdrop{background:#0f172acc}
.nav-group{color:var(--blue)}
.nav:hover,.nav-sub:hover{background:#2a2e3514;color:var(--text)}
.nav.active,.nav-sub.active{background:linear-gradient(90deg,#2a2e351a,transparent);border-color:#2a2e3533;color:var(--text)}
.nav.active::before{background:linear-gradient(180deg,var(--blue),var(--blue-strong))}
.nav-badge{box-shadow:0 0 0 2px #ffffff}
.hero,#dashboard-view .hero{background:#fff}
.hero,.panel,article{background:#ffffff;border-color:var(--border-soft);box-shadow:0 10px 28px #0f172a12,inset 0 1px 0 #ffffff}
.hero::before{display:none}
#dashboard-view .hero small{color:var(--blue)}
.hero h2,.cards strong,.site-progress-label{background:linear-gradient(135deg,var(--text) 40%,var(--blue));-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}
#dashboard-view .cards{background:#ffffff}
.risk-indicator{border-color:#d9770666;background:#fef3c7}
.risk-indicator.risk-red{border-color:#dc262666;background:#fee2e2}
.risk-indicator.risk-orange{border-color:#d9770666;background:#fef3c7}
.risk-indicator.risk-green{border-color:#16a34a66;background:#dcfce7}
#dashboard-view .risk-red .risk-state{background:#fee2e2}
#dashboard-view .risk-orange .risk-state{background:#fef3c7}
#dashboard-view .risk-green .risk-state{background:#dcfce7}
#dashboard-view .risk-action{border-top-color:#0f172a18}
.cards article:nth-child(4){border-left-color:#6d43e0}
input,select,textarea{background:#ffffff;color:var(--text)}
input:focus,select:focus,textarea:focus{outline-color:#2a2e3566;border-color:#2a2e3566}
.login-card{background:#ffffff}
.login-card input,.login-card select{background:#f8fafc;border-color:#0f172a1a}
.login-card input:focus,.login-card select:focus{box-shadow:0 0 0 4px #2a2e3518}
.login-card button[aria-busy=true]::after{border-color:#ffffff55;border-top-color:#ffffff}
.modal .login-card{background:#ffffff}
.modal .login-card::-webkit-scrollbar-thumb{background:#2a2e3545}
.error[role=alert]{background:#fee2e2;color:#991b1b;border-color:#dc262655}
.primary{background:linear-gradient(135deg,#5b8def,var(--blue) 55%,var(--blue-strong));color:#ffffff;box-shadow:0 14px 32px #2a2e353a}
.primary:hover{filter:brightness(.94)}
.secondary{background:#0f172a08;border-color:var(--border-strong);color:var(--text)}
.secondary:hover{background:#0f172a12;border-color:#2a2e3555}
.toast{background:#f0fdf4;color:#065f46;border-color:#16a34a55;box-shadow:var(--shadow-panel)}
.status{background:#dcfce7;color:#166534;border-color:#16a34a55}
.system-status-bar span{border-color:#0f172a14;background:#f8fafc}
.system-status-bar .online{border-color:#16a34a66;background:#dcfce7}
.system-status-bar .offline{border-color:#dc262666;background:#fee2e2}
.list-item{background:#ffffff;border-color:var(--border-soft)}
.list-item:has(button,a):hover{border-color:#2a2e3555;background:#2a2e350d}
.list-item:hover{border-color:#2a2e353a;box-shadow:0 10px 24px #0f172a1a}
#budget-summary .list-item,#documents .list-item,#users .list-item,#messages .list-item,#time-entries .list-item{border-left-color:var(--blue)}
.quick-workers-group,.chantier-controls-details{background:#f8fafc}
.quick-worker-form{background:linear-gradient(180deg,#eff6ff,#f8fafc);border-color:#2a2e3526}
.user-row{background:linear-gradient(180deg,#ffffff,#f8fafc)}
.user-row-actions .danger{border-color:#dc262655;color:#991b1b;background:#fef2f2}
.user-row-actions .danger:hover{background:#fee2e2}
.user-empty{border-color:#2a2e3544}
.user-edit-summary{background:#eff6ff}
.user-edit-readonly{background:#f8fafc}
.icon-close{background:#0f172a08;border-color:#0f172a20}
.icon-close:hover{border-color:#2a2e3566;background:#2a2e3514}
.quick-edit-popover{background:#ffffff;box-shadow:0 18px 40px #0f172a26;border-color:#2a2e3535}
.quick-edit-actions .danger{background:#fee2e2;color:#991b1b;border-color:#dc262655}
.calendar-cell{background:#f8fafc}
.calendar-cell.weekend{background:#eef2f7}
.calendar-cell.worked{border-color:#16a34a66;background:#dcfce7;color:#166534}
.calendar-cell.worked.entry-pending{border-color:#d9770688;background:#fef3c7;color:#92400e}
.calendar-cell.worked.entry-rejected{border-color:#dc262688;background:#fee2e2;color:#991b1b}
.calendar-cell.has-rendezvous{border-color:#d9770699;background:#fef3c7}
.calendar-cell.has-rendezvous.worked{background:linear-gradient(135deg,#dcfce7,#fef3c7)}
.calendar-nav-btn,.calendar-nav-today{background:#0f172a08;color:var(--text);border-color:#0f172a1a}
.calendar-nav-btn:hover,.calendar-nav-today:hover:not(:disabled){background:#2a2e351a;border-color:#2a2e3555}
.calendar-icon-btn{background:#0f172a1c}
.calendar-icon-btn:hover{background:#0f172a35}
.calendar-icon-btn.danger{color:#991b1b}
.calendar-icon-btn.danger:hover{background:#dc262633}
.calendar-stat{background:#f8fafc}
.work-calendar{background:#ffffff}
.status-swatch.active{border-color:#1a2733}
.time-live-calculation{background:#fef9e7;border-color:#d9770644}
.time-live-calculation.ready{border-color:#16a34a66;background:#f0fdf4}
.hours-pdf-panel{background:#f0fdf4;border-color:#16a34a33}
.production-panel input[readonly]{border-color:#16a34a66;background:#dcfce7;color:#065f46}
.production-grid fieldset{background:#f8fafc}
.production-summary-card{background:#eff6ff;border-color:#2a2e352e}
.production-report-row{background:#f8fafc}
.production-live-calc,.time-year-summary{background:#f0fdf4;border-color:#16a34a44}
.project-switcher{background:transparent!important;color:var(--muted);border:0!important;padding:0;box-shadow:none}
.project-switcher select{background:#fff;border:1px solid var(--border-soft);border-radius:6px;padding:8px 12px;color:var(--text);font-weight:500}

/* No gradient-tinted or heavy-shadow sub-boxes anywhere - every secondary container uses the same
   flat card style as .panel/.kpi (plain white, one thin hairline border, no shadow), instead of the
   mix of colored-gradient/shadowed boxes left over from the old dark theme. */
.quick-worker-form,.worker-month-summary,.production-grid fieldset,.worker-roster-toolbar,.worker-roster-panel,.worker-add-panel,.worker-detail-section,.detail-payment-status,.detail-list-item,.user-row,.chantier-progress,.work-calendar{
	background:#fff!important;border:1px solid var(--border-soft)!important;box-shadow:none!important;background-image:none!important
}
.worker-detail-summary{background:var(--border-soft)!important;box-shadow:none!important}
.worker-detail-summary>div{background:#fff!important}
.time-live-calculation,.time-year-summary,.hours-pdf-panel,.production-live-calc,.auto-analysis-answer,.auto-analysis-confirm-notice,.document-explanation,.quick-workers-group,.chantier-controls-details,.time-month-group,.production-summary-card,.ai-confirm-field{background:transparent!important;border:0!important;padding-left:0!important;padding-right:0!important}
.chat-thread{background:#f8fafc}
.chat-bubble.received{background:#eef2f7;color:var(--text)}
.chat-bubble.sent{background:var(--blue);color:#ffffff}
.chat-bubble-row.received .chat-bubble-meta small,.chat-bubble-row.received .chat-ticks,.chat-bubble-row.received .chat-delete{color:#64748b}
.chat-bubble-row.sent .chat-bubble-meta small,.chat-bubble-row.sent .chat-ticks,.chat-bubble-row.sent .chat-delete{color:#ffffffb0}
.chat-bubble-row.sent .chat-ticks.read{color:#ffffff}
.chat-bubble-row.sent .chat-delete:hover{color:#ffffff}
.chat-bubble-row.received .chat-delete:hover{color:#1a2733}
.worker-roster-table thead th,.assignment-table thead th{background:#f8fafc}
.worker-roster-table tbody tr:hover{background:#2a2e350d}
.worker-detail-summary>div{background:#f8fafc}
.worker-action-menu{background:#ffffff;box-shadow:0 18px 40px #0f172a26;border-color:#2a2e3535}
.worker-action-menu button:hover,.worker-action-menu button:focus-visible{background:#2a2e3514}
.worker-action-menu button.danger{color:#dc2626}
.worker-detail-card{background:#ffffff}
.worker-profile-panel{background:#ffffff;border-color:var(--border-soft)}
.assignment-savebar{background:#ffffff;box-shadow:0 -12px 28px #0f172a1f;border-color:#2a2e3535}
.assignment-table tbody th{background:#ffffff}
.assignment-cell{border-color:#0f172a1a}
.assignment-cell:hover,.assignment-cell:focus-visible{border-color:#2a2e3566}
.worker-avatar{border-color:#2a2e3524}
.image-field{background:#f8fafc}
.detail-payment-status{background:#f8fafc}
.detail-list-item{background:#f8fafc}
.detail-list-item:hover{border-color:#2a2e3540}
.production-method-tag{border-color:#2a2e3535}
.status-critical{color:var(--status-critical)}.status-attention{color:var(--status-attention)}.status-pending{color:var(--status-pending)}.status-good{color:var(--status-good)}
.auto-analysis-answer{background:#f0fdf4;border-color:#16a34a44}
.document-explanation{background:#f0fdf4;border-color:#16a34a44}
.auto-analysis-image-grid img{border-color:#0f172a18}
.document-thumb{background:#0f172a08;border-color:#0f172a18}
::selection{background:#2a2e3533;color:#0f172a}
::-webkit-scrollbar-thumb{background:#0f172a26}
::-webkit-scrollbar-thumb:hover{background:#0f172a40}
::placeholder{color:#94a3b880}

/* ===== Weather-per-chantier widget ===== */
.weather-strip{margin-bottom:18px}
.weather-days{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin-top:12px}
.weather-day{display:grid;justify-items:center;gap:4px;padding:12px 8px;border:1px solid var(--border-soft);border-radius:12px;background:#f8fafc;text-align:center}
.weather-day-name{font-size:.7rem;font-weight:800;text-transform:uppercase;letter-spacing:.04em;color:var(--muted)}
.weather-day-icon{font-size:1.6rem;line-height:1}
.weather-day-temps{font-size:.85rem;font-weight:800}
.weather-day-temps small{color:var(--muted);font-weight:600}
.weather-day-rain{font-size:.68rem;color:var(--blue)}
.chantier-weather-strip{margin-top:14px}
@media(max-width:850px){.weather-days{grid-template-columns:repeat(5,minmax(56px,1fr));overflow-x:auto}}

.status.offline{background:#fef3c7;color:#92400e;border-color:#d9770655}

/* ===== Professional refresh: IBM Plex type, blueprint-inspired palette, dark sidebar ===== */
:root{
	--bg:#eef1f6;--panel:#ffffff;--panel2:#fafbfd;
	--surface-0:#eef1f6;--surface-1:#ffffff;--surface-2:#ffffff;--surface-3:#fafbfd;
	--text:#1c2530;--muted:#48566d;
	--blue:#2454d1;--blue-strong:#173a99;--green:#1a8754;--yellow:#c2620a;--red:#c53030;--focus:#2454d1;
	--border-soft:#dde3ec;--border-focus:#2454d1;--border-strong:#c9d2df;--roster-line:#e8edf3;--roster-header:#8a97ac;
	--shadow-panel:0 1px 2px #1c25300c,0 10px 28px #1c253012;--shadow-drawer:-24px 0 70px #1c253026;
	--status-critical:#c53030;--status-critical-bg:#fbeaea;
	--status-attention:#c2620a;--status-attention-bg:#fbeee0;
	--status-pending:#c2620a;--status-pending-bg:#fbeee0;
	--status-good:#1a8754;--status-good-bg:#e6f4ec;
	--identity-surface:#fafbfd;--identity-border:#dde3ec;--identity-fallback:#dfe9fb;--identity-initials:#173a99;
}
body{font-family:"IBM Plex Sans",Inter,Segoe UI,sans-serif}
h1,h2,h3,.primary,.secondary,.nav,.nav-sub{font-family:"IBM Plex Sans",Inter,Segoe UI,sans-serif}
#progress-value,#site-progress-value,#open-controls,#total-hours,#payroll-total,#budget-remaining,
.cards strong,.worker-roster-table td strong,.worker-amount,.metric,.status-swatches ~ *,
.time-live-calculation strong,.detail-summary-amount strong,.worker-roster-summary dd,
.worker-detail-summary strong,.production-live-calc,#time-summary,.chantier-progress-label,
.site-progress-label,#hero-progress-bar,.weather-day-temps{font-family:"IBM Plex Mono",monospace;font-variant-numeric:tabular-nums}

/* Sidebar: dark, matches the mockup's app-shell */
.sidebar{background:#141b2b;border-right-color:transparent;box-shadow:4px 0 24px #1c25301a}
.sidebar .brand{border-bottom-color:#ffffff16}
.sidebar .brand strong{color:#ffffff}
.company-identity-strip{background:#ffffff0d;border-color:#ffffff16}
.company-identity-strip strong{color:#ffffff}
.company-identity-strip small{color:#8a97ac}
#company-identity-edit{color:#8a97ac}
#company-identity-edit:hover{color:#ffffff;background:#ffffff14}
.nav-group{color:#5f6d87}
.nav,.nav-sub{color:#aab5c9;display:flex;align-items:center;gap:10px}
.nav-icon{width:16px;height:16px;flex:none;opacity:.85}
.nav:hover,.nav-sub:hover{background:#ffffff0d;color:#dfe5f0}
.nav.active,.nav-sub.active{background:#5b8def29;color:#ffffff;border-color:transparent}
.nav.active .nav-icon{opacity:1;color:#5b8def}
.nav.active::before{background:linear-gradient(180deg,var(--blue),#5b8def)}
#logout-button{background:#ffffff0d;border-color:#ffffff1c;color:#dfe5f0}
#logout-button:hover{background:#ffffff16;border-color:#ffffff2c}
.mobile-nav-toggle{background:#141b2bee;color:#fff;border-color:#5b8def55}

/* KPI cards: side stripe + icon */
.cards article{border-left-width:3px;padding:17px 19px}
.kpi-head{display:flex;align-items:center;justify-content:space-between;gap:8px}
.kpi-icon{width:16px;height:16px;opacity:.45;flex:none}
#dashboard-view .cards article:nth-child(1){border-left-color:var(--red)}
#dashboard-view .cards article:nth-child(2){border-left-color:var(--blue)}
#dashboard-view .cards article:nth-child(3){border-left-color:var(--yellow)}
#dashboard-view .cards article:nth-child(4){border-left-color:var(--blue)}
#dashboard-view .cards article:nth-child(5){border-left-color:var(--green)}
#dashboard-view .cards article:nth-child(6){border-left-color:var(--green)}


/* Worker roster: header row + row hover, matches mockup table */
.worker-roster-table thead th{background:var(--panel2);color:var(--roster-header)}
.worker-roster-table tbody tr:hover{background:var(--panel2)}
.worker-avatar{background:linear-gradient(135deg,var(--blue),var(--blue-strong));color:#fff;font-family:"IBM Plex Mono",monospace}
.identity-logo{background:var(--identity-fallback);color:var(--identity-initials)}
.worker-status{font-family:"IBM Plex Sans",sans-serif}
.assignment-table thead th{background:var(--panel2)}

/* Buttons: crisper, less glow */
.primary{background:linear-gradient(135deg,var(--blue),var(--blue-strong));box-shadow:0 10px 24px #2454d13a}
.primary:hover{filter:brightness(1.08)}
.secondary{background:var(--panel);border-color:var(--border-soft);color:var(--text)}
.secondary:hover{border-color:var(--blue);color:var(--blue);background:#eef3fd}
.status{background:var(--status-good-bg);color:#0f5c37;border-color:#1a875444}

::selection{background:#2454d133;color:#0f172a}

/* In-view tabs: each view keeps its own sections one click away, in context, instead of the sidebar
   listing every section as a separate top-level entry. */
.mobile-tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:18px}
.mobile-tab{flex:1;min-width:130px;padding:11px 10px;border-radius:11px;border:1px solid var(--border-soft);background:var(--panel);color:var(--muted);font:inherit;font-weight:700;font-size:.85rem;cursor:pointer}
.mobile-tab.active{background:linear-gradient(135deg,var(--blue),var(--blue-strong));color:#fff;border-color:transparent;box-shadow:0 8px 20px #2454d13a}

/* Labels: a touch more presence (size + color) per feedback */
label{font-size:.86rem;color:#3d5a8a}
.list > small,.list > p{display:block;padding:22px 18px;border:1.5px dashed var(--border-strong);border-radius:12px;text-align:center;color:var(--muted);font-size:.9rem;background:#fafbfd}

/* Refine generic .list-item (documents, purchases, messages fallback, time entries) to match the new system */
.list{gap:10px}
.list-item{padding:14px 16px;border-radius:12px;border-left-width:3px;background:var(--panel);box-shadow:var(--shadow-panel)}
.list-item strong{font-size:.92rem;font-weight:700;color:var(--text);letter-spacing:-.005em}
.list-item small{color:var(--muted);font-size:.79rem;line-height:1.55;margin-top:3px}
.list-item:hover{border-left-color:var(--blue);box-shadow:0 6px 18px #1c25300f}
.list-item .document-actions,.list-item .production-report-actions{margin-top:10px;padding-top:10px;border-top:1px solid var(--border-soft)}
.document-more{position:relative;display:inline-block}
.document-more>summary{list-style:none;cursor:pointer;display:inline-flex;align-items:center;padding:6px 12px;border-radius:999px;border:1px solid var(--border-soft);font-size:.82rem;color:var(--text);background:var(--panel)}
.document-more>summary::-webkit-details-marker{display:none}
.document-more>summary:hover{border-color:#72b9ff55;background:#72b9ff0d}
.document-more[open]>summary{border-color:var(--blue)}
.document-more-menu{position:absolute;z-index:5;top:calc(100% + 6px);right:0;display:flex;flex-direction:column;gap:4px;min-width:200px;padding:8px;border-radius:12px;border:1px solid var(--border-soft);background:var(--panel);box-shadow:var(--shadow-panel)}
.document-more-menu button{justify-self:stretch;text-align:left;width:100%}
.facture-tracking-toggle{margin:6px 0 8px;min-width:0}
.facture-tracking-toggle>summary{list-style:none;cursor:pointer;display:inline-flex;align-items:center;gap:6px;padding:6px 12px;border-radius:999px;border:1px solid var(--border-soft);font-size:.82rem;color:var(--text);background:var(--panel)}
.facture-tracking-toggle>summary::-webkit-details-marker{display:none}
.facture-tracking-toggle>summary:hover{border-color:#72b9ff55;background:#72b9ff0d}
.facture-tracking-toggle[open]>summary{border-color:var(--blue);margin-bottom:4px}
/* A real tracking timeline - connected dots on a line, same idea as an online order's delivery
   steps - not a plain bulleted checklist, which read as an afterthought. Horizontal (left to right,
   earliest to latest), scrolling rather than wrapping: a wrapped flex row would break the connecting
   line between rows, so each step gets a fixed width and the strip scrolls on a narrow phone instead. */
.facture-tracking{list-style:none;margin:14px 2px 2px;padding:2px 2px 6px;display:flex;flex-wrap:nowrap;overflow-x:auto}
.facture-tracking li{position:relative;flex:0 0 108px;padding:16px 6px 0;text-align:center}
.facture-tracking li::before{content:'';position:absolute;top:0;left:50%;transform:translateX(-50%);width:12px;height:12px;border-radius:50%;background:var(--panel);border:2px solid var(--border-soft);box-sizing:border-box;z-index:1}
.facture-tracking li::after{content:'';position:absolute;top:5px;left:calc(50% + 9px);right:calc(-50% + 9px);height:2px;background:var(--border-soft)}
.facture-tracking li:last-child::after{display:none}
.facture-tracking li.tracking-done::before{background:var(--green);border-color:var(--green)}
.facture-tracking li.tracking-done::after{background:var(--green)}
.facture-tracking .tracking-label{display:block;font-size:.76rem;font-weight:600;color:var(--text);line-height:1.25}
.facture-tracking li.tracking-pending .tracking-label{font-weight:500;color:var(--muted)}
.facture-tracking .tracking-date{display:block;font-size:.68rem;color:var(--muted);margin-top:3px}
.document-group h4{color:var(--blue-strong);font-weight:700}

/* Calendar: darker, clearer cells per feedback */
.calendar-cell{background:#eef1f6;border-color:var(--border-soft);color:var(--text)}
.calendar-cell strong{color:var(--text);font-weight:700}
.calendar-cell.weekend{opacity:.72;background:#e4e9f0}
.calendar-cell.empty{background:transparent;border-color:transparent}
.calendar-add-rdv{opacity:.62;border-color:var(--border-strong);color:var(--muted)}
.calendar-cell:hover .calendar-add-rdv,.calendar-add-rdv:hover,.calendar-add-rdv:focus-visible{opacity:1;color:var(--blue);border-color:var(--blue)}
.calendar-cell.worked{border-color:#16a34a;background:#bbf0cf;color:#0d5b32}
.calendar-cell.worked strong{color:#0d5b32}
.calendar-cell.worked.entry-pending{border-color:#c2620a;background:#fce0b0;color:#7a3c05}
.calendar-cell.worked.entry-pending strong{color:#7a3c05}
.calendar-cell.worked.entry-rejected{border-color:#c53030;background:#f7c6c6;color:#7a1d1d}
.calendar-cell.worked.entry-rejected strong{color:#7a1d1d}
.calendar-cell.has-rendezvous{border-color:#c2620a;background:#fce0b0}
.calendar-cell.has-rendezvous strong{color:#7a3c05}
.calendar-cell.has-rendezvous.worked{background:linear-gradient(135deg,#bbf0cf,#fce0b0)}
.calendar-quick-edit{color:inherit;font-weight:800}
.calendar-stat{background:#eef1f6;border-color:var(--border-soft)}
.calendar-stat strong{color:var(--text)}

/* Fix: quick-edit pills (8.0h, +RDV, Absence) inherited a dark overlay meant for the old dark theme — invisible on light cells */
.calendar-quick-edit{background:#ffffffcc;color:currentColor;border-color:currentColor;box-shadow:0 1px 3px #1c253022}
.calendar-quick-edit:hover{background:#ffffff}
.calendar-cell.worked .calendar-quick-edit{color:#0d5b32}
.calendar-cell.worked.entry-pending .calendar-quick-edit{color:#7a3c05}
.calendar-cell.worked.entry-rejected .calendar-quick-edit{color:#7a1d1d}
.calendar-cell.has-rendezvous .calendar-quick-edit{color:#7a3c05}
.calendar-icon-btn{background:#0000001c;color:inherit}
.calendar-icon-btn:hover{background:#00000035}
.calendar-icon-btn.danger{color:#c53030}
.calendar-icon-btn.danger:hover{background:#c5303033}

/* Fix: +RDV/+Absence quick-add pills inherited opacity:.4 from the old dark theme's ghost-button style — nearly invisible on light cells */
.calendar-add-rdv{opacity:.85;border-color:#7a879c;background:#ffffffb3}
.calendar-add-rdv:hover{opacity:1;background:#eef3fd;border-color:var(--blue);color:var(--blue)}

/* Sidebar: neutral graphite gradient */
.sidebar{background:linear-gradient(165deg,#2a2e35,#17191d)}

/* Top header bar: light, matching the approved DashboardClair mockup (was a leftover dark bar) */
header{background:#fff;border:1px solid #E1E6F0;box-shadow:0 1px 2px #1c25300c;position:relative;overflow:hidden}
header::before{display:none}
header #current-role{color:#8A93A6;position:relative}
header #page-title{color:#1C2433;position:relative}
header .status{background:#EEF3FF;color:var(--blue);border-color:#E1E6F0;position:relative}

/* The logo is now a self-contained white SVG badge — drop the leftover .brand-mark blue/purple glow */
.brand-logo{box-shadow:none;background:none}

/* Primary buttons: graphite instead of blue, matching the sidebar/header theme */
.primary{background:linear-gradient(135deg,#3c424b,#1c1f24);box-shadow:0 10px 24px #1c25303a}
.primary:hover{filter:brightness(1.15)}

/* Replace remaining blue accents with graphite: tokens cascade to buttons, KPI text, worker avatars, etc. */
:root{--blue:#2a2e35;--blue-strong:#15181d;--focus:#2a2e35;--border-focus:#2a2e35}
.nav.active,.nav-sub.active{background:#ffffff20;color:#ffffff}
.nav.active .nav-icon{color:#ffffff}
.nav.active::before{background:linear-gradient(180deg,#8a92a0,#4a5058)}
.mobile-nav-toggle{border-color:#ffffff33}
.secondary:hover{background:#eef1f6}
.calendar-add-rdv:hover{background:#eef1f6}
.identity-fallback{background:#e4e7ec}
:root{--identity-fallback:#e4e7ec;--identity-initials:#3c424b}

/* Login card: drop the leftover blue border tint and input focus glow */
.modal .login-card{border-color:#4a505835}
.login-card input:focus,.login-card select:focus{box-shadow:0 0 0 4px #4a505818}
.login-card::-webkit-scrollbar-thumb{background:#4a505845}

/* Calendar: hide +RDV/+Absence quick-add on days that already have an entry, until hovered/focused — declutters cells that were already showing hours or a rendezvous. Uses visibility (not display) so cell height stays constant and the grid doesn't reflow/jump row to row. */
.calendar-cell.worked .calendar-add-rdv,.calendar-cell.has-rendezvous .calendar-add-rdv{visibility:hidden;pointer-events:none}
.calendar-cell.worked:hover .calendar-add-rdv,.calendar-cell.has-rendezvous:hover .calendar-add-rdv,
.calendar-cell.worked:focus-within .calendar-add-rdv,.calendar-cell.has-rendezvous:focus-within .calendar-add-rdv{visibility:visible;pointer-events:auto}

/* Login card: fill the whole screen on narrow phones instead of floating as a small centered card */
@media(max-width:520px){
	#login-modal.modal{padding:0;align-items:stretch}
	#login-modal .login-card{width:100%;max-width:none;height:100%;max-height:none;border-radius:0;box-shadow:none;padding:20px 18px calc(20px + env(safe-area-inset-bottom,0px));padding-top:max(20px,env(safe-area-inset-top,0px))}
}

/* Calendar: mark absence entries in red, distinct from RDV (kept amber) */
.calendar-cell.has-rendezvous .calendar-quick-edit.calendar-absence{color:#c53030}
.calendar-cell.has-absence{border-color:#c53030;background:#fbeaea}
.calendar-cell.has-absence strong{color:#7a1d1d}
.calendar-cell.has-absence.worked{background:linear-gradient(135deg,#bbf0cf,#fbeaea)}

/* Sidebar nav: every item is a flat, direct link to its own page (no category to open first) -
   .nav-sub shares every .nav rule above, it only exists as a separate class so applyRole()/showView()
   keep working unchanged. */
.nav-sub{border:0;font-size:.82rem;font-weight:600;text-align:left;cursor:pointer}

/* Plan measurement tool (calibrated on-screen takeoff): centered wide modal instead of the right drawer
   other worker-detail-* modals use, since the canvas needs horizontal room. The DWG ossature analysis
   modal (#dxf-analyze-modal) shows the same kind of plan-derived content and gets the same full-screen
   treatment, for the same reason - each opens independently from its own button, this only matches how
   much of the screen each gets once open. */
.plan-measure-card,#dxf-analyze-modal .worker-detail-card{display:flex;flex-direction:column;width:100%;max-width:none;height:100dvh;padding:12px 16px}
.plan-measure-toolbar{display:flex;flex-wrap:wrap;gap:10px;align-items:center;padding:10px;border:1px solid var(--border-soft,#ffffff14);border-radius:14px;background:linear-gradient(180deg,#ffffff07,#ffffff02)}
/* Buttons that logically belong together (drawing tools, in-progress-shape controls) are visually packaged
   into one rounded "chip" instead of floating loose in the toolbar row - reads as one coherent tool, not a
   scattered list of buttons. A group with every button currently [hidden] (nothing to show yet) collapses
   away entirely rather than leaving an empty box in the bar. */
.plan-measure-tool-group{display:inline-flex;flex-wrap:wrap;align-items:center;gap:6px;padding:5px;border:1px solid var(--border-soft,#ffffff14);border-radius:11px;background:#00000020}
.plan-measure-tool-group:not(:has(button:not([hidden]))){display:none}
.plan-measure-more{position:relative;display:inline-flex;align-items:center}
/* Was pushing the canvas down by wrapping its 10 buttons inline in the toolbar when opened - floats over
   the plan instead now, same "⋯ Plus" floating-dropdown pattern already used for document-actions, so the
   plan keeps its full height whether the tools panel is open or closed. */
.plan-measure-more-menu{position:absolute;z-index:6;top:calc(100% + 6px);left:0;display:flex;flex-wrap:wrap;gap:6px;align-items:center;width:max(520px,90vw);max-width:80vw;padding:10px;border-radius:12px;border:1px solid var(--border-soft,#ffffff18);background:var(--panel,#102235);box-shadow:0 18px 40px #0008}
.plan-measure-detect-field{display:inline-flex;align-items:center;gap:6px;font-size:.78rem;color:var(--muted)}
.plan-measure-detect-field select{padding:6px 8px;font-size:.82rem;width:auto}
.plan-measure-detect-hint{flex-basis:100%;color:var(--muted);font-size:.74rem;line-height:1.4}
.plan-measure-more summary{display:inline-flex;align-items:center;gap:4px;min-height:44px;padding:11px 14px;border:1px solid var(--border-soft,#ffffff18);border-radius:10px;background:#ffffff08;color:var(--text);font:inherit;font-weight:700;cursor:pointer;list-style:none}
.plan-measure-more summary::-webkit-details-marker{display:none}
.plan-measure-more summary::after{content:'▾';font-size:.7em}
.plan-measure-more[open] summary::after{content:'▴'}
.plan-measure-toolbar button.active{border-color:var(--blue);color:var(--blue)}
.plan-measure-toolbar button[disabled]{opacity:.4;cursor:not-allowed}
.plan-measure-status{margin-left:auto;font-size:.8rem;color:var(--muted);text-align:right}
.plan-measure-zoom{display:flex;align-items:center;gap:4px;padding:5px;border:1px solid var(--border-soft,#ffffff14);border-radius:11px;background:#00000020}
.plan-measure-candidates-actions{display:flex;align-items:center;gap:6px;padding:4px 8px;border:1px solid #f39a4a44;border-radius:8px;background:#f39a4a12;font-size:.78rem;color:var(--text)}
.plan-measure-zoom button{min-width:40px;padding:6px 10px}
#plan-measure-zoom-level{font-size:.8rem;color:var(--muted);min-width:42px;text-align:center}
.plan-measure-info-box{padding:10px 12px;border:1px solid var(--roster-line);border-radius:10px;background:#ffffff05;font-size:.84rem;display:grid;gap:4px}
.plan-measure-info-box strong{font-size:.72rem;text-transform:uppercase;letter-spacing:.06em;color:var(--muted)}
.plan-measure-info-box>div{display:flex;gap:8px;margin-top:4px}
.plan-measure-color-scan-help{display:block;margin:4px 0 8px;color:var(--muted);line-height:1.4}
.plan-measure-color-scan-list{flex-direction:column;gap:6px}
.plan-measure-color-scan-entry{display:flex;align-items:center;gap:8px}
.plan-measure-detail-entry{display:block}
.plan-measure-detail-entry ul{margin:4px 0 0;padding-left:18px}
.plan-measure-color-swatch{width:16px;height:16px;border-radius:4px;border:1px solid var(--roster-line);flex-shrink:0}
.plan-measure-body{display:grid;grid-template-columns:1fr 280px;grid-template-rows:1fr;gap:10px;flex:1;min-height:0}
/* Collapsing the measurements list (📋 Mesures toggle) gives the canvas the full width instead of
   permanently reserving 280px for it - the list itself is just hidden, not removed, so nothing it holds
   (totals, the clear-all button, existing measurements) is lost or needs re-rendering when it reopens. */
.plan-measure-body.list-collapsed{grid-template-columns:1fr}
.plan-measure-body.list-collapsed .plan-measure-list-wrap{display:none}
/* display:flex + margin:auto on the canvas (not justify/align-items:center on the wrap) centers it when it's
   smaller than the available space - e.g. a landscape plan fit to a narrow phone screen, width-bound with
   slack left over in height - without the well-known flex-centering-plus-overflow:auto bug where browsers
   clip the start of scrollable content once it's zoomed past the available space. Same rule, same result on
   phone and desktop: whatever space fitting leaves over is split evenly instead of pinned to one corner. */
.plan-measure-canvas-wrap{position:relative;display:flex;min-height:0;overflow:auto;border:1px solid var(--roster-line);border-radius:12px;background:#0b1b2c}
.plan-measure-magnifier{position:absolute;width:140px;height:140px;border:3px solid var(--blue,#72b9ff);border-radius:50%;box-shadow:0 8px 24px #0008;pointer-events:none;z-index:5;background:#fff}
#plan-measure-canvas{cursor:crosshair;display:block;margin:auto}
.plan-measure-list-wrap{display:grid;gap:10px;align-content:start;overflow:auto}
.plan-measure-totals{display:flex;gap:14px;font-size:.84rem;font-weight:800}
.plan-measure-list .list-item{padding:8px 10px}
.plan-measure-list .list-item>div{display:flex;gap:8px;margin-top:4px}
@media(max-width:850px){.plan-measure-body{grid-template-columns:1fr;grid-template-rows:1fr 130px;gap:8px}.plan-measure-card{height:94dvh;padding:8px}.plan-measure-toolbar{gap:6px;padding:7px}.plan-measure-toolbar button{min-height:38px;padding:7px 9px;font-size:.78rem}.plan-measure-tool-group,.plan-measure-zoom{gap:4px;padding:4px}.plan-measure-status{flex-basis:100%;margin-left:0}#plan-measure-modal .worker-detail-header{padding-bottom:6px;margin-bottom:2px}#plan-measure-modal .worker-detail-header p{display:none}#plan-measure-modal .worker-detail-header h2{font-size:1rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}}

/* Sidebar user-status card + sectioned nav headers (Gestion / Parametres), styled after a mobile
   time-tracking app's slide-out menu: a compact identity card up top with quick account/logout
   pills, then the existing nav regrouped under two labeled sections instead of one flat list. */
/* Replaces the old identity card (icon + name + two pill buttons) that sat above the nav - the name/role
   it showed duplicates the header's "name - role" line, so this is just a plain logout action next to
   "Installer l'application". "Mon compte" already exists as its own nav item under Paramètres. */
.sidebar-logout{display:flex;align-items:center;gap:8px;padding:8px 10px;border:1px solid var(--roster-line,#ffffff14);border-radius:10px;background:#ffffff06;color:var(--text);font-size:.8rem;font-weight:700;cursor:pointer;text-align:left}
.sidebar-logout .nav-icon{width:16px;height:16px}
.sidebar-logout:hover{border-color:#f77d7d4a;color:#ffd5d5;background:#f77d7d0d}
.nav-section{display:flex;flex-direction:column;gap:6px}
.nav-section+.nav-section{margin-top:8px;padding-top:12px;border-top:1px solid var(--roster-line,#ffffff14)}
.nav-section-head{display:flex;align-items:center;gap:8px;margin:2px 4px 2px;color:var(--muted);text-transform:uppercase;letter-spacing:.1em;font-size:.68rem;font-weight:900}
.nav-section-icon{display:grid;place-items:center;flex:none;width:22px;height:22px;border-radius:7px;background:#31d3a41c;color:var(--green)}
.nav-section-icon svg{width:13px;height:13px}
@media(max-width:850px){.sidebar-user-actions{grid-template-columns:1fr 1fr}}

/* Full-screen monthly timesheet (day-by-day list: date, start, end, hours worked, deviation from a
   configurable reference hours/day) for a single worker, opened from the roster table or from inside
   the existing worker-detail drawer. A dedicated full page rather than another side drawer, since the
   point is a focused, scrollable day list with totals pinned at the bottom - not mixed with the
   drawer's other sections (payment, documents, RDV). Reuses deriveWorkerSnapshot for all real numbers;
   the reference-hours field is a local display comparison only, never sent to the server or payroll. */
.worker-timesheet-modal{z-index:80;padding:0;align-items:stretch;justify-content:stretch;background:var(--surface-0,#06111d)}
.worker-timesheet-page{display:flex;flex-direction:column;width:100%;height:100dvh;max-width:900px;margin:0 auto;background:var(--surface-1,#0b1b2c)}
.worker-timesheet-header{display:flex;align-items:flex-start;gap:12px;padding:16px 18px;border-bottom:1px solid var(--roster-line,#ffffff14)}
.worker-timesheet-heading{display:flex;align-items:center;gap:10px;flex:1;min-width:0}
.worker-timesheet-heading h2{margin:2px 0;font-size:1.25rem}
.worker-timesheet-heading p{margin:0;color:var(--muted);font-size:.8rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.worker-timesheet-ref-field{display:grid;gap:3px;color:var(--muted);font-size:.68rem;font-weight:800;text-align:right;flex:none}
.worker-timesheet-ref-field input{width:64px;min-height:36px;padding:6px 8px;text-align:center}
.worker-timesheet-nav{display:flex;align-items:center;justify-content:center;gap:16px;padding:10px 18px;border-bottom:1px solid var(--roster-line,#ffffff14)}
.worker-timesheet-nav strong{min-width:140px;text-align:center;font-size:1rem}
.worker-timesheet-stats{display:flex;gap:0;padding:10px 18px;border-bottom:1px solid var(--roster-line,#ffffff14)}
.worker-timesheet-stats>span{flex:1;display:grid;gap:2px;padding:0 14px;border-left:1px solid var(--roster-line,#ffffff14);text-align:center}
.worker-timesheet-stats>span:first-child{border-left:0}
.worker-timesheet-stats strong{font-size:1.2rem;font-variant-numeric:tabular-nums}
.worker-timesheet-stats small{color:var(--muted);font-size:.68rem;text-transform:uppercase;letter-spacing:.04em}
.worker-timesheet-list{flex:1;overflow-y:auto;padding:4px 10px}
.worker-timesheet-row{display:grid;grid-template-columns:52px 1fr 1fr 1fr 70px;align-items:center;gap:6px;padding:9px 8px;border-bottom:1px solid var(--roster-line,#ffffff0e);font-size:.86rem}
.worker-timesheet-row.weekend{background:#ffffff04}
.worker-timesheet-row.today{background:#72b9ff12;border-radius:8px}
.worker-timesheet-row.worked .wt-hours{color:var(--text);font-weight:800}
.wt-day{display:flex;flex-direction:column;line-height:1.15}
.wt-day strong{font-size:.95rem}
.wt-day small{color:var(--muted);font-size:.68rem;text-transform:uppercase}
.wt-start,.wt-end{color:var(--muted);font-variant-numeric:tabular-nums}
.wt-hours{color:var(--muted);font-variant-numeric:tabular-nums}
.wt-overtime{text-align:right;font-weight:800;font-variant-numeric:tabular-nums;font-size:.78rem;color:var(--muted)}
.wt-overtime.negative{color:var(--red)}
.wt-overtime.positive{color:var(--green)}
.worker-timesheet-footer{display:flex;gap:0;padding:12px 18px;border-top:1px solid var(--roster-line,#ffffff14);background:var(--surface-2,#102235);padding-bottom:max(12px,env(safe-area-inset-bottom))}
.worker-timesheet-footer>span{flex:1;display:grid;gap:2px;text-align:center}
.worker-timesheet-footer strong{font-size:1.1rem;font-variant-numeric:tabular-nums}
.worker-timesheet-footer small{color:var(--muted);font-size:.68rem;text-transform:uppercase;letter-spacing:.04em}
.worker-timesheet-footer .negative strong{color:var(--red)}
.worker-timesheet-footer .positive strong{color:var(--green)}
@media(max-width:600px){.worker-timesheet-row{grid-template-columns:44px 1fr 1fr 1fr 58px;font-size:.8rem}.worker-timesheet-header{padding:12px 14px}.worker-timesheet-heading p{display:none}}

/* Chantier page sections (Avancement/Plan/Controles/RGE/Historique) used to be hidden behind tabs
   (.mobile-tabs + data-tab-hidden) - converted to one stacked scrollable page instead, so nothing
   (especially RGE compliance) is ever one un-clicked tab away from being missed. Consistent spacing
   between the now-always-visible sibling panels; .schedule-panel and .audit-history already had their
   own margin-top:18px from before, this just covers the other panels in the stack too. */
#chantier-view .panel+.panel{margin-top:18px}
.trip-route-options{display:flex;flex-wrap:wrap;gap:8px;margin-top:6px}
.trip-route-options button{font-size:.8rem;padding:8px 12px}
.bank-upload-label{display:inline-flex;align-items:center;cursor:pointer;margin:0}
.bank-tx-row{margin:0;padding:0;border:0;border-bottom:1px solid #ffffff10;border-radius:0;background:none}
.bank-tx-row:last-child{border-bottom:0}
.bank-tx-row summary{display:flex;align-items:center;gap:12px;padding:9px 4px;cursor:pointer;color:inherit;font-weight:400;list-style:none}
.bank-tx-row summary::-webkit-details-marker{display:none}
.bank-tx-row summary::before{content:'';flex:none;width:5px;height:5px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(-45deg);opacity:.6;transition:transform .15s ease}
.bank-tx-row[open] summary::before{transform:rotate(45deg)}
.bank-tx-row-date{flex:none;width:72px;color:var(--muted);font-size:.8rem}
.bank-tx-row-desc{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.88rem}
.bank-tx-row-warning summary{color:var(--red)}
.bank-tx-row-missing summary{color:var(--yellow)}
.bank-tx-row-body{padding:0 4px 14px 21px;display:grid;gap:10px}
.bank-tx-row-fields{display:flex;flex-wrap:wrap;gap:10px}
.bank-tx-row-fields label{display:grid;gap:4px;font-size:.78rem;color:var(--muted);flex:1 1 160px}
.bank-tx-amount{font-weight:700;white-space:nowrap;flex:none}
.bank-tx-amount.positive{color:var(--green)}
.bank-tx-row-fields label.devis-line-description{flex-basis:100%}
.bank-tx-row-fields label.devis-line-include{flex:0 0 auto;display:flex;flex-direction:row-reverse;align-items:center;gap:6px}
.bank-person-fullname-field{display:grid;gap:4px;font-size:.78rem;color:var(--muted);max-width:320px;margin:4px 0 10px}
.bank-month-body{padding-left:14px;border-left:1px solid #ffffff14}
.bank-category-group>summary{font-size:.78rem;text-transform:none}
.bank-pdf-picker-field{display:grid;gap:4px;font-size:.78rem;color:var(--muted);max-width:260px;margin:4px 0 10px}
.bank-group-tabs{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:14px}
.bank-group-tab,.bank-category-tab{font-size:.82rem;padding:9px 14px}
.bank-group-tab.active,.bank-category-tab.active{background:var(--blue);color:#061522;border-color:var(--blue)}
.bank-transaction-list{display:grid;gap:4px}
.bank-match-note{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:-2px 0 8px;padding:8px 10px;border-radius:8px;background:#f77d7d1c;border:1px solid #f77d7d44;font-size:.82rem;color:var(--red)}
.bank-match-note.bank-match-confirmed{background:#31d3a41c;border-color:#31d3a433;color:var(--green)}
.bank-match-note.bank-match-missing{background:#f4c86f1c;border-color:#f4c86f44;color:var(--yellow)}
.bank-match-note button{font-size:.78rem;padding:5px 10px}
.link-button{background:none;border:0;padding:0;color:var(--blue);text-decoration:underline;cursor:pointer;font:inherit}
.nav-group-toggle{display:flex;align-items:center;gap:8px;width:100%}
.nav-group-arrow{width:13px;height:13px;margin-left:auto;flex:none;transition:transform .15s ease;opacity:.7}
.nav-group-toggle[aria-expanded="true"] .nav-group-arrow{transform:rotate(90deg)}
.nav-group-submenu{display:grid;gap:2px;padding-left:30px;margin-top:2px}
.nav-group-submenu .nav-sub{font-size:.85rem;padding:8px 10px}
/* Dashboard KPI cards, approved-mockup look: individual floating white cards with their own
   shadow, not a bordered grid-table - the colored left-stripe-per-index scheme is dropped for a
   single flat icon color, matching the "jednobojne" (single-color) direction the mockup landed on. */
#dashboard-view .cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px;background:transparent;border:0;border-radius:0;overflow:visible}
#dashboard-view .cards article{background:#fff;border:0;border-left:0;border-radius:12px;box-shadow:0 1px 2px #1c25300c,0 4px 12px #1c253008;padding:14px 16px;min-height:auto}
#dashboard-view .cards article:nth-child(n){border-right:0;border-bottom:0;border-left:0}
#dashboard-view .kpi-head{margin-bottom:8px}
#dashboard-view .kpi-head small{font-size:.68rem;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.03em}
#dashboard-view .kpi-icon{width:15px;height:15px;opacity:.7;color:var(--muted)}
#dashboard-view .cards article strong{font-size:1.15rem;font-weight:800;color:var(--text)}
/* The finance KPI row + chart + chantiers-progress list, approved-mockup layout, reading real data
   from /api/dashboard/finance-summary (never invented figures). */
.finance-kpi-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));padding:4px;margin-bottom:18px}
.finance-kpi-item{min-width:0;padding:16px 20px;display:flex;align-items:center;gap:12px;border-right:1px solid var(--border-soft);border-bottom:1px solid var(--border-soft)}
.finance-kpi-item:last-child{border-right:0}
.finance-kpi-dot{width:8px;height:8px;border-radius:50%;flex:none}
.finance-kpi-gauge{flex:none}
.finance-kpi-gauge circle{transition:stroke-dashoffset .4s ease}
.finance-kpi-item small{display:block;font-size:.68rem;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.03em;margin-bottom:3px;white-space:nowrap}
.finance-kpi-item strong{display:block;font-size:1.05rem;font-weight:800;color:var(--text);white-space:nowrap}
.finance-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:16px;margin-bottom:18px}
.finance-chart-svg{width:100%;height:190px}
.finance-chantier-row{margin-bottom:14px}
.finance-chantier-row:last-child{margin-bottom:0}
.finance-chantier-head{display:flex;justify-content:space-between;font-size:.8rem;margin-bottom:6px}
.finance-chantier-head strong{font-weight:600;color:var(--text)}
.finance-chantier-head span{color:var(--muted)}
.finance-chantier-bar{height:7px;border-radius:999px;background:var(--border-soft);overflow:hidden;display:flex}
.finance-chantier-bar>div{height:100%}

/* Sidebar: white, matching the approved DashboardClair mockup (earlier passes left it dark/graphite) */
.sidebar{background:#fff;border-right:1px solid #E1E6F0;box-shadow:none}
.sidebar .brand strong{color:#1C2433}
.nav-group{color:#8A93A6}
.nav,.nav-sub{color:#4C5768}
.nav-icon{opacity:1}
.nav:hover,.nav-sub:hover{background:#F6F8FC;color:#1C2433}
.nav.active,.nav-sub.active{background:#EEF3FF;color:var(--blue);border-color:transparent}
.nav.active .nav-icon,.nav-sub.active .nav-icon{color:var(--blue);opacity:1}
.nav.active::before{background:none}
.company-identity-strip{background:#F6F8FC;border-color:#EDF0F7}
.company-identity-strip strong{color:#1C2433}
.company-identity-strip small{color:#8A93A6}
#company-identity-edit{color:#8A93A6}
#company-identity-edit:hover{color:#1C2433;background:#EEF3FF}
#logout-button{background:#F6F8FC;border-color:#EDF0F7;color:#4C5768}
#logout-button:hover{background:#EEF3FF;border-color:#E1E6F0;color:#1C2433}
.mobile-nav-toggle{background:#fff;color:#1C2433;border-color:#E1E6F0}

/* Attention-item cards (Dashboard "À FAIRE"): flat, no nested rectangle - this panel is already a
   card, a bordered+shadowed box inside it just reads as clutter, per feedback. */
.attention-item{border:0;border-left:0;box-shadow:none;background:transparent;padding:0}
.attention-item+.attention-item{margin-top:18px}

/* Quick preset swatches next to the devis/facture accent color picker */
.accent-swatches{display:flex;gap:8px;margin-top:-6px}
.accent-swatch{width:26px;height:26px;border-radius:50%;border:2px solid #fff;box-shadow:0 0 0 1px var(--border-soft);cursor:pointer;padding:0}
.accent-swatch:hover{transform:scale(1.1)}

/* "Budget & Engagements" per-category variance table (Chantier screen) */
.budget-breakdown-table-wrap{overflow-x:auto;margin-top:14px}
.budget-breakdown-table{width:100%;border-collapse:collapse;font-size:.85rem}
.budget-breakdown-table th{text-align:right;padding:8px 12px;border-bottom:2px solid var(--border-soft);color:var(--muted);font-size:.72rem;font-weight:700;text-transform:uppercase;letter-spacing:.03em;white-space:nowrap}
.budget-breakdown-table th:first-child{text-align:left}
.budget-breakdown-table td{text-align:right;padding:9px 12px;border-bottom:1px solid var(--border-soft);white-space:nowrap}
.budget-breakdown-table td:first-child{text-align:left;font-weight:600}
.budget-breakdown-total-row{font-weight:800}
.budget-breakdown-total-row td{border-top:2px solid var(--border-soft);border-bottom:0}
.budget-ecart-ok{color:#16a34a}
.budget-ecart-over{color:#dc2626}

/* Top navigation bar on desktop (>850px keeps the existing off-canvas mobile menu, which already works
   well at narrow widths) - replaces the left sidebar with a horizontal bar, same approach as the
   Tolteck/IBRA-BA reference. Every element keeps its original class/id (nav, nav-sub, data-view,
   nav-item-group...) so script.js's view-switching, role filtering and submenu logic are untouched -
   only the CONTAINER layout changes, from a vertical column to a horizontal row. */
@media(min-width:851px){
	.app-shell{display:flex;flex-direction:column;min-height:100vh}
	.sidebar{position:sticky;top:0;z-index:20;width:100%;height:auto;flex-direction:row;align-items:center;gap:18px;padding:10px 24px;background:var(--navy,#0B1F3A)!important;border-right:0}
	.sidebar .brand{flex:none}
	.sidebar .brand strong{color:#fff}
	.sidebar #company-identity-strip{flex:none;margin:0}
	.sidebar #company-identity-strip strong{color:#fff!important}
	.sidebar #company-identity-strip small{color:#ffffffa0!important}
	.sidebar nav#primary-nav{display:flex;flex-direction:row;align-items:center;gap:2px;flex:1;min-width:0;overflow-x:auto;overflow-y:visible}
	.nav-section{flex-direction:row;align-items:center;gap:2px;flex:none}
	.nav-section+.nav-section{margin-top:0;padding-top:0;border-top:0;padding-left:14px;border-left:1px solid #ffffff22}
	.nav-section-head{display:none}
	.sidebar .nav,.sidebar .nav-sub{white-space:nowrap;padding:8px 13px;font-size:.82rem;background:transparent!important;border:0!important;border-radius:6px;box-shadow:none!important;color:#ffffffa6}
	.sidebar .nav.active,.sidebar .nav-sub.active{background:#ffffff1a!important;color:#fff!important;font-weight:600}
	.sidebar .nav:hover,.sidebar .nav-sub:hover{background:#ffffff1a!important;color:#fff!important}
	.sidebar .nav.active::before,.sidebar .nav-sub.active::before{display:none}
	.nav-item-group{position:relative}
	.nav-group-submenu{position:absolute;top:calc(100% + 4px);left:0;padding:6px;margin-top:0;border:1px solid var(--border-soft);border-radius:10px;background:var(--panel);box-shadow:var(--shadow-panel);z-index:30;min-width:170px}
	.nav-group-submenu .nav-sub{color:var(--muted)!important}
	.nav-group-submenu .nav-sub:hover,.nav-group-submenu .nav-sub.active{background:#2a2e3514!important;color:var(--text)!important}
	.sidebar #logout-button,.sidebar #install-app-btn{flex:none;white-space:nowrap;margin-top:0;background:#ffffff14!important;border:1px solid #ffffff2a!important;color:#fff!important}
	main{padding-top:28px}
}

/* Flatten panels/cards: no drop-shadow, no border - matches the Tolteck/IBRA-BA reference,
   which separates sections with plain whitespace, not boxed/outlined cards. */
.hero,.panel,.cards article,article,.list-item,.worker-roster-toolbar,.worker-roster-panel,.worker-add-panel,.risk-indicator{box-shadow:none!important;border:0!important}
.risk-indicator,.risk-indicator.risk-red,.risk-indicator.risk-orange,.risk-indicator.risk-green{background:transparent!important;padding-left:0;padding-right:0}
#dashboard-view .risk-action{border-top:0;padding-top:4px}

/* Chantier detail: circular progress gauge + two-column layout (gauge card on the left,
   budget/schedule/documents/RGE stacked on the right), matching the IBRA-BA reference. */
.chantier-layout{display:grid;grid-template-columns:300px 1fr;gap:20px;align-items:start}
.chantier-layout-main{display:grid;gap:18px}
.chantier-layout-main .panel+.panel{margin-top:0}
.site-progress-panel{text-align:center}
.site-progress-panel .section-head{text-align:left}
.site-progress-gauge-wrap{position:relative;width:180px;height:180px;margin:14px auto}
.site-progress-ring{width:100%;height:100%;transform:rotate(-90deg)}
.site-progress-ring-track{fill:none;stroke:#EEF1F7;stroke-width:10}
.site-progress-ring-fill{fill:none;stroke:var(--green);stroke-width:10;stroke-linecap:round;stroke-dasharray:326.7256;stroke-dashoffset:326.7256;transition:stroke-dashoffset .3s ease}
.site-progress-gauge-center{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px}
.site-progress-gauge-center .site-progress-label{font-size:2rem;font-weight:800;color:var(--text)}
.site-progress-gauge-center span{color:var(--muted);font-size:.78rem}
@media(max-width:850px){.chantier-layout{grid-template-columns:1fr}}
.hero,.panel,article{background:#fff}
#dashboard-view .cards article{box-shadow:none;border:0}

/* Login card: icon-prefixed fields, an arrow on the primary button, and the secondary actions
   as outlined pill rows with an icon + chevron - matches the IBRA-BA mobile reference. */
.login-brand{gap:12px}
.login-brand strong{display:block;font-size:1.1rem}
.login-brand small{display:block;color:var(--muted);font-weight:600}
.login-subtitle{margin:-10px 0 4px;color:var(--muted)}
.input-with-icon .input-icon-wrap{position:relative;display:flex;align-items:center}
.input-with-icon .input-icon{position:absolute;left:12px;width:18px;height:18px;color:var(--muted);pointer-events:none}
.input-with-icon input,.input-with-icon select{padding-left:40px}
.input-icon-toggle{position:absolute;right:10px;display:grid;place-items:center;width:28px;height:28px;padding:0;border:0;border-radius:8px;background:transparent;color:var(--muted);cursor:pointer}
.input-icon-toggle svg{width:18px;height:18px}
.input-icon-toggle:hover{background:#0000000a;color:var(--text)}
.login-submit{display:flex;align-items:center;justify-content:center;gap:8px}
.login-submit svg{width:18px;height:18px}
.login-pill{display:flex;align-items:center;gap:10px;padding:12px 14px}
.login-pill svg{width:18px;height:18px;flex:none}
.login-pill span{flex:1;text-align:left}
.login-pill .login-pill-chevron{width:16px;height:16px;color:var(--muted)}
.login-footer-note{display:flex;align-items:flex-start;gap:8px;margin-top:6px;color:var(--muted);font-size:.78rem;line-height:1.4}
.login-footer-note svg{width:16px;height:16px;flex:none;margin-top:1px;color:var(--green)}

/* Document row file-type chips: a colored badge per file kind (PDF/photo/plan/office doc), same
   visual language as the reference document table, so the type is readable at a glance. */
.doc-type-chip{flex:none;padding:3px 8px;border-radius:7px;font-size:.68rem;font-weight:850;letter-spacing:.02em;text-transform:uppercase}
.doc-type-chip.doc-type-pdf{background:#fee2e2;color:#b91c1c}
.doc-type-chip.doc-type-image{background:#ede9fe;color:#6d28d9}
.doc-type-chip.doc-type-plan{background:#ffedd5;color:#c2410c}
.doc-type-chip.doc-type-doc{background:#dbeafe;color:#1d4ed8}
.doc-type-chip.doc-type-sheet{background:#dcfce7;color:#15803d}
.doc-type-chip.doc-type-file{background:#f1f5f9;color:#475569}

/* Chantiers list (above the single-chantier detail): a KPI row + a plain data table - progress bar,
   status pill - exactly the pattern from the reference template, reused for every status pill below. */
.chantiers-list-panel{margin-bottom:18px}
.chantiers-list-kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px;margin:14px 0}
.chantiers-list-kpi{padding:12px 14px;border:1px solid var(--border-soft);border-radius:10px}
.chantiers-list-kpi small{display:block;color:var(--muted);font-size:.72rem;margin-bottom:4px}
.chantiers-list-kpi strong{font-size:1.3rem}
.chantiers-list-table-wrap{overflow-x:auto}
.chantiers-list-table{width:100%;border-collapse:collapse;font-size:.86rem}
.chantiers-list-table th{text-align:left;padding:9px 12px;color:var(--muted);font-weight:700;font-size:.68rem;text-transform:uppercase;letter-spacing:.04em;border-bottom:1px solid var(--border-soft)}
.chantiers-list-table td{padding:11px 12px;border-bottom:1px solid var(--border-soft)}
.chantiers-list-table tr:last-child td{border-bottom:0}
.chantiers-list-row{cursor:pointer}
.chantiers-list-row:hover{background:#2a2e3508}
.chantiers-list-row.active{background:#2a2e3512}
.prog{display:inline-flex;align-items:center;gap:8px}
.prog .bar{width:64px;height:4px;background:#E5E7EB;border-radius:2px;overflow:hidden}
.prog .bar i{display:block;height:100%}
.pill{display:inline-block;padding:2px 9px;border-radius:999px;font-size:.72rem;font-weight:700}
.pill.pg{background:#D1FAE5;color:#065F46}
.pill.po{background:#FEF3C7;color:#92400E}
.pill.pr{background:#FEE2E2;color:#991B1B}
.pill.pb{background:#DBEAFE;color:#1E40AF}

/* Last pass: the page title bar and every "nothing here yet" empty-state message were still their
   own bordered box - flatten both so they sit as plain text on the page, same as everything else. */
header{background:transparent!important;border:0!important;box-shadow:none!important}
header::before{display:none!important}
.list>small,.list>p{border:0!important;background:transparent!important;padding:22px 0!important}
/* Exact match to the reference code's .panel/.kpi: a plain white card with ONE thin hairline
   border and a modest radius - no shadow, no gradient, no heavy color. Not "zero border" (their
   own .kpi/.panel classes both declare border:1px solid var(--border)) - this is what "flat" means
   in their spec: subtle and uniform, not invisible. */
.hero,.panel,article{background:#fff!important;border:1px solid var(--border-soft)!important;border-radius:10px!important;box-shadow:none!important}
#dashboard-view .cards{background:transparent!important}
.cards article{background:#fff!important;border:1px solid var(--border-soft)!important;border-radius:10px!important;box-shadow:none!important}
.chantiers-list-kpi{background:#fff!important;border:1px solid var(--border-soft)!important}
/* Exact 4-column KPI grid from the reference code's .kpis class, instead of an auto-fit column
   count that varies with viewport width. */
.cards{grid-template-columns:repeat(4,1fr)!important;gap:14px!important}
@media(max-width:850px){.cards{grid-template-columns:repeat(2,1fr)!important}}

/* ======================================================================
   DESIGN IBRA-BA — maquettes de référence (couche finale, ne touche pas au JS)
   Barre du haut bleu marine, menu latéral blanc, cartes blanches à bord fin,
   tableaux clairs, badges colorés. Toutes les classes/ids existants sont conservés.
   ====================================================================== */
:root{
	--bg:#F8FAFC;--panel:#FFFFFF;--panel2:#F8FAFC;--surface-0:#F8FAFC;--surface-1:#fff;--surface-2:#fff;--surface-3:#F8FAFC;
	--text:#1F2430;--muted:#5B6372;--navy:#0B1F3A;--navy-2:#13305A;--line:#E2E6EC;
	--blue:#1D5BD8;--blue-strong:#0B1F3A;--green:#1E8E3E;--yellow:#D97706;--red:#DC2626;--focus:#1D5BD8;
	--border-soft:#E2E6EC;--border-strong:#C9CED6;--border-focus:#1D5BD8;--roster-line:#E2E6EC;--roster-header:#5B6372;
	--shadow-panel:none;
	--status-good:#1E7B34;--status-good-bg:#E3F4E6;--status-pending:#C2570C;--status-pending-bg:#FDEEDC;
	--status-attention:#C2570C;--status-attention-bg:#FDEEDC;--status-critical:#B42318;--status-critical-bg:#FDE3E3;
}
body{background:var(--bg)!important;color:var(--text);font-family:Inter,system-ui,"Segoe UI",sans-serif!important}
h1,h2,h3,h4,.primary,.secondary,.nav,.nav-sub,button,input,select,textarea{font-family:Inter,system-ui,"Segoe UI",sans-serif!important}
h1,h2,h3{color:#0F1E3D;letter-spacing:-.01em}

/* ---------- Boutons ---------- */
.primary,button.primary{background:var(--navy)!important;color:#fff!important;border:0!important;border-radius:8px!important;box-shadow:none!important;font-weight:600!important}
.primary:hover{background:var(--navy-2)!important;transform:none!important}
.secondary,button.secondary{background:#fff!important;color:var(--text)!important;border:1px solid var(--border-strong)!important;border-radius:8px!important;box-shadow:none!important;font-weight:500!important}
.secondary:hover{background:#F3F4F6!important;transform:none!important}

/* ---------- Champs ---------- */
input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]),select,textarea{background:#fff!important;color:var(--text)!important;border:1px solid #DDE1E6!important;border-radius:8px!important;box-shadow:none!important}
input:focus,select:focus,textarea:focus{outline:none!important;border-color:var(--blue)!important;box-shadow:0 0 0 3px #1D5BD822!important}
label{color:var(--text)!important;font-weight:600;font-size:13px}
input::placeholder,textarea::placeholder{color:#94A3B8}

/* ---------- Cartes / panneaux ---------- */
.panel,.hero,article,.cards article,.worker-roster-panel,.worker-add-panel{background:#fff!important;border:1px solid var(--line)!important;border-radius:10px!important;box-shadow:none!important}
.hero{padding:22px 24px}
.section-head small,.hero>small{font-size:12px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:var(--muted)!important}
.section-head h2,.section-head h3{color:#0F1E3D}
.list-item{background:#fff!important;border:1px solid var(--line)!important;border-radius:8px!important;box-shadow:none!important}
.status{background:#E3F4E6!important;color:#1E7B34!important;border:0!important;font-weight:600}

/* ---------- Tableaux ---------- */
table{border-collapse:collapse}
table th{background:#F5F6F8!important;color:var(--text)!important;font-weight:600!important;font-size:13px!important;text-transform:none!important;letter-spacing:0!important;border-bottom:1px solid var(--line)!important}
table td{border-bottom:1px solid var(--line)!important}
table tbody tr:hover td{background:#FAFBFC}

/* ---------- En-tête de page (titre comme les maquettes) ---------- */
main>header{background:transparent!important;border:0!important;box-shadow:none!important;padding:4px 0 0!important;margin-bottom:22px!important;backdrop-filter:none!important}
main>header #page-title{font-size:30px;font-weight:700;color:#0F1E3D}
main>header #current-role{font-size:13px;color:var(--muted)!important}

/* ---------- Bureau : barre du haut bleu marine + menu latéral blanc ---------- */
@media(min-width:851px){
	.app-shell{display:grid!important;grid-template-columns:256px minmax(0,1fr);grid-template-rows:64px 1fr;min-height:100vh;flex-direction:initial}
	.app-shell::before{content:'';grid-row:1;grid-column:1/-1;position:sticky;top:0;z-index:40;background:var(--navy)}
	.sidebar{display:contents!important}
	.sidebar .brand{grid-row:1;grid-column:1;position:sticky;top:0;z-index:41;align-self:center;display:flex;align-items:center;gap:10px;padding:0 20px;margin:0;border:0!important}
	.sidebar .brand strong{color:#fff!important;font-size:16px;font-weight:700}
	.sidebar .brand-logo{width:32px;height:32px;border-radius:7px;box-shadow:none}
	.sidebar #company-identity-strip{grid-row:1;grid-column:2;position:sticky;top:0;z-index:41;align-self:center;justify-self:start;display:flex;align-items:center;gap:10px;margin:0 0 0 4px;padding:6px 12px 6px 6px;background:transparent!important;border:0!important;border-left:1px solid #ffffff2e!important;border-radius:0!important;box-shadow:none!important;max-width:42vw}
	.sidebar #company-identity-strip[hidden]{display:none}
	.sidebar #company-identity-strip strong{color:#fff!important;font-size:15px}
	.sidebar #company-identity-strip small{color:#ffffffb0!important}
	.sidebar #company-identity-edit{color:#ffffffb0!important;background:transparent!important;border:0!important}
	.sidebar .identity-logo{background:#fff!important;color:var(--navy)!important}
	.sidebar #logout-button,.sidebar #install-app-btn{grid-row:1;grid-column:2;position:sticky;top:0;z-index:42;align-self:center;justify-self:end;display:inline-flex;align-items:center;gap:8px;height:38px;margin:0;padding:0 14px;background:transparent!important;border:1px solid #ffffff40!important;border-radius:8px!important;color:#fff!important;font-size:13.5px;font-weight:600;white-space:nowrap;width:auto}
	.sidebar #logout-button{margin-right:22px}
	.sidebar #install-app-btn{margin-right:180px}
	.sidebar #install-app-btn[hidden]{display:none!important}
	.sidebar #logout-button svg{width:17px;height:17px}
	.sidebar #logout-button:hover,.sidebar #install-app-btn:hover{background:#ffffff1a!important}
	.sidebar nav#primary-nav{grid-row:2;grid-column:1;display:block!important;position:sticky;top:64px;align-self:start;height:calc(100vh - 64px);overflow-y:auto;padding:16px 12px 24px;background:#fff;border-right:1px solid var(--line)}
	.nav-section{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:2px!important}
	.nav-section+.nav-section{margin-top:14px!important;padding:14px 0 0!important;border-top:1px solid var(--line)!important;border-left:0!important}
	.nav-section-head{display:flex!important;align-items:center;gap:8px;padding:4px 12px 8px;font-size:11.5px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:#8A93A6}
	.nav-section-head .nav-section-icon{display:none}
	.sidebar .nav,.sidebar .nav-sub{display:flex!important;align-items:center;gap:12px;width:100%;padding:9px 12px!important;border:0!important;border-radius:8px!important;background:transparent!important;box-shadow:none!important;color:#1F2430!important;font-size:14px!important;font-weight:500!important;text-align:left;white-space:nowrap}
	.sidebar .nav .nav-icon,.sidebar .nav-sub .nav-icon{width:19px;height:19px;flex:none;color:#3A4252}
	.sidebar .nav:hover,.sidebar .nav-sub:hover{background:#F3F5F8!important;color:#0F1E3D!important}
	.sidebar .nav.active,.sidebar .nav-sub.active{background:var(--navy)!important;color:#fff!important}
	.sidebar .nav.active .nav-icon,.sidebar .nav-sub.active .nav-icon{color:#fff!important}
	.sidebar .nav.active::before,.sidebar .nav-sub.active::before{display:none!important}
	.nav-item-group{position:static}
	.nav-group-submenu{position:static!important;margin:2px 0 4px 30px!important;padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important;min-width:0!important}
	.nav-group-submenu .nav-sub{padding:7px 12px!important;font-size:13.5px!important;color:#5B6372!important}
	.nav-group-arrow{width:15px;height:15px;margin-left:auto;transition:transform .15s}
	.nav-group-toggle[aria-expanded="true"] .nav-group-arrow{transform:rotate(90deg)}
	.sidebar-user-card,.sidebar-user-status{display:none!important}
	main{grid-row:2;grid-column:2;max-width:none!important;width:100%;padding:28px 32px 40px!important;margin:0!important}
}

/* ---------- En-têtes de page : le premier bloc titre de chaque vue = titre de page des maquettes ---------- */
main>header #current-role,main>header .header-actions{display:none!important}
main:has(> .view.active > .section-head:first-child)>header{display:none!important}
.view>.section-head:first-child{display:grid!important;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:6px 16px;margin:2px 0 22px!important;padding:0!important;border:0!important;background:transparent!important}
.view>.section-head:first-child>:first-child{grid-column:1;grid-row:1}
.view>.section-head:first-child>:first-child>small{display:none!important}
.view>.section-head:first-child h2{margin:0!important;font-size:30px!important;font-weight:700!important;line-height:1.15;color:#0F1E3D!important}
.view>.section-head:first-child>span{grid-column:1;grid-row:2;font-size:15px!important;color:var(--muted)!important;text-align:left!important;font-weight:400!important}
.view>.section-head:first-child>:not(:first-child):not(span){grid-column:2;grid-row:1/3;align-self:center;display:flex;flex-wrap:wrap;gap:10px;justify-content:flex-end}
.view>.hero:first-child{margin-top:0}

/* ---------- Formulaires : grilles aérées ---------- */
form{gap:14px!important}
.form-row{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px 16px!important;align-items:end}
.panel>.form-row+.form-row,.panel>.form-row+label,.panel>label+.form-row{margin-top:14px}
label{display:grid;gap:6px}
input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file]),select{min-height:42px}
input[type=file]{padding:8px 10px!important;background:#F8FAFC!important;border:1px dashed #C9CED6!important;border-radius:8px!important}
input[type=checkbox],input[type=radio]{accent-color:var(--navy)}

/* ---------- Titres internes, barres d'outils, états vides ---------- */
.panel h3,.panel-head h3,.worker-add-panel-head h3{font-size:18px;font-weight:700;color:#0F1E3D;margin:0}
.panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}
.panel-toolbar{display:flex;align-items:center;gap:10px}
.panel-toolbar input[type=search]{min-width:220px;padding-left:38px!important;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-4-4'/%3E%3C/svg%3E") no-repeat 12px center/16px!important}
.icon-button{display:grid;place-items:center;width:42px;height:42px;padding:0;border:1px solid var(--border-strong)!important;border-radius:8px!important;background:#fff!important;color:var(--text)!important}
.panel-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:16px}
.list>small:only-child,.list>p:only-child,.empty-state{display:block;padding:26px 16px;text-align:center;color:var(--muted)!important;font-size:14px;background:transparent!important;border:0!important}
.grid-two{gap:18px!important;align-items:start}
.panel{padding:20px 22px!important;margin-bottom:18px}
.panel>.section-head{margin-bottom:14px}
.panel>.section-head h3{font-size:18px}
.panel>.section-head>span{font-size:14px;color:var(--muted)}

input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}

/* =====================================================================
   Éditeur de devis / facture — feuille document + panneau latéral
   ===================================================================== */
#devis-builder-view .dz{display:grid;grid-template-columns:minmax(0,1fr) 288px;gap:20px;align-items:start}
#devis-builder-view .dz-sheet{background:#fff;border:1px solid var(--line);border-radius:10px;box-shadow:0 1px 2px rgba(16,24,40,.04);overflow:hidden}
#devis-builder-view .dz-sheet input,#devis-builder-view .dz-sheet select{font:inherit;color:#0F1E3D}

/* en-tête du document */
#devis-builder-view .dz-top{display:flex;justify-content:space-between;align-items:flex-start;gap:24px;padding:26px 30px 22px;border-bottom:1px solid #EDF0F4}
#devis-builder-view .dz-ident{display:grid;gap:6px}
#devis-builder-view .dz-kind{font-size:24px;font-weight:700;letter-spacing:-.01em;color:#0B1F3A;text-transform:uppercase}
#devis-builder-view .dz-num{display:flex!important;align-items:center;gap:6px;margin:0!important;font-size:13px;color:#5B6678}
#devis-builder-view .dz-num span{font-weight:600}
#devis-builder-view .dz-num input{width:170px;height:28px!important;min-height:28px!important;padding:0 8px!important;border:1px dashed #CBD2DC!important;border-radius:6px!important;background:#fff!important;font-size:13px!important;font-family:'IBM Plex Mono',ui-monospace,monospace!important}
#devis-builder-view .dz-meta{display:grid;grid-template-columns:auto auto;gap:4px 18px;margin:0;text-align:right}
#devis-builder-view .dz-meta>div{display:contents}
#devis-builder-view .dz-meta dt{font-size:12px;color:#8A94A6}
#devis-builder-view .dz-meta dd{margin:0;font-size:13px;font-weight:600;color:#0F1E3D}

/* blocs chantier / client */
#devis-builder-view .dz-parties{display:grid;grid-template-columns:1fr 1fr;gap:0;border-bottom:1px solid #EDF0F4}
#devis-builder-view .dz-party{display:grid;gap:2px;align-content:start;padding:16px 30px 18px}
#devis-builder-view .dz-party+.dz-party{border-left:1px solid #EDF0F4;background:#FBFCFD}
#devis-builder-view .dz-cap{font-size:11px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:#8A94A6;margin-bottom:4px}
#devis-builder-view .dz-party input,#devis-builder-view .dz-party select{height:30px!important;min-height:30px!important;padding:0 8px!important;margin-left:-9px;width:calc(100% + 9px);border:1px solid transparent!important;border-radius:6px!important;background:transparent!important;font-size:13.5px!important;box-shadow:none!important}
#devis-builder-view .dz-party select{font-weight:600}
#devis-builder-view .dz-party .dz-strong{font-size:15px!important;font-weight:600}
#devis-builder-view .dz-party input:hover,#devis-builder-view .dz-party select:hover{background:#F3F5F8!important}
#devis-builder-view .dz-party input:focus,#devis-builder-view .dz-party select:focus{background:#fff!important;border-color:#1D5BD8!important;outline:0;box-shadow:0 0 0 3px rgba(29,91,216,.12)!important}

/* avancement (factures) */
#devis-builder-view .dz-progress{padding:16px 30px;border-bottom:1px solid #EDF0F4;background:#F7F9FF}
#devis-builder-view .dz-progress h3{font-size:14px!important;margin:0 0 6px}

/* grille des lignes, façon tableur */
#devis-builder-view .dz .db-lines-head,#devis-builder-view .dz .db-line{display:grid!important;grid-template-columns:44px minmax(0,1fr) 78px 86px 100px 118px 40px!important;gap:0!important;align-items:stretch}
#devis-builder-view .dz .db-lines-head{padding:0!important;border:0!important;border-radius:0!important;background:#F5F6F8!important;border-bottom:1px solid #E2E6EC!important}
#devis-builder-view .dz .db-lines-head span{padding:9px 10px;font-size:11px;font-weight:600;letter-spacing:.05em;text-transform:uppercase;color:#5B6678;white-space:nowrap}
#devis-builder-view .dz .db-lines-head span:nth-child(1){text-align:center}
#devis-builder-view .dz .db-lines-head span:nth-child(3),#devis-builder-view .dz .db-lines-head span:nth-child(5),#devis-builder-view .dz .db-lines-head span:nth-child(6){text-align:right}
#devis-builder-view #devis-builder-lines{display:block;margin:0!important;border:0!important}
#devis-builder-view .dz .db-line{padding:0!important;border-bottom:1px solid #EDF0F4;background:#fff}
#devis-builder-view .dz .db-line:hover{background:#FAFBFD}
#devis-builder-view .dz .db-line>*{border-right:1px solid #F0F2F5;min-width:0}
#devis-builder-view .dz .db-line>*:nth-last-child(2),#devis-builder-view .dz .db-line>*:last-child{border-right:0}
#devis-builder-view .dz .db-line label{margin:0!important;display:block!important;padding:0!important}
#devis-builder-view .dz .db-line .db-line-label{display:none}
#devis-builder-view .dz .db-line-num{display:flex;align-items:flex-start;justify-content:center;padding-top:12px;font-size:12px;color:#8A94A6;font-variant-numeric:tabular-nums}
#devis-builder-view .dz .db-line input,#devis-builder-view .dz .db-line select{width:100%!important;height:40px!important;min-height:40px!important;padding:0 10px!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;font-size:13.5px!important;font-variant-numeric:tabular-nums}
#devis-builder-view .dz .db-line input:focus,#devis-builder-view .dz .db-line select:focus{outline:2px solid #1D5BD8;outline-offset:-2px;background:#fff!important}
#devis-builder-view .dz .db-line-qty input,#devis-builder-view .dz .db-line-pu input,#devis-builder-view .dz .db-line-total input{text-align:right}
#devis-builder-view .dz .db-line-total input{font-weight:600;color:#0B1F3A}
#devis-builder-view .dz .db-line-desc{display:grid!important;grid-template-columns:minmax(0,1fr)!important}
#devis-builder-view .dz .db-line-desc .input-with-button{display:flex!important;align-items:center;gap:0}
#devis-builder-view .dz .db-line-desc .input-with-button input{flex:1 1 auto!important;min-width:0!important;font-weight:500}
#devis-builder-view .dz .db-line .devis-builder-ai-descriptif{flex:none;width:30px;height:28px!important;min-height:28px!important;margin-right:6px;padding:0!important;border:1px solid transparent!important;border-radius:6px!important;background:transparent!important;font-size:13px!important;opacity:.55;cursor:pointer}
#devis-builder-view .dz .db-line:hover .devis-builder-ai-descriptif,#devis-builder-view .dz .db-line .devis-builder-ai-descriptif:focus{opacity:1;border-color:#E2E6EC!important;background:#fff!important}
#devis-builder-view .dz .db-line input.db-line-cat{height:24px!important;min-height:24px!important;margin-top:-6px;padding:0 10px 6px!important;font-size:12px!important;color:#5B6678!important;background:transparent!important}
#devis-builder-view .dz .db-line input.db-line-cat::placeholder{color:#B4BCC8}
#devis-builder-view .dz .db-line-remove{display:flex!important;align-items:flex-start;justify-content:center;width:auto;height:auto;padding:10px 0 0!important;border:0!important;background:transparent!important;color:#B4BCC8;cursor:pointer;border-radius:0}
#devis-builder-view .dz .db-line-remove:hover{color:#B42318;background:#FEF3F2!important}
#devis-builder-view .dz .db-line-remove svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
#devis-builder-view .dz .db-empty{display:block;padding:26px 16px;text-align:center;font-size:13.5px;color:#8A94A6;border-bottom:1px solid #EDF0F4}
#devis-builder-view .dz-add{display:block;width:100%;height:40px;padding:0 30px 0 54px!important;border:0!important;border-bottom:1px solid #EDF0F4!important;border-radius:0!important;background:#fff!important;text-align:left;font-size:13.5px!important;font-weight:600;color:#1D5BD8!important;cursor:pointer;box-shadow:none!important}
#devis-builder-view .dz-add:hover{background:#F5F8FF!important}

/* pied : totaux */
#devis-builder-view .dz-foot{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:24px;padding:20px 30px 26px;align-items:end}
#devis-builder-view .dz-hint{margin:0;font-size:12.5px;color:#8A94A6;max-width:380px}
#devis-builder-view .dz-totals{margin:0;display:grid}
#devis-builder-view .dz-totals>div{display:flex;justify-content:space-between;align-items:baseline;padding:7px 0;border-bottom:1px solid #EDF0F4}
#devis-builder-view .dz-totals dt{font-size:13px;color:#5B6678}
#devis-builder-view .dz-totals dd{margin:0;font-size:14px;font-weight:600;color:#0F1E3D;font-variant-numeric:tabular-nums}
#devis-builder-view .dz-totals .db-ttc{margin-top:8px;padding:11px 14px;border:0;border-radius:8px;background:#0B1F3A}
#devis-builder-view .dz-totals .db-ttc dt{color:#C9D3E3;font-weight:600}
#devis-builder-view .dz-totals .db-ttc dd{color:#fff;font-size:18px;font-weight:700}

/* panneau latéral */
#devis-builder-view .dz-side{position:sticky;top:84px;display:grid;gap:14px}
#devis-builder-view .dz-box{background:#fff;border:1px solid var(--line);border-radius:10px;padding:16px 18px;display:grid;gap:12px}
#devis-builder-view .dz-box h3{margin:0;font-size:12px!important;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:#5B6678}
#devis-builder-view .dz-box label{margin:0;display:grid;gap:5px;font-size:12.5px;font-weight:500;color:#344054}
#devis-builder-view .dz-box select{height:36px!important;min-height:36px!important;padding:0 10px!important;font-size:13.5px!important}
#devis-builder-view .dz-box .dz-check{display:flex!important;align-items:center;gap:8px;font-size:13px}
#devis-builder-view .dz-box .dz-check[hidden]{display:none!important}
#devis-builder-view .dz-box .dz-check input{width:16px;height:16px;margin:0}
#devis-builder-view .dz-pay-row{display:flex;justify-content:space-between;font-size:13px;color:#5B6678}
#devis-builder-view .dz-pay-row strong{color:#0F1E3D;font-weight:600}
#devis-builder-view .dz-pay-total{display:grid;gap:2px;padding:12px 0 2px;border-top:1px solid #EDF0F4}
#devis-builder-view .dz-pay-total span{font-size:12px;color:#8A94A6}
#devis-builder-view .dz-pay-total strong{font-size:26px;font-weight:700;letter-spacing:-.01em;color:#0B1F3A;font-variant-numeric:tabular-nums}
#devis-builder-view .dz-box .db-generate{width:100%;height:42px;font-size:14.5px!important}
#devis-builder-view .dz-box .db-total-line{font-size:12px;color:#8A94A6}.dz-box .db-total-line:empty{display:none}
#devis-builder-status:empty{display:none}
#devis-builder-view .dz-box[hidden],#devis-builder-view .dz-progress[hidden]{display:none!important}

@media(max-width:1180px){#devis-builder-view .dz{grid-template-columns:minmax(0,1fr)}.dz-side{position:static;grid-template-columns:1fr 1fr}}
@media(max-width:850px){
 #devis-builder-view .dz-side{grid-template-columns:1fr}
 #devis-builder-view .dz-top{padding:18px 16px 14px;flex-direction:column;gap:10px}.dz-meta{text-align:left}
 #devis-builder-view .dz-parties{grid-template-columns:1fr}.dz-party{padding:12px 16px}.dz-party+.dz-party{border-left:0;border-top:1px solid #EDF0F4}
 #devis-builder-view .dz .db-lines-head{display:none!important}
 #devis-builder-view .dz .db-line{grid-template-columns:1fr 1fr 1fr 36px!important;padding:6px 0!important}
 #devis-builder-view .dz .db-line>*{border-right:0}
 #devis-builder-view .dz .db-line .db-line-num{display:none}
 #devis-builder-view .dz .db-line .db-line-desc{grid-column:1/-1}
 #devis-builder-view .dz .db-line .db-line-label{display:block;padding:4px 10px 0;font-size:10.5px;letter-spacing:.04em;text-transform:uppercase;color:#8A94A6}
 #devis-builder-view .dz .db-line .db-line-desc>.db-line-label{display:none}
 #devis-builder-view .dz .db-line .db-line-qty{grid-column:1}.dz .db-line .db-line-unit{grid-column:2}.dz .db-line .db-line-pu{grid-column:3}
 #devis-builder-view .dz .db-line .db-line-total{grid-column:1/4;display:flex!important;align-items:center;justify-content:space-between}
 #devis-builder-view .dz .db-line .db-line-total .db-line-label{padding:0 10px}
 #devis-builder-view .dz .db-line .db-line-total input{width:auto!important;flex:1}
 #devis-builder-view .dz .db-line .db-line-remove{grid-column:4;grid-row:3;align-items:center;padding:0!important}
 #devis-builder-view .dz .db-line input,#devis-builder-view .dz .db-line select{height:36px!important;min-height:36px!important}
 #devis-builder-view .dz-add{padding-left:16px!important}
 #devis-builder-view .dz-foot{grid-template-columns:1fr;padding:16px}
}

/* =====================================================================
   Registre (tableaux) — système commun : Factures clients
   ===================================================================== */
#factures-view .section-head:first-child{grid-template-columns:minmax(0,1fr) auto}
.fx-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));margin-bottom:16px;background:#fff;border:1px solid var(--line);border-radius:10px;overflow:hidden}
.fx-kpi{display:grid;gap:3px;padding:14px 18px;border-left:1px solid #EDF0F4;position:relative}
.fx-kpi:first-child{border-left:0}
.fx-kpi::before{content:"";position:absolute;left:0;top:14px;bottom:14px;width:3px;border-radius:0 3px 3px 0;background:#0B1F3A}
.fx-kpi-good::before{background:#1E8E3E}.fx-kpi-warn::before{background:#D9A00B}.fx-kpi-bad::before{background:#C0362C}
.fx-kpi span{font-size:12px;font-weight:500;color:#5B6678}
.fx-kpi strong{font-size:20px;font-weight:700;letter-spacing:-.01em;color:#0B1F3A;font-variant-numeric:tabular-nums}
.fx-kpi small{font-size:12px;color:#8A94A6}

.fx-register{background:#fff;border:1px solid var(--line);border-radius:10px;overflow:visible}
#factures-view .fx-toolbar{display:flex;align-items:center;gap:8px;padding:10px 12px;border-bottom:1px solid #E2E6EC}
#factures-view .fx-search{position:relative;flex:1;margin:0;display:block}
#factures-view .fx-search svg{position:absolute;left:10px;top:50%;width:16px;height:16px;transform:translateY(-50%);fill:none;stroke:#8A94A6;stroke-width:2;stroke-linecap:round}
#factures-view .fx-search input{width:100%;height:34px!important;min-height:34px!important;padding:0 10px 0 32px!important;font-size:13.5px!important;border-radius:7px!important}
#factures-view #fx-filter{width:240px;height:34px!important;min-height:34px!important;padding:0 10px!important;font-size:13.5px!important;border-radius:7px!important}
#factures-view .fx-toolbar .icon-button{width:34px;height:34px}

#factures-view .fx-head,#factures-view .fx-row{display:grid;grid-template-columns:minmax(0,1.6fr) 112px 112px 130px 128px 116px;align-items:center;column-gap:12px}
#factures-view .fx-head{padding:0 16px;height:36px;background:#F5F6F8;border-bottom:1px solid #E2E6EC}
#factures-view .fx-head span{font-size:11px;font-weight:600;letter-spacing:.05em;text-transform:uppercase;color:#5B6678}
#factures-view .fx-head span:nth-child(4){text-align:right}
#factures-view .fx-list{display:block!important;margin:0!important}
#factures-view .fx-list>small{display:block;padding:28px 16px;text-align:center;color:#8A94A6}
#factures-view .fx-row{margin:0!important;padding:9px 16px!important;min-height:52px;border:0!important;border-bottom:1px solid #EDF0F4!important;border-radius:0!important;background:#fff!important;box-shadow:none!important;position:relative}
#factures-view .fx-row:hover{background:#F8FAFD!important}
#factures-view .fx-row-late{box-shadow:inset 3px 0 0 #C0362C!important}
#factures-view .fx-c-main{display:grid;gap:1px;min-width:0}
#factures-view .fx-c-main strong{font-size:13.5px;font-weight:600;color:#0B1F3A;font-family:'IBM Plex Mono',ui-monospace,monospace;letter-spacing:-.01em}
#factures-view .fx-c-main small{font-size:13px;color:#5B6678;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#factures-view .fx-c-main .duplicate-tag{justify-self:start;margin-top:3px;font-size:11px}
#factures-view .fx-c-date{font-size:13px;color:#344054;font-variant-numeric:tabular-nums}
#factures-view .fx-late{color:#C0362C;font-weight:600}
#factures-view .fx-c-amt{text-align:right;font-size:14px;font-weight:600;color:#0B1F3A;font-variant-numeric:tabular-nums}
#factures-view .fx-c-status .worker-status{display:inline-flex;align-items:center;gap:6px;height:24px;padding:0 10px;border-radius:999px;border:0;font-size:12px;font-weight:600;white-space:nowrap}
#factures-view .worker-status.status-good{background:#E7F5EC;color:#17773A}
#factures-view .worker-status.status-attention{background:#FDF3DC;color:#946200}
#factures-view .worker-status.status-critical{background:#FDECEA;color:#B42318}
#factures-view .worker-status-dot{width:6px;height:6px;border-radius:50%;background:currentColor}
#factures-view .fx-c-act{display:flex;justify-content:flex-end;align-items:center;gap:2px;position:relative}
#factures-view .fx-icon-btn,#factures-view .fx-c-act>details>summary{display:grid;place-items:center;width:32px;height:32px;padding:0!important;margin:0;border:0!important;border-radius:7px!important;background:transparent!important;color:#5B6678;cursor:pointer;list-style:none;font-size:18px;line-height:1;box-shadow:none!important;min-height:0!important}
#factures-view .fx-c-act>details>summary::-webkit-details-marker{display:none}
#factures-view .fx-c-act>details>summary::before,#factures-view .fx-c-act>details>summary::after{content:none!important;display:none!important}
#factures-view .fx-icon-btn:hover,#factures-view .fx-c-act>details>summary:hover,#factures-view .fx-c-act>details[open]>summary{background:#EEF2F7!important;color:#0B1F3A}
#factures-view .fx-icon-btn svg,#factures-view .fx-c-act summary svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
#factures-view .fx-c-act>details{position:static;margin:0;border:0;background:none;padding:0}
#factures-view .fx-c-act .document-more-menu,#factures-view .fx-c-act .facture-tracking{position:absolute;right:0;top:calc(100% + 6px);z-index:30;min-width:240px;margin:0;padding:6px;display:grid;gap:2px;background:#fff;border:1px solid #E2E6EC;border-radius:9px;box-shadow:0 12px 32px rgba(16,24,40,.14)}
#factures-view .fx-c-act .document-more-menu button{justify-content:flex-start;width:100%;height:34px;padding:0 10px!important;border:0!important;background:transparent!important;font-size:13px!important;font-weight:500;text-align:left;border-radius:6px!important;color:#344054}
#factures-view .fx-c-act .document-more-menu button:hover{background:#F2F4F7!important}
#factures-view .fx-c-act .document-more-menu .danger{color:#B42318!important}
#factures-view .facture-tracking{list-style:none;padding:10px 12px!important;gap:8px!important;min-width:280px!important}
#factures-view .facture-tracking li{display:grid;grid-template-columns:14px 1fr;column-gap:8px;font-size:12.5px;color:#8A94A6}
#factures-view .facture-tracking li::before{content:"";grid-row:1/3;width:10px;height:10px;margin-top:3px;border-radius:50%;border:2px solid #CBD2DC}
#factures-view .facture-tracking li.tracking-done{color:#0F1E3D}
#factures-view .facture-tracking li.tracking-done::before{border-color:#1E8E3E;background:#1E8E3E}
#factures-view .tracking-date{grid-column:2;font-size:11.5px;color:#8A94A6}
#factures-view .fx-c-notes{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:4px 14px;padding-top:4px}
#factures-view .fx-c-notes small{font-size:12px}
/* regroupement par chantier = ligne de groupe */
#factures-view .fx-list>.document-chantier-group{margin:0!important;border:0!important;border-radius:0!important;background:none!important;box-shadow:none!important}
#factures-view .fx-list>.document-chantier-group>summary{display:flex;align-items:center;gap:8px;height:34px;padding:0 16px!important;margin:0;background:#FAFBFC!important;border-bottom:1px solid #EDF0F4;font-size:12.5px;font-weight:600;color:#344054;cursor:pointer;list-style:none;border-radius:0!important}
#factures-view .fx-list>.document-chantier-group>summary svg{width:15px;height:15px}
#factures-view .document-chantier-group-body{padding:0!important;margin:0!important;display:block!important;border:0!important}

/* panneau latéral « Nouvelle facture » */
.fx-drawer{position:fixed;inset:0;z-index:200}
.fx-drawer[hidden]{display:none!important}
.fx-drawer-backdrop{position:absolute;inset:0;background:rgba(11,31,58,.35)}
.fx-drawer-panel{position:absolute;top:0;right:0;bottom:0;width:min(440px,100%);display:flex!important;flex-direction:column;gap:0!important;margin:0!important;padding:0!important;background:#fff;border:0!important;border-radius:0!important;box-shadow:-12px 0 40px rgba(16,24,40,.18);animation:fxIn .18s ease-out}
@keyframes fxIn{from{transform:translateX(24px);opacity:.6}to{transform:none;opacity:1}}
.fx-drawer-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;padding:18px 20px;border-bottom:1px solid #E2E6EC}
.fx-drawer-head h3{margin:0;font-size:17px!important}
.fx-drawer-head small{font-size:12.5px;color:#8A94A6}
.fx-drawer-body{flex:1;overflow:auto;padding:16px 20px;display:grid;gap:12px;align-content:start}
.fx-drawer-body label{margin:0;display:grid;gap:5px;font-size:12.5px;font-weight:500;color:#344054}
.fx-drawer-body input:not([type=checkbox]):not([type=file]),.fx-drawer-body select{height:38px!important;min-height:38px!important;padding:0 11px!important;font-size:14px!important}
.fx-drawer-body #facture-extraction-status{margin-top:-6px;font-size:12px;color:#8A94A6}
.fx-drawer-body .ai-confirm-field{display:flex!important;gap:8px;align-items:flex-start;font-size:12.5px}
.fx-drawer-body .ai-confirm-field[hidden]{display:none!important}
.fx-drawer-foot{position:sticky;bottom:-16px;display:flex;justify-content:flex-end;gap:8px;margin:4px -20px -16px;padding:12px 20px;background:#fff;border-top:1px solid #E2E6EC}
.fx-drawer-foot button{height:38px}

@media(max-width:1100px){#factures-view .fx-head,#factures-view .fx-row{grid-template-columns:minmax(0,1fr) 100px 120px 120px 104px}#factures-view .fx-head span:nth-child(2),#factures-view .fx-row .fx-c-date:nth-of-type(1){display:none}}
@media(max-width:850px){
 .fx-kpis{grid-template-columns:1fr 1fr}.fx-kpi:nth-child(3){border-left:0}.fx-kpi:nth-child(n+3){border-top:1px solid #EDF0F4}
 .fx-kpi strong{font-size:17px}
 #factures-view .section-head:first-child{grid-template-columns:1fr}
 #factures-view .fx-toolbar{flex-wrap:wrap}#factures-view #fx-filter{flex:1;width:auto}
 #factures-view .fx-head{display:none}
 #factures-view .fx-row{grid-template-columns:minmax(0,1fr) auto;row-gap:4px;padding:12px 14px!important}
 #factures-view .fx-row .fx-c-date{display:none}
 #factures-view .fx-row .fx-c-date.fx-late{display:block;grid-column:1;font-size:12px}
 #factures-view .fx-c-amt{grid-column:2;grid-row:1}
 #factures-view .fx-c-status{grid-column:1}
 #factures-view .fx-c-act{grid-column:2;grid-row:2/4}
}
#factures-view .fx-c-notes{grid-column:1/2;padding-top:0;margin-top:-2px}
#factures-view .fx-c-notes small{padding:0!important;border:0!important;background:none!important;font-size:12px!important;color:#5B6678}
#factures-view .fx-c-notes .bank-match-confirmed{color:#17773A}
@media(max-width:850px){#factures-view .fx-search{flex:1 1 100%}#factures-view .section-head:first-child>button{justify-self:start}}

/* =====================================================================
   Registre commun — listes groupées (Documents, Dépenses, Carnet de bord,
   Compte société, Budget) : groupes = lignes d'en-tête, éléments = lignes
   ===================================================================== */
main .list:has(> .document-chantier-group),main .list:has(> .bank-tx-row){display:block!important;margin:14px -22px -20px!important;border-top:1px solid #E2E6EC}
main .document-chantier-group{margin:0!important;padding:0!important;border:0!important;border-radius:0!important;background:none!important;box-shadow:none!important}
main .document-chantier-group>summary{display:flex!important;align-items:center;gap:8px;min-height:38px;margin:0!important;padding:0 22px!important;background:#F5F6F8!important;border:0!important;border-bottom:1px solid #E2E6EC!important;border-radius:0!important;font-size:12.5px;font-weight:600;color:#0F1E3D;letter-spacing:.01em;cursor:pointer;list-style:none;box-shadow:none!important}
main .document-chantier-group>summary::-webkit-details-marker{display:none}
main .document-chantier-group>summary::before{content:"";flex:none;width:6px;height:6px;margin-right:4px;border-right:1.6px solid #5B6678;border-bottom:1.6px solid #5B6678;transform:rotate(-45deg);transition:transform .15s}
main .document-chantier-group[open]>summary::before{transform:rotate(45deg) translate(-1px,-1px)}
main .document-chantier-group>summary::after{content:none!important}
main .document-chantier-group>summary svg{width:15px!important;height:15px!important;color:#5B6678;flex:none}
main .document-chantier-group>summary small{margin-left:auto;font-weight:500;color:#5B6678}
main .document-chantier-group .document-chantier-group>summary{background:#fff!important;padding-left:40px!important;font-weight:600;color:#344054;min-height:34px;font-size:12.5px}
main .document-chantier-group .document-chantier-group .document-chantier-group>summary{padding-left:58px!important}
main .document-chantier-group-body{display:block!important;margin:0!important;padding:0!important;border:0!important;background:none!important}

/* lignes */
main details.bank-tx-row{margin:0!important;padding:0!important;border:0!important;border-bottom:1px solid #EDF0F4!important;border-radius:0!important;background:#fff!important;box-shadow:none!important}
main details.bank-tx-row>summary{display:flex!important;align-items:center;gap:14px;min-height:46px;margin:0!important;padding:0 22px 0 40px!important;border:0!important;background:transparent!important;cursor:pointer;list-style:none;font-size:13.5px}
main .document-chantier-group .document-chantier-group details.bank-tx-row>summary{padding-left:58px!important}
main details.bank-tx-row>summary::-webkit-details-marker{display:none}
main details.bank-tx-row>summary::before{content:none!important}
main details.bank-tx-row>summary::after{content:""!important;display:block!important;flex:none;width:6px;height:6px;margin-left:4px;border:0!important;border-right:1.6px solid #98A2B3!important;border-bottom:1.6px solid #98A2B3!important;transform:rotate(-45deg);transition:transform .15s;background:none!important;position:static!important}
main details.bank-tx-row[open]>summary::after{transform:rotate(45deg)}
main details.bank-tx-row:hover>summary{background:#F8FAFD!important}
main details.bank-tx-row[open]>summary{background:#F8FAFD!important}
main .bank-tx-row-date{flex:none;width:96px;font-size:13px;color:#5B6678;font-variant-numeric:tabular-nums;white-space:nowrap}
main .bank-tx-row-desc{flex:1;min-width:0;font-weight:500;color:#0F1E3D;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
main .bank-tx-amount{flex:none;min-width:110px;text-align:right;font-weight:600;color:#0B1F3A;font-variant-numeric:tabular-nums;white-space:nowrap}
main .bank-tx-row-warning{box-shadow:inset 3px 0 0 #C0362C!important}
main .bank-tx-row-missing{box-shadow:inset 3px 0 0 #D9A00B!important}
main .bank-tx-row-body{display:grid;gap:10px;margin:0!important;padding:12px 22px 14px 40px!important;background:#F8FAFD!important;border-top:1px solid #EDF0F4}
main .bank-tx-row-body>small{font-size:12.5px;color:#5B6678}
main .bank-tx-row-fields{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
main .bank-tx-row-fields>button,main .bank-tx-row-fields .document-more>summary{height:32px!important;min-height:32px!important;padding:0 12px!important;font-size:13px!important;border-radius:7px!important}
main .bank-tx-row-fields label{display:grid;gap:4px;font-size:12px;min-width:140px}
main .bank-tx-row-fields label input,main .bank-tx-row-fields label select{height:34px!important;min-height:34px!important;padding:0 9px!important;font-size:13px!important}
/* puce type de fichier (Documents) */
main details.bank-tx-row>summary .file-type-chip,main details.bank-tx-row>summary>span:first-child:not([class*=bank-tx]){flex:none}

@media(max-width:850px){
 main .list:has(> .document-chantier-group),main .list:has(> .bank-tx-row){margin:12px -14px -14px!important}
 main .document-chantier-group>summary{padding:0 14px!important}
 main .document-chantier-group .document-chantier-group>summary{padding-left:26px!important}
 main details.bank-tx-row>summary,main .document-chantier-group .document-chantier-group details.bank-tx-row>summary{padding:8px 14px!important;flex-wrap:wrap;gap:2px 10px}
 main .bank-tx-row-date{width:auto;order:3;flex-basis:100%;font-size:12px}
 main .bank-tx-row-body{padding:12px 14px!important}
}

/* =====================================================================
   Équipe — Suivi des ouvriers (registre)
   ===================================================================== */
main:has(> #settings-view.active)>header{display:none!important}
#settings-view .worker-roster-shell{display:grid;gap:16px}
#settings-view .worker-roster-toolbar{display:flex!important;flex-direction:column;gap:14px;padding:0!important;margin:0!important;background:none!important;border:0!important;box-shadow:none!important}
#settings-view .worker-roster-heading{order:1;display:grid!important;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:16px;padding:0!important;border:0!important}
#settings-view .worker-roster-heading small{display:none}
#settings-view .worker-roster-heading h2{margin:0;font-size:30px!important;font-weight:700;letter-spacing:-.02em;color:#0B1F3A}
#settings-view .worker-roster-heading p{margin:4px 0 0;font-size:15px;color:#5B6678}
#settings-view .worker-roster-toolbar-actions{display:flex;align-items:flex-end;gap:8px}
#settings-view .roster-month-field{display:flex!important;align-items:center;gap:8px;margin:0;font-size:12.5px;font-weight:500;color:#5B6678}
#settings-view .roster-month-field input{width:150px;height:38px!important;min-height:38px!important;padding:0 10px!important;font-size:13.5px!important;font-family:inherit!important}
#settings-view .worker-roster-toolbar-actions button{height:38px;font-size:13.5px!important}
#settings-view .worker-roster-summary{order:2;display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));margin:0!important;padding:0!important;background:#fff;border:1px solid var(--line)!important;border-radius:10px;overflow:hidden}
#settings-view .worker-roster-summary>div{position:relative;display:grid;gap:3px;padding:14px 18px!important;margin:0!important;border:0!important;border-left:1px solid #EDF0F4!important;background:none!important}
#settings-view .worker-roster-summary>div:first-child{border-left:0!important}
#settings-view .worker-roster-summary>div::before{content:"";position:absolute;left:0;top:14px;bottom:14px;width:3px;border-radius:0 3px 3px 0;background:#0B1F3A}
#settings-view .worker-roster-summary>.summary-critical::before{background:#C0362C}
#settings-view .worker-roster-summary>.summary-attention::before{background:#D9A00B}
#settings-view .worker-roster-summary>div:last-child::before{background:#1E8E3E}
#settings-view .worker-roster-summary dt{order:1;font-size:12px!important;font-weight:500!important;letter-spacing:0!important;text-transform:none!important;color:#5B6678!important}
#settings-view .worker-roster-summary dd{order:2;margin:0;font-size:20px!important;font-weight:700!important;font-family:inherit!important;color:#0B1F3A!important;font-variant-numeric:tabular-nums}
#settings-view .worker-roster-summary small{order:3;font-size:12px!important;color:#8A94A6!important}
#settings-view .roster-control-row{order:3;display:none!important}
#settings-view .worker-roster-panel{padding:0!important;overflow:hidden;border-radius:10px!important}
#settings-view .worker-roster-panel-head{display:flex!important;align-items:center;gap:8px;padding:10px 12px!important;margin:0!important;border-bottom:1px solid #E2E6EC!important}
#settings-view .worker-roster-panel-head h3{font-size:14px!important;margin:0}
#settings-view .worker-roster-panel-head small{font-size:12px;color:#8A94A6}
#settings-view .worker-roster-panel-head #worker-roster-sort-note{display:none}
#settings-view .wr-tools{display:flex;gap:8px;margin-left:auto;flex:1;justify-content:flex-end}
#settings-view .wr-tools .fx-search{position:relative;flex:0 1 340px;margin:0;display:block}
#settings-view .wr-tools .fx-search svg{position:absolute;left:10px;top:50%;width:16px;height:16px;transform:translateY(-50%);fill:none;stroke:#8A94A6;stroke-width:2;stroke-linecap:round}
#settings-view .wr-tools input,#settings-view .wr-tools select{height:34px!important;min-height:34px!important;font-size:13.5px!important;border-radius:7px!important}
#settings-view .wr-tools input{width:100%;padding:0 10px 0 32px!important}
#settings-view .wr-tools select{width:170px;padding:0 10px!important}
#settings-view .worker-roster-scroll{overflow-x:auto;margin:0!important;border:0!important;border-radius:0!important}
#settings-view .worker-roster-table{width:100%;min-width:980px;border-collapse:collapse!important;border-spacing:0!important;background:#fff}
#settings-view .worker-roster-table thead th{position:static!important;height:36px;padding:0 12px!important;background:#F5F6F8!important;border:0!important;border-bottom:1px solid #E2E6EC!important;text-align:left;font-size:11px!important;font-weight:600!important;letter-spacing:.05em;text-transform:uppercase;color:#5B6678!important;white-space:nowrap;box-shadow:none!important}
#settings-view .worker-roster-table thead th.numeric-heading{text-align:right}
#settings-view .worker-roster-table .sort-header{all:unset;cursor:pointer;font:inherit;letter-spacing:inherit;text-transform:inherit;color:inherit;display:inline-flex;align-items:center;gap:4px}
#settings-view .worker-roster-table .sort-header.active{color:#0B1F3A}
#settings-view .worker-roster-table tbody th,#settings-view .worker-roster-table tbody td{position:static!important;padding:10px 12px!important;border:0!important;border-bottom:1px solid #EDF0F4!important;background:#fff!important;vertical-align:middle;text-align:left;box-shadow:none!important;font-family:inherit!important}
#settings-view .worker-roster-table tbody tr:hover>*{background:#F8FAFD!important}
#settings-view .worker-roster-table tbody tr.status-critical>th{box-shadow:inset 3px 0 0 #C0362C!important}
#settings-view .worker-name-cell{display:flex!important;align-items:center;gap:10px}
#settings-view .worker-avatar--roster{width:32px!important;height:32px!important;font-size:11px!important;flex:none}
#settings-view .worker-name-cell .worker-detail-primary{all:unset;cursor:pointer;display:grid}
#settings-view .worker-name-cell .worker-detail-primary strong{font-size:13.5px;font-weight:600;color:#0B1F3A}
#settings-view .worker-name-cell .worker-detail-primary span{display:none}
#settings-view .worker-contact,#settings-view .worker-projects{display:block;margin:2px 0 0 42px;font-size:12px!important;color:#8A94A6!important;max-width:240px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#settings-view .worker-projects{display:none}
#settings-view .worker-roster-table td[data-label="Jours"],#settings-view .worker-roster-table td[data-label="Heures"],#settings-view .worker-roster-table td.worker-amount{text-align:right}
#settings-view .worker-roster-table td strong{font-size:13.5px;font-weight:600;color:#0B1F3A;font-family:inherit!important;font-variant-numeric:tabular-nums}
#settings-view .worker-roster-table td[data-label="Jours"] small,#settings-view .worker-roster-table td[data-label="Heures"] small{display:none}
#settings-view .worker-roster-table td[data-label="Tarif"]{font-size:13px;color:#344054;white-space:nowrap}
#settings-view .worker-roster-table td small{display:block;font-size:11.5px!important;color:#8A94A6!important;font-family:inherit!important}
#settings-view .worker-roster-table td.worker-amount strong{font-weight:700}
#settings-view .worker-payment-cell small{max-width:180px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#settings-view .worker-payment-cell .worker-status{display:inline-flex;align-items:center;gap:6px;height:24px;padding:0 10px!important;border-radius:999px!important;border:0!important;font-size:12px!important;font-weight:600;white-space:nowrap}
#settings-view .worker-next-rdv{font-size:13px;color:#344054}
#settings-view .worker-row-actions{display:flex;justify-content:flex-end;gap:4px}
#settings-view .worker-row-actions>button,#settings-view .worker-action-menu-trigger{height:30px!important;min-height:30px!important;padding:0 10px!important;font-size:12.5px!important;border-radius:7px!important}
#settings-view .worker-row-actions [data-worker-timesheet]{display:none}
@media(max-width:850px){
 #settings-view .worker-roster-heading{grid-template-columns:1fr}
 #settings-view .worker-roster-heading h2{font-size:24px!important}
 #settings-view .worker-roster-toolbar-actions{flex-wrap:wrap}
 #settings-view .worker-roster-summary{grid-template-columns:1fr 1fr}
 #settings-view .worker-roster-summary>div:nth-child(3){border-left:0!important}
 #settings-view .worker-roster-summary>div:nth-child(n+3){border-top:1px solid #EDF0F4!important}
 #settings-view .worker-roster-panel-head{flex-wrap:wrap}
 #settings-view .wr-tools{flex-basis:100%}
}
/* Pastilles de statut — style unique pour toute l'application */
main .worker-status{display:inline-flex!important;align-items:center;gap:6px;width:auto!important;height:24px!important;min-height:24px!important;padding:0 10px!important;border:0!important;border-radius:999px!important;font-size:12px!important;font-weight:600!important;line-height:1!important;white-space:nowrap;box-shadow:none!important;background:#F2F4F7!important;color:#475467!important}
main .worker-status:disabled{opacity:1;cursor:default}
main .worker-status .worker-status-dot{width:6px!important;height:6px!important;min-width:6px;border-radius:50%!important;background:currentColor!important;border:0!important;margin:0!important}
main .worker-status.status-good{background:#E7F5EC!important;color:#17773A!important}
main .worker-status.status-attention,main .worker-status.status-pending{background:#FDF3DC!important;color:#946200!important}
main .worker-status.status-critical{background:#FDECEA!important;color:#B42318!important}
main .worker-status.status-empty{background:#F2F4F7!important;color:#667085!important}
#settings-view .worker-payment-cell .worker-status-detail{display:block;margin-top:3px}
#settings-view .worker-row-actions>button,#settings-view .worker-action-menu-trigger{display:inline-flex!important;align-items:center;justify-content:center;line-height:1!important}
main .worker-status .worker-status-dot{padding:0!important;flex:none!important;min-height:0!important;max-width:6px!important;max-height:6px!important}
#settings-view .worker-row-actions>button[data-worker-timesheet]{display:none!important}
@media(max-width:850px){
 #settings-view .worker-roster-panel-head>div:first-child{text-align:left}
 #settings-view .worker-roster-scroll{overflow:visible}
 #settings-view .worker-roster-table{min-width:0!important;display:block}
 #settings-view .worker-roster-table thead{display:none!important}
 #settings-view .worker-roster-table tbody{display:block}
 #settings-view .worker-roster-table tbody tr{display:grid!important;grid-template-columns:1fr 1fr;gap:6px 12px;padding:12px 14px;border-bottom:1px solid #EDF0F4}
 #settings-view .worker-roster-table tbody th,#settings-view .worker-roster-table tbody td{display:block!important;padding:0!important;border:0!important;background:none!important;text-align:left!important;width:auto!important}
 #settings-view .worker-roster-table tbody th{grid-column:1/-1}
 #settings-view .worker-roster-table tbody td::before{content:attr(data-label);display:block;margin-bottom:1px;font-size:10.5px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:#8A94A6}
 #settings-view .worker-roster-table tbody td.worker-actions-cell{grid-column:1/-1}
 #settings-view .worker-roster-table tbody td.worker-actions-cell::before{content:none}
 #settings-view .worker-roster-table td[data-label="Prochain RDV"]{grid-column:1/-1}
 #settings-view .worker-roster-table td>*{display:inline}
 #settings-view .worker-roster-table td small{display:none!important}
 #settings-view .worker-roster-table td[data-label="Jours"] small,#settings-view .worker-roster-table td[data-label="Heures"] small{display:inline!important}
 #settings-view .worker-name-cell .worker-detail-primary strong{display:block!important;color:#0B1F3A!important;font-size:14.5px}
 #settings-view .worker-contact{margin-left:42px!important;margin-top:-4px!important}
 #settings-view .worker-row-actions{justify-content:flex-start}
 #settings-view .worker-row-actions>button{flex:none!important;width:auto!important}
}

/* =====================================================================
   Tableau de bord
   ===================================================================== */
#dashboard-view.active{display:flex;flex-direction:column;gap:16px}
#dashboard-view>*{margin:0!important}
#dashboard-view .hero{display:grid!important;grid-template-columns:minmax(0,1fr) 320px;align-items:center;gap:6px 24px;padding:16px 20px!important;background:#fff!important;border:1px solid var(--line)!important;border-radius:10px!important;box-shadow:none!important;color:#0F1E3D!important;min-height:0!important}
#dashboard-view .hero::before,#dashboard-view .hero::after{content:none!important}
#dashboard-view .hero>small{grid-column:1;font-size:11.5px!important;font-weight:600;letter-spacing:.05em;text-transform:uppercase;color:#5B6678!important}
#dashboard-view .hero h2{grid-column:1;margin:0!important;font-size:17px!important;font-weight:600;color:#0B1F3A!important;letter-spacing:0}
#dashboard-view .hero p{display:none}
#dashboard-view .hero .hero-progress{grid-column:1;order:3;height:6px!important;margin:6px 0 0!important;border-radius:999px;background:#EDF0F4!important;overflow:hidden}
#dashboard-view .hero .hero-progress-bar{height:100%;border-radius:999px;background:#1D5BD8!important}
#dashboard-view .hero label,#dashboard-view .hero .project-picker,#dashboard-view .hero>div:not(.hero-progress){grid-column:2;grid-row:1/5;margin:0!important;display:grid;gap:5px;font-size:12px;font-weight:500;color:#5B6678!important}
#dashboard-view .hero select{height:38px!important;min-height:38px!important;padding:0 10px!important;font-size:13.5px!important;color:#0F1E3D!important}

#dashboard-view .finance-kpi-row{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr));gap:0!important;padding:0!important;overflow:hidden;border-radius:10px!important}
#dashboard-view .finance-kpi-item{display:flex!important;align-items:center;gap:12px;padding:16px 18px!important;margin:0!important;border:0!important;border-left:1px solid #EDF0F4!important;background:none!important;box-shadow:none!important}
#dashboard-view .finance-kpi-item:first-child{border-left:0!important}
#dashboard-view .finance-kpi-item>div{display:grid;gap:2px;min-width:0}
#dashboard-view .finance-kpi-item small{font-size:12px!important;font-weight:500!important;letter-spacing:0!important;text-transform:none!important;color:#5B6678!important}
#dashboard-view .finance-kpi-item strong{font-size:19px!important;font-weight:700;color:#0B1F3A!important;font-variant-numeric:tabular-nums;white-space:nowrap}
#dashboard-view .kpi-ic{flex:none;display:grid;place-items:center;width:38px;height:38px;border-radius:10px}
#dashboard-view .kpi-ic svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
#dashboard-view .kpi-tone-blue .kpi-ic{background:#E8EFFC;color:#1F4FB5}
#dashboard-view .kpi-tone-green .kpi-ic{background:#E7F5EC;color:#17773A}
#dashboard-view .kpi-tone-amber .kpi-ic{background:#FDF3DC;color:#946200}
#dashboard-view .kpi-tone-red .kpi-ic{background:#FDECEA;color:#B42318}
#dashboard-view .finance-kpi-gauge{flex:none;width:38px;height:38px}

#dashboard-view .finance-grid{display:grid!important;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);gap:16px!important;margin:0!important}
#dashboard-view .finance-grid>.panel{margin:0!important;padding:16px 20px!important}
#dashboard-view .finance-grid .section-head{display:flex!important;justify-content:space-between;align-items:center;margin:0 0 10px!important;padding:0!important;border:0!important}
#dashboard-view .finance-grid h3{margin:0 0 10px;font-size:15px!important;font-weight:600}
#dashboard-view .finance-grid .section-head h3{margin:0}
#dashboard-view .finance-grid .section-head span{font-size:12px;color:#8A94A6}
#dashboard-view .finance-chart-svg{width:100%;height:auto;display:block}
#dashboard-view #finance-chantiers-list{display:block!important;margin:0 -20px -16px!important;border-top:1px solid #EDF0F4}
#dashboard-view .finance-chantier-row{display:grid;gap:7px;padding:12px 20px;border-bottom:1px solid #EDF0F4}
#dashboard-view .finance-chantier-row:last-child{border-bottom:0}
#dashboard-view .finance-chantier-head{display:flex;justify-content:space-between;gap:10px;font-size:13px}
#dashboard-view .finance-chantier-head strong{font-weight:600;color:#0F1E3D;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#dashboard-view .finance-chantier-head span{font-weight:600;color:#344054;font-variant-numeric:tabular-nums}
#dashboard-view .finance-chantier-bar{display:flex;height:6px;border-radius:999px;background:#EDF0F4;overflow:hidden}
#dashboard-view #finance-chantiers-list>small{display:block;padding:24px 20px;text-align:center;color:#8A94A6}

#dashboard-view .risk-indicator{display:grid!important;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:4px 16px;padding:14px 20px!important;background:#fff!important;border:1px solid var(--line)!important;border-left:3px solid #D9A00B!important;border-radius:10px!important;box-shadow:none!important}
#dashboard-view .risk-indicator-heading{display:flex;align-items:center;gap:10px;grid-row:1/3}
#dashboard-view .risk-indicator-heading small{font-size:11.5px;font-weight:600;letter-spacing:.05em;text-transform:uppercase;color:#5B6678}
#dashboard-view .risk-state{display:inline-flex;align-items:center;height:22px;padding:0 9px;border-radius:999px;background:#FDF3DC;color:#946200;font-size:11.5px;font-weight:600}
#dashboard-view #project-risk{font-size:14px;font-weight:600;color:#0B1F3A}
#dashboard-view #project-risk-detail{grid-column:2;font-size:12.5px;color:#5B6678}
#dashboard-view .risk-action{grid-column:3;grid-row:1/3;font-size:12.5px;font-weight:600;color:#1D5BD8}

#dashboard-view .cards{display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr));gap:0!important;margin:0!important;background:#fff;border:1px solid var(--line);border-radius:10px;overflow:hidden}
#dashboard-view .cards>article{display:grid;gap:8px;padding:14px 16px!important;margin:0!important;border:0!important;border-left:1px solid #EDF0F4!important;border-radius:0!important;background:none!important;box-shadow:none!important;min-height:0!important}
#dashboard-view .cards>article:first-child{border-left:0!important}
#dashboard-view .cards .kpi-head{display:flex;justify-content:space-between;align-items:center;gap:8px}
#dashboard-view .cards .kpi-head small{font-size:12px!important;font-weight:500!important;letter-spacing:0!important;text-transform:none!important;color:#5B6678!important}
#dashboard-view .cards .kpi-icon{width:16px;height:16px;color:#98A2B3}
#dashboard-view .cards strong{font-size:18px!important;font-weight:700;color:#0B1F3A!important;font-family:inherit!important;font-variant-numeric:tabular-nums}
#dashboard-view .attention-panel{padding:16px 20px!important}

@media(max-width:1200px){#dashboard-view .finance-kpi-row{grid-template-columns:repeat(3,minmax(0,1fr))}#dashboard-view .finance-kpi-item:nth-child(4){border-left:0!important}#dashboard-view .finance-kpi-item:nth-child(n+4){border-top:1px solid #EDF0F4!important}#dashboard-view .cards{grid-template-columns:repeat(3,minmax(0,1fr))}#dashboard-view .cards>article:nth-child(4){border-left:0!important}#dashboard-view .cards>article:nth-child(n+4){border-top:1px solid #EDF0F4!important}}
@media(max-width:850px){
 #dashboard-view .hero{grid-template-columns:1fr}
 #dashboard-view .hero label,#dashboard-view .hero>div:not(.hero-progress){grid-column:1;grid-row:auto}
 #dashboard-view .finance-kpi-row,#dashboard-view .cards{grid-template-columns:1fr 1fr}
 #dashboard-view .finance-kpi-item,#dashboard-view .cards>article{border-left:0!important;border-top:1px solid #EDF0F4!important}
 #dashboard-view .finance-kpi-item:nth-child(even),#dashboard-view .cards>article:nth-child(even){border-left:1px solid #EDF0F4!important}
 #dashboard-view .finance-kpi-item:nth-child(-n+2),#dashboard-view .cards>article:nth-child(-n+2){border-top:0!important}
 #dashboard-view .finance-kpi-item{padding:12px 14px!important;gap:10px}#dashboard-view .finance-kpi-item strong{font-size:16px!important}
 #dashboard-view .kpi-ic{width:32px;height:32px}
 #dashboard-view .finance-grid{grid-template-columns:1fr}
 #dashboard-view .risk-indicator{grid-template-columns:1fr}
 #dashboard-view .risk-indicator-heading,#dashboard-view .risk-action,#dashboard-view #project-risk-detail{grid-column:1;grid-row:auto}
}
#dashboard-view .cards{grid-template-columns:repeat(6,minmax(0,1fr))!important}
#dashboard-view .cards>article{justify-content:flex-start!important;align-items:stretch!important;text-align:left!important}
#dashboard-view .cards strong *{color:inherit!important;font:inherit!important}
@media(max-width:1200px){#dashboard-view .cards{grid-template-columns:repeat(3,minmax(0,1fr))!important}}
@media(max-width:850px){#dashboard-view .cards{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
#dashboard-view h2,#dashboard-view strong,#dashboard-view h3{background:none!important;-webkit-text-fill-color:currentColor!important;-webkit-background-clip:border-box!important;background-clip:border-box!important}
@media(max-width:850px){
 #dashboard-view .finance-kpi-item:last-child:nth-child(odd){grid-column:1/-1}
 #dashboard-view .finance-grid .section-head{flex-direction:row!important;text-align:left!important;align-items:center!important}
 #dashboard-view .finance-grid .section-head>div{text-align:left}
}

/* Factures — version maquette « Devis & Factures » (barre d'outils + tableau simple + pagination) */
#factures-view .fx-row[hidden]{display:none!important}
#factures-view .section-head:first-child{align-items:end}
#factures-view .fx-actions{display:flex;gap:10px;grid-column:2;grid-row:1/3;align-self:center}
#factures-view .fx-actions button{display:inline-flex;align-items:center;gap:8px;height:40px;padding:0 16px!important;font-size:14px!important;font-weight:600}
#factures-view .fx-actions svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
#factures-view .fx-register{background:none!important;border:0!important;border-radius:0!important}
#factures-view .fx-toolbar{display:flex;flex-wrap:nowrap;gap:10px;padding:0 0 14px!important;border:0!important;background:none!important}
#factures-view .fx-search{flex:0 1 320px!important}
#factures-view .fx-toolbar select,#factures-view .fx-search input{height:40px!important;min-height:40px!important;border-radius:6px!important;font-size:14px!important;background-color:#fff!important}
#factures-view .fx-toolbar select{width:auto!important;min-width:150px;padding:0 34px 0 12px!important}
#factures-view .fx-search input{padding-left:38px!important}
#factures-view .fx-search svg{left:12px!important;width:18px!important;height:18px!important;stroke:#344054!important}
#factures-view .fx-toolbar .fx-sort{margin-left:auto;min-width:200px}
#factures-view .fx-toolbar .icon-button{width:40px;height:40px;flex:none}
#factures-view .fx-table{background:#fff;border:1px solid #E2E6EC;border-radius:6px;overflow:visible}
#factures-view .fx-head,#factures-view .fx-row{display:grid!important;grid-template-columns:minmax(170px,1.1fr) minmax(0,1.6fr) 140px 120px 104px 104px 108px!important;column-gap:14px!important;align-items:center}
#factures-view .fx-head{height:44px!important;padding:0 16px!important;background:#F5F6F8!important;border-bottom:1px solid #E2E6EC!important;border-radius:6px 6px 0 0}
#factures-view .fx-head span{font-size:13.5px!important;font-weight:600!important;letter-spacing:0!important;text-transform:none!important;color:#0F1E3D!important;text-align:left!important}
#factures-view .fx-row{min-height:50px!important;padding:6px 16px!important}
#factures-view .fx-row:last-child{border-bottom:0!important;border-radius:0 0 6px 6px}
#factures-view .fx-row-late{box-shadow:none!important}
#factures-view .fx-c-num{display:flex;align-items:center;gap:12px;min-width:0}
#factures-view .fx-doc{flex:none;width:22px;height:22px;fill:none;stroke:#1D5BD8;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
#factures-view .fx-c-num strong{font-family:inherit!important;font-size:14px;font-weight:500;color:#0F1E3D;letter-spacing:0;white-space:nowrap}
#factures-view .fx-c-num .duplicate-tag{padding:0 6px;font-size:12px}
#factures-view .fx-c-client{display:grid;min-width:0}
#factures-view .fx-c-client span{font-size:14px;color:#0F1E3D;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#factures-view .fx-c-client small{font-size:12px;color:#8A94A6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#factures-view .fx-c-amt{text-align:left!important;font-size:14px!important;font-weight:400!important;color:#0F1E3D!important}
#factures-view .fx-c-date{font-size:14px!important;color:#0F1E3D!important}
#factures-view .fx-late{color:#C0362C!important;font-weight:500!important}
#factures-view .fx-c-status .worker-status{height:26px!important;padding:0 10px!important;border-radius:5px!important;font-size:13px!important;font-weight:500!important;border:1px solid transparent!important}
#factures-view .fx-c-status .worker-status-dot{display:none!important}
#factures-view .fx-c-status .worker-status.status-good{background:#EAF6EC!important;color:#1E6B34!important;border-color:#BFE3C8!important}
#factures-view .fx-c-status .worker-status.status-attention{background:#FFF6E5!important;color:#B45309!important;border-color:#F8D9A8!important}
#factures-view .fx-c-status .worker-status.status-critical{background:#FDECEC!important;color:#B42318!important;border-color:#F5C2C0!important}
#factures-view .fx-c-notes{grid-column:2/-1!important}
#factures-view .fx-foot{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:14px 0 0}
#factures-view #fx-count{font-size:13.5px;color:#344054}
#factures-view .fx-pages{display:flex;gap:8px}
#factures-view .fx-pages button{display:grid;place-items:center;width:38px;height:38px;padding:0!important;border:1px solid #D0D5DD!important;border-radius:6px!important;background:#fff!important;color:#0F1E3D!important;font-size:14px!important;font-weight:500;box-shadow:none!important;min-height:0!important}
#factures-view .fx-pages button.active{background:#0B1F3A!important;border-color:#0B1F3A!important;color:#fff!important}
#factures-view .fx-pages button:disabled{opacity:.45;cursor:default}
#factures-view .fx-pages svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
@media(max-width:1180px){#factures-view .fx-head,#factures-view .fx-row{grid-template-columns:minmax(150px,1fr) minmax(0,1.4fr) 120px 110px 96px 96px!important}#factures-view .fx-head span:nth-child(6),#factures-view .fx-row .fx-c-due{display:none!important}#factures-view .fx-toolbar{flex-wrap:wrap}#factures-view .fx-toolbar .fx-sort{margin-left:0}}
@media(max-width:850px){
 #factures-view .section-head:first-child{grid-template-columns:1fr!important}
 #factures-view .fx-actions{grid-column:1;grid-row:auto}
 #factures-view .fx-actions button{flex:1;justify-content:center}
 #factures-view .fx-search{flex:1 1 100%!important}
 #factures-view .fx-toolbar select{flex:1;min-width:0}
 #factures-view .fx-head{display:none!important}
 #factures-view .fx-row{grid-template-columns:minmax(0,1fr) auto!important;row-gap:4px!important;padding:12px 14px!important}
 #factures-view .fx-c-num{grid-column:1}
 #factures-view .fx-c-amt{grid-column:2;grid-row:1;font-weight:600!important;text-align:right!important}
 #factures-view .fx-c-client{grid-column:1}
 #factures-view .fx-c-status{grid-column:2;grid-row:2;justify-self:end}
 #factures-view .fx-row .fx-c-date{display:block!important;grid-column:1;font-size:12.5px!important;color:#5B6678!important}
 #factures-view .fx-row .fx-c-due{display:none!important}
 #factures-view .fx-c-act{grid-column:2;grid-row:3}
 #factures-view .fx-foot{flex-direction:column;align-items:flex-start}
}
#factures-view .fx-search{flex:1 1 260px!important}
#factures-view .fx-toolbar select{flex:none!important;min-width:170px!important}
#factures-view .fx-toolbar #fx-filter{min-width:220px!important;max-width:260px}
#factures-view .fx-toolbar .fx-sort{min-width:220px!important}
#factures-view .fx-c-client small{display:none}
@media(max-width:850px){#factures-view .fx-toolbar select,#factures-view .fx-toolbar #fx-filter,#factures-view .fx-toolbar .fx-sort{flex:1 1 45%!important;min-width:0!important;max-width:none}}
#factures-view .fx-toolbar #fx-filter{min-width:200px!important;max-width:220px}
#factures-view .fx-toolbar #fx-status,#factures-view .fx-toolbar #fx-period{min-width:150px!important}
#factures-view .fx-toolbar .fx-sort{min-width:205px!important}
@media(max-width:850px){#factures-view .fx-toolbar #fx-filter{flex:1 1 100%!important;max-width:none!important}}

/* =====================================================================
   Registre simple (modèle « Devis & Factures ») — réutilisé par les pages listes
   ===================================================================== */
.rg-page>.section-head:first-child{grid-template-columns:minmax(0,1fr) auto!important;align-items:end}
.rg-page .rg-actions{display:flex;gap:10px;grid-column:2;grid-row:1/3;align-self:center}
.rg-page .rg-actions button{display:inline-flex;align-items:center;gap:8px;height:40px;padding:0 16px!important;font-size:14px!important;font-weight:600}
.rg-page .rg-actions svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.rg-page .rg-toolbar{display:flex;gap:10px;padding:0 0 14px;align-items:center}
.rg-page .rg-search{position:relative;flex:1 1 260px;margin:0;display:block}
.rg-page .rg-search svg{position:absolute;left:12px;top:50%;width:18px;height:18px;transform:translateY(-50%);fill:none;stroke:#344054;stroke-width:2;stroke-linecap:round}
.rg-page .rg-search input{width:100%;padding:0 12px 0 38px!important}
.rg-page .rg-toolbar select,.rg-page .rg-search input{height:40px!important;min-height:40px!important;border-radius:6px!important;font-size:14px!important;background-color:#fff!important}
.rg-page .rg-toolbar select{flex:none;min-width:160px;padding:0 34px 0 12px!important}
.rg-page .rg-toolbar .rg-sort{margin-left:auto;min-width:205px}
.rg-page .rg-toolbar .icon-button{width:40px;height:40px;flex:none}
.rg-page .rg-table{background:#fff;border:1px solid #E2E6EC;border-radius:6px}
.rg-page .rg-head,.rg-page .rg-row{display:grid;column-gap:14px;align-items:center}
.rg-page .rg-head{height:44px;padding:0 16px;background:#F5F6F8;border-bottom:1px solid #E2E6EC;border-radius:6px 6px 0 0}
.rg-page .rg-head span{font-size:13.5px;font-weight:600;color:#0F1E3D}
.rg-page .rg-list{display:block!important;margin:0!important;border:0!important;gap:0!important}
.rg-page .rg-row{min-height:50px;padding:6px 16px;border-bottom:1px solid #EDF0F4;background:#fff;position:relative}
.rg-page .rg-row:last-child{border-bottom:0;border-radius:0 0 6px 6px}
.rg-page .rg-row:hover{background:#F8FAFD}
.rg-page .rg-row[hidden]{display:none!important}
.rg-page .rg-name{display:flex;align-items:center;gap:12px;min-width:0}
.rg-page .rg-name>div{display:grid;min-width:0}
.rg-page .rg-name strong{font-size:14px;font-weight:500;color:#0F1E3D;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rg-page .rg-name small{display:flex;flex-wrap:wrap;gap:4px;margin-top:2px}
.rg-page .rg-name small .production-method-tag{font-size:11px;padding:1px 6px}
.rg-page .rg-cell{display:grid;font-size:14px;color:#0F1E3D;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rg-page .rg-cell small{font-size:12px;color:#8A94A6}
.rg-page .rg-muted{color:#344054}
.rg-page .rg-num{font-variant-numeric:tabular-nums}
.rg-page .rg-act{display:flex;justify-content:flex-end;align-items:center;gap:2px;position:relative}
.rg-page .rg-icon,.rg-page .rg-act>details>summary{display:grid;place-items:center;width:32px;height:32px;padding:0!important;margin:0;border:0!important;border-radius:7px!important;background:transparent!important;color:#5B6678;cursor:pointer;list-style:none;font-size:18px;line-height:1;box-shadow:none!important;min-height:0!important}
.rg-page .rg-act>details>summary::-webkit-details-marker{display:none}
.rg-page .rg-act>details>summary::before,.rg-page .rg-act>details>summary::after{content:none!important;display:none!important}
.rg-page .rg-icon:hover,.rg-page .rg-act>details>summary:hover,.rg-page .rg-act>details[open]>summary{background:#EEF2F7!important;color:#0B1F3A}
.rg-page .rg-icon svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.rg-page .rg-act>details{position:static;margin:0;border:0;background:none;padding:0}
.rg-page .rg-act .document-more-menu{position:absolute;right:0;top:calc(100% + 6px);z-index:30;min-width:240px;margin:0;padding:6px;display:grid;gap:2px;background:#fff;border:1px solid #E2E6EC;border-radius:9px;box-shadow:0 12px 32px rgba(16,24,40,.14)}
.rg-page .rg-act .document-more-menu button{justify-content:flex-start;width:100%;height:34px;padding:0 10px!important;border:0!important;background:transparent!important;font-size:13px!important;font-weight:500;text-align:left;border-radius:6px!important;color:#344054}
.rg-page .rg-act .document-more-menu button:hover{background:#F2F4F7!important}
.rg-page .rg-act .document-more-menu .delete-document,.rg-page .rg-act .document-more-menu .danger{color:#B42318!important}
.rg-page .rg-empty{display:block;padding:28px 16px;text-align:center;color:#8A94A6}
.rg-page .rg-foot{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:14px 0 0}
.rg-page .rg-foot>span{font-size:13.5px;color:#344054}
.rg-page .rg-pages{display:flex;gap:8px}
.rg-page .rg-pages button{display:grid;place-items:center;width:38px;height:38px;padding:0!important;border:1px solid #D0D5DD!important;border-radius:6px!important;background:#fff!important;color:#0F1E3D!important;font-size:14px!important;font-weight:500;box-shadow:none!important;min-height:0!important}
.rg-page .rg-pages button.active{background:#0B1F3A!important;border-color:#0B1F3A!important;color:#fff!important}
.rg-page .rg-pages button:disabled{opacity:.45;cursor:default}
.rg-page .rg-pages svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

/* Documents */
#documents-view .doc-table .rg-head,#documents-view .doc-row{grid-template-columns:minmax(0,2.2fr) 150px minmax(0,1.3fr) 104px 80px 110px}
#documents-view .doc-row .document-thumb{flex:none;width:34px;height:34px;object-fit:cover;border-radius:6px;background:#EDF0F4;border:1px solid #E2E6EC;cursor:zoom-in;margin:0}
#documents-view .doc-row .doc-type-chip{flex:none;display:grid;place-items:center;min-width:42px;height:26px;padding:0 6px;border-radius:5px;font-size:11px;font-weight:700;letter-spacing:.02em}
#documents-view .doc-row .document-explanation{grid-column:1/-1;margin:6px 0 4px;padding:12px 14px;background:#F8FAFD;border:1px solid #E2E6EC;border-radius:8px;font-size:13.5px}
#documents-view .doc-row .document-explanation[hidden]{display:none}
/* panneau « Ajouter un document » en volet latéral */
#documents-view #upload-form-panel{position:fixed;top:0;right:0;bottom:0;z-index:200;width:min(460px,100%);margin:0!important;padding:0!important;display:flex;flex-direction:column;background:#fff!important;border:0!important;border-radius:0!important;box-shadow:0 0 0 100vmax rgba(11,31,58,.35),-12px 0 40px rgba(16,24,40,.18)!important;overflow:auto;animation:fxIn .18s ease-out}
#documents-view #upload-form-panel[hidden]{display:none!important}
#documents-view #upload-form-panel .worker-add-panel-head{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:18px 20px;margin:0;border-bottom:1px solid #E2E6EC;position:sticky;top:0;background:#fff;z-index:1}
#documents-view #upload-form-panel .worker-add-panel-head small{display:none}
#documents-view #upload-form-panel .worker-add-panel-head h3{margin:0;font-size:17px!important}
#documents-view #upload-form-panel form{margin:0!important;padding:16px 20px!important;border:0!important;box-shadow:none!important;border-radius:0!important;display:grid;gap:12px}
#documents-view #upload-form-panel form label{margin:0;display:grid;gap:5px;font-size:12.5px;font-weight:500}
#documents-view #upload-form-panel form .form-row{grid-template-columns:1fr!important;margin:0}

@media(max-width:1180px){#documents-view .doc-table .rg-head,#documents-view .doc-row{grid-template-columns:minmax(0,2fr) 130px 100px 76px 100px}#documents-view .doc-table .rg-head span:nth-child(3),#documents-view .doc-row>.rg-cell:nth-of-type(2){display:none}.rg-page .rg-toolbar{flex-wrap:wrap}.rg-page .rg-toolbar .rg-sort{margin-left:0}}
@media(max-width:850px){
 .rg-page>.section-head:first-child{grid-template-columns:1fr!important}
 .rg-page .rg-actions{grid-column:1;grid-row:auto}.rg-page .rg-actions button{flex:1;justify-content:center}
 .rg-page .rg-search{flex:1 1 100%}
 .rg-page .rg-toolbar select,.rg-page .rg-toolbar .rg-sort{flex:1 1 40%;min-width:0}
 .rg-page .rg-head{display:none}
 .rg-page .rg-foot{flex-direction:column;align-items:flex-start}
 #documents-view .doc-row{grid-template-columns:minmax(0,1fr) auto;row-gap:2px;padding:10px 14px}
 #documents-view .doc-row .rg-name{grid-column:1}
 #documents-view .doc-row>.rg-cell{display:none}
 #documents-view .doc-row>.rg-cell:nth-of-type(3){display:block;grid-column:1;padding-left:54px;font-size:12px;color:#8A94A6}
 #documents-view .doc-row .rg-act{grid-column:2;grid-row:1/3}
}
main .rg-page .rg-toolbar select{width:auto!important;flex:none!important;min-width:160px!important}
main .rg-page .rg-toolbar .rg-sort{min-width:205px!important;margin-left:auto!important}
main .rg-page .rg-search{flex:1 1 260px!important;width:auto!important;display:block!important}
main .rg-page .rg-search input{width:100%!important}
@media(max-width:850px){main .rg-page .rg-toolbar select,main .rg-page .rg-toolbar .rg-sort{flex:1 1 40%!important;min-width:0!important;margin-left:0!important}main .rg-page .rg-search{flex:1 1 100%!important}}
/* Dépenses */
#purchases-view .section-head:first-child>span strong{color:#0B1F3A;font-weight:700}
#purchases-view .rg-export{margin:0;display:block}
#purchases-view .rg-export select{height:40px!important;min-height:40px!important;min-width:190px;padding:0 34px 0 12px!important;border-radius:6px!important;font-size:14px!important;font-weight:600;background-color:#fff!important}
#purchases-view .rg-inline-select{margin:0;display:block}
#purchases-view .rg-inline-select[hidden]{display:none}
#purchases-view .rg-inline-select select{width:auto!important;min-width:150px;height:40px!important;min-height:40px!important;padding:0 34px 0 12px!important;border-radius:6px!important;font-size:14px!important}
#purchases-view .pur-table .rg-head,#purchases-view .pur-row{grid-template-columns:minmax(0,2fr) 150px minmax(0,1.3fr) 104px 120px 76px}
#purchases-view .rg-head span:nth-child(5),#purchases-view .rg-amount{text-align:right}
#purchases-view .rg-amount{font-weight:600}
#purchases-view .pur-ic{flex:none;display:grid;place-items:center;width:32px;height:32px;border-radius:8px;background:#EEF2F7;color:#344054;font-size:13px;font-weight:700}
#purchases-view .pur-ic-material{background:#E8EFFC;color:#1F4FB5}
#purchases-view .pur-ic-tools,#purchases-view .pur-ic-machines{background:#F1ECFB;color:#6941C6}
#purchases-view .pur-ic-subcontracting{background:#FDF3DC;color:#946200}
#purchases-view .pur-ic-fuel,#purchases-view .pur-ic-transport{background:#E7F5EC;color:#17773A}
#purchases-view .pur-ic-meals{background:#FDECEA;color:#B42318}
#purchases-view .rg-sub{display:block!important;font-size:12px;color:#8A94A6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#purchases-view .rg-cell small .worker-status{height:20px!important;font-size:11px!important;margin-top:2px}
#purchases-view .pur-row.bank-tx-row-warning,#purchases-view .pur-row.bank-tx-row-missing{box-shadow:none!important}
#purchases-view .rg-note{grid-column:1/-1;font-size:12px;padding-left:44px}
#purchases-view .rg-note .bank-match-note{padding:0!important;border:0!important;background:none!important}
#purchases-view #purchase-form-panel{position:fixed;top:0;right:0;bottom:0;z-index:200;width:min(460px,100%);margin:0!important;padding:0!important;display:flex;flex-direction:column;background:#fff!important;border:0!important;border-radius:0!important;box-shadow:0 0 0 100vmax rgba(11,31,58,.35),-12px 0 40px rgba(16,24,40,.18)!important;overflow:auto;animation:fxIn .18s ease-out}
#purchases-view #purchase-form-panel[hidden]{display:none!important}
#purchases-view #purchase-form-panel .worker-add-panel-head{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:18px 20px;margin:0;border-bottom:1px solid #E2E6EC;position:sticky;top:0;background:#fff;z-index:1}
#purchases-view #purchase-form-panel .worker-add-panel-head small{display:none}
#purchases-view #purchase-form-panel .worker-add-panel-head h3{margin:0;font-size:17px!important}
#purchases-view #purchase-form-panel form{margin:0!important;padding:16px 20px!important;border:0!important;box-shadow:none!important;border-radius:0!important;display:grid;gap:12px}
#purchases-view #purchase-form-panel form label{margin:0;display:grid;gap:5px;font-size:12.5px;font-weight:500}
#purchases-view #purchase-form-panel form .form-row{grid-template-columns:1fr!important;margin:0}
@media(max-width:850px){
 #purchases-view .rg-actions{flex-wrap:wrap}#purchases-view .rg-export,#purchases-view .rg-export select{width:100%!important}
 #purchases-view .pur-row{grid-template-columns:minmax(0,1fr) auto;row-gap:2px;padding:10px 14px}
 #purchases-view .pur-row>.rg-cell{display:none}
 #purchases-view .pur-row>.rg-amount{display:block;grid-column:2;grid-row:1;text-align:right}
 #purchases-view .pur-row .rg-act{grid-column:2;grid-row:2}
}
/* Documents : onglets Fichiers / Photos + galerie */
.rg-page .rg-tabs{display:flex;gap:4px;margin:0 0 14px;border-bottom:1px solid #E2E6EC}
.rg-page .rg-tabs button{display:inline-flex;align-items:center;gap:8px;height:40px;margin-bottom:-1px;padding:0 14px!important;border:0!important;border-bottom:2px solid transparent!important;border-radius:0!important;background:none!important;box-shadow:none!important;font-size:14px!important;font-weight:600;color:#5B6678!important;cursor:pointer}
.rg-page .rg-tabs button svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.rg-page .rg-tabs button span{display:inline-grid;place-items:center;min-width:22px;height:20px;padding:0 6px;border-radius:999px;background:#EEF2F7;font-size:12px;color:#344054}
.rg-page .rg-tabs button.active{color:#0B1F3A!important;border-bottom-color:#0B1F3A!important}
.rg-page .rg-tabs button.active span{background:#0B1F3A;color:#fff}
#documents-view .doc-table.is-photos{background:none;border:0}
#documents-view .doc-table.is-photos .rg-head{display:none}
#documents-view .doc-table.is-photos #documents{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:14px}
#documents-view .doc-table.is-photos .doc-row{display:flex!important;flex-direction:column;align-items:stretch;gap:0;padding:0;min-height:0;border:1px solid #E2E6EC;border-radius:8px!important;overflow:hidden}
#documents-view .doc-table.is-photos .doc-row[hidden]{display:none!important}
#documents-view .doc-table.is-photos .rg-name{flex-direction:column;align-items:stretch;gap:0}
#documents-view .doc-table.is-photos .document-thumb{width:100%;height:auto;aspect-ratio:4/3;border-radius:0;border:0;border-bottom:1px solid #E2E6EC}
#documents-view .doc-table.is-photos .rg-name>div{padding:10px 12px 0}
#documents-view .doc-table.is-photos .rg-name strong{font-size:13px}
#documents-view .doc-table.is-photos .doc-row>.rg-cell{display:none}
#documents-view .doc-table.is-photos .doc-row>.rg-cell:nth-of-type(3){display:block;padding:2px 12px 0;font-size:12px;color:#8A94A6}
#documents-view .doc-table.is-photos .rg-act{justify-content:flex-start;padding:4px 6px 6px}
@media(max-width:850px){#documents-view .doc-table.is-photos #documents{grid-template-columns:1fr 1fr;gap:10px}#documents-view .doc-table.is-photos .doc-row>.rg-cell:nth-of-type(3){padding-left:12px}}
/* « Nouveau document » — fenêtre centrée */
#documents-view #upload-form-panel.ud-modal{position:fixed!important;inset:0!important;z-index:220;width:auto!important;display:grid!important;place-items:center;padding:24px!important;background:none!important;box-shadow:none!important;overflow:auto;animation:none}
#documents-view #upload-form-panel.ud-modal[hidden]{display:none!important}
.ud-backdrop{position:fixed;inset:0;background:rgba(11,31,58,.45)}
.ud-dialog{position:relative;width:min(620px,100%);background:#fff;border-radius:14px;box-shadow:0 24px 64px rgba(16,24,40,.28);animation:udIn .18s ease-out}
@keyframes udIn{from{transform:translateY(10px) scale(.98);opacity:0}to{transform:none;opacity:1}}
#documents-view .ud-head{position:static!important;display:flex!important;justify-content:space-between;align-items:flex-start;gap:16px;padding:22px 24px 6px!important;border:0!important;background:none!important}
#documents-view .ud-head h3{margin:0;font-size:20px!important;font-weight:700;color:#0B1F3A}
#documents-view .ud-head p{margin:4px 0 0;font-size:13.5px;color:#5B6678}
.ud-close{display:grid;place-items:center;width:34px;height:34px;padding:0!important;border:0!important;border-radius:8px!important;background:transparent!important;color:#5B6678;cursor:pointer;box-shadow:none!important;min-height:0!important}
.ud-close:hover{background:#F2F4F7!important;color:#0B1F3A}
.ud-close svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
#documents-view .ud-form{display:grid!important;gap:18px;padding:14px 24px 22px!important;margin:0!important;border:0!important;box-shadow:none!important;background:none!important}
.ud-drop{position:relative;display:grid!important;justify-items:center;gap:6px;padding:26px 16px;border:1.5px dashed #C3CAD5;border-radius:12px;background:#F8FAFC;text-align:center;cursor:pointer;transition:border-color .15s,background .15s;margin:0!important}
.ud-drop:hover,.ud-drop.is-over{border-color:#1D5BD8;background:#F2F6FF}
.ud-drop.has-file{border-style:solid;border-color:#1E8E3E;background:#F1FAF3}
.ud-drop input[type=file]{position:absolute!important;inset:0;width:100%!important;height:100%!important;opacity:0;cursor:pointer;padding:0!important;border:0!important}
.ud-drop-ic{display:grid;place-items:center;width:46px;height:46px;border-radius:50%;background:#fff;border:1px solid #E2E6EC;color:#1D5BD8}
.ud-drop.has-file .ud-drop-ic{color:#1E8E3E}
.ud-drop-ic svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.ud-drop strong{font-size:15px;font-weight:600;color:#0B1F3A;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ud-drop small{font-size:12.5px;color:#5B6678}
.ud-drop small u{color:#1D5BD8;text-decoration:none;font-weight:600}
.ud-section{display:grid;gap:8px}
.ud-label,.ud-field{font-size:12.5px!important;font-weight:600!important;color:#344054!important}
.ud-tiles{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}
.ud-tile{display:grid!important;justify-items:center;align-content:center;gap:3px;height:auto!important;min-height:92px!important;padding:12px 6px!important;border:1px solid #E2E6EC!important;border-radius:10px!important;background:#fff!important;color:#344054!important;cursor:pointer;text-align:center;box-shadow:none!important;transition:border-color .15s,box-shadow .15s}
.ud-tile svg{width:24px;height:24px;margin-bottom:4px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;color:#5B6678}
.ud-tile strong{font-size:12.5px;font-weight:600;color:#0F1E3D;line-height:1.2}
.ud-tile small{font-size:11px;color:#8A94A6;line-height:1.2}
.ud-tile:hover{border-color:#B9C3D2!important}
.ud-tile.active{border-color:#0B1F3A!important;box-shadow:0 0 0 1px #0B1F3A!important;background:#F7F9FC!important}
.ud-tile.active svg{color:#0B1F3A}
.ud-hidden-select{position:absolute!important;width:1px!important;height:1px!important;opacity:0;pointer-events:none;min-height:0!important;padding:0!important;border:0!important}
.ud-row{display:grid;grid-template-columns:1.6fr 1fr;gap:12px}
.ud-field{display:grid!important;gap:6px;margin:0!important}
.ud-field[hidden]{display:none!important}
.ud-field select{height:40px!important;min-height:40px!important;padding:0 12px!important;font-size:14px!important;font-weight:400!important;border-radius:8px!important}
#documents-view #upload-form-delete-chantier{display:none!important}
.ud-foot{display:flex;justify-content:flex-end;gap:10px;padding-top:16px;margin:0 -24px;padding-left:24px;padding-right:24px;border-top:1px solid #EDF0F4}
.ud-foot button{height:40px;padding:0 18px!important;font-size:14px!important;font-weight:600}
#upload-form-message{margin:0;font-size:13px}
@media(max-width:640px){
 #documents-view #upload-form-panel.ud-modal{padding:0!important;place-items:end center}
 .ud-dialog{border-radius:14px 14px 0 0;max-height:92vh;overflow:auto}
 .ud-tiles{grid-template-columns:repeat(3,minmax(0,1fr))}
 .ud-row{grid-template-columns:1fr}
}
/* Carnet de bord */
#vehicles-view .rg-actions svg{width:17px;height:17px}
.veh-strip{margin:0 0 18px}
.veh-strip-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}
.veh-strip-head h3{margin:0;font-size:13px!important;font-weight:600;letter-spacing:.05em;text-transform:uppercase;color:#5B6678}
.veh-add{display:inline-flex;align-items:center;gap:6px;height:30px;padding:0 10px!important;border:0!important;background:none!important;box-shadow:none!important;color:#1D5BD8!important;font-size:13.5px!important;font-weight:600;cursor:pointer}
.veh-add svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
#vehicles-view .veh-list{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:10px;margin:0!important}
#vehicles-view .veh-card{display:flex!important;align-items:center;gap:12px;margin:0!important;padding:12px 12px 12px 14px!important;background:#fff!important;border:1px solid #E2E6EC!important;border-radius:10px!important;box-shadow:none!important;position:relative}
.veh-ic{flex:none;display:grid;place-items:center;width:40px;height:40px;border-radius:10px;background:#E8EFFC;color:#1F4FB5}
.veh-ic svg,.trip-ic svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.veh-txt{display:grid;gap:1px;min-width:0;flex:1}
.veh-txt strong{font-size:14px;font-weight:600;color:#0B1F3A}
.veh-plate{justify-self:start;padding:1px 6px;border:1px solid #C9D0DA;border-radius:4px;font-family:'IBM Plex Mono',ui-monospace,monospace;font-size:11.5px;color:#344054;background:#F8FAFC}
.veh-txt small{font-size:12px;color:#8A94A6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#vehicles-view .veh-more{position:static;margin:0;border:0;background:none;padding:0}
#vehicles-view .veh-more>summary{display:grid;place-items:center;width:32px;height:32px;padding:0!important;border:0!important;border-radius:7px!important;background:transparent!important;color:#5B6678;cursor:pointer;list-style:none;font-size:18px;box-shadow:none!important}
#vehicles-view .veh-more>summary::-webkit-details-marker{display:none}
#vehicles-view .veh-more>summary::before,#vehicles-view .veh-more>summary::after{content:none!important}
#vehicles-view .veh-more>summary:hover,#vehicles-view .veh-more[open]>summary{background:#EEF2F7!important}
#vehicles-view .veh-more .document-more-menu{position:absolute;right:8px;top:calc(100% - 4px);z-index:30;min-width:230px;padding:6px;display:grid;gap:2px;background:#fff;border:1px solid #E2E6EC;border-radius:9px;box-shadow:0 12px 32px rgba(16,24,40,.14)}
#vehicles-view .veh-more .document-more-menu button{justify-content:flex-start;width:100%;height:34px;padding:0 10px!important;border:0!important;background:transparent!important;font-size:13px!important;font-weight:500;text-align:left;border-radius:6px!important;color:#344054}
#vehicles-view .veh-more .document-more-menu button:hover{background:#F2F4F7!important}
#vehicles-view .veh-more .document-more-menu .danger{color:#B42318!important}
.veh-empty{display:block;padding:14px 16px;border:1px dashed #C9D0DA;border-radius:10px;color:#8A94A6;font-size:13px}
#vehicles-view .trip-table .rg-head,#vehicles-view .trip-row{grid-template-columns:100px minmax(0,1.8fr) minmax(0,1.3fr) 150px 96px 110px 44px}
#vehicles-view .trip-table .rg-head span:nth-child(5),#vehicles-view .trip-table .rg-head span:nth-child(6),#vehicles-view .trip-km,#vehicles-view .rg-amount{text-align:right}
#vehicles-view .rg-amount{font-weight:600}
.trip-ic{flex:none;display:grid;place-items:center;width:32px;height:32px;border-radius:8px;background:#EEF2F7;color:#344054}
.trip-type{display:inline-flex;align-items:center;height:24px;padding:0 9px;border-radius:5px;font-size:12.5px;font-weight:500;border:1px solid}
.trip-type-professionnel{background:#EEF4FF;color:#1F4FB5;border-color:#C7D7FB}
.trip-type-domicile-travail{background:#F4F1FD;color:#5B3FB0;border-color:#DCD2F7}
.trip-type-prive{background:#F2F4F7;color:#475467;border-color:#D9DEE5}
#vehicles-view .rg-sub{display:block!important;font-size:12px;color:#8A94A6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#vehicles-view .rg-inline-select{margin:0;display:block}
#vehicles-view .rg-inline-select[hidden]{display:none}
#vehicles-view .rg-inline-select select{width:auto!important;min-width:170px;height:40px!important;min-height:40px!important;padding:0 34px 0 12px!important;border-radius:6px!important;font-size:14px!important}
/* formulaires véhicule / trajet / dépense / facture : fenêtre centrée (même modèle que Nouveau document) */
#vehicles-view #vehicle-form-panel,#vehicles-view #trip-form-panel{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);z-index:220;width:min(560px,calc(100% - 32px));max-height:calc(100vh - 48px);overflow:auto;margin:0!important;padding:0!important;background:#fff!important;border:0!important;border-radius:14px!important;box-shadow:0 0 0 100vmax rgba(11,31,58,.45),0 24px 64px rgba(16,24,40,.28)!important;animation:udIn .18s ease-out}
#vehicles-view #vehicle-form-panel[hidden],#vehicles-view #trip-form-panel[hidden]{display:none!important}
#vehicles-view #vehicle-form-panel .worker-add-panel-head,#vehicles-view #trip-form-panel .worker-add-panel-head{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:20px 24px 8px;margin:0;border:0;position:sticky;top:0;background:#fff;z-index:1}
#vehicles-view #vehicle-form-panel .worker-add-panel-head small,#vehicles-view #trip-form-panel .worker-add-panel-head small{display:none}
#vehicles-view #vehicle-form-panel h3,#vehicles-view #trip-form-panel h3{margin:0;font-size:20px!important;font-weight:700;color:#0B1F3A}
#vehicles-view #vehicle-form-panel form,#vehicles-view #trip-form-panel form{margin:0!important;padding:8px 24px 22px!important;border:0!important;box-shadow:none!important;border-radius:0!important;display:grid;gap:14px}
#vehicles-view #vehicle-form-panel form label,#vehicles-view #trip-form-panel form label{margin:0;display:grid;gap:6px;font-size:12.5px;font-weight:600;color:#344054}
#vehicles-view #vehicle-form-panel form .form-row,#vehicles-view #trip-form-panel form .form-row{grid-template-columns:1fr 1fr!important;gap:12px;margin:0}
#vehicles-view #vehicle-form-panel form button.primary,#vehicles-view #trip-form-panel form button.primary{height:42px;margin-top:4px}
@media(max-width:1180px){#vehicles-view .trip-table .rg-head,#vehicles-view .trip-row{grid-template-columns:96px minmax(0,1.8fr) 140px 90px 104px 44px}#vehicles-view .trip-table .rg-head span:nth-child(3),#vehicles-view .trip-row>.rg-cell:nth-of-type(2){display:none}}
@media(max-width:850px){
 #vehicles-view .rg-actions{flex-wrap:wrap}#vehicles-view .rg-actions .secondary{flex:1 1 40%}#vehicles-view .rg-actions .primary{flex:1 1 100%}
 #vehicles-view .trip-row{grid-template-columns:minmax(0,1fr) auto;row-gap:2px;padding:10px 14px}
 #vehicles-view .trip-row>.rg-cell{display:none}
 #vehicles-view .trip-row .rg-name{grid-column:1;grid-row:1}
 #vehicles-view .trip-row>.rg-amount{display:block;grid-column:2;grid-row:1}
 #vehicles-view .trip-row>.trip-date{display:block;grid-column:1;grid-row:2;padding-left:44px;font-size:12px;color:#8A94A6}
 #vehicles-view .trip-row .rg-act{grid-column:2;grid-row:2}
 #vehicles-view #vehicle-form-panel,#vehicles-view #trip-form-panel{top:auto;bottom:0;transform:translateX(-50%);width:100%;border-radius:14px 14px 0 0!important}
 #vehicles-view #trip-form-panel form .form-row{grid-template-columns:1fr!important}
}
main .rg-page .rg-toolbar select.rg-hidden{display:none!important}
.rg-page .rg-chips{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 12px}
.rg-page .rg-chips:empty{display:none}
.rg-page .rg-chip{display:inline-flex;align-items:center;gap:7px;height:32px;padding:0 12px!important;border:1px solid #D0D5DD!important;border-radius:999px!important;background:#fff!important;box-shadow:none!important;font-size:13px!important;font-weight:500;color:#344054!important;cursor:pointer;min-height:0!important}
.rg-page .rg-chip span{display:inline-grid;place-items:center;min-width:20px;height:18px;padding:0 5px;border-radius:999px;background:#EEF2F7;font-size:11.5px;font-weight:600;color:#475467}
.rg-page .rg-chip:hover{border-color:#98A2B3!important}
.rg-page .rg-chip.active{background:#0B1F3A!important;border-color:#0B1F3A!important;color:#fff!important}
.rg-page .rg-chip.active span{background:rgba(255,255,255,.18);color:#fff}
#vehicles-view .rg-export select{min-width:220px}
/* Compte société */
#bank-view .bk-import{display:inline-flex!important;align-items:center;gap:8px;height:40px;padding:0 16px!important;border-radius:8px;font-size:14px!important;font-weight:600;cursor:pointer;background:#0B1F3A!important;color:#fff!important;border:0!important}
#bank-view .bk-import svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.bk-statements{margin:0 0 18px}
.bk-statements h3{margin:0 0 8px;font-size:13px!important;font-weight:600;letter-spacing:.05em;text-transform:uppercase;color:#5B6678}
#bank-view .bk-list{display:flex!important;gap:12px;overflow-x:auto;padding:2px 2px 6px;margin:0!important;scroll-snap-type:x proximity}
#bank-view .bk-card{flex:0 0 250px;display:grid!important;gap:4px;justify-items:start;height:auto!important;margin:0!important;padding:14px 16px!important;text-align:left;background:#fff!important;border:1px solid #E2E6EC!important;border-radius:12px!important;box-shadow:none!important;cursor:pointer;scroll-snap-align:start;color:#0F1E3D!important;min-height:0!important}
#bank-view .bk-card:hover{border-color:#B9C3D2!important}
#bank-view .bk-card.active{border-color:#0B1F3A!important;box-shadow:0 0 0 1px #0B1F3A!important}
.bk-card-top{display:flex;justify-content:space-between;width:100%;gap:8px;font-size:12px;color:#5B6678}
.bk-card-month{font-weight:600;color:#344054}
.bk-card-bal{font-size:21px;font-weight:700;letter-spacing:-.01em;color:#0B1F3A;font-variant-numeric:tabular-nums}
.bk-card-sub{font-size:12px;color:#8A94A6}
.bk-card-sub b,.bk-summary .pos,.bk-summary .neg{font-weight:600}
.pos{color:#17773A!important}.neg{color:#B42318!important}
.bk-card-acc{font-size:11.5px;color:#98A2B3;font-family:'IBM Plex Mono',ui-monospace,monospace}
.bk-empty{display:grid;gap:4px;padding:18px;border:1px dashed #C9D0DA;border-radius:12px;width:100%}
.bk-empty strong{font-size:14px;color:#0F1E3D}.bk-empty small{font-size:13px;color:#8A94A6}
#bank-view .bk-detail{background:#fff;border:1px solid #E2E6EC;border-radius:10px;overflow:hidden}
#bank-view .bk-detail[hidden]{display:none}
#bank-view .bk-detail>.panel-head{display:flex!important;justify-content:space-between;align-items:center;gap:12px;padding:14px 18px!important;margin:0!important;border-bottom:1px solid #EDF0F4}
#bank-view .bk-detail>.panel-head h3{margin:0;font-size:16px!important;font-weight:600}
#bank-view .bk-detail .panel-toolbar{display:flex;gap:6px}
#bank-view .bk-detail .panel-toolbar button{height:34px!important;min-height:34px!important;padding:0 12px!important;font-size:13px!important;border-radius:7px!important}
#bank-view .bk-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border-bottom:1px solid #E2E6EC}
#bank-view .bk-summary:empty{display:none}
#bank-view .bk-summary>span{display:grid;gap:2px;padding:12px 18px;border-left:1px solid #EDF0F4}
#bank-view .bk-summary>span:first-child{border-left:0}
#bank-view .bk-summary small{font-size:12px;color:#5B6678}
#bank-view .bk-summary strong{font-size:17px;font-weight:700;color:#0B1F3A;font-variant-numeric:tabular-nums}
#bank-view .bank-pdf-picker-field,#bank-view .bank-person-fullname-field{display:flex!important;align-items:center;gap:10px;margin:0!important;padding:10px 18px;border-bottom:1px solid #EDF0F4;font-size:12.5px;font-weight:500;color:#344054}
#bank-view .bank-pdf-picker-field[hidden],#bank-view .bank-person-fullname-field[hidden]{display:none!important}
#bank-view .bank-pdf-picker-field select,#bank-view .bank-person-fullname-field input{height:34px!important;min-height:34px!important;width:auto!important;min-width:240px;font-size:13px!important}
#bank-view #bank-transactions-groups{margin:0!important;border-top:0}
#bank-view .bank-tx-cat{flex:none;width:170px;font-size:12.5px;color:#5B6678;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#bank-view .bank-tx-amount{color:#0F1E3D}
#bank-view .bank-tx-amount.positive{color:#17773A!important}
#bank-view .bank-match-note{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:8px 10px!important;border-radius:7px;background:#FFF8EB;border:1px solid #F8D9A8;font-size:12.5px}
#bank-view .bank-match-note.bank-match-confirmed{background:#F1FAF3;border-color:#BFE3C8}
#bank-view .bank-match-note button{height:28px!important;min-height:28px!important;padding:0 10px!important;font-size:12px!important}
@media(max-width:850px){#bank-view .bk-summary{grid-template-columns:1fr 1fr}#bank-view .bk-summary>span:nth-child(3){border-left:0}#bank-view .bk-summary>span:nth-child(n+3){border-top:1px solid #EDF0F4}#bank-view .bank-tx-cat{display:none}#bank-view .bk-detail>.panel-head{flex-direction:column;align-items:flex-start}#bank-view .bk-detail .panel-toolbar{flex-wrap:wrap}}
#bank-view .bank-group-tabs{display:flex;gap:4px;overflow-x:auto;margin:0!important;padding:0 14px;border-bottom:1px solid #E2E6EC;background:#fff}
#bank-view .bank-group-tabs button{flex:none;height:42px!important;min-height:0!important;margin-bottom:-1px;padding:0 12px!important;border:0!important;border-bottom:2px solid transparent!important;border-radius:0!important;background:none!important;box-shadow:none!important;font-size:13.5px!important;font-weight:600;color:#5B6678!important;white-space:nowrap}
#bank-view .bank-group-tabs button.active{color:#0B1F3A!important;border-bottom-color:#0B1F3A!important}
#bank-view .bank-group-tabs+.bank-group-tabs{gap:8px;padding:10px 14px;border-bottom:1px solid #EDF0F4;background:#FAFBFC}
#bank-view .bank-group-tabs+.bank-group-tabs button{height:30px!important;margin:0;padding:0 12px!important;border:1px solid #D0D5DD!important;border-radius:999px!important;background:#fff!important;font-size:12.5px!important;font-weight:500;color:#344054!important}
#bank-view .bank-group-tabs+.bank-group-tabs button.active{background:#0B1F3A!important;border-color:#0B1F3A!important;color:#fff!important}
#bank-view .bank-transaction-list{display:block}
#bank-view .bank-transaction-list>small{display:block;padding:24px;text-align:center;color:#8A94A6}
#bank-view details.bank-tx-row>summary{padding-left:18px!important}
#bank-view .bank-tx-row-body{padding-left:18px!important}
#bank-view .bank-tx-row-date{font-family:inherit!important}

/* =====================================================================
   Temps de travail
   ===================================================================== */
#time-view{display:none}
#time-view.active{display:block}
#time-view .tw-page-head{display:grid!important;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:4px 16px;margin:0 0 20px!important;padding:0!important;border:0!important;background:none!important}
#time-view .tw-page-head small{display:none}
#time-view .tw-page-head h2{margin:0;font-size:30px!important;font-weight:700;letter-spacing:-.02em;color:#0B1F3A}
#time-view .tw-rates{grid-column:1;font-size:15px;color:#5B6678}
#time-view .rg-actions{display:flex;gap:10px;grid-column:2;grid-row:1/3;align-self:center}
#time-view .rg-actions button{display:inline-flex;align-items:center;gap:8px;height:40px;padding:0 16px!important;font-size:14px!important;font-weight:600}
#time-view .rg-actions svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
#time-view #time-panel{display:grid;gap:20px;padding:0!important;margin:0!important;background:none!important;border:0!important;box-shadow:none!important}
#time-view #time-panel>.section-head{display:none!important}
#time-view .tw-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));background:#fff;border:1px solid #E2E6EC;border-radius:10px;overflow:hidden}
#time-view .tw-kpi{position:relative;display:grid;gap:4px;align-content:start;padding:16px 20px;border-left:1px solid #EDF0F4;margin:0!important;background:none!important}
#time-view .tw-kpi:first-child{border-left:0}
#time-view .tw-kpi::before{content:"";position:absolute;left:0;top:16px;bottom:16px;width:3px;border-radius:0 3px 3px 0;background:#1D5BD8}
#time-view .tw-kpi:nth-child(2)::before{background:#0B1F3A}#time-view .tw-kpi:nth-child(3)::before{background:#1E8E3E}#time-view .tw-kpi:nth-child(4)::before{background:#D9A00B}
#time-view .tw-kpi small{font-size:12.5px;font-weight:500;color:#5B6678}
#time-view .tw-kpi strong{font-size:22px!important;font-weight:700!important;color:#0B1F3A!important;font-family:inherit!important;font-variant-numeric:tabular-nums}
#time-view .tw-kpi span{font-size:12px;color:#8A94A6}
#time-view .tw-kpi[hidden]{display:none}
#time-view .tw-kpis:has(> .tw-kpi[hidden]){grid-template-columns:repeat(3,minmax(0,1fr))}
#time-view .tw-cal{background:#fff;border:1px solid #E2E6EC;border-radius:10px;padding:18px 20px}
#time-view .work-calendar{margin:0!important;padding:0!important;border:0!important;background:none!important;box-shadow:none!important}
#time-view .work-calendar *{font-family:inherit!important}
#time-view .tw-summary-slot:empty{display:none}
#time-view .worker-month-summary{background:#fff;border:1px solid #E2E6EC;border-radius:10px;padding:0;overflow:hidden;margin:0!important}
#time-view .worker-month-summary>.section-head{display:flex!important;justify-content:space-between;align-items:center;margin:0!important;padding:14px 20px!important;border-bottom:1px solid #EDF0F4!important;background:none!important}
#time-view .worker-month-summary h3{margin:0;font-size:15px!important;font-weight:600}
#time-view .worker-month-summary table{width:100%;border-collapse:collapse}
#time-view .worker-month-summary th{height:40px;padding:0 16px!important;background:#F5F6F8!important;border-bottom:1px solid #E2E6EC!important;text-align:left;font-size:13px!important;font-weight:600;color:#0F1E3D!important;text-transform:none!important;letter-spacing:0!important}
#time-view .worker-month-summary td{height:48px;padding:0 16px!important;border-bottom:1px solid #EDF0F4!important;font-size:14px;color:#0F1E3D;background:#fff!important}
#time-view .tw-entries:empty,#time-view .tw-entries[hidden]{display:none}
#time-view .time-month-group{background:#fff;border:1px solid #E2E6EC!important;border-radius:10px!important;overflow:hidden;margin:0 0 12px!important;padding:0!important}
#time-view .time-month-group>summary{display:flex;align-items:center;min-height:46px;padding:0 18px!important;font-size:14px;font-weight:600;color:#0F1E3D;cursor:pointer;background:#fff!important}
#time-view .time-entries-table{width:100%;border-collapse:collapse}
#time-view .time-entries-table th{height:40px;padding:0 14px!important;background:#F5F6F8!important;text-align:left;font-size:13px!important;font-weight:600;color:#0F1E3D!important;text-transform:none!important;letter-spacing:0!important}
#time-view .time-entries-table td{height:46px;padding:0 14px!important;border-top:1px solid #EDF0F4;font-size:13.5px;font-family:inherit!important}
/* fenêtres */
#time-view .tw-modal{position:fixed;inset:0;z-index:220;display:grid;place-items:center;padding:24px}
#time-view .tw-modal[hidden]{display:none!important}
#time-view .tw-backdrop{position:fixed;inset:0;background:rgba(11,31,58,.45)}
#time-view .tw-dialog{position:relative;width:min(600px,100%);max-height:calc(100vh - 48px);overflow:auto;background:#fff;border-radius:14px;box-shadow:0 24px 64px rgba(16,24,40,.28);animation:udIn .18s ease-out}
#time-view .tw-dialog-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;padding:22px 24px 4px}
#time-view .tw-dialog-head h3{margin:0;font-size:20px!important;font-weight:700;color:#0B1F3A}
#time-view .tw-dialog-head p{margin:4px 0 0;font-size:13.5px;color:#5B6678}
#time-view .tw-dialog form{display:grid!important;gap:14px;margin:0!important;padding:14px 24px 0!important;border:0!important;background:none!important;box-shadow:none!important}
#time-view .tw-dialog form[hidden]{display:none!important}
#time-view .tw-dialog label{margin:0;display:grid;gap:6px;font-size:12.5px;font-weight:600;color:#344054}
#time-view .tw-dialog label[hidden]{display:none}
#time-view .tw-dialog .form-row{display:grid!important;grid-template-columns:1fr 1fr!important;gap:12px!important;margin:0}
#time-view .tw-dialog input:not([type=checkbox]),#time-view .tw-dialog select:not([multiple]){height:40px!important;min-height:40px!important;padding:0 12px!important;font-size:14px!important;border-radius:8px!important}
#time-view .tw-dialog select[multiple]{min-height:96px!important;padding:6px!important;border-radius:8px!important;font-size:14px!important}
#time-view .tw-dialog small{font-size:12px;color:#8A94A6;font-weight:400}
#time-view .time-live-calculation{display:grid;gap:2px;padding:12px 14px!important;margin:0!important;border:1px solid #C7D7FB!important;border-radius:10px!important;background:#F2F6FF!important}
#time-view .time-live-calculation strong{font-size:15px!important;font-weight:700!important;color:#0B1F3A!important;font-family:inherit!important}
#time-view .time-live-calculation small{font-size:12.5px;color:#5B6678}
#time-view .tw-foot{position:sticky;bottom:0;display:flex;justify-content:flex-end;gap:10px;margin:6px -24px 0;padding:14px 24px;background:#fff;border-top:1px solid #EDF0F4}
#time-view .tw-foot button{height:40px;padding:0 18px!important;font-size:14px!important;font-weight:600}
#time-view #quick-workers:empty{display:none}
@media(max-width:850px){
 #time-view .tw-page-head{grid-template-columns:1fr}
 #time-view .tw-page-head h2{font-size:24px!important}
 #time-view .rg-actions{grid-column:1;grid-row:auto}#time-view .rg-actions button{flex:1;justify-content:center}
 #time-view .tw-kpis,#time-view .tw-kpis:has(> .tw-kpi[hidden]){grid-template-columns:1fr 1fr}
 #time-view .tw-kpi:nth-child(3){border-left:0}#time-view .tw-kpi:nth-child(n+3){border-top:1px solid #EDF0F4}
 #time-view .tw-kpi strong{font-size:18px!important}
 #time-view .tw-cal{padding:12px}
 #time-view .tw-modal{padding:0;place-items:end center}
 #time-view .tw-dialog{border-radius:14px 14px 0 0;max-height:92vh}
 #time-view .tw-dialog .form-row{grid-template-columns:1fr!important}
}
/* relevés : sélecteur de mois compact */
#bank-view .bk-statements{display:flex;align-items:center;gap:12px;margin:0 0 14px}
#bank-view .bk-statements h3{flex:none;margin:0}
#bank-view .bk-list{gap:6px!important;padding:2px!important;flex:1;min-width:0}
#bank-view .bk-card{flex:0 0 auto!important;display:inline-flex!important;align-items:baseline;gap:8px;padding:7px 12px!important;border-radius:8px!important}
#bank-view .bk-card .bk-card-month{font-size:13px;font-weight:600;color:#344054}
#bank-view .bk-card .bk-card-bal{font-size:13px;font-weight:600;color:#0B1F3A;letter-spacing:0}
#bank-view .bk-card .bk-card-delta{font-size:12px;font-weight:600}
#bank-view .bk-card.active{background:#0B1F3A!important;box-shadow:none!important}
#bank-view .bk-card.active .bk-card-month,#bank-view .bk-card.active .bk-card-bal{color:#fff}
#bank-view .bk-card.active .bk-card-delta{color:#A7E3B9!important}
#bank-view .bk-card.active .bk-card-delta.neg{color:#FFB4AE!important}
@media(max-width:850px){#bank-view .bk-statements{flex-direction:column;align-items:stretch;gap:6px}}
/* calendrier plus compact et aéré */
#time-view .calendar-stats{display:none!important}
#time-view .calendar-hint{font-size:12.5px!important;color:#8A94A6!important;margin:6px 0 10px!important}
#time-view .calendar-grid{gap:6px!important}
#time-view .calendar-cell{min-height:64px!important;padding:6px 6px 4px!important;border-radius:8px!important;background:#fff!important;border:1px solid #E7EAEF!important;box-shadow:none!important;display:flex!important;flex-direction:column;align-items:center;gap:3px}
#time-view .calendar-cell.empty{background:transparent!important;border-color:transparent!important}
#time-view .calendar-cell:hover{border-color:#B9C3D2!important}
#time-view .calendar-cell .calendar-add-rdv{opacity:0;transition:opacity .12s}
#time-view .calendar-cell:hover .calendar-add-rdv,#time-view .calendar-cell:focus-within .calendar-add-rdv{opacity:1}
@media(hover:none){#time-view .calendar-cell .calendar-add-rdv{opacity:1}}
#time-view .calendar-quick-edit{font-size:10.5px!important;padding:1px 6px!important;min-height:0!important;height:auto!important}
#time-view .calendar-weekdays{margin-bottom:4px!important}
#time-view .calendar-weekdays *{font-size:11.5px!important;letter-spacing:.04em}
#time-view .tw-pdf:empty{display:none}
#time-view .tw-pdf .hours-pdf-panel{display:flex!important;flex-wrap:wrap;align-items:flex-end;gap:10px;margin:14px 0 0!important;padding:12px 0 0!important;border:0!important;border-top:1px solid #EDF0F4!important;background:none!important}
#time-view .tw-pdf label{display:grid;gap:5px;margin:0;font-size:12.5px;font-weight:600;color:#344054}
#time-view .tw-pdf input{height:36px!important;min-height:36px!important;width:170px!important;font-size:13.5px!important}
#time-view .tw-pdf button{height:36px!important;min-height:36px!important;padding:0 14px!important;font-size:13.5px!important}
#time-view .tw-pdf small{flex-basis:100%;font-size:12px;color:#8A94A6}
#bank-view .bk-statements{gap:10px;margin:0 0 12px}
#bank-view .bk-statements h3{font-size:12px!important}
#bank-view .bk-card{height:28px!important;padding:0 10px!important;align-items:center!important;border-radius:6px!important;font-size:12.5px!important;font-weight:600!important;color:#344054!important;white-space:nowrap}
#bank-view .bk-card.active{color:#fff!important}
#bank-view .bk-statements h3{font-size:13px!important;font-weight:600!important;letter-spacing:0!important;text-transform:none!important;color:#344054!important}
#time-view .worker-month-summary th,#time-view .worker-month-summary td,#time-view .worker-month-summary tbody th{background:#fff!important;font-family:inherit!important}
#time-view .worker-month-summary thead th{background:#F5F6F8!important}
#bank-view .bk-detail>.panel-head{padding:10px 14px 10px 18px!important}
#bank-view .bk-detail>.panel-head h3{font-size:13.5px!important;font-weight:600!important;color:#344054!important;letter-spacing:0}
#bank-view .bk-tool{display:inline-flex!important;align-items:center;gap:6px;height:30px!important;min-height:30px!important;padding:0 10px!important;border:1px solid #E2E6EC!important;border-radius:7px!important;background:#fff!important;font-size:12.5px!important;font-weight:600;color:#344054!important;box-shadow:none!important}
#bank-view .bk-tool:hover{background:#F5F7FA!important;border-color:#C9D0DA!important}
#bank-view .bk-tool svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
#bank-view .bk-tool-icon{width:30px;padding:0!important;justify-content:center;color:#B42318!important}
#bank-view .bk-tool-icon:hover{background:#FEF3F2!important;border-color:#F5C2C0!important}
#bank-view .bk-summary>span{padding:10px 18px}
#bank-view .bk-summary strong{font-size:16px}
@media(max-width:850px){#bank-view .bk-detail>.panel-head{flex-direction:row!important;align-items:center!important}}
#bank-view .bk-tool svg{width:15px!important;height:15px!important;min-width:15px;display:block}#bank-view .bk-tool-icon svg{width:16px!important;height:16px!important}
/* Budget */
#devis-view .bg-list{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(420px,1fr));gap:16px;margin:0!important}
#devis-view .bg-card{display:grid;gap:14px;padding:18px 20px;background:#fff;border:1px solid #E2E6EC;border-radius:12px;position:relative}
#devis-view .bg-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}
#devis-view .bg-head h4{margin:0;font-size:16px;font-weight:600;color:#0B1F3A}
#devis-view .bg-head small{display:block;margin-top:2px;font-size:12.5px;color:#8A94A6}
#devis-view .bg-more{position:static;margin:0;border:0;background:none;padding:0}
#devis-view .bg-more>summary{display:grid;place-items:center;width:30px;height:30px;padding:0!important;border:0!important;border-radius:7px!important;background:transparent!important;color:#5B6678;cursor:pointer;list-style:none;font-size:18px;box-shadow:none!important}
#devis-view .bg-more>summary::-webkit-details-marker{display:none}
#devis-view .bg-more>summary::before,#devis-view .bg-more>summary::after{content:none!important}
#devis-view .bg-more>summary:hover,#devis-view .bg-more[open]>summary{background:#EEF2F7!important}
#devis-view .bg-more .document-more-menu{position:absolute;right:16px;top:50px;z-index:30;min-width:200px;padding:6px;display:grid;background:#fff;border:1px solid #E2E6EC;border-radius:9px;box-shadow:0 12px 32px rgba(16,24,40,.14)}
#devis-view .bg-more .document-more-menu button{justify-content:flex-start;width:100%;height:34px;padding:0 10px!important;border:0!important;background:transparent!important;font-size:13px!important;text-align:left;color:#B42318!important;border-radius:6px!important}
#devis-view .bg-more .document-more-menu button:hover{background:#FEF3F2!important}
#devis-view .bg-figures{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0;border:1px solid #EDF0F4;border-radius:10px;overflow:hidden}
#devis-view .bg-figures>div{display:grid;gap:3px;padding:10px 14px;border-left:1px solid #EDF0F4;background:#FBFCFD}
#devis-view .bg-figures>div:first-child{border-left:0}
#devis-view .bg-figures small{font-size:12px;color:#5B6678}
#devis-view .bg-figures strong{font-size:16px;font-weight:700;color:#0B1F3A;font-variant-numeric:tabular-nums}
#devis-view .bg-good .bg-remaining{color:#17773A}#devis-view .bg-warn .bg-remaining{color:#946200}#devis-view .bg-bad .bg-remaining{color:#B42318}
#devis-view .bg-bar{height:8px;border-radius:999px;background:#EDF0F4;overflow:hidden}
#devis-view .bg-bar span{display:block;height:100%;border-radius:999px;background:#1E8E3E}
#devis-view .bg-warn .bg-bar span{background:#D9A00B}#devis-view .bg-bad .bg-bar span{background:#C0362C}
#devis-view .bg-bar-legend{display:flex;justify-content:space-between;flex-wrap:wrap;gap:4px 12px;margin-top:-6px;font-size:12px;color:#8A94A6}
#devis-view .bg-bar-legend span:first-child{font-weight:600;color:#344054}
#devis-view .budget-line-items-detail{margin:0!important;border:1px solid #EDF0F4!important;border-radius:10px!important;overflow:hidden;background:#fff!important}
#devis-view .budget-line-items-detail>summary{display:flex;align-items:center;height:38px;padding:0 14px!important;font-size:13px;font-weight:600;color:#1D5BD8;cursor:pointer;list-style:none;background:#fff!important}
#devis-view .budget-line-items-detail>summary::-webkit-details-marker{display:none}
#devis-view .bg-lines{width:100%;border-collapse:collapse;font-size:13px}
#devis-view .bg-lines th,#devis-view .bg-lines td{height:34px;padding:0 12px!important;border-top:1px solid #EDF0F4;text-align:left;font-weight:400;color:#0F1E3D;background:#fff!important}
#devis-view .bg-lines thead th{background:#F5F6F8!important;font-weight:600;font-size:12.5px}
#devis-view .bg-lines .bg-cat th{background:#FAFBFC!important;font-weight:600;font-size:12px;letter-spacing:.03em;text-transform:uppercase;color:#5B6678}
#devis-view .bg-lines .num{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
#devis-view .bg-actions{display:flex;gap:8px}
#devis-view .bg-actions button{height:34px!important;min-height:34px!important;padding:0 12px!important;font-size:13px!important;border-radius:7px!important}
#devis-view .bg-empty{display:grid;gap:4px;padding:28px;border:1px dashed #C9D0DA;border-radius:12px;text-align:center}
#devis-view .bg-empty strong{font-size:15px;color:#0F1E3D}#devis-view .bg-empty small{font-size:13px;color:#8A94A6}
#devis-view #devis-line-items-pending-panel{margin-top:18px}
#devis-view .bg-form{display:grid!important;gap:14px;margin:0!important;padding:14px 24px 0!important;border:0!important;background:none!important;box-shadow:none!important}
#devis-view .bg-form label:not(.ud-drop){margin:0;display:grid;gap:6px;font-size:12.5px;font-weight:600;color:#344054}
#devis-view .bg-form label[hidden]{display:none!important}
#devis-view .bg-form input:not([type=checkbox]):not([type=file]),#devis-view .bg-form select{height:40px!important;min-height:40px!important;padding:0 12px!important;font-size:14px!important;border-radius:8px!important}
#devis-view .bg-form .ai-confirm-field{display:flex!important;gap:8px;align-items:flex-start;font-weight:500}
#devis-view .bg-form #devis-extraction-status,#devis-view .bg-note{font-size:12px;color:#8A94A6}
#devis-view .tw-modal{position:fixed;inset:0;z-index:220;display:grid;place-items:center;padding:24px}
#devis-view .tw-modal[hidden]{display:none!important}
#devis-view .tw-backdrop{position:fixed;inset:0;background:rgba(11,31,58,.45)}
#devis-view .tw-dialog{position:relative;width:min(600px,100%);max-height:calc(100vh - 48px);overflow:auto;background:#fff;border-radius:14px;box-shadow:0 24px 64px rgba(16,24,40,.28);animation:udIn .18s ease-out}
#devis-view .tw-dialog-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;padding:22px 24px 4px}
#devis-view .tw-dialog-head h3{margin:0;font-size:20px!important;font-weight:700;color:#0B1F3A}
#devis-view .tw-dialog-head p{margin:4px 0 0;font-size:13.5px;color:#5B6678}
#devis-view .tw-foot{position:sticky;bottom:0;display:flex;justify-content:flex-end;gap:10px;margin:6px -24px 0;padding:14px 24px;background:#fff;border-top:1px solid #EDF0F4}
#devis-view .tw-foot button{height:40px;padding:0 18px!important;font-size:14px!important;font-weight:600}
@media(max-width:850px){#devis-view .bg-list{grid-template-columns:1fr}#devis-view .bg-figures{grid-template-columns:1fr 1fr 1fr}#devis-view .bg-figures strong{font-size:14px}#devis-view .tw-modal{padding:0;place-items:end center}#devis-view .tw-dialog{border-radius:14px 14px 0 0;max-height:92vh}}
#devis-view .bg-head,#devis-view .bg-actions{padding:0!important;margin:0!important;background:none!important;border:0!important;min-height:0!important;box-shadow:none!important;position:static!important;height:auto!important}#devis-view .budget-line-items-detail>summary{padding:0 14px!important;margin:0!important}

/* =====================================================================
   Chantiers
   ===================================================================== */
#chantier-view .ch-head{display:grid!important;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:4px 16px;margin:0 0 20px!important}
#chantier-view .ch-head .project-switcher{grid-column:2;grid-row:1/3;align-self:center;display:grid;gap:5px;margin:0;font-size:12px;font-weight:600;color:#5B6678}
#chantier-view .ch-head .project-switcher select{height:40px!important;min-height:40px!important;min-width:280px;padding:0 34px 0 12px!important;font-size:14px!important;font-weight:600;color:#0B1F3A!important;border-radius:8px!important}
#chantier-view .chantiers-list-panel{padding:0!important;overflow:hidden;margin:0 0 20px!important}
#chantier-view .ch-list-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 18px;border-bottom:1px solid #E2E6EC}
#chantier-view .ch-list-head h3{margin:0;font-size:15px!important;font-weight:600}
#chantier-view .chantiers-list-kpis{display:flex!important;gap:8px;margin:0!important}
#chantier-view .chantiers-list-kpi{display:inline-flex!important;align-items:center;gap:5px;height:28px;padding:0 10px!important;border:1px solid #E2E6EC!important;border-radius:999px!important;background:#FAFBFC!important;font-size:12.5px;color:#5B6678;box-shadow:none!important;min-height:0!important}
#chantier-view .chantiers-list-kpi strong{font-size:12.5px!important;font-weight:700;color:#0B1F3A}
#chantier-view .chantiers-list-table-wrap{margin:0!important;border:0!important;border-radius:0!important}
#chantier-view .chantiers-list-table{width:100%;border-collapse:collapse}
#chantier-view .chantiers-list-table th{height:42px;padding:0 18px!important;background:#F5F6F8!important;border-bottom:1px solid #E2E6EC!important;text-align:left;font-size:13.5px!important;font-weight:600!important;color:#0F1E3D!important;text-transform:none!important;letter-spacing:0!important}
#chantier-view .chantiers-list-table td{height:52px;padding:0 18px!important;border-bottom:1px solid #EDF0F4!important;font-size:14px;color:#0F1E3D;background:#fff!important}
#chantier-view .chantiers-list-row{cursor:pointer}
#chantier-view .chantiers-list-row:hover td{background:#F8FAFD!important}
#chantier-view .chantiers-list-row.active td{background:#F2F6FF!important}
#chantier-view .chantiers-list-row.active td:first-child{box-shadow:inset 3px 0 0 #1D5BD8;font-weight:600}
#chantier-view .prog{display:inline-flex;align-items:center;gap:10px;font-variant-numeric:tabular-nums}
#chantier-view .prog .bar{width:120px;height:6px;border-radius:999px;background:#EDF0F4;overflow:hidden;display:block}
#chantier-view .prog .bar i{display:block;height:100%;border-radius:999px}
#chantier-view .chantier-layout{display:grid!important;grid-template-columns:300px minmax(0,1fr);gap:20px;align-items:start}
#chantier-view .chantier-layout-main{display:grid;gap:20px}
#chantier-view .chantier-layout-main>.panel,#chantier-view .site-progress-panel{margin:0!important;padding:18px 20px!important;border-radius:10px!important}
#chantier-view .site-progress-panel{position:sticky;top:84px;display:grid;gap:14px}
#chantier-view .site-progress-panel .section-head small,#chantier-view .chantier-layout-main .section-head small{font-size:11.5px!important;font-weight:600;letter-spacing:.05em;color:#8A94A6}
#chantier-view .site-progress-gauge-wrap{width:180px;height:180px;margin:0 auto}
#chantier-view #site-progress-form{display:grid!important;grid-template-columns:1fr!important;gap:10px;margin:0}
#chantier-view #site-progress-form label{display:grid;gap:5px;font-size:12.5px;font-weight:600;color:#344054;margin:0}
#chantier-view #site-progress-form input{height:38px!important;min-height:38px!important}
#chantier-view #site-progress-form button{height:38px}
#chantier-view .chantier-layout-main .section-head{display:flex!important;justify-content:space-between;align-items:flex-start;gap:12px;margin:0 0 12px!important;padding:0!important;border:0!important}
#chantier-view .chantier-layout-main .section-head h3{margin:2px 0 0;font-size:16px!important;font-weight:600}
#chantier-view .chantier-layout-main .section-head>span{font-size:12.5px;color:#5B6678}
#chantier-view .chantier-layout-main .section-head button{height:34px!important;min-height:34px!important;font-size:13px!important;padding:0 12px!important}
#chantier-view .budget-breakdown-table{width:100%;border-collapse:collapse}
#chantier-view .budget-breakdown-table th{height:38px;padding:0 12px!important;background:#F5F6F8!important;text-align:left;font-size:13px!important;font-weight:600;color:#0F1E3D!important;text-transform:none!important;letter-spacing:0!important}
#chantier-view .budget-breakdown-table td{height:42px;padding:0 12px!important;border-top:1px solid #EDF0F4;font-size:13.5px;background:#fff!important}
#chantier-view .audit-history h3{font-size:16px!important;margin:0 0 10px}
@media(max-width:1100px){#chantier-view .chantier-layout{grid-template-columns:1fr}#chantier-view .site-progress-panel{position:static}}
@media(max-width:850px){
 #chantier-view .ch-head{grid-template-columns:1fr}
 #chantier-view .ch-head .project-switcher{grid-column:1;grid-row:auto}
 #chantier-view .ch-head .project-switcher select{min-width:0;width:100%}
 #chantier-view .ch-list-head{flex-direction:column;align-items:flex-start}
 #chantier-view .chantiers-list-table thead{display:none}
 #chantier-view .chantiers-list-table tr{display:grid;grid-template-columns:1fr auto;gap:2px 10px;padding:10px 14px;border-bottom:1px solid #EDF0F4}
 #chantier-view .chantiers-list-table td{height:auto;padding:0!important;border:0!important;background:none!important}
 #chantier-view .chantiers-list-table td:nth-child(2){grid-column:1;font-size:12.5px;color:#8A94A6}
 #chantier-view .chantiers-list-table td:nth-child(3){grid-column:1}
 #chantier-view .chantiers-list-table td:nth-child(4){grid-column:2;grid-row:1}
 #chantier-view .chantiers-list-table td:nth-child(5){display:none}
}
/* Budget — registre */
#devis-view .bg-table .rg-head,#devis-view .bg-row{grid-template-columns:minmax(0,2fr) 140px 130px 140px 170px 150px}
#devis-view .bg-table .rg-head span:nth-child(2),#devis-view .bg-table .rg-head span:nth-child(3),#devis-view .bg-table .rg-head span:nth-child(4){text-align:right}
#devis-view .bg-row .rg-num{text-align:right;font-variant-numeric:tabular-nums}
#devis-view .bg-row .bg-remaining{font-weight:600}
#devis-view .bg-good .bg-remaining{color:#17773A}#devis-view .bg-warn .bg-remaining{color:#946200}#devis-view .bg-bad .bg-remaining{color:#B42318}
#devis-view .bg-ic{flex:none;display:grid;place-items:center;width:32px;height:32px;border-radius:8px;background:#E8EFFC;color:#1F4FB5}
#devis-view .bg-ic svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
#devis-view .rg-sub{display:block!important;font-size:12px;color:#8A94A6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#devis-view .bg-use{display:flex!important;align-items:center;gap:10px;padding-left:16px}
#devis-view .bg-use .bg-bar{flex:1;height:6px;border-radius:999px;background:#EDF0F4;overflow:hidden}
#devis-view .bg-use .bg-bar i{display:block;height:100%;border-radius:999px;background:#1E8E3E}
#devis-view .bg-warn .bg-use .bg-bar i{background:#D9A00B}#devis-view .bg-bad .bg-use .bg-bar i{background:#C0362C}
#devis-view .bg-use b{font-size:13px;font-weight:600;color:#344054;min-width:38px;text-align:right}
#devis-view .bg-toggle.active{background:#EEF2F7!important;color:#0B1F3A}
#devis-view .bg-detail{grid-column:1/-1;margin:8px 0 6px}
#devis-view .bg-detail[hidden]{display:none}
#devis-view .bg-detail .budget-line-items-detail{border:1px solid #E2E6EC!important;border-radius:8px!important}
@media(max-width:1180px){#devis-view .bg-table .rg-head,#devis-view .bg-row{grid-template-columns:minmax(0,2fr) 130px 130px 140px 120px}#devis-view .bg-table .rg-head span:nth-child(5),#devis-view .bg-row .bg-use{display:none!important}}
@media(max-width:850px){
 #devis-view .bg-row{grid-template-columns:minmax(0,1fr) auto;row-gap:2px;padding:10px 14px}
 #devis-view .bg-row>.rg-cell{display:none}
 #devis-view .bg-row>.bg-remaining{display:block;grid-column:2;grid-row:1}
 #devis-view .bg-row>.bg-use{display:flex!important;grid-column:1;padding-left:44px}
 #devis-view .bg-row .rg-act{grid-column:2;grid-row:2}
}
#devis-view .bg-table .rg-head,#devis-view .bg-row{grid-template-columns:minmax(260px,2.4fr) 130px 120px 130px 160px 140px}
/* Lignes & assignation */
#line-items-view .li-actions{align-items:center}
#line-items-view .li-project{margin:0;display:block}
#line-items-view .li-project select{height:40px!important;min-height:40px!important;min-width:280px;padding:0 34px 0 12px!important;font-size:14px!important;font-weight:600;border-radius:8px!important}
#line-items-view .li-del{height:40px;font-size:13px!important}
#line-items-view .li-del[hidden]{display:none!important}
#line-items-view .li-quick{display:flex!important;align-items:center;gap:10px;margin:0 0 14px!important;padding:6px 6px 6px 14px!important;background:#fff;border:1px dashed #C9D0DA;border-radius:8px}
#line-items-view .li-quick[hidden]{display:none!important}
#line-items-view .li-quick svg{flex:none;width:18px;height:18px;fill:none;stroke:#8A94A6;stroke-width:2;stroke-linecap:round}
#line-items-view .li-quick input{flex:1;height:36px!important;min-height:36px!important;border:0!important;box-shadow:none!important;padding:0!important;font-size:14px!important;background:transparent!important}
#line-items-view .li-quick button{height:34px!important;min-height:34px!important;font-size:13px!important}
#line-items-view .li-table .rg-head,#line-items-view .li-row{grid-template-columns:minmax(0,2fr) 130px 120px 120px 130px minmax(0,1fr) 140px}
#line-items-view .li-table .rg-head span:nth-child(2),#line-items-view .li-table .rg-head span:nth-child(3),#line-items-view .li-table .rg-head span:nth-child(4){text-align:right}
#line-items-view .li-row .rg-num{text-align:right;font-variant-numeric:tabular-nums}
#line-items-view .li-margin{font-weight:600}
#line-items-view .li-ic{flex:none;display:grid;place-items:center;width:32px;height:32px;border-radius:8px;background:#F1ECFB;color:#6941C6}
#line-items-view .li-ic svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}
#line-items-view .rg-sub{display:block!important;font-size:12px;color:#8A94A6}
#line-items-view .li-none{color:#98A2B3;font-style:italic}
#line-items-view .li-open{height:32px!important;min-height:32px!important;padding:0 12px!important;font-size:13px!important;border-radius:7px!important}
#line-items-view .li-open.active{background:#0B1F3A!important;color:#fff!important;border-color:#0B1F3A!important}
#line-items-view .li-detail{grid-column:1/-1;display:grid;gap:12px;margin:8px 0 8px;padding:14px;background:#F8FAFD;border:1px solid #E2E6EC;border-radius:8px}
#line-items-view .li-detail[hidden]{display:none}
#line-items-view .li-assign{display:flex!important;flex-wrap:wrap;align-items:flex-end;gap:10px;margin:0!important;padding:0!important;border:0!important;background:none!important}
#line-items-view .li-assign label{display:grid;gap:5px;margin:0;font-size:12.5px;font-weight:600;color:#344054}
#line-items-view .li-assign select{height:38px!important;min-height:38px!important;min-width:220px;font-size:14px!important}
#line-items-view .li-assign input[type=file]{height:38px!important;min-height:38px!important;font-size:13px!important}
#line-items-view .li-assign button{height:38px}
#line-items-view .li-lines{width:100%;border-collapse:collapse;background:#fff;border:1px solid #E2E6EC;border-radius:6px;overflow:hidden;font-size:13px}
#line-items-view .li-lines th,#line-items-view .li-lines td{height:36px;padding:0 12px!important;border-top:1px solid #EDF0F4;text-align:left;background:#fff!important;color:#0F1E3D}
#line-items-view .li-lines thead th{background:#F5F6F8!important;font-weight:600;font-size:12.5px;border-top:0}
#line-items-view .li-lines .num{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
#line-items-view .li-link{height:auto!important;min-height:0!important;padding:0!important;border:0!important;background:none!important;box-shadow:none!important;color:#1D5BD8!important;font-size:12.5px!important;font-weight:600;cursor:pointer}
@media(max-width:1180px){#line-items-view .li-table .rg-head,#line-items-view .li-row{grid-template-columns:minmax(0,2fr) 120px 110px 130px 140px}#line-items-view .li-table .rg-head span:nth-child(3),#line-items-view .li-table .rg-head span:nth-child(6),#line-items-view .li-row>.rg-cell:nth-of-type(2),#line-items-view .li-row>.rg-cell:nth-of-type(5){display:none}}
@media(max-width:850px){
 #line-items-view .li-project,#line-items-view .li-project select{width:100%;min-width:0}
 #line-items-view .li-row{grid-template-columns:minmax(0,1fr) auto;row-gap:4px;padding:10px 14px}
 #line-items-view .li-row>.rg-cell{display:none}
 #line-items-view .li-row>.rg-cell:nth-of-type(1){display:block;grid-column:2;grid-row:1;font-weight:600}
 #line-items-view .li-row>.rg-cell:nth-of-type(4){display:block;grid-column:1;padding-left:44px}
 #line-items-view .li-row .rg-act{grid-column:2;grid-row:2}
 #line-items-view .li-lines thead{display:none}
}
#line-items-view .li-project select{line-height:38px;padding-top:0!important;padding-bottom:0!important}
#line-items-view .li-assign select{line-height:36px;padding:0 10px!important}
#line-items-view .li-more{position:relative;margin:0;border:0;background:none;padding:0}
#line-items-view .li-more>summary{display:grid;place-items:center;width:40px;height:40px;padding:0!important;border:1px solid #D0D5DD!important;border-radius:8px!important;background:#fff!important;color:#344054;cursor:pointer;list-style:none;font-size:18px;box-shadow:none!important}
#line-items-view .li-more>summary::-webkit-details-marker{display:none}
#line-items-view .li-more>summary::before,#line-items-view .li-more>summary::after{content:none!important}
#line-items-view .li-more .document-more-menu{position:absolute;right:0;top:calc(100% + 6px);z-index:30;min-width:210px;padding:6px;display:grid;background:#fff;border:1px solid #E2E6EC;border-radius:9px;box-shadow:0 12px 32px rgba(16,24,40,.14)}
#line-items-view .li-more .li-del{height:34px!important;width:100%;justify-content:flex-start;border:0!important;background:transparent!important;color:#B42318!important;text-align:left;padding:0 10px!important}
#line-items-view .li-more .li-del:hover{background:#FEF3F2!important}
#line-items-view .li-more:not(:has(.li-del:not([hidden]))){display:none}

/* =====================================================================
   Harmonisation : Aide RGE, Dossier de preuves, Production, Communication,
   Mes tâches, Mon compte
   ===================================================================== */
main:has(> #communication-view.active)>header,main:has(> #my-tasks-view.active)>header,main:has(> #production-view.active)>header,main:has(> #evidence-summary-view.active)>header{display:none!important}
/* titres de page portés par le premier panneau */
#communication-panel>.section-head,#my-tasks-panel>.section-head{display:grid!important;gap:4px;margin:0 0 18px!important;padding:0!important;border:0!important;background:none!important}
#communication-panel>.section-head h2,#my-tasks-panel>.section-head h2{margin:0;font-size:30px!important;font-weight:700;letter-spacing:-.02em;color:#0B1F3A}
#communication-panel>.section-head small,#my-tasks-panel>.section-head small{font-size:15px!important;letter-spacing:0!important;text-transform:none!important;color:#5B6678!important;font-weight:400!important}
#communication-view .panel,#my-tasks-view .panel{background:none!important;border:0!important;box-shadow:none!important;padding:0!important}
/* Communication : fil de discussion */
#communication-panel{display:grid!important;grid-template-columns:minmax(0,1fr) 340px;gap:0 20px;align-items:start}
#communication-panel>.section-head{grid-column:1/-1}
#communication-panel>.chat-recipient-field,#communication-panel>#messages,#communication-panel>#message-form{grid-column:1}
#communication-panel>.broadcast-form{grid-column:2;grid-row:2/5}
#communication-panel .chat-recipient-field{display:flex!important;align-items:center;gap:10px;margin:0!important;padding:12px 16px;background:#fff;border:1px solid #E2E6EC;border-bottom:0;border-radius:10px 10px 0 0;font-size:13px;font-weight:600;color:#344054}
#communication-panel .chat-recipient-field select{flex:1;height:38px!important;min-height:38px!important;font-size:14px!important}
#communication-panel #messages{min-height:340px;max-height:56vh;overflow:auto;margin:0!important;padding:18px!important;background:#F8FAFC!important;border:1px solid #E2E6EC!important;border-radius:0!important}
#communication-panel #message-form{display:flex!important;align-items:flex-end;gap:10px;margin:0!important;padding:12px!important;background:#fff;border:1px solid #E2E6EC;border-top:0;border-radius:0 0 10px 10px}
#communication-panel #message-form label{flex:1;display:block;margin:0;font-size:0}
#communication-panel #message-form textarea{width:100%;min-height:44px!important;height:44px;max-height:160px;padding:11px 12px!important;font-size:14px!important;border-radius:8px!important;resize:vertical}
#communication-panel #message-form button{height:44px;flex:none}
#communication-panel .broadcast-form{display:grid!important;gap:12px;margin:0!important;padding:18px!important;background:#fff!important;border:1px solid #E2E6EC!important;border-radius:10px!important}
#communication-panel .broadcast-form[hidden]{display:none!important}
#communication-panel .broadcast-form h3{margin:0;font-size:15px!important;font-weight:600}
#communication-panel .broadcast-form label{display:grid;gap:5px;margin:0;font-size:12.5px;font-weight:600;color:#344054}
#communication-panel .broadcast-form textarea{min-height:90px!important}
#communication-view .chat-bubble{border-radius:12px!important;padding:9px 12px!important;max-width:min(520px,80%);box-shadow:none!important}
#communication-view .chat-bubble.received{background:#fff!important;border:1px solid #E2E6EC!important;color:#0F1E3D!important}
#communication-view .chat-bubble.sent{background:#0B1F3A!important;color:#fff!important;border:0!important}
#communication-view .chat-bubble.sent small{color:#C9D3E3!important}
/* Mes tâches */
#my-tasks-view #my-tasks-list{display:grid;gap:10px;margin:0!important}
#my-tasks-view #my-tasks-list>.list-item{margin:0!important;padding:14px 16px!important;background:#fff!important;border:1px solid #E2E6EC!important;border-radius:10px!important;box-shadow:none!important}
#my-tasks-view #my-tasks-list>small{display:block;padding:28px;text-align:center;color:#8A94A6;background:#fff;border:1px dashed #C9D0DA;border-radius:10px}
#my-tasks-view .worker-profile-panel{margin-top:20px!important;padding:18px 20px!important;background:#fff!important;border:1px solid #E2E6EC!important;border-radius:10px!important}
/* Aide RGE */
#rge-help-view .rge-layout{display:grid!important;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);gap:20px;margin:0 0 20px}
#rge-help-view .panel{margin:0!important;padding:18px 20px!important;border-radius:10px!important}
#rge-help-view .panel h3{margin:0 0 12px;font-size:16px!important;font-weight:600}
#rge-help-view #rge-search{height:42px!important;min-height:42px!important;font-size:14px!important}
/* Dossier de preuves */
#evidence-summary-view>#evidence-summary{display:grid!important;gap:4px;margin:0 0 20px!important}
#evidence-summary-view>#evidence-summary h2{margin:0;font-size:30px!important;font-weight:700;color:#0B1F3A}
#evidence-summary-view>#evidence-summary p{margin:0;font-size:15px;color:#5B6678}
#evidence-summary-view .panel{margin:0 0 20px!important;padding:18px 20px!important;border-radius:10px!important}
#evidence-summary-view .panel h3{margin:0 0 12px;font-size:16px!important;font-weight:600}
#evidence-summary-view form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 14px;align-items:end}
#evidence-summary-view form label{display:grid;gap:5px;margin:0;font-size:12.5px;font-weight:600;color:#344054}
#evidence-summary-view form label[hidden]{display:none}
#evidence-summary-view form button.primary{grid-column:1/-1;justify-self:start;height:40px;padding:0 18px!important}
/* Production */
#production-view .panel{margin:0 0 20px!important;padding:20px 22px!important;border-radius:10px!important}
#production-view .panel>.section-head{display:grid!important;grid-template-columns:minmax(0,1fr) auto;gap:4px 16px;margin:0 0 16px!important;padding:0!important;border:0!important}
/* Mon compte */
#account-settings-view .grid-two{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;align-items:start}
#account-settings-view .panel{margin:0!important;padding:20px 22px!important;border-radius:10px!important;display:grid;gap:12px}
#account-settings-view .panel h3{margin:0 0 4px;font-size:16px!important;font-weight:600}
#account-settings-view label{display:grid;gap:5px;margin:0;font-size:12.5px;font-weight:600;color:#344054}
#account-settings-view input,#account-settings-view select{height:40px!important;min-height:40px!important;font-size:14px!important}
#account-settings-view .panel button.primary{justify-self:start;height:40px;padding:0 18px!important}
@media(max-width:1000px){#communication-panel{grid-template-columns:1fr}#communication-panel>.broadcast-form{grid-column:1;grid-row:auto;margin-top:16px!important}#rge-help-view .rge-layout,#account-settings-view .grid-two{grid-template-columns:1fr}}
@media(max-width:850px){#communication-panel>.section-head h2,#my-tasks-panel>.section-head h2,#evidence-summary-view>#evidence-summary h2{font-size:24px!important}#evidence-summary-view form{grid-template-columns:1fr}}
/* Lignes & assignation — tableau Kanban */
#line-items-view .li-quick{display:flex!important;max-width:520px;padding:4px 4px 4px 12px!important;border:1px solid #D0D5DD!important;border-style:solid!important;border-radius:8px!important;background:#fff!important}
#line-items-view .li-quick input{font-size:13.5px!important}
#line-items-view .li-quick button{height:32px!important;min-height:32px!important;padding:0 14px!important}
#line-items-view .li-board-wrap{display:block!important;margin:0!important}
#line-items-view .li-board-wrap>.rg-empty{display:block;padding:28px;text-align:center;color:#8A94A6;background:#fff;border:1px dashed #C9D0DA;border-radius:10px}
.kb-board{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;align-items:start}
.kb-col{display:grid;gap:10px;padding:12px;background:#F1F3F6;border-radius:12px;min-height:220px}
.kb-col h3{display:flex;align-items:center;gap:8px;margin:2px 4px 2px;font-size:13px!important;font-weight:600;color:#344054}
.kb-col h3 b{margin-left:auto;display:inline-grid;place-items:center;min-width:22px;height:20px;padding:0 6px;border-radius:999px;background:#fff;font-size:12px;color:#475467}
.kb-dot{width:8px;height:8px;border-radius:50%;background:#98A2B3}
.kb-col-assigned .kb-dot{background:#D9A00B}.kb-col-in_progress .kb-dot{background:#1D5BD8}.kb-col-done .kb-dot{background:#1E8E3E}
.kb-cards{display:grid;gap:10px}
.kb-empty{margin:0;padding:18px 8px;text-align:center;font-size:12.5px;color:#98A2B3;border:1px dashed #D0D5DD;border-radius:9px}
.kb-card{position:relative;display:grid;gap:8px;padding:12px 14px;background:#fff;border:1px solid #E2E6EC;border-radius:10px;box-shadow:0 1px 2px rgba(16,24,40,.04);transition:border-color .12s,box-shadow .12s}
.kb-card:hover{border-color:#B9C3D2;box-shadow:0 4px 12px rgba(16,24,40,.08)}
.kb-open{position:absolute!important;inset:0;width:100%;height:100%;padding:0!important;margin:0;border:0!important;background:transparent!important;box-shadow:none!important;cursor:pointer;z-index:1;min-height:0!important;border-radius:10px!important}
.kb-card header{display:flex;justify-content:space-between;align-items:flex-start;gap:8px}
.kb-card header strong{font-size:14px;font-weight:600;color:#0B1F3A;line-height:1.3}
.kb-card header details{position:relative;z-index:2;margin:-4px -6px 0 0;border:0;background:none;padding:0}
.kb-card header summary{display:grid;place-items:center;width:28px;height:28px;padding:0!important;border:0!important;border-radius:6px!important;background:transparent!important;color:#5B6678;cursor:pointer;list-style:none;font-size:17px;box-shadow:none!important}
.kb-card header summary::-webkit-details-marker{display:none}
.kb-card header summary::before,.kb-card header summary::after{content:none!important}
.kb-card header summary:hover{background:#EEF2F7!important}
.kb-card header .document-more-menu{position:absolute;right:0;top:calc(100% + 4px);z-index:40;min-width:210px;padding:6px;background:#fff;border:1px solid #E2E6EC;border-radius:9px;box-shadow:0 12px 32px rgba(16,24,40,.14)}
.kb-card header .document-more-menu button{width:100%;height:34px;justify-content:flex-start;border:0!important;background:transparent!important;color:#B42318!important;font-size:13px!important;text-align:left;padding:0 10px!important}
.kb-amount{display:flex;align-items:baseline;justify-content:space-between;gap:8px;font-size:17px;font-weight:700;color:#0B1F3A;font-variant-numeric:tabular-nums}
.kb-amount small{font-size:12px;font-weight:500;color:#8A94A6}
.kb-bar{height:5px;border-radius:999px;background:#EDF0F4;overflow:hidden}
.kb-bar i{display:block;height:100%;border-radius:999px;background:#1D5BD8}
.kb-meta{display:flex;justify-content:space-between;gap:8px;font-size:12px;color:#5B6678}
.kb-meta .pos{color:#17773A!important;font-weight:600}.kb-meta .neg{color:#B42318!important;font-weight:600}
.kb-card footer{display:flex;align-items:center;gap:8px;padding-top:8px;border-top:1px solid #F0F2F5;font-size:12.5px;color:#344054}
.kb-avatar{display:grid;place-items:center;width:24px;height:24px;border-radius:50%;background:#0B1F3A;color:#fff;font-size:10.5px;font-weight:700}
.kb-avatar-empty{background:#EEF2F7;color:#98A2B3}
/* fenêtre du paquet */
.kb-card.open{z-index:250}
.kb-dialog{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);z-index:260;width:min(720px,calc(100% - 32px));max-height:calc(100vh - 48px);overflow:auto;display:grid;gap:16px;margin:0!important;padding:0 24px 24px!important;background:#fff!important;border:0!important;border-radius:14px!important;box-shadow:0 0 0 100vmax rgba(11,31,58,.45),0 24px 64px rgba(16,24,40,.28);cursor:default;animation:udIn .18s ease-out}
.kb-dialog[hidden]{display:none!important}
.kb-dialog-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;padding-top:22px;position:sticky;top:0;background:#fff}
.kb-dialog-head h3{margin:0;font-size:20px!important;font-weight:700;color:#0B1F3A}
.kb-dialog-head p{margin:4px 0 0;font-size:13.5px;color:#5B6678}
body .kb-dialog .li-assign{display:grid!important;grid-template-columns:1fr 1fr auto;align-items:end;gap:12px;padding:14px!important;background:#F8FAFD!important;border:1px solid #E2E6EC!important;border-radius:10px!important}
body .kb-dialog .li-assign select{width:100%;min-width:0}
body .kb-dialog .kb-file input{width:100%}
body .kb-dialog .li-assign button{height:38px;padding:0 18px!important}
@media(max-width:1200px){.kb-board{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:850px){.kb-board{grid-template-columns:1fr}.kb-col{min-height:0}body .kb-dialog .li-assign{grid-template-columns:1fr}.kb-dialog{top:auto;bottom:0;transform:translateX(-50%);width:100%;border-radius:14px 14px 0 0!important}}
.kb-layer{position:fixed;inset:0;z-index:300;display:grid;place-items:center;padding:24px;background:rgba(11,31,58,.45);font-family:Inter,system-ui,sans-serif}
.kb-layer .kb-dialog{position:relative!important;left:auto!important;top:auto!important;transform:none!important;box-shadow:0 24px 64px rgba(16,24,40,.28)!important}
.kb-layer .li-assign label{display:grid;gap:5px;margin:0;font-size:12.5px;font-weight:600;color:#344054}
.kb-layer .li-assign select,.kb-layer .li-assign input[type=file]{height:38px!important;min-height:38px!important;font-size:14px!important;border-radius:8px!important}
.kb-layer .li-lines{width:100%;border-collapse:collapse;background:#fff;border:1px solid #E2E6EC;font-size:13px}
.kb-layer .li-lines th,.kb-layer .li-lines td{height:36px;padding:0 12px!important;border-top:1px solid #EDF0F4;text-align:left;color:#0F1E3D}
.kb-layer .li-lines thead th{background:#F5F6F8;font-weight:600;font-size:12.5px;border-top:0}
.kb-layer .li-lines .num{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.kb-layer .li-link{border:0;background:none;color:#1D5BD8;font-size:12.5px;font-weight:600;cursor:pointer;padding:0}
.kb-card header,.kb-card footer{position:static!important;height:auto!important;min-height:0!important;margin:0!important;padding:0!important;background:none!important;box-shadow:none!important;border-radius:0!important}
.kb-card footer{padding-top:8px!important;border-top:1px solid #F0F2F5!important}
@media(max-width:850px){.kb-layer{padding:0;place-items:end center}.kb-layer .kb-dialog{width:100%;border-radius:14px 14px 0 0!important}}
/* Lignes & assignation — vue horizontale (type Gantt) */
.ln-board{background:#fff;border:1px solid #E2E6EC;border-radius:10px;overflow:hidden}
.ln-head,.ln-row{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(0,1fr) minmax(0,2fr) 140px 130px 44px;align-items:center;column-gap:18px}
.ln-head{height:44px;padding:0 16px;background:#0B1F3A;color:#fff}
.ln-head span{font-size:12px;font-weight:600;letter-spacing:.05em;text-transform:uppercase;color:#E3E8F0}
.ln-head span:nth-child(4),.ln-head span:nth-child(5){text-align:right}
.ln-group h3{display:flex;align-items:center;gap:8px;margin:0;height:34px;padding:0 16px;background:#F5F6F8;border-top:1px solid #E2E6EC;border-bottom:1px solid #E2E6EC;font-size:12.5px!important;font-weight:600;color:#344054}
.ln-group:first-of-type h3{border-top:0}
.ln-group h3 b{display:inline-grid;place-items:center;min-width:20px;height:18px;padding:0 6px;border-radius:999px;background:#fff;border:1px solid #E2E6EC;font-size:11.5px;color:#475467}
.ln-row{position:relative;min-height:62px;padding:8px 16px;border-bottom:1px solid #EDF0F4;background:#fff;transition:background .12s}
.ln-group .ln-row:last-child{border-bottom:0}
.ln-row:hover{background:#F8FAFD}
.ln-row .kb-open{border-radius:0!important}
.ln-name{display:flex;align-items:center;gap:12px;min-width:0}
.ln-name>div{display:grid;min-width:0}
.ln-name strong{font-size:14px;font-weight:600;color:#0B1F3A;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ln-name small{font-size:12px;color:#8A94A6}
.ln-ic{flex:none;display:grid;place-items:center;width:34px;height:34px;border-radius:8px;background:var(--tone);color:#fff}
.ln-ic svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.ln-who{display:flex;align-items:center;gap:8px;font-size:13px;color:#344054;min-width:0}
.ln-who span:last-child{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ln-track{display:flex;align-items:center;gap:12px}
.ln-bar{flex:1;height:14px;border-radius:3px;background:color-mix(in srgb,var(--tone) 18%,#fff);overflow:hidden}
.ln-bar i{display:block;height:100%;background:var(--tone);border-radius:3px}
.ln-track b{min-width:40px;text-align:right;font-size:13px;font-weight:700;color:#0B1F3A}
.ln-num{display:grid;text-align:right;font-variant-numeric:tabular-nums}
.ln-num strong{font-size:14px;font-weight:600;color:#0B1F3A}
.ln-num small{font-size:11.5px;color:#8A94A6}
.ln-margin.pos strong{color:#17773A}.ln-margin.neg strong{color:#B42318}
.ln-more{position:relative;z-index:2;justify-self:end}
.ln-more details{position:relative;margin:0;border:0;background:none;padding:0}
.ln-more summary{display:grid;place-items:center;width:30px;height:30px;padding:0!important;border:0!important;border-radius:6px!important;background:transparent!important;color:#5B6678;cursor:pointer;list-style:none;font-size:17px;box-shadow:none!important}
.ln-more summary::-webkit-details-marker{display:none}
.ln-more summary::before,.ln-more summary::after{content:none!important}
.ln-more summary:hover{background:#EEF2F7!important}
.ln-more .document-more-menu{position:absolute;right:0;top:calc(100% + 4px);z-index:40;min-width:210px;padding:6px;background:#fff;border:1px solid #E2E6EC;border-radius:9px;box-shadow:0 12px 32px rgba(16,24,40,.14)}
.ln-more .document-more-menu button{width:100%;height:34px;justify-content:flex-start;border:0!important;background:transparent!important;color:#B42318!important;font-size:13px!important;text-align:left;padding:0 10px!important}
@media(max-width:1100px){.ln-head,.ln-row{grid-template-columns:minmax(0,1.6fr) minmax(0,1.6fr) 130px 120px 40px}.ln-head span:nth-child(2),.ln-row .ln-who{display:none}}
@media(max-width:850px){
 .ln-head{display:none}
 .ln-row{grid-template-columns:minmax(0,1fr) auto 32px;row-gap:8px;padding:12px 14px}
 .ln-row .ln-name{grid-column:1}
 .ln-row .ln-num:not(.ln-margin){grid-column:2;grid-row:1}
 .ln-row .ln-more{grid-column:3;grid-row:1}
 .ln-row .ln-track{grid-column:1/-1}
 .ln-row .ln-who{display:flex;grid-column:1}
 .ln-row .ln-margin{grid-column:2/4;grid-row:3}
}
.kb-card.ln-row{display:grid;row-gap:0;column-gap:18px;padding:8px 16px;border:0!important;border-bottom:1px solid #EDF0F4!important;border-radius:0!important;box-shadow:none!important}
.kb-card.ln-row:hover{border-color:#EDF0F4!important;box-shadow:none!important}
.ln-group .kb-card.ln-row:last-child{border-bottom:0!important}
@media(max-width:850px){.kb-card.ln-row{row-gap:8px;padding:12px 14px}}
@media(max-width:850px){
 #line-items-view>.section-head:first-child{grid-template-columns:1fr!important}
 #line-items-view .li-actions{grid-column:1!important;grid-row:auto!important;width:100%}
 #line-items-view .li-project{flex:1}
 .kb-card.ln-row{grid-template-columns:minmax(0,1fr) auto 30px}
 .ln-row .ln-who{grid-column:1;grid-row:2}
 .ln-row .ln-margin{grid-column:2/4;grid-row:2;justify-self:end}
 .ln-row .ln-margin small{display:none}
 .ln-row .ln-track{grid-column:1/-1;grid-row:3}
 .ln-row .ln-num:not(.ln-margin) small{display:none}
}

/* =====================================================================
   Mobile : barre supérieure + menu latéral
   ===================================================================== */
.m-topbar{display:none}
@media(max-width:850px){
 .m-topbar{position:fixed;top:0;left:0;right:0;z-index:35;display:flex;align-items:center;gap:10px;height:56px;padding:0 16px;background:#0B1F3A;color:#fff;box-shadow:0 1px 0 rgba(255,255,255,.06)}
 .m-topbar img{width:30px;height:30px;border-radius:7px;background:#fff;padding:3px}
 .m-topbar strong{font-size:16px;font-weight:700;letter-spacing:.02em}
 .mobile-nav-toggle{position:fixed!important;top:8px!important;right:10px!important;z-index:41!important;display:grid!important;place-items:center;width:40px!important;min-width:40px!important;height:40px!important;min-height:40px!important;padding:0!important;border:1px solid rgba(255,255,255,.18)!important;border-radius:9px!important;background:transparent!important;color:#fff!important;box-shadow:none!important}
 .mobile-nav-toggle svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
 .app-shell main{padding:76px 16px 28px!important}
 main>header{display:none!important}
 .sidebar{background:#fff!important;color:#0F1E3D!important;padding:16px 12px!important;display:flex!important;flex-direction:column;gap:10px;overflow:auto;box-shadow:12px 0 40px rgba(16,24,40,.25)!important;border:0!important}
 .sidebar .brand{display:flex;align-items:center;gap:10px;padding:4px 8px 10px;border-bottom:1px solid #EDF0F4;color:#0B1F3A}
 .sidebar .brand img{width:30px;height:30px}
 .sidebar .company-identity-strip{color:#0F1E3D!important;background:#F5F6F8!important;border:0!important;border-radius:8px;padding:8px 10px!important}
 .sidebar .company-identity-strip *{color:#0F1E3D!important}
 .sidebar nav#primary-nav{display:grid!important;gap:2px;background:none!important;border:0!important;padding:0!important}
 .sidebar .nav-section-head{display:block;padding:12px 10px 4px;font-size:11px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:#8A94A6}
 .sidebar .nav,.sidebar .nav-sub{display:flex!important;align-items:center;gap:12px;width:100%;height:42px;padding:0 12px!important;border:0!important;border-radius:8px!important;background:transparent!important;color:#344054!important;font-size:14.5px!important;font-weight:500;text-align:left;box-shadow:none!important}
 .sidebar .nav.active,.sidebar .nav-sub.active{background:#0B1F3A!important;color:#fff!important}
 .sidebar #logout-button,.sidebar #install-app-btn{margin-top:auto;height:42px;border-radius:8px!important;font-size:14px!important}
 .mobile-nav-backdrop{background:rgba(11,31,58,.5)!important}
}
@media(max-width:850px){
 main:has(> #dashboard-view.active)>header{display:flex!important;align-items:center;padding:0!important;margin:0 0 14px!important;background:none!important;border:0!important;box-shadow:none!important;min-height:0!important;position:static!important}
 main:has(> #dashboard-view.active)>header #page-title{font-size:24px!important;font-weight:700;color:#0B1F3A;margin:0}
 .sidebar .nav-section-head svg{display:none}
}
/* Téléphone : plus compact */
@media(max-width:850px){
 .view>.section-head:first-child h2,.rg-page>.section-head:first-child h2{font-size:22px!important;line-height:1.2}
 .view>.section-head:first-child>span{font-size:13px!important;line-height:1.4}
 .view>.section-head:first-child{margin-bottom:12px!important}
 .kb-card.ln-row{padding:8px 12px!important;row-gap:4px!important;column-gap:10px!important;min-height:0}
 .ln-ic{width:26px;height:26px;border-radius:6px}.ln-ic svg{width:14px;height:14px}
 .ln-name{gap:9px}.ln-name strong{font-size:13.5px}.ln-name small{font-size:11px}
 .ln-num strong{font-size:13px}
 .ln-row .ln-who{font-size:12px;padding-left:35px;gap:6px}
 .ln-row .ln-who .kb-avatar{width:18px;height:18px;font-size:8.5px}
 .ln-row .ln-margin strong{font-size:12px}
 .ln-bar{height:6px}.ln-track{gap:8px}.ln-track b{font-size:11.5px;min-width:32px}
 .ln-row .ln-track{padding-left:35px}
 .ln-more summary{width:26px;height:26px;font-size:15px}
 .ln-group h3{height:28px;padding:0 12px;font-size:11.5px!important}
 #line-items-view .li-quick{margin-bottom:10px!important}
 #line-items-view .li-quick input{height:32px!important;min-height:32px!important;font-size:13px!important}
 #line-items-view .li-quick button{height:30px!important;min-height:30px!important;font-size:12.5px!important}
 #line-items-view .li-project select{height:36px!important;min-height:36px!important;font-size:13px!important;line-height:34px}
 #line-items-view .li-more>summary{width:36px;height:36px}
 /* registres : lignes plus serrées */
 .rg-page .rg-row{min-height:0;padding:8px 12px!important}
 .rg-page .rg-name strong,#factures-view .fx-c-num strong{font-size:13px}
 #factures-view .fx-row{padding:9px 12px!important}
 .rg-page .rg-toolbar,#factures-view .fx-toolbar{gap:6px;padding-bottom:10px}
 .rg-page .rg-toolbar select,.rg-page .rg-search input,#factures-view .fx-toolbar select,#factures-view .fx-search input{height:36px!important;min-height:36px!important;font-size:13px!important}
 .rg-page .rg-actions button,#factures-view .fx-actions button{height:36px!important;font-size:13px!important}
}
/* Tableau de bord : notifications (À faire / Aujourd’hui / Cette semaine) */
#dashboard-view .attention-panel{padding:0!important;overflow:hidden;border-radius:10px!important;background:#fff!important;border:1px solid #E2E6EC!important;box-shadow:none!important}
#dashboard-view .attention-panel[hidden]{display:none!important}
.nt-head{display:flex;align-items:center;gap:10px;padding:12px 16px;border-bottom:1px solid #EDF0F4}
.nt-head h3{margin:0;font-size:15px!important;font-weight:600;color:#0B1F3A}
.nt-head small{font-size:12.5px;color:#8A94A6}
.nt-head .nt-action{margin-left:auto}
.nt-head-ic{width:8px;height:8px;border-radius:50%;flex:none}
.nt-warn-bg{background:#C0362C}.nt-today-bg{background:#1D5BD8}.nt-week-bg{background:#6941C6}
#dashboard-view .attention-panel>.list{display:block!important;margin:0!important;padding:0!important}
.nt-group+.nt-group{border-top:1px solid #EDF0F4}
.nt-group-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 16px 4px}
.nt-group-head>span{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:#5B6678}
.nt-group-head b{display:inline-grid;place-items:center;min-width:18px;height:18px;padding:0 5px;border-radius:999px;background:#EEF2F7;font-size:11px;color:#344054;letter-spacing:0}
.nt-action{height:auto!important;min-height:0!important;padding:0!important;border:0!important;background:none!important;box-shadow:none!important;color:#1D5BD8!important;font-size:13px!important;font-weight:600;cursor:pointer;white-space:nowrap}
.nt-action:hover{text-decoration:underline}
.nt-row{display:flex;align-items:center;gap:12px;padding:8px 16px}
.nt-row+.nt-row{border-top:1px solid #F3F4F7}
.nt-ic{flex:none;display:grid;place-items:center;width:32px;height:32px;border-radius:8px}
.nt-ic svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.nt-absence .nt-ic{background:#FFF4E5;color:#B45309}
.nt-rdv .nt-ic{background:#E8EFFC;color:#1F4FB5}
.nt-message .nt-ic{background:#EEF2F7;color:#0B1F3A}
.nt-warn .nt-ic{background:#FDECEA;color:#B42318}
.nt-txt{display:grid;min-width:0;flex:1}
.nt-txt strong{font-size:13.5px;font-weight:600;color:#0F1E3D;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.nt-warn .nt-txt strong{font-weight:500}
.nt-txt small{font-size:12.5px;color:#5B6678;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.nt-meta{flex:none;font-size:12px;font-weight:600;color:#5B6678;font-variant-numeric:tabular-nums}
.nt-more{padding:6px 16px 10px 60px;font-size:12px;color:#8A94A6}
.nt-group:last-child{padding-bottom:6px}
@media(max-width:850px){.nt-head small{display:none}.nt-row{padding:7px 12px;gap:10px}.nt-ic{width:28px;height:28px}.nt-group-head{padding:8px 12px 2px}}
@media(max-width:850px){
 main:has(> #dashboard-view.active)>header{justify-content:flex-start!important;text-align:left!important}
 main:has(> #dashboard-view.active)>header #page-title{font-size:22px!important;text-align:left}
 #dashboard-view.active{gap:10px!important}
 #dashboard-view .hero{padding:10px 12px!important;gap:6px!important}
 #dashboard-view .hero h2,#dashboard-view .hero>small{display:none!important}
 #dashboard-view .hero label{font-size:11.5px!important}
 #dashboard-view .hero select{height:36px!important;min-height:36px!important;font-size:13px!important}
 #dashboard-view .hero .hero-progress{margin:2px 0 0!important;height:5px!important}
 #dashboard-view .finance-kpi-item{padding:9px 10px!important;gap:8px}
 #dashboard-view .finance-kpi-item small{font-size:11px!important}
 #dashboard-view .finance-kpi-item strong{font-size:14.5px!important}
 #dashboard-view .kpi-ic,#dashboard-view .finance-kpi-gauge{width:26px!important;height:26px!important;border-radius:7px}
 #dashboard-view .kpi-ic svg{width:14px;height:14px}
 #dashboard-view .finance-grid{gap:10px!important}
 #dashboard-view .finance-grid>.panel{padding:10px 12px!important}
 #dashboard-view .finance-grid h3{font-size:13.5px!important;margin:0 0 6px}
 #dashboard-view .finance-grid .section-head{margin:0 0 4px!important}
 #dashboard-view .finance-grid .section-head span{font-size:11px;white-space:nowrap}
 #dashboard-view #finance-chantiers-list{margin:0 -12px -10px!important}
 #dashboard-view .finance-chantier-row{padding:8px 12px;gap:5px}
 #dashboard-view .finance-chantier-head{font-size:12.5px}
 #dashboard-view .risk-indicator{padding:9px 12px!important;gap:2px!important}
 #dashboard-view .risk-indicator-heading small{font-size:10.5px}
 #dashboard-view #project-risk{font-size:13px}#dashboard-view #project-risk-detail,#dashboard-view .risk-action{font-size:12px}
 #dashboard-view .cards>article{padding:9px 10px!important;gap:3px!important}
 #dashboard-view .cards .kpi-head small{font-size:11px!important}
 #dashboard-view .cards .kpi-icon{display:none}
 #dashboard-view .cards strong{font-size:14.5px!important}
 #dashboard-view .nt-head{padding:9px 12px}.nt-head h3{font-size:13.5px!important}
 .nt-txt strong{font-size:12.5px}.nt-txt small{font-size:11.5px}.nt-meta{font-size:11px}
}
@media(max-width:850px){
 main:has(> #dashboard-view.active)>header{display:block!important}
 main:has(> #dashboard-view.active)>header #page-title,main:has(> #dashboard-view.active)>header h1{display:block;width:100%;text-align:left!important;margin:0!important}
 #dashboard-view .cards>article{align-content:start!important;min-height:0!important;height:auto!important}
 #dashboard-view .cards{grid-auto-rows:auto!important}
 #dashboard-view .finance-chart-svg{max-height:120px}
 #dashboard-view .finance-kpi-row{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:850px){
 #dashboard-view .cards>article>*{margin:0!important}
 #dashboard-view .cards>article{display:flex!important;flex-direction:column;justify-content:flex-start!important;gap:4px!important}
 #dashboard-view .cards strong{line-height:1.2!important}
 #dashboard-view .finance-chart-svg{height:120px!important;width:100%}
 #dashboard-view .hero .project-switcher{gap:4px!important}
}
@media(max-width:850px){#dashboard-view #project-risk-detail{font-size:12.5px!important}#dashboard-view #project-risk{font-size:13px!important}}
/* menus ⋯ toujours au-dessus des lignes / champs suivants */
.rg-row:has(details[open]),.fx-row:has(details[open]),.ln-row:has(details[open]),.kb-card:has(details[open]),.veh-card:has(details[open]),.bg-row:has(details[open]),.rg-row:has(.facture-tracking-toggle[open]){z-index:40!important;position:relative}
#vehicles-view .veh-strip:has(details[open]),.rg-table:has(details[open]),.fx-table:has(details[open]){position:relative;z-index:35}

/* =====================================================================
   Visionneuse plein écran (plans, PDF, photos) — PC et téléphone
   ===================================================================== */
.dv{position:fixed;inset:0;z-index:400;display:flex;flex-direction:column;background:#0E1626;font-family:Inter,system-ui,sans-serif}
.dv[hidden]{display:none!important}
body.dv-open{overflow:hidden}
.dv-bar{flex:none;display:flex;align-items:center;gap:12px;height:56px;padding:0 10px 0 8px;background:#0B1F3A;color:#fff;border-bottom:1px solid rgba(255,255,255,.08)}
.dv-bar strong{flex:1;min-width:0;font-size:15px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dv-tools{display:flex;align-items:center;gap:4px}
.dv-zoom{display:inline-flex;align-items:center;gap:2px;margin-right:6px;padding-right:8px;border-right:1px solid rgba(255,255,255,.15)}
.dv-zoom[hidden]{display:none}
.dv-zoom span{min-width:58px;text-align:center;font-size:12.5px;font-weight:600;color:#C9D3E3;font-variant-numeric:tabular-nums}
.dv-btn{display:grid;place-items:center;width:40px;height:40px;padding:0!important;border:0!important;border-radius:9px!important;background:transparent!important;color:#fff!important;cursor:pointer;box-shadow:none!important;min-height:0!important;text-decoration:none}
.dv-btn:hover{background:rgba(255,255,255,.1)!important}
.dv-btn svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.dv-stage{flex:1;min-height:0;overflow:auto;display:flex;background:#1B2536}
.dv-stage iframe{flex:1;width:100%;height:100%;border:0;background:#fff}
.dv-stage-image{align-items:flex-start;justify-content:center;padding:16px}
.dv-stage-image img{display:block;margin:auto;max-width:none;box-shadow:0 8px 30px rgba(0,0,0,.4);background:#fff}
.dv-stage-image img.dv-fit{max-width:100%;max-height:calc(100dvh - 56px - 32px);object-fit:contain}
@media(max-width:850px){.dv-bar{height:52px}.dv-zoom span{display:none}.dv-btn{width:38px;height:38px}.dv-stage-image{padding:8px}.dv-stage-image img.dv-fit{max-height:calc(100dvh - 52px - 16px)}}

/* =====================================================================
   Mesurer le plan / Analyser l'ossature — plein écran
   ===================================================================== */
#plan-measure-modal,#dxf-analyze-modal{position:fixed!important;inset:0!important;z-index:380!important;padding:0!important;background:rgba(11,31,58,.6)!important;display:block!important}
#plan-measure-modal[hidden],#dxf-analyze-modal[hidden]{display:none!important}
#plan-measure-modal .plan-measure-card,#dxf-analyze-modal .worker-detail-card{position:fixed!important;inset:0!important;width:100vw!important;max-width:none!important;height:100dvh!important;max-height:none!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;background:#fff!important;box-shadow:none!important;transform:none!important;display:flex!important;flex-direction:column;overflow:hidden}
#dxf-analyze-modal .worker-detail-card{overflow:auto}
#plan-measure-modal .worker-detail-header,#dxf-analyze-modal .worker-detail-header{flex:none;display:flex!important;align-items:center;justify-content:space-between;gap:12px;min-height:56px;margin:0!important;padding:0 10px 0 18px!important;background:#0B1F3A!important;color:#fff!important;border:0!important}
#plan-measure-modal .worker-detail-header small,#plan-measure-modal .worker-detail-header p,#dxf-analyze-modal .worker-detail-header small,#dxf-analyze-modal .worker-detail-header p{display:none!important}
#plan-measure-modal .worker-detail-header h2,#dxf-analyze-modal .worker-detail-header h2{margin:0!important;font-size:16px!important;font-weight:600!important;color:#fff!important}
#plan-measure-modal .icon-close,#dxf-analyze-modal .icon-close,#dxf-analyze-close{display:grid!important;place-items:center;width:40px!important;height:40px!important;padding:0!important;border:0!important;border-radius:9px!important;background:transparent!important;color:#fff!important;font-size:26px!important;line-height:1;box-shadow:none!important}
#plan-measure-modal .icon-close:hover{background:rgba(255,255,255,.1)!important}
#plan-measure-modal .plan-measure-toolbar{flex:none;display:flex!important;flex-wrap:wrap;align-items:center;gap:6px;margin:0!important;padding:8px 14px!important;background:#F5F6F8!important;border-bottom:1px solid #E2E6EC!important}
#plan-measure-modal .plan-measure-toolbar button,#plan-measure-modal .plan-measure-toolbar summary,#plan-measure-modal .plan-measure-toolbar select{height:34px!important;min-height:34px!important;padding:0 12px!important;font-size:13px!important;border-radius:7px!important}
#plan-measure-modal .plan-measure-zoom{display:inline-flex;align-items:center;gap:4px}
#plan-measure-modal .plan-measure-zoom[hidden]{display:none}
#plan-measure-modal .plan-measure-zoom button{width:34px;padding:0!important}
#plan-measure-modal .plan-measure-status{margin-left:auto;font-size:12.5px;color:#5B6678}
#plan-measure-modal .plan-measure-info-box{flex:none;margin:8px 14px 0!important}
#plan-measure-modal .plan-measure-body{flex:1;min-height:0;display:grid!important;grid-template-columns:minmax(0,1fr) 340px;gap:0!important;margin:0!important}
#plan-measure-modal .plan-measure-body:has(#plan-measure-list-wrap[hidden]){grid-template-columns:minmax(0,1fr)}
#plan-measure-modal .plan-measure-canvas-wrap{min-height:0!important;height:100%!important;max-height:none!important;overflow:auto!important;margin:0!important;border:0!important;border-radius:0!important;background:#E9ECF1!important}
#plan-measure-modal .plan-measure-list-wrap{min-height:0;height:100%!important;max-height:none!important;overflow:auto;margin:0!important;padding:14px!important;border:0!important;border-left:1px solid #E2E6EC!important;border-radius:0!important;background:#fff!important}
#plan-measure-modal .plan-measure-list-wrap[hidden]{display:none!important}
#dxf-analyze-modal .worker-detail-card>*:not(.worker-detail-header){margin-left:18px!important;margin-right:18px!important}
@media(max-width:850px){
 #plan-measure-modal .plan-measure-body{grid-template-columns:1fr;grid-template-rows:minmax(0,1fr) auto}
 #plan-measure-modal .plan-measure-list-wrap{height:auto!important;max-height:34dvh!important;border-left:0!important;border-top:1px solid #E2E6EC!important;padding:10px 12px!important}
 #plan-measure-modal .plan-measure-toolbar{flex-wrap:nowrap;overflow-x:auto;padding:6px 10px!important}
 #plan-measure-modal .plan-measure-toolbar>*{flex:none}
 #plan-measure-modal .plan-measure-status{display:none}
 #dxf-analyze-modal .worker-detail-card>*:not(.worker-detail-header){margin-left:12px!important;margin-right:12px!important}
}
#plan-measure-modal .plan-measure-card,#dxf-analyze-modal .worker-detail-card{gap:0!important}
#plan-measure-modal .worker-detail-header>div,#dxf-analyze-modal .worker-detail-header>div{flex:1;min-width:0}
#plan-measure-modal .worker-detail-header h2,#dxf-analyze-modal .worker-detail-header h2{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#plan-measure-modal .icon-close{flex:none}
#plan-measure-modal .plan-measure-toolbar{width:100%!important;border-radius:0!important;border-left:0!important;border-right:0!important;border-top:0!important;box-shadow:none!important}
#plan-measure-modal .plan-measure-toolbar button,#plan-measure-modal .plan-measure-toolbar summary{white-space:nowrap!important;width:auto!important;display:inline-flex!important;align-items:center;gap:4px;background:#fff!important;border:1px solid #D0D5DD!important;color:#344054!important;box-shadow:none!important}
#plan-measure-modal .plan-measure-zoom{padding:0!important;background:none!important;border:0!important;gap:4px!important}
#plan-measure-modal .plan-measure-zoom button{min-width:34px;justify-content:center}
#plan-measure-modal #plan-measure-zoom-level,#plan-measure-modal #plan-measure-page-label{min-width:44px;text-align:center;font-size:12.5px;font-weight:600;color:#344054}
@media(max-width:850px){#plan-measure-modal .worker-detail-header{padding-left:12px!important}#plan-measure-modal .worker-detail-header h2{font-size:14px!important}}
/* Barre d'outils du plan — nouvelle */
#plan-measure-modal .pm-bar{display:flex!important;flex-wrap:nowrap!important;align-items:center;gap:10px!important;min-height:56px;padding:8px 14px!important;background:#fff!important;border-bottom:1px solid #E2E6EC!important}
.pm-group{display:inline-flex;align-items:center;gap:4px}
.pm-group[hidden]{display:none!important}
.pm-tools{padding:3px;background:#F1F3F6;border-radius:10px}
#plan-measure-modal .pm-bar .pm-tool{display:inline-flex!important;flex-direction:column;align-items:center;justify-content:center;gap:2px;width:auto!important;min-width:64px;height:46px!important;min-height:46px!important;padding:0 10px!important;border:0!important;border-radius:8px!important;background:transparent!important;color:#344054!important;font-size:11.5px!important;font-weight:600;box-shadow:none!important}
#plan-measure-modal .pm-bar .pm-tool svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
#plan-measure-modal .pm-bar .pm-tool:hover{background:#fff!important;color:#0B1F3A!important}
#plan-measure-modal .pm-bar .pm-tool.active{background:#0B1F3A!important;color:#fff!important}
#plan-measure-modal .pm-bar .pm-tool:disabled{opacity:.4}
#plan-measure-modal .pm-bar .pm-select{height:34px!important;min-height:34px!important;font-size:12.5px!important;margin:0 4px}
#plan-measure-modal .pm-bar .pm-chip{display:inline-flex!important;align-items:center;gap:6px;height:34px!important;min-height:34px!important;padding:0 12px!important;border:1px solid #D0D5DD!important;border-radius:8px!important;background:#fff!important;color:#344054!important;font-size:13px!important;font-weight:600;box-shadow:none!important;white-space:nowrap}
#plan-measure-modal .pm-bar .pm-chip[hidden]{display:none!important}
#plan-measure-modal .pm-bar .pm-chip svg,#plan-measure-modal .pm-bar .pm-icon svg,#plan-measure-modal .pm-bar .pm-menu summary svg,#plan-measure-modal .pm-bar .pm-menu-item svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;flex:none}
#plan-measure-modal .pm-bar .pm-chip-primary{background:#0B1F3A!important;color:#fff!important;border-color:#0B1F3A!important}
#plan-measure-modal .pm-bar .pm-menu{position:relative;margin:0;border:0;background:none;padding:0}
#plan-measure-modal .pm-bar .pm-menu>summary{display:inline-flex!important;align-items:center;gap:6px;height:38px!important;min-height:38px!important;padding:0 12px!important;border:1px solid #D0D5DD!important;border-radius:8px!important;background:#fff!important;color:#344054!important;font-size:13px!important;font-weight:600;cursor:pointer;list-style:none;box-shadow:none!important}
#plan-measure-modal .pm-bar .pm-menu>summary::-webkit-details-marker{display:none}
#plan-measure-modal .pm-bar .pm-menu>summary::before,#plan-measure-modal .pm-bar .pm-menu>summary::after{content:none!important}
#plan-measure-modal .pm-bar .pm-menu[open]>summary{background:#F1F3F6!important}
#plan-measure-modal .pm-bar .pm-menu-list{position:absolute!important;left:0;top:calc(100% + 6px);z-index:50;display:grid!important;gap:2px;width:280px;padding:8px!important;margin:0!important;background:#fff!important;border:1px solid #E2E6EC!important;border-radius:10px!important;box-shadow:0 16px 40px rgba(16,24,40,.16)!important}
.pm-menu-title{padding:4px 8px 6px;font-size:11px;font-weight:600;letter-spacing:.05em;text-transform:uppercase;color:#8A94A6}
#plan-measure-modal .pm-bar .pm-menu-field{display:block;margin:0 4px 4px!important}
#plan-measure-modal .pm-bar .pm-menu-field select{width:100%;height:36px!important;min-height:36px!important;font-size:13px!important}
#plan-measure-modal .pm-bar .pm-menu-item{display:flex!important;align-items:center;gap:10px;width:100%;height:36px!important;min-height:36px!important;padding:0 10px!important;border:0!important;border-radius:7px!important;background:transparent!important;color:#344054!important;font-size:13px!important;font-weight:500;text-align:left;box-shadow:none!important}
#plan-measure-modal .pm-bar .pm-menu-item:hover{background:#F2F4F7!important}
.pm-menu-sep{height:1px;margin:4px 6px;background:#EDF0F4}
#plan-measure-modal .pm-bar .plan-measure-detect-hint{padding:0 10px;font-size:11.5px;color:#8A94A6}
#plan-measure-modal .pm-bar .plan-measure-detect-hint:empty{display:none}
#plan-measure-modal .pm-bar .pm-view{margin-left:auto;gap:6px}
#plan-measure-modal .pm-bar .pm-seg{display:inline-flex;align-items:center;gap:0;padding:2px;border:1px solid #D0D5DD;border-radius:8px;background:#fff}
#plan-measure-modal .pm-bar .pm-seg[hidden]{display:none!important}
#plan-measure-modal .pm-bar .pm-seg span{min-width:52px;text-align:center;font-size:12.5px;font-weight:600;color:#344054;font-variant-numeric:tabular-nums}
#plan-measure-modal .pm-bar .pm-icon{display:grid!important;place-items:center;width:34px!important;min-width:34px!important;height:34px!important;min-height:34px!important;padding:0!important;border:0!important;border-radius:7px!important;background:transparent!important;color:#344054!important;box-shadow:none!important}
#plan-measure-modal .pm-bar .pm-view>.pm-icon{border:1px solid #D0D5DD!important;background:#fff!important;width:38px!important;height:38px!important}
#plan-measure-modal .pm-bar .pm-icon:hover{background:#F2F4F7!important}
#plan-measure-modal .pm-bar .pm-toggle[aria-expanded="true"]{background:#0B1F3A!important;color:#fff!important;border-color:#0B1F3A!important}
#plan-measure-modal .pm-bar .plan-measure-status{margin-left:0!important;flex:1;min-width:0;font-size:12.5px;color:#5B6678;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#plan-measure-modal .pm-bar .plan-measure-candidates-actions{display:inline-flex;gap:6px;align-items:center}
#plan-measure-modal .pm-bar .plan-measure-candidates-actions[hidden]{display:none!important}
@media(max-width:850px){
 #plan-measure-modal .pm-bar{overflow-x:auto;gap:8px!important;padding:6px 10px!important;min-height:0}
 #plan-measure-modal .pm-bar .pm-tool{min-width:52px;height:42px!important;min-height:42px!important;padding:0 6px!important;font-size:10.5px!important}
 #plan-measure-modal .pm-bar .pm-view{margin-left:0}
 #plan-measure-modal .pm-bar .plan-measure-status{display:none}
 #plan-measure-modal .pm-bar .pm-menu-list{position:fixed!important;left:10px!important;right:10px;top:120px!important;width:auto}
}

/* =====================================================================
   Fenêtres : Suivi ouvrier, Attributions, Calendrier mensuel,
   Modifier l'utilisateur, Entreprise, Ajouter un ouvrier — nouveau style
   ===================================================================== */
#worker-detail-modal,#worker-assignment-modal,#worker-timesheet-modal,#user-edit-modal,#company-identity-modal{position:fixed!important;inset:0!important;z-index:360!important;display:block!important;padding:0!important;background:rgba(11,31,58,.45)!important;backdrop-filter:none!important}
#worker-detail-modal[hidden],#worker-assignment-modal[hidden],#worker-timesheet-modal[hidden],#user-edit-modal[hidden],#company-identity-modal[hidden]{display:none!important}
/* panneau latéral */
#worker-detail-modal .worker-detail-card,#worker-assignment-modal .worker-detail-card{position:fixed!important;top:0!important;right:0!important;bottom:0!important;left:auto!important;width:min(680px,100%)!important;max-width:none!important;height:100dvh!important;max-height:none!important;margin:0!important;padding:0 0 24px!important;border:0!important;border-radius:0!important;background:#F8FAFC!important;box-shadow:-16px 0 48px rgba(16,24,40,.22)!important;overflow:auto;display:block!important;animation:fxIn .18s ease-out;transform:none!important}
#worker-detail-modal .worker-detail-header,#worker-assignment-modal .worker-detail-header{position:sticky;top:0;z-index:5;display:flex!important;align-items:center;justify-content:space-between;gap:14px;margin:0 0 16px!important;padding:16px 20px!important;background:#fff!important;border:0!important;border-bottom:1px solid #E2E6EC!important}
#worker-detail-modal .worker-detail-heading{display:flex;align-items:center;gap:14px;min-width:0}
#worker-detail-modal .worker-avatar--drawer{width:48px!important;height:48px!important;font-size:16px!important;flex:none}
#worker-detail-modal .worker-detail-header small,#worker-assignment-modal .worker-detail-header small{display:block;font-size:11px!important;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:#8A94A6!important}
#worker-detail-modal .worker-detail-header h2,#worker-assignment-modal .worker-detail-header h2{margin:2px 0 0!important;font-size:20px!important;font-weight:700!important;color:#0B1F3A!important}
#worker-detail-modal .worker-detail-header p,#worker-assignment-modal .worker-detail-header p{margin:2px 0 0!important;font-size:13px!important;color:#5B6678!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#worker-detail-modal .icon-close,#worker-assignment-modal .icon-close,#worker-timesheet-modal .icon-close,#user-edit-modal .icon-close,#company-identity-modal .icon-close{flex:none;display:grid!important;place-items:center;width:38px!important;height:38px!important;padding:0!important;border:1px solid #E2E6EC!important;border-radius:9px!important;background:#fff!important;color:#344054!important;font-size:22px!important;line-height:1!important;box-shadow:none!important}
#worker-detail-modal .icon-close:hover,#worker-assignment-modal .icon-close:hover{background:#F2F4F7!important}
#worker-detail-modal .worker-detail-card>*:not(.worker-detail-header),#worker-assignment-modal .worker-detail-card>*:not(.worker-detail-header){margin-left:20px!important;margin-right:20px!important}
#worker-detail-modal .worker-detail-card section,#worker-detail-modal .worker-detail-card .panel,#worker-assignment-modal .assignment-scroll{margin-top:0!important;margin-bottom:14px!important;padding:16px!important;background:#fff!important;border:1px solid #E2E6EC!important;border-radius:10px!important;box-shadow:none!important}
#worker-detail-modal .worker-detail-period{display:flex!important;align-items:flex-end;justify-content:space-between;gap:12px;margin-bottom:14px!important}
#worker-detail-modal .worker-detail-period label,#worker-assignment-modal .assignment-search-field{display:grid;gap:5px;margin:0 0 14px;font-size:12.5px;font-weight:600;color:#344054}
#worker-detail-modal input,#worker-detail-modal select,#worker-assignment-modal input{height:38px!important;min-height:38px!important;font-size:13.5px!important;border-radius:8px!important;font-family:inherit!important}
#worker-detail-modal #worker-detail-summary{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));gap:0!important;padding:0!important;overflow:hidden}
#worker-detail-modal #worker-detail-summary>div{display:grid;gap:2px;padding:12px 14px;border-left:1px solid #EDF0F4;background:none!important;border-radius:0!important;margin:0!important}
#worker-detail-modal #worker-detail-summary>div:first-child{border-left:0}
#worker-detail-modal #worker-detail-summary small{font-size:11.5px;color:#5B6678}
#worker-detail-modal #worker-detail-summary strong{font-size:17px;font-weight:700;color:#0B1F3A;font-family:inherit!important}
#worker-detail-modal #worker-detail-summary span{font-size:11.5px;color:#8A94A6}
#worker-detail-modal h3,#worker-assignment-modal h3{margin:0 0 10px!important;font-size:15px!important;font-weight:600!important}
#worker-detail-modal button.secondary,#worker-detail-modal button.primary,#worker-assignment-modal button.secondary,#worker-assignment-modal button.primary{height:34px!important;min-height:34px!important;padding:0 12px!important;font-size:13px!important;border-radius:7px!important}
/* calendrier compact partout (même style que Temps de travail) */
.work-calendar .calendar-stats{display:none!important}
.work-calendar .calendar-grid{gap:5px!important}
.work-calendar .calendar-cell{min-height:56px!important;padding:5px 4px 3px!important;border-radius:8px!important;background:#fff!important;border:1px solid #E7EAEF!important;box-shadow:none!important}
.work-calendar .calendar-cell.empty{background:transparent!important;border-color:transparent!important}
.work-calendar .calendar-cell .calendar-add-rdv{opacity:0;transition:opacity .12s}
.work-calendar .calendar-cell:hover .calendar-add-rdv,.work-calendar .calendar-cell:focus-within .calendar-add-rdv{opacity:1}
@media(hover:none){.work-calendar .calendar-cell .calendar-add-rdv{opacity:1}}
.work-calendar .calendar-quick-edit{font-size:10px!important;padding:1px 5px!important;min-height:0!important;height:auto!important}
.work-calendar *{font-family:inherit!important}
/* calendrier mensuel plein écran */
#worker-timesheet-modal .worker-timesheet-page{position:fixed!important;inset:0!important;width:100vw!important;height:100dvh!important;max-width:none!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;background:#F8FAFC!important;overflow:auto;box-shadow:none!important}
#worker-timesheet-modal .worker-timesheet-header{position:sticky;top:0;z-index:5;display:flex!important;align-items:center;gap:14px;margin:0!important;padding:12px 20px!important;background:#0B1F3A!important;color:#fff!important;border:0!important}
#worker-timesheet-modal .worker-timesheet-header *{color:#fff!important}
#worker-timesheet-modal .worker-timesheet-header small{color:#C9D3E3!important;font-size:11px!important;letter-spacing:.06em}
#worker-timesheet-modal .worker-timesheet-header h2{margin:0!important;font-size:18px!important;font-weight:700}
#worker-timesheet-modal .worker-timesheet-header input{color:#0F1E3D!important;height:34px!important;min-height:34px!important;width:70px;border-radius:7px!important}
#worker-timesheet-modal .icon-close{border-color:rgba(255,255,255,.2)!important;background:transparent!important;color:#fff!important}
#worker-timesheet-modal .worker-timesheet-page>*:not(.worker-timesheet-header){max-width:1100px;margin-left:auto!important;margin-right:auto!important;padding-left:20px;padding-right:20px}
/* Modifier l'utilisateur / Entreprise : fenêtre centrée */
#user-edit-modal .login-card,#company-identity-modal .login-card{position:fixed!important;left:50%!important;top:50%!important;transform:translate(-50%,-50%)!important;width:min(560px,calc(100% - 32px))!important;max-height:calc(100vh - 48px);overflow:auto;margin:0!important;padding:22px 24px!important;background:#fff!important;border:0!important;border-radius:14px!important;box-shadow:0 24px 64px rgba(16,24,40,.28)!important;display:grid;gap:12px;animation:udIn .18s ease-out}
#user-edit-modal .section-head,#company-identity-modal .section-head{display:flex!important;justify-content:space-between;align-items:flex-start;gap:12px;margin:0!important;padding:0!important;border:0!important}
#user-edit-modal .section-head small,#company-identity-modal .section-head small{display:none}
#user-edit-modal h2,#company-identity-modal h2{margin:0!important;font-size:20px!important;font-weight:700;color:#0B1F3A}
#user-edit-modal label,#company-identity-modal label{display:grid;gap:5px;margin:0;font-size:12.5px;font-weight:600;color:#344054}
#user-edit-modal input,#user-edit-modal select,#company-identity-modal input{height:40px!important;min-height:40px!important;font-size:14px!important;border-radius:8px!important}
/* Ajouter un ouvrier : panneau latéral */
#settings-view #worker-add-panel{position:fixed!important;top:0;right:0;bottom:0;z-index:300;width:min(520px,100%);margin:0!important;padding:0!important;display:flex!important;flex-direction:column;background:#fff!important;border:0!important;border-radius:0!important;box-shadow:0 0 0 100vmax rgba(11,31,58,.45),-12px 0 40px rgba(16,24,40,.18)!important;overflow:auto;animation:fxIn .18s ease-out}
#settings-view #worker-add-panel[hidden]{display:none!important}
#settings-view #worker-add-panel .worker-add-panel-head{position:sticky;top:0;z-index:2;display:flex!important;justify-content:space-between;align-items:center;gap:12px;margin:0!important;padding:16px 20px!important;background:#fff;border-bottom:1px solid #E2E6EC}
#settings-view #worker-add-panel .worker-add-panel-head small,#settings-view #worker-add-panel .worker-add-panel-head p{display:none}
#settings-view #worker-add-panel .worker-add-panel-head h3{margin:0;font-size:20px!important;font-weight:700;color:#0B1F3A}
#settings-view #worker-add-panel .worker-add-panel-head button{height:36px!important;min-height:36px!important;font-size:13px!important}
#settings-view #worker-add-panel form{display:grid!important;gap:12px;margin:0!important;padding:16px 20px 24px!important;border:0!important;box-shadow:none!important;border-radius:0!important;background:none!important}
#settings-view #worker-add-panel label{display:grid;gap:5px;margin:0;font-size:12.5px;font-weight:600;color:#344054}
#settings-view #worker-add-panel label[hidden]{display:none}
#settings-view #worker-add-panel input:not([type=file]),#settings-view #worker-add-panel select:not([multiple]){height:40px!important;min-height:40px!important;font-size:14px!important;border-radius:8px!important}
#settings-view #worker-add-panel form>small{font-size:12px;color:#8A94A6}
@media(max-width:850px){
 #worker-detail-modal #worker-detail-summary{grid-template-columns:1fr 1fr}
 #worker-detail-modal #worker-detail-summary>div:nth-child(3){border-left:0}
 #worker-detail-modal #worker-detail-summary>div:nth-child(n+3){border-top:1px solid #EDF0F4}
 #worker-detail-modal .worker-detail-card>*:not(.worker-detail-header),#worker-assignment-modal .worker-detail-card>*:not(.worker-detail-header){margin-left:12px!important;margin-right:12px!important}
 #worker-detail-modal .worker-detail-header,#worker-assignment-modal .worker-detail-header{padding:12px!important}
 #worker-detail-modal .worker-detail-header h2{font-size:17px!important}
 .work-calendar .calendar-cell{min-height:46px!important}
}
/* Production et situations */
main:has(> #production-view.active)>header{display:none!important}
#production-view #production-panel{padding:0!important;background:none!important;border:0!important;box-shadow:none!important}
#production-view .production-head{display:grid!important;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:4px 16px;margin:0 0 20px!important}
#production-view .production-head small{display:none}
#production-view .production-head h2{margin:0;font-size:30px!important;font-weight:700;letter-spacing:-.02em;color:#0B1F3A}
#production-view .production-head p{margin:4px 0 0;font-size:15px;color:#5B6678}
#production-view .production-head .status{display:inline-flex;align-items:center;height:28px;padding:0 12px;border-radius:999px;background:#FDF3DC;color:#946200;font-size:12.5px;font-weight:600;border:0}
#production-view .production-form{display:grid!important;gap:16px;margin:0 0 24px!important;padding:20px!important;background:#fff;border:1px solid #E2E6EC;border-radius:12px}
#production-view .production-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px!important}
#production-view fieldset{display:grid;gap:12px;align-content:start;margin:0!important;padding:16px!important;border:1px solid #EDF0F4!important;border-radius:10px!important;background:#FBFCFD!important;min-width:0}
#production-view legend{float:left;display:flex;align-items:center;gap:10px;width:100%;margin:0 0 4px!important;padding:0!important;font-size:15px!important;font-weight:600!important;color:#0B1F3A!important}
#production-view legend b{display:grid;place-items:center;width:26px;height:26px;border-radius:50%;background:#0B1F3A;color:#fff;font-size:13px;font-weight:700}
#production-view fieldset label{display:grid;gap:5px;margin:0;font-size:12.5px;font-weight:600;color:#344054}
#production-view fieldset input:not([type=file]),#production-view fieldset select{height:40px!important;min-height:40px!important;font-size:14px!important;border-radius:8px!important;background:#fff!important}
#production-view .measure-actions{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
#production-view .measure-actions button{height:auto!important;min-height:44px!important;padding:8px 10px!important;font-size:12.5px!important;line-height:1.3;border-radius:8px!important;background:#fff!important}
#production-view fieldset small{font-size:12px;color:#8A94A6}
#production-view .production-live-calc{padding:14px 16px!important;border-radius:10px!important;background:#0B1F3A!important;color:#fff!important;font-size:18px!important;font-weight:700!important;font-family:inherit!important;letter-spacing:0;font-variant-numeric:tabular-nums}
#production-view .production-submit{justify-self:end;height:42px;padding:0 20px!important}
#production-view .production-results{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px}
#production-view .production-results>.list{margin:0!important;padding:16px 18px!important;background:#fff;border:1px solid #E2E6EC;border-radius:12px;min-height:80px}
#production-view .production-results>.list>small{display:block;padding:16px;text-align:center;color:#8A94A6}
#production-view .production-results .list-item{margin:0!important;padding:0!important;border:0!important;background:none!important;box-shadow:none!important}
@media(max-width:900px){#production-view .production-grid,#production-view .production-results{grid-template-columns:1fr}#production-view .production-head{grid-template-columns:1fr}#production-view .production-head h2{font-size:22px!important}#production-view .measure-actions{grid-template-columns:1fr}#production-view .production-form{padding:12px!important}}
/* Champs fichier : nouveau bouton partout */
input[type=file]{font-size:13px!important;color:#5B6678!important;cursor:pointer}
input[type=file]::file-selector-button{margin-right:12px;height:32px;padding:0 14px;border:1px solid #D0D5DD;border-radius:7px;background:#fff;color:#0B1F3A;font:600 13px Inter,system-ui,sans-serif;cursor:pointer;transition:background .12s}
input[type=file]::file-selector-button:hover{background:#F2F4F7}
input[type=file]:not(.ud-drop input){padding:5px 6px!important;border:1px dashed #C3CAD5!important;border-radius:8px!important;background:#F8FAFC!important;height:auto!important;min-height:44px!important}
/* Production — nouvelle mise en page : formulaire en étapes + récapitulatif */
#production-view .pr-form{display:grid!important;grid-template-columns:minmax(0,1fr) 320px;gap:20px!important;align-items:start;padding:0!important;background:none!important;border:0!important}
#production-view .pr-main{display:grid;background:#fff;border:1px solid #E2E6EC;border-radius:12px;overflow:hidden}
#production-view .pr-step{display:grid;gap:14px;padding:20px 22px;border-top:1px solid #EDF0F4}
#production-view .pr-step:first-child{border-top:0}
#production-view .pr-step header{display:flex;align-items:flex-start;gap:12px;margin:0;padding:0;background:none;border:0;position:static;height:auto;min-height:0;box-shadow:none}
#production-view .pr-num{flex:none;display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:#0B1F3A;color:#fff;font-size:13px;font-weight:700}
#production-view .pr-step h3{margin:0;font-size:15.5px!important;font-weight:600;color:#0B1F3A}
#production-view .pr-step header small{display:block;margin-top:2px;font-size:12.5px;color:#8A94A6}
#production-view .pr-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px}
#production-view .pr-row-2{grid-template-columns:minmax(0,2fr) minmax(0,1fr)}
#production-view .pr-row label,#production-view .pr-side label{display:grid;gap:5px;margin:0;font-size:12.5px;font-weight:600;color:#344054}
#production-view .pr-row input:not([type=file]):not([type=hidden]),#production-view .pr-row select,#production-view .pr-side input{height:40px!important;min-height:40px!important;font-size:14px!important;border-radius:8px!important;background:#fff!important}
#production-view #capture-metadata{display:contents}
#production-view .pr-drop{padding:20px 16px}
#production-view .pr-methods{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
#production-view .pr-method{display:grid!important;justify-items:start;gap:2px;height:auto!important;min-height:0!important;padding:12px 14px!important;border:1px solid #E2E6EC!important;border-radius:10px!important;background:#fff!important;text-align:left;box-shadow:none!important;color:#0F1E3D!important}
#production-view .pr-method:hover{border-color:#1D5BD8!important;background:#F5F8FF!important}
#production-view .pr-method svg{width:22px;height:22px;margin-bottom:4px;fill:none;stroke:#1D5BD8;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
#production-view .pr-method strong{font-size:13.5px;font-weight:600}
#production-view .pr-method small{font-size:12px;color:#8A94A6;font-weight:400}
#production-view .pr-hint{font-size:12.5px;color:#8A94A6}
#production-view .pr-side{position:sticky;top:84px;display:grid;gap:14px;padding:20px;background:#fff;border:1px solid #E2E6EC;border-radius:12px}
#production-view .pr-side h3{margin:0;font-size:12px!important;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:#5B6678}
#production-view .pr-total{display:grid;gap:6px;padding:14px;border-radius:10px;background:#F5F8FF;border:1px solid #C7D7FB}
#production-view .pr-total small{font-size:12px;color:#5B6678}
#production-view .pr-side .production-live-calc{padding:0!important;background:none!important;color:#0B1F3A!important;font-size:19px!important;font-weight:700!important}
#production-view .pr-side .production-submit{justify-self:stretch;width:100%;height:44px}
#production-view .pr-note{font-size:12px;color:#8A94A6}
#production-view .production-summary-card{display:grid;gap:6px}
#production-view .production-summary-card strong{font-size:15px;font-weight:600;color:#0B1F3A}
@media(max-width:1100px){#production-view .pr-form{grid-template-columns:1fr}#production-view .pr-side{position:static}}
@media(max-width:850px){#production-view .pr-methods{grid-template-columns:1fr}#production-view .pr-row-2{grid-template-columns:1fr}#production-view .pr-step{padding:14px}}
#production-view .pr-step header{justify-content:flex-start!important;text-align:left!important;grid-template-columns:none!important}
#production-view .pr-step header>div{text-align:left!important;flex:1;min-width:0}
/* Dossier de preuves — assistant + dépôt */
#evidence-summary-view .ev-head{display:grid!important;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:4px 16px;margin:0 0 20px!important}
#evidence-summary-view .ev-head small{display:none}
#evidence-summary-view .ev-head h2{margin:0;font-size:30px!important;font-weight:700;letter-spacing:-.02em;color:#0B1F3A}
#evidence-summary-view .ev-head>span{font-size:15px;color:#5B6678}
#evidence-summary-view .ev-status{grid-column:2;grid-row:1/3;align-self:center;margin:0!important;padding:0!important;background:none!important;border:0!important}
.ev-chip{display:inline-flex;align-items:center;min-height:30px;padding:4px 12px;border-radius:999px;font-size:12.5px;font-weight:600;max-width:420px}
.ev-ok{background:#E7F5EC;color:#17773A}.ev-missing{background:#FDF3DC;color:#946200}
#evidence-summary-view .ev-layout{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:20px;align-items:start}
#evidence-summary-view .ev-chat{display:flex!important;flex-direction:column;min-height:560px;margin:0!important;padding:0!important;background:#fff!important;border:1px solid #E2E6EC!important;border-radius:12px!important;overflow:hidden}
.ev-chat-head{display:flex;align-items:center;gap:12px;padding:14px 18px;border-bottom:1px solid #EDF0F4}
.ev-chat-head h3{margin:0;font-size:15.5px!important;font-weight:600;color:#0B1F3A}
.ev-chat-head small{display:block;font-size:12.5px;color:#8A94A6}
.ev-chat-head>div{flex:1;min-width:0}
.ev-bot{flex:none;display:grid;place-items:center;width:38px;height:38px;border-radius:10px;background:#0B1F3A;color:#fff}
.ev-bot svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
#evidence-summary-view .ev-docs{height:34px!important;min-height:34px!important;font-size:13px!important;padding:0 12px!important}
#evidence-summary-view .ev-thread{flex:1;display:grid!important;align-content:start;gap:12px;margin:0!important;padding:18px!important;background:#F8FAFC;overflow:auto}
#evidence-summary-view .ev-thread:empty::before{content:"Posez une question sur les plans, fiches techniques et photos de ce chantier. Exemple : « Quelle épaisseur d’isolant est prévue ? » ou « Dans quel ordre poser le système ? »";align-self:center;justify-self:center;max-width:420px;margin-top:120px;text-align:center;font-size:13.5px;line-height:1.5;color:#8A94A6}
#evidence-summary-view .ev-thread>.list-item{margin:0!important;padding:14px 16px!important;background:#fff!important;border:1px solid #E2E6EC!important;border-radius:4px 12px 12px 12px!important;box-shadow:none!important;max-width:92%}
#evidence-summary-view .ev-ask{display:flex!important;align-items:flex-end;gap:10px;margin:0!important;padding:12px!important;border-top:1px solid #EDF0F4;background:#fff}
#evidence-summary-view .ev-ask-field{flex:1;margin:0;display:block}
#evidence-summary-view .ev-ask textarea{width:100%;min-height:46px!important;height:46px;max-height:160px;padding:12px 14px!important;font-size:14px!important;border-radius:10px!important;resize:vertical}
#evidence-summary-view .ev-send{display:inline-flex;align-items:center;gap:8px;height:46px;padding:0 16px!important}
#evidence-summary-view .ev-send svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:2;stroke-linejoin:round}
#evidence-summary-view #ai-form-message:empty,#evidence-summary-view #evidence-upload-message:empty{display:none}
#evidence-summary-view .ev-side{display:grid;gap:16px;position:sticky;top:84px}
#evidence-summary-view .ev-upload,#evidence-summary-view .ev-seq{margin:0!important;padding:18px!important;background:#fff!important;border:1px solid #E2E6EC!important;border-radius:12px!important}
#evidence-summary-view .ev-upload h3{margin:0 0 12px;font-size:15px!important;font-weight:600}
#evidence-summary-view .ev-upload form{display:grid!important;grid-template-columns:1fr!important;gap:12px}
#evidence-summary-view .ev-upload label:not(.ud-drop){display:grid;gap:5px;margin:0;font-size:12.5px;font-weight:600;color:#344054}
#evidence-summary-view .ev-upload select{height:38px!important;min-height:38px!important;font-size:13.5px!important}
#evidence-summary-view .ev-upload button.primary{justify-self:stretch!important;height:40px}
#evidence-summary-view .ev-drop{padding:16px 12px}
#evidence-summary-view .ev-seq:not(:has(#work-sequence)){display:none}
#evidence-summary-view #work-sequence{display:grid!important;gap:8px;margin:0!important}
#evidence-summary-view #work-sequence h3{margin:0 0 4px;font-size:15px!important;font-weight:600}
#evidence-summary-view #work-sequence>small{font-size:12.5px;color:#5B6678}
#evidence-summary-view #work-sequence .list-item{position:relative;margin:0!important;padding:4px 0 4px 18px!important;border:0!important;border-left:2px solid #C7D7FB!important;border-radius:0!important;background:none!important;box-shadow:none!important}
@media(max-width:1100px){#evidence-summary-view .ev-layout{grid-template-columns:1fr}#evidence-summary-view .ev-side{position:static}}
@media(max-width:850px){#evidence-summary-view .ev-head{grid-template-columns:1fr}#evidence-summary-view .ev-head h2{font-size:22px!important}#evidence-summary-view .ev-status{grid-column:1;grid-row:auto}#evidence-summary-view .ev-chat{min-height:420px}.ev-chat-head{flex-wrap:wrap}#evidence-summary-view .ev-send span{display:none}}
#evidence-summary-view .ev-upload select{line-height:36px;padding-top:0!important;padding-bottom:0!important}

/* =====================================================================
   NOUVELLE IDENTITÉ VISUELLE — police, boutons, champs, menu
   (remplace l'apparence de l'ancienne application)
   ===================================================================== */
:root{--brand:#1660D9;--brand-600:#0F4FBF;--brand-50:#EEF4FF;--ink:#0B1F3A;--ink-2:#344054;--muted-2:#667085;--field:#F4F6FA;--field-line:#E3E7EE;--radius-field:10px}
html body,body *:not(svg):not(svg *){font-family:Inter,system-ui,-apple-system,"Segoe UI",sans-serif!important}
body code,body .veh-plate,body .bk-card-acc,body #factures-view .fx-c-num strong{font-family:"JetBrains Mono",ui-monospace,monospace!important}
body{letter-spacing:-.005em}
main h2,main h3,main h4,main strong{letter-spacing:-.015em}
/* boutons */
body button.primary,body .primary:not(input):not(select),body label.primary{background:var(--brand)!important;border:1px solid var(--brand)!important;color:#fff!important;border-radius:10px!important;font-weight:700!important;box-shadow:0 1px 2px rgba(16,24,40,.08),inset 0 1px 0 rgba(255,255,255,.12)!important;transition:background .15s,transform .05s}
body button.primary:hover,body label.primary:hover{background:var(--brand-600)!important;border-color:var(--brand-600)!important}
body button.primary:active{transform:translateY(1px)}
body button.secondary,body label.secondary,body .secondary:not(input):not(select){background:#fff!important;border:1px solid #D5DBE5!important;color:var(--ink-2)!important;border-radius:10px!important;font-weight:600!important;box-shadow:0 1px 2px rgba(16,24,40,.05)!important}
body button.secondary:hover,body label.secondary:hover{background:#F7F9FC!important;border-color:#B9C3D2!important}
body button.danger,body .secondary.danger{color:#C0362C!important}
body button:focus-visible,body a:focus-visible,body summary:focus-visible{outline:3px solid rgba(22,96,217,.35)!important;outline-offset:2px}
/* champs : fond doux, bordure fine, focus bleu */
body input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file]):not([type=hidden]),body select,body textarea{background:var(--field)!important;border:1px solid var(--field-line)!important;border-radius:var(--radius-field)!important;color:var(--ink)!important;font-weight:500!important;box-shadow:none!important;transition:border-color .15s,background .15s,box-shadow .15s}
body input:not([type=checkbox]):not([type=radio]):not([type=file]):hover,body select:hover,body textarea:hover{border-color:#C9D1DD!important}
body input:not([type=checkbox]):not([type=radio]):not([type=file]):focus,body select:focus,body textarea:focus{background:#fff!important;border-color:var(--brand)!important;box-shadow:0 0 0 4px rgba(22,96,217,.14)!important;outline:none!important}
body input::placeholder,body textarea::placeholder{color:#98A2B3!important;font-weight:400!important}
body input[type=checkbox],body input[type=radio]{accent-color:var(--brand)}
body label{color:var(--ink-2)}
/* les champs « invisibles » (grille du devis, client du devis) restent sans fond */
#devis-builder-view .dz .db-line input,#devis-builder-view .dz .db-line select,#devis-builder-view .dz-party input,#devis-builder-view .dz-party select,#line-items-view .li-quick input{background:transparent!important;border-color:transparent!important}
#devis-builder-view .dz .db-line input:focus,#devis-builder-view .dz-party input:focus,#devis-builder-view .dz-party select:focus{background:#fff!important;border-color:var(--brand)!important}
#devis-builder-view .dz-num input{background:#fff!important;border:1px dashed #C3CAD5!important}
/* puces actives, onglets, pagination en bleu */
body .rg-chip.active,body .rg-pages button.active,body #factures-view .fx-pages button.active,body #bank-view .bk-card.active{background:var(--brand)!important;border-color:var(--brand)!important;color:#fff!important}
body .rg-tabs button.active{color:var(--brand)!important;border-bottom-color:var(--brand)!important}
body .rg-tabs button.active span{background:var(--brand)!important}
body #bank-view .bank-group-tabs button.active{color:var(--brand)!important;border-bottom-color:var(--brand)!important}
body #bank-view .bank-group-tabs+.bank-group-tabs button.active{background:var(--brand)!important;color:#fff!important}
/* menu latéral : élément actif bleu clair, plus aéré */
@media(min-width:851px){
 nav#primary-nav{padding:14px 12px!important;background:#fff!important;border-right:1px solid #E7EBF1!important}
 nav#primary-nav .nav,nav#primary-nav .nav-sub{border-radius:10px!important;font-weight:600!important;color:#475467!important;height:42px}
 nav#primary-nav .nav:hover,nav#primary-nav .nav-sub:hover{background:#F4F6FA!important;color:var(--ink)!important}
 nav#primary-nav .nav.active,nav#primary-nav .nav-sub.active{background:var(--brand-50)!important;color:var(--brand)!important;box-shadow:inset 3px 0 0 var(--brand)!important}
 nav#primary-nav .nav.active svg,nav#primary-nav .nav-sub.active svg{color:var(--brand)!important;stroke:var(--brand)!important}
 nav#primary-nav .nav-section-head{font-size:11px!important;letter-spacing:.08em!important;color:#98A2B3!important}
}
@media(max-width:850px){.sidebar .nav.active,.sidebar .nav-sub.active{background:var(--brand-50)!important;color:var(--brand)!important}}
/* cartes et tableaux : coins plus doux, ombre légère */
main .panel,main .rg-table,main .fx-table,main .ln-board,main .dz-sheet,main .dz-box,main .tw-kpis,main .fx-kpis,main .worker-roster-summary,main #dashboard-view .cards,main #dashboard-view .finance-kpi-row,main .pr-main,main .pr-side,main .ev-chat,main .ev-upload,main .bk-detail,main .tw-cal{border-radius:14px!important;border-color:#E7EBF1!important;box-shadow:0 1px 3px rgba(16,24,40,.05)!important}
main .rg-head,main .fx-head{background:#F7F9FC!important}
/* titres de page plus affirmés */
main .view>.section-head:first-child h2,main .rg-page>.section-head:first-child h2,#time-view .tw-page-head h2,#settings-view .worker-roster-heading h2{font-weight:800!important;letter-spacing:-.03em!important}
/* liens d'action en bleu marque */
body .nt-action,body .li-link,body .dz-add,body .veh-add{color:var(--brand)!important}
/* barres de progression et icônes d'accent */
#dashboard-view .hero .hero-progress-bar,.ln-bar i{background-color:var(--brand)}

/* =====================================================================
   COQUE DE L'APPLICATION — comme les maquettes
   Barre du haut : logo | titre de page + sous-titre | recherche | aide, cloche, utilisateur
   ===================================================================== */
.tb,.mtab{display:none}
@media(min-width:851px){
 .app-shell{grid-template-columns:248px minmax(0,1fr)!important;grid-template-rows:72px 1fr!important}
 .app-shell::before{height:72px!important}
 .sidebar .brand{grid-row:1;grid-column:1;height:72px!important;display:flex!important;align-items:center;gap:12px;padding:0 20px!important;border-right:1px solid rgba(255,255,255,.12);color:#fff!important}
 .sidebar .brand img{width:34px!important;height:34px!important;border-radius:8px;background:#fff;padding:3px}
 .sidebar .brand strong{font-size:19px!important;font-weight:800!important;letter-spacing:.01em;color:#fff!important}
 .sidebar #company-identity-strip{display:none!important}
 .sidebar #logout-button,.sidebar #install-app-btn{position:static!important;margin:0!important}
 .tb{grid-row:1;grid-column:2;position:sticky;top:0;z-index:45;display:flex!important;align-items:center;gap:20px;height:72px;padding:0 24px 0 28px;color:#fff}
 .tb-title{display:grid;min-width:0;flex:0 1 auto}
 .tb-title b{font-size:19px;font-weight:700;letter-spacing:-.01em;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .tb-title small{font-size:13px;color:#B9C6DA;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .tb-search{position:relative;flex:0 1 380px;margin:0 0 0 auto;display:block}
 .tb-search.tb-search-off{visibility:hidden}
 .tb-search svg{position:absolute;left:12px;top:50%;width:18px;height:18px;transform:translateY(-50%);fill:none;stroke:#C9D3E3;stroke-width:2;stroke-linecap:round}
 body .tb-search input{width:100%;height:40px!important;min-height:40px!important;padding:0 14px 0 40px!important;border-radius:10px!important;border:1px solid rgba(255,255,255,.18)!important;background:rgba(255,255,255,.08)!important;color:#fff!important;font-size:14px!important}
 body .tb-search input::placeholder{color:#B9C6DA!important}
 body .tb-search input:focus{background:rgba(255,255,255,.14)!important;border-color:rgba(255,255,255,.45)!important;box-shadow:none!important}
 .tb-right{display:flex;align-items:center;gap:6px}
 .tb-icon{position:relative;display:grid;place-items:center;width:42px;height:42px;padding:0!important;border:0!important;border-radius:10px!important;background:transparent!important;color:#fff!important;cursor:pointer;box-shadow:none!important;min-height:0!important}
 .tb-icon:hover{background:rgba(255,255,255,.1)!important}
 .tb-icon svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
 .tb-badge{position:absolute;top:4px;right:4px;display:grid;place-items:center;min-width:18px;height:18px;padding:0 5px;border-radius:999px;background:#1D5BD8;border:2px solid #0B1F3A;color:#fff;font-size:10.5px;font-weight:700}
 .tb-badge[hidden]{display:none}
 .tb-user{position:relative;margin-left:8px;padding-left:14px;border-left:1px solid rgba(255,255,255,.15)}
 .tb-user-btn{display:flex!important;align-items:center;gap:10px;height:48px!important;min-height:0!important;padding:0 8px!important;border:0!important;border-radius:10px!important;background:transparent!important;color:#fff!important;cursor:pointer;box-shadow:none!important}
 .tb-user-btn:hover{background:rgba(255,255,255,.08)!important}
 .tb-avatar{display:grid;place-items:center;width:38px;height:38px;border-radius:50%;background:#fff;color:#0B1F3A;font-size:13.5px;font-weight:700}
 .tb-user-txt{display:grid;text-align:left;line-height:1.2}
 .tb-user-txt b{font-size:14px;font-weight:600;color:#fff}
 .tb-user-txt small{font-size:12px;color:#B9C6DA}
 .tb-user-btn>svg{width:18px;height:18px;fill:none;stroke:#C9D3E3;stroke-width:2;stroke-linecap:round}
 .tb-menu{position:absolute;right:0;top:calc(100% + 10px);z-index:60;width:250px;padding:6px;background:#fff;border:1px solid #E2E6EC;border-radius:12px;box-shadow:0 18px 44px rgba(16,24,40,.2);display:grid;gap:2px}
 .tb-menu[hidden]{display:none!important}
 .tb-menu-head{display:grid;padding:8px 10px 10px;margin-bottom:4px;border-bottom:1px solid #EDF0F4}
 .tb-menu-head b{font-size:14px;color:#0B1F3A}.tb-menu-head small{font-size:12px;color:#8A94A6}
 .tb-menu button,.tb-menu-slot>*{display:flex!important;align-items:center;gap:10px;width:100%!important;height:38px!important;min-height:0!important;margin:0!important;padding:0 10px!important;border:0!important;border-radius:8px!important;background:transparent!important;color:#344054!important;font-size:13.5px!important;font-weight:500!important;text-align:left;box-shadow:none!important;position:static!important}
 .tb-menu button:hover,.tb-menu-slot>*:hover{background:#F2F4F7!important}
 .tb-menu-slot{display:grid;gap:2px;margin-top:4px;padding-top:4px;border-top:1px solid #EDF0F4}
 .tb-menu-slot [hidden]{display:none!important}
 .tb-menu-slot #logout-button{color:#B42318!important}
 .tb-menu-slot svg{width:17px;height:17px}
 main>header{display:none!important}
 /* menu latéral comme la maquette Équipe */
 nav#primary-nav{padding:16px 12px!important}
 nav#primary-nav .nav.active,nav#primary-nav .nav-sub.active{background:#EEF4FF!important;color:#0B1F3A!important;box-shadow:none!important}
 nav#primary-nav .nav.active svg,nav#primary-nav .nav-sub.active svg{color:#1D5BD8!important;stroke:#1D5BD8!important}
}
/* boutons principaux : bleu nuit comme les maquettes */
body button.primary,body label.primary{background:#0B1F3A!important;border-color:#0B1F3A!important}
body button.primary:hover,body label.primary:hover{background:#163356!important;border-color:#163356!important}
body .rg-chip.active,body .rg-pages button.active,body #factures-view .fx-pages button.active,body #bank-view .bk-card.active{background:#0B1F3A!important;border-color:#0B1F3A!important}
body .rg-tabs button.active{color:#0B1F3A!important;border-bottom-color:#0B1F3A!important}
body .rg-tabs button.active span{background:#0B1F3A!important}

/* =====================================================================
   Téléphone : en-tête blanc (logo + cloche) et barre d'onglets en bas
   ===================================================================== */
@media(max-width:850px){
 .m-topbar{background:#fff!important;color:#0B1F3A!important;border-bottom:1px solid #E7EBF1;box-shadow:none!important;height:56px}
 .m-topbar img{background:transparent!important;padding:0!important;width:32px!important;height:32px!important}
 .m-topbar strong{font-size:18px!important;font-weight:800!important;color:#0B1F3A}
 .m-bell{position:relative;margin-left:auto;display:grid;place-items:center;width:40px;height:40px;padding:0!important;border:0!important;background:transparent!important;color:#0B1F3A!important;box-shadow:none!important;min-height:0!important}
 .m-bell svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
 .m-bell i{position:absolute;top:8px;right:9px;width:9px;height:9px;border-radius:50%;background:#1D5BD8;border:2px solid #fff}
 .m-bell i[hidden]{display:none}
 .mobile-nav-toggle{display:none!important}
 .mtab{position:fixed;left:0;right:0;bottom:0;z-index:36;display:grid!important;grid-template-columns:repeat(5,1fr);height:calc(64px + env(safe-area-inset-bottom));padding:0 0 env(safe-area-inset-bottom);background:#fff;border-top:1px solid #E7EBF1;box-shadow:0 -4px 16px rgba(16,24,40,.06)}
 .mtab button{position:relative;display:grid!important;justify-items:center;align-content:center;gap:3px;height:64px!important;min-height:0!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;color:#667085!important;font-size:11px!important;font-weight:600;box-shadow:none!important}
 .mtab svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
 .mtab button.active{color:#1D5BD8!important}
 .mtab button.active svg{fill:#1D5BD8;stroke:#1D5BD8}
 .mtab button.active[data-mtab="communication-view"] svg,.mtab button.active[data-mtab="documents-view"] svg{fill:#DCE8FF}
 .mtab-badge{position:absolute;top:10px;left:calc(50% + 6px);width:9px;height:9px;border-radius:50%;background:#1D5BD8;border:2px solid #fff}
 .mtab-badge[hidden]{display:none}
 .app-shell main{padding:72px 16px calc(84px + env(safe-area-inset-bottom))!important}
 .sidebar{z-index:40!important}
 .sidebar #logout-button,.sidebar #install-app-btn{display:flex!important}
 .tb-menu-slot #logout-button,.tb-menu-slot #install-app-btn{display:flex!important}
 main:has(> #dashboard-view.active)>header{display:none!important}
}
@media(min-width:851px){html body .tb .tb-search input#tb-search{background:rgba(255,255,255,.08)!important;border:1px solid rgba(255,255,255,.18)!important;color:#fff!important}html body .tb .tb-search input#tb-search:focus{background:rgba(255,255,255,.14)!important;border-color:rgba(255,255,255,.45)!important}}
html body button.primary,html body .primary:not(input):not(select),html body label.primary{background:#0B1F3A!important;border-color:#0B1F3A!important;color:#fff!important}
html body button.primary:hover,html body label.primary:hover{background:#163356!important;border-color:#163356!important}
@media(max-width:850px){
 .app-shell:has(#dashboard-view.active) .tb{display:block!important;grid-column:1;padding:72px 16px 0;background:none;color:#0B1F3A}
 .app-shell:has(#dashboard-view.active) .tb>*:not(.tb-title){display:none!important}
 .app-shell:has(#dashboard-view.active) .tb-title{display:grid}
 .app-shell:has(#dashboard-view.active) .tb-title b{font-size:24px;font-weight:800;letter-spacing:-.02em;color:#0B1F3A}
 .app-shell:has(#dashboard-view.active) .tb-title small{font-size:14px;color:#667085}
 .app-shell:has(#dashboard-view.active) main{padding-top:14px!important}
}

/* =====================================================================
   Planification — Gantt
   ===================================================================== */
#planning-view .rg-actions svg{width:18px;height:18px}
.pl-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));margin:0 0 16px;background:#fff;border:1px solid #E7EBF1;border-radius:14px;overflow:hidden;box-shadow:0 1px 3px rgba(16,24,40,.05)}
.pl-kpis>div{position:relative;display:grid;gap:2px;padding:14px 18px;border-left:1px solid #EDF0F4}
.pl-kpis>div:first-child{border-left:0}
.pl-kpis>div::before{content:"";position:absolute;left:0;top:14px;bottom:14px;width:3px;border-radius:0 3px 3px 0;background:#0B1F3A}
.pl-kpis .pl-k-blue::before{background:#1D5BD8}.pl-kpis .pl-k-red::before{background:#C0362C}.pl-kpis .pl-k-gray::before{background:#98A2B3}
.pl-kpis small{font-size:12.5px;color:#5B6678}.pl-kpis strong{font-size:22px;font-weight:700;color:#0B1F3A}
.pl-seg{display:inline-flex;padding:3px;border:1px solid #D5DBE5;border-radius:10px;background:#fff;flex:none}
.pl-seg button{height:32px!important;min-height:0!important;padding:0 14px!important;border:0!important;border-radius:7px!important;background:transparent!important;color:#344054!important;font-size:13px!important;font-weight:600!important;box-shadow:none!important}
.pl-seg button.active{background:#0B1F3A!important;color:#fff!important}
.pl-seg button:disabled{opacity:.4}
#planning-view #pl-today{height:40px;flex:none}
#planning-view .pl-toolbar .rg-search{flex:1 1 220px!important}
.pl-board{position:relative}
.pl-gantt{position:relative;background:#fff;border:1px solid #E7EBF1;border-radius:14px;overflow:hidden;box-shadow:0 1px 3px rgba(16,24,40,.05)}
.pl-row{display:grid;grid-template-columns:400px minmax(0,1fr);border-bottom:1px solid #EDF0F4}
.pl-row:last-of-type{border-bottom:0}
.pl-left{display:grid;grid-template-columns:52px minmax(0,1fr) 110px;align-items:center;gap:12px;padding:10px 14px;border-right:1px solid #E2E6EC;background:#fff;cursor:pointer;min-height:58px}
.pl-row:not(.pl-headrow):hover .pl-left,.pl-row:not(.pl-headrow):hover .pl-track{background:#F8FAFD}
.pl-code{display:grid;place-items:center;height:28px;border-radius:7px;color:#fff;font-size:12px;font-weight:700;letter-spacing:.02em}
.pl-name{display:grid;min-width:0}
.pl-name strong{font-size:13.5px;font-weight:600;color:#0B1F3A;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pl-name small{font-size:12px;color:#8A94A6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pl-left .worker-status{justify-self:start;height:22px!important;font-size:11.5px!important;padding:0 8px!important}
.pl-headrow{background:#0B1F3A;border-bottom:0}
.pl-left-head{min-height:62px;background:#0B1F3A!important;border-right-color:rgba(255,255,255,.12);cursor:default}
.pl-left-head span{font-size:12px;font-weight:600;letter-spacing:.05em;text-transform:uppercase;color:#E3E8F0}
.pl-track{position:relative;overflow-x:auto;overflow-y:hidden;scrollbar-width:none}
.pl-track::-webkit-scrollbar{display:none}
.pl-track-head{scrollbar-width:thin}
.pl-track-head::-webkit-scrollbar{display:block;height:6px}
.pl-track-in{position:relative;height:100%;min-height:58px}
.pl-track-head .pl-track-in{min-height:62px}
.pl-years,.pl-units{position:absolute;left:0;right:0;height:31px}
.pl-years{top:0;border-bottom:1px solid rgba(255,255,255,.12)}
.pl-units{top:31px}
.pl-years span,.pl-units span{position:absolute;top:0;height:100%;display:grid;place-items:center;border-left:1px solid rgba(255,255,255,.12);color:#fff;font-size:12.5px;font-weight:600}
.pl-units span{color:#C9D3E3;font-weight:500;font-size:12px;text-transform:capitalize}
.pl-track-in>i{position:absolute;top:0;bottom:0;width:1px;background:#F0F2F5}
.pl-bar{position:absolute;top:50%;height:24px;transform:translateY(-50%);border-radius:6px;background:color-mix(in srgb,var(--tone) 28%,#fff);border:1px solid color-mix(in srgb,var(--tone) 55%,#fff);overflow:hidden;cursor:pointer;z-index:2}
.pl-bar i{position:absolute;inset:0 auto 0 0;background:var(--tone);border-radius:5px 0 0 5px}
.pl-bar b{position:relative;display:block;padding:0 8px;line-height:22px;font-size:11.5px;font-weight:700;color:#fff;text-shadow:0 1px 1px rgba(0,0,0,.25);white-space:nowrap}
.pl-bar:hover{box-shadow:0 0 0 2px color-mix(in srgb,var(--tone) 35%,#fff)}
.pl-delay{position:absolute;top:50%;height:24px;transform:translateY(-50%);border-radius:0 6px 6px 0;background:repeating-linear-gradient(135deg,#F6C7C3 0 6px,#FDECEA 6px 12px);border:1px solid #E8A29C;border-left:0;z-index:1}
.pl-plan-btn{position:absolute;left:16px;top:50%;transform:translateY(-50%);height:30px!important;min-height:0!important;padding:0 12px!important;border:1px dashed #9AA6B8!important;border-radius:8px!important;background:#fff!important;color:#344054!important;font-size:12.5px!important;font-weight:600!important;box-shadow:none!important;z-index:2}
.pl-today{position:absolute;top:31px;bottom:0;width:0;border-left:2px dashed #C0362C;z-index:4;pointer-events:none}
.pl-today[hidden]{display:none}
.pl-today span{position:absolute;top:-4px;left:50%;transform:translate(-50%,-100%);padding:3px 8px;border-radius:6px;background:#0B1F3A;color:#fff;font-size:10.5px;font-weight:600;line-height:1.2;text-align:center;white-space:nowrap;border:1px solid rgba(255,255,255,.4)}
.pl-legend{display:flex;flex-wrap:wrap;align-items:center;gap:8px 20px;margin-top:14px;font-size:12.5px;color:#5B6678}
.pl-legend span{display:inline-flex;align-items:center;gap:8px}
.pl-legend i{display:inline-block;width:22px;height:10px;border-radius:3px}
.pl-lg-plan{background:#C9D9F7;border:1px solid #93B2EC}.pl-lg-done{background:#1D5BD8}.pl-lg-delay{background:repeating-linear-gradient(135deg,#F6C7C3 0 4px,#FDECEA 4px 8px);border:1px solid #E8A29C}.pl-lg-today{width:0!important;height:14px!important;border-left:2px dashed #C0362C;border-radius:0!important}
.pl-legend .nt-action{margin-left:auto}
/* tableau */
#planning-view .pl-table .rg-head,#planning-view .pl-trow{grid-template-columns:56px minmax(0,1.6fr) 104px 120px 160px 150px 120px}
#planning-view .pl-trow{cursor:pointer}
#planning-view .pl-prog{display:flex!important;align-items:center;gap:8px}
#planning-view .pl-prog i{display:block;height:6px;border-radius:999px;max-width:80px;flex:none}
#planning-view .pl-prog::before{content:"";position:absolute}
#planning-view .pl-prog b{font-size:12.5px;font-weight:600}
/* fenêtres */
#planning-view .tw-modal{position:fixed;inset:0;z-index:260;display:grid;place-items:center;padding:24px}
#planning-view .tw-modal[hidden]{display:none!important}
#planning-view .tw-backdrop{position:fixed;inset:0;background:rgba(11,31,58,.45)}
#planning-view .tw-dialog{position:relative;width:min(560px,100%);max-height:calc(100vh - 48px);overflow:auto;background:#fff;border-radius:14px;box-shadow:0 24px 64px rgba(16,24,40,.28);animation:udIn .18s ease-out}
#planning-view .tw-dialog-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;padding:22px 24px 6px}
#planning-view .tw-dialog-head h3{margin:0;font-size:20px!important;font-weight:700;color:#0B1F3A}
#planning-view .tw-dialog-head p{margin:4px 0 0;font-size:13.5px;color:#5B6678}
.pl-form{display:grid;gap:12px;margin:0;padding:14px 24px 0}
.pl-form-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.pl-form label{display:grid;gap:5px;margin:0;font-size:12.5px;font-weight:600;color:#344054}
.pl-form input,.pl-form select{height:40px!important;min-height:40px!important;font-size:14px!important}
.pl-form button{justify-self:start;height:40px;padding:0 16px!important}
.pl-form[hidden]{display:none}
.pl-delay{margin-top:6px;border-top:1px solid #EDF0F4;padding-top:16px}
.pl-form h4,.pl-delays h4{margin:0;font-size:14px;font-weight:600;color:#0B1F3A}
.pl-delays{display:grid;gap:6px;padding:14px 24px 0}
.pl-delays:empty{display:none}
.pl-delay-item{display:grid;grid-template-columns:56px 1fr auto;gap:10px;align-items:center;padding:8px 10px;border-radius:8px;background:#FEF3F2;font-size:13px}
.pl-delay-item b{color:#B42318}.pl-delay-item small{color:#8A94A6}
#planning-view .tw-foot{position:sticky;bottom:0;display:flex;justify-content:flex-end;gap:10px;margin:18px 0 0;padding:14px 24px;background:#fff;border-top:1px solid #EDF0F4}
#planning-view .tw-foot button{height:40px;padding:0 18px!important}
.pl-help-body{display:grid;gap:10px;padding:10px 24px 0;font-size:14px;line-height:1.55;color:#344054}
.pl-help-body p{margin:0}
@media(max-width:1100px){.pl-row{grid-template-columns:300px minmax(0,1fr)}.pl-left{grid-template-columns:48px minmax(0,1fr)}.pl-left .worker-status,.pl-left-head span:nth-child(3){display:none}}
@media(max-width:850px){
 .pl-kpis{grid-template-columns:1fr 1fr}.pl-kpis>div:nth-child(3){border-left:0}.pl-kpis>div:nth-child(n+3){border-top:1px solid #EDF0F4}.pl-kpis strong{font-size:18px}
 #planning-view .pl-toolbar{flex-wrap:wrap}#planning-view .pl-seg{flex:1}#planning-view .pl-seg button{flex:1}
 .pl-row{grid-template-columns:150px minmax(0,1fr)}
 .pl-left{grid-template-columns:1fr;gap:2px;padding:8px 10px}
 .pl-left .pl-code{justify-self:start;height:22px;padding:0 7px;font-size:11px}
 .pl-left-head span:nth-child(n+2){display:none}
 .pl-name small{display:none}
 .pl-legend .nt-action{margin-left:0}
 #planning-view .pl-trow{grid-template-columns:minmax(0,1fr) auto;row-gap:4px}
 #planning-view .pl-trow>.pl-code,#planning-view .pl-trow>.rg-cell{display:none}
 #planning-view .pl-trow>.rg-cell:last-child{display:block;grid-column:2;grid-row:1}
 #planning-view .pl-trow>.pl-prog{display:flex!important;grid-column:1}
 .pl-form-row{grid-template-columns:1fr}
 #planning-view .tw-modal{padding:0;place-items:end center}#planning-view .tw-dialog{border-radius:14px 14px 0 0;max-height:92vh}
}
.pl-today span{top:-26px!important;transform:translateX(-50%)!important;line-height:1.15;font-size:10px}

/* =====================================================================
   Messages — messagerie (contacts + conversation)
   ===================================================================== */
#communication-view .rg-actions svg{width:18px;height:18px}
#communication-view .cm-shell{display:grid!important;grid-template-columns:320px minmax(0,1fr)!important;gap:0!important;height:calc(100vh - 230px);min-height:480px;padding:0!important;background:#fff!important;border:1px solid #E7EBF1!important;border-radius:14px!important;overflow:hidden}
.cm-contacts{display:flex;flex-direction:column;min-height:0;border-right:1px solid #EDF0F4;background:#fff}
.cm-search{position:relative;display:block;margin:12px!important}
.cm-search svg{position:absolute;left:11px;top:50%;width:17px;height:17px;transform:translateY(-50%);fill:none;stroke:#8A94A6;stroke-width:2;stroke-linecap:round}
body .cm-search input{width:100%;height:38px!important;min-height:38px!important;padding:0 12px 0 36px!important;font-size:13.5px!important}
.cm-list{flex:1;overflow:auto;padding:0 8px 8px;display:grid;align-content:start;gap:2px}
.cm-contact{display:grid!important;grid-template-columns:40px minmax(0,1fr) auto;align-items:center;gap:10px;width:100%;height:auto!important;min-height:0!important;padding:10px!important;border:0!important;border-radius:10px!important;background:transparent!important;text-align:left;box-shadow:none!important;color:#0F1E3D!important;cursor:pointer}
.cm-contact:hover{background:#F4F6FA!important}
.cm-contact.active{background:#EEF4FF!important}
.cm-avatar{display:grid;place-items:center;width:40px;height:40px;border-radius:50%;background:#0B1F3A;color:#fff;font-size:13.5px;font-weight:700;flex:none}
.cm-contact-txt{display:grid;min-width:0}
.cm-contact-txt b{font-size:13.5px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cm-contact-txt small{font-size:12.5px;color:#8A94A6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cm-contact-meta{display:grid;justify-items:end;gap:4px}
.cm-contact-meta small{font-size:11px;color:#98A2B3}
.cm-contact-meta i{display:grid;place-items:center;min-width:18px;height:18px;padding:0 5px;border-radius:999px;background:#1D5BD8;color:#fff;font-size:11px;font-style:normal;font-weight:700}
.cm-empty{padding:20px;text-align:center;color:#8A94A6}
.cm-hidden-select{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);margin:0!important}
.cm-chat{display:flex;flex-direction:column;min-height:0}
.cm-chat-head{display:flex;align-items:center;gap:12px;padding:12px 18px;border-bottom:1px solid #EDF0F4;background:#fff;position:static;height:auto;min-height:0;box-shadow:none}
.cm-chat-head>div{display:grid}.cm-chat-head b{font-size:15px;font-weight:600;color:#0B1F3A}.cm-chat-head small{font-size:12px;color:#8A94A6}
#communication-view .cm-thread{flex:1;min-height:0!important;max-height:none!important;overflow:auto;margin:0!important;padding:18px 22px!important;background:#F7F9FC!important;border:0!important;border-radius:0!important}
#communication-view .cm-compose{display:flex!important;align-items:flex-end;gap:10px;margin:0!important;padding:12px 14px!important;border:0!important;border-top:1px solid #EDF0F4!important;border-radius:0!important;background:#fff!important}
#communication-view .cm-compose-field{flex:1;display:block;margin:0}
#communication-view .cm-compose textarea{width:100%;height:44px;min-height:44px!important;max-height:140px;padding:11px 14px!important;font-size:14px!important;border-radius:22px!important;resize:none}
#communication-view .cm-send{display:inline-flex;align-items:center;gap:8px;height:44px;padding:0 18px!important;border-radius:22px!important}
#communication-view .cm-send svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:2;stroke-linejoin:round}
#communication-view #communication-panel>.section-head{display:none!important}
#communication-view .chat-bubble-row{margin:0 0 10px!important;gap:8px}
#communication-view .tw-modal{position:fixed;inset:0;z-index:260;display:grid;place-items:center;padding:24px}
#communication-view .tw-modal[hidden]{display:none!important}
#communication-view .tw-backdrop{position:fixed;inset:0;background:rgba(11,31,58,.45)}
#communication-view .tw-dialog{position:relative;width:min(520px,100%);background:#fff;border-radius:14px;box-shadow:0 24px 64px rgba(16,24,40,.28);animation:udIn .18s ease-out;overflow:hidden}
#communication-view .tw-dialog-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;padding:22px 24px 6px}
#communication-view .tw-dialog-head h3{margin:0;font-size:20px!important;font-weight:700;color:#0B1F3A}
#communication-view .tw-dialog-head p{margin:4px 0 0;font-size:13.5px;color:#5B6678}
#communication-view .broadcast-form{display:grid!important;gap:12px;margin:0!important;padding:14px 24px 0!important;border:0!important;background:none!important}
#communication-view .broadcast-form textarea{min-height:100px!important}
#communication-view .broadcast-form .tw-foot{display:flex;justify-content:flex-end;gap:10px;margin:6px -24px 0;padding:14px 24px;border-top:1px solid #EDF0F4}
#communication-view .broadcast-form .tw-foot button{height:40px;padding:0 18px!important}
#communication-view #broadcast-message:empty{display:none}
@media(max-width:850px){
 #communication-view .cm-shell{grid-template-columns:1fr!important;height:calc(100dvh - 250px)}
 #communication-view .cm-chat{display:none}
 #communication-view.cm-open .cm-contacts{display:none}
 #communication-view.cm-open .cm-chat{display:flex}
 .cm-chat-head::before{content:"‹";font-size:28px;line-height:1;color:#0B1F3A;margin-right:2px;cursor:pointer}
 #communication-view .cm-send span{display:none}#communication-view .cm-send{width:44px;padding:0!important;justify-content:center}
}

/* =====================================================================
   Mon compte — paramètres
   ===================================================================== */
.ac-hero{display:flex;align-items:center;gap:16px;margin:0 0 20px;padding:18px 20px;background:#fff;border:1px solid #E7EBF1;border-radius:14px;box-shadow:0 1px 3px rgba(16,24,40,.05)}
.ac-avatar{display:grid;place-items:center;width:56px;height:56px;border-radius:50%;background:#0B1F3A;color:#fff;font-size:19px;font-weight:700}
.ac-hero>div{display:grid}.ac-hero b{font-size:18px;font-weight:700;color:#0B1F3A}.ac-hero small{font-size:13px;color:#667085}
.ac-layout{display:grid;grid-template-columns:220px minmax(0,1fr);gap:20px;align-items:start}
.ac-nav{position:sticky;top:96px;display:grid;gap:2px;padding:8px;background:#fff;border:1px solid #E7EBF1;border-radius:14px}
.ac-nav a{display:flex;align-items:center;gap:10px;height:40px;padding:0 12px;border-radius:9px;color:#475467;font-size:14px;font-weight:600;text-decoration:none}
.ac-nav a svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.ac-nav a:hover{background:#F4F6FA;color:#0B1F3A}
.ac-nav a.active{background:#EEF4FF;color:#0B1F3A}
.ac-main{display:grid;gap:20px}
#account-settings-view .ac-card{display:grid!important;grid-template-columns:220px minmax(0,1fr);gap:14px 24px;margin:0!important;padding:22px 24px!important;scroll-margin-top:96px}
#account-settings-view .ac-card-head{grid-column:1;grid-row:1/span 20;display:grid;align-content:start;gap:4px;margin:0;padding:0;background:none;border:0;position:static;height:auto;min-height:0;box-shadow:none}
#account-settings-view .ac-card-head h3{margin:0!important;font-size:16px!important;font-weight:600}
#account-settings-view .ac-card-head small{font-size:13px;color:#8A94A6;line-height:1.45}
#account-settings-view .ac-card>*:not(.ac-card-head){grid-column:2}
#account-settings-view .ac-card label{display:grid;gap:6px;margin:0;font-size:12.5px;font-weight:600;color:#344054}
#account-settings-view .ac-card button.primary,#account-settings-view .ac-card button.secondary{justify-self:start;height:40px;padding:0 18px!important}
#account-settings-view .ac-card p.error:empty{display:none}
#account-settings-view #my-document-form{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:0}
#account-settings-view #my-document-form label:first-child{grid-column:1/-1}
#account-settings-view #my-document-form button{grid-column:1/-1}
#account-settings-view #my-documents:empty{display:none}
@media(max-width:1000px){.ac-layout{grid-template-columns:1fr}.ac-nav{position:static;display:flex;overflow-x:auto}.ac-nav a{flex:none}#account-settings-view .ac-card{grid-template-columns:1fr}#account-settings-view .ac-card-head{grid-row:auto}#account-settings-view .ac-card>*:not(.ac-card-head){grid-column:1}}
@media(max-width:850px){#account-settings-view #my-document-form{grid-template-columns:1fr}#account-settings-view .ac-card{padding:16px!important}}

/* =====================================================================
   Mes tâches
   ===================================================================== */
#my-tasks-view #my-tasks-list{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(340px,1fr));gap:16px}
#my-tasks-view .mt-card{display:grid!important;gap:12px;margin:0!important;padding:18px!important;background:#fff!important;border:1px solid #E7EBF1!important;border-left:4px solid #1D5BD8!important;border-radius:14px!important;box-shadow:0 1px 3px rgba(16,24,40,.05)!important}
#my-tasks-view .mt-card.mt-done{border-left-color:#1E8E3E!important}
.mt-head{display:flex;align-items:center;gap:12px}
.mt-ic{display:grid;place-items:center;width:38px;height:38px;border-radius:10px;background:#EEF4FF;color:#1D5BD8;flex:none}
.mt-done .mt-ic{background:#E7F5EC;color:#17773A}
.mt-ic svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.mt-head>div{display:grid;min-width:0}.mt-head strong{font-size:15px;font-weight:600;color:#0B1F3A}.mt-head small{font-size:12.5px;color:#8A94A6}
#my-tasks-view .category-rows{margin:0!important;padding:0!important;list-style:none;display:grid;gap:6px}
#my-tasks-view .category-rows li{position:relative;padding:8px 10px 8px 30px;background:#F7F9FC;border-radius:8px;font-size:13.5px;color:#344054}
#my-tasks-view .category-rows li::before{content:"";position:absolute;left:10px;top:12px;width:10px;height:10px;border:2px solid #98A2B3;border-radius:3px}
#my-tasks-view .mt-done .category-rows li::before{background:#1E8E3E;border-color:#1E8E3E}
#my-tasks-view .mt-card form{display:flex!important;flex-wrap:wrap;gap:8px;align-items:center;margin:0!important}
#my-tasks-view .mt-card form button{height:38px}
#my-tasks-view .mt-card .view-task-attachment{height:28px!important;min-height:0!important;padding:0 10px!important;font-size:12px!important;margin-left:6px}
.mt-empty{grid-column:1/-1;display:grid;gap:4px;padding:40px 20px;text-align:center;background:#fff;border:1px dashed #C9D0DA;border-radius:14px}
.mt-empty strong{font-size:15px;color:#0B1F3A}.mt-empty small{font-size:13px;color:#8A94A6}
#my-tasks-view .worker-profile-panel{display:grid!important;grid-template-columns:auto 1fr;gap:12px 18px;align-items:center}
@media(max-width:850px){#my-tasks-view #my-tasks-list{grid-template-columns:1fr}}

/* =====================================================================
   Aide RGE Qualibat — onglets + tableau de conformité (maquette RGE)
   ===================================================================== */
#rge-help-view .rge-tabs{margin-bottom:18px}
#rge-help-view .rge-tabs button svg{width:17px;height:17px}
.rge-pane[hidden]{display:none!important}
.rge-check-head{display:flex;justify-content:space-between;align-items:center;gap:16px;margin:0 0 12px}
.rge-check-head p{margin:0;font-size:13.5px;color:#5B6678}
.rge-score{flex:none;font-size:13.5px;color:#344054}.rge-score b{color:#17773A;font-size:16px}.rge-score em{font-style:normal;color:#B45309;font-weight:600}
.rge-table{background:#fff;border:1px solid #E7EBF1;border-radius:14px;overflow:hidden;box-shadow:0 1px 3px rgba(16,24,40,.05)}
.rge-thead{display:grid;grid-template-columns:minmax(0,1fr) 300px;height:46px;align-items:center;padding:0 20px;background:#0B1F3A}
.rge-thead span{font-size:13px;font-weight:600;letter-spacing:.03em;color:#fff}
.rge-thead span:last-child{text-align:center}
#rge-help-view .rge-rows{display:block!important;margin:0!important}
.rge-row{display:grid;grid-template-columns:minmax(0,1fr) 300px;align-items:center;gap:16px;padding:14px 20px;border-top:1px solid #EDF0F4}
.rge-row:first-child{border-top:0}
.rge-req{display:flex;align-items:center;gap:14px;font-size:14px;color:#0F1E3D;font-weight:500;line-height:1.4}
.rge-ic{flex:none;display:grid;place-items:center;width:40px;height:40px;border-radius:50%;border:1.5px solid #1D5BD8;color:#1D5BD8}
.rge-ic svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.rge-state{display:flex;justify-content:center;gap:8px}
.rge-btn{height:34px!important;min-height:0!important;padding:0 12px!important;border:1px solid #D5DBE5!important;border-radius:8px!important;background:#fff!important;color:#667085!important;font-size:12.5px!important;font-weight:700!important;letter-spacing:.02em;box-shadow:none!important;white-space:nowrap}
.rge-ok.active{background:#1E8E3E!important;border-color:#1E8E3E!important;color:#fff!important}
.rge-warn.active{background:#E8710A!important;border-color:#E8710A!important;color:#fff!important}
.rge-note{display:block;margin-top:10px;font-size:12px;color:#8A94A6}
#rge-help-view .rge-search{display:block;margin:0 0 14px!important;max-width:640px}
#rge-help-view .rge-faq{display:grid!important;gap:8px;margin:0!important}
.rge-q{background:#fff;border:1px solid #E7EBF1;border-radius:12px;overflow:hidden}
.rge-q>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 18px;font-size:14px;font-weight:600;color:#0B1F3A;cursor:pointer;list-style:none}
.rge-q>summary::-webkit-details-marker{display:none}
.rge-q>summary::after{content:"";flex:none;width:8px;height:8px;border-right:2px solid #8A94A6;border-bottom:2px solid #8A94A6;transform:rotate(45deg);transition:transform .15s}
.rge-q[open]>summary::after{transform:rotate(-135deg)}
.rge-q p{margin:0;padding:0 18px 16px;font-size:13.5px;line-height:1.6;color:#475467}
#rge-help-view .rge-modules{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:16px;margin:0!important}
#rge-help-view .rge-module{margin:0!important;padding:18px!important;background:#fff!important;border:1px solid #E7EBF1!important;border-radius:14px!important;box-shadow:0 1px 3px rgba(16,24,40,.05)!important}
#rge-help-view .rge-module h3{margin:0 0 10px!important;font-size:15px!important;font-weight:600;color:#0B1F3A}
#rge-help-view .rge-module ul{margin:0;padding-left:18px;display:grid;gap:6px;font-size:13.5px;color:#475467}
@media(max-width:850px){.rge-thead{display:none}.rge-row{grid-template-columns:1fr;padding:12px 14px}.rge-state{justify-content:flex-start;padding-left:54px}.rge-check-head{flex-direction:column;align-items:flex-start}}
#communication-view .cm-chat{height:100%}
#communication-view .cm-contacts{height:100%}
#communication-view .cm-chat-head{justify-content:flex-start!important;text-align:left!important}
#communication-view .cm-chat-head>div{text-align:left}
#communication-view .rg-actions button{display:inline-flex;align-items:center;gap:8px}
#account-settings-view .ac-card-head h3{white-space:nowrap}

/* Compte société : mois lisible sur chaque relevé + détail compact */
#bank-view .bk-statements{gap:8px!important;padding:8px 0!important}
#bank-view .bk-statements h3{font-size:12.5px!important;font-weight:600!important;color:#5B6678!important;margin:0!important}
#bank-view .bk-list{display:flex!important;flex-wrap:wrap;gap:6px!important}
#bank-view .bk-card{height:30px!important;gap:6px!important;padding:0 10px!important}
#bank-view .bk-card b{font-size:12.5px;font-weight:600}
#bank-view .bk-card i{font-style:normal;font-size:11px;font-weight:500;color:#8A94A6}
#bank-view .bk-card.active i{color:rgba(255,255,255,.65)}
#bank-view .bk-detail>.panel-head{padding:6px 10px 6px 14px!important;min-height:0!important}
#bank-view .bk-detail>.panel-head h3{font-size:13px!important}
#bank-view .bk-detail .bk-tool{height:28px!important;min-height:0!important;padding:0 9px!important;font-size:12px!important;gap:4px!important}
#bank-view .bk-detail .bk-tool svg{width:14px;height:14px}
#bank-view .bk-detail .bk-tool-icon{width:28px!important;padding:0!important}
#bank-view .bk-summary>span{padding:5px 14px!important;display:flex!important;flex-direction:row!important;align-items:baseline;gap:8px}
#bank-view .bk-summary small{font-size:11.5px!important}
#bank-view .bk-summary strong{font-size:14px!important}
#bank-view .bank-group-tabs{padding:0 8px!important;gap:0!important;flex-wrap:nowrap!important;scrollbar-width:thin}
#bank-view .bank-group-tabs button{height:32px!important;padding:0 10px!important;font-size:12.5px!important}
#bank-view .bank-group-tabs+.bank-group-tabs{padding:6px 10px!important;gap:6px!important}
#bank-view .bank-group-tabs+.bank-group-tabs button{height:26px!important;font-size:12px!important}
@media(max-width:850px){#bank-view .bk-summary>span{padding:5px 10px!important;flex-direction:column!important;gap:0}}
#bank-view .bank-group-tabs button .bk-tab-meta{margin-left:6px;font-size:11.5px;font-weight:500;color:#8A94A6}
#bank-view .bank-group-tabs+.bank-group-tabs button.active .bk-tab-meta{color:rgba(255,255,255,.7)}
#bank-view .bank-tx-row>summary{min-height:38px!important;padding-top:7px!important;padding-bottom:7px!important}
#bank-view .bank-tx-row-desc{font-size:13px!important}
/* ===== Chantier : calendrier, contrôles RGE, conformité, historique (nouveau) ===== */
#chantier-view .schedule-panel,#chantier-view #controls,#chantier-view .rge-site-checklist-panel,#chantier-view .audit-history{margin-top:14px!important;padding:14px 16px!important;background:#fff!important;border:1px solid #E7EBF1!important;border-radius:14px!important;box-shadow:0 1px 3px rgba(16,24,40,.05)!important}
#chantier-view .schedule-panel>.section-head,#chantier-view .rge-site-checklist-panel>.section-head,#chantier-view .audit-history>.section-head,#chantier-view .ck-head{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px;margin:0 0 10px!important;padding:0!important;border:0!important}
#chantier-view .schedule-panel .section-head small,#chantier-view .rge-site-checklist-panel .section-head small,#chantier-view .audit-history .section-head small,#chantier-view .ck-head small{display:block;font-size:10.5px!important;font-weight:700;letter-spacing:.08em;color:#8A94A6!important;margin:0 0 2px}
#chantier-view .schedule-panel .section-head h3,#chantier-view .rge-site-checklist-panel .section-head h3,#chantier-view .audit-history .section-head h3,#chantier-view .ck-head h3{display:flex;align-items:center;gap:8px;margin:0!important;font-size:14.5px!important;font-weight:600!important;color:#0B1F3A!important}
.sc-badge{display:inline-flex;align-items:center;height:20px;padding:0 8px;border-radius:999px;background:#E8F5EC;color:#1E7B3A;font-size:11px;font-weight:600;letter-spacing:0}
.sc-badge.sc-badge-late{background:#FDECEA;color:#B42318}
.sc-actions{display:flex;gap:6px;flex-wrap:wrap}
body .sc-act{display:inline-flex!important;align-items:center;gap:6px;height:30px!important;min-height:0!important;padding:0 10px!important;border:1px solid #D0D5DD!important;border-radius:8px!important;background:#fff!important;color:#344054!important;font-size:12.5px!important;font-weight:600!important;box-shadow:none!important;cursor:pointer;white-space:nowrap}
body .sc-act:hover{background:#F5F7FA!important}
body .sc-act svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
#chantier-view #schedule-summary{display:block!important;gap:0!important}
.sc-strip{display:grid;grid-template-columns:repeat(4,1fr);border-top:1px solid #EDF0F4;border-bottom:1px solid #EDF0F4}
.sc-strip>div{display:flex;flex-direction:column;gap:2px;padding:8px 12px;border-left:1px solid #EDF0F4}
.sc-strip>div:first-child{border-left:0;padding-left:0}
.sc-strip small{font-size:11.5px;color:#5B6678}
.sc-strip b{font-size:14px;font-weight:600;color:#0B1F3A;font-variant-numeric:tabular-nums}
.sc-strip b.sc-late{color:#B42318}
.sc-time{display:flex;align-items:center;gap:10px;margin-top:10px}
.sc-time i,.ck-meter i{flex:1;height:6px;border-radius:99px;background:#EDF0F4;overflow:hidden;display:block}
.sc-time em,.ck-meter em{display:block;height:100%;border-radius:99px;background:#0B1F3A}
.sc-time small{font-size:11.5px;color:#5B6678;white-space:nowrap}
.sc-delays{margin-top:10px;border-top:1px dashed #E2E6EC}
.sc-delay{display:grid;grid-template-columns:auto auto 1fr;align-items:center;gap:10px;padding:7px 0;border-bottom:1px solid #F1F3F6}
.sc-delay:last-child{border-bottom:0}
.sc-chip{display:inline-flex;align-items:center;height:20px;padding:0 8px;border-radius:6px;background:#FFF4E5;color:#B54708;font-size:11px;font-weight:600}
.sc-delay b{font-size:12.5px;color:#B42318;font-variant-numeric:tabular-nums}
.sc-delay small{font-size:12.5px;color:#344054;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sc-modal{position:fixed;inset:0;z-index:4000;display:flex;align-items:center;justify-content:center;padding:16px;background:rgba(11,31,58,.38)}
.sc-modal[hidden]{display:none!important}
.sc-dialog{width:min(440px,100%);background:#fff;border-radius:14px;box-shadow:0 20px 50px rgba(11,31,58,.25);overflow:hidden}
.sc-dialog-head{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;border-bottom:1px solid #EDF0F4}
.sc-dialog-head h3{margin:0;font-size:15px;font-weight:600;color:#0B1F3A}
body .sc-x{width:30px!important;height:30px!important;min-height:0!important;padding:0!important;border:0!important;border-radius:8px!important;background:transparent!important;color:#5B6678!important;font-size:20px!important;box-shadow:none!important}
.sc-form{display:flex;flex-direction:column;gap:10px;padding:14px 16px}
.sc-form[hidden]{display:none!important}
.sc-form label{display:flex;flex-direction:column;gap:4px;font-size:12px;font-weight:600;color:#344054}
.sc-form-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.sc-form-foot{display:flex;justify-content:flex-end;gap:8px;margin-top:4px}
.sc-form-foot button{height:34px!important;min-height:0!important;padding:0 14px!important;font-size:13px!important}
#chantier-view #controls{display:block!important}
.ck-meter{display:grid;grid-template-columns:auto 120px;grid-template-rows:auto auto;column-gap:10px;align-items:center}
.ck-meter b{grid-row:1/3;font-size:20px;font-weight:700;color:#0B1F3A;font-variant-numeric:tabular-nums}
.ck-meter b span{font-size:13px;font-weight:500;color:#8A94A6}
.ck-meter small{font-size:11px;color:#5B6678}
.ck-list{border-top:1px solid #EDF0F4}
.ck-row{display:grid;grid-template-columns:10px minmax(0,1fr) auto auto;align-items:center;gap:12px;padding:8px 2px;border-bottom:1px solid #F1F3F6}
.ck-row:last-child{border-bottom:0}
.ck-dot{width:8px;height:8px;border-radius:50%;background:#D9A00B}
.ck-ok .ck-dot{background:#1E8E3E}.ck-bad .ck-dot{background:#D92D20}
.ck-name{display:flex;align-items:baseline;gap:10px;min-width:0}
.ck-name strong{font-size:13px;font-weight:600;color:#0B1F3A;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ck-name small{font-size:12px;color:#8A94A6;white-space:nowrap}
.ck-state{font-size:12px;font-weight:600;color:#B54708}
.ck-ok .ck-state{color:#1E7B3A}.ck-bad .ck-state{color:#B42318}
.ck-actions{display:flex;gap:6px}
body .ck-btn{display:inline-flex!important;align-items:center;gap:4px;height:26px!important;min-height:0!important;padding:0 8px!important;border:1px solid #D0D5DD!important;border-radius:7px!important;background:#fff!important;color:#344054!important;font-size:12px!important;font-weight:600!important;box-shadow:none!important}
body .ck-btn svg{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
body .ck-btn-ok{border-color:#0B1F3A!important;background:#0B1F3A!important;color:#fff!important}
.ck-empty{display:block;padding:8px 0;font-size:12.5px;color:#8A94A6}
#chantier-view #rge-site-checklist{display:block!important}
.rk-meta{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:6px}
.rk-meta small{font-size:11.5px;color:#8A94A6}
.rk-ai{display:inline-flex;align-items:center;height:20px;padding:0 8px;border-radius:6px;background:#EEF2FF;color:#3538CD;font-size:11px;font-weight:600}
.rk-list{border-top:1px solid #EDF0F4}
.rk-row{display:grid;grid-template-columns:22px minmax(0,1fr) minmax(0,220px);align-items:center;gap:10px;padding:7px 2px;border-bottom:1px solid #F1F3F6}
.rk-row:last-child{border-bottom:0}
.rk-num{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;border-radius:6px;background:#F2F4F7;font-size:11px;font-weight:600;color:#5B6678}
.rk-row strong{font-size:13px;font-weight:500;color:#1D2939}
.rk-row small{font-size:11.5px;color:#8A94A6;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#chantier-view #rge-site-checklist>small{display:block;font-size:12.5px;color:#8A94A6}
#chantier-view #control-history{display:block!important}
.hx-list{border-top:1px solid #EDF0F4}
.hx-row{display:grid;grid-template-columns:118px minmax(0,1fr) auto minmax(0,140px);align-items:center;gap:12px;padding:7px 2px;border-bottom:1px solid #F1F3F6}
.hx-row:last-child{border-bottom:0}
.hx-row time{font-size:12px;color:#5B6678;font-variant-numeric:tabular-nums}
.hx-row strong{font-size:13px;font-weight:600;color:#0B1F3A;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hx-row>small{font-size:12px;color:#8A94A6;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hx-move{display:inline-flex;align-items:center;gap:6px}
.hx-move svg{width:14px;height:14px;fill:none;stroke:#98A2B3;stroke-width:2}
.hx-move i{font-style:normal;display:inline-flex;align-items:center;height:20px;padding:0 7px;border-radius:6px;font-size:11px;font-weight:600;background:#FFF4E5;color:#B54708}
.hx-move i.hx-ok{background:#E8F5EC;color:#1E7B3A}.hx-move i.hx-bad{background:#FDECEA;color:#B42318}
@media(max-width:760px){
 .sc-strip{grid-template-columns:1fr 1fr}.sc-strip>div:nth-child(3){border-left:0;padding-left:0}.sc-strip>div:nth-child(n+3){border-top:1px solid #EDF0F4}
 #chantier-view .schedule-panel>.section-head{flex-direction:column;align-items:flex-start!important}
 .ck-row{grid-template-columns:10px minmax(0,1fr) auto}.ck-actions{grid-column:2/4}.ck-name{flex-direction:column;gap:0}
 .ck-meter{grid-template-columns:auto 70px}
 .rk-row{grid-template-columns:22px minmax(0,1fr)}.rk-row small{grid-column:2;text-align:left}
 .hx-row{grid-template-columns:minmax(0,1fr) auto}.hx-row time{grid-column:1/3}.hx-row>small{display:none}
 #chantier-view .schedule-panel,#chantier-view #controls,#chantier-view .rge-site-checklist-panel,#chantier-view .audit-history{padding:12px!important}
}
#chantier-view #controls:empty{display:none!important}
#chantier-view .rge-site-checklist-panel small,#chantier-view .audit-history small.ck-empty,#chantier-view #control-history>small,#chantier-view #rge-site-checklist>small{text-align:left!important;padding:6px 0!important;margin:0!important;min-height:0!important;background:none!important;border:0!important}
#chantier-view .ck-meter small{letter-spacing:0!important;font-weight:500!important;font-size:11px!important;color:#5B6678!important;margin:0!important}
@media(max-width:760px){
 #chantier-view .rge-site-checklist-panel>.section-head,#chantier-view .audit-history>.section-head{flex-direction:row!important;text-align:left!important;align-items:center!important}
 #chantier-view .rge-site-checklist-panel>.section-head>div,#chantier-view .audit-history>.section-head>div{text-align:left!important}
 .sc-actions{flex-direction:row!important}
 body .sc-act{height:28px!important;padding:0 8px!important;font-size:12px!important}
}
/* Devis / facture généré : carte de résultat (nouveau) */
.dr-card{margin-top:12px;background:#fff;border:1px solid #E7EBF1;border-left:3px solid #1E8E3E;border-radius:12px;box-shadow:0 1px 3px rgba(16,24,40,.05);overflow:hidden}
.dr-top{display:flex;align-items:center;gap:12px;padding:12px 14px}
.dr-icon{flex:none;display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:10px;background:#E8F5EC;color:#1E7B3A}
.dr-icon svg,.dr-btn svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.dr-id{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}
.dr-id small{font-size:11.5px;color:#1E7B3A;font-weight:600}
.dr-id strong{font-size:15px;font-weight:700;color:#0B1F3A;font-family:"JetBrains Mono",ui-monospace,monospace;letter-spacing:-.01em}
.dr-id span{font-size:12.5px;color:#5B6678;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dr-amounts{display:flex;gap:18px;text-align:right}
.dr-amounts small{display:block;font-size:11px;color:#8A94A6}
.dr-amounts b{font-size:14px;font-weight:600;color:#344054;font-variant-numeric:tabular-nums}
.dr-amounts .dr-ttc b{font-size:17px;font-weight:700;color:#0B1F3A}
.dr-actions{display:flex;flex-wrap:wrap;gap:6px;padding:9px 14px;border-top:1px solid #EDF0F4;background:#FAFBFC}
body .dr-btn{display:inline-flex!important;align-items:center;gap:6px;height:30px!important;min-height:0!important;padding:0 10px!important;border:1px solid #D0D5DD!important;border-radius:8px!important;background:#fff!important;color:#344054!important;font-size:12.5px!important;font-weight:600!important;box-shadow:none!important;white-space:nowrap;cursor:pointer}
body .dr-btn:hover{background:#F5F7FA!important}
body .dr-btn.dr-primary{background:#0B1F3A!important;border-color:#0B1F3A!important;color:#fff!important}
body .dr-btn.dr-ghost{border-color:transparent!important;background:transparent!important;color:#5B6678!important;margin-left:auto}
.dr-note:empty{display:none}
.dr-note{padding:0 14px 10px;background:#FAFBFC}
.dr-link{display:flex;align-items:center;gap:8px;padding:6px 8px;border:1px dashed #D0D5DD;border-radius:8px;background:#fff}
.dr-link span{font-size:11.5px;font-weight:600;color:#5B6678;white-space:nowrap}
.dr-link code{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;color:#1D5BD8}
.dr-sent{display:inline-flex;align-items:center;height:24px;padding:0 9px;border-radius:6px;background:#E8F5EC;color:#1E7B3A;font-size:12px;font-weight:600}
@media(max-width:640px){.dr-top{flex-wrap:wrap}.dr-amounts{width:100%;justify-content:space-between;text-align:left;padding-top:8px;border-top:1px solid #F1F3F6}.dr-btn.dr-ghost{margin-left:0}body .dr-btn{flex:1 1 calc(50% - 6px);justify-content:center}}
/* carte de résultat : colonne étroite (panneau latéral) */
.dr-top{flex-wrap:wrap;align-items:flex-start}
.dr-amounts{width:100%;justify-content:space-between;text-align:left;padding-top:9px;border-top:1px solid #F1F3F6}
.dr-actions{display:grid;grid-template-columns:1fr 1fr}
body .dr-btn{justify-content:center}
body .dr-btn.dr-primary{grid-column:1/3;height:34px!important}
body .dr-btn.dr-ghost{margin-left:0;grid-column:1/3;height:26px!important}
.dr-id strong{font-size:14px}
#devis-builder-view .dz-side{grid-template-columns:minmax(0,1fr)}
#devis-builder-view .dz-side>*{min-width:0}
@media(max-width:1180px) and (min-width:761px){#devis-builder-view .dz-side{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}}
.dr-card,.dr-actions{min-width:0}
body .dr-btn{min-width:0;overflow:hidden;text-overflow:ellipsis;padding:0 8px!important;gap:5px}
/* Devis à l'écran : papier à en-tête (logo + identité de l'entreprise) */
#devis-builder-view .dz-letterhead{display:flex;align-items:center;gap:14px;padding:18px 30px 14px;border-bottom:1px solid #EDF0F4;border-top:4px solid #0B1F3A}
#devis-builder-view .dz-logo{flex:none;display:flex;align-items:center;justify-content:center;width:120px;height:56px;border-radius:8px;overflow:hidden}
#devis-builder-view .dz-logo img{max-width:100%;max-height:100%;object-fit:contain}
#devis-builder-view .dz-logo.dz-logo-empty{flex-direction:column;gap:2px;border:1px dashed #C4CBD6;background:#FAFBFC;color:#8A94A6;cursor:pointer;font-size:11px;font-weight:600}
#devis-builder-view .dz-logo.dz-logo-empty:hover{border-color:#0B1F3A;color:#0B1F3A}
#devis-builder-view .dz-logo svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
#devis-builder-view .dz-company{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
#devis-builder-view .dz-company strong{font-size:16px;font-weight:700;color:#0B1F3A}
#devis-builder-view .dz-company small{font-size:12px;color:#5B6678;line-height:1.35}
#devis-builder-view .dz-company small[hidden]{display:none}
body #devis-builder-view .dz-logo-edit{flex:none;height:28px!important;min-height:0!important;padding:0 10px!important;border:1px solid #D0D5DD!important;border-radius:8px!important;background:#fff!important;color:#344054!important;font-size:12px!important;font-weight:600!important;box-shadow:none!important}
body #devis-builder-view .dz-logo-edit[hidden]{display:none!important}
#devis-builder-view .dz-letterhead+.dz-top{padding-top:16px!important}
@media(max-width:760px){#devis-builder-view .dz-letterhead{padding:14px 16px 12px;flex-wrap:wrap}#devis-builder-view .dz-logo{width:84px;height:44px}#devis-builder-view .dz-logo-edit{margin-left:auto}}
/* Barre du haut : le menu utilisateur s'affiche au-dessus du contenu (jamais rogné) */
body header.tb{overflow:visible!important;z-index:1200!important;background:#0B1F3A}
body header.tb .tb-title{overflow:hidden}
body header.tb .tb-menu{z-index:1300!important}
@media(max-width:850px){body .app-shell:has(#dashboard-view.active) header.tb{background:none}}
/* ===== Documents & en-tête ===== */
#doc-settings-view .section-head{align-items:flex-end}
#doc-settings-view .rg-actions{display:flex;align-items:center;gap:10px}
.ds-saved{display:inline-flex;align-items:center;gap:6px;height:24px;padding:0 9px;border-radius:999px;background:#E8F5EC;color:#1E7B3A;font-size:12px;font-weight:600}
.ds-saved[hidden]{display:none}
body .ds-save{height:38px!important;min-height:0!important;padding:0 18px!important}
.ds-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(360px,460px);gap:20px;align-items:start}
.ds-form{background:#fff;border:1px solid #E7EBF1;border-radius:14px;box-shadow:0 1px 3px rgba(16,24,40,.05);overflow:hidden}
.ds-tabs{display:flex;gap:2px;padding:0 12px;border-bottom:1px solid #E7EBF1;overflow-x:auto}
body .ds-tabs button{flex:none;height:44px!important;min-height:0!important;margin-bottom:-1px;padding:0 14px!important;border:0!important;border-bottom:2px solid transparent!important;border-radius:0!important;background:none!important;box-shadow:none!important;color:#5B6678!important;font-size:13.5px!important;font-weight:600!important}
body .ds-tabs button.active{color:#0B1F3A!important;border-bottom-color:#0B1F3A!important}
.ds-pane{padding:18px 20px 6px}
.ds-pane[hidden]{display:none!important}
.ds-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px 14px}
.ds-grid label,.ds-field{display:flex;flex-direction:column;gap:5px;font-size:12px;font-weight:600;color:#344054}
.ds-field>span{font-size:12px;font-weight:600;color:#344054}
.ds-grid .ds-wide{grid-column:1/3}
body .ds-form input:not([type=checkbox]):not([type=color]):not([type=file]),body .ds-form select,body .ds-form textarea{height:38px;min-height:0!important;padding:0 11px!important;border:1px solid #D0D5DD!important;border-radius:8px!important;background:#fff!important;font-size:13.5px!important;font-weight:400;color:#101828!important;box-shadow:none!important}
body .ds-form textarea{height:auto;padding:9px 11px!important;line-height:1.45;resize:vertical}
body .ds-form input[readonly]{background:#F5F7FA!important;color:#5B6678!important}
body .ds-form input:focus,body .ds-form select:focus,body .ds-form textarea:focus{border-color:#0B1F3A!important;box-shadow:0 0 0 3px rgba(11,31,58,.1)!important;outline:0}
.ds-mono input{font-family:"JetBrains Mono",ui-monospace,monospace!important;font-size:12.5px!important;letter-spacing:.02em}
.ds-hint{margin:12px 0 10px;font-size:12px;color:#8A94A6;font-weight:400}
.ds-logo-row{display:flex;gap:16px;align-items:center;padding-bottom:16px;margin-bottom:16px;border-bottom:1px solid #F1F3F6}
.ds-logo{flex:none;display:flex;align-items:center;justify-content:center;width:132px;height:72px;border:1px solid #E7EBF1;border-radius:10px;background:#fff;overflow:hidden}
.ds-logo img{max-width:100%;max-height:100%;object-fit:contain}
.ds-logo.ds-logo-empty{border-style:dashed;border-color:#C4CBD6;background:#FAFBFC;color:#98A2B3;font-size:12px;font-weight:600}
.ds-logo-txt{display:flex;flex-direction:column;gap:3px}
.ds-logo-txt b{font-size:13.5px;color:#0B1F3A}.ds-logo-txt small{font-size:12px;color:#5B6678}
.ds-logo-btns{display:flex;gap:6px;margin-top:6px}
body .ds-btn{display:inline-flex!important;align-items:center;height:30px!important;min-height:0!important;padding:0 11px!important;border:1px solid #D0D5DD!important;border-radius:8px!important;background:#fff!important;color:#344054!important;font-size:12.5px!important;font-weight:600!important;box-shadow:none!important;cursor:pointer}
body .ds-btn.ds-btn-ghost{border-color:transparent!important;color:#B42318!important}
.ds-chips{display:flex;flex-wrap:wrap;gap:6px}
.ds-chips label{flex-direction:row!important;align-items:center;gap:7px!important;height:32px;padding:0 12px;border:1px solid #D0D5DD;border-radius:999px;font-size:12.5px!important;font-weight:500!important;color:#344054;cursor:pointer;background:#fff}
.ds-chips label:has(input:checked){border-color:#0B1F3A;background:#0B1F3A;color:#fff}
.ds-chips input{width:14px;height:14px;margin:0;accent-color:#fff}
.ds-swatches{display:flex;flex-wrap:wrap;gap:10px;margin:4px 0}
body .ds-swatch{position:relative;width:34px!important;height:34px!important;min-height:0!important;padding:0!important;border:0!important;border-radius:50%!important;background:var(--sw,#fff)!important;box-shadow:inset 0 0 0 1px rgba(0,0,0,.08)!important;cursor:pointer}
body .ds-swatch.active{box-shadow:0 0 0 2px #fff,0 0 0 4px var(--sw)!important}
.ds-swatch-custom{display:inline-flex;align-items:center;justify-content:center;overflow:hidden;background:conic-gradient(#e11d48,#f59e0b,#16a34a,#0ea5e9,#6d28d9,#e11d48)!important}
.ds-swatch-custom input{width:44px;height:44px;opacity:0;cursor:pointer}
.ds-msg{margin:0;padding:0 20px 14px;font-size:12.5px;color:#B42318}
.ds-msg:empty{display:none}
.ds-preview{position:sticky;top:88px;background:#EEF1F5;border:1px solid #E2E6EC;border-radius:14px;padding:12px}
.ds-preview-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}
.ds-preview-head b{font-size:12.5px;color:#344054}
.ds-preview-kind{display:inline-flex;padding:2px;border-radius:8px;background:#fff;border:1px solid #E2E6EC}
body .ds-preview-kind button{height:26px!important;min-height:0!important;padding:0 10px!important;border:0!important;border-radius:6px!important;background:none!important;box-shadow:none!important;color:#5B6678!important;font-size:12px!important;font-weight:600!important}
body .ds-preview-kind button.active{background:#0B1F3A!important;color:#fff!important}
.ds-sheet{--ds-accent:#0B1F3A;position:relative;aspect-ratio:210/297;background:#fff;border-radius:4px;box-shadow:0 8px 24px rgba(16,24,40,.12);padding:6.5% 6% 0;display:flex;flex-direction:column;gap:9px;font-size:7.2px;color:#344054;overflow:hidden;line-height:1.35}
.ds-band{position:absolute;left:0;right:0;top:0;height:5px;background:var(--ds-accent)}
.ds-s-head{display:flex;justify-content:space-between;gap:10px}
.ds-s-co{display:flex;flex-direction:column;gap:1px;max-width:58%}
.ds-s-co img{max-width:92px;max-height:40px;object-fit:contain;object-position:left;margin-bottom:4px}
.ds-s-co b{font-size:10.5px;color:#0B1F3A}.ds-s-co small{font-size:6.6px;color:#667085}
.ds-s-doc{text-align:right}
.ds-s-doc>b{display:block;font-size:17px;letter-spacing:.02em;color:var(--ds-accent);margin-bottom:5px}
.ds-s-doc dl{display:grid;grid-template-columns:auto auto;gap:2px 10px;margin:0;padding:5px 7px;border:1px solid #E7EBF1;background:#F8FAFC;border-radius:3px}
.ds-s-doc dt{color:#8A94A6;text-align:left}.ds-s-doc dd{margin:0;font-weight:700;color:#0B1F3A}
.ds-s-parties{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.ds-s-parties div{display:flex;flex-direction:column;gap:1px;padding:5px 8px;border:1px solid #E7EBF1;border-left:2px solid var(--ds-accent)}
.ds-s-parties small{font-size:5.6px;font-weight:700;letter-spacing:.08em;color:#8A94A6}
.ds-s-parties b{color:#0B1F3A;font-size:7.6px}.ds-s-parties span{color:#667085}
.ds-s-th,.ds-s-cat,.ds-s-tr{display:grid;grid-template-columns:18px 1fr 26px 44px 50px;gap:4px;padding:4px 5px;align-items:center}
.ds-s-th span:nth-child(n+3),.ds-s-cat span:nth-child(n+3),.ds-s-tr span:nth-child(n+3){text-align:right}
.ds-s-th{background:#0B1F3A;color:#fff;font-weight:700}
.ds-s-cat{background:color-mix(in srgb,var(--ds-accent) 10%,#fff);font-weight:700;color:#0B1F3A}
.ds-s-tr{border-bottom:1px solid #EDF0F4}
.ds-s-tr span:last-child{font-weight:700;color:#0B1F3A}
.ds-s-tot{align-self:flex-end;width:46%;display:flex;flex-direction:column}
.ds-s-tot div{display:flex;justify-content:space-between;padding:3px 6px;border-bottom:1px solid #EDF0F4}
.ds-s-tot span{color:#8A94A6}.ds-s-tot b{color:#0B1F3A}
.ds-s-tot .ds-s-ttc{margin-top:3px;background:#0B1F3A;border:0;padding:5px 6px}
.ds-s-tot .ds-s-ttc span{color:#fff;font-weight:700}.ds-s-tot .ds-s-ttc b{color:#fff;font-size:9px}
.ds-s-cond{display:flex;flex-direction:column;gap:2px}
.ds-s-cond small{font-size:5.6px;font-weight:700;letter-spacing:.08em;color:#8A94A6}
.ds-mono{font-family:"JetBrains Mono",ui-monospace,monospace}
.ds-s-sign{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.ds-s-sign div{display:flex;flex-direction:column;gap:3px}
.ds-s-sign b{color:#0B1F3A}
.ds-s-sign i{height:34px;border:1px solid #E7EBF1;border-radius:2px;padding:3px 5px;font-style:normal;font-size:5.8px;color:#98A2B3}
.ds-s-foot{position:absolute;left:6%;right:6%;bottom:3.5%;display:flex;flex-direction:column;gap:1px;padding-top:5px;border-top:1px solid #E7EBF1;font-size:5.6px;color:#8A94A6;padding-right:46px}
.ds-s-foot em{position:absolute;right:0;top:5px;font-style:normal;font-weight:700;color:#0B1F3A}
.ds-s-missing{color:#B54708}
@media(max-width:1180px){.ds-layout{grid-template-columns:minmax(0,1fr)}.ds-preview{position:static;max-width:520px}}
@media(max-width:640px){.ds-grid{grid-template-columns:1fr}.ds-grid .ds-wide{grid-column:auto}.ds-pane{padding:14px}.ds-logo-row{flex-direction:column;align-items:flex-start}#doc-settings-view .section-head{align-items:flex-start}}
#doc-settings-view .ds-chips label:has(input:checked){color:#fff!important}
/* ===== Facturer depuis le devis (situation de travaux) ===== */
#devis-builder-view .dz-progress.sx{display:block;margin:0;padding:16px 30px 18px;border-bottom:1px solid #EDF0F4;background:#FAFBFC}
#devis-builder-view .dz-progress.sx[hidden]{display:none}
.sx-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:12px}
.sx-head small{display:block;font-size:10.5px;font-weight:700;letter-spacing:.08em;color:#8A94A6}
.sx-head b{font-size:14px;color:#0B1F3A}
.sx-meter{display:flex;flex-direction:column;align-items:flex-end;gap:4px;min-width:240px}
.sx-meter i{display:block;width:100%;height:6px;border-radius:99px;background:#E4E8EE;overflow:hidden}
.sx-meter em{display:block;height:100%;width:0;background:#1E8E3E;border-radius:99px}
.sx-meter small{font-size:11.5px!important;letter-spacing:0!important;font-weight:500!important;color:#5B6678!important}
.sx-modes,.sx-units{display:inline-flex;padding:2px;border:1px solid #E2E6EC;border-radius:9px;background:#fff;gap:2px}
body .sx-modes button,body .sx-units button{height:28px!important;min-height:0!important;padding:0 12px!important;border:0!important;border-radius:7px!important;background:none!important;box-shadow:none!important;color:#5B6678!important;font-size:12.5px!important;font-weight:600!important}
body .sx-modes button.active,body .sx-units button.active{background:#0B1F3A!important;color:#fff!important}
.sx-units{align-items:center}.sx-units>span{padding:0 6px 0 8px;font-size:11.5px;font-weight:600;color:#8A94A6}
.sx-pane{margin-top:12px}.sx-pane[hidden]{display:none!important}
.sx-tools{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:8px}
.sx-help{flex:1;min-width:200px;font-size:12px;color:#5B6678}
.sx-all{display:flex!important;flex-direction:row!important;align-items:center;gap:6px;font-size:12px;font-weight:600;color:#344054}
body .sx-all input{width:64px!important;height:30px!important;min-height:0!important;padding:0 8px!important;border:1px solid #D0D5DD!important;border-radius:7px!important;background:#fff!important;font-size:13px!important}
body .sx-all button{height:30px!important;min-height:0!important;padding:0 10px!important;border:1px solid #0B1F3A!important;border-radius:7px!important;background:#0B1F3A!important;color:#fff!important;font-size:12px!important;font-weight:600!important;box-shadow:none!important}
.sx-table{border:1px solid #E7EBF1;border-radius:10px;background:#fff;overflow:hidden}
.sx-th,.sx-tr{display:grid;grid-template-columns:30px minmax(0,1fr) 96px 110px 118px 96px;gap:10px;align-items:center;padding:8px 12px}
.sx-th{background:#F5F7FA;border-bottom:1px solid #E7EBF1;font-size:10.5px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:#667085}
.sx-th span:nth-child(n+3){text-align:right}
.sx-tr{border-bottom:1px solid #F1F3F6}.sx-tr:last-child{border-bottom:0}
.sx-tr.sx-done{background:#FAFBFC}.sx-tr.sx-done .sx-d b{color:#8A94A6}
.sx-n{font-size:12px;color:#8A94A6}
.sx-d{display:flex;flex-direction:column;min-width:0}
.sx-d b{font-size:13px;font-weight:500;color:#1D2939;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sx-d small{font-size:11.5px;color:#8A94A6}
.sx-m{text-align:right;font-size:12.5px;color:#344054;font-variant-numeric:tabular-nums}
.sx-p{display:flex;align-items:center;justify-content:flex-end;gap:7px;font-size:12px;font-weight:600;color:#1E7B3A;font-variant-numeric:tabular-nums}
.sx-p i{display:block;width:44px;height:5px;border-radius:99px;background:#E4E8EE;overflow:hidden}.sx-p em{display:block;height:100%;background:#1E8E3E}
.sx-in{display:flex!important;flex-direction:row!important;align-items:center;justify-content:flex-end;gap:5px;font-size:12px;color:#5B6678}
body .sx-in input{width:76px!important;height:30px!important;min-height:0!important;padding:0 8px!important;border:1px solid #D0D5DD!important;border-radius:7px!important;background:#fff!important;text-align:right;font-size:13px!important;font-weight:600;color:#0B1F3A!important;box-shadow:none!important}
body .sx-in input:focus{border-color:#0B1F3A!important;box-shadow:0 0 0 3px rgba(11,31,58,.1)!important}
body .sx-in input.sx-bad{border-color:#D92D20!important;background:#FEF3F2!important}
.sx-in>span{min-width:16px;max-width:42px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sx-full{display:inline-flex;align-items:center;height:22px;padding:0 8px;border-radius:6px;background:#E8F5EC;color:#1E7B3A;font-size:11px;font-weight:700}
.sx-a{text-align:right;font-size:13px;font-weight:700;color:#0B1F3A;font-variant-numeric:tabular-nums}
.sx-empty{display:block;padding:14px 12px;font-size:12.5px;color:#8A94A6}
.sx-total{display:flex;justify-content:flex-end;align-items:baseline;gap:14px;margin-top:10px;font-size:12.5px;color:#5B6678}
.sx-total b{font-size:17px;color:#0B1F3A;font-variant-numeric:tabular-nums}
.sx-cats{display:grid!important;gap:6px!important}
.sx-cat{display:flex!important;flex-direction:row!important;align-items:center;justify-content:space-between;gap:12px;padding:8px 12px;border:1px solid #E7EBF1;border-radius:9px;background:#fff}
.sx-cat span{display:flex;flex-direction:column}.sx-cat b{font-size:13px;color:#0B1F3A}.sx-cat small{font-size:11.5px;color:#8A94A6}
body .sx-cat input,body .sx-global input{width:90px!important;height:32px!important;min-height:0!important;border:1px solid #D0D5DD!important;border-radius:7px!important;background:#fff!important;text-align:right}
.sx-global{display:flex!important;flex-direction:row!important;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;border:1px solid #E7EBF1;border-radius:9px;background:#fff;font-size:13px;font-weight:600;color:#344054}
@media(max-width:760px){
 #devis-builder-view .dz-progress.sx{padding:14px 14px 16px}
 .sx-head{flex-direction:column;align-items:stretch}.sx-meter{align-items:flex-start;min-width:0}
 .sx-th{display:none}
 .sx-tr{grid-template-columns:24px minmax(0,1fr) auto;grid-template-areas:"n d d" ". m p" ". in a";row-gap:6px}
 .sx-n{grid-area:n}.sx-d{grid-area:d}.sx-m{grid-area:m;text-align:left}.sx-p{grid-area:p}.sx-in{grid-area:in;justify-content:flex-start}.sx-a{grid-area:a}
 .sx-modes{display:flex;width:100%}.sx-modes button{flex:1}
}
#devis-builder-view .dz.dz-situation .db-lines{display:none!important}
#factures-view .fx-num-stack{display:flex;flex-direction:column;min-width:0;line-height:1.25}
#factures-view .fx-ref{font-size:11px;color:#8A94A6;font-family:Inter,system-ui,sans-serif;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* Carnet de bord : itinéraire domicile/entreprise → chantier */
.tr-box{display:flex;flex-direction:column;gap:8px;padding:10px 12px;border:1px solid #E2E6EC;border-radius:10px;background:#F8FAFC}
.tr-head{display:flex;flex-direction:column;gap:6px}
.tr-from{display:inline-flex;align-items:center;gap:2px;padding:2px;border:1px solid #E2E6EC;border-radius:8px;background:#fff;align-self:flex-start}
.tr-from span{padding:0 6px;font-size:11.5px;font-weight:600;color:#8A94A6}
body .tr-from button{height:26px!important;min-height:0!important;padding:0 10px!important;border:0!important;border-radius:6px!important;background:none!important;box-shadow:none!important;color:#5B6678!important;font-size:12px!important;font-weight:600!important}
body .tr-from button.active{background:#0B1F3A!important;color:#fff!important}
.tr-path{font-size:11.5px;color:#5B6678;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tr-path b{color:#0B1F3A}
.tr-route{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:6px;align-items:center;padding-top:8px;border-top:1px solid #E7EBF1}
.tr-r-main{display:flex;flex-direction:column}.tr-r-main b{font-size:12.5px;color:#0B1F3A}.tr-r-main small{font-size:11.5px;color:#8A94A6}
body .tr-use{display:inline-flex!important;flex-direction:column;align-items:flex-end;justify-content:center;height:auto!important;min-height:36px!important;padding:4px 10px!important;border:1px solid #D0D5DD!important;border-radius:8px!important;background:#fff!important;color:#344054!important;font-size:12px!important;font-weight:600!important;box-shadow:none!important;line-height:1.2}
body .tr-use em{font-style:normal;font-size:11px;font-weight:700;color:#1E7B3A}
body .tr-use.active{border-color:#0B1F3A!important;background:#0B1F3A!important;color:#fff!important}
body .tr-use.active em{color:#A7E3B9}
.tr-note,.tr-wait{font-size:11.5px;color:#8A94A6}
.tr-warn{font-size:12px;color:#B54708}
body .tr-link{display:inline!important;height:auto!important;min-height:0!important;padding:0!important;border:0!important;background:none!important;box-shadow:none!important;color:#1D5BD8!important;font-size:12px!important;text-decoration:underline}
@media(max-width:640px){.tr-route{grid-template-columns:1fr 1fr}.tr-r-main{grid-column:1/3}}
/* Factures : suivi (nouveau popover) */
#factures-view .ft-toggle{position:relative;margin:0!important}
#factures-view .ft-pop{position:absolute;right:0;top:calc(100% + 8px);z-index:60;width:290px;background:#fff;border:1px solid #E2E6EC;border-radius:12px;box-shadow:0 16px 40px rgba(16,24,40,.16);overflow:hidden;text-align:left}
#factures-view .ft-head{display:flex;align-items:center;justify-content:space-between;padding:10px 14px;border-bottom:1px solid #EDF0F4;background:#FAFBFC}
#factures-view .ft-head small{display:block;font-size:10px;font-weight:700;letter-spacing:.08em;color:#8A94A6}
#factures-view .ft-head b{font-size:13.5px;color:#0B1F3A;font-family:"JetBrains Mono",ui-monospace,monospace}
#factures-view .ft-count{display:inline-flex;align-items:center;height:22px;padding:0 8px;border-radius:999px;background:#E8F5EC;color:#1E7B3A;font-size:11.5px;font-weight:700}
#factures-view .ft-steps{list-style:none;margin:0;padding:12px 14px 6px}
#factures-view .ft-step{position:relative;display:grid;grid-template-columns:20px minmax(0,1fr);gap:10px;padding-bottom:14px}
#factures-view .ft-step:not(:last-child)::after{content:"";position:absolute;left:9px;top:21px;bottom:1px;width:2px;background:#E4E8EE}
#factures-view .ft-step.ft-done:not(:last-child)::after{background:#1E8E3E}
#factures-view .ft-step>i{display:flex;align-items:center;justify-content:center;width:20px;height:20px;border-radius:50%;border:2px solid #D0D5DD;background:#fff;box-sizing:border-box}
#factures-view .ft-step.ft-done>i{border-color:#1E8E3E;background:#1E8E3E}
#factures-view .ft-step.ft-next>i{border-color:#0B1F3A;box-shadow:0 0 0 3px rgba(11,31,58,.12)}
#factures-view .ft-step>i svg{width:12px;height:12px;fill:none;stroke:#fff;stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round}
#factures-view .ft-step>div{display:flex;flex-direction:column;gap:1px;padding-top:1px;min-width:0}
#factures-view .ft-step b{font-size:13px;font-weight:600;color:#0B1F3A;line-height:1.3}
#factures-view .ft-step.ft-todo b{font-weight:500;color:#8A94A6}
#factures-view .ft-step small{font-size:11.5px;color:#8A94A6;font-variant-numeric:tabular-nums}
#factures-view .ft-step.ft-next small{color:#0B1F3A;font-weight:600}
@media(max-width:640px){#factures-view .ft-pop{position:fixed;left:16px;right:16px;top:auto;bottom:80px;width:auto}}
/* Suivi horizontal (ordinateur) */
@media(min-width:641px){
 #factures-view .ft-pop{width:auto;min-width:460px;max-width:620px}
 #factures-view .ft-steps{display:flex;padding:16px 10px 14px}
 #factures-view .ft-step{flex:1 1 0;display:flex;flex-direction:column;align-items:center;gap:8px;padding:0 4px;text-align:center;min-width:96px}
 #factures-view .ft-step:not(:last-child)::after{left:calc(50% + 14px);right:calc(-50% + 14px);top:9px;bottom:auto;width:auto;height:2px}
 #factures-view .ft-step>div{align-items:center}
 #factures-view .ft-step b{font-size:12px}
 #factures-view .ft-step small{font-size:11px}
}
/* Devis / Facture : deux onglets bien visibles en haut de la page */
#devis-builder-view .db-kinds{display:grid;grid-template-columns:repeat(2,minmax(0,300px));gap:10px;margin:0 0 16px}
body #devis-builder-view .db-kind{display:flex!important;align-items:center;gap:12px;height:auto!important;min-height:0!important;padding:12px 14px!important;border:1.5px solid #E2E6EC!important;border-radius:12px!important;background:#fff!important;box-shadow:none!important;text-align:left;cursor:pointer;color:#344054!important}
body #devis-builder-view .db-kind:hover{border-color:#B9C2CF!important}
body #devis-builder-view .db-kind.active{border-color:#0B1F3A!important;box-shadow:0 0 0 3px rgba(11,31,58,.08)!important}
#devis-builder-view .db-kind-ic{flex:none;display:flex;align-items:center;justify-content:center;width:38px;height:38px;border-radius:10px;background:#F2F4F7;color:#5B6678}
#devis-builder-view .db-kind.active .db-kind-ic{background:#0B1F3A;color:#fff}
#devis-builder-view .db-kind-ic svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
#devis-builder-view .db-kind b{display:block;font-size:14.5px;font-weight:700;color:#0B1F3A}
#devis-builder-view .db-kind small{display:block;font-size:12px;color:#5B6678;line-height:1.3}
#devis-builder-view .dz-box label:has(#devis-builder-type){display:none!important}
@media(max-width:640px){#devis-builder-view .db-kinds{grid-template-columns:1fr 1fr}#devis-builder-view .db-kind small{display:none}body #devis-builder-view .db-kind{padding:10px!important}}
/* carte de résultat : boutons sur une ligne chacun pour ne rien couper */
.dr-actions{grid-template-columns:1fr!important}
body .dr-btn.dr-primary,body .dr-btn.dr-ghost{grid-column:auto!important}
@media(max-width:760px){
 #devis-builder-view .dz-letterhead{display:grid!important;grid-template-columns:auto minmax(0,1fr);gap:10px 12px;align-items:start}
 #devis-builder-view .dz-letterhead .dz-company{grid-column:1/3}
 #devis-builder-view .dz-letterhead .dz-logo-edit{grid-column:2;grid-row:1;justify-self:end;align-self:center;margin:0!important}
 #devis-builder-view .dz-company strong{font-size:15px}
 #devis-builder-view .dz-company small{font-size:11.5px}
}
#devis-builder-view .dz-num input{min-width:170px}
#bank-view .bank-tx-row-desc{display:flex;align-items:center;gap:8px;min-width:0}
#bank-view .bk-matched{flex:none;display:inline-flex;align-items:center;height:20px;padding:0 8px;border-radius:6px;background:#E8F5EC;color:#1E7B3A;font-size:11px;font-weight:700;max-width:260px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#bank-view .bk-unmatched{flex:none;display:inline-flex;align-items:center;height:20px;padding:0 8px;border-radius:6px;background:#FFF4E5;color:#B54708;font-size:11px;font-weight:600;white-space:nowrap}
#bank-view .bank-tx-row:has(.bk-matched)>summary{box-shadow:inset 3px 0 0 #1E8E3E}
@media(max-width:640px){#bank-view .bank-tx-row-desc{flex-wrap:wrap;gap:3px}}
/* Compte société : dossiers par année */
#bank-view .bk-years{margin:4px 0 6px}
#bank-view .bk-years:empty{display:none}
#bank-view .bk-year-row{display:flex;flex-wrap:wrap;gap:8px}
body #bank-view .bk-year{display:inline-flex!important;align-items:center;gap:8px;height:38px!important;min-height:0!important;padding:0 12px!important;border:1px solid #D0D5DD!important;border-radius:10px!important;background:#fff!important;color:#344054!important;box-shadow:none!important;cursor:pointer}
body #bank-view .bk-year svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linejoin:round;color:#D9A00B}
body #bank-view .bk-year b{font-size:14px;font-weight:700;color:#0B1F3A}
body #bank-view .bk-year small{font-size:11.5px;color:#8A94A6}
body #bank-view .bk-year.active{border-color:#0B1F3A!important;background:#0B1F3A!important}
body #bank-view .bk-year.active b{color:#fff}body #bank-view .bk-year.active small{color:rgba(255,255,255,.7)}body #bank-view .bk-year.active svg{color:#F5C451}
#bank-view .bk-year-actions{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-top:8px}
#bank-view .bk-year-actions>span{font-size:12px;font-weight:600;color:#5B6678;margin-right:2px}
body #bank-view .bk-year-actions .bk-tool{display:inline-flex!important;align-items:center;gap:5px;height:28px!important;min-height:0!important;padding:0 10px!important;border:1px solid #D0D5DD!important;border-radius:8px!important;background:#fff!important;color:#344054!important;font-size:12px!important;font-weight:600!important;box-shadow:none!important}
body #bank-view .bk-year-actions .bk-tool svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2}
body #bank-view .bk-year-actions .bk-tool-danger{border-color:transparent!important;color:#B42318!important;background:transparent!important}
body #bank-view .bk-tx-delete{display:inline-flex!important;align-items:center;height:28px!important;min-height:0!important;margin-top:8px;padding:0 10px!important;border:1px solid transparent!important;border-radius:7px!important;background:transparent!important;color:#B42318!important;font-size:12px!important;font-weight:600!important;box-shadow:none!important}
body #bank-view .bk-tx-delete:hover{background:#FEF3F2!important}
#bank-view .bk-year-more{position:relative}
#bank-view .bk-year-more>summary{list-style:none;display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:8px;color:#5B6678;cursor:pointer;font-size:16px}
#bank-view .bk-year-more>summary::-webkit-details-marker{display:none}
#bank-view .bk-year-more>summary:hover{background:#F2F4F7}
#bank-view .bk-year-menu{position:absolute;left:0;top:calc(100% + 4px);z-index:40;min-width:200px;padding:4px;background:#fff;border:1px solid #E2E6EC;border-radius:9px;box-shadow:0 12px 28px rgba(16,24,40,.14)}
body #bank-view .bk-year-menu button{display:flex!important;width:100%;height:34px!important;min-height:0!important;padding:0 10px!important;border:0!important;border-radius:6px!important;background:none!important;box-shadow:none!important;color:#B42318!important;font-size:12.5px!important;font-weight:600!important;justify-content:flex-start}
body #bank-view .bk-year-menu button:hover{background:#FEF3F2!important}
#bank-view label.bk-tool[hidden]{display:none!important}
body #bank-view .bk-detail label.bk-tool{display:inline-flex!important;align-items:center;gap:4px;height:28px!important;margin:0!important;padding:0 9px!important;border:1px solid #D0D5DD!important;border-radius:8px!important;background:#fff!important;color:#344054!important;font-size:12px!important;font-weight:600!important;cursor:pointer;vertical-align:middle}body #bank-view .bk-detail label.bk-tool svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2}
/* Scanner de justificatifs */
.sc-scan{position:fixed;inset:0;z-index:5000;display:flex;align-items:center;justify-content:center;padding:16px;background:rgba(6,14,28,.72)}
.sc-scan-box{display:flex;flex-direction:column;width:min(900px,100%);height:min(760px,100%);background:#fff;border-radius:16px;overflow:hidden;box-shadow:0 30px 70px rgba(0,0,0,.35)}
.sc-scan-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;border-bottom:1px solid #EDF0F4}
.sc-scan-head b{display:block;font-size:15px;color:#0B1F3A}.sc-scan-head small{font-size:12px;color:#5B6678}
body .sc-scan-x{width:32px!important;height:32px!important;min-height:0!important;padding:0!important;border:0!important;border-radius:8px!important;background:transparent!important;color:#5B6678!important;font-size:22px!important;box-shadow:none!important}
.sc-scan-stage{position:relative;flex:1;min-height:0;background:#1F2937;touch-action:none}
.sc-scan-stage canvas{position:absolute;inset:0;display:block;cursor:crosshair;touch-action:none}
.sc-scan-foot{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px;padding:10px 16px;border-top:1px solid #EDF0F4}
.sc-scan-modes{display:inline-flex;padding:2px;border:1px solid #E2E6EC;border-radius:9px;gap:2px}
body .sc-scan-modes button{height:30px!important;min-height:0!important;padding:0 12px!important;border:0!important;border-radius:7px!important;background:none!important;box-shadow:none!important;color:#5B6678!important;font-size:12.5px!important;font-weight:600!important}
body .sc-scan-modes button.active{background:#0B1F3A!important;color:#fff!important}
.sc-scan-acts{display:flex;flex-wrap:wrap;gap:6px}
body .sc-scan-btn{height:34px!important;min-height:0!important;padding:0 12px!important;border:1px solid #D0D5DD!important;border-radius:8px!important;background:#fff!important;color:#344054!important;font-size:12.5px!important;font-weight:600!important;box-shadow:none!important}
body .sc-scan-btn.sc-scan-ok{background:#0B1F3A!important;border-color:#0B1F3A!important;color:#fff!important;padding:0 18px!important}
@media(max-width:640px){.sc-scan{padding:0}.sc-scan-box{height:100%;border-radius:0}.sc-scan-foot{flex-direction:column;align-items:stretch}.sc-scan-modes{justify-content:center}.sc-scan-modes button{flex:1}.sc-scan-acts{display:grid;grid-template-columns:1fr 1fr}body .sc-scan-btn.sc-scan-ok{grid-column:1/3;height:42px!important}}
/* Devis/Facture : TVA dans l'en-tête du document, retenue de garantie dans le pied de la facture */
#devis-builder-view .dz-meta .dz-tva{grid-column:1/-1}
#devis-builder-view .dz-meta .dz-tva dd{margin:0}
body #devis-builder-view .dz-meta .dz-tva select{height:30px!important;min-height:0!important;max-width:230px;padding:0 26px 0 8px!important;border:1px solid #D0D5DD!important;border-radius:7px!important;background-color:#fff!important;font-size:12.5px!important;font-weight:600;color:#0B1F3A!important}
#devis-builder-view .dz-meta>div{display:contents}
#devis-builder-view .dz-left{display:flex;flex-direction:column;gap:12px;align-self:stretch;justify-content:space-between}
#devis-builder-view .dz-rg{display:flex;flex-direction:column;gap:10px;padding:12px 14px;border:1px solid #E7EBF1;border-radius:10px;background:#FAFBFC}
#devis-builder-view .dz-rg[hidden]{display:none!important}
#devis-builder-view .dz-rg-check{display:flex!important;flex-direction:row!important;align-items:flex-start;gap:10px;cursor:pointer}
#devis-builder-view .dz-rg-check input{width:18px;height:18px;margin-top:2px;accent-color:#0B1F3A}
#devis-builder-view .dz-rg-check b{display:block;font-size:13px;color:#0B1F3A}
#devis-builder-view .dz-rg-check small{display:block;font-size:11.5px;color:#5B6678}
#devis-builder-view .dz-rg-release{display:flex;flex-direction:column;gap:6px;padding-top:10px;border-top:1px dashed #E2E6EC}
#devis-builder-view .dz-rg-release[hidden]{display:none!important}
#devis-builder-view .dz-rg-release p{margin:0;font-size:12px;color:#5B6678}
body #devis-builder-view .dz-rg-release button{align-self:flex-start;height:32px!important;min-height:0!important;padding:0 12px!important;border:1px solid #0B1F3A!important;border-radius:8px!important;background:#fff!important;color:#0B1F3A!important;font-size:12.5px!important;font-weight:600!important;box-shadow:none!important}
#devis-builder-view .dz-rg-release small{font-size:11.5px;color:#5B6678}
/* Un seul document, pleine largeur ; total + génération au pied du document */
#devis-builder-view .dz{grid-template-columns:minmax(0,1fr)!important;max-width:1100px}
#devis-builder-view .dz-actions{display:flex;align-items:center;flex-wrap:wrap;gap:16px;padding:14px 30px 18px;border-top:1px solid #EDF0F4;background:#FAFBFC;border-radius:0 0 14px 14px}
#devis-builder-view .dz-actions .dz-pay-row{display:flex;align-items:baseline;gap:6px;margin:0!important;padding:0!important;border:0!important}
#devis-builder-view .dz-actions .dz-pay-row span{font-size:12.5px;color:#5B6678}
#devis-builder-view .dz-actions .dz-pay-row strong{font-size:13px;color:#0B1F3A}
#devis-builder-view .dz-actions .dz-pay-total{display:flex;align-items:baseline;gap:10px;margin:0 0 0 auto!important;padding:0!important}
#devis-builder-view .dz-actions .dz-pay-total span{font-size:12.5px;color:#5B6678}
#devis-builder-view .dz-actions .dz-pay-total strong{font-size:22px!important;font-weight:800;color:#0B1F3A}
#devis-builder-view .dz-actions .db-total-line{flex-basis:100%;order:5;font-size:11.5px;color:#5B6678}
#devis-builder-view .dz-actions .db-total-line:empty{display:none}
body #devis-builder-view .dz-actions .db-generate{width:auto!important;height:44px!important;min-height:0!important;margin:0!important;padding:0 26px!important;font-size:14px!important}
#devis-builder-view .dz-actions #devis-builder-status{flex-basis:100%;order:6}
#devis-builder-view .dz-actions #devis-builder-status:empty{display:none}
#devis-builder-view .dz-actions .dr-card{max-width:560px}
#devis-builder-view .dz-actions .dr-actions{grid-template-columns:repeat(4,auto)!important;justify-content:start}
@media(max-width:760px){#devis-builder-view .dz-actions{padding:14px 16px}#devis-builder-view .dz-actions .dz-pay-total{margin-left:0!important;flex-basis:100%;justify-content:space-between}body #devis-builder-view .dz-actions .db-generate{width:100%!important}#devis-builder-view .dz-actions .dr-actions{grid-template-columns:1fr!important}}
#devis-builder-view .dz-rg#devis-builder-rg-mention-field[hidden]{display:none!important}
/* Compte société (vue personne) : choix PDF par catégorie lisible */
#bank-view .bank-pdf-picker-field{display:flex!important;flex-direction:row!important;align-items:center;gap:10px;margin:0!important;padding:8px 14px!important;border-bottom:1px solid #EDF0F4;font-size:12.5px!important;font-weight:600!important;color:#344054!important;white-space:nowrap}
#bank-view .bank-pdf-picker-field[hidden]{display:none!important}
body #bank-view .bank-pdf-picker-field select{width:auto!important;min-width:220px;max-width:100%;height:34px!important;min-height:34px!important;padding:0 30px 0 10px!important;line-height:normal!important;border:1px solid #D0D5DD!important;border-radius:8px!important;background-color:#fff!important;font-size:13px!important;font-weight:500!important;color:#101828!important}
#bank-view .bank-person-fullname-field{display:flex!important;flex-direction:column;gap:4px;padding:8px 14px!important;font-size:12px!important}
body #bank-view .bank-person-fullname-field input{height:34px!important;min-height:34px!important;line-height:normal!important;padding:0 10px!important}
@media(max-width:640px){#bank-view .bank-pdf-picker-field{flex-wrap:wrap;white-space:normal}body #bank-view .bank-pdf-picker-field select{width:100%!important;min-width:0}}
body #bank-view .bank-person-fullname-field{display:flex!important;flex-direction:row!important;align-items:center;gap:10px;margin:0!important;padding:6px 14px!important;border-bottom:1px solid #EDF0F4;font-size:12.5px!important;font-weight:600!important;color:#344054!important;white-space:nowrap;width:auto!important;max-width:none!important}
body #bank-view .bank-person-fullname-field[hidden]{display:none!important}
body #bank-view .bank-person-fullname-field input{width:320px!important;max-width:100%;height:32px!important;min-height:32px!important;padding:0 10px!important;border:1px solid #D0D5DD!important;border-radius:8px!important;background:#fff!important;font-size:13px!important;font-weight:500!important}
@media(max-width:640px){body #bank-view .bank-person-fullname-field input{width:100%!important}}
body #bank-view .bk-detail .panel-toolbar [hidden]{display:none!important}
/* Vue personne : chaque mois est un bloc séparé */
#bank-view #bank-transactions-groups>.document-chantier-group{margin:0 14px 12px!important;border:1px solid #E7EBF1!important;border-radius:10px!important;overflow:hidden;background:#fff}
#bank-view #bank-transactions-groups>.document-chantier-group:first-child{margin-top:12px!important}
#bank-view #bank-transactions-groups>.document-chantier-group>summary{background:#F5F7FA}
@media(max-width:640px){#bank-view #bank-transactions-groups>.document-chantier-group{margin:0 8px 10px!important}}
/* Temps de travail : calendrier compact et lisible d'un coup d'œil */
#time-view .work-calendar .calendar-grid,#time-view .work-calendar [class*="calendar-days"]{gap:6px!important}
#time-view .work-calendar .calendar-cell{position:relative;min-height:66px!important;height:auto!important;padding:6px 8px!important;border-radius:9px!important;border:1px solid #E7EBF1!important;background:#fff!important;display:flex!important;flex-direction:column;align-items:flex-start!important;justify-content:space-between;gap:2px;box-shadow:none!important;overflow:hidden}
#time-view .work-calendar .calendar-cell.empty{border:0!important;background:transparent!important;min-height:0!important}
#time-view .work-calendar .calendar-cell>strong{display:flex;align-items:baseline;gap:4px;font-size:13px!important;font-weight:700;color:#344054!important;line-height:1}
#time-view .work-calendar .calendar-cell .calendar-cell-weekday{display:none}
#time-view .work-calendar .calendar-cell.weekend{background:#F7F8FA!important}
#time-view .work-calendar .calendar-cell.weekend>strong{color:#98A2B3!important}
#time-view .work-calendar .calendar-cell.today{border:2px solid #1D5BD8!important}
#time-view .work-calendar .calendar-cell.today>strong{color:#1D5BD8!important}
/* Travail : approuvé = vert, en attente = jaune, refusé = rouge */
#time-view .work-calendar .calendar-cell.entry-approved{background:#ECF8F0!important;border-color:#B7E2C4!important}
#time-view .work-calendar .calendar-cell.entry-pending{background:#FFF8E6!important;border-color:#F5D88A!important}
#time-view .work-calendar .calendar-cell.entry-rejected{background:#FEF0EF!important;border-color:#F4B8B2!important}
#time-view .work-calendar .calendar-cell.has-absence:not(.worked){background:#FEF0EF!important;border-color:#F4B8B2!important}
#time-view .work-calendar .calendar-quick-edit{display:inline-flex!important;align-items:center;gap:2px;height:auto!important;min-height:0!important;padding:0!important;border:0!important;background:none!important;box-shadow:none!important;font-size:15px!important;font-weight:800!important;color:#0B1F3A!important;line-height:1.1}
#time-view .work-calendar .entry-approved .calendar-quick-edit:not(.calendar-rendezvous){color:#1E7B3A!important}
#time-view .work-calendar .entry-pending .calendar-quick-edit:not(.calendar-rendezvous){color:#93600A!important}
#time-view .work-calendar .calendar-rendezvous{font-size:11px!important;font-weight:700!important;color:#B54708!important}
#time-view .work-calendar .calendar-absence{font-size:11.5px!important;color:#B42318!important;text-transform:uppercase;letter-spacing:.03em}
/* Boutons secondaires : visibles au survol (ordinateur), toujours accessibles au clavier */
#time-view .work-calendar .calendar-icon-btn{width:18px!important;height:18px!important;min-height:0!important;padding:0!important;margin-left:1px;border:0!important;border-radius:5px!important;background:rgba(255,255,255,.85)!important;font-size:10px!important;line-height:18px!important;color:#5B6678!important;box-shadow:none!important;opacity:0;transition:opacity .12s}
#time-view .work-calendar .calendar-icon-btn.danger{color:#B42318!important}
#time-view .work-calendar .calendar-add-rdv{position:absolute;right:4px;font-size:10px!important;font-weight:600!important;color:#5B6678!important;background:#fff!important;border:1px solid #E2E6EC!important;border-radius:5px!important;padding:1px 5px!important;opacity:0;transition:opacity .12s}
#time-view .work-calendar .calendar-add-rdv[data-add-rdv]{top:4px}
#time-view .work-calendar .calendar-add-rdv[data-add-absence]{bottom:4px}
#time-view .work-calendar .calendar-cell:hover .calendar-icon-btn,#time-view .work-calendar .calendar-cell:focus-within .calendar-icon-btn,#time-view .work-calendar .calendar-cell:hover .calendar-add-rdv,#time-view .work-calendar .calendar-cell:focus-within .calendar-add-rdv{opacity:1}
#time-view .work-calendar .calendar-cell:hover{border-color:#B9C2CF!important}
@media(hover:none){#time-view .work-calendar .calendar-add-rdv{display:none!important}#time-view .work-calendar .calendar-icon-btn{display:none!important}}
@media(max-width:640px){#time-view .work-calendar .calendar-cell{min-height:48px!important;padding:4px 5px!important}#time-view .work-calendar .calendar-quick-edit{font-size:12.5px!important}#time-view .work-calendar .calendar-absence{font-size:9px!important}#time-view .work-calendar .calendar-rendezvous{font-size:9px!important}}
#documents-view .rg-chips:empty{display:none}
#documents-view .rg-tabs{overflow-x:auto;scrollbar-width:none}
#documents-view .rg-tabs button{white-space:nowrap}
/* Temps de travail : rien ne dépasse de l'écran sur téléphone */
@media(max-width:640px){#time-view{overflow-x:hidden}#time-view .work-calendar,#time-view .tw-kpis,#time-view .panel{max-width:100%;box-sizing:border-box}#time-view .work-calendar [class*="calendar-grid"],#time-view .work-calendar .calendar-days{grid-template-columns:repeat(7,minmax(0,1fr))!important}#time-view .work-calendar-head{flex-wrap:wrap;gap:8px}#time-view .tw-kpis{grid-template-columns:1fr 1fr!important}}
@media(max-width:640px){#time-view .tw-kpis,#time-view .tw-cal,#time-view .tw-summary-slot{width:auto!important;min-width:0!important;max-width:100%!important}#time-view .tw-cal *{min-width:0}#time-view .work-calendar .calendar-grid{grid-template-columns:repeat(7,minmax(0,1fr))!important}#time-view .calendar-title,#time-view .calendar-nav{flex-wrap:wrap;min-width:0}}
@media(max-width:640px){#time-view .tw-summary-slot,#time-view .tw-summary-slot .panel{overflow-x:auto!important}#time-view .worker-month-summary-table{min-width:480px}}
#devis-builder-view .db-kinds{display:inline-flex!important;gap:4px!important;padding:3px;margin:0 0 14px!important;border:1px solid #E2E6EC;border-radius:11px;background:#fff}
body #devis-builder-view .db-kind{gap:8px!important;padding:0 16px!important;height:36px!important;border:0!important;border-radius:8px!important;box-shadow:none!important}
body #devis-builder-view .db-kind.active{background:#0B1F3A!important;box-shadow:none!important}
#devis-builder-view .db-kind small{display:none!important}
#devis-builder-view .db-kind-ic{width:auto!important;height:auto!important;background:none!important;color:inherit!important}
#devis-builder-view .db-kind-ic svg{width:17px!important;height:17px!important}
#devis-builder-view .db-kind b{font-size:13.5px!important;font-weight:600!important;color:#344054!important}
#devis-builder-view .db-kind.active b,#devis-builder-view .db-kind.active .db-kind-ic{color:#fff!important}
#devis-builder-view .dz{max-width:none!important;width:100%}
.sx-th,.sx-tr{grid-template-columns:30px minmax(0,1fr) minmax(110px,auto) 112px 118px minmax(96px,auto)!important}
.sx-m,.sx-a{white-space:nowrap}
/* Dossier de preuves */
#evidence-summary-view .ev-status{display:none!important}
.pd{margin:0 0 16px;background:#fff;border:1px solid #E7EBF1;border-radius:14px;box-shadow:0 1px 3px rgba(16,24,40,.05);overflow:hidden}
.pd-empty{display:block;padding:16px;font-size:13px;color:#8A94A6}
.pd-head{display:flex;align-items:center;flex-wrap:wrap;gap:14px 20px;padding:14px 18px;border-bottom:1px solid #EDF0F4;background:#FAFBFC}
.pd-head small{display:block;font-size:10.5px;font-weight:700;letter-spacing:.08em;color:#8A94A6}
.pd-head>div:first-child b{font-size:15px;color:#0B1F3A}
.pd-meter{display:flex;flex-direction:column;gap:5px;min-width:200px;flex:1;max-width:320px}
.pd-meter span{font-size:12.5px;color:#5B6678}.pd-meter span b{font-size:15px;color:#0B1F3A}
.pd-meter i{display:block;height:7px;border-radius:99px;background:#E4E8EE;overflow:hidden}.pd-meter em{display:block;height:100%;background:#1E8E3E;border-radius:99px}
.pd-badge{display:inline-flex;align-items:center;height:24px;padding:0 10px;border-radius:999px;font-size:12px;font-weight:700}
.pd-badge-ok{background:#E8F5EC;color:#1E7B3A}.pd-badge-miss{background:#FDECEA;color:#B42318}
body .pd-export{margin-left:auto;display:inline-flex!important;align-items:center;gap:7px;height:36px!important;min-height:0!important;padding:0 14px!important;border:0!important;border-radius:9px!important;background:#0B1F3A!important;color:#fff!important;font-size:13px!important;font-weight:600!important;box-shadow:none!important}
body .pd-export svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2}
.pd-list{display:flex;flex-direction:column}
.pd-row{display:grid;grid-template-columns:28px minmax(180px,280px) minmax(0,1fr) auto;align-items:center;gap:14px;padding:10px 18px;border-bottom:1px solid #F1F3F6}
.pd-row:last-child{border-bottom:0}
.pd-row.is-miss{background:#FFFBFA}
.pd-st{display:flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:50%}
.pd-st svg{width:14px;height:14px;fill:none;stroke:#fff;stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round}
.pd-ok{background:#1E8E3E}.pd-miss{background:#D92D20}.pd-opt{background:#D0D5DD}
.pd-name{display:flex;flex-direction:column;min-width:0}
.pd-name b{font-size:13.5px;color:#0B1F3A}.pd-name b i{font-style:normal;font-size:11px;font-weight:500;color:#8A94A6;margin-left:4px}
.pd-name small{font-size:11.5px;color:#5B6678}
.pd-files{display:flex;flex-wrap:wrap;gap:6px;min-width:0}
body .pd-file{max-width:220px;height:26px!important;min-height:0!important;padding:0 9px!important;border:1px solid #E2E6EC!important;border-radius:6px!important;background:#fff!important;color:#1D5BD8!important;font-size:12px!important;font-weight:500!important;box-shadow:none!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body .pd-file:hover{border-color:#1D5BD8!important}
.pd-more{display:inline-flex;align-items:center;height:26px;padding:0 8px;border-radius:6px;background:#F2F4F7;font-size:12px;font-weight:600;color:#5B6678}
.pd-none{font-size:12px;color:#B42318}.pd-row:not(.is-miss) .pd-none{color:#98A2B3}
body .pd-add{height:30px!important;min-height:0!important;padding:0 12px!important;border:1px solid #D0D5DD!important;border-radius:8px!important;background:#fff!important;color:#344054!important;font-size:12.5px!important;font-weight:600!important;box-shadow:none!important;white-space:nowrap}
.pd-row.is-miss body .pd-add,body .pd-row.is-miss .pd-add{border-color:#0B1F3A!important;background:#0B1F3A!important;color:#fff!important}
@media(max-width:760px){.pd-head{padding:12px 14px}.pd-export{margin-left:0!important;width:100%;justify-content:center}.pd-row{grid-template-columns:24px minmax(0,1fr);gap:6px 10px;padding:10px 14px}.pd-files,.pd-add{grid-column:2}.pd-add{justify-self:start}}
#devis-builder-view .sx-head{margin-bottom:10px!important}
#devis-builder-view .sx-head small{display:none!important}
#devis-builder-view .sx-head .sx-meter{display:none!important}
#devis-builder-view .sx-head b{font-size:15px!important}
#documents-view .doc-assistant{margin-top:16px}
#documents-view .doc-assistant[hidden]{display:none!important}
#documents-view .doc-assistant .ev-thread{min-height:120px!important;max-height:420px}
/* Barre du haut : au-dessus du contenu, jamais au-dessus d'une fenêtre ouverte (plan, fiches…) */
body header.tb{z-index:40!important}
body:has(.modal[aria-hidden="false"]:not([hidden])) header.tb,body:has(#plan-measure-modal:not([hidden])) header.tb,body:has(.sc-scan) header.tb,body:has(.sc-modal:not([hidden])) header.tb{z-index:1!important}
body #plan-measure-modal .pm-zone-delete{width:30px!important;height:30px!important;min-height:0!important;padding:0!important;color:#B42318!important;font-size:13px!important}body #plan-measure-modal .pm-zone-delete[hidden]{display:none!important}#plan-measure-modal .plan-measure-status{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:380px}
#pl-modal .pl-delay-box{position:static!important;background:none!important;border-top:1px solid #EDF0F4;padding-top:14px;margin-top:6px}
#pl-modal .pl-delay-box h4,#pl-modal .pl-delays h4{margin:0 0 8px;font-size:13px;font-weight:700;color:#0B1F3A}
#pl-modal .pl-delays{border-top:1px solid #EDF0F4;padding-top:12px;margin-top:12px}
#pl-modal .pl-delays:empty{display:none}
#pl-modal .pl-delay-item{position:static!important;display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:10px;align-items:center;padding:7px 10px;margin-bottom:6px;border-radius:8px;background:#FEF3F2;font-size:12.5px}
#pl-modal .pl-delay-item b{color:#B42318}
#pl-modal .tw-dialog{max-height:calc(100vh - 32px);overflow-y:auto}
/* Mesure du plan : panneau des couleurs lisible, fermable, qui ne cache pas le plan */
#plan-measure-color-scan{position:relative;max-height:34vh;overflow-y:auto;padding-right:44px!important}
body #plan-measure-color-scan .pm-scan-close{position:absolute;top:8px;right:8px;width:30px!important;height:30px!important;min-height:0!important;padding:0!important;border:0!important;border-radius:8px!important;background:#F2F4F7!important;color:#344054!important;font-size:18px!important;box-shadow:none!important}
#plan-measure-color-scan .pm-scale-warning{margin:0 0 10px;padding:9px 12px;border-radius:8px;background:#FEF3F2;border:1px solid #F4B8B2;color:#B42318;font-size:12.5px;font-weight:600}
#plan-measure-color-scan .plan-measure-color-scan-entry{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:6px 0;border-bottom:1px solid #F1F3F6}
body #plan-measure-color-scan .plan-measure-color-scan-entry button{height:28px!important;min-height:0!important;padding:0 10px!important;font-size:12px!important;border-radius:7px!important}
body #plan-measure-color-scan [data-color-scan-choose]{background:#0B1F3A!important;border-color:#0B1F3A!important;color:#fff!important}

/* Planification — compact v2 */
#planning-view .section-head{margin-bottom:10px!important}
#planning-view .section-head>span{display:none}
#planning-view .pl-kpis{display:flex;flex-wrap:wrap;gap:6px 22px;margin:0 0 10px;padding:0 2px;background:none;border:0;border-radius:0;box-shadow:none}
#planning-view .pl-kpis>div{display:flex;align-items:baseline;gap:6px;padding:0 0 0 10px;border:0}
#planning-view .pl-kpis>div::before{top:3px;bottom:3px;width:3px}
#planning-view .pl-kpis small{font-size:12.5px;order:2}
#planning-view .pl-kpis strong{font-size:16px;order:1}
#planning-view .pl-toolbar{gap:8px!important;margin-bottom:10px!important;padding:0!important;background:none!important;border:0!important;box-shadow:none!important}
#planning-view .pl-toolbar input,#planning-view .pl-toolbar select,#planning-view #pl-today{height:34px!important;min-height:34px!important;font-size:13px!important}
#planning-view .pl-seg{padding:2px}
#planning-view .pl-seg button{height:28px!important;padding:0 12px!important;font-size:12.5px!important}
.pl-gantt{border-radius:10px;box-shadow:none}
.pl-row{grid-template-columns:330px minmax(0,1fr)}
.pl-left{grid-template-columns:44px minmax(0,1fr) 96px;gap:10px;padding:5px 12px;min-height:42px}
.pl-code{height:22px;border-radius:5px;font-size:11px}
.pl-name strong{font-size:13px}.pl-name small{font-size:11.5px}
.pl-left .worker-status{height:20px!important;font-size:11px!important;padding:0 7px!important}
.pl-left-head{min-height:48px}
.pl-left-head span{font-size:11px}
.pl-track-in{min-height:42px}
.pl-track-head .pl-track-in{min-height:48px}
.pl-years,.pl-units{height:24px}
.pl-units{top:24px}
.pl-years span,.pl-units span{font-size:11.5px}
.pl-units span{font-size:11px}
.pl-bar,.pl-delay{height:18px}
.pl-bar b{line-height:16px;font-size:10.5px}
.pl-plan-btn{height:24px!important;padding:0 10px!important;font-size:12px!important}
.pl-today{top:48px}
.pl-today span{top:2px!important;left:4px!important;transform:none!important;padding:2px 6px;border-radius:4px;background:#C0362C;border:0;font-size:10px!important;line-height:1.3;box-shadow:0 1px 2px rgba(0,0,0,.15)}
.pl-legend{margin-top:10px;font-size:12px;gap:6px 16px}
@media(max-width:1100px){.pl-row{grid-template-columns:260px minmax(0,1fr)}.pl-left{grid-template-columns:40px minmax(0,1fr)}}
@media(max-width:850px){.pl-row{grid-template-columns:140px minmax(0,1fr)}.pl-left{grid-template-columns:1fr;padding:5px 8px}}
@media(max-width:850px){
 #planning-view .pl-left{gap:1px!important;padding:5px 8px!important;min-height:46px}
 #planning-view .pl-left .worker-status{display:none!important}
 #planning-view .pl-left .pl-code{height:17px!important;padding:0 5px!important;font-size:10px!important}
 #planning-view .pl-name strong{font-size:12.5px}
 #planning-view .pl-track-in{min-height:46px}
 #planning-view .pl-kpis{gap:4px 14px}#planning-view .pl-kpis small{font-size:12px}#planning-view .pl-kpis strong{font-size:15px}
}
/* Plan — résultat d'analyse lisible */
#plan-measure-color-scan{max-height:46vh}
#plan-measure-color-scan .pmr-head{display:grid;gap:2px;margin:0 0 10px;padding-right:30px}
#plan-measure-color-scan .pmr-head strong{font-size:14.5px;color:#0B1F3A}
#plan-measure-color-scan .pmr-head span,#plan-measure-color-scan .pmr-help{font-size:12.5px;color:#475467;line-height:1.45;margin:0}
#plan-measure-color-scan .pmr-sec{margin:0 0 12px;padding-top:10px;border-top:1px solid #EDF0F4}
#plan-measure-color-scan .pmr-sec h4{display:flex;align-items:center;gap:8px;margin:0 0 6px;font-size:13px;font-weight:700;color:#0B1F3A;text-transform:none;letter-spacing:0}
#plan-measure-color-scan .pmr-n{display:inline-grid;place-items:center;width:20px;height:20px;border-radius:50%;background:#0B1F3A;color:#fff;font-size:11px;flex:none}
#plan-measure-color-scan .pmr-warn .pmr-n{background:#C2410C}
#plan-measure-color-scan .pmr-warn{background:#FFF7ED;border:1px solid #FED7AA;border-radius:8px;padding:8px 10px}
#plan-measure-color-scan .pmr-lines{margin:0;padding-left:18px;font-size:13px;color:#7C2D12}
#plan-measure-color-scan .pmr-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:8px;margin-top:8px}
#plan-measure-color-scan .pmr-card{display:grid;gap:6px;padding:10px 12px;border:1px solid #E4E7EC;border-radius:8px;background:#fff}
#plan-measure-color-scan .pmr-card header{display:flex;align-items:center;gap:8px;font-size:13px;color:#0B1F3A}
#plan-measure-color-scan .pmr-card .plan-measure-color-swatch{width:14px;height:14px;border-radius:3px;flex:none}
#plan-measure-color-scan .pmr-card ul{display:grid;gap:6px;margin:0;padding:0;list-style:none}
#plan-measure-color-scan .pmr-card li{display:grid;gap:1px;font-size:12.5px;color:#344054}
#plan-measure-color-scan .pmr-card li b{font-size:13px;color:#0B1F3A}
#plan-measure-color-scan .pmr-card li small{font-size:11.5px;color:#667085;line-height:1.35}
#plan-measure-color-scan .pmr-card footer{display:flex;gap:6px;flex-wrap:wrap}
body #plan-measure-color-scan .pmr-card footer button{height:28px!important;min-height:0!important;padding:0 10px!important;font-size:12px!important;border-radius:7px!important}
body #plan-measure-color-scan .pmr-card [data-color-scan-choose]{background:#0B1F3A!important;border-color:#0B1F3A!important;color:#fff!important}
#plan-measure-color-scan .pmr-chips{display:flex;flex-wrap:wrap;gap:6px}
#plan-measure-color-scan .pmr-chips span{padding:3px 8px;border-radius:6px;background:#F2F4F7;font-size:12.5px;color:#344054}
#plan-measure-color-scan .pmr-chips small{color:#667085;font-weight:600}
#plan-measure-color-scan .pmr-details{display:grid;gap:6px;font-size:12.5px}
#plan-measure-color-scan .pmr-details ul{margin:2px 0 0;padding-left:18px}
.pm-menu-list .pm-menu-item span{display:grid;gap:1px;text-align:left}
.pm-menu-list .pm-menu-item small{font-size:11px;font-weight:400;color:#667085;line-height:1.3;white-space:normal}
.pm-menu-list .pm-menu-note{display:block;padding:0 10px 6px;font-size:11px;color:#667085;line-height:1.35}
.pm-menu-list .pm-menu-steps{margin:2px 0 4px;padding:0 10px 0 28px;font-size:11.5px;color:#344054;line-height:1.4}
.pm-menu-list .pm-menu-steps li{margin:0 0 3px}
.pm-menu-list{max-width:330px}
.pm-menu-list .pm-menu-item{height:auto!important;min-height:36px;padding-top:6px!important;padding-bottom:6px!important;align-items:flex-start}
@media(max-width:700px){#plan-measure-color-scan .pmr-cards{grid-template-columns:1fr}}
#plan-measure-modal .pm-bar{flex-wrap:wrap}
#plan-measure-modal .pm-bar .plan-measure-candidates-actions{order:99;flex:1 1 100%;display:flex;flex-wrap:wrap;gap:6px 8px;padding:8px 10px;border:1px solid #FED7AA;border-radius:8px;background:#FFF7ED;font-size:12.5px;color:#7C2D12}
#plan-measure-modal .pm-bar .plan-measure-candidates-actions #plan-measure-candidates-count{flex:1 1 100%;line-height:1.4}
#plan-measure-modal .pm-bar .plan-measure-candidates-actions button[hidden]{display:none!important}
body #plan-measure-modal .pm-bar .plan-measure-candidates-actions button{height:30px!important;min-height:0!important;padding:0 10px!important;font-size:12px!important}
#plan-measure-color-scan .pmr-card header{justify-content:flex-start!important;padding:0!important;border:0!important;background:none!important}
#plan-measure-color-scan .pmr-card header strong{font-size:13px!important;text-transform:none!important;letter-spacing:0!important;color:#0B1F3A!important;font-weight:700}
#plan-measure-modal .pm-bar .pm-menu-list .pm-menu-item{height:auto!important;min-height:36px!important;padding:7px 10px!important;align-items:flex-start!important;line-height:1.25}
#plan-measure-modal .pm-bar .pm-menu-list .pm-menu-item svg{margin-top:2px;flex:none}
#plan-measure-modal .pm-bar .pm-menu-list .pm-menu-item span{display:grid;gap:2px;text-align:left;white-space:normal}
#plan-measure-modal #plan-measure-detect-hint{display:none!important}
/* Plan — liste des mesures compacte */
#plan-measure-totals.plan-measure-totals{display:grid!important;gap:8px;padding:10px 12px!important}
#plan-measure-totals .pmt-grid{display:grid;grid-template-columns:1fr 1fr;gap:6px}
#plan-measure-totals .pmt-stat{display:grid;gap:1px;padding:7px 10px;border:1px solid #E4E7EC;border-radius:8px;background:#fff}
#plan-measure-totals .pmt-stat small{font-size:11px;color:#667085}
#plan-measure-totals .pmt-stat b{font-size:15px;color:#0B1F3A;white-space:nowrap}
#plan-measure-totals .pmt-stat.is-neg b{color:#B42318}
#plan-measure-totals .pmt-stat.is-main{background:#0B1F3A;border-color:#0B1F3A}
#plan-measure-totals .pmt-stat.is-main small{color:#C9D3E3}#plan-measure-totals .pmt-stat.is-main b{color:#fff}
#plan-measure-totals .pmt-actions{display:flex;flex-wrap:wrap;gap:6px}
body #plan-measure-totals .pmt-actions button{height:28px!important;min-height:0!important;padding:0 9px!important;font-size:11.5px!important;border-radius:7px!important}
body #plan-measure-clear-all{height:28px!important;min-height:0!important;margin:0 12px 6px!important;padding:0 10px!important;font-size:11.5px!important;width:auto!important;max-width:calc(100% - 24px)}
#plan-measure-list .pmt-row{display:grid!important;grid-template-columns:4px minmax(0,1fr) auto;align-items:center;gap:10px;padding:7px 12px!important;margin:0!important;border:0!important;border-bottom:1px solid #F0F2F5!important;border-radius:0!important;background:#fff!important;box-shadow:none!important}
#plan-measure-list .pmt-row>i{align-self:stretch;border-radius:2px;background:#1D4ED8}
#plan-measure-list .pmt-row.is-surface>i{background:#D99A00}#plan-measure-list .pmt-row.is-opening>i{background:#B42318}
#plan-measure-list .pmt-name{display:grid;min-width:0}
#plan-measure-list .pmt-name strong{font-size:13px;color:#0B1F3A;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#plan-measure-list .pmt-name small{font-size:11.5px;color:#667085;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#plan-measure-list .pmt-btns{display:flex;gap:4px}
body #plan-measure-list .pmt-btns button{height:26px!important;min-height:0!important;padding:0 8px!important;font-size:11.5px!important;border-radius:6px!important}
/* Plan — guide étape par étape */
#plan-measure-modal .pm-guide{display:flex;align-items:center;gap:14px;flex-wrap:wrap;padding:8px 16px;border-bottom:1px solid #EDF0F4;background:#F8FAFC}
#plan-measure-modal .pm-steps{display:flex;gap:4px;margin:0;padding:0;list-style:none;flex:none}
#plan-measure-modal .pm-steps li{display:flex;align-items:center;gap:6px;padding:3px 10px 3px 4px;border-radius:999px;font-size:12px;font-weight:600;color:#98A2B3;background:#fff;border:1px solid #E4E7EC}
#plan-measure-modal .pm-steps li b{display:grid;place-items:center;width:18px;height:18px;border-radius:50%;background:#E4E7EC;color:#667085;font-size:10.5px}
#plan-measure-modal .pm-steps li.is-done{color:#067647;border-color:#ABEFC6;background:#ECFDF3}
#plan-measure-modal .pm-steps li.is-done b{background:#17B26A;color:#fff}
#plan-measure-modal .pm-steps li.is-current{color:#0B1F3A;border-color:#0B1F3A}
#plan-measure-modal .pm-steps li.is-current b{background:#0B1F3A;color:#fff}
#plan-measure-modal #plan-measure-guide-text{flex:1 1 280px;margin:0;font-size:13px;font-weight:500;color:#0B1F3A;line-height:1.4}
body #plan-measure-modal #plan-measure-guide-open{height:30px!important;min-height:0!important;padding:0 12px!important;font-size:12px!important;flex:none}
#plan-measure-modal .pm-help{position:fixed;inset:0;z-index:400;display:grid;place-items:center;padding:20px;background:rgba(11,31,58,.45)}
#plan-measure-modal .pm-help[hidden]{display:none!important}
#plan-measure-modal .pm-help-card{position:relative;width:min(760px,100%);max-height:calc(100vh - 40px);overflow:auto;padding:22px 26px;background:#fff;border-radius:12px;box-shadow:0 24px 64px rgba(16,24,40,.3)}
#plan-measure-modal .pm-help-card .pm-scan-close{position:absolute;top:12px;right:12px}
#plan-measure-modal .pm-help-card h3{margin:0 0 12px;font-size:19px;color:#0B1F3A}
#plan-measure-modal .pm-help-card section{padding:10px 0;border-top:1px solid #EDF0F4}
#plan-measure-modal .pm-help-card h4{margin:0 0 6px;font-size:14px;color:#0B1F3A}
#plan-measure-modal .pm-help-card p,#plan-measure-modal .pm-help-card li{font-size:13px;line-height:1.55;color:#344054;margin:0 0 6px}
#plan-measure-modal .pm-help-card ul{margin:0;padding-left:18px}
@media(max-width:700px){#plan-measure-modal .pm-steps li{font-size:0;padding:3px}#plan-measure-modal .pm-steps li b{font-size:10.5px}}
/* Plan — implantation et devis */
#plan-measure-color-scan .pmr-start{background:#FFFBF5;border:1px solid #FED7AA;border-radius:10px;padding:10px 12px}
#plan-measure-color-scan .pmr-start .pmr-n{background:#C2410C}
#plan-measure-color-scan .pmr-origin,#plan-measure-color-scan .pmr-step{padding:8px 10px;margin:6px 0;border-radius:8px;background:#fff;border:1px solid #F1E3D3}
#plan-measure-color-scan .pmr-origin b,#plan-measure-color-scan .pmr-step b{font-size:13px;color:#0B1F3A}
#plan-measure-color-scan .pmr-origin p{margin:4px 0 8px;font-size:12.5px;color:#344054;line-height:1.45}
#plan-measure-color-scan .pmr-origin-btns{display:flex;flex-wrap:wrap;gap:6px}
body #plan-measure-color-scan .pmr-origin-btns button,body #plan-measure-color-scan .pmr-devis button{height:28px!important;min-height:0!important;padding:0 10px!important;font-size:12px!important;border-radius:7px!important}
body #plan-measure-color-scan .pmr-primary{background:#0B1F3A!important;border-color:#0B1F3A!important;color:#fff!important}
#plan-measure-color-scan .pmr-step ul{margin:4px 0 0;padding-left:18px;font-size:12.5px;color:#344054;line-height:1.45}
#plan-measure-color-scan .pmr-cotes{margin-top:6px}
#plan-measure-color-scan .pmr-cotes small{display:block;font-size:11px;color:#667085;margin-bottom:3px}
#plan-measure-color-scan .pmr-cotes div{display:flex;flex-wrap:wrap;gap:4px}
#plan-measure-color-scan .pmr-cotes span{padding:2px 6px;border-radius:5px;background:#FFF1E6;color:#9A3412;font-size:12px;font-weight:700;font-variant-numeric:tabular-nums}
#plan-measure-color-scan .pmr-source{display:block;font-size:11px;color:#067647}
#plan-measure-color-scan .pmr-source.is-missing{color:#B54708}
#plan-measure-color-scan .pmr-devis table{width:100%;border-collapse:collapse;font-size:12.5px;margin-top:6px}
#plan-measure-color-scan .pmr-devis th{text-align:left;font-size:11px;color:#667085;font-weight:600;padding:4px 6px;border-bottom:1px solid #E4E7EC}
#plan-measure-color-scan .pmr-devis td{padding:5px 6px;border-bottom:1px solid #F0F2F5;color:#344054;vertical-align:middle}
#plan-measure-color-scan .pmr-devis td b{color:#0B1F3A;white-space:nowrap}
#plan-measure-color-scan .pmr-devis tr.is-unnamed td{color:#98A2B3}
#plan-measure-color-scan .pmr-devis em{color:#B54708;font-style:normal;font-size:11px}
#plan-measure-color-scan .pmr-devis-all{margin-top:8px}
/* Plan — descriptif, comparaison, matériaux */
#plan-measure-color-scan .pmr-works{background:#F8FAFC;border:1px solid #E4E7EC;border-radius:10px;padding:10px 12px}
#plan-measure-color-scan .pmr-type{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:4px 0 8px;font-size:12.5px;color:#344054}
body #plan-measure-color-scan .pmr-type button{height:28px!important;min-height:0!important;padding:0 10px!important;font-size:12px!important;border-radius:7px!important}
body #plan-measure-color-scan .pmr-type button.is-on{background:#0B1F3A!important;border-color:#0B1F3A!important;color:#fff!important}
#plan-measure-color-scan table.pmr-edit,#plan-measure-color-scan .pmr-compare table{width:100%;border-collapse:collapse;font-size:12.5px;margin-top:6px;background:#fff}
#plan-measure-color-scan table.pmr-edit th,#plan-measure-color-scan .pmr-compare th{text-align:left;font-size:11px;color:#667085;font-weight:600;padding:5px 6px;border-bottom:1px solid #E4E7EC}
#plan-measure-color-scan table.pmr-edit td,#plan-measure-color-scan .pmr-compare td{padding:5px 6px;border-bottom:1px solid #F0F2F5;vertical-align:top;color:#344054}
#plan-measure-color-scan table.pmr-edit td:first-child{width:24px}
#plan-measure-color-scan table.pmr-edit input[type=text]{width:100%;height:28px!important;min-height:0!important;padding:0 8px!important;font-size:12.5px!important;border-radius:6px!important}
#plan-measure-color-scan table.pmr-edit input[type=number]{width:96px;height:28px!important;min-height:0!important;padding:0 6px!important;font-size:12.5px!important;border-radius:6px!important;text-align:right}
#plan-measure-color-scan table.pmr-edit small{display:block;margin-top:2px;font-size:11px;color:#667085}
#plan-measure-color-scan table.pmr-edit td b{white-space:nowrap;color:#0B1F3A}
#plan-measure-color-scan .pmr-compare{margin:6px 0 10px;padding:8px 10px;border-radius:8px;background:#fff;border:1px solid #E4E7EC}
#plan-measure-color-scan .pmr-compare>b{font-size:12.5px;color:#0B1F3A}
#plan-measure-color-scan .pmr-compare .is-up{color:#067647;font-weight:700}#plan-measure-color-scan .pmr-compare .is-down{color:#B42318;font-weight:700}
#plan-measure-color-scan .pmr-hyp{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:6px 10px;margin:6px 0}
#plan-measure-color-scan .pmr-hyp label{display:grid;gap:2px;font-size:11px;color:#667085;font-weight:600}
#plan-measure-color-scan .pmr-hyp span{display:flex;align-items:center;gap:4px;font-size:12px;color:#344054}
#plan-measure-color-scan .pmr-hyp input{width:80px;height:28px!important;min-height:0!important;padding:0 6px!important;font-size:12.5px!important;border-radius:6px!important;text-align:right}
#plan-measure-color-scan{max-height:58vh}
#plan-measure-color-scan .pmr-head{gap:3px}
#plan-measure-color-scan .pmr-acc{font-size:12px;color:#B54708;font-weight:600}
#plan-measure-color-scan .pmr-acc.is-exact{color:#067647}
#plan-measure-color-scan .pmr-tabs{display:flex;gap:2px;margin:8px 0 10px;border-bottom:1px solid #E4E7EC;overflow-x:auto}
body #plan-measure-color-scan .pmr-tabs button{height:32px!important;min-height:0!important;padding:0 14px!important;border:0!important;border-bottom:2px solid transparent!important;border-radius:0!important;background:none!important;color:#667085!important;font-size:13px!important;font-weight:600!important;white-space:nowrap;box-shadow:none!important}
body #plan-measure-color-scan .pmr-tabs button.is-on{color:#0B1F3A!important;border-bottom-color:#0B1F3A!important}
#plan-measure-color-scan .pmr-body>.pmr-sec:first-child{border-top:0;padding-top:0}
#plan-measure-modal #plan-measure-color-scan nav.pmr-tabs{display:flex!important;position:static!important;height:auto!important;min-height:34px!important;max-height:none!important;padding:0!important;background:none!important;box-shadow:none!important;width:auto!important;transform:none!important}
/* Plan — résultats de l'analyse en pleine page, plan plus large */
#plan-measure-modal .plan-measure-card{position:fixed}
#plan-measure-modal #plan-measure-color-scan:not([hidden]){position:absolute!important;inset:0!important;z-index:60;max-height:none!important;margin:0!important;padding:0 max(16px,calc((100% - 1180px)/2)) 40px!important;overflow-y:auto;background:#F8FAFC!important;border:0!important;border-radius:0!important}
#plan-measure-color-scan .pmr-topbar{position:sticky;top:0;z-index:2;display:flex;align-items:center;gap:12px;margin:0 calc(-1 * max(16px,calc((100vw - 1180px)/2))) 14px;padding:10px max(16px,calc((100vw - 1180px)/2));background:#0B1F3A;color:#fff;font-size:13.5px;font-weight:600}
body #plan-measure-color-scan .pmr-topbar button{height:32px!important;min-height:0!important;padding:0 12px!important;background:#fff!important;color:#0B1F3A!important;border:0!important;font-size:13px!important;font-weight:700!important;border-radius:7px!important}
#plan-measure-color-scan .pmr-topbar span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;opacity:.85}
#plan-measure-color-scan .pmr-head{padding-right:0}
#plan-measure-color-scan .pmr-head strong{font-size:20px!important;text-transform:none!important;letter-spacing:-.01em}
#plan-measure-color-scan .pmr-body{background:#fff;border:1px solid #E4E7EC;border-radius:12px;padding:16px 18px}
#plan-measure-color-scan .pmr-sec p,#plan-measure-color-scan .pmr-step ul,#plan-measure-color-scan table{font-size:13.5px}
body #plan-measure-modal .pm-results-btn{height:36px!important;min-height:0!important;padding:0 12px!important;font-size:13px!important;font-weight:700!important;background:#FFF7ED!important;border-color:#FDBA74!important;color:#9A3412!important}
body #plan-measure-modal .pm-results-btn[hidden]{display:none!important}
#plan-measure-modal .plan-measure-body.list-collapsed{grid-template-columns:minmax(0,1fr)!important}#plan-measure-modal .plan-measure-body.list-collapsed .plan-measure-list-wrap{display:none!important}
#plan-measure-color-scan .pmr-block{background:#FEF3F2;border:1px solid #FECDCA;border-radius:10px;padding:12px 14px}#plan-measure-color-scan .pmr-block .pmr-n{background:#B42318}#plan-measure-color-scan .pmr-block ul{margin:4px 0 8px;padding-left:18px;font-size:13.5px;color:#7A271A;line-height:1.5}#plan-measure-color-scan .pmr-acc.is-bad{color:#B42318}
/* Plan — accrochage (OSNAP) */
#plan-measure-snap-marker{position:fixed;z-index:500;width:14px;height:14px;margin:-7px 0 0 -7px;border:2px solid #16A34A;background:rgba(22,163,74,.12);pointer-events:none}
#plan-measure-snap-marker[hidden]{display:none}
#plan-measure-snap-marker.is-mid{border-color:#2563EB;background:rgba(37,99,235,.12);clip-path:polygon(50% 0,100% 100%,0 100%);border-radius:0}
#plan-measure-snap-marker.is-center{border-radius:50%;border-color:#C2410C;background:rgba(194,65,12,.12)}
body #plan-measure-modal .pm-snap{height:34px!important;min-height:0!important;padding:0 10px!important;border:1px solid #D0D5DD!important;border-radius:8px!important;background:#fff!important;color:#667085!important;font-size:12.5px!important;font-weight:700!important}
body #plan-measure-modal .pm-snap.is-on{background:#ECFDF3!important;border-color:#16A34A!important;color:#067647!important}
body #plan-measure-modal .pm-snap[hidden]{display:none!important}
/* Plan — comparaison quantitatif */
#plan-measure-color-scan .pmr-upload{display:inline-flex;align-items:center;height:28px;padding:0 10px;border:1px solid #D0D5DD;border-radius:7px;background:#0B1F3A;color:#fff;font-size:12px;font-weight:700;cursor:pointer}
#plan-measure-color-scan .pmr-qt-sum{display:flex;flex-wrap:wrap;gap:6px 14px;align-items:baseline;margin-bottom:6px;font-size:13px}
#plan-measure-color-scan .pmr-qt-sum i{font-style:normal;font-weight:700}
#plan-measure-color-scan .is-ok{color:#067647}#plan-measure-color-scan .is-warn{color:#B54708}#plan-measure-color-scan .is-bad{color:#B42318}#plan-measure-color-scan .is-na{color:#98A2B3}
#plan-measure-color-scan table.pmr-qt td small{display:block;font-size:11px}
#plan-measure-color-scan table.pmr-qt select{width:100%;height:30px!important;min-height:0!important;font-size:12.5px!important;padding:0 6px!important;border-radius:6px!important}
#plan-measure-color-scan .pmr-ai{color:#B54708!important}
.bank-reco.is-ok strong{color:#067647!important}.bank-reco.is-bad strong{color:#B42318!important}.bank-reco strong{font-size:13px!important}
#plan-measure-color-scan .pmr-profiles{display:flex;flex-wrap:wrap;align-items:flex-end;gap:8px;margin:6px 0}#plan-measure-color-scan .pmr-profiles label{display:grid;gap:3px;font-size:11px;font-weight:600;color:#667085}#plan-measure-color-scan .pmr-profiles select{min-width:280px;height:30px!important;min-height:0!important;font-size:12.5px!important}body #plan-measure-color-scan .pmr-profiles button{height:30px!important;min-height:0!important;padding:0 10px!important;font-size:12px!important}
/* En-tête « Créer un devis » plus compact */
#devis-builder-view .section-head{margin-bottom:10px!important;gap:2px!important}
#devis-builder-view .section-head h2{font-size:22px!important;line-height:1.2!important;margin:0!important}
#devis-builder-view .section-head > span{font-size:12.5px!important}
#devis-builder-view .db-kinds{padding:2px!important;gap:2px!important;margin:0 0 10px!important;border-radius:9px!important}
body #devis-builder-view .db-kind{height:28px!important;padding:0 11px!important;gap:6px!important;border-radius:7px!important}
#devis-builder-view .db-kind-ic svg{width:14px!important;height:14px!important}
#devis-builder-view .db-kind b{font-size:12.5px!important}
/* En-têtes de page compacts, partout pareil */
.view > .section-head{margin-bottom:12px!important}
.view > .section-head h2{font-size:22px!important;line-height:1.2!important;margin:0!important}
.view > .section-head > span{font-size:12.5px!important}
.view > .section-head .rg-actions button,.view > .section-head > div > button{height:34px!important;min-height:34px!important;padding:0 14px!important;font-size:13px!important;border-radius:9px!important}
.view > .section-head .rg-actions button svg{width:15px!important;height:15px!important}
/* ===== Temps de travail : version plus claire ===== */
#time-view .tw-switch{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:0 0 12px}
#time-view .tw-switch-label{font-size:11.5px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:#8A94A6;margin-right:4px}
#time-view .tw-chip{display:inline-flex;align-items:center;gap:7px;height:32px;padding:0 12px 0 4px;border:1px solid #E2E6EC;border-radius:999px;background:#fff;color:#344054;font-size:13px;font-weight:600;cursor:pointer}
#time-view .tw-chip small{font-weight:500;color:#8A94A6}
#time-view .tw-chip-av{display:grid;place-items:center;width:24px;height:24px;border-radius:50%;background:#EEF1F6;color:#0B1F3A;font-size:10.5px;font-weight:700}
#time-view .tw-chip:hover{border-color:#C9D0DA}
#time-view .tw-chip.is-on{background:#0B1F3A;border-color:#0B1F3A;color:#fff}
#time-view .tw-chip.is-on small{color:#C9D3E3}
#time-view .tw-chip.is-on .tw-chip-av{background:#fff;color:#0B1F3A}
#time-view .tw-kpis{grid-template-columns:repeat(auto-fit,minmax(170px,1fr))!important}
#time-view .tw-kpi:has(#time-year-summary[hidden]),#time-view .time-year-summary[hidden]{display:none!important}
#time-view .tw-kpi{padding:14px 18px!important}
#time-view .tw-kpi small{font-size:12px!important;color:#5B6678!important}
#time-view .tw-kpi strong{font-size:22px!important;line-height:1.2!important;font-variant-numeric:tabular-nums}
#time-view .tw-kpi-pending.has-pending strong{color:#B26B00!important}
#time-view .tw-legend{display:flex;flex-wrap:wrap;align-items:center;gap:6px 14px;margin:4px 0 12px;font-size:12px;color:#5B6678}
#time-view .tw-lg{display:inline-flex;align-items:center;gap:6px}
#time-view .tw-lg::before{content:'';width:10px;height:10px;border-radius:3px;border:1px solid}
#time-view .tw-lg-ok::before{background:#ECF8F0;border-color:#7CC795}
#time-view .tw-lg-wait::before{background:#FFF8E6;border-color:#E9B949}
#time-view .tw-lg-no::before{background:#fff;border:1.5px dashed #E06B5F}
#time-view .tw-lg-abs::before{background:#F3F0FB;border-color:#B4A6E0}
#time-view .tw-lg-rdv::before{background:#EAF3FF;border-color:#8DB4EC}
#time-view .tw-legend small{margin-left:auto;color:#8A94A6}
/* Absence ≠ refusé : couleurs distinctes */
#time-view .work-calendar .calendar-cell.has-absence:not(.worked){background:#F6F3FC!important;border-color:#D6CCF0!important}
#time-view .work-calendar .calendar-cell.has-absence .calendar-absence{color:#5B47A8!important}
#time-view .work-calendar .calendar-cell.entry-rejected{background:#fff!important;border:1.5px dashed #E06B5F!important}
#time-view .work-calendar .calendar-cell .calendar-quick-edit:not(.calendar-rendezvous):not(.calendar-add-rdv){font-variant-numeric:tabular-nums}
/* Résumé des ouvriers */
#time-view .worker-month-summary-table{width:100%;border-collapse:collapse;font-size:13px}
#time-view .worker-month-summary-table th,#time-view .worker-month-summary-table td{padding:10px 14px!important;text-align:right;border-bottom:1px solid #EDF0F4;font-variant-numeric:tabular-nums}
#time-view .worker-month-summary-table th:first-child{text-align:left}
#time-view .worker-month-summary-table thead th{font-size:11.5px;font-weight:600;color:#5B6678;background:#F7F8FA;text-transform:uppercase;letter-spacing:.03em}
#time-view .worker-month-summary-table tbody tr{cursor:pointer}
#time-view .worker-month-summary-table tbody tr:hover{background:#F7F9FC}
#time-view .worker-month-summary-table tbody tr.is-selected{background:#EEF3FB}
#time-view .worker-month-summary-table tbody tr.is-selected th{box-shadow:inset 3px 0 0 #0B1F3A}
#time-view .worker-month-summary-table tfoot th,#time-view .worker-month-summary-table tfoot td{font-weight:700;color:#0B1F3A;border-bottom:0;background:#FAFBFC}
#time-view .tw-pill-wait{display:inline-block;min-width:22px;padding:1px 8px;border-radius:999px;background:#FFF1D6;color:#93600A;font-weight:700;text-align:center}
@media(max-width:640px){#time-view .tw-kpis{grid-template-columns:1fr 1fr!important}#time-view .tw-legend small{margin-left:0;width:100%}#time-view .worker-month-summary-table-wrap{overflow-x:auto}}
@media(max-width:640px){#time-view .tw-switch{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;margin-right:-16px;padding-right:16px}#time-view .tw-switch::-webkit-scrollbar{display:none}#time-view .tw-chip{flex:0 0 auto}#time-view .tw-switch-label{display:none}}
/* Saisie pour plusieurs ouvriers */
#time-view .tw-team{display:grid;gap:8px;padding:10px 12px;border:1px solid #E2E6EC;border-radius:10px;background:#FAFBFC}
#time-view .tw-team-toggle{display:flex!important;align-items:center;gap:10px;font-size:13px;color:#344054;cursor:pointer;margin:0!important}
#time-view .tw-team-toggle input{width:16px;height:16px;margin:0}
#time-view .tw-team-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:6px}
#time-view .tw-team-list[hidden]{display:none}
#time-view .tw-team-actions,#time-view .tw-team-note{grid-column:1/-1;margin:0;font-size:12px;color:#5B6678;display:flex;gap:14px}
#time-view .tw-link{background:none;border:0;padding:0;color:#1D4ED8;font-size:12px;font-weight:600;cursor:pointer}
#time-view .tw-team-item{display:grid!important;grid-template-columns:auto 1fr;align-items:center;column-gap:8px;padding:8px 10px;border:1px solid #E2E6EC;border-radius:8px;background:#fff;font-size:13px;font-weight:600;color:#0B1F3A;cursor:pointer;margin:0!important}
#time-view .tw-team-item input{width:16px;height:16px;margin:0;grid-row:span 2}
#time-view .tw-team-item small{grid-column:2;font-size:11.5px;font-weight:500;color:#5B6678}
#time-view .tw-team-item:has(input:checked){border-color:#0B1F3A;background:#F3F6FB}
#time-view .tw-team-item.is-off{opacity:.55;cursor:not-allowed}
#time-view .tw-dialog{max-height:calc(100vh - 32px);overflow:auto}
/* Carnet de bord : totaux par catégorie */
.trip-cats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:0 0 14px}
.trip-cats[hidden]{display:none}
.trip-cat{display:grid;gap:3px;text-align:left;padding:12px 14px;border:1px solid #E2E6EC;border-radius:10px;background:#fff;cursor:pointer;font:inherit;position:relative;overflow:hidden}
.trip-cat::before{content:'';position:absolute;left:0;top:0;bottom:0;width:3px;background:#0B1F3A}
.trip-cat-professionnel::before{background:#1D4ED8}.trip-cat-domicile-travail::before{background:#B26B00}.trip-cat-prive::before{background:#8A94A6}
.trip-cat-label{font-size:12px;font-weight:600;color:#5B6678}
.trip-cat strong{font-size:20px;line-height:1.2;color:#0B1F3A;font-variant-numeric:tabular-nums}
.trip-cat small{font-size:12px;color:#5B6678}
.trip-cat .trip-cat-warn{color:#B42318;font-weight:600}
.trip-cat:hover{border-color:#C9D0DA}
.trip-cat.is-on{border-color:#0B1F3A;box-shadow:0 0 0 1px #0B1F3A}
.trip-amt-none{font-size:12px;color:#8A94A6;font-weight:500}
.trip-amt-src{display:block;font-size:10.5px;color:#8A94A6;font-weight:500}
#vehicles-view .veh-card .rg-sub,#vehicles-view .veh-card small{white-space:normal!important;overflow:visible!important;text-overflow:clip!important}
@media(max-width:640px){.trip-cats{grid-template-columns:1fr 1fr}}
/* Compte société : mois et catégories bien séparés, totaux visibles */
.bk-totals{margin:0 0 16px;padding:14px 16px;border:1px solid #E2E6EC;border-radius:12px;background:#fff}
.bk-totals[hidden]{display:none}
.bk-totals h4{margin:0 0 10px;font-size:14px;color:#0B1F3A}
.bk-totals h4 small{font-weight:500;color:#8A94A6;font-size:12px;margin-left:6px}
.bk-totals-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:8px}
.bk-total-item{display:grid;grid-template-columns:1fr auto;align-items:baseline;gap:2px 10px;padding:10px 12px;border:1px solid #EDF0F4;border-radius:9px;background:#FAFBFC}
.bk-total-item span{font-size:13px;font-weight:600;color:#344054}
.bk-total-item small{grid-row:2;font-size:11.5px;color:#8A94A6}
.bk-total-item b{grid-row:1/3;grid-column:2;align-self:center;font-size:15px;font-variant-numeric:tabular-nums}
.bk-total-all{background:#0B1F3A;border-color:#0B1F3A}
.bk-total-all span,.bk-total-all small,.bk-total-all b{color:#fff!important}
.bk-amt{margin-left:auto;font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap}
.bk-amt.neg,.bk-total-item b.neg,.bk-subtotal b.neg{color:#B42318}
.bk-amt.pos,.bk-total-item b.pos,.bk-subtotal b.pos{color:#1E7B3A}
.bk-count{font-size:12px;font-weight:500;color:#8A94A6}
.bk-month{margin:0 0 14px!important;border:1px solid #D9DEE6!important;border-radius:12px!important;overflow:hidden;background:#fff}
.bk-month>summary{display:flex!important;align-items:center;gap:10px;padding:12px 16px!important;background:#E9EEF5!important;border-bottom:1px solid #D9DEE6}
.bk-month>summary .bk-month-name{font-size:15.5px;font-weight:800;color:#0B1F3A!important}
.bk-month>summary .bk-count{color:#5B6678!important}
.bk-month>summary .bk-amt{font-size:16px;background:#fff;padding:3px 10px;border-radius:7px;border:1px solid #D9DEE6}
.bk-month .bank-month-body{padding:10px 12px 12px!important;display:grid;gap:10px}
.bk-cat{margin:0!important;border:1px solid #E6E9EE!important;border-radius:10px!important;overflow:hidden}
.bk-cat>summary{display:flex!important;align-items:center;gap:10px;padding:9px 14px!important;background:#F3F5F8!important;border-bottom:1px solid #E6E9EE}
.bk-cat>summary .bk-cat-name{font-size:13.5px;font-weight:700;color:#0B1F3A}
.bk-cat>summary .bk-amt{font-size:14px}
.bk-subtotal{display:flex;justify-content:space-between;padding:8px 14px;background:#FAFBFC;border-top:1px dashed #D9DEE6;font-size:12.5px;color:#5B6678}
.bk-subtotal b{font-variant-numeric:tabular-nums}
@media(max-width:640px){.bk-month>summary{flex-wrap:wrap}.bk-month>summary .bk-count{order:3;width:100%}}
#bank-transactions-groups .bk-cat{margin:8px 0 0!important;border:1px solid #E6E9EE!important;border-radius:10px!important;overflow:hidden}
#bank-transactions-groups .bk-cat>summary{background:#F3F5F8!important;border-bottom:1px solid #E6E9EE!important;padding:9px 14px!important}
#bank-transactions-groups .bk-month .bank-month-body{padding:4px 12px 12px!important}
/* Trajet répété sur le mois */
.trip-repeat{display:grid;gap:8px;padding:10px 12px;border:1px solid #E2E6EC;border-radius:10px;background:#FAFBFC;margin:2px 0 10px}
.trip-repeat-toggle{display:flex!important;align-items:center;gap:10px;font-size:13px;margin:0!important;cursor:pointer}
.trip-repeat-toggle input{width:16px;height:16px;margin:0}
.trip-repeat-cal[hidden]{display:none}
.tr-rep-head{display:flex;align-items:center;gap:12px;font-size:13px;margin-bottom:6px}
.tr-rep-head span{color:#5B6678;font-size:12px;margin-right:auto}
.tr-rep-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:4px}
.tr-rep-grid>span{font-size:11px;font-weight:700;color:#8A94A6;text-align:center}
.tr-day{position:relative;height:32px;border:1px solid #E2E6EC;border-radius:7px;background:#fff;font:inherit;font-size:13px;font-weight:600;color:#344054;cursor:pointer;padding:0}
.tr-day.is-we{background:#F3F5F8;color:#8A94A6}
.tr-day.is-on{background:#0B1F3A;border-color:#0B1F3A;color:#fff}
.tr-day.has-trip::after{content:'';position:absolute;top:4px;right:4px;width:5px;height:5px;border-radius:50%;background:#1E7B3A}
.tr-rep-total{margin-top:8px;padding:8px 10px;border-radius:8px;background:#EEF3FB;font-size:13px;color:#0B1F3A}
/* Budget : où va l'argent du chantier */
.bg-money{grid-column:1/-1;padding:4px 16px 16px}
.bg-money[hidden]{display:none!important}
.bm-wrap{display:grid;gap:12px}
.bm-cards{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}
.bm-card{display:grid;gap:2px;padding:10px 12px;border:1px solid #E2E6EC;border-radius:10px;background:#fff;position:relative;overflow:hidden}
.bm-card::before{content:'';position:absolute;left:0;top:0;bottom:0;width:3px;background:#0B1F3A}
.bm-card.good::before{background:#1E7B3A}.bm-card.bad::before{background:#B42318}
.bm-card small{font-size:11.5px;color:#5B6678;font-weight:600}
.bm-card b{font-size:17px;color:#0B1F3A;font-variant-numeric:tabular-nums}
.bm-card.bad b{color:#B42318}
.bm-card span{font-size:11px;color:#8A94A6;line-height:1.35}
.bm-sec{border:1px solid #E2E6EC;border-radius:10px;background:#fff;overflow:hidden}
.bm-sec>summary,.bm-cat>summary{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 14px;cursor:pointer;list-style:none;font-size:13.5px;font-weight:700;color:#0B1F3A;background:#F3F5F8}
.bm-sec>summary::-webkit-details-marker,.bm-cat>summary::-webkit-details-marker{display:none}
.bm-sec>summary b,.bm-cat>summary b{font-variant-numeric:tabular-nums}
.bm-body{padding:8px 12px 12px;display:grid;gap:8px}
.bm-cat{border:1px solid #EDF0F4;border-radius:8px;overflow:hidden}
.bm-cat>summary{background:#FAFBFC;font-size:13px;font-weight:600}
.bm-cat>summary small{font-weight:500;color:#8A94A6;margin-left:6px}
.bm-table{width:100%;border-collapse:collapse;font-size:12.5px}
.bm-table th{font-size:11px;text-transform:uppercase;letter-spacing:.03em;color:#5B6678;text-align:left;padding:7px 10px;border-bottom:1px solid #E2E6EC}
.bm-table td{padding:7px 10px;border-bottom:1px solid #F0F2F5;color:#1F2937}
.bm-table .num{text-align:right;font-variant-numeric:tabular-nums}
.bm-table .bm-left{text-align:left}
.bm-table tfoot td{font-weight:700;background:#FAFBFC;border-bottom:0}
.bm-empty{color:#8A94A6;font-size:12.5px;text-align:center;padding:10px}
.bm-warn{color:#B42318;font-weight:600}
.bm-pill{display:inline-block;padding:1px 8px;border-radius:999px;font-size:11px;font-weight:700}
.bm-pill.ok{background:#E7F6EC;color:#1E7B3A}.bm-pill.wait{background:#FFF1D6;color:#93600A}.bm-pill.bad{background:#FDECEA;color:#B42318}
@media(max-width:900px){.bm-cards{grid-template-columns:1fr 1fr}}
@media(max-width:640px){.bm-table{font-size:11.5px}.bm-table th,.bm-table td{padding:6px}.bg-money{padding:4px 4px 12px}}
.bm-table .bm-center{text-align:center}
/* Listes regroupées par mois (repliables) */
.rg-month{border-top:1px solid #E6E9EE}
.rg-month:first-of-type{border-top:0}
.rg-month>summary{display:flex;align-items:center;gap:12px;padding:12px 18px;background:#F3F5F8;cursor:pointer;list-style:none;position:sticky;top:0;z-index:1}
.rg-month>summary::-webkit-details-marker{display:none}
.rg-month>summary::before{content:'';width:8px;height:8px;border-right:2px solid #5B6678;border-bottom:2px solid #5B6678;transform:rotate(-45deg);transition:transform .15s;margin-right:2px}
.rg-month[open]>summary::before{transform:rotate(45deg)}
.rg-month-name{font-weight:700;color:#0B1F3A;font-size:14px}
.rg-month-meta{font-size:12.5px;color:#5B6678}
.rg-month-total{margin-left:auto;font-size:14px;color:#0B1F3A;font-variant-numeric:tabular-nums}
.tr-rep-nav{width:28px;height:28px;border:1px solid #E2E6EC;border-radius:7px;background:#fff;font-size:16px;line-height:1;cursor:pointer;color:#344054;padding:0}
.tr-rep-nav:hover{border-color:#0B1F3A}
#bank-transactions-panel .bk-totals{margin:14px 16px 12px;border-radius:12px;box-shadow:none}
#bank-transactions-panel #bank-transactions-groups{padding:0 16px 16px}
#bank-transactions-panel .bk-total-item b{font-size:14.5px}
/* Vérification du relevé : comparaison claire */
.bk-check{margin:0 0 14px;padding:12px 14px;border:1px solid #D9DEE6;border-radius:10px;background:#FAFBFC}
.bk-check h5{margin:0 0 8px;font-size:13px;color:#0B1F3A}
.bk-check-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.bk-check-row>i{font-style:normal;font-weight:700;color:#8A94A6;font-size:16px}
.bk-check-step{display:grid;gap:1px;padding:7px 10px;border:1px solid #E6E9EE;border-radius:8px;background:#fff;min-width:118px}
.bk-check-step small{font-size:11px;color:#5B6678}
.bk-check-step b{font-size:14px;color:#0B1F3A;font-variant-numeric:tabular-nums}
.bk-check-step.pos b{color:#1E7B3A}.bk-check-step.neg b{color:#B42318}
.bk-check-verdict{flex-basis:100%;font-size:12.5px;font-weight:700;padding:6px 10px;border-radius:7px}
.bk-check-verdict.ok{background:#E7F6EC;color:#1E7B3A}.bk-check-verdict.bad{background:#FDECEA;color:#B42318}
.bk-totals h4 small{display:inline-block}
/* ===== Compte société : synthèse du relevé (version épurée) ===== */
#bank-statement-summary{display:block!important;padding:0!important;border:0!important;background:none!important}
.bks-kpis{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));border-top:1px solid #EDF0F4;border-bottom:1px solid #EDF0F4}
.bks-kpi{display:grid;gap:3px;padding:14px 18px;border-left:1px solid #EDF0F4;background:#fff}
.bks-kpi:first-child{border-left:0}
.bks-kpi small{font-size:11.5px;font-weight:600;letter-spacing:.02em;color:#6B7585;text-transform:uppercase}
.bks-kpi strong{font-size:18px;font-weight:700;color:#0B1F3A;font-variant-numeric:tabular-nums}
.bks-kpi.pos strong{color:#1E7B3A}.bks-kpi.neg strong{color:#B42318}
.bks-kpi.strong{background:#F7F9FC}
.bks-reco{display:flex;flex-wrap:wrap;align-items:baseline;gap:6px 10px;padding:10px 18px;font-size:12.5px;color:#5B6678;border-bottom:1px solid #EDF0F4}
.bks-reco b{color:#344054;font-weight:700}
.bks-dot{width:8px;height:8px;border-radius:50%;background:#C9D0DA;align-self:center}
.bks-reco.ok .bks-dot{background:#1E7B3A}.bks-reco.ok b{color:#1E7B3A}
.bks-reco.bad{background:#FEF3F2}.bks-reco.bad .bks-dot{background:#B42318}.bks-reco.bad b{color:#B42318}
#bank-transactions-panel .bk-totals,.bk-totals{margin:16px 18px 18px!important;padding:0!important;border:1px solid #E6E9EE!important;border-radius:10px!important;background:#fff!important;box-shadow:none!important;overflow:hidden}
.bkc-head{display:flex;align-items:baseline;justify-content:space-between;padding:12px 16px;border-bottom:1px solid #EDF0F4}
.bkc-head h4{margin:0;font-size:14px;color:#0B1F3A}
.bkc-head span{font-size:12px;color:#8A94A6}
.bkc-cols{display:grid;grid-template-columns:1fr 1fr}
.bkc-cols section+section{border-left:1px solid #EDF0F4}
.bkc-cols header{display:flex;justify-content:space-between;align-items:baseline;padding:10px 16px;background:#FAFBFC;border-bottom:1px solid #EDF0F4;font-size:12px;font-weight:700;letter-spacing:.03em;text-transform:uppercase;color:#5B6678}
.bkc-cols header b{font-size:14px;letter-spacing:0;text-transform:none;font-variant-numeric:tabular-nums}
.bkc-cols ul{list-style:none;margin:0;padding:4px 0}
.bkc-cols li{padding:8px 16px}
.bkc-line{display:flex;align-items:baseline;gap:8px}
.bkc-name{font-size:13px;font-weight:600;color:#1F2937}
.bkc-count{font-size:11.5px;color:#8A94A6}
.bkc-amt{margin-left:auto;font-size:13px;font-weight:700;font-variant-numeric:tabular-nums}
.bkc-bar{display:flex;align-items:center;gap:8px;margin-top:5px}
.bkc-bar i{display:block;height:4px;border-radius:2px;background:#C9D0DA}
.bkc-bar small{font-size:10.5px;color:#8A94A6;white-space:nowrap}
.bkc-amt.neg,.bkc-cols header b.neg{color:#B42318}.bkc-amt.pos,.bkc-cols header b.pos{color:#1E7B3A}
.bkc-bar i.neg{background:#E8A49C}.bkc-bar i.pos{background:#8FCCA3}
.bkc-empty{font-size:12.5px;color:#8A94A6}
.bkc-foot{display:flex;justify-content:space-between;align-items:baseline;padding:12px 16px;border-top:1px solid #EDF0F4;background:#F7F9FC;font-size:13px;color:#344054}
.bkc-foot b{font-size:15px;color:#0B1F3A;font-variant-numeric:tabular-nums}
@media(max-width:900px){.bks-kpis{grid-template-columns:1fr 1fr}.bks-kpi{border-left:0;border-top:1px solid #EDF0F4}.bkc-cols{grid-template-columns:1fr}.bkc-cols section+section{border-left:0;border-top:1px solid #EDF0F4}}
.bks-kpi.pos strong{color:#1E7B3A!important}.bks-kpi.neg strong{color:#B42318!important}
.bkc-cols ul{padding:6px 0 8px}
/* Groupes du relevé : plus sobres */
#bank-transactions-groups .bk-month{border:1px solid #E6E9EE!important;border-radius:10px!important;margin:0 0 10px!important;background:#fff}
#bank-transactions-groups .bk-month>summary{background:#fff!important;border-bottom:1px solid #EDF0F4!important;padding:12px 16px!important}
#bank-transactions-groups .bk-month:not([open])>summary{border-bottom:0!important}
#bank-transactions-groups .bk-month>summary .bk-amt{background:none!important;border:0!important;padding:0!important;font-size:15px}
#bank-transactions-groups .bk-month>summary .bk-month-name{font-size:14.5px}
#bank-transactions-groups .bk-month>summary svg{display:none}
#bank-transactions-groups .bk-cat{border:0!important;border-radius:0!important;margin:0!important;border-top:1px solid #F0F2F5!important}
#bank-transactions-groups .bk-cat:first-child{border-top:0!important}
#bank-transactions-groups .bk-cat>summary{background:#FAFBFC!important;border-bottom:0!important;padding:8px 16px!important}
#bank-transactions-groups .bk-month .bank-month-body{padding:0!important;gap:0!important}
#bank-transactions-groups .bk-subtotal{border-top:1px solid #F0F2F5;background:#fff;padding:7px 16px}
.bkc-cols ul{margin:0!important;padding:4px 0 8px!important}.bkc-cols li{margin:0!important}#bank-transactions-groups{padding:0 18px 18px!important}
/* ===== Relevé en grand livre ===== */
.bkl-tools{display:flex;justify-content:flex-end;padding:14px 0 10px}
.bkl-tools label{display:flex!important;align-items:center;gap:8px;font-size:12.5px;font-weight:600;color:#5B6678;margin:0!important}
.bkl-tools select{height:34px;min-width:240px;border:1px solid #D9DEE6;border-radius:8px;padding:0 10px;font:inherit;font-size:13px;background:#fff}
.bkl-part{border:1px solid #E2E6EC;border-radius:10px;overflow:hidden;background:#fff;margin:0 0 14px}
.bkl-part-head{display:flex;align-items:baseline;gap:10px;padding:12px 16px;background:#0B1F3A;color:#fff}
.bkl-part-head span{font-size:13px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
.bkl-part-head small{font-size:12px;color:#C9D3E3}
.bkl-part-head b{margin-left:auto;font-size:15px;font-variant-numeric:tabular-nums}
.bkl-cat+.bkl-cat{border-top:1px solid #E6E9EE}
.bkl-cat-head{display:flex;align-items:baseline;gap:8px;padding:9px 16px;background:#F3F5F8;border-bottom:1px solid #E6E9EE}
.bkl-cat-head span{font-size:13px;font-weight:700;color:#0B1F3A}
.bkl-cat-head small{font-size:11.5px;color:#8A94A6}
.bkl-rows .bank-tx-row{border-radius:0!important;margin:0!important;border:0!important;border-bottom:1px solid #F0F2F5!important}
.bkl-sub{display:flex;justify-content:flex-end;gap:24px;padding:8px 16px;font-size:12.5px;color:#5B6678;background:#FAFBFC}
.bkl-sub b{min-width:110px;text-align:right;font-variant-numeric:tabular-nums;color:#1F2937}
.bkl-part-foot{display:flex;justify-content:flex-end;gap:24px;padding:11px 16px;border-top:2px solid #0B1F3A;font-size:13px;font-weight:700;color:#0B1F3A;background:#F7F9FC}
.bkl-part-foot b{min-width:110px;text-align:right;font-variant-numeric:tabular-nums}
.bkl-part.pos .bkl-part-head b,.bkl-part.pos .bkl-sub b,.bkl-part.pos .bkl-part-foot b{color:inherit}
.bkl-part.pos .bkl-sub b,.bkl-part.pos .bkl-part-foot b{color:#1E7B3A}
.bkl-part.neg .bkl-sub b,.bkl-part.neg .bkl-part-foot b{color:#B42318}
.bkl-net{display:flex;justify-content:space-between;align-items:baseline;padding:14px 16px;border:1px solid #0B1F3A;border-radius:10px;background:#fff;font-size:13.5px;font-weight:700;color:#0B1F3A;margin-bottom:6px}
.bkl-net b{font-size:17px;font-variant-numeric:tabular-nums}
@media(max-width:640px){.bkl-tools{justify-content:stretch}.bkl-tools select{min-width:0;flex:1}.bkl-sub,.bkl-part-foot{gap:10px}}
.bk-year-all b{font-size:13px!important}
/* Répartition par catégorie : version compacte */
.bkc-head{padding:9px 14px!important}
.bkc-head h4{font-size:13px!important}
.bkc-cols header{padding:7px 14px!important;font-size:11px!important}
.bkc-cols header b{font-size:13px!important}
.bkc-cols ul{padding:2px 0!important}
.bkc-cols li{display:grid!important;grid-template-columns:1fr auto 52px 104px;align-items:baseline;gap:8px;padding:5px 14px!important;border-bottom:1px solid #F3F5F8}
.bkc-cols li:last-child{border-bottom:0}
.bkc-name{font-size:12.5px!important;font-weight:600}
.bkc-count,.bkc-share{font-size:11.5px!important;color:#8A94A6;text-align:right}
.bkc-amt{font-size:12.5px!important;text-align:right;margin-left:0!important}
.bkc-foot{padding:8px 14px!important;font-size:12.5px!important}
.bkc-foot b{font-size:14px!important}
.bkc-colhead{display:flex;justify-content:space-between;align-items:baseline;padding:7px 14px;background:#FAFBFC;border-bottom:1px solid #EDF0F4;font-size:11px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:#5B6678}
.bkc-colhead b{font-size:13px;letter-spacing:0;text-transform:none;font-variant-numeric:tabular-nums}
.bkc-colhead b.neg{color:#B42318}.bkc-colhead b.pos{color:#1E7B3A}
.bks-kpis-4{grid-template-columns:repeat(4,minmax(0,1fr))}
/* Comptable : lecture seule — aucun bouton qui crée, modifie ou supprime */
body[data-role="comptable"] :is(#fx-new,#toggle-add-purchase,.delete-purchase,.delete-facture,.confirm-match-bank-tx,.unmatch-bank-tx,.delete-match-purchase,.rg-act .document-more,#acc-pack-open){display:none!important}
body[data-role="comptable"] .section-head .rg-actions>button.primary{display:none!important}
body[data-role="comptable"] main::before{content:'Accès comptable — dépenses, sous-traitance, factures clients et fiches de paie : consultation, téléchargement, dépôt des fiches de paie.';display:block;margin:0 0 12px;padding:8px 14px;border-radius:8px;background:#EEF3FB;color:#0B1F3A;font-size:12.5px;font-weight:600}
/* Envoyer au comptable */
.acc-pack{border:0;border-radius:12px;padding:0;width:min(640px,calc(100vw - 32px));max-height:calc(100vh - 48px);box-shadow:0 20px 60px rgba(11,31,58,.25)}
.acc-pack::backdrop{background:rgba(11,31,58,.45)}
.acc-pack-box{display:flex;flex-direction:column;max-height:calc(100vh - 48px)}
.acc-pack-head{display:flex;justify-content:space-between;align-items:flex-start;padding:14px 18px;border-bottom:1px solid #E3E8EF}
.acc-pack-head h3{margin:2px 0 0;font-size:17px}.acc-pack-head small{color:#667085;font-size:11px;letter-spacing:.06em}
.acc-pack-head button{height:30px;width:30px;padding:0}
.acc-pack-row{display:grid;grid-template-columns:160px 1fr;gap:10px;padding:12px 18px}
.acc-pack-row label{display:flex;flex-direction:column;gap:4px;font-size:12px;font-weight:600;color:#475467}
.acc-pack-items{overflow:auto;padding:0 18px 8px;flex:1}
.acc-pack-items fieldset{border:1px solid #E3E8EF;border-radius:8px;margin:0 0 10px;padding:6px 12px 8px}
.acc-pack-items legend{font-size:12px;font-weight:700;color:#0B1F3A;padding:0 4px}
.acc-pack-item{display:flex;gap:8px;align-items:flex-start;font-size:13px;padding:4px 0;font-weight:400;color:#1D2939}
.acc-pack-item.is-missing{color:#98A2B3}.acc-pack-item em{font-size:11.5px}
.acc-pack-foot{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:12px 18px;border-top:1px solid #E3E8EF}
.acc-pack-foot small{color:#475467}
@media (max-width:560px){.acc-pack-row{grid-template-columns:1fr}}

.nav[hidden],.nav-sub[hidden],.nav-item-group[hidden]{display:none!important}
/* Fiches de paie — dossiers par salarié */
.ps-page{--ps-line:#E4E7EC;--ps-ink:#0B1F3A;--ps-mute:#667085;--ps-soft:#F5F7FA}
.ps-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:0 0 14px}
.ps-kpi{background:#fff;border:1px solid var(--ps-line);border-radius:12px;padding:12px 14px;display:flex;flex-direction:column;gap:2px}
.ps-kpi span{font-size:12px;color:var(--ps-mute);font-weight:600}
.ps-kpi strong{font-size:22px;color:var(--ps-ink);font-variant-numeric:tabular-nums;letter-spacing:-.01em}
.ps-kpi.is-warn{border-color:#FEDF89;background:#FFFCF5}.ps-kpi.is-warn strong{color:#B54708}
.ps-drop{display:grid;grid-template-columns:auto 1fr auto;gap:16px;align-items:center;background:#fff;border:1.5px dashed #C7D0DD;border-radius:14px;padding:16px 18px;margin:0 0 12px;transition:border-color .15s,background .15s}
.ps-drop.is-drag{border-color:#2E6BE6;background:#F3F7FF}
.ps-drop.is-busy{opacity:.7;pointer-events:none}
.ps-drop-icon{width:46px;height:46px;border-radius:12px;background:#EEF3FB;display:grid;place-items:center}
.ps-drop-icon svg{width:24px;height:24px;fill:none;stroke:#1D4ED8;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.ps-drop-text{display:flex;flex-direction:column;gap:3px;min-width:0}
.ps-drop-text strong{font-size:14.5px;color:var(--ps-ink)}
.ps-drop-text span{font-size:12.5px;color:var(--ps-mute);line-height:1.45}
.ps-drop-actions{display:flex;align-items:flex-end;gap:10px}
.ps-fallback{display:flex;flex-direction:column;gap:4px;font-size:11.5px;font-weight:600;color:var(--ps-mute);margin:0}
.ps-fallback input{height:36px;font-size:13px;width:150px}
.ps-drop-actions .primary{height:38px;white-space:nowrap}
.ps-result{background:#fff;border:1px solid var(--ps-line);border-radius:12px;padding:12px 16px;margin:0 0 12px;font-size:13px;color:var(--ps-ink);display:flex;flex-direction:column;gap:6px}
.ps-result ul{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:3px}
.ps-result li{font-size:12.5px;color:#067647}.ps-result li.warn{color:#B54708}
.ps-result small{color:var(--ps-mute)}
.ps-result.is-ok{border-color:#ABEFC6;background:#F6FEF9}.ps-result.is-error{border-color:#FECDCA;background:#FFFBFA;color:#B42318}
.ps-spinner{display:inline-block;width:14px;height:14px;border:2px solid #C7D0DD;border-top-color:#1D4ED8;border-radius:50%;animation:ps-spin .8s linear infinite;margin-right:8px;vertical-align:-2px}
@keyframes ps-spin{to{transform:rotate(360deg)}}
.ps-pending-bar{display:flex;justify-content:space-between;align-items:center;gap:14px;background:#FFFAEB;border:1px solid #FEDF89;border-radius:12px;padding:12px 16px;margin:0 0 12px}
.ps-pending-bar div{display:flex;flex-direction:column;gap:2px}
.ps-pending-bar strong{font-size:13.5px;color:#93370D}.ps-pending-bar span{font-size:12px;color:#B54708}
.ps-pending-bar .primary{display:inline-flex;align-items:center;gap:6px;height:36px;white-space:nowrap}
.ps-pending-bar .primary svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.ps-folders{display:flex;flex-direction:column;gap:8px}
.ps-folder{background:#fff;border:1px solid var(--ps-line);border-radius:12px;overflow:hidden;transition:box-shadow .15s}
.ps-folder.is-open{box-shadow:0 1px 3px rgba(16,24,40,.06)}
.ps-folder.is-alert{border-color:#FEDF89}
.ps-folder-head{all:unset;box-sizing:border-box;width:100%;display:flex;align-items:center;gap:12px;padding:11px 14px;cursor:pointer}
.ps-folder-head.static{cursor:default;background:#FFFCF5}
.ps-folder-head:hover:not(:disabled):not(.static){background:var(--ps-soft)}
.ps-folder-head:disabled{cursor:default}
.ps-folder-head:focus-visible{outline:2px solid #2E6BE6;outline-offset:-2px}
.ps-avatar{flex:none;width:36px;height:36px;border-radius:10px;background:#E8EEF8;color:#1D3A6B;font-weight:700;font-size:13px;display:grid;place-items:center}
.ps-avatar.alert{background:#FEF0C7;color:#B54708}
.ps-folder.is-empty .ps-avatar{background:#F2F4F7;color:#98A2B3}
.ps-folder-title{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}
.ps-folder-title strong{font-size:14px;color:var(--ps-ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ps-folder-title strong em{font-style:normal;font-size:10.5px;font-weight:700;color:#475467;background:#F2F4F7;border-radius:5px;padding:1px 6px;margin-left:6px;vertical-align:1px}
.ps-folder-title small{font-size:12px;color:var(--ps-mute)}
.ps-folder.is-empty .ps-folder-title strong{color:#667085}
.ps-count{flex:none;min-width:26px;height:22px;padding:0 7px;border-radius:11px;background:#F2F4F7;color:#344054;font-size:12px;font-weight:700;display:grid;place-items:center;font-variant-numeric:tabular-nums}
.ps-chev{flex:none;width:18px;height:18px;color:#98A2B3;transition:transform .15s}
.ps-chev svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.ps-folder.is-open .ps-chev{transform:rotate(90deg)}
.ps-folder.is-empty .ps-chev{visibility:hidden}
.ps-folder-body{border-top:1px solid var(--ps-line)}
.ps-line{display:flex;align-items:center;gap:12px;padding:10px 14px 10px 62px;border-top:1px solid #F2F4F7}
.ps-line:first-child{border-top:0}
.ps-assign{padding-left:14px;flex-wrap:wrap}
.ps-doc{display:none}
.ps-line-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}
.ps-line-main strong{font-size:13.5px;color:var(--ps-ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ps-line-main small{font-size:11.5px;color:var(--ps-mute)}
.ps-chip{flex:none;font-size:11.5px;font-weight:700;border-radius:999px;padding:3px 9px;white-space:nowrap}
.ps-chip.ok{background:#ECFDF3;color:#067647}.ps-chip.wait{background:#FFFAEB;color:#B54708}
.ps-icons{flex:none;display:flex;gap:4px}
.ps-ic{width:32px;height:32px;padding:0;display:grid;place-items:center;border:1px solid var(--ps-line);background:#fff;border-radius:8px;cursor:pointer;color:#344054;transition:background .12s,border-color .12s,color .12s}
.ps-ic svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.ps-ic:hover{background:var(--ps-soft);border-color:#D0D5DD}
.ps-ic.ok{color:#fff;background:#0B1F3A;border-color:#0B1F3A}.ps-ic.ok:hover{background:#17325A}
.ps-ic.danger{color:#B42318}.ps-ic.danger:hover{background:#FEF3F2;border-color:#FECDCA}
.ps-ic.danger.confirm{background:#B42318;color:#fff;border-color:#B42318}
.ps-assign-fields{display:flex;gap:8px;align-items:center}
.ps-assign-fields select{height:34px;font-size:13px;min-width:170px}
.ps-assign-fields input{height:34px;font-size:13px;width:140px}
.ps-assign-fields .primary{height:34px;padding:0 12px;font-size:12.5px}
.ps-empty{color:var(--ps-mute);font-size:13px;padding:22px;text-align:center;background:#fff;border:1px dashed #D0D5DD;border-radius:12px}
.ps-year select{height:36px;font-size:13px;min-width:120px}
@media (max-width:820px){.ps-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.ps-drop{grid-template-columns:auto 1fr}.ps-drop-actions{grid-column:1/-1;justify-content:space-between}.ps-line{padding-left:14px;flex-wrap:wrap}.ps-line .ps-icons{margin-left:auto}.ps-assign-fields{width:100%;flex-wrap:wrap}.ps-assign-fields select{flex:1}.ps-pending-bar{flex-direction:column;align-items:stretch}}
/* Fiches de paie — version compacte */
.ps-kpis{display:flex;flex-wrap:wrap;gap:0;background:#fff;border:1px solid var(--ps-line);border-radius:10px;margin:0 0 10px;overflow:hidden}
.ps-kpi{flex:1;flex-direction:row;align-items:center;justify-content:space-between;gap:8px;border:0;border-left:1px solid var(--ps-line);border-radius:0;padding:7px 12px;min-width:130px}
.ps-kpi:first-child{border-left:0}
.ps-kpi span{font-size:11.5px}
.ps-kpi strong{font-size:15px}
.ps-kpi.is-warn{background:#FFFCF5}
.ps-drop{gap:12px;padding:8px 10px 8px 12px;border-radius:10px;margin:0 0 10px;border-width:1px}
.ps-drop-icon{width:30px;height:30px;border-radius:8px}
.ps-drop-icon svg{width:17px;height:17px}
.ps-drop-text{gap:0}
.ps-drop-text strong{font-size:13px}
.ps-drop-text span{font-size:11.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ps-drop-actions{align-items:center;gap:8px}
.ps-fallback{flex-direction:row;align-items:center;gap:6px;font-size:11px;white-space:nowrap}
.ps-fallback input{height:30px;width:132px;font-size:12px;padding:0 8px}
.ps-drop-actions .primary{height:30px;padding:0 12px;font-size:12.5px}
.ps-result{padding:8px 12px;border-radius:10px;margin:0 0 10px;font-size:12.5px;gap:4px}
.ps-pending-bar{padding:6px 8px 6px 12px;border-radius:10px;margin:0 0 10px}
.ps-pending-bar div{flex-direction:row;align-items:baseline;gap:8px;min-width:0}
.ps-pending-bar strong{font-size:12.5px;white-space:nowrap}
.ps-pending-bar span{font-size:11.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ps-pending-bar .primary{height:30px;padding:0 12px;font-size:12.5px}
.ps-pending-bar .primary svg{width:14px;height:14px}
.ps-folders{gap:6px}
.ps-folder{border-radius:10px}
.ps-folder-head{gap:10px;padding:6px 10px}
.ps-avatar{width:28px;height:28px;border-radius:8px;font-size:11px}
.ps-folder-title{flex-direction:row;align-items:baseline;gap:10px}
.ps-folder-title strong{font-size:13px}
.ps-folder-title small{font-size:11.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ps-count{min-width:22px;height:20px;font-size:11px}
.ps-chip{font-size:11px;padding:2px 8px}
.ps-line{gap:10px;padding:5px 10px 5px 48px}
.ps-line-main{flex-direction:row;align-items:baseline;gap:10px}
.ps-line-main strong{font-size:12.5px;flex:none}
.ps-line-main small{font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ps-assign{padding-left:10px}
.ps-ic{width:28px;height:28px;border-radius:7px}
.ps-ic svg{width:14px;height:14px}
.ps-assign-fields select,.ps-assign-fields input,.ps-assign-fields .primary{height:28px;font-size:12px}
.ps-assign-fields select{min-width:150px;padding:0 8px}
.ps-assign-fields input{width:130px;padding:0 8px}
.ps-empty{padding:14px}
@media (max-width:820px){.ps-kpi{min-width:50%;border-left:0;border-top:1px solid var(--ps-line)}.ps-kpi:nth-child(-n+2){border-top:0}.ps-kpi:nth-child(even){border-left:1px solid var(--ps-line)}.ps-drop-text span{white-space:normal}.ps-pending-bar{flex-direction:row;align-items:center}.ps-pending-bar span{display:none}.ps-folder-title,.ps-line-main{flex-direction:column;gap:0}.ps-line{padding-left:10px}}
@media (max-width:820px){
#payslips-view .ps-line{flex-wrap:wrap;row-gap:4px}
#payslips-view .ps-line-main{flex:1 1 100%}
#payslips-view .ps-line .ps-chip{margin-right:auto}
#payslips-view .ps-line .ps-icons{margin-left:auto}
#payslips-view .ps-assign-fields{flex-wrap:nowrap}
#payslips-view .ps-assign-fields select,#payslips-view .ps-assign-fields input,#payslips-view .ps-assign-fields .primary,#payslips-view .ps-fallback input,#payslips-view .ps-drop-actions .primary{height:32px;min-height:32px;font-size:12.5px}
#payslips-view .ps-assign-fields select{min-width:0;flex:1}
#payslips-view .ps-assign-fields input{width:118px;flex:none}
#payslips-view .ps-drop-actions{flex-wrap:nowrap}
#payslips-view .ps-fallback input{width:120px}
#payslips-view .ps-folder-title small,#payslips-view .ps-line-main small{white-space:normal}
}
/* Paiements des salariés */
.ps-kpi.is-bad{border-color:#FECDCA;background:#FFFBFA}.ps-kpi.is-bad strong{color:#B42318}
.ps-chip.bad{background:#FEF3F2;color:#B42318}.ps-chip.info{background:#EFF4FF;color:#1849A9}
.pa-body{padding:10px 12px 12px}
.pa-sum{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border:1px solid var(--ps-line);border-radius:8px;overflow:hidden;margin:0 0 10px}
.pa-sum div{display:flex;flex-direction:column;gap:1px;padding:6px 10px;border-left:1px solid var(--ps-line)}
.pa-sum div:first-child{border-left:0}
.pa-sum span{font-size:11px;color:var(--ps-mute);font-weight:600}
.pa-sum strong{font-size:14px;color:var(--ps-ink);font-variant-numeric:tabular-nums}
.pa-sum .pa-sum-total{background:#F8FAFC}.pa-sum .pa-sum-total strong{font-size:15px}
.pa-table-wrap{overflow-x:auto;border:1px solid var(--ps-line);border-radius:8px}
.pa-table{width:100%;border-collapse:collapse;font-size:12.5px}
.pa-table th{font-size:11px;font-weight:700;color:var(--ps-mute);text-align:left;padding:6px 10px;background:#F8FAFC;border-bottom:1px solid var(--ps-line);white-space:nowrap}
.pa-table td{padding:5px 10px;border-top:1px solid #F2F4F7;color:var(--ps-ink);white-space:nowrap}
.pa-table tr:first-child td{border-top:0}
.pa-table .num{text-align:right;font-variant-numeric:tabular-nums}
.pa-table .pa-carry td{background:#FCFCFD;color:var(--ps-mute);font-style:italic}
.pa-table .pa-due{color:#B42318;font-weight:700}.pa-table .pa-adv{color:#1849A9;font-weight:700}.pa-table .pa-zero{color:#067647;font-weight:700}
.pa-pend{font-size:10.5px;color:#B54708;font-weight:600}
.pa-warn{color:#B42318;font-weight:600}
.pa-none{color:var(--ps-mute);font-size:12px;padding:8px 2px;text-align:left}
.pa-table td.pa-none{text-align:center;padding:10px}
.pa-foot-note{font-size:11px;color:var(--ps-mute);margin:6px 2px 0}
.pa-sec-head{display:flex;align-items:baseline;gap:10px;margin:14px 2px 6px}
.pa-sec-head strong{font-size:12.5px;color:var(--ps-ink)}.pa-sec-head small{font-size:11.5px;color:var(--ps-mute)}
.pa-add{display:grid;grid-template-columns:140px 110px 120px 1fr auto;gap:6px;margin:0 0 6px}
.pa-add input,.pa-add select,.pa-add .primary{height:30px;font-size:12.5px;padding:0 8px}
.pa-add .primary{padding:0 12px;white-space:nowrap}
.pa-line{padding:5px 2px;border-top:1px solid #F2F4F7;flex-wrap:wrap}
.pa-btn{height:28px;padding:0 10px;font-size:12px;font-weight:600;border-radius:7px;border:1px solid var(--ps-line);background:#fff;color:#344054;cursor:pointer;white-space:nowrap}
.pa-btn.ok{background:#067647;border-color:#067647;color:#fff}.pa-btn.ok:hover{background:#05603A}
.pa-contest{display:flex;gap:6px;width:100%;margin:6px 0 2px}
.pa-contest input{flex:1;height:30px;font-size:12.5px}
.pa-contest .primary{height:30px;padding:0 12px;font-size:12.5px}
#pay-view .ps-folder-head .ps-chip{flex:none}
@media (max-width:820px){.pa-sum{grid-template-columns:1fr 1fr}.pa-sum div:nth-child(3){border-left:0}.pa-sum div:nth-child(n+3){border-top:1px solid var(--ps-line)}.pa-add{grid-template-columns:1fr 1fr}.pa-add [name=note],.pa-add .primary{grid-column:1/-1}#pay-view .ps-folder-head{flex-wrap:wrap}#pay-view .ps-line-main{flex:1 1 100%}#pay-view .pa-line .ps-icons{margin-left:auto}}
@media (max-width:820px){#pay-view .pa-table{font-size:11.5px}#pay-view .pa-table th,#pay-view .pa-table td{padding:5px 6px}#pay-view .pa-sec-head{flex-direction:column;gap:1px}#pay-view .pa-line .ps-chip{margin-right:auto}}
/* Budget — bandeau de synthèse compact */
.bm-cards{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:0;border:1px solid #E2E6EC;border-radius:10px;background:#fff;overflow:hidden}
.bm-card{gap:0;padding:7px 12px;border:0;border-left:1px solid #E2E6EC;border-radius:0;background:transparent;min-width:0}
.bm-card:first-child{border-left:0}
.bm-card::before{top:auto;left:0;right:0;bottom:0;width:auto;height:2px}
.bm-card small{font-size:11px}
.bm-card b{font-size:15px;line-height:1.35}
.bm-card span{font-size:10.5px;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media (max-width:820px){.bm-cards{grid-template-columns:1fr 1fr}.bm-card{border-top:1px solid #E2E6EC}.bm-card:nth-child(-n+2){border-top:0}.bm-card:nth-child(odd){border-left:0}.bm-card:last-child{grid-column:1/-1}}
.bm-card::before{background:transparent}.bm-card.good::before{background:#1E7B3A}.bm-card.bad::before{background:#B42318}
.bm-card span{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
/* Fiches de paie — accès par mois */
.ps-months{display:flex;gap:4px;flex-wrap:wrap;margin:0 0 10px}
.ps-mchip{position:relative;display:inline-flex;align-items:center;gap:5px;height:28px;padding:0 10px;border:1px solid var(--ps-line);border-radius:999px;background:#fff;font-size:12px;font-weight:600;color:#344054;cursor:pointer}
.ps-mchip:hover{background:var(--ps-soft)}
.ps-mchip.is-on{background:#0B1F3A;border-color:#0B1F3A;color:#fff}
.ps-mchip.is-future{color:#98A2B3}
.ps-mchip b{font-size:10.5px;min-width:16px;height:16px;padding:0 4px;border-radius:8px;background:#EEF2F6;color:#344054;display:grid;place-items:center}
.ps-mchip.is-on b{background:rgba(255,255,255,.18);color:#fff}
.ps-mchip .dot{width:6px;height:6px;border-radius:50%;display:inline-block}
.ps-mchip .dot.wait{background:#F79009}.ps-mchip .dot.miss{background:#F04438}
.ps-month-title{background:#F8FAFC!important}
.ps-mline{padding-left:10px}
.ps-avatar.sm{width:24px;height:24px;font-size:10px;border-radius:7px}
.ps-tag{font-style:normal;font-size:10px;font-weight:700;color:#475467;background:#F2F4F7;border-radius:5px;padding:1px 5px;margin-left:5px}
.ps-chip.miss{background:#FEF3F2;color:#B42318}
.ps-small{height:28px!important;min-height:0!important;line-height:1!important;padding:0 10px!important;font-size:12px!important;flex:none}
.ps-note{font-size:12px;color:#B54708;margin:6px 2px}
@media (max-width:820px){.ps-months{flex-wrap:nowrap;overflow-x:auto;padding-bottom:2px}.ps-mchip{flex:none}}
@media (max-width:820px){#payslips-view .ps-mline .ps-avatar.sm{display:none}}
/* Relevé : catégories repliables */
.bkl-tools{align-items:center;gap:10px}
.bkl-toggle-all{height:34px;padding:0 12px;font-size:12.5px}
details.bkl-cat>summary{list-style:none;cursor:pointer;align-items:center;padding:8px 16px;border-bottom:0}
details.bkl-cat>summary::-webkit-details-marker{display:none}
details.bkl-cat>summary::before{content:'';width:7px;height:7px;border-right:2px solid #5B6678;border-bottom:2px solid #5B6678;transform:rotate(-45deg);transition:transform .15s;margin-right:4px;flex:none}
details.bkl-cat[open]>summary::before{transform:rotate(45deg)}
details.bkl-cat[open]>summary{border-bottom:1px solid #E6E9EE}
details.bkl-cat>summary:hover{background:#EDF0F4}
details.bkl-cat>summary b{margin-left:auto;font-size:13px;font-variant-numeric:tabular-nums}
.bkl-part.pos details.bkl-cat>summary b{color:#1E7B3A}.bkl-part.neg details.bkl-cat>summary b{color:#B42318}
/* Modifier son propre nom depuis la puce (moi) */
.tw-name-edit{width:26px;height:26px;padding:0;margin-left:-2px;border:1px solid #E2E6EC;border-radius:50%;background:#fff;color:#5B6678;display:inline-grid;place-items:center;cursor:pointer;vertical-align:middle;flex:none}
.tw-name-edit svg{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.tw-name-edit:hover{background:#F3F5F8;color:#0B1F3A}
.tw-name-form{display:inline-flex;gap:4px;align-items:center}
.tw-name-form input{height:30px;font-size:13px;padding:0 12px;border-radius:999px;min-width:190px}
.tw-name-form button{height:30px;padding:0 10px;font-size:12px;border-radius:999px}
.tw-name-form input,.tw-name-form button{height:30px!important;min-height:0!important;line-height:1!important}
.tw-name-form input{padding:0 12px!important;border-radius:999px!important}
/* Paiements — version simplifiée */
.pa-sum3{grid-template-columns:repeat(3,minmax(0,1fr))}
.pa-sum div small{font-size:10.5px;color:var(--ps-mute)}
.pa-sum .is-due strong{color:#B42318}.pa-sum .is-adv strong{color:#1849A9}.pa-sum .is-ok strong{color:#067647}
.pa-foot-note{margin:0 2px 8px}
.pa-table td small.pa-split{display:block;font-size:10.5px;color:var(--ps-mute);font-weight:500}
.pa-table td.pa-adv small{font-size:10.5px;font-weight:600}
.pa-type{flex:none;font-size:10.5px;font-weight:700;border-radius:6px;padding:2px 7px;min-width:62px;text-align:center}
.pa-type.vir{background:#EFF4FF;color:#1849A9}.pa-type.esp{background:#F4F3FF;color:#5925DC}
.pa-old{margin:12px 0 0;border:1px dashed #D0D5DD;border-radius:8px;padding:6px 10px;background:#FCFCFD}
.pa-old summary{cursor:pointer;font-size:12px;color:#475467;font-weight:600}
.pa-old p{font-size:11.5px;color:var(--ps-mute);margin:6px 0}
@media (max-width:820px){.pa-sum3{grid-template-columns:1fr 1fr 1fr}.pa-sum3 div{border-top:0!important;border-left:1px solid var(--ps-line)!important;padding:6px 8px}.pa-sum3 div:first-child{border-left:0!important}.pa-sum3 strong{font-size:13px}}
.ps-assign-fields .ps-other-name{height:28px!important;min-height:0!important;font-size:12px;width:200px;padding:0 8px}
@media (max-width:820px){.ps-assign-fields{flex-wrap:wrap!important}.ps-assign-fields .ps-other-name{width:100%}}
.ps-group-head{font-size:11px;font-weight:800;letter-spacing:.07em;text-transform:uppercase;color:#475467;margin:10px 2px 2px;display:flex;align-items:center;gap:6px}
.ps-group-head:first-child{margin-top:0}
.ps-group-head span{font-size:10.5px;font-weight:700;background:#EEF2F6;color:#475467;border-radius:8px;padding:1px 6px;letter-spacing:0}
.mail-check-status{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:12.5px;margin:4px 0 10px}
.mail-check-row{display:flex;gap:8px}.mail-check-row input{flex:1;height:36px}.mail-check-row button{height:36px;white-space:nowrap}
.mail-check-log{display:flex;flex-direction:column;gap:4px;margin-top:10px;font-size:12px}
.mail-log-row{display:flex;flex-wrap:wrap;gap:6px;align-items:center;padding:4px 0;border-top:1px solid #F0F2F5}
.mail-log-row em{flex-basis:100%;color:#B42318;font-style:normal;font-size:11.5px;word-break:break-word}
.invite-link-box{display:flex;flex-direction:column;gap:6px;margin:10px 0;padding:12px 14px;border:1px solid #FEDF89;background:#FFFAEB;border-radius:10px;font-size:12.5px;color:#93370D}
.invite-link-box small{color:#B54708}.invite-link-row{display:flex;gap:6px}.invite-link-row input{flex:1;height:34px;font-size:12px}.invite-link-row button{height:34px}
/* Devis structuré : catégories, sous-catégories, notes, sauts de page */
@media (min-width:821px){#devis-builder-view .dz .db-lines-head,#devis-builder-view .dz .db-line{grid-template-columns:56px minmax(0,1fr) 78px 86px 100px 118px 86px!important}}
#devis-builder-view .dz .db-line-num{flex-direction:column;align-items:center;gap:3px;font-weight:600;color:#5B6678}
#devis-builder-view .dz .db-type{font-style:normal;font-size:8.5px;font-weight:800;letter-spacing:.04em;border-radius:4px;padding:1px 4px;line-height:1.3}
#devis-builder-view .dz .db-type.t-materiau{background:#ECFDF3;color:#067647}
#devis-builder-view .dz .db-type.t-main_oeuvre{background:#EFF4FF;color:#1849A9}
#devis-builder-view .dz .db-type.t-ouvrage{background:#F4F3FF;color:#5925DC}
#devis-builder-view .dz .db-head{background:#F1F4F9}
#devis-builder-view .dz .db-head.is-cat{background:#E9EEF6;border-top:1px solid #D5DDEA}
#devis-builder-view .dz .db-head .db-line-num{padding-top:13px;color:#0B1F3A;font-size:13px}
#devis-builder-view .dz .db-head .db-head-title{grid-column:2/6;height:44px!important;min-height:44px!important;font-weight:700!important;color:#0B1F3A!important;font-size:14px!important;text-transform:none}
#devis-builder-view .dz .db-head.is-cat .db-head-title{font-size:15px!important;text-transform:uppercase;letter-spacing:.01em}
#devis-builder-view .dz .db-head.is-sub .db-head-title{font-size:13.5px!important}
#devis-builder-view .dz .db-head-total{grid-column:6;display:flex;align-items:center;justify-content:flex-end;padding:0 10px;font-weight:800;color:#0B1F3A;font-variant-numeric:tabular-nums;font-size:13.5px}
#devis-builder-view .dz .db-note textarea{grid-column:2/7;min-height:44px;border:0!important;background:transparent!important;padding:10px!important;font-size:13px;font-style:italic;color:#475467;resize:vertical;box-shadow:none!important}
#devis-builder-view .dz .db-note textarea:focus{outline:2px solid #1D5BD8;outline-offset:-2px;background:#fff!important}
#devis-builder-view .dz .db-note .db-line-num{color:#98A2B3}
#devis-builder-view .dz .db-break{background:repeating-linear-gradient(90deg,#fff 0 8px,#F5F6F8 8px 16px)}
#devis-builder-view .dz .db-break-label{grid-column:2/7;display:flex;align-items:center;justify-content:center;height:34px;font-size:11.5px;font-weight:600;color:#667085;letter-spacing:.03em}
#devis-builder-view .dz .db-tools{display:flex;align-items:flex-start;justify-content:center;gap:2px;padding-top:8px}
#devis-builder-view .dz .db-head .db-tools,#devis-builder-view .dz .db-break .db-tools{padding-top:9px}
#devis-builder-view .dz .db-tool{width:24px;height:24px;padding:0!important;display:grid;place-items:center;border:1px solid transparent!important;border-radius:6px!important;background:transparent!important;color:#667085;cursor:pointer}
#devis-builder-view .dz .db-tool svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
#devis-builder-view .dz .db-tool:hover{background:#fff!important;border-color:#D0D5DD!important;color:#0B1F3A}
#devis-builder-view .dz .db-tool.del{color:#D92D20}
#devis-builder-view .dz .db-tool.del:hover{background:#FEF3F2!important;border-color:#FECDCA!important}
#devis-builder-view .dz .db-tool.del.confirm{background:#D92D20!important;color:#fff}
#devis-builder-view .dz .db-line .devis-builder-ai-descriptif{opacity:.55}
@media (hover:none){#devis-builder-view .dz .db-line .devis-builder-ai-descriptif{opacity:1}}
#devis-builder-view .db-addbar{display:flex;flex-wrap:wrap;align-items:center;gap:10px 18px;padding:14px 16px 14px 56px;border-bottom:1px solid #EDF0F4;background:#FCFCFD}
#devis-builder-view .db-addgroup{display:flex;align-items:center;flex-wrap:wrap;gap:6px}
#devis-builder-view .db-addgroup>span{font-size:12px;font-style:italic;color:#8A94A6;margin-right:2px}
#devis-builder-view .db-addgroup button{height:30px;padding:0 11px!important;font-size:12.5px!important;font-weight:600;color:#344054;background:#F2F4F7!important;border:1px solid #E4E7EC!important;border-radius:7px!important;cursor:pointer}
#devis-builder-view .db-addgroup button:hover{background:#fff!important;border-color:#98A2B3!important;color:#0B1F3A}
#devis-builder-view .db-draft{display:flex;align-items:center;gap:10px;margin-left:auto}
#devis-builder-view .db-draft small{font-size:11.5px;color:#067647}
#devis-builder-view .db-draft-clear{height:28px;padding:0 10px!important;font-size:12px!important;color:#667085;background:transparent!important;border:1px dashed #D0D5DD!important;border-radius:7px!important;cursor:pointer}
#devis-builder-view .db-draft-clear:hover{color:#B42318;border-color:#FDA29B!important}
@media (max-width:820px){#devis-builder-view .db-addbar{padding-left:12px}#devis-builder-view .db-draft{margin-left:0;width:100%}}
@media (max-width:820px){
#devis-builder-view .dz .db-line{grid-template-columns:1fr 1fr 1fr 86px!important}
#devis-builder-view .dz .db-line .db-line-num{display:flex;grid-column:1/4;flex-direction:row;justify-content:flex-start;padding:6px 10px 0;gap:6px}
#devis-builder-view .dz .db-line .db-tools{grid-column:4;grid-row:1;padding-top:2px}
#devis-builder-view .dz .db-head{grid-template-columns:44px 1fr 86px!important}
#devis-builder-view .dz .db-head .db-line-num{grid-column:1;padding:13px 0 0;justify-content:center}
#devis-builder-view .dz .db-head .db-head-title{grid-column:2}
#devis-builder-view .dz .db-head .db-tools{grid-column:3;grid-row:1}
#devis-builder-view .dz .db-head .db-head-total{grid-column:2/4;justify-content:flex-end;padding:0 10px 8px;font-size:12.5px}
#devis-builder-view .dz .db-note,#devis-builder-view .dz .db-break{grid-template-columns:1fr 86px!important}
#devis-builder-view .dz .db-note .db-line-num,#devis-builder-view .dz .db-break .db-line-num{display:none}
#devis-builder-view .dz .db-note textarea,#devis-builder-view .dz .db-break-label{grid-column:1}
#devis-builder-view .dz .db-note .db-tools,#devis-builder-view .dz .db-break .db-tools{grid-column:2;grid-row:1}
}
@media (max-width:820px){#devis-builder-view .dz .db-head.is-cat .db-head-title{font-size:13px!important;text-transform:none}#devis-builder-view .dz .db-head .db-head-title{font-size:13px!important}}
#devis-builder-view .dz-supp{display:flex;align-items:flex-start;gap:8px;margin-top:8px;padding:8px 10px;border:1px dashed #D0D5DD;border-radius:8px;cursor:pointer;max-width:360px}
#devis-builder-view .dz-supp input{width:16px;height:16px;margin-top:2px}
#devis-builder-view .dz-supp b{display:block;font-size:12.5px;color:#0B1F3A}#devis-builder-view .dz-supp small{font-size:11px;color:#667085}
#devis-builder-view.db-is-supp .dz-supp{border-style:solid;border-color:#F79009;background:#FFFAEB}
/* Relevé en double */
.bk-card.is-dup{border-color:#F04438!important;background:#FEF3F2!important}
.bk-dup-tag{font-style:normal;font-size:9.5px;font-weight:800;letter-spacing:.05em;color:#fff;background:#D92D20;border-radius:4px;padding:1px 5px;margin-left:6px}
.bk-dup-banner{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin:0 0 12px;padding:12px 14px;border:1px solid #FDA29B;background:#FEF3F2;border-radius:10px}
.bk-dup-banner>div:first-child{display:flex;flex-direction:column;gap:3px;min-width:0;flex:1}
.bk-dup-banner strong{color:#B42318;font-size:13.5px}.bk-dup-banner span{color:#912018;font-size:12.5px}
.bk-dup-actions{display:flex;gap:6px;flex-wrap:wrap}.bk-dup-actions button{height:32px;padding:0 12px;font-size:12.5px}
.bk-dup-actions .danger{background:#D92D20;color:#fff;border:1px solid #D92D20;border-radius:8px;cursor:pointer;font-weight:600}
.app-update-bar{position:fixed;left:50%;bottom:18px;transform:translateX(-50%);z-index:9999;display:flex;align-items:center;gap:12px;padding:10px 12px 10px 16px;background:#0B1F3A;color:#fff;border-radius:12px;box-shadow:0 10px 30px rgba(11,31,58,.3);font-size:13px;max-width:calc(100vw - 32px)}
.app-update-bar button{height:32px;padding:0 14px;border:0;border-radius:8px;background:#fff;color:#0B1F3A;font-weight:700;cursor:pointer;white-space:nowrap}
@media (max-width:820px){.app-update-bar{bottom:76px}}
/* Accueil façon SAP Fiori (Horizon) */
.lp-page{--lp-ink:#1D2D3E;--lp-mute:#556B82;--lp-line:#E5E9EE;--lp-blue:#0070F2;--lp-good:#188918;--lp-crit:#C35500;--lp-bad:#D20A0A;--lp-bg:#F5F6F7}
#home-view.lp-page{background:transparent}
.lp-hero{display:flex;justify-content:space-between;align-items:center;gap:16px;margin:0 0 26px;padding:4px 2px 0}
.lp-hero small{display:block;font-size:12.5px;font-weight:600;color:var(--lp-mute);margin-bottom:4px}
.lp-hero h2{margin:0;font-size:28px;line-height:1.15;color:var(--lp-ink);letter-spacing:-.02em;font-weight:800}
.lp-hero p{margin:6px 0 0;font-size:14px;color:var(--lp-mute)}
.lp-updated{display:inline-block;margin-left:10px;font-size:12px;color:#8396A8}
.lp-refresh{flex:none;width:40px;height:40px;border-radius:12px;border:1px solid var(--lp-line);background:#fff;color:var(--lp-blue);display:grid;place-items:center;cursor:pointer;box-shadow:0 0 2px rgba(34,54,73,.16),0 2px 4px rgba(34,54,73,.08)}
.lp-refresh svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.lp-refresh:hover{background:#F5FAFF}
.lp-groups{display:flex;flex-direction:column;gap:28px}
.lp-group h3{margin:0 0 12px;font-size:16px;font-weight:800;letter-spacing:-.01em;color:var(--lp-ink)}
.lp-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(196px,1fr));gap:16px}
.lp-tile{all:unset;box-sizing:border-box;display:grid;grid-template-columns:1fr auto;grid-template-rows:auto 1fr auto;min-height:176px;padding:16px;background:#fff;border-radius:16px;cursor:pointer;box-shadow:0 0 2px rgba(34,54,73,.16),0 2px 4px rgba(34,54,73,.08);transition:box-shadow .15s ease,transform .15s ease}
.lp-tile:hover{box-shadow:0 0 2px rgba(34,54,73,.16),0 8px 16px rgba(34,54,73,.12);transform:translateY(-1px)}
.lp-tile:focus-visible{outline:2px solid var(--lp-blue);outline-offset:2px}
.lp-tile-head{grid-column:1;display:flex;flex-direction:column;gap:3px;min-width:0}
.lp-title{font-size:14px;font-weight:700;color:var(--lp-ink);line-height:1.3}
.lp-subtitle{font-size:12.5px;color:var(--lp-mute);line-height:1.35}
.lp-ic{grid-column:2;grid-row:1;width:22px;height:22px;color:#8396A8}
.lp-ic svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.lp-kpi{grid-column:1/-1;grid-row:2;align-self:end;display:flex;align-items:baseline;gap:6px;margin-top:12px}
.lp-kpi b{font-size:40px;line-height:1;font-weight:300;letter-spacing:-.02em;font-variant-numeric:tabular-nums;color:var(--lp-ink)}
.lp-kpi small{font-size:13px;font-weight:700;color:var(--lp-mute)}
.lp-tile.is-warn .lp-kpi b{color:var(--lp-crit)}.lp-tile.is-bad .lp-kpi b{color:var(--lp-bad)}.lp-tile.is-ok .lp-kpi b{color:var(--lp-good)}.lp-tile.is-info .lp-kpi b{color:var(--lp-ink)}
.lp-foot{grid-column:1/-1;grid-row:3;display:flex;justify-content:space-between;align-items:center;gap:8px;margin-top:12px;min-height:18px}
.lp-amount{font-size:12.5px;font-weight:700;color:var(--lp-ink);font-variant-numeric:tabular-nums}
.lp-status{font-size:12px;font-weight:700;display:inline-flex;align-items:center;gap:5px;color:var(--lp-mute)}
.lp-status::before{content:'';width:7px;height:7px;border-radius:50%;background:currentColor}
.lp-tile.is-warn .lp-status{color:var(--lp-crit)}.lp-tile.is-bad .lp-status{color:var(--lp-bad)}.lp-tile.is-ok .lp-status{color:var(--lp-good)}
.lp-skeleton{height:176px;border-radius:16px;background:linear-gradient(90deg,#EEF1F4,#E5E9EE,#EEF1F4);background-size:200% 100%;animation:lp-sh 1.2s linear infinite}
@keyframes lp-sh{to{background-position:-200% 0}}
/* Tableau Documents */
.lp-table-card{background:#fff;border-radius:16px;overflow:hidden;box-shadow:0 0 2px rgba(34,54,73,.16),0 2px 4px rgba(34,54,73,.08)}
.lp-itb{display:flex;align-items:stretch;gap:4px;padding:0 12px;border-bottom:1px solid var(--lp-line)}
.lp-itb [role=tab]{all:unset;cursor:pointer;display:flex;flex-direction:column;align-items:flex-start;gap:2px;padding:14px 14px 12px;border-bottom:3px solid transparent;margin-bottom:-1px}
.lp-itb-count{font-size:22px;font-weight:300;color:var(--lp-ink);line-height:1;font-variant-numeric:tabular-nums}
.lp-itb-label{font-size:12.5px;font-weight:700;color:var(--lp-mute)}
.lp-itb [role=tab].is-on{border-bottom-color:var(--lp-blue)}
.lp-itb [role=tab].is-on .lp-itb-label,.lp-itb [role=tab].is-on .lp-itb-count{color:var(--lp-blue)}
.lp-itb [role=tab]:hover .lp-itb-label{color:var(--lp-ink)}
.lp-seeall{all:unset;cursor:pointer;margin-left:auto;align-self:center;display:inline-flex;align-items:center;gap:2px;font-size:13px;font-weight:700;color:var(--lp-blue);padding:8px 6px;border-radius:8px}
.lp-seeall svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.lp-seeall:hover{background:#F5FAFF}
.lp-table-sum{display:flex;flex-wrap:wrap;gap:6px 18px;padding:12px 26px;font-size:12.5px;color:var(--lp-mute)}
.lp-table-sum b{color:var(--lp-ink);font-variant-numeric:tabular-nums}.lp-table-sum .is-bad,.lp-table-sum .is-bad b{color:var(--lp-bad)}
.lp-table-wrap{overflow-x:auto}
.lp-table{width:100%;border-collapse:collapse;font-size:13.5px}
.lp-table th{text-align:left;font-size:12.5px;font-weight:700;color:var(--lp-mute);padding:10px 26px;border-bottom:1px solid var(--lp-line);border-top:1px solid var(--lp-line);background:#FBFCFD;white-space:nowrap}
.lp-table td{padding:12px 26px;border-bottom:1px solid #EFF2F5;vertical-align:middle}
.lp-table tbody tr{cursor:pointer;transition:background .1s}.lp-table tbody tr:hover{background:#F5FAFF}
.lp-table tbody tr:last-child td{border-bottom:0}
.lp-table .num{text-align:right;white-space:nowrap}
.lp-table td.num b{display:block;font-size:14px;color:var(--lp-ink);font-variant-numeric:tabular-nums}
.lp-table td.num small{display:block;font-size:11.5px;color:var(--lp-mute);margin-top:2px}
.lp-party{display:flex;align-items:center;gap:12px;min-width:0}
.lp-av{flex:none;width:36px;height:36px;border-radius:50%;display:grid;place-items:center;font-size:12.5px;font-weight:800;color:#0057BE;background:#E8F2FF}
.lp-party-txt{display:flex;flex-direction:column;gap:2px;min-width:0}
.lp-party-txt b{font-size:14px;color:var(--lp-ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.lp-party-txt small{font-size:12px;color:var(--lp-mute);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:520px}
.lp-st{white-space:nowrap}
.lp-os{display:inline-flex;align-items:center;gap:6px;font-size:13px;font-weight:700}
.lp-os svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.lp-os.is-ok{color:var(--lp-good)}.lp-os.is-bad{color:var(--lp-bad)}.lp-os.is-wait{color:var(--lp-crit)}
.lp-tag{font-style:normal;font-size:10.5px;font-weight:800;color:var(--lp-crit);background:#FFF3E6;border-radius:4px;padding:0 5px}
.lp-red{color:var(--lp-bad)!important;font-weight:700}
.lp-empty{padding:22px;text-align:center;color:var(--lp-mute);font-size:13px}
@media (max-width:820px){
.lp-hero h2{font-size:23px}.lp-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.lp-tile{min-height:150px;padding:13px;border-radius:14px}.lp-kpi b{font-size:32px}.lp-title{font-size:13px}.lp-subtitle{font-size:11.5px}.lp-ic{width:18px;height:18px}.lp-ic svg{width:18px;height:18px}
.lp-itb{padding:0 4px;overflow-x:auto}.lp-itb [role=tab]{padding:12px 10px 10px}.lp-itb-count{font-size:18px}.lp-itb-label{font-size:11.5px;white-space:nowrap}
.lp-seeall{font-size:12px}
.lp-table-sum{padding:10px 14px}
.lp-table thead{display:none}.lp-table,.lp-table tbody{display:block}
.lp-table tbody tr{display:grid;grid-template-columns:1fr auto;gap:6px 10px;padding:12px 14px;border-bottom:1px solid #EFF2F5}
.lp-table td{padding:0;border:0}
.lp-table td:first-child{grid-column:1/-1}
.lp-table td.num{grid-column:1;text-align:left}.lp-table td.lp-st{grid-column:2;align-self:center}
.lp-party-txt small{max-width:70vw}}
@media (max-width:820px){
.lp-foot{flex-wrap:wrap;row-gap:4px}
.lp-tile .lp-amount{flex-basis:100%}
.lp-seeall{white-space:nowrap;padding:8px 4px}
.lp-table td.lp-st{justify-self:end;text-align:right;max-width:46vw}
.lp-os{white-space:normal;font-size:12px;line-height:1.25;justify-content:flex-end}
.lp-os svg{flex:none;width:14px;height:14px}
.lp-table td.num small{white-space:normal}
}
@media (max-width:820px){#home-view .lp-table td{border:0!important;box-shadow:none!important}}
/* Accueil « My Home » : indicateurs, documents + à faire, accès rapide */
#home-view .lp-groups{gap:20px}
.lp-kpis{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:0;background:#fff;border-radius:16px;box-shadow:0 0 2px rgba(34,54,73,.16),0 2px 4px rgba(34,54,73,.08);overflow:hidden}
.lp-kpis-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lp-kpis-4{grid-template-columns:repeat(4,minmax(0,1fr))}
.lp-kpi-card{all:unset;box-sizing:border-box;cursor:pointer;display:flex;flex-direction:column;gap:8px;padding:18px 20px;border-left:1px solid var(--lp-line);position:relative;transition:background .12s}
.lp-kpi-card:first-child{border-left:0}
.lp-kpi-card:hover{background:#F7FAFE}
.lp-kpi-card:focus-visible{outline:2px solid var(--lp-blue);outline-offset:-2px}
.lp-kpi-card::after{content:'';position:absolute;left:20px;right:20px;bottom:0;height:3px;border-radius:3px 3px 0 0;background:transparent}
.lp-kpi-card.is-warn::after{background:var(--lp-crit)}.lp-kpi-card.is-bad::after{background:var(--lp-bad)}.lp-kpi-card.is-ok::after{background:var(--lp-good)}
.lp-kpi-label{display:flex;align-items:center;gap:8px;font-size:12.5px;font-weight:700;color:var(--lp-mute)}
.lp-kpi-ic{width:28px;height:28px;border-radius:8px;display:grid;place-items:center;background:#EEF4FB;color:#3A6EA5;flex:none}
.lp-kpi-card.is-warn .lp-kpi-ic{background:#FFF3E6;color:var(--lp-crit)}.lp-kpi-card.is-bad .lp-kpi-ic{background:#FFEBEB;color:var(--lp-bad)}.lp-kpi-card.is-ok .lp-kpi-ic{background:#EBF5EB;color:var(--lp-good)}
.lp-kpi-ic svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.lp-kpi-value{font-size:28px;font-weight:700;letter-spacing:-.02em;color:var(--lp-ink);font-variant-numeric:tabular-nums;line-height:1.1}
.lp-kpi-value small{font-size:15px;font-weight:600;color:var(--lp-mute);margin-left:4px}
.lp-kpi-card.is-bad .lp-kpi-value{color:var(--lp-bad)}
.lp-kpi-sub{font-size:12px;color:var(--lp-mute);line-height:1.35}
.lp-main{display:grid;grid-template-columns:minmax(0,2fr) minmax(300px,1fr);gap:20px;align-items:start}
.lp-main.is-single{grid-template-columns:minmax(0,1fr)}
.lp-main.is-single .lp-main-right{max-width:640px}
.lp-panel{margin:0}
.lp-todos{background:#fff;border-radius:16px;box-shadow:0 0 2px rgba(34,54,73,.16),0 2px 4px rgba(34,54,73,.08);overflow:hidden}
.lp-panel-head{display:flex;align-items:center;justify-content:space-between;padding:16px 18px;border-bottom:1px solid var(--lp-line)}
.lp-panel-head h3{margin:0;font-size:15px;font-weight:800;color:var(--lp-ink)}
.lp-badge{min-width:24px;height:24px;padding:0 8px;border-radius:12px;display:grid;place-items:center;font-size:12px;font-weight:800;color:#fff;background:var(--lp-crit)}
.lp-badge.is-ok{background:var(--lp-good)}
.lp-todo{all:unset;box-sizing:border-box;cursor:pointer;display:flex;align-items:center;gap:12px;width:100%;padding:12px 18px;border-bottom:1px solid #EFF2F5;transition:background .1s}
.lp-todo:hover{background:#F7FAFE}.lp-todo:focus-visible{outline:2px solid var(--lp-blue);outline-offset:-2px}
.lp-todo-count{flex:none;min-width:34px;height:34px;padding:0 6px;border-radius:10px;display:grid;place-items:center;font-size:15px;font-weight:800;font-variant-numeric:tabular-nums;color:var(--lp-crit);background:#FFF3E6}
.lp-todo.is-bad .lp-todo-count{color:var(--lp-bad);background:#FFEBEB}
.lp-todo-txt{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.lp-todo-txt b{font-size:13.5px;color:var(--lp-ink);font-weight:700}
.lp-todo-txt small{font-size:12px;color:var(--lp-mute);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.lp-chev{flex:none;width:18px;height:18px;fill:none;stroke:#8396A8;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.lp-done{display:flex;flex-wrap:wrap;gap:6px;padding:12px 18px}
.lp-done span{font-size:11.5px;font-weight:600;color:var(--lp-good);background:#EBF5EB;border-radius:999px;padding:3px 9px}
.lp-allgood{display:flex;flex-direction:column;align-items:center;gap:4px;padding:26px 18px;text-align:center}
.lp-allgood svg{width:34px;height:34px;padding:7px;border-radius:50%;background:#EBF5EB;fill:none;stroke:var(--lp-good);stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
.lp-allgood b{font-size:14px;color:var(--lp-ink)}.lp-allgood small{font-size:12px;color:var(--lp-mute)}
.lp-quick h3{margin:4px 0 10px;font-size:15px;font-weight:800;color:var(--lp-ink)}
.lp-quick-row{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:10px}
.lp-quick-btn{all:unset;box-sizing:border-box;cursor:pointer;display:flex;align-items:center;gap:10px;padding:12px 14px;background:#fff;border-radius:12px;font-size:13px;font-weight:700;color:var(--lp-ink);box-shadow:0 0 2px rgba(34,54,73,.16),0 1px 2px rgba(34,54,73,.06);transition:box-shadow .12s,color .12s}
.lp-quick-btn:hover{color:var(--lp-blue);box-shadow:0 0 2px rgba(34,54,73,.16),0 6px 14px rgba(34,54,73,.1)}
.lp-quick-btn span{width:30px;height:30px;border-radius:9px;display:grid;place-items:center;background:#EEF4FB;color:var(--lp-blue);flex:none}
.lp-quick-btn svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.lp-updated{display:block;margin:4px 0 0}
@media (max-width:1200px){.lp-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}.lp-kpi-card:nth-child(4){border-left:0}.lp-kpi-card:nth-child(n+4){border-top:1px solid var(--lp-line)}.lp-main{grid-template-columns:minmax(0,1fr)}}
@media (max-width:820px){.lp-kpis,.lp-kpis-3,.lp-kpis-4{grid-template-columns:repeat(2,minmax(0,1fr))}.lp-kpi-card{padding:14px;border-left:0;border-top:1px solid var(--lp-line)}.lp-kpi-card:nth-child(even){border-left:1px solid var(--lp-line)}.lp-kpi-card:nth-child(-n+2){border-top:0}.lp-kpi-card:last-child:nth-child(odd){grid-column:1/-1}.lp-kpi-value{font-size:22px}.lp-kpi-label{font-size:11.5px}.lp-kpi-ic{width:24px;height:24px}.lp-quick-row{grid-template-columns:repeat(2,minmax(0,1fr))}.lp-quick-btn{font-size:12px;padding:10px}}
.lp-main-right{display:flex;flex-direction:column;gap:20px}
.lp-activity{background:#fff;border-radius:16px;box-shadow:0 0 2px rgba(34,54,73,.16),0 2px 4px rgba(34,54,73,.08);overflow:hidden}
.lp-act{all:unset;box-sizing:border-box;cursor:pointer;display:flex;gap:10px;align-items:flex-start;width:100%;padding:10px 18px;border-bottom:1px solid #EFF2F5}
.lp-act:last-child{border-bottom:0}.lp-act:hover{background:#F7FAFE}
.lp-act-av{flex:none;width:28px;height:28px;border-radius:50%;display:grid;place-items:center;font-size:10.5px;font-weight:800;color:#0057BE;background:#E8F2FF;position:relative}
.lp-act-av::after{content:'';position:absolute;right:-1px;bottom:-1px;width:9px;height:9px;border-radius:50%;border:2px solid #fff;background:#8396A8}
.lp-act.k-ok .lp-act-av::after{background:var(--lp-good)}.lp-act.k-bad .lp-act-av::after{background:var(--lp-bad)}.lp-act.k-cash .lp-act-av::after,.lp-act.k-payslip .lp-act-av::after{background:var(--lp-crit)}.lp-act.k-work .lp-act-av::after,.lp-act.k-doc .lp-act-av::after{background:var(--lp-blue)}
.lp-act-txt{display:flex;flex-direction:column;gap:2px;min-width:0;font-size:12.5px;color:#32465A;line-height:1.4}
.lp-act-txt b{color:var(--lp-ink)}.lp-act-txt small{font-size:11px;color:#8396A8}
.lp-role{display:inline-block;margin-left:8px;font-size:11px;font-weight:800;letter-spacing:.03em;color:var(--lp-blue);background:#E8F2FF;border-radius:999px;padding:2px 9px;vertical-align:1px}
.lp-table th.num,.lp-table td.num{width:170px}
.lp-table th:last-child,.lp-table td.lp-st{width:170px}
.lp-main-left{display:flex;flex-direction:column;gap:20px}
.lp-main-left .lp-quick-row{grid-template-columns:repeat(3,minmax(0,1fr))}
@media (max-width:820px){.lp-main-left .lp-quick-row{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* ===== Accueil = SAP Fiori Launchpad (Horizon) : sections alignées sur une grille unique ===== */
#home-view.lp-page{--fl-text:#1D2D3E;--fl-text2:#556B82;--fl-line:#E5E5E5;--fl-blue:#0064D9;--fl-good:#256F3A;--fl-crit:#E76500;--fl-err:#AA0808;--fl-shadow:0 0 .125rem rgba(34,53,72,.15),0 .125rem .5rem rgba(34,53,72,.12);max-width:1180px;color:var(--fl-text)}
#home-view .lp-hero{margin:0 0 22px;padding:0;align-items:flex-end}
#home-view .lp-hero small#lp-date{display:none}
#home-view .lp-hero h2{margin:0;font-size:24px;font-weight:700;letter-spacing:-.01em;color:var(--fl-text)}
#home-view #lp-summary{margin:4px 0 0;font-size:13px;color:var(--fl-text2)}
#home-view .lp-refresh{width:36px;height:36px;border-radius:8px}
.fl-sec{margin:0 0 26px}
.fl-sec-title{margin:0 0 10px;font-size:16px;font-weight:700;color:var(--fl-text)}
.fl-sec-title span{font-weight:400;color:var(--fl-text2)}
.fl-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}
.fl-tile{all:unset;box-sizing:border-box;display:flex;flex-direction:column;height:156px;padding:14px 16px 12px;background:#fff;border-radius:16px;box-shadow:var(--fl-shadow);cursor:pointer;transition:box-shadow .15s}
.fl-tile:hover{box-shadow:0 0 .125rem rgba(34,53,72,.15),0 .5rem 1rem rgba(34,53,72,.15)}
.fl-tile:focus-visible{outline:2px solid var(--fl-blue);outline-offset:2px}
.fl-head{font-size:14px;font-weight:700;line-height:1.3;color:var(--fl-text);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.fl-sub{margin-top:2px;font-size:12px;color:var(--fl-text2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fl-num{margin-top:auto;display:flex;align-items:flex-end;gap:6px;color:var(--fl-text);min-width:0}
.fl-num svg{width:22px;height:22px;flex:none;fill:none;stroke:var(--fl-text2);stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;margin:0 auto 6px 0}
.fl-num b{font-size:30px;font-weight:400;line-height:1;letter-spacing:-.02em;white-space:nowrap}
.fl-num small{font-size:12px;font-weight:600;color:var(--fl-text2);margin-bottom:3px}
.fl-num.is-good b{color:var(--fl-good)}.fl-num.is-critical b{color:var(--fl-crit)}.fl-num.is-error b{color:var(--fl-err)}
.fl-num.is-app svg{width:30px;height:30px;stroke:var(--fl-blue);margin-bottom:0}
.fl-foot{margin-top:8px;font-size:12px;color:var(--fl-text2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fl-card{background:#fff;border-radius:16px;box-shadow:var(--fl-shadow);overflow:hidden}
.fl-tb{display:flex;align-items:center;gap:16px;padding:12px 16px;border-bottom:1px solid var(--fl-line)}
.fl-tb h4{margin:0;font-size:15px;font-weight:700;white-space:nowrap}.fl-tb h4 span{font-weight:400;color:var(--fl-text2)}
.fl-seg{display:inline-flex;margin-left:auto;border:1px solid #BCC3CA;border-radius:8px;overflow:hidden}
.fl-seg button{all:unset;cursor:pointer;padding:6px 14px;font-size:13px;color:var(--fl-blue);border-left:1px solid #BCC3CA;white-space:nowrap}
.fl-seg button:first-child{border-left:0}
.fl-seg button.is-on{background:#EBF8FF;color:#0040B0;font-weight:700;box-shadow:inset 0 -2px 0 var(--fl-blue)}
.fl-link{all:unset;cursor:pointer;font-size:13px;font-weight:600;color:var(--fl-blue)}
.fl-link:hover{text-decoration:underline}
.fl-info{display:flex;flex-wrap:wrap;gap:6px 24px;padding:8px 16px;background:#F5F6F7;border-bottom:1px solid var(--fl-line);font-size:12.5px;color:var(--fl-text2)}
.fl-info b{color:var(--fl-text)}.fl-info .is-error,.fl-info .is-error b{color:var(--fl-err)}
.fl-table{width:100%;border-collapse:collapse;font-size:13.5px;table-layout:auto}
.fl-table th{padding:10px 16px;text-align:left;font-size:12.5px;font-weight:600;color:var(--fl-text2);border-bottom:1px solid var(--fl-line);white-space:nowrap}
.fl-table td{padding:10px 16px;border-bottom:1px solid var(--fl-line);vertical-align:middle;color:var(--fl-text)}
.fl-table tr:last-child td{border-bottom:0}
.fl-table tbody tr{cursor:pointer}.fl-table tbody tr:hover{background:#F5F6F7}
.fl-table .num{text-align:right;white-space:nowrap}
.fl-table td small{display:block;font-size:12px;color:var(--fl-text2);margin-top:2px}
.fl-doc{color:var(--fl-blue);font-weight:600;white-space:nowrap}
.fl-party{font-weight:600}
.fl-pop{display:none!important}
.fl-st{white-space:nowrap;width:1%}
.fl-st .lp-os{font-size:13px}
.fl-list{display:flex;flex-direction:column}
.fl-li{all:unset;box-sizing:border-box;display:flex;align-items:center;gap:12px;padding:10px 16px;border-bottom:1px solid var(--fl-line);cursor:pointer;font-size:13.5px;color:var(--fl-text)}
.fl-li:last-child{border-bottom:0}.fl-li:hover{background:#F5F6F7}
.fl-av{flex:none;width:32px;height:32px;border-radius:50%;display:grid;place-items:center;font-size:12px;font-weight:700;background:#EBF8FF;color:#0040B0}
.fl-av.k-ok{background:#F5FAE5;color:var(--fl-good)}.fl-av.k-cash,.fl-av.k-payslip{background:#FFF3B8;color:#A45D00}
.fl-li-txt{flex:1;min-width:0}
.fl-li-time{flex:none;font-size:12px;color:var(--fl-text2);white-space:nowrap}
@media (max-width:1100px){.fl-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media (max-width:900px){.fl-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.fl-hide{display:none}.fl-pop{display:block!important}}
@media (max-width:620px){
 #home-view .lp-hero h2{font-size:20px}
 .fl-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 .fl-tile{height:128px;padding:12px 12px 10px;border-radius:14px}
 .fl-grid>.fl-tile:last-child:nth-child(odd){grid-column:1/-1}
 .fl-num b{font-size:24px}
 .fl-sec{margin-bottom:20px}
 .fl-tb{flex-wrap:wrap;gap:8px 12px;padding:12px}
 .fl-tb h4{flex:1}
 .fl-seg{order:3;margin-left:0;width:100%;display:flex}.fl-seg button{flex:1;text-align:center;padding:7px 4px;font-size:12.5px}
 .fl-info{padding:8px 12px;gap:4px 16px}
 .fl-table thead{display:none}
 .fl-table tr{display:grid;grid-template-columns:1fr auto;gap:2px 12px;padding:10px 12px;border-bottom:1px solid var(--fl-line)}
 .fl-table tr:last-child{border-bottom:0}
 #home-view .fl-table td{padding:0;border:0!important;background:none}
 .fl-table td:nth-child(1){grid-column:1;grid-row:2}.fl-table td:nth-child(1) small{display:none}
 .fl-table td:nth-child(2){grid-column:1;grid-row:1}
 .fl-table td.num{grid-column:2;grid-row:1}
 .fl-table td.fl-st{grid-column:2;grid-row:2;text-align:right;width:auto}
 .fl-table td:nth-child(2) .fl-pop{grid-column:1}
 .fl-li{padding:10px 12px;align-items:flex-start}
}
/* ===== Connexion façon SAP Fiori (Horizon) : fond clair, carte sobre, un seul bouton principal ===== */
#login-modal.modal{background:#F5F6F7 radial-gradient(1200px 600px at 50% -10%,#DCEBFF 0,#F5F6F7 60%) !important;backdrop-filter:none;padding:24px 16px !important;align-items:center !important;justify-items:center}
#login-modal .login-card{width:min(400px,100%) !important;margin:auto !important;padding:32px 32px 24px !important;background:#fff !important;border:0 !important;border-radius:16px !important;box-shadow:0 0 .125rem rgba(34,53,72,.15),0 .5rem 2rem rgba(34,53,72,.12) !important;color:#1D2D3E;font-family:Inter,"72","Segoe UI",sans-serif}
#login-form{gap:14px !important;margin:0 !important}
#login-form .login-brand{padding:0 0 4px !important;margin:0 !important;border:0 !important;gap:10px}
#login-form .login-brand img{width:32px;height:32px}
#login-form .login-brand strong{font-size:15px;color:#1D2D3E}
#login-form .login-brand small{font-size:12px;color:#556B82}
#login-form h1{margin:14px 0 0 !important;font-size:24px !important;font-weight:700 !important;letter-spacing:-.01em;color:#1D2D3E !important;line-height:1.2}
#login-form .login-subtitle{margin:-8px 0 4px !important;font-size:14px !important;color:#556B82 !important}
#login-form label{gap:6px !important;font-size:13px !important;font-weight:500 !important;color:#556B82 !important}
#login-form .input-icon{display:none !important}
#login-form input,#login-form select{height:40px !important;min-height:40px !important;padding:0 12px !important;background:#fff !important;border:1px solid #BCC3CA !important;border-bottom-color:#556B82 !important;border-radius:6px !important;box-shadow:none !important;color:#1D2D3E !important;font-size:14px !important}
#login-form .input-icon-wrap input{padding-left:12px !important}
#login-form input:hover,#login-form select:hover{border-color:#0064D9 !important}
#login-form input:focus,#login-form select:focus{outline:2px solid #0064D9 !important;outline-offset:1px;border-color:#0064D9 !important}
#login-form .lp-role-field{display:none !important}
.fl-roles{display:grid;grid-template-columns:repeat(4,1fr);border:1px solid #BCC3CA;border-radius:8px;overflow:hidden}
.fl-roles button{all:unset;cursor:pointer;text-align:center;padding:8px 2px;font-size:13px;color:#0064D9;border-left:1px solid #BCC3CA}
.fl-roles button:first-child{border-left:0}
.fl-roles button.is-on{background:#EBF8FF;color:#0040B0;font-weight:700;box-shadow:inset 0 -2px 0 #0064D9}
.fl-roles button:focus-visible{outline:2px solid #0064D9;outline-offset:-2px}
.fl-roles-label{font-size:13px;font-weight:500;color:#556B82;margin-bottom:-8px}
#login-form .login-submit{height:40px;margin-top:6px !important;padding:0 16px !important;border-radius:8px !important;background:#0070F2 !important;color:#fff !important;font-size:14px !important;font-weight:600 !important;box-shadow:none !important;transform:none !important;display:flex;align-items:center;justify-content:center;gap:8px}
#login-form .login-submit:hover{background:#0064D9 !important}
#login-form .login-submit svg{display:none}
#login-form .login-pill{all:unset;cursor:pointer;justify-self:center;font-size:14px;font-weight:500;color:#0064D9;padding:2px 4px}
#login-form .login-pill svg{display:none}
#login-form .login-pill:hover span{text-decoration:underline}
#login-form #forgot-password{margin-top:2px}
#login-form #show-registration::before{content:"Pas encore de compte ? ";color:#556B82;font-weight:400}
#login-form>small{font-size:12px !important;color:#556B82 !important;text-align:center;line-height:1.45}
#login-form .login-footer-note{justify-content:center;margin:4px 0 0 !important;padding-top:14px;border-top:1px solid #E5E5E5;font-size:12px !important;color:#556B82 !important}
#login-form .error{margin:0 !important;min-height:0;color:#AA0808}
#login-form .error:empty{display:none}
@media (max-width:620px){#login-modal .login-card{padding:24px 20px 18px !important;border-radius:14px !important}}
#login-modal #login-form .login-pill{border:0 !important;background:none !important;box-shadow:none !important;min-height:0 !important;height:auto !important;width:auto !important;padding:2px 4px !important;margin:0 auto !important;font-size:14px !important;font-weight:500 !important;color:#0064D9 !important;transform:none !important}
#login-modal #login-form .login-pill span{color:#0064D9 !important;font-weight:600 !important}
#login-modal #login-form .login-submit{border:0 !important}
#login-modal #login-form h1{font-size:24px !important;margin:14px 0 0 !important}
#login-modal #login-form .login-subtitle{font-size:14px !important;margin:-8px 0 4px !important}
#login-modal #login-form .login-brand img{width:32px !important;height:32px !important}
#login-modal #login-form .login-brand strong{font-size:15px !important}#login-modal #login-form .login-brand small{font-size:12px !important}
/* Connexion : harmonisée avec le logo argent et l'en-tête marine de l'application */
#login-modal.modal{background:#F2F3F5 radial-gradient(1100px 560px at 50% -10%,#DDE1E6 0,#F2F3F5 62%) !important}
#login-modal #login-form .login-submit{background:linear-gradient(180deg,#1C2838,#0F1824) !important;color:#fff !important}
#login-modal #login-form .login-submit:hover{background:#0B1320 !important}
#login-modal #login-form .login-pill,#login-modal #login-form .login-pill span{color:#2C3E57 !important}
#login-modal #login-form .login-pill:hover span{text-decoration:underline}
#login-modal .fl-roles{border-color:#C3C8CF}
#login-modal .fl-roles button{color:#3A4A5E;border-left-color:#C3C8CF}
#login-modal .fl-roles button.is-on{background:linear-gradient(180deg,#F7F8FA,#E6E9ED);color:#0F1824;box-shadow:inset 0 -2px 0 #0F1824}
#login-modal #login-form input:hover,#login-modal #login-form select:hover{border-color:#6E747D !important}
#login-modal #login-form input:focus,#login-modal #login-form select:focus{outline-color:#1C2838 !important;border-color:#1C2838 !important}
#factures-view .ft-note{display:block;color:#0064D9;font-size:11.5px;margin-top:1px}
#factures-view .ft-foot{padding:8px 14px 12px;border-top:1px solid #E4E8EE;font-size:11.5px;color:#556B82}
#factures-view .ft-acts{display:flex;flex-wrap:wrap;gap:8px;padding:10px 14px 14px;border-top:1px solid #E4E8EE}
#factures-view .ft-acts button{min-height:32px;padding:6px 12px;font-size:12.5px}
.mail-alert{margin:0 0 8px;padding:8px 12px;border-radius:8px;background:#FFEAF4;color:#AA0808;font-size:13px;font-weight:600}
.mail-quota{display:block;margin:0 0 8px;color:#556B82}.mail-quota.low{color:#AA0808}
#factures-view .ft-note.ft-bad{color:#AA0808;font-weight:600}
@media(min-width:641px){
 #factures-view .ft-pop{max-width:720px}
 #factures-view .ft-step{min-width:0;flex:1 1 0}
 #factures-view .ft-step>div{width:100%;min-width:0}
 #factures-view .ft-step b,#factures-view .ft-step small{overflow-wrap:anywhere;hyphens:auto}
}
#factures-view .facture-email-prompt input{min-width:220px}
/* Prévisions d'encaissement */
.fxf{background:#fff;border:1px solid #E4E8EE;border-radius:14px;padding:16px 18px;margin:0 0 16px}
.fxf-head h3{margin:0;font-size:16px;font-weight:700;color:#1D2D3E}.fxf-head small{display:block;color:#556B82;font-size:12.5px;margin-top:2px}
.fxf-kpis{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:0;margin:14px 0 4px;border:1px solid #E4E8EE;border-radius:12px;overflow:hidden}
.fxf-k{padding:12px 14px;border-left:1px solid #E4E8EE}.fxf-k:first-child{border-left:0}
.fxf-k small{display:block;font-size:12px;font-weight:600;color:#556B82}.fxf-k b{display:block;font-size:20px;font-weight:600;color:#1D2D3E;margin:2px 0;white-space:nowrap}.fxf-k span{font-size:12px;color:#556B82}
.fxf-k.is-bad b{color:#AA0808}.fxf-k.is-warn b{color:#C35500}
.fxf-list h4{margin:14px 0 6px;font-size:13px;color:#556B82;text-transform:uppercase;letter-spacing:.04em}
.fxf-row{display:grid;grid-template-columns:minmax(0,1.5fr) 118px minmax(0,1fr) minmax(0,1.5fr) 92px;gap:12px;align-items:center;padding:9px 0;border-top:1px solid #EEF1F4;font-size:13.5px;color:#1D2D3E}
.fxf-row small{display:block;color:#556B82;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fxf-amt{font-weight:700;white-space:nowrap;text-align:right}.fxf-late{color:#AA0808;font-weight:600}
.fxf-pill{display:inline-block;padding:1px 8px;border-radius:6px;font-size:12px;font-weight:700}.fxf-pill.ok{background:#F5FAE5;color:#256F3A}.fxf-pill.mid{background:#FFF3E6;color:#C35500}.fxf-pill.bad{background:#FFEAF4;color:#AA0808}
.fxf-nudge{min-height:30px;padding:4px 12px;font-size:12.5px}
.fxf-all summary{cursor:pointer;margin-top:12px;font-size:13px;font-weight:600;color:#0064D9}
@media (max-width:900px){.fxf-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.fxf-k{border-top:1px solid #E4E8EE}.fxf-k:nth-child(odd){border-left:0}.fxf-k:last-child{grid-column:1/-1}.fxf-row{grid-template-columns:1fr auto;gap:4px 10px}.fxf-when,.fxf-rel{grid-column:1/-1}}
.fxf-row .fxf-nudge{margin:0;justify-self:end}
.fxf-main{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* Carte PRO */
.pc-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px;margin-bottom:16px}
.pc-id{background:linear-gradient(160deg,#0F1B2D,#1C2E47);color:#fff;border-radius:18px;padding:20px;box-shadow:0 8px 24px rgba(15,27,45,.25)}
.pc-id-top{display:flex;align-items:center;gap:12px}.pc-id-top img,.pc-logo{width:46px;height:46px;border-radius:12px;background:#fff;object-fit:contain;display:grid;place-items:center;color:#0F1B2D;font-weight:800}
.pc-id-top b{display:block;font-size:18px}.pc-id-top small{color:#AFC0D3;letter-spacing:.08em;font-weight:700}
.pc-codes{display:grid;grid-template-columns:auto minmax(0,1fr);gap:12px;margin:18px 0 14px}
.pc-code{all:unset;cursor:pointer;background:#fff;border-radius:12px;padding:10px;display:flex;flex-direction:column;align-items:center;gap:6px;color:#1D2D3E}
.pc-code small{font-size:11.5px;color:#556B82;text-align:center;line-height:1.3}
.pc-qr svg{width:120px;height:120px;display:block}.pc-bar{width:100%}.pc-bar svg{width:100%;height:auto;display:block;max-height:110px}
.pc-warn{background:#ffffff14;border-radius:12px;padding:12px;font-size:13px;color:#FFD9A8}
.pc-actions{display:flex;flex-wrap:wrap;gap:8px}.pc-actions .secondary{margin:0;background:#ffffff14;border-color:#ffffff33;color:#fff;text-decoration:none;font-size:13px;padding:8px 12px}
.pc-panel{background:#fff;border:1px solid #E4E8EE;border-radius:14px;padding:16px 18px}
.pc-h h3{margin:0;font-size:15px;color:#1D2D3E}.pc-h small{display:block;color:#556B82;font-size:12.5px;margin:2px 0 10px}
.pc-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:10px}
.pc-card{all:unset;cursor:pointer;border:1px solid #E4E8EE;border-radius:12px;padding:12px;display:flex;flex-direction:column;gap:3px;color:#1D2D3E}
.pc-card:hover{border-color:#0064D9}.pc-card b{font-size:14px}.pc-card span{font-family:ui-monospace,monospace;font-size:13px;color:#556B82}.pc-card small{font-size:12px;color:#8396A8}.pc-card em{font-style:normal;color:#0064D9;font-weight:700;font-size:12.5px;margin-top:4px}
.pc-fields{display:flex;flex-direction:column}.pc-field{display:grid;grid-template-columns:20px 150px minmax(0,1fr);gap:8px;align-items:center;padding:7px 0;border-top:1px solid #EEF1F4;font-size:13px;color:#556B82}
.pc-field input{width:16px;height:16px;margin:0}.pc-field b{color:#1D2D3E;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pc-doc{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:8px 0;border-top:1px solid #EEF1F4;font-size:13px}.pc-doc small{display:block;color:#556B82}.pc-exp{color:#AA0808}
.pc-doc .secondary,.pc-crow .secondary{margin:0;min-height:30px;padding:4px 10px;font-size:12.5px}
.pc-docform{display:flex;flex-wrap:wrap;gap:8px;align-items:flex-end;margin-top:10px}.pc-docform select,.pc-docform input[type=date]{width:auto}.pc-docform label{font-size:12px}
.pc-docform .secondary{margin:0}
.pc-danger{margin-top:16px;padding-top:12px;border-top:1px solid #EEF1F4}.pc-danger .secondary{margin:0}.pc-danger small{display:block;color:#556B82;margin-top:4px}
.pc-crow{display:grid;grid-template-columns:1.1fr 1.3fr .9fr 1.2fr auto;gap:6px;margin-bottom:6px}
#pc-addcard,#pc-savecards{margin:6px 6px 0 0}
.pc-scan{position:fixed;inset:0;z-index:200;background:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;padding:24px}
.pc-scan-x{position:absolute;top:14px;right:14px;width:44px;height:44px;border-radius:50%;border:1px solid #BCC3CA;background:#fff;font-size:18px;cursor:pointer}
.pc-scan-t{font-size:20px;font-weight:700;color:#1D2D3E;text-align:center}.pc-scan-c{font-family:ui-monospace,monospace;font-size:18px;color:#1D2D3E}
.pc-scan-code{width:min(92vw,560px)}.pc-scan-code svg{width:100%;height:auto;display:block}.pc-scan small{color:#8396A8}
@media (max-width:900px){.pc-grid{grid-template-columns:1fr}.pc-crow{grid-template-columns:1fr 1fr}.pc-field{grid-template-columns:20px 120px minmax(0,1fr)}}
.pc-crow{grid-template-columns:minmax(0,1fr) minmax(0,1fr) 38px;padding:8px 0;border-bottom:1px solid #EEF1F4;margin:0}
.pc-crow [data-k="supplier"]{grid-column:1;grid-row:1}.pc-crow [data-k="number"]{grid-column:2;grid-row:1}.pc-crow [data-pc-rmrow]{grid-column:3;grid-row:1}
.pc-crow [data-k="format"]{grid-column:1;grid-row:2}.pc-crow [data-k="note"]{grid-column:2/4;grid-row:2}
.pc-crow input,.pc-crow select,.pc-docform select,.pc-docform input{height:38px;min-height:38px;padding:0 10px;font-size:13.5px}
.pc-docform{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);gap:8px}
.pc-docform label{display:flex;flex-direction:column;gap:4px}.pc-docform input[type=file]{grid-column:1/-1;padding:6px}
.pc-docform .secondary{grid-column:1/-1;justify-self:start}
.pc-actions .secondary{background:transparent!important;color:#fff!important;border:1px solid #ffffff55!important}
@media (max-width:620px){.pc-codes{grid-template-columns:1fr}.pc-qr svg{width:150px;height:150px}.pc-bar svg{max-height:120px}}
.pc-scan-code{display:flex;justify-content:center}.pc-scan-code svg[style]{max-width:none}
/* Boîte de réception des factures */
.pin{background:#fff;border:1px solid #E4E8EE;border-radius:14px;padding:16px 18px;margin:0 0 16px}
.pin-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;flex-wrap:wrap}
.pin-head h3{margin:0;font-size:16px;color:#1D2D3E}.pin-head small{display:block;color:#556B82;font-size:12.5px;margin-top:2px;max-width:560px}
.pin-count{display:inline-block;margin-left:8px;padding:1px 8px;border-radius:999px;background:#FFF3E6;color:#C35500;font-size:12px;font-weight:700;vertical-align:2px}
.pin-addr{display:flex;align-items:center;gap:8px;background:#F5F6F7;border-radius:10px;padding:6px 6px 6px 12px}.pin-addr code{font-size:13px;color:#0040B0;font-weight:600}
.pin-addr .secondary,.pin-acts .secondary,.pin-acts .primary,.pin-msg .secondary{margin:0;min-height:32px;padding:5px 12px;font-size:13px}
.pin-list{display:flex;flex-direction:column;gap:10px;margin-top:14px}
.pin-item{border:1px solid #E4E8EE;border-radius:12px;padding:12px 14px;display:grid;gap:10px;margin:0}
.pin-meta{display:flex;flex-wrap:wrap;align-items:center;gap:4px 12px}.pin-meta b{font-size:14px;color:#1D2D3E}.pin-meta small{color:#556B82;font-size:12px}
.pin-file{all:unset;cursor:pointer;margin-left:auto;font-size:12.5px;font-weight:600;color:#0064D9}
.pin-fields{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px}.pin-fields label{font-size:11.5px;gap:3px}
.pin-fields input,.pin-fields select{height:36px;min-height:36px;padding:0 8px;font-size:13px}
.pin-acts{display:flex;justify-content:flex-end;align-items:center;gap:8px}.pin-warn{margin-right:auto;color:#C35500;font-size:12px}
.pin-empty{margin-top:12px;color:#556B82;font-size:13px}
.pin-msgs{margin-top:12px}.pin-msgs summary{cursor:pointer;font-size:13px;color:#0064D9;font-weight:600}
.pin-msg{border-top:1px solid #EEF1F4;padding:8px 0}.pin-msg small{display:block;color:#556B82;font-size:12px}.pin-msg pre{white-space:pre-wrap;font:12.5px/1.45 inherit;background:#F5F6F7;border-radius:8px;padding:8px;max-height:180px;overflow:auto}
@media (max-width:900px){.pin-fields{grid-template-columns:1fr 1fr}.pin-file{margin-left:0}}
.pur-auto{display:inline-block;margin-left:4px;padding:0 6px;border-radius:6px;background:#EBF8FF;color:#0040B0;font-size:11px;font-weight:700}

/* Connexion — double vérification par code e-mail */
#login-form.is-2fa > label, #login-form.is-2fa > .fl-roles, #login-form.is-2fa > .fl-roles-label, #login-form.is-2fa > #login-company-preview, #login-form.is-2fa > #forgot-password, #login-form.is-2fa > #reset-request-panel, #login-form.is-2fa > #show-registration, #login-form.is-2fa > small, #login-form.is-2fa > #back-to-success, #login-form.is-2fa > .login-subtitle { display: none !important; }
.login-2fa { display: grid; gap: 12px; }
.login-2fa[hidden] { display: none; }
.login-2fa-icon { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: #e8f1fb; color: #0a6ed1; }
.login-2fa-icon svg { width: 22px; height: 22px; }
.login-2fa-text { margin: 0; color: #32363a; line-height: 1.45; }
.login-2fa-text small { color: #6a6d70; }
#login-2fa-code { font-size: 24px; letter-spacing: 10px; text-align: center; font-variant-numeric: tabular-nums; }
.login-2fa-back { justify-self: start; background: none; border: 0; color: #0a6ed1; padding: 0; font: inherit; cursor: pointer; }

/* Mon compte — carte plateforme (répartition des données par entreprise) */
.pf-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin: 6px 0 12px; }
.pf-kpis > div { border: 1px solid #e4e7ea; border-radius: 8px; padding: 10px 12px; background: #fff; }
.pf-kpis b { display: block; font-size: 20px; color: #1d2d3e; font-variant-numeric: tabular-nums; }
.pf-kpis small { color: #6a6d70; }
.pf-table { overflow-x: auto; margin-bottom: 10px; }
.pf-table table { width: 100%; border-collapse: collapse; font-size: 13px; }
.pf-table th, .pf-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid #eef0f2; white-space: nowrap; }
.pf-table td:not(:first-child), .pf-table th:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.pf-bad { color: #bb0000 !important; font-weight: 600; }
.pf-ok { color: #107e3e !important; }
#platform-check { min-width: 0; max-width: 100%; overflow: hidden; }
#platform-check > *, #platform-check-body > * { min-width: 0; max-width: 100%; }

.pf-h { margin: 14px 0 8px; font-size: 14px; color: #1d2d3e; }
.pf-store { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-bottom: 12px; }
.pf-st { border: 1px solid #e4e7ea; border-radius: 8px; padding: 10px 12px; display: grid; gap: 6px; }
.pf-st-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.pf-st small { color: #6a6d70; }
.pf-bar { height: 6px; border-radius: 3px; background: #eef0f2; overflow: hidden; }
.pf-bar i { display: block; height: 100%; background: #0a6ed1; }
.pf-bar i.hi { background: #e9730c; }

/* Dossiers devis — un dossier par chantier, rangés par mois */
.dd-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 0 0 16px; }
.dd-kpis > div { background: #fff; border: 1px solid #e4e7ea; border-radius: 10px; padding: 12px 14px; display: grid; gap: 4px; }
.dd-kpis small { color: #6a6d70; font-size: 12px; }
.dd-kpis b { font-size: 20px; color: #1d2d3e; font-variant-numeric: tabular-nums; }
.dd-warn { color: #b95000 !important; }
.dd-list { display: grid; gap: 14px; }
.dd-month { margin: 10px 2px 0; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: #6a6d70; font-weight: 700; border-bottom: 1px solid #e4e7ea; padding-bottom: 6px; }
.dd-folder { background: #fff; border: 1px solid #d9dee3; border-radius: 12px; overflow: hidden; }
.dd-folder.dd-new { box-shadow: 0 0 0 3px rgba(10,110,209,.35); animation: ddflash 2.4s ease-out; }
@keyframes ddflash { from { box-shadow: 0 0 0 6px rgba(10,110,209,.55); } to { box-shadow: 0 0 0 3px rgba(10,110,209,.35); } }
.dd-folder.dd-archived { opacity: .75; }
.dd-fhead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; padding: 12px 16px; background: #f7f8fa; border-bottom: 1px solid #e4e7ea; }
.dd-ftitle { display: grid; gap: 2px; min-width: 0; }
.dd-ftitle strong { font-size: 15px; color: #1d2d3e; }
.dd-ftitle small { color: #6a6d70; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 520px; }
.dd-ftotals { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; }
.dd-ftotals div { display: grid; text-align: right; }
.dd-ftotals dt { font-size: 11px; color: #6a6d70; }
.dd-ftotals dd { margin: 0; font-weight: 700; color: #1d2d3e; font-variant-numeric: tabular-nums; }
.dd-meter { position: relative; height: 4px; background: #eef0f2; }
.dd-meter i { position: absolute; left: 0; top: 0; bottom: 0; }
.dd-meter .dd-billed { background: #9cc3ea; }
.dd-meter .dd-paid { background: #107e3e; }
.dd-rows { list-style: none; margin: 0; padding: 0; }
.dd-row { display: grid; grid-template-columns: 22px 150px minmax(90px, 1fr) minmax(120px, 2fr) 110px 86px 104px 70px; align-items: center; gap: 10px; padding: 9px 16px; border-bottom: 1px solid #f0f2f4; font-size: 13px; }
.dd-row:last-child { border-bottom: 0; }
.dd-row:hover { background: #f9fafb; }
.dd-ic svg { width: 18px; height: 18px; fill: none; stroke: #6a6d70; stroke-width: 1.8; }
.dd-facture .dd-ic svg { stroke: #0a6ed1; }
.dd-num { font-weight: 600; color: #1d2d3e; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dd-num em { font-style: normal; font-weight: 500; font-size: 10px; color: #6a6d70; background: #eef0f2; border-radius: 4px; padding: 1px 5px; margin-left: 6px; }
.dd-cli, .dd-adr { color: #32363a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dd-adr { color: #6a6d70; }
.dd-amt { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dd-amt small { font-weight: 400; color: #6a6d70; margin-left: 3px; font-size: 10px; }
.dd-date { color: #6a6d70; font-variant-numeric: tabular-nums; }
.dd-chip { display: inline-block; text-align: center; border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 600; background: #eef0f2; color: #32363a; white-space: nowrap; }
.dd-chip.dd-ok { background: #e7f4ec; color: #107e3e; }
.dd-chip.dd-warn { background: #fef3e6; color: #b95000; }
.dd-chip.dd-bad { background: #fdecec; color: #bb0000; }
.dd-chip.dd-info { background: #e8f1fb; color: #0a6ed1; }
.dd-open { border: 1px solid #d9dee3; background: #fff; border-radius: 6px; padding: 4px 10px; font: inherit; font-size: 12px; cursor: pointer; color: #0a6ed1; }
.dd-open:hover { background: #e8f1fb; }
.dd-open-off { border: 0; background: none; color: #b0b5ba; text-align: center; cursor: default; }
.dd-ffoot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 16px; border-top: 1px solid #f0f2f4; background: #fcfcfd; }
.dd-create-label { color: #6a6d70; font-size: 12px; margin-right: 4px; }
.dd-ffoot button { border: 1px dashed #b7c3cf; background: #fff; color: #0a6ed1; border-radius: 6px; padding: 5px 10px; font: inherit; font-size: 12px; cursor: pointer; }
.dd-ffoot button:hover { border-style: solid; background: #e8f1fb; }
.dd-empty { background: #fff; border: 1px dashed #d9dee3; border-radius: 12px; padding: 28px; text-align: center; display: grid; gap: 6px; }
.dd-empty small { color: #6a6d70; }
@media (max-width: 900px) {
	.dd-row { grid-template-columns: 22px 1fr auto; grid-template-areas: "ic num amt" "ic cli chip" "ic date open"; row-gap: 4px; }
	.dd-ic { grid-area: ic; align-self: start; } .dd-num { grid-area: num; } .dd-amt { grid-area: amt; } .dd-cli { grid-area: cli; } .dd-chip { grid-area: chip; justify-self: end; } .dd-date { grid-area: date; } .dd-open { grid-area: open; justify-self: end; }
	.dd-adr { display: none; }
	.dd-ftotals { width: 100%; display: grid; grid-template-columns: repeat(2, 1fr); }
	.dd-ftotals div { text-align: left; }
}
.dd-chip { border: 0 !important; box-shadow: none !important; }
.dd-chip::before { content: none !important; }
/* ---------- Paramètres dans « Créer devis / facture » (onglets façon Tolteck) ---------- */
#devis-builder-view .db-kinds{max-width:100%;overflow-x:auto}
#devis-builder-view.db-settings-on>*:not(.section-head):not(.db-kinds):not(#db-settings-host){display:none!important}
.db-kind-sep{flex:none;align-self:center;width:1px;height:18px;margin:0 3px;background:#E2E6EC}
.db-settings-host[hidden]{display:none!important}
.db-settings-bar{display:flex;justify-content:flex-end;align-items:center;gap:10px;margin:0 0 12px}
.db-settings-bar .rg-actions{display:flex;align-items:center;gap:10px}
.ds-tabs button{display:inline-flex!important;align-items:center;gap:7px}
.ds-tab-ic{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:none}
.ds-two{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:18px;align-items:start}
.ds-sec{margin:0 0 16px}
.ds-sec>h4{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0 0 8px;font-size:13px;font-weight:700;color:#0B1F3A}
.ds-sr{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.ds-rows{grid-template-columns:1fr 1fr}
.ds-ro{min-height:38px;padding:9px 11px;border:1px solid #E7EBF1;border-radius:8px;background:#F6F7F9;font-size:13px;font-weight:500;color:#344054;white-space:pre-line;line-height:1.45}
.ds-autofill{display:flex!important;align-items:center;justify-content:center;gap:8px;width:100%;height:40px!important;margin:10px 0 0;border:0!important;border-radius:8px!important;background:#0B1F3A!important;color:#fff!important;font-weight:600;font-size:13.5px;cursor:pointer}
.ds-autofill:hover{background:#13305A!important}
.ds-autofill:disabled{opacity:.55;cursor:not-allowed}
.ds-autofill svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
.ds-autofill-msg{display:block;margin:8px 0 0}
.ds-info{margin:0 0 14px;padding:14px 16px;border:1px solid #E7EBF1;border-radius:10px;background:#fff}
.ds-info h4{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 4px;font-size:14px;font-weight:700;color:#0B1F3A}
.ds-info p{margin:6px 0 0;font-size:13px;line-height:1.55;color:#475467}
.ds-badge{flex:none;padding:3px 8px;border-radius:6px;background:#FEF3C7;color:#92400E;font-size:11px;font-weight:700}
.ds-footer-box{overflow:hidden;border:1px solid #E7EBF1;border-radius:10px;background:#fff}
.ds-footer-box header{display:flex;align-items:center;gap:8px;padding:9px 12px;border-bottom:1px solid #E7EBF1;background:#F6F7F9;font-size:12.5px;color:#344054}
.ds-footer-box header svg{width:15px;height:15px;fill:none;stroke:#5B6678;stroke-width:2}
.ds-footer-box p{margin:0;padding:14px;font-size:12px;line-height:1.6;text-align:center;color:#344054;white-space:pre-line}
.ds-field textarea{width:100%}
@media (max-width:760px){.ds-two,.ds-rows{grid-template-columns:1fr}.db-settings-bar{justify-content:stretch}.db-settings-bar .rg-actions{width:100%;justify-content:space-between}}
/* ---------- Compte société : À régulariser ---------- */
.bk-todo{margin:0 0 16px;padding:14px 16px;background:#fff;border:1px solid #E2E6EC;border-radius:10px}
.bk-todo[hidden]{display:none!important}
.bk-todo-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 10px}
.bk-todo-head h3{display:flex;align-items:center;gap:8px;margin:0;font-size:15px;font-weight:700;color:#0B1F3A}
.bk-todo-total{display:inline-flex;align-items:center;justify-content:center;min-width:22px;height:22px;padding:0 7px;border-radius:999px;background:#FEF3C7;color:#92400E;font-size:12px;font-weight:700}
.bk-todo-month select{height:34px;padding:0 10px;border:1px solid #E2E6EC;border-radius:8px;background:#fff;font-size:13px}
.bk-todo-ok{margin:0;padding:10px 12px;border-radius:8px;background:#ECFDF3;color:#067647;font-size:13px;font-weight:500}
.bk-todo-group{border-top:1px solid #EEF1F5}
.bk-todo-group>summary{display:flex;align-items:center;gap:10px;padding:10px 2px;list-style:none;cursor:pointer;font-size:13.5px;color:#344054}
.bk-todo-group>summary::-webkit-details-marker{display:none}
.bk-todo-group>summary b{flex:1;font-weight:600}
.bk-todo-count{display:inline-flex;align-items:center;justify-content:center;min-width:24px;height:22px;padding:0 7px;border-radius:6px;background:#F2F4F7;color:#344054;font-size:12px;font-weight:700}
.bk-todo-alert .bk-todo-count{background:#FEF3F2;color:#B42318}
.bk-todo-sum{font-weight:600;color:#5B6678;white-space:nowrap}
.bk-todo-hint{margin:0 0 8px;font-size:12.5px;color:#5B6678}
.bk-todo-group ul{margin:0 0 10px;padding:0;list-style:none}
.bk-todo-group li{display:grid;grid-template-columns:86px minmax(0,1fr) auto auto;align-items:center;gap:12px;padding:8px 2px;border-top:1px dashed #EEF1F5;font-size:13px}
.bk-todo-alert li{grid-template-columns:minmax(0,1fr) auto auto}
.bk-todo-date{color:#5B6678;white-space:nowrap}
.bk-todo-label{display:flex;flex-direction:column;min-width:0;color:#101828;overflow-wrap:anywhere}
.bk-todo-label small{color:#8A94A6;font-size:12px}
.bk-todo-amount{font-weight:600;white-space:nowrap;text-align:right}
.bk-todo-amount.neg{color:#B42318}
.bk-todo-amount.pos{color:#067647}
@media (max-width:640px){.bk-todo-group li,.bk-todo-alert li{grid-template-columns:1fr auto}.bk-todo-date{grid-column:1/3}.bk-todo-group li .link-button{grid-column:1/3;justify-self:start}}
/* ---------- Dépenses : HT / TVA ---------- */
.pur-tva{display:block;margin-top:2px;font-size:11.5px;font-weight:500;color:#5B6678;white-space:nowrap}
.pur-tva-missing{color:#B54708;font-weight:600}
.pur-tva-manual[hidden]{display:none!important}
.pur-tva-preview{display:block;margin:2px 0 6px;font-size:12.5px;color:#344054}
.pur-tva-preview:empty{display:none}
.pur-tva-preview.is-error{color:#B42318;font-weight:600}
.pur-tva-edit{grid-column:1/-1;display:flex;flex-wrap:wrap;align-items:flex-end;gap:10px;margin:8px 0 2px;padding:10px 12px;border:1px solid #E2E6EC;border-radius:8px;background:#F9FAFB}
.pur-tva-edit label{display:flex;flex-direction:column;gap:4px;font-size:12px;font-weight:600;color:#344054}
.pur-tva-edit .pur-tva-preview{flex-basis:100%;margin:0}
.pur-tva-actions{display:flex;gap:8px}

/* ---------- Rentabilité par chantier (HT) ---------- */
.rent-panel[hidden]{display:none!important}
.rent-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch;margin:0 -4px;padding:0 4px}
.rent-table{width:100%;min-width:760px;border-collapse:collapse;font-size:13px}
.rent-table th,.rent-table td{padding:9px 10px;border-bottom:1px solid #EEF1F5;text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}
.rent-table thead th{font-size:11.5px;font-weight:600;color:#5B6678;text-transform:uppercase;letter-spacing:.02em;background:#F9FAFB}
.rent-table th:first-child{text-align:left;white-space:normal;min-width:180px}
.rent-table tbody th{font-weight:600;color:#101828}
.rent-table tbody th span{display:block}
.rent-warn{display:block;margin-top:3px;font-size:11.5px;font-weight:500;color:#B54708}
.rent-margin{font-weight:700}
.rent-margin.pos{color:#067647}
.rent-margin.neg{color:#B42318}
.rent-total th,.rent-total td{border-top:2px solid #D0D5DD;border-bottom:0;font-weight:700;background:#F9FAFB}
.rent-hint{margin:10px 0 0;font-size:12px;color:#5B6678}

/* ---------- Gestion de chantiers (comme Vertuoza) ---------- */
#chantier-view>.ch-head,#chantier-view #chantiers-list-panel{display:none!important}
#gc-root{margin:0 0 18px}
.gc-head{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;margin:0 0 14px}
.gc-head h2{margin:0;font-size:24px;font-weight:700;color:#1F2A44}
.gc-head small{color:#667085;font-size:13px}
.gc-new-btn{white-space:nowrap}
.gc-chips{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 12px}
.gc-chips button{display:inline-flex;align-items:center;gap:8px;padding:6px 12px;border:1px solid #D6DCE5;border-radius:999px;background:#fff;color:#344054;font-size:13px;font-weight:500;cursor:pointer}
.gc-chips button b{display:inline-grid;place-items:center;min-width:22px;height:20px;padding:0 6px;border-radius:999px;background:#EEF2F7;color:#1F2A44;font-size:12px}
.gc-chips button.active{border-color:#1640D6;background:#1640D6;color:#fff}
.gc-chips button.active b{background:rgba(255,255,255,.22);color:#fff}
.gc-chips button.gc-chip-late:not(.active) b{background:#FDE2E1;color:#B42318}
.gc-toolbar{display:flex;flex-wrap:wrap;align-items:flex-end;gap:10px 12px;margin:0 0 12px;padding:12px 14px;border:1px solid #E2E6EC;border-radius:10px;background:#fff}
.gc-toolbar label{display:flex;flex-direction:column;gap:4px;font-size:11.5px;font-weight:600;color:#667085;text-transform:uppercase;letter-spacing:.02em}
.gc-toolbar select,.gc-toolbar input{min-height:36px;padding:6px 10px;border:1px solid #D6DCE5;border-radius:6px;background:#fff;color:#1F2A44;font-size:13.5px;text-transform:none;letter-spacing:0;font-weight:400}
.gc-search{flex:1 1 240px}
.gc-filter{flex:0 1 180px}
.gc-filter select{width:100%}
.gc-seg{display:inline-flex;border:1px solid #D6DCE5;border-radius:6px;overflow:hidden;flex:none}
.gc-seg button{padding:7px 12px;border:0;border-left:1px solid #D6DCE5;background:#fff;color:#344054;font-size:13px;cursor:pointer}
.gc-seg button:first-child{border-left:0}
.gc-seg button.active{background:#1640D6;color:#fff}
.gc-views{margin-left:auto}
.gc-g-nav{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px;padding:10px 14px;border:1px solid #E2E6EC;border-bottom:0;border-radius:10px 10px 0 0;background:#fff}
.gc-g-nav strong{font-size:15px;color:#1F2A44;text-transform:capitalize}
.gc-g-arrows{display:inline-flex;gap:6px}
.gc-g-arrows button{min-width:34px;height:32px;padding:0 10px;border:1px solid #D6DCE5;border-radius:6px;background:#fff;color:#1F2A44;font-size:13px;cursor:pointer}
.gc-g-arrows button:hover{background:#F5F8FF}
.gc-gantt-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;border:1px solid #E2E6EC;border-radius:0 0 10px 10px;background:#fff}
.gc-gantt{min-width:760px}
.gc-g-row{display:grid;grid-template-columns:260px 1fr;border-top:1px solid #EEF1F5;min-height:52px}
.gc-g-row.active{background:#F5F8FF}
.gc-g-row.active .gc-g-left{box-shadow:inset 3px 0 0 #1640D6}
.gc-g-head{border-top:0;min-height:38px;background:#EEF2FB}
.gc-g-head .gc-g-left{font-size:12px;font-weight:600;color:#1F2A44;cursor:default}
.gc-g-head .gc-g-track{display:flex}
.gc-g-head .gc-g-track span{display:flex;align-items:center;justify-content:center;border-left:1px solid #DDE3EE;font-size:12px;font-weight:600;color:#1F2A44;text-transform:capitalize}
.gc-g-head .gc-g-track span:first-child{border-left:0}
.gc-g-left{display:flex;flex-direction:column;justify-content:center;gap:2px;min-width:0;padding:8px 14px;border:0;border-right:1px solid #E2E6EC;background:none;text-align:left;cursor:pointer;font:inherit}
.gc-g-left strong{font-size:13.5px;color:#1F2A44;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.gc-g-left small{font-size:11.5px;color:#8A94A6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.gc-g-track{position:relative;min-width:0}
.gc-col{position:absolute;top:0;bottom:0;width:0;border-left:1px solid #EEF1F5}
.gc-today{position:absolute;top:0;bottom:0;width:0;border-left:2px solid #E5372B;z-index:2}
.gc-bar{position:absolute;top:12px;height:28px;padding:0;border:0;border-radius:5px;overflow:hidden;cursor:pointer;z-index:1;color:#fff;font-size:11.5px;font-weight:600;text-align:left}
.gc-bar b{position:absolute;left:0;top:0;bottom:0;background:rgba(0,0,0,.18)}
.gc-bar span{position:relative;z-index:1;display:block;padding:0 8px;line-height:28px;white-space:nowrap;text-shadow:0 1px 1px rgba(0,0,0,.2)}
.gc-over{position:absolute;top:0;bottom:0;right:0;background:repeating-linear-gradient(135deg,rgba(255,255,255,.35) 0 4px,transparent 4px 8px)}
.gc-bar.gc-prep,.gc-legend .gc-prep{background:#8A94A6}
.gc-bar.gc-run,.gc-legend .gc-run{background:#1640D6}
.gc-bar.gc-done,.gc-legend .gc-done{background:#1DB954}
.gc-bar.gc-stop,.gc-legend .gc-stop{background:#F59E0B}
.gc-bar.gc-late,.gc-legend .gc-late{background:#E5372B}
.gc-bar:hover{filter:brightness(1.08)}
.gc-unplanned{position:absolute;left:10px;top:13px;padding:4px 10px;border:1px dashed #B9CEFA;border-radius:5px;background:#F5F8FF;color:#1640D6;font-size:12px;cursor:pointer}
.gc-out{position:absolute;left:10px;top:17px;font-size:12px;color:#8A94A6}
.gc-legend{display:flex;flex-wrap:wrap;gap:8px 16px;margin:10px 2px 0;font-size:12px;color:#667085}
.gc-legend span{display:inline-flex;align-items:center;gap:6px}
.gc-legend i{display:inline-block;width:14px;height:10px;border-radius:3px}
.gc-legend .gc-leg-today{width:0;height:12px;border-left:2px solid #E5372B;border-radius:0}
.gc-empty{padding:18px;text-align:center;color:#8A94A6;font-size:13px}
.gc-empty-big{padding:34px;border:1px dashed #D6DCE5;border-radius:10px;background:#fff}
.gc-table-wrap{overflow-x:auto;border:1px solid #E2E6EC;border-radius:10px;background:#fff}
.gc-table{width:100%;min-width:900px;border-collapse:collapse;font-size:13px}
.gc-table th{padding:10px;background:#EEF2FB;color:#1F2A44;font-weight:600;text-align:left;white-space:nowrap;border-bottom:1px solid #DDE3EE}
.gc-table td{padding:10px;border-bottom:1px solid #EEF1F5;color:#475467;vertical-align:middle}
.gc-table td strong{display:block;color:#1F2A44}
.gc-table td small{display:block;color:#8A94A6;font-size:11.5px}
.gc-table tbody tr{cursor:pointer}
.gc-table tbody tr:hover,.gc-table tbody tr.active{background:#F5F8FF}
.gc-num{text-align:right!important;white-space:nowrap;font-variant-numeric:tabular-nums}
.gc-prog{display:inline-block;width:70px;height:6px;border-radius:999px;background:#EEF1F5;overflow:hidden;vertical-align:middle}
.gc-prog i{display:block;height:100%;background:#1640D6}
.gc-red{color:#B42318!important}
.gc-green{color:#067647!important}
.gc-badge{display:inline-block;padding:3px 9px;border-radius:999px;font-size:12px;font-weight:600;white-space:nowrap}
.gc-badge.gc-prep{background:#EEF2F7;color:#475467}
.gc-badge.gc-run{background:#DCE8FF;color:#1D3F8F}
.gc-badge.gc-done{background:#DCFAE6;color:#067647}
.gc-badge.gc-stop{background:#FEF0C7;color:#93370D}
.gc-badge.gc-late{background:#FDE2E1;color:#9B1C1C}
.gc-badge.gc-type{background:#F2F4F7;color:#344054}
.gc-new,.gc-infos{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 14px;margin:0 0 14px;padding:16px;border:1px solid #B9CEFA;border-radius:10px;background:#F5F8FF}
.gc-infos{background:#fff;border-color:#E2E6EC}
.gc-infos h4{grid-column:1/-1;margin:0;font-size:15px;color:#1F2A44}
.gc-new label,.gc-infos label{display:flex;flex-direction:column;gap:4px;font-size:12px;font-weight:600;color:#344054}
.gc-new input,.gc-new select,.gc-infos input,.gc-infos select{min-height:38px;padding:7px 10px;border:1px solid #D6DCE5;border-radius:6px;background:#fff;font-size:14px;color:#1F2A44}
.gc-infos input:disabled,.gc-infos select:disabled{background:#F9FAFB;color:#475467}
.gc-wide{grid-column:1/-1}
.gc-actions{display:flex;justify-content:flex-end;gap:8px}
.gc-note{margin:0;font-size:13px;color:#475467}
.gc-hint{margin:6px 0 0;padding:14px;border:1px dashed #D6DCE5;border-radius:10px;background:#fff;color:#667085;font-size:13px;text-align:center}
#gc-fiche{scroll-margin-top:80px}
.gc-fiche-head{display:flex;flex-wrap:wrap;align-items:flex-start;justify-content:space-between;gap:10px;padding:16px 18px;border:1px solid #E2E6EC;border-bottom:0;border-radius:10px 10px 0 0;background:#fff}
.gc-fiche-head small{font-size:11px;font-weight:700;letter-spacing:.06em;color:#1640D6}
.gc-fiche-head h3{margin:2px 0 4px;font-size:20px;color:#1F2A44}
.gc-fiche-head p{margin:0;font-size:13px;color:#667085}
.gc-fiche-badges{display:flex;flex-wrap:wrap;gap:6px}
.gc-kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));border:1px solid #E2E6EC;background:#fff}
.gc-kpis div{padding:10px 16px;border-left:1px solid #EEF1F5}
.gc-kpis div:first-child{border-left:0}
.gc-kpis small{display:block;font-size:11.5px;color:#8A94A6}
.gc-kpis b{display:block;margin-top:2px;font-size:14.5px;color:#1F2A44;font-variant-numeric:tabular-nums}
.gc-tabs{display:flex;gap:22px;margin:0 0 14px;padding:0 18px;border:1px solid #E2E6EC;border-top:0;border-radius:0 0 10px 10px;background:#fff;overflow-x:auto}
.gc-tabs button{padding:12px 2px;border:0;border-bottom:2px solid transparent;background:none;color:#475467;font-size:14px;font-weight:500;white-space:nowrap;cursor:pointer}
.gc-tabs button.active{border-bottom-color:#1640D6;color:#1640D6;font-weight:600}
#chantier-view[data-gc-pane] .chantier-layout{display:block}
#chantier-view[data-gc-pane] .chantier-layout-main{display:block}
#chantier-view[data-gc-pane] .chantier-layout .panel{margin-bottom:14px}
#chantier-view[data-gc-pane]:not([data-gc-pane="infos"]) #site-progress-panel,
#chantier-view[data-gc-pane]:not([data-gc-pane="planning"]) #schedule-panel,
#chantier-view[data-gc-pane]:not([data-gc-pane="rentabilite"]) #rc-panel,
#chantier-view[data-gc-pane]:not([data-gc-pane="budget"]) #budget-breakdown-panel,
#chantier-view[data-gc-pane]:not([data-gc-pane="controles"]) #controls,
#chantier-view[data-gc-pane]:not([data-gc-pane="controles"]) #rge-site-checklist-panel,
#chantier-view[data-gc-pane]:not([data-gc-pane="historique"]) #audit-history-panel{display:none!important}
@media (max-width:760px){.gc-head{flex-direction:column;align-items:stretch}.gc-filter{flex:1 1 140px}.gc-views{margin-left:0}.gc-g-row{grid-template-columns:150px 1fr}.gc-gantt{min-width:640px}.gc-new,.gc-infos{grid-template-columns:1fr}.gc-tabs{gap:16px;padding:0 12px}}
/* ---------- Planning chantier (comme Vertuoza) ---------- */
#planning-view>:not(#pw-root){display:none!important}
#pw-root{margin:0 0 18px}
.pw-head{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;margin:0 0 14px}
.pw-head h2{margin:0;font-size:24px;font-weight:700;color:#1F2A44}
.pw-head small{color:#667085;font-size:13px}
.pw-bar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px;padding:10px 14px;border:1px solid #E2E6EC;border-bottom:0;border-radius:10px 10px 0 0;background:#fff}
.pw-nav{display:flex;flex-wrap:wrap;align-items:center;gap:6px}
.pw-nav button{min-width:34px;height:32px;padding:0 10px;border:1px solid #D6DCE5;border-radius:6px;background:#fff;color:#1F2A44;font-size:13px;cursor:pointer}
.pw-nav strong{margin-left:8px;font-size:15px;color:#1F2A44}
.pw-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;border:1px solid #E2E6EC;border-radius:0 0 10px 10px;background:#fff}
.pw-grid{min-width:980px}
.pw-row{display:grid;grid-template-columns:220px repeat(7,minmax(0,1fr));border-top:1px solid #EEF1F5}
.pw-hrow{border-top:0;background:#EEF2FB}
.pw-left{display:flex;flex-direction:column;justify-content:center;gap:2px;min-width:0;padding:10px 14px;border-right:1px solid #E2E6EC;font-size:12px;font-weight:600;color:#1F2A44}
.pw-left strong{font-size:13.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pw-left small{font-size:11.5px;font-weight:400;color:#8A94A6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pw-person{flex-direction:row;align-items:center;justify-content:flex-start;gap:10px}
.pw-person span{display:flex;flex-direction:column;min-width:0}
.pw-person>i,.pw-chip i,.pw-check i{display:inline-grid;place-items:center;flex:none;width:26px;height:26px;border-radius:50%;color:#fff;font-size:10.5px;font-style:normal;font-weight:700}
.pw-hcell{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:8px 4px;border-left:1px solid #DDE3EE;font-size:12px;color:#1F2A44}
.pw-hcell small{color:#667085;font-size:11px}
.pw-hcell.pw-today{background:#DCE8FF}
.pw-cell{position:relative;display:flex;flex-direction:column;gap:5px;min-height:74px;padding:6px 6px 26px;border-left:1px solid #EEF1F5}
.pw-cell.pw-weekend{background:#FAFBFC}
.pw-cell.pw-today{background:#F5F8FF}
.pw-cell.pw-conflict{background:#FFF5F5}
.pw-meteo{font-size:11.5px;color:#475467;white-space:nowrap}
.pw-meteo small{color:#8A94A6}
.pw-chip{display:flex;align-items:center;gap:6px;width:100%;min-width:0;padding:4px 6px;border:1px solid #E2E6EC;border-left-width:3px;border-radius:6px;background:#fff;text-align:left;cursor:pointer}
.pw-chip:hover{background:#F5F8FF}
.pw-chip span{display:flex;flex-direction:column;min-width:0}
.pw-chip b{font-size:12px;font-weight:600;color:#1F2A44;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pw-chip small{font-size:10.5px;color:#667085;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pw-chip i{width:22px;height:22px;font-size:9.5px}
.pw-chip.pw-ouv{border-left-color:#1640D6}.pw-chip.pw-ind{border-left-color:#7C3AED}.pw-chip.pw-st{border-left-color:#F59E0B}
i.pw-ouv,.pw-legend i.pw-ouv,.pw-chip.pw-ouv i{background:#1640D6}
i.pw-ind,.pw-legend i.pw-ind,.pw-chip.pw-ind i{background:#7C3AED}
i.pw-st,.pw-legend i.pw-st,.pw-chip.pw-st i{background:#F59E0B}
.pw-plus{position:absolute;right:6px;bottom:4px;width:22px;height:20px;padding:0;border:1px dashed #B9CEFA;border-radius:5px;background:#fff;color:#1640D6;font-size:14px;line-height:1;cursor:pointer;opacity:.55}
.pw-cell:hover .pw-plus,.pw-plus:focus{opacity:1}
.pw-warn{color:#B42318;font-size:10.5px}
.pw-empty{padding:22px;text-align:center;color:#8A94A6;font-size:13px}
.pw-link{padding:0;border:0;background:none;color:#1640D6;font-size:12.5px;text-decoration:underline;cursor:pointer}
.pw-legend{display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px;margin:10px 2px 0;font-size:12px;color:#667085}
.pw-legend span{display:inline-flex;align-items:center;gap:6px}
.pw-legend i{display:inline-block;width:12px;height:12px;border-radius:50%}
.pw-modal{position:fixed;inset:0;z-index:1000;display:grid;place-items:center;padding:16px}
.pw-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.45)}
.pw-dialog{position:relative;display:flex;flex-direction:column;gap:12px;width:min(480px,100%);max-height:calc(100vh - 32px);overflow:auto;padding:18px 20px;border-radius:12px;background:#fff;box-shadow:0 20px 50px rgba(15,23,42,.25)}
.pw-dialog-wide{width:min(720px,100%)}
.pw-dialog header{display:flex;align-items:center;justify-content:space-between;gap:10px}
.pw-dialog h3{margin:0;font-size:18px;color:#1F2A44}
.pw-x{width:32px;height:32px;border:0;border-radius:6px;background:#F2F4F7;font-size:18px;cursor:pointer}
.pw-sub{margin:-6px 0 0;color:#667085;font-size:13px}
.pw-dialog label{display:flex;flex-direction:column;gap:4px;font-size:12px;font-weight:600;color:#344054}
.pw-dialog input,.pw-dialog select{min-height:38px;padding:7px 10px;border:1px solid #D6DCE5;border-radius:6px;background:#fff;font-size:14px;color:#1F2A44}
.pw-dialog fieldset{display:flex;flex-wrap:wrap;gap:8px;margin:0;padding:10px 12px;border:1px solid #E2E6EC;border-radius:8px}
.pw-dialog legend{padding:0 4px;font-size:12px;font-weight:700;color:#1F2A44}
.pw-dialog legend .pw-link{margin-left:8px;font-weight:500}
.pw-dialog .pw-check{flex-direction:row;align-items:center;gap:6px;padding:5px 9px;border:1px solid #E2E6EC;border-radius:6px;font-weight:500;cursor:pointer}
.pw-dialog .pw-check input{min-height:0;width:16px;height:16px;margin:0}
.pw-dialog .pw-check:has(input:checked){border-color:#1640D6;background:#F5F8FF}
.pw-ext{flex-direction:column}
.pw-ext-list{display:flex;flex-wrap:wrap;gap:6px}
.pw-tag{display:inline-flex;align-items:center;gap:6px;padding:3px 4px 3px 9px;border-radius:999px;background:#EEF2F7;font-size:12.5px}
.pw-tag button{width:20px;height:20px;border:0;border-radius:50%;background:#fff;cursor:pointer}
.pw-ext-add{display:flex;gap:8px}
.pw-ext-add input{flex:1}
.pw-times{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.pw-dialog footer{display:flex;align-items:center;gap:8px}
.pw-dialog footer span{flex:1}
.pw-danger{padding:8px 12px;border:1px solid #F9B4B1;border-radius:6px;background:#fff;color:#B42318;cursor:pointer}
@media (max-width:760px){.pw-head{flex-direction:column;align-items:stretch}.pw-row{grid-template-columns:140px repeat(7,minmax(110px,1fr))}.pw-grid{min-width:910px}.pw-times{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* ---------- Création d'un nouveau devis / facture (identique à Vertuoza) ---------- */
#devis-builder-view.vze-on>.section-head,#devis-builder-view.vze-on .dz-sheet{display:none!important}
#devis-builder-view.vze-on .dz{display:block!important;padding:0!important;border:0!important;background:none!important;box-shadow:none!important}
#devis-builder-view .vze-sheet{position:relative;border-radius:4px;background:#fff;box-shadow:0 6px 24px rgba(16,24,64,.10)}
.vze-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;padding:20px 24px}
.vze-titlebox{display:flex;align-items:center;gap:14px}
.vze-calc svg{display:block;width:30px;height:38px;fill:#1640D6}
.vze-head h2{margin:0;font-size:28px;font-weight:600;letter-spacing:-.01em;color:#1B1F3B}
.vze-head-actions{display:flex;flex-wrap:wrap;align-items:center;gap:10px}
.vze-sheet .vze-head{overflow:visible;position:relative;z-index:6}
.vze-draft{font-size:12px;color:#667085}
#devis-builder-view .vze .vze-new{height:40px;padding:0 14px;border:1px solid #D0D5DD;border-radius:8px;background:#fff;color:#1B1F3B;font-size:13.5px;font-weight:500;cursor:pointer}
#devis-builder-view .vze .vze-generate{width:auto!important;height:40px!important;min-height:0!important;margin:0!important;padding:0 18px!important;border:0!important;border-radius:8px!important;background:#1640D6!important;color:#fff!important;font-size:13.5px!important;font-weight:600!important;box-shadow:none!important}
.vze-actions{position:relative}
.vze-actions-btn{display:flex;align-items:center;gap:10px;height:44px;padding:0 14px;border:0;border-radius:10px;background:#fff;box-shadow:0 4px 18px rgba(16,24,64,.14);color:#1B1F3B;font-size:16px;font-weight:500;cursor:pointer}
.vze-actions-btn svg{width:22px;height:22px;fill:#1640D6;color:#1640D6}
.vze-actions-btn svg:last-child{width:18px;height:18px;fill:none}
.vze-actions-menu{position:absolute;right:0;top:calc(100% + 8px);z-index:30;display:flex;flex-direction:column;gap:10px;width:330px;padding:14px;border-radius:10px;background:#fff;box-shadow:0 10px 30px rgba(16,24,64,.18)}
.vze-actions-menu[hidden]{display:none}
.vze-action>button{width:100%;padding:13px 16px;border:1px solid #E1E6F2;border-radius:6px;background:#F7F9FD;color:#1B2A52;font-size:15px;text-align:left;cursor:pointer}
.vze-action>button:hover{border-color:#1640D6}
.vze-action-form{display:flex;gap:8px;margin-top:8px}
.vze-action-form[hidden]{display:none}
.vze-action-hint{font-size:11.5px;color:#667085}
.vze-pct{display:flex;align-items:center;flex:1;border:1px solid #D0D5DD;border-radius:6px;background:#fff;overflow:hidden}
#devis-builder-view .vze-pct input{flex:1;min-width:0;width:auto!important;height:36px!important;min-height:0!important;margin:0!important;padding:0 8px!important;border:0!important;border-radius:0!important;background:#fff!important;text-align:right;font-size:13.5px!important}
.vze-pct em{align-self:stretch;display:flex;align-items:center;padding:0 9px;background:#F2F4F7;color:#667085;font-style:normal;font-size:12px}
.vze-apply{height:38px;padding:0 14px;border:0;border-radius:6px;background:#1640D6;color:#fff;font-size:13px;font-weight:600;cursor:pointer}
.vze-info{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px 16px;padding:4px 24px 18px}
.vze-field{display:flex;flex-direction:column;gap:5px;min-width:0;font-size:12px;font-weight:600;color:#5B6380}
.vze-field>b{display:flex;align-items:center;height:38px;padding:0 10px;border-radius:6px;background:#F3F6FC;font-size:13.5px;font-weight:500;color:#1B1F3B}
.vze-wide{grid-column:span 2}
#devis-builder-view .vze-field input,#devis-builder-view .vze-field select{width:100%!important;height:38px!important;min-height:0!important;margin:0!important;padding:0 10px!important;border:1px solid transparent!important;border-radius:6px!important;background:#F3F6FC!important;font-size:13.5px!important;font-weight:500!important;color:#1B1F3B!important;box-shadow:none!important}
#devis-builder-view .vze-field input:focus,#devis-builder-view .vze-field select:focus{border-color:#1640D6!important;background:#fff!important;outline:0}
#devis-builder-view .vze-supp{flex-direction:row;align-items:center}
#devis-builder-view .vze-supp[hidden]{display:none!important}
.vze-bulk{display:flex;align-items:center;gap:10px;padding:8px 24px;background:#EEF3FC;font-size:13px;color:#1B2A52}
.vze-bulk[hidden]{display:none}
.vze-bulk button{height:30px;padding:0 10px;border:1px solid #C9D3EA;border-radius:6px;background:#fff;font-size:12.5px;cursor:pointer}
.vze-bulk [data-vze-bulk-del]{color:#B42318;border-color:#F3B6B1}
.vze-table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch}
.vze-table{width:100%;min-width:980px;border-collapse:collapse;font-size:13px;color:#1B1F3B}
.vze-table thead th{padding:22px 8px;background:#F7F9FD;color:#3A4160;font-size:14px;font-weight:500;text-align:left;white-space:nowrap;border-top:1px solid #EEF1F7}
.vze-th-cat{margin-right:22px}
.vze-table td{padding:14px 8px;vertical-align:middle;white-space:nowrap}
.vze-table .vze-chk{width:46px;padding-left:22px}
.vze-table th:nth-child(2){width:84px}.vze-table th:nth-child(4){width:100px}.vze-table th:nth-child(5){width:88px}.vze-table th:nth-child(6){width:118px}.vze-table th:nth-child(7){width:112px}.vze-table th:nth-child(8){width:58px}.vze-table th:nth-child(9){width:118px}
#devis-builder-view .vze-in.vze-r{min-width:84px}
.vze-chk input{width:20px;height:20px;margin:0;border-radius:3px;accent-color:#1640D6;cursor:pointer}
.vze-type-wrap{position:relative;display:inline-flex;align-items:center}
#devis-builder-view .vze-type{width:58px!important;height:32px!important;min-height:0!important;margin:0!important;padding:0 22px 0 12px!important;border:0!important;border-radius:4px!important;background:#EEF3FC!important;color:#1B1F3B!important;font-size:14px!important;font-weight:600!important;-webkit-appearance:none;appearance:none;cursor:pointer;box-shadow:none!important}
.vze-type-wrap svg{position:absolute;right:6px;width:14px;height:14px;pointer-events:none;color:#1B1F3B}
#devis-builder-view .vze-in{width:100%!important;height:34px!important;min-height:0!important;margin:0!important;padding:0 14px!important;border:1px solid transparent!important;border-radius:4px!important;background:transparent!important;font-size:13px!important;font-weight:500!important;color:#1B1F3B!important;box-shadow:none!important}
#devis-builder-view .vze-in.vze-fill{background:#EEF3FC!important}
#devis-builder-view textarea.vze-in{height:auto!important;padding:8px 14px!important;background:#EEF3FC!important;resize:vertical;white-space:normal}
#devis-builder-view .vze-in:focus{border-color:#1640D6!important;background:#fff!important;outline:0}
#devis-builder-view .vze-in.vze-r{padding:0 4px!important;text-align:left;font-size:14px!important}
.vze-unit select{width:76px!important;height:34px!important;min-height:0!important;margin:0!important;padding:0 4px!important;border:1px solid transparent!important;border-radius:4px!important;background:transparent!important;font-size:14px!important;color:#1B1F3B!important;box-shadow:none!important}
.vze-unit select:focus{border-color:#1640D6!important}
.vze-pu{display:flex;align-items:center;gap:3px}
.vze-pu i{font-style:normal;font-size:14px}
.vze-money{font-size:14px;font-weight:500;font-variant-numeric:tabular-nums}
.vze-tva{font-size:14px}
.vze-line td,.vze-n td,.vze-sp td{border-bottom:0}
.vze-row.vze-selected td{background:#F3F6FC}
/* T : bleu nuit · Ts : gris ardoise (comme Vertuoza) */
.vze-t td{background:#0C1550;color:#fff}
.vze-ts td{background:#646A82;color:#fff}
.vze-t .vze-money,.vze-ts .vze-money{color:#fff;font-weight:700}
#devis-builder-view .vze-t .vze-type,#devis-builder-view .vze-ts .vze-type{background:#fff!important}
#devis-builder-view .vze-t .vze-title,#devis-builder-view .vze-ts .vze-title{background:#fff!important;font-size:14px!important;color:#1B1F3B!important}
.vze-sp-label{color:#8A94A6;font-style:italic}
.vze-act{text-align:right;padding-right:18px!important}
.vze-ico{display:inline-grid;place-items:center;width:30px;height:30px;padding:0;border:0;border-radius:50%;background:none;cursor:pointer;vertical-align:middle}
.vze-ico svg{width:20px;height:20px;fill:#1640D6}
.vze-plus svg{width:24px;height:24px;fill:#1640D6}
.vze-t .vze-ico svg,.vze-ts .vze-ico svg{fill:#fff}
.vze-t .vze-plus svg circle,.vze-ts .vze-plus svg circle{fill:#fff}
.vze-t .vze-plus svg path,.vze-ts .vze-plus svg path{stroke:#0C1550}
.vze-ts .vze-plus svg path{stroke:#646A82}
.vze-del.confirm{background:#FDE2E1}
.vze-del.confirm svg{fill:#B42318}
.vze-menu-wrap{position:relative;display:inline-block}
.vze-row-menu{position:absolute;right:0;top:34px;z-index:40;display:flex;flex-direction:column;min-width:210px;padding:6px;border-radius:8px;background:#fff;box-shadow:0 10px 30px rgba(16,24,64,.2);text-align:left}
.vze-row-menu button{padding:8px 10px;border:0;border-radius:6px;background:none;color:#1B1F3B;font-size:13px;text-align:left;cursor:pointer;white-space:nowrap}
.vze-row-menu button:hover{background:#EEF3FC}
.vze-row-menu b{display:inline-block;min-width:24px;font-weight:700;color:#1640D6}
.vze-row-menu span{padding:8px 10px 2px;font-size:11px;font-weight:700;color:#8A94A6;text-transform:uppercase;letter-spacing:.04em}
.vze-empty{padding:28px!important;text-align:center!important;white-space:normal!important;color:#667085}
.vze-start{margin-top:12px;height:38px;padding:0 16px;border:0;border-radius:8px;background:#1640D6;color:#fff;font-weight:600;cursor:pointer}
#devis-builder-view .dz.dz-situation .vze-lines .vze-table-wrap,#devis-builder-view .dz.dz-situation .vze-bulk{display:none}
#devis-builder-view:not(.vze-devis) .vze-only-devis{display:none!important}
.vze-foot{display:flex;flex-wrap:wrap;align-items:flex-start;justify-content:space-between;gap:20px;padding:22px 24px 26px}
.vze-cond{display:flex;flex-direction:column;gap:10px;flex:1;min-width:260px}
.vze-cond>[hidden]{display:none!important}
.vze-status-line{font-size:12.5px;color:#667085}
.vze-status-line:empty{display:none}
.vze-totals{width:354px;max-width:100%;border-radius:6px;background:#fff;box-shadow:0 8px 28px rgba(16,24,64,.16);overflow:hidden}
.vze-totals dl{margin:0}
.vze-totals dl>div{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:16px 18px;border-bottom:1px solid #E6E9F0;font-size:14px;color:#3A4160}
.vze-totals dl>div:last-child{border-bottom:0}
.vze-totals dt{display:flex;align-items:center;gap:8px}
.vze-totals dd{margin:0;font-variant-numeric:tabular-nums;color:#1B1F3B}
.vze-totals .vze-b dt,.vze-totals .vze-b dd{font-weight:700;color:#1B1F3B}
.vze-totals .vze-ttc{background:#EEF3FC}
.vze-pct-sm{flex:none;width:76px}
#devis-builder-view .vze-pct-sm input{height:28px!important;font-size:12.5px!important}
#devis-builder-view .vze #devis-builder-progress-panel{margin:0 24px 16px;border:1px solid #E1E6F2;border-radius:6px;background:#fff;overflow:hidden}
#devis-builder-view .vze #devis-builder-progress-panel .sx-head{padding:12px 16px;background:#0C1550;color:#fff}
#devis-builder-view .vze #devis-builder-progress-panel .sx-head small,#devis-builder-view .vze #devis-builder-progress-panel .sx-head b{color:#fff}
#devis-builder-view .vze #devis-builder-progress-panel .sx-modes{display:flex;gap:6px;padding:10px 12px;background:#F7F9FD}
#devis-builder-view .vze #devis-builder-progress-panel .sx-modes button{height:32px;padding:0 12px;border:1px solid #D0D5DD;border-radius:6px;background:#fff;font-size:12.5px}
#devis-builder-view .vze #devis-builder-progress-panel .sx-modes button.active{border-color:#1640D6;background:#1640D6;color:#fff}
#devis-builder-view .vze #devis-builder-progress-panel .sx-pane{padding:12px 16px}
#devis-builder-view .vze #devis-builder-progress-panel .sx-th{background:#F7F9FD;color:#3A4160}
/* Onglets Devis · Facture · Paramètres */
#devis-builder-view.vze-on .db-kinds{display:flex;gap:0;margin:0 0 14px;padding:0 8px;border-radius:4px;background:#fff;box-shadow:0 4px 16px rgba(16,24,64,.08)}
#devis-builder-view.vze-on .db-kind{display:flex;align-items:center;gap:8px;padding:14px 18px;border:0;border-bottom:3px solid transparent;border-radius:0;background:none;color:#3A4160;box-shadow:none}
#devis-builder-view.vze-on .db-kind small{display:none}
#devis-builder-view.vze-on .db-kind b{font-size:14.5px;font-weight:600}
#devis-builder-view.vze-on .db-kind.active{border-bottom-color:#1640D6;color:#1640D6}
#devis-builder-view.vze-on .db-kind-sep{flex:1}
@media (max-width:900px){.vze-info{grid-template-columns:repeat(2,minmax(0,1fr))}.vze-head h2{font-size:22px}.vze-totals{width:100%}}
@media (max-width:560px){.vze-info{grid-template-columns:1fr}.vze-wide{grid-column:auto}.vze-head,.vze-info,.vze-foot{padding-left:14px;padding-right:14px}.vze-actions-menu{width:min(330px,calc(100vw - 32px))}}
/* ---------- Statistiques (identique à Vertuoza) ---------- */
#stats-view{padding-top:4px}
.st-card{border:1px solid #E1E6F2;border-radius:8px;background:#fff;box-shadow:0 1px 3px rgba(16,24,64,.06);overflow:hidden}
.st-tabs{display:flex;gap:2px;padding:6px 10px 0;border-bottom:1px solid #E1E6F2;background:#F7F8FB;overflow-x:auto}
.st-tabs button{padding:9px 16px;border:1px solid transparent;border-bottom:0;border-radius:6px 6px 0 0;background:transparent;color:#6B7186;font-size:13px;font-weight:500;white-space:nowrap;cursor:pointer}
.st-tabs button:hover{color:#1B1F3B}
.st-tabs button.is-on{margin-bottom:-1px;border-color:#E1E6F2;background:#fff;color:#1B1F3B;font-weight:600}
.st-band{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:14px 16px 0;padding:9px 16px;border-radius:4px;background:#0B3FD6;color:#fff}
.st-band h3{margin:0;font-size:17px;font-weight:600;color:#fff}
.st-band select{min-height:30px;padding:3px 8px;border:0;border-radius:4px;background:#fff;color:#1B1F3B;font-size:13px}
.st-filters{display:flex;flex-wrap:wrap;align-items:center;gap:10px 16px;padding:14px 16px 4px}
.st-period{display:flex;align-items:center;gap:6px}
.st-filters input[type=date],.st-filters select{min-height:34px;padding:5px 9px;border:1px solid #D0D5DD;border-radius:4px;background:#fff;font-size:13px;color:#1B1F3B}
.st-btn{min-height:34px;padding:0 14px;border:1px solid #D0D5DD;border-radius:4px;background:#F2F4F7;color:#1B1F3B;font-size:13px;cursor:pointer}
.st-btn:hover{background:#E6E9EF}
.st-quick{display:flex;gap:12px}
.st-link{padding:0;border:0;background:none;color:#0B3FD6;font-size:12.5px;cursor:pointer}
.st-link:hover{text-decoration:underline}
.st-filters-tags{padding:6px 16px 0}
.st-tags{display:flex;flex-wrap:wrap;align-items:center;gap:6px;max-width:640px;min-height:40px;padding:6px 8px;border:1px solid #D9DCE5;border-radius:4px;background:#fff}
.st-tag{display:inline-flex;align-items:center;gap:4px;padding:3px 4px 3px 8px;border:1px solid #D0D5DD;border-radius:3px;background:#F2F4F7;font-size:12.5px;color:#1B1F3B}
.st-tag button{width:18px;height:18px;border:0;border-radius:3px;background:transparent;color:#6B7186;font-size:14px;line-height:1;cursor:pointer}
.st-tag button:hover{background:#E1E4EA;color:#1B1F3B}
.st-tags select{min-height:28px;padding:2px 6px;border:1px dashed #C3C8D4;border-radius:3px;background:#fff;font-size:12.5px;color:#5B6178}
.st-legend{display:flex;flex-wrap:wrap;justify-content:center;gap:8px 22px;padding:14px 16px 0}
.st-legend label,.st-legend span{display:inline-flex;align-items:center;gap:6px;font-size:13px;color:#1B1F3B;cursor:pointer}
.st-legend input{width:16px;height:16px;margin:0;accent-color:#3E4FB4}
.st-legend i{display:inline-block;width:12px;height:12px;border-radius:2px}
.st-legend-static{justify-content:flex-start;padding-top:4px}
.st-chart{padding:8px 16px 4px}
.st-svg{display:block;width:100%;height:auto;max-height:340px}
.st-svg text{font-size:11px;fill:#6B7186;font-family:inherit}
.st-svg .st-grid{stroke:#E6E9EF;stroke-width:1}
.st-svg .st-zero{stroke:#B9BFCC}
.st-svg rect{transition:opacity .12s}
.st-svg rect:hover{opacity:.82}
.st-table-wrap{margin:8px 16px 16px;border:1px solid #E1E6F2;border-radius:4px;overflow-x:auto}
.st-table{width:100%;border-collapse:collapse;font-size:12.5px}
.st-table th,.st-table td{padding:9px 10px;border-bottom:1px solid #EEF0F4;white-space:nowrap;text-align:left;color:#1B1F3B}
.st-table thead th{background:#F7F8FB;font-weight:600;color:#4A5068}
.st-table tbody th{font-weight:500}
.st-table tbody th i{display:inline-block;width:10px;height:10px;margin-right:7px;border-radius:2px;vertical-align:-1px}
.st-table tbody tr:nth-child(even){background:#FAFBFC}
.st-table tbody tr:hover{background:#F2F5FF}
.st-table .num{text-align:right;font-variant-numeric:tabular-nums}
.st-table .st-tot{font-weight:600}
.st-table tfoot th,.st-table tfoot td{border-top:1.5px solid #D9DCE5;background:#F7F8FB;font-weight:700}
.st-empty{padding:28px 16px;text-align:center;color:#8A90A2;white-space:normal}
.st-reste{display:flex;flex-direction:column;gap:8px;padding:16px}
.st-rbar{display:grid;grid-template-columns:minmax(120px,220px) 1fr auto;align-items:center;gap:12px;font-size:13px}
.st-rname{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#1B1F3B}
.st-rtrack{display:block;height:16px;border-radius:3px;background:#DCE1F2;overflow:hidden}
.st-rtrack i{display:block;height:100%;background:#3E4FB4}
.st-rbar b{min-width:100px;text-align:right;font-variant-numeric:tabular-nums}
@media (max-width:640px){.st-band{flex-wrap:wrap}.st-band h3{font-size:15px}.st-period{flex-wrap:wrap}.st-rbar{grid-template-columns:1fr auto}.st-rtrack{grid-column:1/-1;grid-row:2}}

/* ---------- Ajouter des ressources (identique à Vertuoza) ---------- */
.pwr-dialog{position:relative;display:flex;flex-direction:column;width:min(1000px,100%);max-height:calc(100vh - 32px);border-radius:10px;background:#fff;box-shadow:0 24px 60px rgba(16,24,64,.28);overflow:hidden;font-family:inherit}
.pwr-top{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:20px 26px;background:#0B3FD6;color:#fff}
.pwr-top h3{margin:0;font-size:30px;font-weight:600;letter-spacing:-.01em;color:#fff}
.pwr-x{width:36px;height:36px;border:0;border-radius:8px;background:rgba(255,255,255,.16);color:#fff;font-size:22px;line-height:1;cursor:pointer}
.pwr-x:hover{background:rgba(255,255,255,.28)}
.pwr-body{display:flex;flex-direction:column;gap:22px;padding:22px 26px;overflow:auto}
.pwr-ctx{display:grid;grid-template-columns:minmax(220px,300px) 1fr;gap:16px;align-items:end;padding-bottom:18px;border-bottom:1px solid #E4E7EE}
.pwr-dialog label{display:flex;flex-direction:column;gap:5px;font-size:12px;font-weight:600;color:#5B6178}
.pwr-dialog select,.pwr-note input{min-height:38px;padding:7px 10px;border:1px solid #D0D5DD;border-radius:6px;background:#fff;font-size:14px;color:#1B1F3B}
.pwr-days{display:flex;flex-direction:column;gap:6px;font-size:12px;font-weight:600;color:#5B6178}
.pwr-days>div{display:flex;flex-wrap:wrap;gap:6px}
.pwr-dialog .pwr-day{flex-direction:row;align-items:center;gap:6px;padding:6px 10px;border:1px solid #D0D5DD;border-radius:6px;font-weight:500;color:#1B1F3B;cursor:pointer}
.pwr-day input{width:15px;height:15px;margin:0}
.pwr-day:has(input:checked){border-color:#0B3FD6;background:#EEF3FF;color:#0B3FD6}
.pwr-sec{display:grid;grid-template-columns:minmax(0,440px) minmax(0,1fr);gap:14px;align-items:start}
.pwr-sec h4{grid-column:1;margin:0 0 -4px;text-align:center;font-size:17px;font-weight:600;color:#4A5068}
.pwr-lists{grid-column:1;display:grid;grid-template-columns:1fr 24px 1fr;align-items:center;gap:4px}
.pwr-box{display:flex;flex-direction:column;gap:6px;min-height:142px;max-height:220px;overflow:auto;padding:7px;border:1.5px solid #D9DCE5;border-radius:12px;background:#fff}
.pwr-swap{text-align:center;font-size:16px;color:#5B6178}
.pwr-item{width:100%;min-height:36px;padding:7px 10px;border:0;border-radius:4px;background:#DCDDE1;color:#4A5068;font-size:14px;font-weight:500;text-align:center;cursor:pointer;transition:background .12s}
.pwr-item:hover{background:#CBCDD3}
.pwr-item.pwr-busy{background:#F8AAB1;color:#4A5068}
.pwr-item.pwr-busy:hover{background:#F39AA2}
.pwr-none{margin:auto;color:#A0A5B5}
.pwr-new{display:flex;gap:4px;margin-top:auto}
.pwr-new input{flex:1;min-width:0;min-height:32px;padding:5px 8px;border:1px dashed #C3C8D4;border-radius:4px;font-size:13px}
.pwr-new button{width:32px;border:0;border-radius:4px;background:#0B3FD6;color:#fff;font-size:18px;cursor:pointer}
.pwr-table{grid-column:2;grid-row:1/span 2;align-self:stretch;margin-top:0;border:1.5px solid #D9DCE5;border-radius:12px;overflow:hidden;background:#fff}
.pwr-table table{width:100%;height:100%;border-collapse:collapse;font-size:14px}
.pwr-table th{height:34px;padding:0 8px;border-bottom:1.5px solid #D9DCE5;font-size:13px;font-weight:500;color:#4A5068;text-align:center}
.pwr-table th:first-child{text-align:left;padding-left:12px}
.pwr-table th+th,.pwr-table td+td{border-left:1.5px solid #D9DCE5}
.pwr-table td{padding:6px 8px;text-align:center;vertical-align:middle}
.pwr-table td.pwr-name{text-align:left;padding-left:12px;font-weight:500;color:#4A5068;white-space:nowrap}
.pwr-table tbody tr{height:40px}
.pwr-table tbody tr.pwr-filler{height:auto}
.pwr-table tbody tr.pwr-filler td{height:auto;padding:0}
.pwr-table input::-webkit-calendar-picker-indicator{display:none}
.pwr-table input{width:62px;min-height:28px;padding:2px 4px;border:1px solid #D0D5DD;border-radius:4px;background:#fff;font-size:13px;color:#1B1F3B;text-align:center}
.pwr-table input.pwr-grey{border-color:transparent;background:#DCDDE1}
.pwr-hor{display:inline-flex;align-items:center;border:1px solid #D0D5DD;border-radius:5px;overflow:hidden}
.pwr-hor input{border:0;border-radius:0}
.pwr-hor i{display:grid;place-items:center;align-self:stretch;padding:0 8px;background:#DCDDE1;font-style:normal;color:#4A5068}
.pwr-note{max-width:620px}
.pwr-foot{display:flex;justify-content:flex-end;gap:10px;padding:16px 22px;border-top:1px solid #E4E7EE;background:#fff}
.pwr-cancel{min-height:36px;padding:0 18px;border:1px solid #DDE0E7;border-radius:4px;background:#EEF0F4;color:#4A5068;font-size:14px;cursor:pointer}
.pwr-submit{min-height:36px;padding:0 16px;border:0;border-radius:4px;background:#0B3FD6;color:#fff;font-size:14px;font-weight:600;cursor:pointer}
.pwr-submit:disabled{opacity:.6;cursor:wait}
@media (max-width:860px){.pwr-sec{grid-template-columns:1fr}.pwr-table{grid-column:1;grid-row:auto}.pwr-ctx{grid-template-columns:1fr}.pwr-top h3{font-size:22px}}
@media (max-width:520px){.pwr-body{padding:16px 14px}.pwr-lists{grid-template-columns:1fr}.pwr-swap{transform:rotate(90deg)}.pwr-table{overflow-x:auto}.pwr-table table{min-width:420px}}

/* ---------- Planning interventions (identique à Vertuoza) ---------- */
#iv-root{display:flex;flex-direction:column;gap:12px}
.iv-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.iv-head h2{display:flex;align-items:center;gap:10px;margin:0;font-size:28px;font-weight:700;color:#1B1F3B}
.iv-head h2 svg{width:30px;height:30px;fill:none;stroke:#0B3FD6;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
.iv-new{display:inline-flex;align-items:center;gap:8px;min-height:36px;padding:0 14px;border:0;border-radius:4px;background:#0B3FD6;color:#fff;font-size:14px;font-weight:600;cursor:pointer}
.iv-new b{display:grid;place-items:center;width:18px;height:18px;border-radius:3px;background:#fff;color:#0B3FD6;font-size:15px;line-height:1}
.iv-bar{display:flex;flex-wrap:wrap;align-items:center;gap:10px}
.iv-tags{display:flex;flex-wrap:wrap;align-items:center;gap:6px;flex:0 1 560px;min-height:38px;padding:5px 8px;border:1px solid #D9DCE5;border-radius:4px;background:#fff}
.iv-tags select{min-height:26px;padding:1px 6px;border:1px dashed #C3C8D4;border-radius:3px;background:#fff;font-size:12.5px;color:#5B6178}
.iv-load{min-height:36px;padding:0 14px;border:0;border-radius:4px;background:#0B3FD6;color:#fff;font-size:13.5px;font-weight:600;cursor:pointer}
.iv-cols{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.iv-col{position:relative;min-height:150px;border:1px solid #D9DCE5;border-radius:6px;background:#fff}
.iv-col h4{display:flex;align-items:center;justify-content:center;gap:6px;margin:0;padding:9px 12px;border-bottom:1px solid #E1E6F2;font-size:13px;font-weight:600;color:#1B1F3B}
.iv-col h4 i{display:grid;place-items:center;width:15px;height:15px;border-radius:50%;background:#3E4FB4;color:#fff;font-size:10px;font-style:normal;font-weight:700;cursor:help}
.iv-count{position:absolute;top:-8px;right:-8px;display:grid;place-items:center;min-width:20px;height:20px;padding:0 5px;border-radius:10px;background:#3E4FB4;color:#fff;font-size:11px}
.iv-col-soon .iv-count{background:#6E44C9}
.iv-col-late .iv-count{background:#E53935}
.iv-list{display:flex;flex-direction:column;gap:6px;max-height:190px;overflow:auto;padding:8px}
.iv-card{display:flex;align-items:center;gap:4px;min-height:30px;padding:3px 6px 3px 10px;border-radius:3px;background:#3E4FB4;color:#fff;font-size:12px;font-weight:600}
.iv-card span{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:center}
.iv-card-soon{background:#6E44C9}
.iv-card-late{background:#E53935}
.iv-card button{display:grid;place-items:center;width:24px;height:24px;border:0;border-radius:3px;background:transparent;color:#fff;cursor:pointer}
.iv-card button:hover{background:rgba(255,255,255,.2)}
.iv-card svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.iv-nav{display:flex;justify-content:flex-end;gap:6px}
.iv-nav button{min-width:32px;height:32px;padding:0 10px;border:1px solid #D0D5DD;border-radius:4px;background:#fff;color:#1B1F3B;font-size:15px;cursor:pointer}
.iv-nav button:first-child{font-size:13px}
.iv-cal-wrap{border:1px solid #D9DCE5;border-radius:6px;background:#fff;overflow-x:auto}
.iv-cal{display:grid;min-width:max-content;font-size:12px}
.iv-week{padding:8px;border-bottom:1px solid #E1E6F2;text-align:center;font-weight:600;color:#1B1F3B}
.iv-corner{border-bottom:1px solid #E1E6F2;border-right:1px solid #E1E6F2}
.iv-day{display:flex;justify-content:center;align-items:center;padding:7px 4px;border-bottom:1px solid #E1E6F2;border-left:1px solid #D9DCE5;font-weight:600;color:#1B1F3B}
.iv-day span.is-today{padding:2px 10px;border-radius:10px;background:#DCE6FF;color:#0B3FD6}
.iv-res-h{padding:7px 6px;border-bottom:1px solid #D9DCE5;border-left:1px solid #EEF0F4;text-align:center;font-weight:600;color:#1B1F3B;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.iv-hours{position:relative;border-right:1px solid #E1E6F2}
.iv-hours span{position:absolute;right:8px;transform:translateY(-1px);color:#6B7186;font-size:11px}
.iv-colcal{position:relative;border-left:1px solid #EEF0F4;background-image:linear-gradient(#EEF0F4 1px,transparent 1px);cursor:copy}
.iv-colcal.is-today{background-color:#FAFBFF}
.iv-blk{position:absolute;left:3px;right:3px;overflow:hidden;padding:3px 5px;border:0;border-radius:2px;font-size:11px;line-height:1.3;text-align:left;cursor:default}
.iv-blk small{display:block;font-size:10px;opacity:.85}
.iv-blk-ch{background:#C9CBD1;color:#fff;text-shadow:0 0 1px rgba(0,0,0,.15)}
.iv-blk-int{left:10px;z-index:2;background:#3E5BD6;color:#fff;box-shadow:0 1px 3px rgba(16,24,64,.25);cursor:pointer}
.iv-blk-int:hover{background:#2F4BC4}
.iv-blk-int.is-done{background:#2A9D8F}
.iv-dialog{width:min(760px,100%)}
.iv-fields{display:flex;flex-direction:column;gap:12px;margin:0;padding:0;border:0;min-width:0}
.iv-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.iv-grid-4{grid-template-columns:repeat(4,minmax(0,1fr))}
.iv-dialog input,.iv-dialog textarea{min-height:38px;padding:7px 10px;border:1px solid #D0D5DD;border-radius:6px;background:#fff;font-size:14px;color:#1B1F3B;font-family:inherit}
.iv-fields:disabled input,.iv-fields:disabled select,.iv-fields:disabled textarea{background:#F7F8FB;color:#1B1F3B}
.iv-res{display:flex;flex-direction:column;gap:6px;font-size:12px;font-weight:600;color:#5B6178}
.iv-res>div{display:flex;flex-wrap:wrap;gap:6px}
.iv-del{min-height:36px;padding:0 14px;border:1px solid #F3B4B4;border-radius:4px;background:#fff;color:#C62828;font-size:14px;cursor:pointer}
.iv-sp{flex:1}
@media (max-width:860px){.iv-cols{grid-template-columns:1fr}.iv-grid-4{grid-template-columns:repeat(2,minmax(0,1fr))}.iv-head h2{font-size:22px}}
@media (max-width:520px){.iv-grid{grid-template-columns:1fr}}

/* ---------- Gestion de chantiers : rendu identique à Vertuoza ---------- */
#chantier-view .gc-head{align-items:center;margin:0 0 0;padding:22px 26px;border:1px solid #E1E6F2;border-bottom:0;border-radius:10px 10px 0 0;background:#fff}
#chantier-view .gc-head h2{display:flex;align-items:center;gap:16px;font-size:36px;font-weight:700;letter-spacing:-.01em;color:#1B1F3B}
#chantier-view .gc-head h2 svg{flex:none;width:52px;height:52px;fill:#0B3FD6}
#chantier-view .gc-head small{display:block;margin-top:4px}
#chantier-view .gc-chips{margin:0;padding:12px 26px 0;border-left:1px solid #E1E6F2;border-right:1px solid #E1E6F2;background:#F3F7FD}
#chantier-view .gc-toolbar{align-items:center;margin:0;padding:16px 26px 20px;border:1px solid #E1E6F2;border-top:0;border-radius:0;background:#F3F7FD}
#chantier-view .gc-toolbar label>span{display:none}
#chantier-view .gc-toolbar select,#chantier-view .gc-toolbar input{min-height:46px;padding:8px 14px;border:1px solid #DDE3EE;border-radius:4px;font-size:16px;color:#1B1F3B}
#chantier-view .gc-filter{flex:0 1 250px}
#chantier-view .gc-search{flex:1 1 200px}
.gc-filtrer{min-height:46px;padding:0 24px;border:0;border-radius:4px;background:#0B3FD6;color:#fff;font-size:17px;font-weight:600;cursor:pointer}
.gc-filtrer:hover{background:#0935B8}
#chantier-view .gc-toolbar .gc-views{margin-left:auto}
#chantier-view .gc-g-nav{border-radius:0;border-top:0}
#chantier-view .gc-gantt-wrap{border-radius:0 0 10px 10px}
#chantier-view .gc-g-row{grid-template-columns:240px 1fr;min-height:90px;border-top:1px solid #D9DCE5}
#chantier-view .gc-g-head{min-height:88px;background:#fff;border-top:1px solid #D9DCE5}
#chantier-view .gc-g-head .gc-g-track span{border-left:1px solid #D9DCE5;font-size:16px;font-weight:400;color:#1B1F3B}
#chantier-view .gc-g-left{padding:10px 18px;border-right:1px solid #D9DCE5}
#chantier-view .gc-g-left strong{font-size:16px;font-weight:500;line-height:1.45;color:#1B1F3B;white-space:normal}
#chantier-view .gc-g-left small{font-size:12px}
#chantier-view .gc-col{background:#EEF0F4}
#chantier-view .gc-bar{top:50%;height:44px;margin-top:-22px;border:1.5px solid #2F4BC4;border-radius:5px;background:#fff!important;color:#4A5068;font-size:14.5px;font-weight:400}
#chantier-view .gc-bar b{background:#EEF3FF}
#chantier-view .gc-bar span{display:flex;align-items:center;gap:8px;height:100%;padding:0 14px;line-height:normal;text-shadow:none;overflow:hidden}
#chantier-view .gc-bar span em{flex:none;margin-left:auto;font-style:normal;font-size:12px;font-weight:600;color:#2F4BC4}
#chantier-view .gc-bar span i{min-width:0;overflow:hidden;text-overflow:ellipsis;font-style:normal}
#chantier-view .gc-bar.gc-late{border-color:#E5372B}#chantier-view .gc-bar.gc-late em{color:#E5372B}
#chantier-view .gc-bar.gc-done{border-color:#1DB954}#chantier-view .gc-bar.gc-done em{color:#13893D}
#chantier-view .gc-bar.gc-prep{border-color:#8A94A6}#chantier-view .gc-bar.gc-prep em{color:#5B6178}
#chantier-view .gc-bar.gc-stop{border-color:#F59E0B}#chantier-view .gc-bar.gc-stop em{color:#B45309}
#chantier-view .gc-over{background:repeating-linear-gradient(135deg,rgba(229,55,43,.16) 0 4px,transparent 4px 8px)}
#chantier-view .gc-bar:hover{filter:none;box-shadow:0 2px 8px rgba(16,24,64,.15)}
#chantier-view .gc-legend .gc-prep,#chantier-view .gc-legend .gc-run,#chantier-view .gc-legend .gc-done,#chantier-view .gc-legend .gc-stop,#chantier-view .gc-legend .gc-late{background:#fff;border:2px solid}
#chantier-view .gc-legend .gc-prep{border-color:#8A94A6}#chantier-view .gc-legend .gc-run{border-color:#2F4BC4}#chantier-view .gc-legend .gc-done{border-color:#1DB954}#chantier-view .gc-legend .gc-stop{border-color:#F59E0B}#chantier-view .gc-legend .gc-late{border-color:#E5372B}
@media (max-width:720px){#chantier-view .gc-head{padding:16px}#chantier-view .gc-head h2{font-size:24px}#chantier-view .gc-head h2 svg{width:36px;height:36px}#chantier-view .gc-toolbar{padding:12px 16px}#chantier-view .gc-g-row{grid-template-columns:150px 1fr;min-height:70px}#chantier-view .gc-g-left strong{font-size:14px}#chantier-view .gc-bar{height:36px;margin-top:-18px;font-size:12.5px}}

/* ---------- Encodage devis / facture : compléments Vertuoza ---------- */
#devis-builder-view .vze-table td.vze-grip,#devis-builder-view .vze-table th.vze-grip{width:22px;padding:0 2px;text-align:center;color:#9AA1B5;font-size:17px;cursor:grab;user-select:none}
#devis-builder-view .vze-t td.vze-grip,#devis-builder-view .vze-ts td.vze-grip{color:rgba(255,255,255,.75)}
#devis-builder-view .vze-row.vze-dragging{opacity:.45}
#devis-builder-view .vze-row.vze-drop-before td{box-shadow:inset 0 3px 0 #0B3FD6}
#devis-builder-view .vze-row.vze-drop-after td{box-shadow:inset 0 -3px 0 #0B3FD6}
.vze-desc-box{display:flex;align-items:center;gap:6px;min-width:0}
#devis-builder-view .vze-table td.vze-desc{min-width:470px;width:46%}
.vze-cat{flex:0 0 132px;min-width:0;height:32px;padding:0 6px;border:1px solid #D9DCE5;border-radius:4px;background:#fff;font-size:12px;color:#1B1F3B}
.vze-cat.is-empty{color:#9AA1B5}
.vze-desc-in{position:relative;display:flex;flex:1;min-width:0}
.vze-desc-in .vze-in{flex:1;min-width:0;padding-right:24px}
.vze-desc-in textarea.vze-in{min-height:64px;resize:vertical;line-height:1.35}
.vze-x{position:absolute;right:4px;top:50%;width:18px;height:18px;margin-top:-9px;padding:0;border:0;border-radius:3px;background:transparent;color:#8A90A2;font-size:15px;line-height:1;cursor:pointer}
.vze-x:hover{background:#EEF0F4;color:#1B1F3B}
.vze-mini{flex:none;display:grid;place-items:center;width:24px;height:24px;padding:0;border:0;border-radius:4px;background:transparent;color:#9AA1B5;cursor:pointer}
.vze-mini svg{width:16px;height:16px}
.vze-mini:hover,.vze-mini.is-on{background:#EEF3FF;color:#0B3FD6}
.vze-unit-box{position:relative;display:flex}
.vze-unit-box select{flex:1;min-width:0;padding-right:22px}
.vze-unit-box .vze-x{right:18px}
.vze-pu.is-cat{border-radius:4px;background:#E6E8EE}
.vze-pu.is-cat input{background:transparent}
#devis-builder-view .vze-money del{display:block;font-size:10.5px;font-weight:400;color:#8A90A2}
#devis-builder-retention:disabled+*,#devis-builder-retention:disabled{cursor:not-allowed}
.vze-rg-auto{display:block;margin-top:4px;font-size:12px;font-weight:600;color:#0B3FD6}
@media (max-width:900px){.vze-cat{flex-basis:96px}}

/* ---------- Tableau de bord (comme Vertuoza) ---------- */
#vz-dash[hidden]{display:none!important}
#vz-dash{margin:0 0 18px}
/* Ancien tableau de bord masqué : seul le tableau de bord Vertuoza (et « Marge globale ») reste affiché. Le code reste en place. */
#dashboard-view>:not(#vz-dash):not(#rentabilite-panel){display:none!important}
.vz-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:0 0 16px}
.vz-card{border:1px solid #E2E6EC;border-radius:10px;background:#fff;overflow:hidden}
.vz-card header{display:flex;align-items:center;gap:10px;padding:12px 16px;border-bottom:1px solid #E2E6EC;font-size:17px;font-weight:600;color:#1F2A44}
.vz-card header svg,.vz-icon svg,.vz-head-btn svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.vz-card-body{padding:14px 16px 16px}
.vz-pill{display:inline-block;padding:2px 9px;border-radius:999px;font-size:13px;font-weight:500}
.vz-pill.blue{background:#DCE8FF;color:#1D3F8F;border:1px solid #B9CEFA}
.vz-pill.red{background:#FDE2E1;color:#9B1C1C;border:1px solid #F9B4B1}
.vz-count{color:#8A94A6;font-size:13px}
.vz-card-body strong{display:block;margin:6px 0 12px;font-size:30px;font-weight:600;color:#1F2A44;font-variant-numeric:tabular-nums}
.vz-line{display:flex;justify-content:space-between;gap:12px;padding:3px 0;font-size:13.5px;color:#344054}
.vz-line span:last-child{font-variant-numeric:tabular-nums}
.vz-prefs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px 28px;margin:0 0 18px;padding:16px 18px;border:1px solid #E2E6EC;border-radius:10px;background:#fff}
.vz-pref{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:13.5px;color:#1F2A44;font-weight:500}
.vz-switch{display:inline-flex;border:1px solid #D6DCE5;border-radius:3px;overflow:hidden;flex:none}
.vz-switch button{min-width:36px;padding:4px 8px;border:0;background:#fff;color:#8A94A6;font-size:12px;cursor:pointer}
.vz-switch button.on{background:#1640D6;color:#fff}
.vz-switch button.off{background:#EEF2F7;color:#5B6678}
.vz-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.vz-block{border:1px solid #1640D6;border-radius:8px;background:#fff;overflow:hidden;min-width:0}
.vz-block>header{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:11px 14px;background:#1640D6;color:#fff;font-size:16px;font-weight:600}
.vz-head-btn{display:inline-flex;align-items:center;gap:6px;padding:5px 10px;border:1px solid rgba(255,255,255,.5);border-radius:6px;background:rgba(255,255,255,.12);color:#fff;font-size:12.5px;font-weight:500;cursor:pointer}
.vz-head-btn:disabled{opacity:.5;cursor:default}
.vz-block-body{padding:10px 10px 12px}
.vz-tabs{display:flex;gap:18px;margin:0 4px 8px;border-bottom:1px solid #E2E6EC}
.vz-tabs button{padding:8px 2px;border:0;border-bottom:2px solid transparent;background:none;color:#344054;font-size:14px;font-weight:500;cursor:pointer}
.vz-tabs button.active{border-bottom-color:#1640D6;color:#1640D6}
.vz-table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch}
.vz-table{width:100%;min-width:560px;border-collapse:collapse;font-size:12.5px}
.vz-table th{padding:9px 8px;background:#EEF2FB;color:#1F2A44;font-weight:600;text-align:left;border-bottom:1px solid #DDE3EE;white-space:nowrap}
.vz-table td{padding:9px 8px;border-bottom:1px solid #EEF1F5;color:#5B6678;vertical-align:top}
.vz-table td.vz-wrap{white-space:normal;min-width:140px}
.vz-table td.vz-num{text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}
.vz-table tr.is-late td:first-child{color:#B42318;font-weight:600}
.vz-empty{text-align:center;color:#8A94A6;padding:14px!important}
.vz-act{white-space:nowrap;text-align:right}
.vz-icon{display:inline-grid;place-items:center;width:28px;height:28px;border:0;border-radius:6px;background:none;color:#1640D6;cursor:pointer}
.vz-icon:hover{background:#EEF2FB}
.vz-icon:disabled{color:#98A2B3;cursor:default;background:none}
.vz-status{white-space:nowrap;text-align:center}
.vz-status small{display:block;font-size:10.5px;color:#8A94A6;margin-top:2px}
.vz-badge{display:inline-block;padding:4px 10px;border-radius:3px;font-size:12px;font-weight:600;color:#fff}
.vz-badge.ok{background:#1DB954}
.vz-badge.bad{background:#E5372B}
.vz-tag{display:inline-block;padding:0 5px;border-radius:3px;background:#EEF2FB;color:#1640D6;font-size:10.5px}
.vz-pager{display:flex;justify-content:flex-end;gap:0;margin-top:10px}
.vz-pager button,.vz-pager span{min-width:30px;padding:6px 9px;border:1px solid #DDE3EE;margin-left:-1px;background:#fff;color:#5B6678;font-size:12.5px;cursor:pointer}
.vz-pager span{cursor:default}
.vz-pager button.active{background:#EEF2F7;color:#1F2A44;font-weight:600}
.vz-pager button:disabled{color:#C0C7D2;cursor:default}
.vz-pager>:first-child{border-radius:5px 0 0 5px}.vz-pager>:last-child{border-radius:0 5px 5px 0}
.vz-notes{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:8px}
.vz-note{display:flex;align-items:center;gap:8px;padding:10px 12px;border:1px solid #E2E6EC;border-radius:6px}
.vz-note.unread{border-color:#1640D6}
.vz-note-main{flex:1;min-width:0;padding:0;border:0;background:none;text-align:left;cursor:pointer}
.vz-note-text{display:block;font-size:13.5px;color:#1F2A44}
.vz-note.unread .vz-note-text::before{content:"";display:inline-block;width:6px;height:6px;margin:0 8px 2px 0;border-radius:50%;background:#1640D6}
.vz-note-main small{display:block;margin-top:3px;font-size:11.5px;color:#8A94A6}
.vz-task-form{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px 12px;margin:0 4px 12px;padding:12px;border:1px solid #B9CEFA;border-radius:8px;background:#F5F8FF}
.vz-task-form[hidden]{display:none!important}
.vz-task-form label{display:flex;flex-direction:column;gap:4px;font-size:12px;font-weight:600;color:#344054}
.vz-task-form .vz-wide{grid-column:1/-1}
.vz-form-actions{grid-column:1/-1;display:flex;gap:8px}
@media (max-width:1100px){.vz-grid{grid-template-columns:1fr}.vz-prefs{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:640px){.vz-cards{grid-template-columns:1fr}.vz-prefs{grid-template-columns:1fr}.vz-task-form{grid-template-columns:1fr}.vz-card-body strong{font-size:24px}}
/* ---------- Rentabilité du chantier (vue détaillée) ---------- */
.rc-panel[hidden]{display:none!important}
.rc-panel .section-head small#rc-subtitle{display:block;margin-top:2px;color:#5B6678;font-size:12.5px;font-weight:500;letter-spacing:0;text-transform:none}
.rc-warn{margin:0 0 14px;padding:9px 12px;border-radius:8px;background:#FFFAEB;color:#B54708;font-size:12.5px;font-weight:500}
.rc-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:0 0 16px}
.rc-kpi{padding:14px 16px;border:1px solid #E2E6EC;border-radius:12px;background:#fff;text-align:center}
.rc-kpi small{display:block;font-size:12px;color:#5B6678;font-weight:500}
.rc-kpi strong{display:block;margin-top:4px;font-size:21px;font-weight:700;color:#4F46E5;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.rc-kpi.blue strong{color:#0B5BD3}.rc-kpi.red strong{color:#D92D20}.rc-kpi.green strong{color:#079455}
.rc-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:0 0 16px}
.rc-card{border:1px solid #E2E6EC;border-radius:12px;background:#fff;overflow:hidden;box-shadow:0 1px 2px rgba(16,24,40,.04)}
.rc-card h4{margin:0;padding:10px 14px;font-size:15px;font-weight:700;text-align:center;color:#fff;background:linear-gradient(180deg,#1D5FE0,#1747B8)}
.rc-card-navy h4{background:linear-gradient(180deg,#0F1F45,#0B1733)}
.rc-card dl{margin:0;padding:0}
.rc-card dl>div{display:flex;justify-content:space-between;gap:12px;padding:9px 14px;border-top:1px solid #EEF1F5;font-size:13px}
.rc-card dt{color:#667085}
.rc-card dd{margin:0;font-weight:700;color:#101828;font-variant-numeric:tabular-nums;white-space:nowrap}
.rc-card .rc-total dt{color:#101828;font-weight:700}
.rc-card .rc-total{background:#F9FAFB}
.rc-card .pos,.rc-table .pos{color:#079455}.rc-card .neg,.rc-table .neg{color:#D92D20}
.rc-meter{height:8px;margin:10px 14px 4px;border-radius:999px;background:#EEF1F5;overflow:hidden}
.rc-meter>div{height:100%;border-radius:999px;background:#2BB596}
.rc-meter>div.over{background:#E0675A}
.rc-meter-label{display:block;padding:0 14px 10px;font-size:11.5px;color:#5B6678}
.rc-box .rc-meter,.rc-box .rc-meter-label{margin-left:0;margin-right:0;padding-left:0;padding-right:0}
.rc-duo{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:0 0 16px}
.rc-box{margin:0 0 16px;padding:14px 16px;border:1px solid #E2E6EC;border-radius:12px;background:#fff}
.rc-duo .rc-box{margin:0}
.rc-box h4{margin:0;font-size:15px;font-weight:700;color:#101828}
.rc-box h4 small{font-weight:500;color:#667085;font-size:12px}
.rc-box-head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin:0 0 12px}
.rc-box-head>small{color:#667085;font-size:12px}
.rc-donut-wrap{display:flex;align-items:center;gap:18px;flex-wrap:wrap}
.rc-donut{width:150px;height:150px;flex:0 0 auto}
.rc-donut-big{font-size:17px;font-weight:700;fill:#101828}
.rc-donut-small{font-size:9.5px;fill:#667085}
.rc-legend{flex:1 1 180px;margin:0;padding:0;list-style:none;font-size:13px}
.rc-legend li{display:grid;grid-template-columns:10px minmax(0,1fr) auto;align-items:center;gap:8px;padding:5px 0}
.rc-legend b{font-variant-numeric:tabular-nums;white-space:nowrap}
.rc-dot{width:10px;height:10px;border-radius:50%}
.rc-noplan{flex:1;padding:14px;border:1px dashed #D0D5DD;border-radius:10px;text-align:center;font-size:13px;color:#5B6678}
.rc-noplan p{margin:0 0 10px}
.rc-time strong{display:block;margin:8px 0 2px;font-size:26px;font-weight:700;color:#101828}
.rc-time>small{color:#667085;font-size:12px}
.rc-workers{margin:10px 0 0;padding:0;list-style:none;font-size:12.5px}
.rc-workers li{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:12px;padding:5px 0;border-top:1px dashed #EEF1F5}
.rc-workers b{font-variant-numeric:tabular-nums}
.rc-key{display:flex;align-items:center;gap:6px;font-size:12px;color:#5B6678}
.rc-key i{display:inline-block;width:12px;height:8px;border-radius:2px;margin-left:6px}
.rc-bars{display:flex;flex-direction:column;gap:10px}
.rc-bar-row{display:grid;grid-template-columns:170px minmax(0,1fr) 120px;align-items:center;gap:12px;font-size:13px}
.rc-bar-label{color:#344054}
.rc-bar-pair{display:flex;flex-direction:column;gap:3px}
.rc-bar{height:9px;border-radius:3px;min-width:2px}
.rc-bar-plan{background:#93C5FD}
.rc-bar-real{background:#1D5FE0}
.rc-bar-real.over{background:#E0675A}
.rc-bar-values{display:flex;flex-direction:column;align-items:flex-end;font-variant-numeric:tabular-nums}
.rc-bar-values small{color:#667085}
.rc-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch}
.rc-table{width:100%;min-width:520px;border-collapse:collapse;font-size:13px}
.rc-table th,.rc-table td{padding:8px 10px;border-bottom:1px solid #EEF1F5;text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.rc-table thead th{background:#1D9BF0;color:#fff;font-weight:700;text-align:center}
.rc-table tbody th{text-align:left;font-weight:500;color:#344054;white-space:normal}
.rc-table td small{display:block;font-size:10.5px;color:#667085}
.rc-table .rc-sep th,.rc-table .rc-sep td{border-top:2px solid #D0D5DD;font-weight:700}
.rc-ecart.bad{background:#FEE4E2;color:#B42318;font-weight:700}
.rc-ecart.good{background:#DCFAE6;color:#067647;font-weight:700}
.rc-hint{margin:10px 0 0;font-size:12px;color:#5B6678}
.rc-months{width:100%;height:auto;max-height:260px;display:block}
.rc-axis{font-size:12px;fill:#667085}
.rc-months-key{display:flex;gap:16px;justify-content:center;margin-top:6px;font-size:12px;color:#5B6678}
.rc-months-key i{display:inline-block;width:10px;height:10px;border-radius:2px;margin-right:6px;vertical-align:-1px}
.rc-empty{color:#667085}
.rc-plan{margin:0 0 4px;padding:14px 16px;border:1px solid #B2CCFF;border-radius:12px;background:#F5F8FF}
.rc-plan[hidden]{display:none!important}
.rc-plan h4{margin:0;font-size:15px}
.rc-plan-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px 14px;margin-top:10px}
.rc-plan-grid label{display:flex;flex-direction:column;gap:4px;font-size:12px;font-weight:600;color:#344054}
.rc-plan-actions{display:flex;gap:8px;margin-top:12px}
.rent-table tbody tr[data-rent-project]{cursor:pointer}
.rent-table tbody tr[data-rent-project]:hover th,.rent-table tbody tr[data-rent-project]:hover td{background:#F5F8FF}
@media (max-width:900px){.rc-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.rc-cards,.rc-duo{grid-template-columns:1fr}.rc-plan-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:560px){.rc-kpi strong{font-size:17px}.rc-bar-row{grid-template-columns:1fr auto}.rc-bar-pair{grid-column:1/-1;grid-row:2}.rc-plan-grid{grid-template-columns:1fr}.rc-donut-wrap{justify-content:center}}
.rc-study{padding:18px 16px}
.rc-study-head{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;margin:0 0 14px}
.rc-study-field{display:flex;min-width:0;border:1px solid #CED4DA;border-radius:4px;overflow:hidden;font-size:14px}
.rc-study-field span{padding:8px 12px;background:#E9ECEF;color:#495057;border-right:1px solid #CED4DA;white-space:nowrap}
.rc-study-field b{flex:1;min-width:0;padding:8px 12px;font-weight:500;color:#212529;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rc-study-client{grid-column:1/2}
.rc-print{grid-row:1/3;grid-column:2;align-self:end;width:44px;height:38px;border:1px solid #CED4DA;border-radius:4px;background:#E9ECEF;color:#1E9FF2;cursor:pointer}
.rc-print svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linejoin:round}
.rc-study-table{width:100%;max-width:760px;min-width:540px;margin:0 auto;border-collapse:collapse;font-size:15px}
.rc-study-table thead th{padding:14px 10px;background:#22A7F0;color:#fff;font-weight:700;text-align:center;border-right:1px solid #fff}
.rc-study-table thead th:first-child{text-align:left;padding-left:20px}
.rc-study-table tbody th{padding:8px 4px;font-weight:400;color:#212529;text-align:left;border-bottom:1px solid #DEE2E6}
.rc-study-table td{padding:8px 10px;text-align:center;border-bottom:1px solid #DEE2E6;white-space:nowrap}
.rc-study-table .rc-sale th,.rc-study-table .rc-sale td{padding-top:22px;border-bottom:1px solid #ADB5BD}
.rc-study-table .rc-sale b{font-size:15px;font-weight:700;font-variant-numeric:tabular-nums}
.rc-cell{display:inline-block;min-width:118px;padding:6px 8px;border:1px solid #CED4DA;border-radius:4px;font-size:12.5px;font-weight:700;color:#212529;text-align:right;font-variant-numeric:tabular-nums;box-sizing:border-box}
.rc-cell-grey{background:#E9ECEF}
.rc-cell-white{background:#fff}
.rc-cell-blank{background:transparent;border-color:transparent;color:#ADB5BD;text-align:center}
.rc-cell.bad{background:#FF0000;border-color:#E60000;color:#5C0000}
.rc-cell.good{background:#33CC33;border-color:#2DB82D;color:#0B2A0B}
.rc-study-foot{margin:14px 0 0;text-align:center;font-size:13px;color:#495057}
.rc-study-foot b{color:#1E9FF2;font-weight:500}
@media print{body.rc-printing *{visibility:hidden!important}body.rc-printing #rc-study,body.rc-printing #rc-study *{visibility:visible!important}body.rc-printing #rc-study{position:absolute;left:0;top:0;width:100%;border:0}body.rc-printing .rc-print{display:none}body.rc-printing .rc-cell{-webkit-print-color-adjust:exact;print-color-adjust:exact}body.rc-printing .rc-study-table thead th{-webkit-print-color-adjust:exact;print-color-adjust:exact}}
@media (max-width:560px){.rc-study-field{font-size:13px}.rc-study-field span{padding:8px}}
.rc-achat h4{margin:0 0 14px;padding-bottom:12px;border-bottom:1px solid #E5E7EB;font-size:17px}
.rc-achat-cols{display:grid;grid-template-columns:1fr 1fr;align-items:center}
.rc-achat-cols>div{display:flex;flex-direction:column;align-items:center;gap:6px;padding:8px 10px}
.rc-achat-cols>div+div{border-left:1px solid #E5E7EB}
.rc-achat-label{display:flex;align-items:center;gap:6px;font-size:14px;color:#374151}
.rc-achat-dot{width:9px;height:9px;border-radius:50%;background:#E5E7EB;border:1px solid #D1D5DB}
.rc-achat-dot.spent{background:#52C493;border-color:#3DAF7E}
.rc-achat-pill{padding:2px 7px;border-radius:999px;border:1px solid #D1D5DB;background:#E5E7EB;font-style:normal;font-size:12px;color:#374151}
.rc-achat-pill.spent{background:#C8F0DE;border-color:#9EDDC0;color:#065F46}
.rc-achat-pill.over{background:#FEE4E2;border-color:#FDA29B;color:#B42318}
.rc-achat-cols strong{font-size:30px;font-weight:700;color:#344054;font-variant-numeric:tabular-nums;letter-spacing:-.01em}
.rc-achat-cols strong.neg{color:#B42318}
.rc-achat-bar{height:30px;margin-top:14px;border:1px solid #D1D5DB;border-radius:5px;background:#F3F4F6;overflow:hidden}
.rc-achat-bar>div{height:100%;min-width:2px;background:#52C493;border-radius:4px}
.rc-achat-bar>div.over{background:#E0675A}
.rc-achat-empty{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;font-size:14px}
@media (max-width:560px){.rc-achat-cols strong{font-size:21px}}
/* ---------- Menu par groupes ---------- */
#primary-nav .nav-section-toggle{display:flex!important;align-items:center;gap:10px;width:100%;margin:0;padding:9px 12px;border:0;border-radius:8px;background:transparent;color:inherit;font:inherit;font-size:13.5px;font-weight:600;letter-spacing:0;text-transform:none;text-align:left;cursor:pointer}
#primary-nav .nav-section-toggle:hover{background:rgba(127,127,127,.12)}
#primary-nav .nav-section-toggle .nav-section-icon{display:grid!important;place-items:center;width:20px;height:20px;background:none;color:inherit}
#primary-nav .nav-section-toggle .nav-section-icon svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
#primary-nav .nav-section-toggle>span:not(.nav-section-icon){flex:1;min-width:0}
#primary-nav .nav-section-chev{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;opacity:.7;transition:transform .15s}
#primary-nav .nav-section.is-collapsed .nav-section-chev{transform:rotate(-90deg)}
#primary-nav .nav-section-items{display:flex;flex-direction:column;gap:2px;padding-left:10px}
#primary-nav .nav-section-items[hidden],#primary-nav .nav-section[hidden]{display:none!important}
#primary-nav .nav-section+.nav-section{margin-top:4px!important;padding-top:4px!important}
/* ---------- Menu latéral identique à Vertuoza : bleu nuit, groupes ▾, sous-rubriques sans icône ---------- */
.sidebar{background:#0E1838!important;color:#E7EBF6!important;border-right:0!important;box-shadow:none!important}
.sidebar .brand,.sidebar .brand strong{color:#fff!important}
.sidebar .brand{padding-bottom:14px!important;border-bottom:1px solid rgba(255,255,255,.12)!important;margin-bottom:10px!important}
.sidebar .company-identity-strip{background:rgba(255,255,255,.06)!important;border-color:rgba(255,255,255,.1)!important;color:#E7EBF6!important}
.sidebar .company-identity-strip strong{color:#fff!important}
.sidebar .company-identity-strip small{color:#A9B3CE!important}
#primary-nav .nav-section{margin:0!important;padding:0!important;border:0!important}
#primary-nav .nav-section+.nav-section{margin-top:2px!important;padding-top:0!important;border-top:0!important}
#primary-nav .nav-section-toggle{color:#E7EBF6!important;font-size:15px!important;font-weight:500!important;padding:10px 12px!important;border-radius:8px!important}
#primary-nav .nav-section-toggle:hover{background:rgba(255,255,255,.07)!important}
#primary-nav .nav-section-toggle .nav-section-icon{color:#C9D1E8!important;width:22px!important;height:22px!important}
#primary-nav .nav-section-toggle .nav-section-icon svg{display:block!important;width:20px!important;height:20px!important;fill:none!important;stroke:currentColor!important;stroke-width:1.8!important}
#primary-nav .nav-section-chev{display:block!important;flex:0 0 auto!important;width:16px!important;height:16px!important;fill:none!important;stroke:currentColor!important;stroke-width:2!important;opacity:.85!important;color:#C9D1E8!important}
#primary-nav .nav-section.is-collapsed .nav-section-chev{transform:none!important}
#primary-nav .nav-section:not(.is-collapsed) .nav-section-chev{transform:rotate(180deg)!important}
#primary-nav .nav-section-items{padding:2px 0 6px 34px!important;gap:1px!important}
#primary-nav .nav-section-items .nav,#primary-nav .nav-section-items .nav-sub{display:flex!important;align-items:center!important;gap:8px!important;width:100%!important;min-height:0!important;margin:0!important;padding:8px 12px!important;border:0!important;border-radius:6px!important;background:transparent!important;box-shadow:none!important;color:#C3CBE1!important;font-size:14px!important;font-weight:400!important;text-align:left!important}
#primary-nav .nav-section-items .nav>svg,#primary-nav .nav-section-items .nav-sub>svg:not(.nav-group-arrow),#primary-nav .nav-section-items .nav-icon{display:none!important}
#primary-nav .nav-section-items .nav:hover,#primary-nav .nav-section-items .nav-sub:hover{background:rgba(255,255,255,.07)!important;color:#fff!important}
#primary-nav .nav-section-items .nav.active,#primary-nav .nav-section-items .nav-sub.active{background:rgba(255,255,255,.12)!important;color:#fff!important;font-weight:500!important}
#primary-nav .nav-section-items .nav-item-group{display:flex!important;flex-direction:column!important}
#primary-nav .nav-section-items .nav-group-arrow{width:14px!important;height:14px!important;margin-left:auto!important;color:#C3CBE1!important}
#primary-nav .nav-section-items .nav-group-submenu{padding-left:14px!important}
.sidebar .sidebar-logout,.sidebar #install-app-btn{background:transparent!important;color:#C3CBE1!important;border-color:rgba(255,255,255,.18)!important}
.sidebar .sidebar-logout:hover{color:#fff!important;background:rgba(255,255,255,.07)!important}
.sidebar .sidebar-logout svg{color:inherit!important}

/* ---------- Paramètres devis / facture : rendu identique à Vertuoza ---------- */
body #devis-builder-view .db-kinds{display:inline-flex!important;gap:0!important;padding:3px!important;border:1px solid #D9DCE5!important;border-radius:6px!important;background:#fff!important}
body #devis-builder-view .db-kinds .db-kind{gap:7px!important;padding:8px 16px!important;border:0!important;border-radius:4px!important;background:transparent!important;color:#4A5068!important;font-size:13.5px!important;font-weight:600!important}
body #devis-builder-view .db-kinds .db-kind:hover{background:#F2F5FF!important;color:#0B3FD6!important}
body #devis-builder-view .db-kinds .db-kind.active{background:#0B3FD6!important;color:#fff!important}
body #devis-builder-view .db-kinds .db-kind.active *{color:#fff!important}
#devis-builder-view .db-kind.active .db-kind-ic{background:transparent;color:#fff}
#db-settings-host{margin-top:14px}
#db-settings-host .db-settings-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 12px;padding:16px 22px;border:1px solid #E1E6F2;border-radius:8px;background:#fff}
#db-settings-host .db-settings-bar::before{content:'Paramètres des devis et factures';font-size:22px;font-weight:600;color:#1B1F3B}
#db-settings-host .ds-save,#db-settings-host button.primary{min-height:38px;padding:0 20px;border:0;border-radius:4px;background:#0B3FD6;color:#fff;font-size:14px;font-weight:600;box-shadow:none}
#db-settings-host .ds-save:hover{background:#0935B8}
#db-settings-host .ds-saved{color:#13893D;font-weight:600}
#db-settings-host .ds-layout{gap:16px}
#db-settings-host .ds-form{padding:0;border:1px solid #E1E6F2;border-radius:8px;background:#fff;box-shadow:none;overflow:hidden}
#db-settings-host .ds-tabs{display:flex;gap:0;margin:0;padding:0 12px;border-bottom:1px solid #E1E6F2;background:#F7F8FB;overflow-x:auto}
#db-settings-host .ds-tabs button{display:inline-flex;align-items:center;gap:7px;margin:0 0 -1px;padding:12px 14px;border:0;border-bottom:3px solid transparent;border-radius:0;background:transparent;color:#5B6178;font-size:13.5px;font-weight:500;white-space:nowrap;cursor:pointer}
#db-settings-host .ds-tabs button:hover{color:#1B1F3B}
#db-settings-host .ds-tabs button.active{border-bottom-color:#0B3FD6;background:transparent;color:#0B3FD6;font-weight:600}
#db-settings-host .ds-tab-ic{width:16px;height:16px}
#db-settings-host .ds-pane{padding:18px 22px 22px}
#db-settings-host .ds-sec{margin:0 0 20px;padding:0;border:0;background:none}
#db-settings-host .ds-sec h4{margin:0 0 12px;padding:8px 14px;border-radius:4px;background:#0B3FD6;color:#fff;font-size:14px;font-weight:600;letter-spacing:0;text-transform:none}
#db-settings-host label{font-size:12.5px;font-weight:600;color:#4A5068}
#db-settings-host input:not([type=checkbox]):not([type=color]):not([type=radio]),#db-settings-host select,#db-settings-host textarea{min-height:40px;padding:8px 12px;border:1px solid #D0D5DD;border-radius:4px;background:#fff;font-size:14px;font-weight:400;color:#1B1F3B;box-shadow:none}
#db-settings-host input:focus,#db-settings-host select:focus,#db-settings-host textarea:focus{outline:none;border-color:#0B3FD6;box-shadow:0 0 0 3px rgba(11,63,214,.12)}
#db-settings-host input:disabled,#db-settings-host select:disabled,#db-settings-host textarea:disabled{background:#F2F4F7;color:#8A90A2}
#db-settings-host .ds-chips{display:flex;flex-wrap:wrap;gap:8px}
#db-settings-host .ds-chips label{display:inline-flex!important;flex-direction:row!important;align-items:center;gap:8px!important;height:38px;padding:0 14px;border:1px solid #D0D5DD;border-radius:4px;background:#fff;color:#1B1F3B!important;font-size:13.5px!important;font-weight:500!important;line-height:1;white-space:nowrap;cursor:pointer}
#db-settings-host .ds-chips label:has(input:checked){border-color:#0B3FD6;background:#EEF3FF;color:#0B3FD6!important}
#db-settings-host .ds-chips input{flex:none;width:16px;height:16px;margin:0;accent-color:#0B3FD6}
#db-settings-host .ds-preview{border:1px solid #E1E6F2;border-radius:8px;background:#F7F8FB;box-shadow:none}
#db-settings-host .ds-hint{color:#8A90A2}

/* ---------- Paramètres devis / facture : détails Vertuoza ---------- */
#db-settings-host .ds-sec+.ds-sec,#db-settings-host .ds-sec+.ds-grid,#db-settings-host .ds-grid+.ds-sec{margin-top:22px}
#db-settings-host .ds-grid{gap:14px 14px!important}
#db-settings-host .ds-two{gap:22px!important}
#db-settings-host .ds-ro{min-height:40px;padding:10px 12px;border:1px solid #E1E6F2;border-radius:4px;background:#F7F8FB;font-size:14px;color:#1B1F3B}
#db-settings-host .ds-hint{margin-top:8px;font-size:12px;line-height:1.45}
#db-settings-host .ds-autofill{display:inline-flex;align-items:center;justify-content:center;gap:8px;width:100%;min-height:40px;margin-top:10px;padding:0 14px;border:1px solid #0B3FD6;border-radius:4px;background:#fff;color:#0B3FD6;font-size:14px;font-weight:600;cursor:pointer}
#db-settings-host .ds-autofill:hover{background:#EEF3FF}
#db-settings-host .ds-autofill:disabled{border-color:#D0D5DD;color:#8A90A2;cursor:not-allowed;background:#F7F8FB}
#db-settings-host .ds-autofill svg{width:16px;height:16px}
#db-settings-host .ds-info{margin:0 0 14px;padding:16px 18px;border:1px solid #E1E6F2;border-left:4px solid #0B3FD6;border-radius:6px;background:#fff}
#db-settings-host .ds-info h4{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 8px;padding:0;background:none;color:#1B1F3B;font-size:15px}
#db-settings-host .ds-info p{margin:0 0 6px;font-size:13.5px;line-height:1.5;color:#4A5068}
#db-settings-host .ds-badge{flex:none;padding:3px 8px;border-radius:4px;background:#FFF4D6;color:#8A5A00;font-size:11.5px;font-weight:600}
#db-settings-host .ds-logo-row{display:flex;align-items:flex-start;gap:16px}
#db-settings-host .ds-logo{display:grid;place-items:center;width:120px;height:80px;border:1px dashed #C3C8D4;border-radius:6px;background:#F7F8FB;color:#8A90A2;overflow:hidden}
#db-settings-host .ds-logo img{max-width:100%;max-height:100%;object-fit:contain}
#db-settings-host .ds-logo-txt{display:flex;flex-direction:column;gap:4px;min-width:0}
#db-settings-host .ds-logo-txt b{font-size:14px;color:#1B1F3B}
#db-settings-host .ds-logo-txt small{font-size:12.5px;color:#5B6178;line-height:1.45}
#db-settings-host .ds-logo-btns{display:flex;flex-wrap:wrap;gap:8px;margin-top:6px}
#db-settings-host .ds-btn{display:inline-flex!important;align-items:center;justify-content:center;min-height:36px;padding:0 14px!important;border:1px solid #0B3FD6!important;border-radius:4px!important;background:#0B3FD6!important;color:#fff!important;font-size:13.5px!important;font-weight:600!important;white-space:nowrap;cursor:pointer}
#db-settings-host .ds-btn.ds-btn-ghost{border-color:#F3B4B4!important;background:#fff!important;color:#C62828!important}
#db-settings-host .ds-btn:has(input:disabled),#db-settings-host .ds-btn:disabled{opacity:.5;cursor:not-allowed}
#db-settings-host .ds-footer-box{border:1px solid #E1E6F2;border-radius:6px;background:#fff;overflow:hidden}
#db-settings-host .ds-footer-box header{display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:8px!important;padding:10px 14px!important;background:#0B3FD6!important;color:#fff!important;text-align:left!important;border-radius:0!important;margin:0!important}
#db-settings-host .ds-footer-box header b{font-size:14px!important;font-weight:600!important;color:#fff!important}
#db-settings-host .ds-footer-box header svg{width:16px;height:16px;fill:none;stroke:#fff;stroke-width:2}
#db-settings-host .ds-footer-box p{margin:0;padding:14px;font-size:12.5px;line-height:1.5;color:#4A5068;text-align:left}
#db-settings-host .ds-swatches{display:flex;flex-wrap:wrap;gap:10px}
#db-settings-host .ds-swatch{width:36px;height:36px;padding:0;border:2px solid #fff!important;border-radius:6px!important;background:var(--sw)!important;box-shadow:0 0 0 1px #D0D5DD;cursor:pointer}
#db-settings-host .ds-swatch.active,#db-settings-host .ds-swatch[aria-pressed=true]{box-shadow:0 0 0 2px #0B3FD6}
#db-settings-host .ds-swatch-custom{position:relative;display:grid;place-items:center;background:conic-gradient(#e11d48,#f59e0b,#16a34a,#0ea5e9,#6d28d9,#e11d48)!important;overflow:hidden}
#db-settings-host .ds-swatch-custom input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}
#db-settings-host .ds-preview{padding:0!important;overflow:hidden}
#db-settings-host .ds-preview-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 16px;border-bottom:1px solid #E1E6F2;background:#fff}
#db-settings-host .ds-preview-head b{font-size:15px;font-weight:600;color:#1B1F3B}
#db-settings-host .ds-preview-kind{display:inline-flex;padding:3px;border:1px solid #D9DCE5;border-radius:6px;background:#fff}
#db-settings-host .ds-preview-kind button{min-height:28px;padding:0 12px;border:0;border-radius:4px;background:transparent;color:#4A5068;font-size:12.5px;font-weight:600;cursor:pointer}
#db-settings-host .ds-preview-kind button.active{background:#0B3FD6!important;color:#fff!important}
#db-settings-host .ds-sheet{margin:14px}
/* ---------- Devis & factures : liste identique à Vertuoza (barre d'outils, tableau zébré, devis + factures liées) ---------- */
#devis-dossiers-view.ddv-on>.section-head{display:flex!important;flex-direction:row!important;align-items:center!important;gap:12px;margin:0 0 14px!important;padding:6px 2px 14px!important;border:0!important;border-bottom:1px solid #E1E6F2!important;border-radius:0!important;background:transparent!important;box-shadow:none!important}
#devis-dossiers-view.ddv-on>.section-head small,#devis-dossiers-view.ddv-on>.section-head>span,#devis-dossiers-view.ddv-on>.section-head .rg-actions,#devis-dossiers-view.ddv-on .dd-kpis{display:none!important}
#devis-dossiers-view.ddv-on>.section-head h2{display:flex;align-items:center;gap:10px;margin:0;font-size:28px!important;font-weight:600!important;letter-spacing:-.01em;color:#1B1F3B!important}
.ddv-title-ic{width:30px;height:30px;fill:none;stroke:#0B3FD6;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
#devis-dossiers-view.ddv-on .rg-register{padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;overflow:visible}
#devis-dossiers-view.ddv-on .rg-register>.rg-toolbar{display:none!important}
#devis-dossiers-view.ddv-on .dd-list{padding:0!important;border:0!important;background:none!important}
.ddv-bar{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin:0 0 12px}
.ddv-search{position:relative;display:flex!important;flex-direction:row!important;align-items:center;flex:0 1 260px;min-width:180px;margin:0!important}
.ddv-search svg{position:absolute;left:11px;width:16px;height:16px;fill:none;stroke:#5B6178;stroke-width:2;pointer-events:none}
.ddv-search input{width:100%!important;height:36px!important;min-height:0!important;padding:0 12px 0 34px!important;border:1px solid #D0D5DD!important;border-radius:4px!important;background:#fff!important;font-size:14px!important;color:#1B1F3B!important;box-shadow:none!important}
.ddv-search input:focus,.ddv-panel select:focus,.ddv-panel input:focus{outline:none!important;border-color:#0B3FD6!important;box-shadow:0 0 0 3px rgba(11,63,214,.12)!important}
.ddv-btn{display:inline-flex;align-items:center;gap:7px;height:36px;padding:0 12px;border:1px solid #D0D5DD;border-radius:4px;background:#fff;color:#1B1F3B;font-size:14px;font-weight:500;cursor:pointer}
.ddv-btn:hover,.ddv-btn.is-on{border-color:#0B3FD6;color:#0B3FD6}
.ddv-btn svg,.ddv-new svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.ddv-btn-sq{justify-content:center;width:36px;padding:0;font-size:18px;line-height:1}
.ddv-count{display:inline-grid;place-items:center;min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:#0B3FD6;color:#fff;font-size:11px;font-weight:700}
.ddv-bar-end{display:flex;align-items:center;gap:8px;margin-left:auto}
.ddv-new{display:inline-flex;align-items:center;gap:8px;height:36px;padding:0 12px 0 14px;border:0;border-radius:4px;background:#0B3FD6;color:#fff;font-size:14px;font-weight:600;cursor:pointer}
.ddv-new:hover{background:#0935B8}
.ddv-panel{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:12px 14px;align-items:end;margin:0 0 12px;padding:14px 16px;border:1px solid #E1E6F2;border-radius:6px;background:#F3F7FD}
.ddv-panel label{display:flex!important;flex-direction:column!important;gap:5px;margin:0!important;font-size:12.5px!important;font-weight:600!important;color:#4A5068!important}
.ddv-panel select,.ddv-panel input[type=date]{width:100%!important;height:36px!important;min-height:0!important;padding:0 10px!important;border:1px solid #D0D5DD!important;border-radius:4px!important;background:#fff!important;font-size:13.5px!important;font-weight:400!important;color:#1B1F3B!important;box-shadow:none!important}
.ddv-panel .ddv-check{flex-direction:row!important;align-items:center;gap:8px;height:36px;font-weight:500!important}
.ddv-check input{width:16px!important;height:16px!important;accent-color:#0B3FD6}
.ddv-panel-end{display:flex;align-items:center;justify-content:flex-end;gap:14px;grid-column:-2/-1}
.ddv-link{padding:0;border:0;background:none;color:#0B3FD6;font-size:13.5px;cursor:pointer}
.ddv-link:hover{text-decoration:underline}
.ddv-apply{height:36px;padding:0 18px;border:0;border-radius:4px;background:#0B3FD6;color:#fff;font-size:14px;font-weight:600;cursor:pointer}
.ddv-card{border:1px solid #E1E6F2;border-radius:6px;background:#fff;overflow:hidden}
.ddv-table-wrap{overflow-x:auto}
.ddv-table{width:100%;border-collapse:collapse;font-size:13.5px}
.ddv-table th{padding:0;border-bottom:1px solid #E1E6F2;background:#fff;text-align:left;white-space:nowrap}
.ddv-table th+th{box-shadow:inset 1px 0 0 #EEF0F4}
.ddv-table th button{display:flex;align-items:center;gap:6px;width:100%;padding:12px 14px;border:0;background:none;color:#1B1F3B;font-size:13.5px;font-weight:600;text-align:left;cursor:pointer}
.ddv-table th.num button{justify-content:flex-end}
.ddv-sort{font-style:normal;font-size:11px;color:#B4BAC8}
.ddv-table th button.is-on .ddv-sort{color:#0B3FD6}
.ddv-table td{height:46px;padding:6px 14px;border:0;color:#1B1F3B;vertical-align:middle;white-space:nowrap}
.ddv-table tbody tr.ddv-parent:nth-of-type(odd) td{background:#fff}
.ddv-table tbody tr.ddv-parent td{border-top:1px solid #EEF0F4}
.ddv-table tbody tr.ddv-parent:first-child td{border-top:0}
.ddv-table tbody tr:hover td{background:#F2F5FF!important}
.ddv-table td.num,.ddv-table th.num{text-align:right;font-variant-numeric:tabular-nums}
.ddv-num{font-weight:500}
.ddv-date{color:#1B1F3B;font-variant-numeric:tabular-nums}
.ddv-client{display:inline-flex;align-items:center;gap:8px}
.ddv-client i{display:inline-grid;place-items:center;width:24px;height:24px;border-radius:50%;background:#EEF0F4;color:#5B6178}
.ddv-client svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:2}
.ddv-ref{max-width:300px;overflow:hidden;text-overflow:ellipsis}
.ddv-ref small{color:#8A90A2;font-size:12px}
.ddv-tag{display:inline-block;margin:0 6px 0 0;padding:1px 6px;border-radius:3px;background:#EEF0F4;color:#5B6178;font-size:11px;font-style:normal;font-weight:600;vertical-align:1px}
.ddv-tag-f{background:#E3F6EA;color:#13793A}.ddv-tag-s{background:#EFE8FB;color:#5B32B4}
.ddv-st{text-align:center}
.ddv-chip{display:inline-block;min-width:92px;padding:3px 12px;border-radius:12px;font-size:12px;font-weight:600;text-align:center}
.ddv-st small{display:block;margin-top:2px;font-size:11.5px;color:#8A90A2;font-variant-numeric:tabular-nums}
.ddv-ok{background:#D8F3E3;color:#13793A}.ddv-warn{background:#FFF0C2;color:#7A5300}.ddv-bad{background:#FDE0DD;color:#C62828}.ddv-info{background:#DCE6FF;color:#0B3FD6}.ddv-muted{background:#EEF0F4;color:#5B6178}
.ddv-act,.ddv-act-h{width:180px;text-align:right}
.ddv-ico{display:inline-grid;place-items:center;width:30px;height:30px;padding:0;border:0;border-radius:4px;background:transparent;color:#1B1F3B;font-size:18px;line-height:1;cursor:pointer}
.ddv-ico:hover{background:#EEF3FF;color:#0B3FD6}
.ddv-ico.is-off{color:#C3C8D4;cursor:default}
.ddv-ico svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2}
.ddv-menu-wrap{position:relative;display:inline-block}
.ddv-menu{position:absolute;right:0;top:calc(100% + 4px);z-index:40;display:flex;flex-direction:column;min-width:240px;padding:6px;border:1px solid #E1E6F2;border-radius:6px;background:#fff;box-shadow:0 12px 32px rgba(16,24,64,.18);white-space:nowrap}
.ddv-menu button{padding:8px 10px;border:0;border-radius:4px;background:transparent;color:#1B1F3B;font-size:13.5px;font-weight:500;text-align:left;cursor:pointer}
.ddv-menu button:hover{background:#F2F5FF;color:#0B3FD6}
.ddv-tog,.ddv-tog-sp{display:inline-grid;place-items:center;width:22px;height:22px;margin:0 6px 0 -6px;padding:0;border:0;border-radius:4px;background:transparent;color:#5B6178;vertical-align:middle;cursor:pointer}
.ddv-tog svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:2.2;transform:rotate(-90deg);transition:transform .15s}
.ddv-tog.is-open svg{transform:none}
.ddv-tog:hover{background:#EEF3FF;color:#0B3FD6}
.ddv-kids{margin-left:8px;padding:1px 8px;border:1px solid #D9E2FF;border-radius:10px;background:#F2F5FF;color:#0B3FD6;font-size:11.5px;font-weight:600;cursor:pointer}
.ddv-table tr.ddv-child td{height:38px;background:#F7F8FB;font-size:13px;color:#4A5068}
.ddv-table tr.ddv-child td:first-child{position:relative;padding-left:44px}
.ddv-branch{position:absolute;left:24px;top:0;bottom:50%;width:12px;border-left:1.5px solid #C9D3EA;border-bottom:1.5px solid #C9D3EA;border-bottom-left-radius:4px}
.ddv-table tr.ddv-child .ddv-ref small{margin-left:4px}
.ddv-table tr.ddv-recap td{height:34px;font-size:12.5px;color:#5B6178;white-space:normal}
.ddv-table tr.ddv-recap td{display:table-cell}
.ddv-recap td>span:not(.ddv-branch){display:inline-block;margin-right:18px}
.ddv-recap b{color:#1B1F3B;font-weight:600;font-variant-numeric:tabular-nums}
.ddv-recap .ddv-due b{color:#C62828}
.ddv-empty{height:auto!important;padding:34px 16px!important;text-align:center!important;color:#8A90A2!important;white-space:normal!important}
.ddv-foot{display:flex;flex-wrap:wrap;align-items:center;gap:12px 18px;padding:10px 14px;border-top:1px solid #E1E6F2;font-size:13.5px;color:#1B1F3B}
.ddv-per{display:inline-flex!important;flex-direction:row!important;align-items:center;gap:8px;margin:0 auto 0 0!important;font-size:13.5px!important;font-weight:400!important;color:#1B1F3B!important}
.ddv-per select{width:auto!important;height:32px!important;min-height:0!important;padding:0 26px 0 10px!important;border:1px solid #D0D5DD!important;border-radius:4px!important;background-color:#fff!important;font-size:13.5px!important}
.ddv-sum{display:flex;align-items:center;gap:18px}
.ddv-sum>i svg{width:16px;height:16px;fill:none;stroke:#5B6178;stroke-width:2}
.ddv-sum>span{display:flex;flex-direction:column;align-items:flex-end;line-height:1.25}
.ddv-sum>span+span{padding-left:18px;border-left:1px solid #E1E6F2}
.ddv-sum small{font-size:12px;color:#5B6178}
.ddv-sum b{font-size:14px;font-weight:600;font-variant-numeric:tabular-nums}
.ddv-pages{display:flex;align-items:center}
.ddv-pages button,.ddv-pages span{display:inline-grid;place-items:center;min-width:34px;height:34px;margin-left:-1px;padding:0 8px;border:1px solid #D0D5DD;background:#fff;color:#1B1F3B;font-size:13.5px;cursor:pointer}
.ddv-pages span{cursor:default;color:#8A90A2}
.ddv-pages>:first-child{border-radius:4px 0 0 4px}.ddv-pages>:last-child{border-radius:0 4px 4px 0}
.ddv-pages button.is-on{position:relative;z-index:1;border-color:#0B3FD6;background:#EEF3FF;color:#0B3FD6;font-weight:600}
.ddv-pages button:disabled{color:#B4BAC8;cursor:default}
@media (max-width:760px){.ddv-search{flex:1 1 100%}.ddv-bar-end{margin-left:0}.ddv-sum{order:3;width:100%;justify-content:flex-end}.ddv-panel-end{grid-column:auto}}
.ddv-recap .ddv-paid{color:#13793A;font-weight:600}
.ddv-table th.ddv-st-h button{justify-content:center}
.ddv-folder{display:inline-grid;place-items:center;width:22px;height:22px;margin-right:8px;color:#8A90A2;vertical-align:-5px}
.ddv-folder svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linejoin:round;stroke-linecap:round}
.ddv-folder.is-ok{color:#0B3FD6}.ddv-folder.is-paid{color:#13893D}.ddv-folder.is-paid svg{fill:#E3F6EA}
.ddv-table tr.ddv-paid-row td:first-child{box-shadow:inset 3px 0 0 #13893D}
.ddv-bill{display:inline-flex;align-items:center;gap:5px;height:28px;margin-right:6px;padding:0 10px;border:1px solid #C9D6FF;border-radius:4px;background:#F2F5FF;color:#0B3FD6;font-size:12.5px;font-weight:600;vertical-align:middle;cursor:pointer}
.ddv-bill:hover{border-color:#0B3FD6;background:#0B3FD6;color:#fff}
.ddv-bill svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:2;stroke-linejoin:round;stroke-linecap:round}
.ddv-rg{display:inline-block;margin-right:12px;color:#5B32B4}.ddv-rg b{color:#5B32B4}.ddv-rg.is-done{color:#8A90A2}
.ddv-rg-btn{height:26px;padding:0 10px;border:1px solid #CDBDF0;border-radius:4px;background:#F5F0FD;color:#5B32B4;font-size:12px;font-weight:600;cursor:pointer}
.ddv-rg-btn:hover{border-color:#5B32B4;background:#5B32B4;color:#fff}.ddv-rg-btn:disabled{opacity:.6;cursor:wait}
.ddv-tag-rg{background:#EFE8FB;color:#5B32B4}
/* ---------- Encodage devis : finitions identiques à Vertuoza (champs encadrés, lignes compactes) ---------- */
body #devis-builder-view .vze-actions-btn{min-height:38px!important;padding:0 14px!important;border:0!important;border-radius:4px!important;background:#0B3FD6!important;color:#fff!important;font-size:14px!important;font-weight:600!important;box-shadow:none!important}
body #devis-builder-view .vze-actions-btn:hover{background:#0935B8!important}
body #devis-builder-view .vze-actions-btn svg{color:#fff!important;stroke:currentColor}
body #devis-builder-view .vze-table thead th{background:#fff!important;border-bottom:1px solid #E1E6F2!important;color:#1B1F3B!important;font-size:13px!important;font-weight:600!important}
body #devis-builder-view .vze-table td{padding-top:5px!important;padding-bottom:5px!important}
body #devis-builder-view .vze-row.vze-line td,body #devis-builder-view .vze-row.vze-n td{height:46px}
body #devis-builder-view .vze-type-wrap{background:#fff!important;border:1px solid #D9DCE5!important;border-radius:4px!important}
body #devis-builder-view .vze-type{height:32px!important;padding:0 18px 0 8px!important;border:0!important;background:transparent!important;color:#1B1F3B!important;font-family:Georgia,"Times New Roman",serif!important;font-size:18px!important;font-weight:700!important}
body #devis-builder-view .vze-type option{font-family:Inter,system-ui,sans-serif;font-size:13px;font-weight:500}
body #devis-builder-view .vze-row .vze-in,body #devis-builder-view .vze-row .vze-cat,body #devis-builder-view .vze-unit-box,body #devis-builder-view .vze-pu,body #devis-builder-view .vze-tva-box{border:1px solid #DDE1EA!important;border-radius:4px!important;background-color:#fff!important;box-shadow:none!important}
body #devis-builder-view .vze-row .vze-in{height:32px;font-size:13px!important;color:#1B1F3B!important}
body #devis-builder-view .vze-row textarea.vze-in{height:auto}
body #devis-builder-view .vze-row .vze-in:focus,body #devis-builder-view .vze-row .vze-cat:focus{outline:none!important;border-color:#0B3FD6!important;box-shadow:0 0 0 3px rgba(11,63,214,.12)!important}
body #devis-builder-view .vze-unit-box{height:32px;align-items:center}
body #devis-builder-view .vze-unit-box select{height:30px;border:0!important;background-color:transparent!important;text-transform:capitalize;font-size:13px}
body #devis-builder-view .vze-pu{display:flex!important;align-items:center;height:32px;padding-right:8px}
body #devis-builder-view .vze-pu input.vze-in{border:0!important;background:transparent!important;height:30px}
body #devis-builder-view .vze-pu.is-cat{background-color:#E6E8EE!important}
body #devis-builder-view .vze-pu i{font-style:normal;font-size:13px;color:#1B1F3B}
body #devis-builder-view .vze-tva-box{display:inline-flex;align-items:center;min-width:58px;height:32px;padding:0 10px;font-size:13px;color:#1B1F3B;cursor:default}
body #devis-builder-view .vze-c-P .vze-x[data-vze-clear]{display:none}
body #devis-builder-view .vze-c-P .vze-desc-in .vze-in{padding-right:10px}
body #devis-builder-view .vze-line:not(.vze-c-P) .vze-desc-in input.vze-in{padding-right:44px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235B6178' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E")!important;background-repeat:no-repeat!important;background-position:right 8px center!important;background-size:14px!important}
body #devis-builder-view .vze-line:not(.vze-c-P) .vze-desc-in .vze-x{right:26px}
body #devis-builder-view .vze-money{white-space:nowrap}
/* Colonnes alignées et serrées : la description prend toute la place libre, les chiffres ont une largeur fixe. */
body #devis-builder-view .vze-table{table-layout:auto;width:100%}
body #devis-builder-view .vze-table th:nth-child(3),body #devis-builder-view .vze-table td:nth-child(3){width:66px}
body #devis-builder-view .vze-type-wrap{display:inline-flex;min-width:60px}
body #devis-builder-view .vze-type{width:100%}
body #devis-builder-view .vze-table td.vze-desc{width:auto!important;min-width:420px}
body #devis-builder-view .vze-desc-box{display:flex;align-items:center;gap:6px}
body #devis-builder-view .vze-desc-in{flex:1 1 auto;position:relative;display:flex}
body #devis-builder-view .vze-row .vze-in.vze-r{width:88px;text-align:right}
body #devis-builder-view .vze-table td.vze-unit{width:108px}
body #devis-builder-view .vze-unit-box{width:104px}
body #devis-builder-view .vze-pu{width:104px}
body #devis-builder-view .vze-pu input.vze-in.vze-r{width:100%}
body #devis-builder-view .vze-table td.vze-money{width:112px;text-align:right;font-variant-numeric:tabular-nums}
body #devis-builder-view .vze-table td.vze-tva{width:70px}
body #devis-builder-view .vze-table td.vze-act{width:96px;white-space:nowrap}
body #devis-builder-view .vze-row.vze-n textarea.vze-in{min-height:32px;height:32px;padding-top:6px;padding-bottom:6px;resize:vertical}
body #devis-builder-view .vze-row.vze-t .vze-in,body #devis-builder-view .vze-row.vze-ts .vze-in{height:32px;font-weight:600}
body #devis-builder-view .vze-row .vze-cat{flex:0 0 168px;height:32px}
/* Encodage devis : largeurs finales (tout tient dans la page, sans défilement horizontal) */
body #devis-builder-view .vze-table th:nth-child(3),body #devis-builder-view .vze-table td:nth-child(3){width:74px}
body #devis-builder-view .vze-type-wrap{min-width:68px}
body #devis-builder-view .vze-row .vze-cat{flex:0 0 130px}
body #devis-builder-view .vze-table td.vze-desc{min-width:420px}
body #devis-builder-view .vze-row .vze-in.vze-r{width:80px}
body #devis-builder-view .vze-pu input.vze-in.vze-r{width:100%}
body #devis-builder-view .vze-table td.vze-unit{width:96px}
body #devis-builder-view .vze-unit-box{width:94px}
body #devis-builder-view .vze-pu{width:96px}
body #devis-builder-view .vze-table td.vze-money{width:104px}
body #devis-builder-view .vze-table td.vze-act{width:88px}
body #devis-builder-view .vze-row.vze-n textarea.vze-in{height:32px!important;min-height:32px!important;overflow:hidden}
/* Encodage devis : bloc des totaux HT / TVA / TTC soigné (carte encadrée, montants alignés, TTC en bandeau) */
body #devis-builder-view .vze-totals{min-width:360px;padding:0!important;border:1px solid #E1E6F2!important;border-radius:8px!important;background:#fff!important;box-shadow:none!important;overflow:hidden}
body #devis-builder-view .vze-totals dl{margin:0!important;padding:0!important}
body #devis-builder-view .vze-totals dl>div{display:flex!important;align-items:center;justify-content:space-between;gap:16px;margin:0!important;padding:11px 18px!important;border:0!important;border-bottom:1px solid #EEF0F4!important;background:#fff!important}
body #devis-builder-view .vze-totals dl>div[hidden]{display:none!important}
body #devis-builder-view .vze-totals dt{display:flex;align-items:center;gap:8px;margin:0;font-size:13.5px!important;font-weight:500!important;color:#5B6178!important}
body #devis-builder-view .vze-totals dd{margin:0;font-size:14px!important;font-weight:600!important;color:#1B1F3B!important;font-variant-numeric:tabular-nums;white-space:nowrap}
body #devis-builder-view .vze-totals .vze-b dt{font-weight:700!important;color:#1B1F3B!important}
body #devis-builder-view .vze-totals .vze-b dd{font-weight:700!important}
body #devis-builder-view .vze-totals .vze-b:not(:first-child){background:#F7F8FB!important}
body #devis-builder-view .vze-totals .vze-ttc{padding:14px 18px!important;border-bottom:0!important;background:#0B1F66!important}
body #devis-builder-view .vze-totals .vze-ttc dt,body #devis-builder-view .vze-totals .vze-ttc dd{color:#fff!important;font-size:16px!important;font-weight:700!important}
body #devis-builder-view .vze-totals .vze-pct{display:inline-flex;align-items:center;height:28px;border:1px solid #D0D5DD;border-radius:4px;background:#fff;overflow:hidden}
body #devis-builder-view .vze-totals .vze-pct input{width:52px!important;height:26px!important;min-height:0!important;padding:0 6px!important;border:0!important;background:transparent!important;text-align:right;font-size:13px!important;box-shadow:none!important}
body #devis-builder-view .vze-totals .vze-pct em{display:grid;place-items:center;width:26px;height:100%;border-left:1px solid #E1E6F2;background:#F2F4F7;font-style:normal;font-size:12px;color:#5B6178}
body #devis-builder-view .vze-totals dl>div.vze-b.vze-ttc{background:#0B1F66!important}
/* Lignes fines : nom du client et référence sur une seule ligne, coupés avec « … » (texte complet au survol). */
.ddv-client>span{display:inline-block;max-width:190px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:middle}
.ddv-table td.ddv-ref{max-width:280px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ddv-table td{white-space:nowrap}
/* ---------- Factures clients : identique à Vertuoza (À payer par défaut, Paiement + Statut en pastilles) ---------- */
body #factures-view>.section-head{display:flex!important;flex-direction:row!important;flex-wrap:wrap;align-items:center!important;gap:10px 16px;margin:0 0 14px!important;padding:6px 2px 14px!important;border:0!important;border-bottom:1px solid #E1E6F2!important;border-radius:0!important;background:transparent!important;box-shadow:none!important}
body #factures-view>.section-head small,body #factures-view>.section-head>span{display:none!important}
body #factures-view>.section-head h2{display:flex;align-items:center;gap:12px;margin:0;font-size:28px!important;font-weight:600!important;letter-spacing:-.01em;color:#1B1F3B!important}
.fxv-title-ic{width:32px;height:32px;fill:none;stroke:#0B3FD6;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
body #factures-view .fx-actions{display:flex;gap:8px;margin-left:auto}
body #factures-view .fx-actions .secondary{height:36px;min-height:0;padding:0 12px;border:1px solid #D0D5DD!important;border-radius:4px!important;background:#fff!important;color:#1B1F3B!important;box-shadow:none!important;font-size:14px;font-weight:500}
body #factures-view .fx-actions .primary{height:36px;min-height:0;padding:0 14px;border:0!important;border-radius:4px!important;background:#0B3FD6!important;color:#fff!important;box-shadow:none!important;font-size:14px;font-weight:600}
body #factures-view .fx-actions svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2}
body #factures-view .fx-toolbar{gap:10px!important;margin:0 0 10px!important;padding:0!important;border:0!important;background:none!important}
body #factures-view .fx-toolbar input,body #factures-view .fx-toolbar select{height:36px!important;min-height:0!important;border:1px solid #D0D5DD!important;border-radius:4px!important;background-color:#fff!important;font-size:14px!important;box-shadow:none!important}
body #factures-view #fx-status{font-weight:600;color:#0B3FD6!important;border-color:#9DB5F5!important}
.fxv-hint{margin:0 0 10px;font-size:12.5px;color:#5B6178}
body #factures-view .fx-head,body #factures-view .fx-row{grid-template-columns:minmax(150px,1fr) minmax(0,1.4fr) 128px 108px 160px 120px 108px!important;column-gap:14px!important}
body #factures-view .fx-head{height:46px!important;background:#fff!important;border-bottom:1px solid #E1E6F2!important}
body #factures-view .fx-head span{font-size:13.5px!important;font-weight:600!important;color:#1B1F3B!important;text-transform:none!important;letter-spacing:0!important}
body #factures-view .fx-row{min-height:54px!important;padding:8px 16px!important}
body #factures-view .fx-row:nth-child(even){background:#FAFBFD!important}
body #factures-view .fx-row:hover{background:#F2F5FF!important}
body #factures-view .fx-c-client>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body #factures-view .fx-c-amt{font-variant-numeric:tabular-nums;font-weight:500}
body #factures-view .fxv-date{color:#8A90A2}
.fxv-chip{display:inline-flex;align-items:center;justify-content:center;width:100%;max-width:160px;height:28px;padding:0 10px;border-radius:4px;font-size:13px;font-weight:600;white-space:nowrap;box-sizing:border-box}
.fxv-late{background:#E5372B;color:#fff}.fxv-open{background:#DCE6FF;color:#0B3FD6}.fxv-partial{background:#D5F2E6;color:#0B7A55}.fxv-paid{background:#13893D;color:#fff}
.fxv-s-muted{background:#EEF0F4;color:#5B6178}.fxv-s-info{background:#0B8A5A;color:#fff}.fxv-s-ok{background:#13893D;color:#fff}.fxv-s-err{background:#FDE0DD;color:#C62828}
@media (max-width:1100px){body #factures-view .fx-row{grid-template-columns:minmax(0,1fr) auto!important}body #factures-view .fx-c-send{grid-column:1}body #factures-view .fx-c-pay{grid-column:1}.fxv-chip{width:auto}}
/* ---------- Sous-traitance : factures à payer + dossiers (même présentation que Factures clients / Devis & factures) ---------- */
#st-factures-view,#st-dossiers-view{color:#1B1F3B}
.stv-head{display:flex;flex-wrap:wrap;align-items:center;gap:10px 16px;margin:0 0 14px;padding:6px 2px 14px;border-bottom:1px solid #E1E6F2}
.stv-head h2{display:flex;align-items:center;gap:12px;margin:0;font-size:28px;font-weight:600;letter-spacing:-.01em;color:#1B1F3B}
.stv-title-ic{width:32px;height:32px;fill:none;stroke:#0B3FD6;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.stv-head-act{display:flex;gap:8px;margin-left:auto}
.stv-btn{height:36px;padding:0 12px;border:1px solid #D0D5DD;border-radius:4px;background:#fff;color:#1B1F3B;font-size:14px;font-weight:500;cursor:pointer}
.stv-btn:hover{border-color:#0B3FD6;color:#0B3FD6}
.stv-new{height:36px;padding:0 14px;border:0;border-radius:4px;background:#0B3FD6;color:#fff;font-size:14px;font-weight:600;cursor:pointer}
.stv-new:hover{background:#0935B8}.stv-new:disabled{opacity:.6;cursor:wait}
.stv-bar{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin:0 0 10px}
.stv-search{position:relative;display:flex!important;flex-direction:row!important;align-items:center;flex:0 1 300px;min-width:200px;margin:0!important}
.stv-search svg{position:absolute;left:11px;width:16px;height:16px;fill:none;stroke:#5B6178;stroke-width:2;pointer-events:none}
.stv-search input{width:100%!important;height:36px!important;min-height:0!important;padding:0 12px 0 34px!important;border:1px solid #D0D5DD!important;border-radius:4px!important;background:#fff!important;font-size:14px!important;box-shadow:none!important}
.stv-bar select{width:auto!important;min-width:170px;height:36px!important;min-height:0!important;padding:0 10px!important;border:1px solid #D0D5DD!important;border-radius:4px!important;background-color:#fff!important;font-size:14px!important;box-shadow:none!important}
.stv-bar select[data-stv-status]{font-weight:600;color:#0B3FD6!important;border-color:#9DB5F5!important}
.stv-hint{margin:0 0 10px;font-size:12.5px;color:#5B6178}
.stv-card{border:1px solid #E1E6F2;border-radius:6px;background:#fff;overflow:hidden}
.stv-wrap{overflow-x:auto}
.stv-table{width:100%;border-collapse:collapse;font-size:13.5px}
.stv-table th{padding:12px 14px;border-bottom:1px solid #E1E6F2;background:#fff;text-align:left;font-size:13.5px;font-weight:600;color:#1B1F3B;white-space:nowrap}
.stv-table th.num,.stv-table td.num{text-align:right;font-variant-numeric:tabular-nums}
.stv-table td{height:50px;padding:6px 14px;border-top:1px solid #EEF0F4;vertical-align:middle;white-space:nowrap}
.stv-table tbody tr:hover td{background:#F2F5FF}
.stv-table td small{display:block;font-size:12px;color:#8A90A2}
.stv-main b{font-weight:600}.stv-sup{font-weight:600}
.stv-ref{max-width:260px;overflow:hidden;text-overflow:ellipsis}
.stv-old{color:#C62828;font-weight:600}
.stv-act{text-align:right}
.stv-ico{display:inline-grid;place-items:center;width:30px;height:30px;margin-left:4px;padding:0;border:0;border-radius:4px;background:transparent;color:#1B1F3B;cursor:pointer;vertical-align:middle}
.stv-ico:hover{background:#EEF3FF;color:#0B3FD6}
.stv-ico svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2}
.stv-mark{height:28px;margin-left:6px;padding:0 10px;border:1px solid #BFE3C8;border-radius:4px;background:#EAF6EC;color:#13793A;font-size:12.5px;font-weight:600;cursor:pointer}
.stv-mark:hover{border-color:#13893D;background:#13893D;color:#fff}
.stv-muted{color:#8A90A2;font-size:12.5px}
.stv-due{color:#C62828!important;font-weight:600}
.stv-empty{height:auto!important;padding:34px 16px!important;text-align:center;color:#8A90A2;white-space:normal!important}
.stv-foot{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:12px 22px;padding:10px 14px;border-top:1px solid #E1E6F2;font-size:13.5px}
.stv-foot>span:first-child{margin-right:auto;color:#5B6178}
.stv-sum{display:flex;flex-direction:column;align-items:flex-end;line-height:1.25}
.stv-sum small{font-size:12px;color:#5B6178}.stv-sum b{font-size:14px;font-weight:600;font-variant-numeric:tabular-nums}
.stv-form{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:12px 14px;align-items:end;margin:0 0 14px;padding:14px 16px;border:1px solid #C9D6FF;border-radius:6px;background:#F3F7FD}
.stv-form label{display:flex!important;flex-direction:column!important;gap:5px;margin:0!important;font-size:12.5px!important;font-weight:600!important;color:#4A5068!important}
.stv-form input,.stv-form select{width:100%!important;height:36px!important;min-height:0!important;padding:0 10px!important;border:1px solid #D0D5DD!important;border-radius:4px!important;background:#fff!important;font-size:13.5px!important;font-weight:400!important;box-shadow:none!important}
.stv-form input[type=file]{padding:6px 8px!important}
.stv-form-end{display:flex;align-items:center;justify-content:flex-end;gap:14px;grid-column:-2/-1}
.stv-link{padding:0;border:0;background:none;color:#0B3FD6;font-size:13.5px;cursor:pointer}
#st-dossiers-view .ddv-table td{height:46px}
#st-dossiers-view .ddv-st small{display:block}
@media (max-width:760px){.stv-search{flex:1 1 100%}.stv-head-act{margin-left:0}.stv-form-end{grid-column:auto}}
#st-dossiers-view .ddv-table th{padding:12px 14px!important;font-size:13.5px;font-weight:600;color:#1B1F3B;box-shadow:none!important}
#st-dossiers-view .ddv-table th.num{text-align:right}#st-dossiers-view .ddv-table th.ddv-st-h{text-align:center}
#st-dossiers-view .ddv-st .stv-ico{margin-left:6px}
/* ---------- Dépenses pour le comptable : onglets + pointage relevé ---------- */
.pv-tabs{display:flex;gap:0;margin:0 0 14px;border-bottom:1px solid #E1E6F2;overflow-x:auto}
.pv-tabs button{display:inline-flex;align-items:center;gap:8px;margin-bottom:-1px;padding:12px 16px;border:0;border-bottom:3px solid transparent;background:transparent;color:#5B6178;font-size:14.5px;font-weight:500;white-space:nowrap;cursor:pointer}
.pv-tabs button:hover{color:#1B1F3B}
.pv-tabs button.is-on{border-bottom-color:#0B3FD6;color:#0B3FD6;font-weight:600}
.pv-tabs svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.pv-bank{display:inline-block;margin-top:3px;padding:2px 8px;border-radius:4px;font-size:11.5px;font-weight:600;white-space:nowrap}
.pv-bank-ok{background:#E3F6EA;color:#13793A}.pv-bank-bad{background:#FDE0DD;color:#C62828}.pv-bank-warn{background:#FFF0C2;color:#7A5300}.pv-bank-muted{background:#EEF0F4;color:#5B6178}
#purchases-view .rg-amount .pv-bank{display:table;margin-left:auto}
#pv-sales .pv-bank{margin:0;font-size:12px;padding:3px 9px}

/* Boîte mail connectée (Gmail / Outlook) */
.pin-mbx{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;margin:12px 0 4px;padding:12px 14px;border:1px solid #DCE3EE;border-radius:10px;background:#F7F9FC}
.pin-mbx[hidden]{display:none}
.pin-mbx.is-on{border-color:#BFE3CC;background:#F2FBF5}
.pin-mbx.is-error{border-color:#F3C2C2;background:#FDF3F3}
.pin-mbx .mbx-state{display:flex;align-items:flex-start;gap:12px;min-width:0;flex:1 1 360px}
.pin-mbx .mbx-state>div{display:flex;flex-direction:column;gap:2px;min-width:0}
.pin-mbx .mbx-state b{font-size:14px;color:#0B1F66}
.pin-mbx.is-on .mbx-state b{color:#1E7B45}
.pin-mbx.is-error .mbx-state b{color:#B42318}
.pin-mbx .mbx-mail{font-size:13px;color:#1F2937;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pin-mbx small{font-size:12px;color:#5B6576;line-height:1.45}
.pin-mbx .mbx-ico{flex:0 0 34px;width:34px;height:34px;border-radius:50%;background:#fff;border:1px solid #DCE3EE;display:grid;place-items:center;font-size:16px;color:#0B1F66}
.pin-mbx .mbx-acts{display:flex;gap:8px;flex-wrap:wrap}
.pin-mbx .mbx-btn{display:inline-flex;align-items:center;gap:8px;padding:8px 14px;border:1px solid #CBD5E1;border-radius:8px;background:#fff;color:#1F2937;font-weight:600;font-size:13px;cursor:pointer}
.pin-mbx .mbx-btn:hover:not(:disabled){border-color:#0B1F66;box-shadow:0 1px 3px rgba(11,31,102,.15)}
.pin-mbx .mbx-btn:disabled{opacity:.5;cursor:not-allowed}
@media (max-width:640px){.pin-mbx .mbx-acts{width:100%}.pin-mbx .mbx-acts>button{flex:1}}
/* « Connecter ma boîte mail » : formulaire adresse + mot de passe d'application */
.pin-mbx .mbx-imap{display:flex;flex-direction:column;gap:10px;width:100%}
.pin-mbx .mbx-imap label{display:flex;flex-direction:column;gap:4px;font-size:13px;font-weight:600;color:#1F2937;max-width:420px}
.pin-mbx .mbx-imap label[hidden],.pin-mbx .mbx-imap .mbx-help[hidden]{display:none}
.pin-mbx .mbx-imap label small{font-weight:400;color:#5B6778}
.pin-mbx .mbx-imap input{padding:9px 11px;border:1px solid #CBD5E1;border-radius:8px;font:inherit;font-weight:400;background:#fff}
.pin-mbx .mbx-imap .mbx-help{margin:0;max-width:560px;font-size:13px;line-height:1.45;color:#1F2937;background:#EEF4FF;border:1px solid #C9D8F5;border-radius:8px;padding:8px 10px}
.pin-mbx .mbx-imap .mbx-help a{font-weight:600}
.pin-mbx .mbx-imap .mbx-acts{justify-content:flex-start}
/* Bibliothèque de prix (Paramètres → Devis & factures) */
#price-library-sec .ds-hint{margin:0 0 10px;font-size:13px;color:#5B6778;max-width:640px}
#price-library-sec .plib-row{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
#price-library-sec .plib-file{display:inline-flex;align-items:center;cursor:pointer;padding:8px 12px;border:1px solid #CBD5E1;border-radius:8px;background:#fff;font-size:13px;font-weight:600}
#price-library-sec .plib-status{display:block;margin-top:8px;color:#1F2937}
.pin-mbx .mbx-imap .mbx-state{flex:none}
/* Adresse de transfert : option secondaire, repliée */
.pin-alt{margin:8px 0 4px;font-size:13px;color:#5B6778}
.pin-alt summary{cursor:pointer;font-weight:600;color:#1557B0;padding:4px 0}
.pin-alt p{margin:6px 0;max-width:640px}
.pin-alt .pin-addr{display:inline-flex}
/* Devis façon Vertuoza : colonne Article, description plus large */
body #devis-builder-view .vze-table th.vze-art-h,body #devis-builder-view .vze-table td.vze-art{width:86px;padding-left:4px!important;padding-right:4px!important}
body #devis-builder-view .vze-row .vze-in.vze-art-in{width:80px;font-size:12px;color:#5B6178}
body #devis-builder-view .vze-cat{flex:0 0 104px}
body #devis-builder-view .vze-table th:nth-child(4),body #devis-builder-view .vze-table th:nth-child(5),body #devis-builder-view .vze-table th:nth-child(6),body #devis-builder-view .vze-table th:nth-child(7),body #devis-builder-view .vze-table th:nth-child(8),body #devis-builder-view .vze-table th:nth-child(9),body #devis-builder-view .vze-table th:nth-child(10){width:auto}
/* Propositions de la bibliothèque : chaque valeur dans sa colonne */
.plib-pop{position:fixed;z-index:9999;max-height:340px;overflow-y:auto;background:#fff;border:1px solid #D5DBE8;border-radius:8px;box-shadow:0 12px 32px rgba(11,31,58,.18);font-size:13px;color:#1B1F3B}
.plib-pop[hidden]{display:none}
.plib-head,.plib-opt{display:grid;grid-template-columns:46px minmax(0,1fr) 70px 96px;align-items:center;gap:10px;padding:7px 12px}
.plib-head{position:sticky;top:0;background:#F5F7FB;border-bottom:1px solid #E3E8F2;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.03em;color:#5B6178}
.plib-head span:nth-child(3),.plib-head span:nth-child(4){text-align:right}
.plib-opt{cursor:pointer;border-bottom:1px solid #F0F2F7}
.plib-opt:hover,.plib-opt.is-active{background:#EEF3FF}
.plib-k{display:inline-block;min-width:38px;text-align:center;font-size:11px;font-weight:700;padding:2px 4px;border-radius:4px;background:#E8EDFB;color:#0B3FD6}
.plib-k-main_oeuvre{background:#FFF1E0;color:#B45309}
.plib-k-materiau{background:#E7F6EC;color:#1E7B45}
.plib-n{min-width:0;line-height:1.3;white-space:normal}
.plib-n small{display:block;color:#7A8199;font-size:11.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.plib-u{text-align:right;color:#3A4160}
.plib-p{text-align:right;font-weight:700;font-variant-numeric:tabular-nums}
body #devis-builder-view .vze-row input.vze-in.vze-art-in{width:78px!important;min-width:78px!important;padding:0 6px!important}
/* Colonnes chiffrées un peu plus serrées : plus de place pour la désignation */
body #devis-builder-view .vze-row .vze-in.vze-r{width:78px}
body #devis-builder-view .vze-table td.vze-unit{width:100px}
body #devis-builder-view .vze-unit-box{width:96px}
body #devis-builder-view .vze-pu{width:92px}
body #devis-builder-view .vze-table td.vze-money{width:100px}
body #devis-builder-view .vze-table td.vze-tva{width:62px}
body #devis-builder-view .vze-table td.vze-desc{min-width:380px}
body #devis-builder-view .vze-table th.vze-art-h,body #devis-builder-view .vze-table td.vze-art{width:70px}
body #devis-builder-view .vze-row input.vze-in.vze-art-in{width:64px!important;min-width:64px!important}
body #devis-builder-view .vze-cat{flex:0 0 92px}
body #devis-builder-view .vze-table td.vze-money{width:96px}
body #devis-builder-view .vze-table td{padding-left:5px;padding-right:5px}
/* Aperçu : position / taille du logo, nom affiché ou non */
#ds-sheet[data-logo-size="small"] .ds-s-co img{max-width:66px;max-height:28px}
#ds-sheet[data-logo-size="large"] .ds-s-co img{max-width:132px;max-height:58px}
#ds-sheet[data-logo-pos="center"] .ds-s-head{flex-wrap:wrap}
#ds-sheet[data-logo-pos="center"] .ds-s-co{max-width:100%;flex:1 1 100%}
#ds-sheet[data-logo-pos="center"] .ds-s-co img{align-self:center;object-position:center;margin-bottom:8px}
#ds-sheet[data-logo-pos="right"] .ds-s-co img{position:absolute;right:16px;top:14px;object-position:right}
#ds-sheet[data-logo-pos="right"]{position:relative}
#ds-sheet[data-show-name="0"] .ds-s-co>b{display:none}
/* Devis : nouveau chantier depuis le devis */
.dc-new{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:10px 12px;border:1px dashed #9DB2E8;border-radius:8px;background:#F5F8FF;grid-column:1/-1}
.dc-new b{flex:0 0 100%;font-size:13px;color:#0B1F66}
.dc-new input{flex:1 1 240px;height:36px;padding:0 10px;border:1px solid #CBD5E1;border-radius:6px;font:inherit}
.dc-new-acts{display:flex;gap:8px}
/* Devis en étapes claires : 1 Client · 2 Chantier · 3 Document · 4 Lignes */
#devis-builder-view .vze-info.vze-info3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;padding:6px 24px 18px;align-items:start}
#devis-builder-view .vze-grp{display:flex;flex-direction:column;gap:10px;padding:14px 16px 16px;border:1px solid #E1E6F2;border-radius:10px;background:#FBFCFE}
#devis-builder-view .vze-grp h3,#devis-builder-view .vze-step{display:flex;align-items:center;gap:8px;margin:0;font-size:15px;font-weight:700;color:#0B1F3A}
#devis-builder-view .vze-grp h3 b,#devis-builder-view .vze-step b{display:inline-grid;place-items:center;width:22px;height:22px;border-radius:50%;background:#0B3FD6;color:#fff;font-size:12px}
#devis-builder-view .vze-grp .vze-field{grid-column:auto!important;width:100%;margin:0}
#devis-builder-view .vze-grp .vze-field input,#devis-builder-view .vze-grp .vze-field select{width:100%}
#devis-builder-view .vze-grp-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}
#devis-builder-view .vze-grp .vze-supp:empty{display:none}
#devis-builder-view .vze-step{padding:6px 24px 10px}
#devis-builder-view .vze-step small{font-weight:400;font-size:12.5px;color:#6B7390;margin-left:6px}
@media (max-width:1100px){#devis-builder-view .vze-info.vze-info3{grid-template-columns:1fr 1fr}}
@media (max-width:700px){#devis-builder-view .vze-info.vze-info3{grid-template-columns:1fr;padding:6px 14px 14px}#devis-builder-view .vze-step{padding:6px 14px 10px}}
/* Menu latéral lisible : le menu a un fond blanc, ses textes étaient restés clairs (prévus pour un fond foncé). */
#primary-nav{color:#33405C!important}
#primary-nav .nav-section-toggle{color:#5B6178!important}
#primary-nav .nav-section-items .nav,#primary-nav .nav-section-items .nav-sub{color:#33405C!important;font-weight:500}
#primary-nav .nav-section-items .nav:hover,#primary-nav .nav-section-items .nav-sub:hover{color:#0B1F3A!important;background:#EEF3FF!important}
#primary-nav .nav-section-items .nav.active,#primary-nav .nav-section-items .nav-sub.active{color:#0B3FD6!important;background:#E8EEFF!important;font-weight:700!important}
#primary-nav .nav-section-items .nav-group-arrow{color:#7A8199!important}
/* Dossiers : devis en bleu, factures en vert, pour les distinguer d'un coup d'œil */
.dd-row.dd-devis{box-shadow:inset 3px 0 0 #1D4ED8}
.dd-row.dd-facture{box-shadow:inset 3px 0 0 #15803D}
.dd-row.dd-devis .dd-ic{color:#1D4ED8;background:#E8EEFF}
.dd-row.dd-facture .dd-ic{color:#15803D;background:#E7F6EC}
.dd-type{display:inline-block;margin-right:6px;padding:1px 6px;border-radius:4px;font-size:10.5px;font-weight:700;text-transform:uppercase;letter-spacing:.03em;vertical-align:1px}
.dd-devis .dd-type{background:#E8EEFF;color:#1D4ED8}
.dd-facture .dd-type{background:#E7F6EC;color:#15803D}
.dd-row .dd-ic{display:inline-grid;place-items:center;width:28px;height:28px;border-radius:6px}
.dd-row.dd-devis .dd-ic svg{stroke:#1D4ED8!important}
.dd-row.dd-facture .dd-ic svg{stroke:#15803D!important}
/* Liste devis & factures : le devis en bleu, ses factures (en dessous) en vert */
.ddv-kind{display:inline-block;margin-right:6px;padding:1px 6px;border-radius:4px;font-size:10.5px;font-weight:700;text-transform:uppercase;letter-spacing:.03em;vertical-align:1px}
.ddv-kind-devis{background:#E8EEFF;color:#1D4ED8}
.ddv-kind-facture{background:#E7F6EC;color:#15803D}
tr.ddv-parent .ddv-numtxt-devis{color:#1D4ED8;font-weight:700}
tr.ddv-parent .ddv-folder svg{color:#1D4ED8;stroke:#1D4ED8}
tr.ddv-parent{box-shadow:inset 3px 0 0 #1D4ED8}
tr.ddv-child{box-shadow:inset 3px 0 0 #9BD3AE}
tr.ddv-child .ddv-numtxt-facture{color:#15803D;font-weight:600}
/* Calcul d'ouvrage (depuis une mesure du plan) */
.calc-modal{position:fixed;inset:0;z-index:10000;display:grid;place-items:center;padding:16px;background:rgba(11,31,58,.45)}
.calc-box{width:min(860px,100%);max-height:calc(100vh - 32px);display:flex;flex-direction:column;background:#fff;border-radius:12px;box-shadow:0 24px 60px rgba(11,31,58,.3);overflow:hidden}
.calc-box header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:16px 20px;border-bottom:1px solid #E3E8F2}
.calc-box header small{color:#6B7390;text-transform:uppercase;font-size:11px;font-weight:700;letter-spacing:.04em}
.calc-box header h3{margin:2px 0 0;font-size:18px;color:#0B1F3A}
.calc-x{border:0;background:none;font-size:26px;line-height:1;cursor:pointer;color:#5B6178}
.calc-opts{display:flex;flex-wrap:wrap;gap:12px;padding:14px 20px 0}
.calc-opts label{display:flex;flex-direction:column;gap:4px;font-size:12.5px;font-weight:600;color:#33405C}
.calc-opts select{min-width:320px}
.calc-opts input{width:120px}
.calc-opts select,.calc-opts input{height:36px;padding:0 8px;border:1px solid #CBD5E1;border-radius:6px;font:inherit}
.calc-base{margin:12px 20px 6px;font-size:13px;color:#5B6178}
.calc-err{margin:14px 20px;color:#B42318;font-weight:600}
.calc-table-wrap{overflow:auto;padding:0 20px}
.calc-table{width:100%;border-collapse:collapse;font-size:13px}
.calc-table th{text-align:left;padding:8px 6px;border-bottom:1px solid #E3E8F2;color:#5B6178;font-size:12px}
.calc-table td{padding:6px;border-bottom:1px solid #F0F2F7;vertical-align:middle}
.calc-table td small{display:block;color:#7A8199;font-size:11.5px;margin-top:2px;max-width:420px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.calc-table td small.calc-noprice{color:#B45309}
.calc-table input{width:96px;height:32px;padding:0 6px;border:1px solid #D5DBE8;border-radius:5px;text-align:right;font:inherit}
.calc-num{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.calc-table tfoot td{font-weight:700;border-top:2px solid #0B1F3A}
.calc-box footer{display:flex;justify-content:flex-end;gap:10px;padding:14px 20px;border-top:1px solid #E3E8F2;margin-top:10px}
/* Lecture de plan */
.plans-steps{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;list-style:none;margin:0 0 16px;padding:0}
.plans-steps li{display:flex;gap:10px;align-items:flex-start;padding:12px 14px;border:1px solid #E1E6F2;border-radius:10px;background:#fff}
.plans-steps b{flex:0 0 24px;display:grid;place-items:center;height:24px;border-radius:50%;background:#0B3FD6;color:#fff;font-size:12px}
.plans-steps span{display:flex;flex-direction:column;font-size:12.5px;color:#5B6178}
.plans-steps strong{font-size:14px;color:#0B1F3A}
.plans-table{width:100%;border-collapse:collapse;font-size:14px}
.plans-table th{text-align:left;padding:10px;border-bottom:1px solid #E3E8F2;color:#5B6178;font-size:12.5px}
.plans-table td{padding:10px;border-bottom:1px solid #F0F2F7;vertical-align:middle}
.plans-table td small{display:block;color:#7A8199}
.plans-table td:last-child{text-align:right}
.plans-empty{display:flex;flex-direction:column;gap:4px;padding:24px;text-align:center;color:#5B6178}
@media (max-width:900px){.plans-steps{grid-template-columns:1fr 1fr}}
.dc-free{display:flex;flex-direction:column;gap:8px;padding:10px 12px;border-radius:8px;background:#FFF8EB;border:1px solid #F5D9A8}
.dc-free[hidden]{display:none}
.dc-free p{margin:0;font-size:12.5px;color:#7A4B00}
.dc-choice-msg{margin:14px 20px 6px;font-size:14px;color:#33405C}
.dc-choice-list{display:flex;flex-direction:column;gap:10px;padding:8px 20px 20px}
.dc-opt{display:flex;flex-direction:column;gap:3px;text-align:left;padding:12px 14px;border:1px solid #D5DBE8;border-radius:10px;background:#fff;cursor:pointer;font:inherit}
.dc-opt b{font-size:14.5px;color:#0B1F3A}.dc-opt span{font-size:12.5px;color:#5B6178}
.dc-opt:hover{border-color:#0B3FD6;background:#F5F8FF}
.dc-opt.is-reco{border-color:#0B3FD6;box-shadow:0 0 0 2px rgba(11,63,214,.12)}
.dc-opt.is-danger b{color:#B42318}
.calc-remember{display:flex;align-items:center;gap:6px;margin-right:auto;font-size:12.5px;color:#33405C;max-width:420px}
.calc-own{font-style:normal;font-size:10.5px;font-weight:700;color:#0B3FD6;background:#E8EEFF;padding:1px 5px;border-radius:4px;margin-left:4px}
.calc-box footer .secondary,.calc-box footer .primary{white-space:nowrap}

/* Boîte mail — version compacte (v153) */
#pin-panel{padding:12px 16px !important}
#pin-panel .pin-head h3{font-size:14px;line-height:1.3}
#pin-panel .pin-head small{font-size:12px;margin-top:1px;max-width:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#pin-panel .pin-mbx{margin:8px 0 2px;padding:6px 6px 6px 12px;gap:10px;border-radius:8px}
#pin-panel .pin-mbx.is-on{background:#F3FAF5;border-color:#CDEBD7}
#pin-panel .pin-mbx.is-error{background:#FEF3F2;border-color:#FAD3CF}
#pin-panel .mbx-line{display:flex;flex-direction:row;align-items:center;gap:8px;flex:1 1 300px;min-width:0;flex-wrap:nowrap}
#pin-panel .mbx-line b{font-size:13px;white-space:nowrap}
#pin-panel .mbx-line .mbx-mail{font-size:13px;font-weight:500;color:#1F2937}
#pin-panel .mbx-line small{font-size:12px;color:#6B7280;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#pin-panel .mbx-dot{flex:0 0 8px;width:8px;height:8px;border-radius:50%;background:#22A05A;box-shadow:0 0 0 3px rgba(34,160,90,.15)}
#pin-panel .pin-mbx.is-error .mbx-dot{background:#D92D20;box-shadow:0 0 0 3px rgba(217,45,32,.15)}
#pin-panel .pin-mbx .mbx-acts{gap:6px}
#pin-panel .pin-mbx .mbx-acts>button{margin:0;min-height:28px;padding:3px 10px;font-size:12.5px;border-radius:6px}
#pin-panel .pin-alt{margin:4px 0 0;font-size:12px}
#pin-panel .pin-alt summary{padding:2px 0;font-weight:500}
#pin-panel .pin-empty{margin-top:4px;font-size:12px;color:#8A94A3}
@media (max-width:640px){#pin-panel .mbx-line{flex-wrap:wrap}#pin-panel .pin-head small{white-space:normal}}

/* Dépenses — tableau fin (v153) : lignes minces, montant entier visible */
#purchases-view .section-head h2{font-size:26px}
#purchases-view .pv-tabs{margin:0 0 10px}
#purchases-view .pv-tabs button{padding:8px 12px;font-size:13.5px;border-bottom-width:2px}
#purchases-view .rg-toolbar{gap:8px;margin-bottom:8px}
#purchases-view .rg-toolbar input,#purchases-view .rg-toolbar select{min-height:34px;height:34px;padding-top:4px;padding-bottom:4px;font-size:13px}
#purchases-view .pur-table{border-radius:8px}
#purchases-view .pur-table .rg-head{padding-top:7px;padding-bottom:7px;font-size:12px;color:#5B6778;font-weight:600;background:#FAFBFC}
#purchases-view .pur-table .rg-head,#purchases-view .pur-row{grid-template-columns:minmax(0,2fr) 130px minmax(0,1.3fr) 92px 170px 64px}
#purchases-view .pur-row{padding-top:5px;padding-bottom:5px;min-height:0;border-bottom:1px solid #EEF1F5;font-size:13px}
#purchases-view .pur-row:last-child{border-bottom:0}
#purchases-view .pur-row strong{font-size:13px;font-weight:600}
#purchases-view .pur-row .rg-sub{font-size:11.5px;line-height:1.3}
#purchases-view .pur-ic{width:24px;height:24px;border-radius:6px;font-size:11px}
#purchases-view .pur-row .rg-amount{white-space:nowrap;overflow:visible;font-size:13px}
#purchases-view .pur-row .rg-amount small{display:block;font-size:11px;white-space:nowrap}
#purchases-view .pur-row .rg-icon{width:28px;height:28px}
#purchases-view .pur-row .document-more summary{width:28px;height:28px;min-height:28px}
#purchases-view .rg-foot{margin-top:6px;font-size:12.5px}
@media(max-width:1180px){#purchases-view .pur-table .rg-head,#purchases-view .pur-row{grid-template-columns:minmax(0,2fr) 120px 92px 160px 64px}}
main #purchases-view .rg-toolbar select,main #purchases-view .rg-search input{height:34px!important;min-height:34px!important;font-size:13px!important}
#purchases-view .pur-table .rg-head{min-height:0}
#purchases-view .pur-row .rg-name strong{display:block;line-height:1.25}
#purchases-view .pur-row .rg-sub{display:block;line-height:1.2;margin-top:0}
#purchases-view .pur-row .rg-amount{line-height:1.25}
main #purchases-view .pur-table .rg-head{min-height:0!important;height:auto!important;padding-top:6px!important;padding-bottom:6px!important}

/* Dépenses — format « Factures fournisseurs » (v154) */
#purchases-view .pur-table .rg-head,#purchases-view .pur-row{grid-template-columns:92px 86px 112px minmax(0,1.6fr) minmax(0,1.1fr) 104px 104px 118px 60px!important;column-gap:12px}
#purchases-view .pur-row{min-height:38px!important;padding-top:4px!important;padding-bottom:4px!important}
#purchases-view .pur-row .rg-name strong{font-weight:500}
#purchases-view .pur-num{font-variant-numeric:tabular-nums;color:#344054;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#purchases-view .pur-type{color:#344054}
#purchases-view .rg-head .rg-num{text-align:right}
#purchases-view .pur-row .rg-num{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
#purchases-view .pur-st{display:flex;flex-direction:column;align-items:center;gap:1px}
#purchases-view .pst{display:inline-block;padding:2px 9px;border-radius:999px;font-size:11.5px;font-weight:600;line-height:1.5;white-space:nowrap}
#purchases-view .pst-ok{background:#DDF4E4;color:#15703A}
#purchases-view .pst-part{background:#FFF1C2;color:#8A5A00}
#purchases-view .pst-due{background:#FDE0DC;color:#B42318}
#purchases-view .pst-sub{font-size:10.5px;color:#6B7280;white-space:nowrap}
#purchases-view .pur-foot{display:flex;align-items:center;gap:16px;flex-wrap:wrap}
#purchases-view .pur-totals{display:flex;gap:22px;margin-left:auto}
#purchases-view .pur-totals span{display:flex;flex-direction:column;align-items:flex-end;line-height:1.2}
#purchases-view .pur-totals small{font-size:11px;color:#6B7280}
#purchases-view .pur-totals b{font-size:13px;color:#101828;font-variant-numeric:tabular-nums}
#purchases-view .pur-totals .is-due b{color:#B42318}
#purchases-view .pur-more{position:relative}
#purchases-view .pur-more summary{display:grid;place-items:center;width:36px;height:36px;border:1px solid #D0D5DD;border-radius:8px;background:#fff;cursor:pointer;list-style:none;font-size:18px;color:#344054;position:relative}
#purchases-view .pur-more summary::-webkit-details-marker{display:none}
#purchases-view .pur-more summary i{position:absolute;top:-6px;right:-6px;min-width:16px;height:16px;padding:0 4px;border-radius:8px;background:#D92D20;color:#fff;font-size:10px;font-style:normal;line-height:16px;text-align:center}
#purchases-view .pur-more summary i:empty{display:none}
#purchases-view .pur-more .document-more-menu{right:0;left:auto;min-width:220px}
@media(max-width:1180px){#purchases-view .pur-table .rg-head,#purchases-view .pur-row{grid-template-columns:86px 112px minmax(0,1.6fr) 104px 118px 60px!important}#purchases-view .pur-table .rg-head span:nth-child(1),#purchases-view .pur-row>.pur-num,#purchases-view .pur-table .rg-head span:nth-child(5),#purchases-view .pur-row>.rg-muted,#purchases-view .pur-table .rg-head span:nth-child(6),#purchases-view .pur-row>.rg-num:not(.rg-amount){display:none}}
@media(max-width:760px){#purchases-view .pur-row{grid-template-columns:minmax(0,1fr) auto!important}#purchases-view .pur-row>.rg-cell{display:none}#purchases-view .pur-row>.rg-amount{display:block;grid-column:2;grid-row:1}#purchases-view .pur-row .rg-act{grid-column:2;grid-row:2}#purchases-view .pur-totals{margin-left:0;gap:14px}}
#purchases-view .pur-table .rg-head span{text-align:left!important}
#purchases-view .pur-table .rg-head span.rg-num{text-align:right!important}
#purchases-view .pur-table .rg-head span:nth-child(8){text-align:center!important}
#purchases-view .section-head .rg-export select{height:36px!important;min-height:36px!important;font-size:13px!important;padding-top:0!important;padding-bottom:0!important}
#purchases-view .section-head .worker-add-toggle{min-height:36px;height:36px;padding:0 14px}

/* Budget du chantier : même tableau fin que Dépenses (v154) */
.budget-breakdown-table th{padding:6px 12px;font-size:11.5px;text-transform:none;letter-spacing:0;font-weight:600;color:#5B6778;background:#FAFBFC;border-bottom:1px solid #E4E7EC}
.budget-breakdown-table td{padding:6px 12px;border-bottom:1px solid #EEF1F5;font-size:13px;font-variant-numeric:tabular-nums}
.budget-breakdown-table .budget-breakdown-total-row td{font-weight:700;background:#F8FAFC;border-bottom:0}
.bb-purchases{margin-top:16px}
.bb-p-head h4{margin:0 0 8px;font-size:14px;color:#1D2D3E;display:flex;align-items:center;gap:8px}
.bb-p-head h4 span{font-size:11px;font-weight:600;color:#475467;background:#EEF2F7;border-radius:999px;padding:1px 8px}
.bb-table{border:1px solid #E4E7EC;border-radius:8px;overflow:visible;background:#fff}
.bb-table .rg-head,.bb-table .pur-row{display:grid;align-items:center;column-gap:12px;grid-template-columns:92px 86px 112px minmax(0,1.6fr) 0 104px 104px 118px 60px}
.bb-table .rg-head{padding:6px 14px;font-size:12px;font-weight:600;color:#5B6778;background:#FAFBFC;border-bottom:1px solid #E4E7EC;border-radius:8px 8px 0 0}
.bb-table .rg-head span:nth-child(5),.bb-table .pur-row>.rg-muted{visibility:hidden;overflow:hidden}
.bb-table .rg-head .rg-num{text-align:right}.bb-table .rg-head span:nth-child(8){text-align:center}
.bb-table .pur-row{min-height:38px;padding:4px 14px;border-bottom:1px solid #EEF1F5;font-size:13px;background:#fff;position:relative}
.bb-table .pur-row:last-child{border-bottom:0;border-radius:0 0 8px 8px}
.bb-table .pur-row strong{display:block;font-size:13px;font-weight:500;line-height:1.25}
.bb-table .pur-row .rg-sub{display:block;font-size:11.5px;line-height:1.2;color:#8A94A6}
.bb-table .pur-row .rg-num{text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}
.bb-table .rg-amount{font-weight:600}
.bb-table .pur-st{display:flex;flex-direction:column;align-items:center;gap:1px}
.bb-table .pst{display:inline-block;padding:2px 9px;border-radius:999px;font-size:11.5px;font-weight:600;line-height:1.5;white-space:nowrap}
.bb-table .pst-ok{background:#DDF4E4;color:#15703A}.bb-table .pst-part{background:#FFF1C2;color:#8A5A00}.bb-table .pst-due{background:#FDE0DC;color:#B42318}
.bb-table .pst-sub{font-size:10.5px;color:#6B7280;white-space:nowrap}
.bb-table .rg-act{display:flex;align-items:center;justify-content:flex-end;gap:2px}
.bb-purchases .pur-foot{display:flex;justify-content:flex-end;margin-top:6px}
.bb-purchases .pur-totals{display:flex;gap:22px}
.bb-purchases .pur-totals span{display:flex;flex-direction:column;align-items:flex-end;line-height:1.2}
.bb-purchases .pur-totals small{font-size:11px;color:#6B7280}.bb-purchases .pur-totals b{font-size:13px;font-variant-numeric:tabular-nums}
@media(max-width:900px){.bb-table .rg-head{display:none}.bb-table .pur-row{grid-template-columns:minmax(0,1fr) auto}.bb-table .pur-row>.rg-cell{display:none}.bb-table .pur-row>.rg-amount{display:block;grid-column:2;grid-row:1}.bb-table .pur-row .rg-act{grid-column:2;grid-row:2}}
#chantier-view[data-gc-pane] .chantier-layout{display:block!important}

.bb-purchases .rg-act{display:flex;justify-content:flex-end;align-items:center;gap:2px;position:relative}
.bb-purchases .rg-icon,.bb-purchases .rg-act>details>summary{display:grid;place-items:center;width:32px;height:32px;padding:0!important;margin:0;border:0!important;border-radius:7px!important;background:transparent!important;color:#5B6678;cursor:pointer;list-style:none;font-size:18px;line-height:1;box-shadow:none!important;min-height:0!important}
.bb-purchases .rg-act>details>summary::-webkit-details-marker{display:none}
.bb-purchases .rg-act>details>summary::before,.bb-purchases .rg-act>details>summary::after{content:none!important;display:none!important}
.bb-purchases .rg-icon:hover,.bb-purchases .rg-act>details>summary:hover,.bb-purchases .rg-act>details[open]>summary{background:#EEF2F7!important;color:#0B1F3A}
.bb-purchases .rg-icon svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.bb-purchases .rg-act>details{position:static;margin:0;border:0;background:none;padding:0}
.bb-purchases .rg-act .document-more-menu{position:absolute;right:0;top:calc(100% + 6px);z-index:30;min-width:240px;margin:0;padding:6px;display:grid;gap:2px;background:#fff;border:1px solid #E2E6EC;border-radius:9px;box-shadow:0 12px 32px rgba(16,24,40,.14)}
.bb-purchases .rg-act .document-more-menu button{justify-content:flex-start;width:100%;height:34px;padding:0 10px!important;border:0!important;background:transparent!important;font-size:13px!important;font-weight:500;text-align:left;border-radius:6px!important;color:#344054}
.bb-purchases .rg-act .document-more-menu button:hover{background:#F2F4F7!important}
.bb-purchases .rg-act .document-more-menu .delete-document,.bb-purchases .rg-act .document-more-menu .danger{color:#B42318!important}
.bb-table .pur-type{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bb-table .rg-head,.bb-table .pur-row{grid-template-columns:92px 86px 130px minmax(0,1.6fr) 104px 104px 118px 64px}
.bb-table .rg-head span:nth-child(5),.bb-table .pur-row>.rg-muted{display:none!important}
#budget-breakdown-panel .budget-breakdown-table th{text-align:right!important;padding:6px 12px!important}
#budget-breakdown-panel .budget-breakdown-table th:first-child,#budget-breakdown-panel .budget-breakdown-table td:first-child{text-align:left!important}
#budget-breakdown-panel .budget-breakdown-table td{padding:5px 12px!important;height:auto!important}
#budget-breakdown-panel .budget-breakdown-table{border:1px solid #E4E7EC;border-radius:8px;border-collapse:separate;border-spacing:0;overflow:hidden}
.ddv-menu button.ddv-danger{color:#B42318}.ddv-menu button.ddv-danger:hover{background:#FEF3F2;color:#912018}
.plans-sub{margin:18px 0 8px;font-size:14px;color:#1D2D3E;display:flex;align-items:center;gap:8px}.plans-sub span{font-size:11px;font-weight:600;color:#475467;background:#EEF2F7;border-radius:999px;padding:1px 8px}

/* Documents : un dossier par chantier, une groupe par sorte (v156) */
#documents-list-panel.dfo-mode .rg-tabs,#documents-list-panel.dfo-mode #doc-subtypes,#documents-list-panel.dfo-mode .doc-table,#documents-list-panel.dfo-mode .rg-foot,#documents-list-panel.dfo-mode .rg-toolbar select,#documents-list-panel.dfo-mode .rg-toolbar .icon-button{display:none!important}
#documents-list-panel.dfo-mode .rg-toolbar{margin-bottom:10px}
.dfo-wrap{display:flex;flex-direction:column;gap:10px}
.dfo{border:1px solid #E4E7EC;border-radius:10px;background:#fff}
.dfo>summary{display:flex;align-items:center;gap:10px;padding:10px 14px;cursor:pointer;list-style:none;flex-wrap:wrap}
.dfo>summary::-webkit-details-marker{display:none}
.dfo>summary::before{content:'';width:7px;height:7px;border-right:2px solid #667085;border-bottom:2px solid #667085;transform:rotate(-45deg);transition:transform .15s;margin-right:2px}
.dfo[open]>summary::before{transform:rotate(45deg)}
.dfo-ic svg{width:20px;height:20px;fill:#E8EEFF;stroke:#1640D6;stroke-width:1.6;stroke-linejoin:round;display:block}
.dfo>summary b{font-size:14px;color:#101828}
.dfo-count{font-size:12px;color:#667085}
.dfo-chips{display:flex;gap:6px;flex-wrap:wrap;margin-left:auto}
.dfo-chips i{font-style:normal;font-size:11px;color:#475467;background:#F2F4F7;border-radius:999px;padding:2px 8px}
.dfo[open]>summary .dfo-chips{display:none}
.dfo-g{margin:0 14px 10px;border-top:1px solid #EEF1F5}
.dfo-g:first-of-type{border-top:0}
.dfo-g>summary{display:flex;align-items:center;gap:8px;padding:8px 0 6px;font-size:13px;font-weight:600;color:#344054;cursor:pointer;list-style:none}
.dfo-g>summary::-webkit-details-marker{display:none}
.dfo-g>summary em{font-style:normal;font-size:11px;font-weight:600;color:#475467;background:#EEF2F7;border-radius:999px;padding:0 7px}
.dfo-list{display:flex;flex-direction:column;border:1px solid #EEF1F5;border-radius:8px;overflow:visible}
.dfo-list .doc-row{display:grid;grid-template-columns:minmax(0,2.4fr) 150px 0 96px 70px 104px;align-items:center;column-gap:12px;min-height:38px;padding:4px 12px;border-bottom:1px solid #EEF1F5;font-size:13px;position:relative;background:#fff}
.dfo-list .doc-row:last-child{border-bottom:0}
.dfo-list .doc-row>.rg-muted{display:none}
.dfo-list .doc-row .rg-name{display:flex;align-items:center;gap:10px;min-width:0}
.dfo-list .doc-row .rg-name>div{min-width:0}
.dfo-list .doc-row .rg-name strong{display:block;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dfo-list .doc-row .rg-name small{display:block}
.dfo-list .doc-row .rg-num{text-align:right;color:#667085;font-variant-numeric:tabular-nums}
.dfo-list .doc-row .document-explanation{grid-column:1/-1}
.dfo-g.is-photos .dfo-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:10px;border:0}
.dfo-g.is-photos .doc-row{display:flex;flex-direction:column;align-items:stretch;padding:0;border:1px solid #E4E7EC;border-radius:8px;overflow:hidden;min-height:0}
.dfo-g.is-photos .doc-row[hidden]{display:none}
.dfo-g.is-photos .doc-row>.rg-cell{display:none}
.dfo-g.is-photos .rg-name{flex-direction:column;align-items:stretch;gap:0}
.dfo-g.is-photos .document-thumb{width:100%;aspect-ratio:4/3;object-fit:cover;display:block;border-bottom:1px solid #E4E7EC;background:#F2F4F7}
.dfo-g.is-photos .rg-name>div{padding:6px 10px 0}
.dfo-g.is-photos .rg-name strong{font-size:12px}
.dfo-g.is-photos .rg-act{justify-content:flex-end;padding:2px 6px 4px}
.dfo-list .doc-row[hidden]{display:none}
.dfo-wrap .rg-act{display:flex;justify-content:flex-end;align-items:center;gap:2px;position:relative}
.dfo-wrap .rg-icon,.dfo-wrap .rg-act>details>summary{display:grid;place-items:center;width:30px;height:30px;padding:0;margin:0;border:0;border-radius:7px;background:transparent;color:#5B6678;cursor:pointer;list-style:none;font-size:18px;line-height:1}
.dfo-wrap .rg-act>details>summary::-webkit-details-marker{display:none}
.dfo-wrap .rg-icon:hover,.dfo-wrap .rg-act>details>summary:hover{background:#EEF2F7;color:#0B1F3A}
.dfo-wrap .rg-icon svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.dfo-wrap .rg-act>details{position:static}
.dfo-wrap .rg-act .document-more-menu{position:absolute;right:0;top:calc(100% + 4px);z-index:30;min-width:220px;padding:6px;display:grid;gap:2px;background:#fff;border:1px solid #E2E6EC;border-radius:9px;box-shadow:0 12px 32px rgba(16,24,40,.14)}
.dfo-wrap .rg-act .document-more-menu button{justify-content:flex-start;width:100%;height:32px;padding:0 10px;border:0;background:transparent;font-size:13px;text-align:left;border-radius:6px;color:#344054}
.dfo-wrap .rg-act .document-more-menu button:hover{background:#F2F4F7}
.dfo-wrap .rg-act .document-more-menu .delete-document{color:#B42318}
@media(max-width:760px){.dfo-list .doc-row{grid-template-columns:minmax(0,1fr) auto}.dfo-list .doc-row>.rg-cell{display:none}.dfo-chips{display:none}}
.dfo-list .doc-row{grid-template-columns:minmax(0,1fr) 96px 72px 110px}
.dfo-list .doc-row>.rg-cell:nth-of-type(1){display:none}
#documents-view .dfo-list .doc-row{grid-template-columns:minmax(0,1fr) 96px 72px 110px!important}
#documents-view .dfo-list .doc-row>.rg-cell:nth-of-type(3),#documents-view .dfo-list .doc-row>.rg-cell:nth-of-type(4){display:block!important}
@media(max-width:760px){#documents-view .dfo-list .doc-row{grid-template-columns:minmax(0,1fr) auto!important}#documents-view .dfo-list .doc-row>.rg-cell{display:none!important}}

/* Factures clients — lignes fines (v157) */
#factures-view .fxf{padding:0;border:0;background:none;margin:0 0 10px}
#factures-view .fxf-kpis{grid-template-columns:150px repeat(5,minmax(0,1fr));margin:0;border-radius:8px;background:#fff}
#factures-view .fxf-k{padding:6px 12px}
#factures-view .fxf-k small{font-size:11px}
#factures-view .fxf-k b{font-size:15px;margin:0}
#factures-view .fxf-k span{font-size:11px}
#factures-view .fxf-title{background:#F8FAFC}#factures-view .fxf-title b{font-size:12.5px;font-weight:600;color:#344054}
#factures-view .fxf-more{display:flex;gap:16px;flex-wrap:wrap;margin-top:4px}
#factures-view .fxf-all{margin:0;font-size:12.5px}
#factures-view .fxf-all summary{padding:2px 0;font-weight:500}
#factures-view .fxf-all[open]{flex-basis:100%}
#factures-view .fxf-risk summary{color:#B54708}
#factures-view .fx-head,#factures-view .fx-row{grid-template-columns:minmax(190px,1.1fr) minmax(0,1.6fr) 120px 100px 120px 100px 100px!important}
#factures-view .fx-head{height:32px!important;font-size:12px}
#factures-view .fx-row{min-height:40px!important;padding:3px 14px!important}
#factures-view .fx-num-stack strong{font-family:inherit!important;font-size:13px!important;font-weight:600;letter-spacing:0!important}
#factures-view .fx-num-stack small{font-size:11px!important;line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}
#factures-view .fx-c-num .fx-doc{width:16px;height:16px}
#factures-view .fx-c-client span{font-size:13px}
#factures-view .fx-c-client small{font-size:11px}
#factures-view .fx-c-amt,#factures-view .fx-c-date{font-size:13px;font-variant-numeric:tabular-nums}
#factures-view .fxv-chip{height:22px!important;font-size:11.5px!important;border-radius:999px!important;max-width:120px;padding:0 9px!important}
#factures-view .fx-c-notes{padding-top:0!important;margin-top:-2px}
#factures-view .fx-c-notes small{font-size:11px!important}
#factures-view .fx-icon-btn,#factures-view .ft-toggle>summary,#factures-view .fx-c-act .document-more>summary{width:28px!important;height:28px!important;min-height:28px!important}
#factures-view .fxv-hint{font-size:11.5px!important;margin:2px 0 8px!important;color:#8A94A6}
#factures-view .fx-toolbar select,#factures-view .fx-toolbar input,#factures-view .rg-toolbar select,#factures-view .rg-toolbar input{height:34px!important;min-height:34px!important;font-size:13px!important}
body #factures-view .fx-head{height:32px!important}
body #factures-view .fx-row{min-height:40px!important;padding:3px 14px!important}
body #factures-view .fx-num-stack strong,body #factures-view .fx-c-num strong{font-family:inherit!important;font-size:13px!important;font-weight:600!important;letter-spacing:0!important}
body #factures-view .fx-head,body #factures-view .fx-row{grid-template-columns:minmax(180px,1fr) minmax(0,1.5fr) 120px 100px 120px 100px 100px!important;column-gap:12px!important}
body #factures-view .fx-head span{font-size:12px!important;color:#5B6778!important}
body #factures-view .fx-toolbar input,body #factures-view .fx-toolbar select{height:34px!important;font-size:13px!important}
body #factures-view .fxv-chip{height:22px!important;font-size:11.5px!important;border-radius:999px!important;max-width:110px!important;padding:0 9px!important}

/* ===== Mobile (téléphone) — v158 ===== */
@media (max-width:760px){
 html,body{overflow-x:hidden}
 main .view{max-width:100vw}
 /* En-têtes de page : titre puis actions sur une ligne pleine largeur */
 main .rg-page .section-head,main .view>.section-head{display:flex!important;flex-wrap:wrap;align-items:flex-start;gap:8px 10px}
 main .rg-page .section-head>div:first-child{flex:1 1 auto;min-width:0}
 main .rg-page .section-head h2{font-size:22px!important;line-height:1.2}
 main .rg-page .section-head>span{flex:1 1 100%;font-size:12.5px;color:#667085}
 main .rg-page .section-head .rg-actions{flex:1 1 100%;display:flex!important;gap:8px;align-items:center;flex-wrap:nowrap}
 main .rg-page .section-head .rg-actions>*{margin:0!important}
 main .rg-page .section-head .rg-actions .primary{margin-left:auto!important;white-space:nowrap}
 #purchases-view .section-head .rg-export{flex:1 1 auto;min-width:0;width:auto!important}
 #purchases-view .section-head .rg-export select{width:100%!important}
 /* Barres de filtres : champs pleine largeur, 2 par ligne */
 main .rg-page .rg-toolbar{display:flex!important;flex-wrap:wrap;gap:8px}
 main .rg-page .rg-toolbar .rg-search{flex:1 1 100%!important}
 main .rg-page .rg-toolbar select{flex:1 1 calc(50% - 4px)!important;min-width:0!important;width:auto!important}
 /* Onglets qui défilent sans casser la page */
 .pv-tabs,.rg-tabs,.gc-tabs{overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch}
 .pv-tabs::-webkit-scrollbar,.rg-tabs::-webkit-scrollbar,.gc-tabs::-webkit-scrollbar{display:none}
 /* Dépenses : une ligne = fournisseur + montant, actions à droite */
 #purchases-view .pur-row{grid-template-columns:minmax(0,1fr) auto auto!important;column-gap:6px;padding:8px 12px!important}
 #purchases-view .pur-row>.rg-name{grid-column:1;grid-row:1}
 #purchases-view .pur-row>.rg-amount{display:block!important;grid-column:2;grid-row:1;font-weight:600}
 #purchases-view .pur-row .rg-act{grid-column:3;grid-row:1}
 #purchases-view .pur-row>.pur-st{display:flex!important;grid-column:1/-1;grid-row:2;flex-direction:row;justify-content:flex-start;gap:6px}
 #purchases-view .pur-row>.pur-st:empty{display:none!important}
 #purchases-view .pur-foot{flex-direction:column;align-items:stretch}
 #purchases-view .pur-totals{justify-content:space-between;margin:0}
 /* Factures clients : prévisions en 2 colonnes, lignes en carte compacte */
 #factures-view .fxf-kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 #factures-view .fxf-title{display:none}
 #factures-view .fxf-k{border-left:0!important;border-top:1px solid #EEF1F5}
 #factures-view .fxf-k:nth-child(even){border-right:1px solid #EEF1F5}
 #factures-view .fxf-k b{font-size:14px!important}
 body #factures-view .fx-row{grid-template-columns:minmax(0,1fr) auto!important;row-gap:2px!important;padding:8px 12px!important}
 body #factures-view .fx-c-num{grid-column:1;grid-row:1}
 body #factures-view .fx-c-amt{grid-column:2;grid-row:1;text-align:right;font-weight:600}
 body #factures-view .fx-c-client{grid-column:1;grid-row:2;min-width:0}
 body #factures-view .fx-c-client span{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:12.5px!important;color:#475467}
 body #factures-view .fx-c-pay{grid-column:2;grid-row:2;justify-self:end}
 body #factures-view .fx-c-send,body #factures-view .fx-c-date{display:none!important}
 body #factures-view .fx-c-act{grid-column:1/-1;grid-row:3;justify-content:flex-end}
 body #factures-view .fx-c-notes{grid-column:1/-1!important;grid-row:4}
 /* Devis & factures : colonnes essentielles seulement */
 .ddv-table th:nth-child(3),.ddv-table td:nth-child(3),.ddv-table th:nth-child(4),.ddv-table td:nth-child(4){display:none}
 .ddv-table{min-width:0!important;width:100%}
 .ddv-bar{flex-wrap:wrap;gap:8px}
 /* Lecture de plan : chaque plan en carte */
 .plans-table,.plans-table tbody,.plans-table tr,.plans-table td{display:block;width:100%}
 .plans-table thead{display:none}
 .plans-table tr{border:1px solid #E4E7EC;border-radius:10px;padding:10px 12px;margin-bottom:8px;background:#fff}
 .plans-table td{padding:2px 0!important;border:0!important;font-size:13px;color:#475467}
 .plans-table td:first-child{font-size:14px;color:#101828}
 .plans-table td:last-child{padding-top:8px!important}
 .plans-table td:last-child .primary{width:100%;min-height:38px}
 .plans-steps{grid-template-columns:1fr 1fr!important;gap:8px!important}
 /* Documents */
 .dfo>summary{padding:10px 12px}
 .dfo-g{margin:0 10px 8px}
 .dfo-g.is-photos .dfo-list{grid-template-columns:repeat(2,minmax(0,1fr))}
 #documents-view .dfo-list .doc-row{padding:6px 10px!important}
 /* Chantiers : filtres pleine largeur */
 .gc-head .gc-filter,.gc-head select,.gc-head input{flex:1 1 100%!important;width:100%!important;max-width:none!important}
 /* Budget chantier */
 .budget-breakdown-table-wrap{overflow-x:auto}
 .bb-purchases .pur-totals{justify-content:space-between;width:100%}
}
@media (max-width:760px){
 main .rg-page .section-head>div:first-child{flex:1 1 100%!important}
 #documents-view .dfo-list .doc-row{grid-template-columns:minmax(0,1fr) auto!important}
 #documents-view .dfo-list .doc-row>.rg-cell:nth-of-type(3),#documents-view .dfo-list .doc-row>.rg-cell:nth-of-type(4){display:none!important}
 #documents-view .dfo-g.is-photos .doc-row{display:flex!important}
 #documents-view .dfo-g.is-photos .doc-row>.rg-cell{display:none!important}
}
@media (max-width:760px){
 body main .view.rg-page>.section-head{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:6px!important}
 body main .view.rg-page>.section-head>*{grid-column:1!important;grid-row:auto!important;width:auto!important}
 body main .view.rg-page>.section-head>.rg-actions{display:flex!important;justify-content:flex-end;gap:8px}
 body main .view.rg-page>.section-head>.rg-actions>.rg-export{flex:1 1 auto;min-width:0}
}
@media (max-width:760px){
 body main .view.rg-page>.section-head>.rg-actions>button,body main .view.rg-page>.section-head>.rg-actions>details{flex:none!important}
 body main .view.rg-page>.section-head>.rg-actions>button.primary{padding:0 14px!important}
}
@media (max-width:760px){
 #ps-months{display:flex!important;flex-wrap:nowrap!important;overflow-x:auto;scrollbar-width:none;max-width:100%}
 #ps-months::-webkit-scrollbar{display:none}
 #ps-months .ps-mchip{flex:none}
 .worker-month-summary-table,.stv-table,#st-factures-view table{display:block;overflow-x:auto;max-width:100%;-webkit-overflow-scrolling:touch}
 #devis-view .bg-row{grid-template-columns:minmax(0,1fr) auto!important;padding:10px 12px!important}
 #devis-view .bg-row>.rg-cell:not(.bg-remaining){display:none!important}
 #devis-view .bg-row>.bg-remaining{display:block!important;grid-column:2;grid-row:1}
 #devis-view .bg-row>.rg-act{grid-column:2;grid-row:2;justify-content:flex-end}
 #time-view .section-head .rg-actions button,#time-view .section-head button{white-space:nowrap;font-size:13px!important}
}
.pur-tva-base{display:flex;gap:16px;flex-wrap:wrap;font-size:13px;margin-bottom:6px}.pur-tva-base label{display:flex;align-items:center;gap:6px;font-weight:500;cursor:pointer}
.pur-tva-edit .pur-tva-base{flex-basis:100%}.pur-tva-edit .pur-tva-base label{display:inline-flex!important;flex-direction:row!important;align-items:center!important;gap:6px!important;font-size:13px!important}.pur-tva-edit .pur-tva-base input{width:auto!important;margin:0!important;min-height:0!important;height:auto!important}

/* Budget des chantiers — même style que Factures clients (v159) */
#devis-view .bg-table{border:1px solid #E4E7EC;border-radius:8px;background:#fff;overflow:visible}
#devis-view .bg-table .rg-head,#devis-view .bg-row{grid-template-columns:minmax(220px,1.6fr) minmax(0,1fr) 112px 104px 112px 130px 112px 92px!important;column-gap:12px!important}
#devis-view .bg-table .rg-head{min-height:0!important;height:32px;padding:0 14px!important;font-size:12px;font-weight:600;color:#5B6778;background:#FAFBFC;border-bottom:1px solid #E4E7EC;border-radius:8px 8px 0 0}
#devis-view .bg-table .rg-head .rg-num{text-align:right}
#devis-view .bg-table .rg-head span:nth-child(7){text-align:center}
#devis-view .bg-row{min-height:40px!important;padding:3px 14px!important;border-bottom:1px solid #EEF1F5;font-size:13px}
#devis-view .bg-row:nth-child(even){background:#FAFBFD}
#devis-view .bg-row:hover{background:#F2F5FF}
#devis-view .bg-row:last-child{border-bottom:0}
#devis-view .bgx-name{display:flex;align-items:center;gap:10px;min-width:0}
#devis-view .bgx-name>div{min-width:0}
#devis-view .bgx-doc{flex:none;width:16px;height:16px;fill:none;stroke:#1640D6;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
#devis-view .bgx-name strong{display:block;font-size:13px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#101828}
#devis-view .bgx-name small{display:block;font-size:11px;color:#8A90A2;line-height:1.25}
#devis-view .bg-ic{display:none}
#devis-view .bgx-client{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#344054}
#devis-view .bg-row .rg-num{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
#devis-view .bg-row .bg-remaining{color:#15703A;font-weight:600}
#devis-view .bg-row .bg-remaining.is-neg{color:#B42318}
#devis-view .bgx-use{display:flex;align-items:center;gap:8px}
#devis-view .bgx-use .bg-bar{flex:1;height:5px;border-radius:3px;background:#EEF1F5;overflow:hidden}
#devis-view .bgx-use .bg-bar i{display:block;height:100%;border-radius:3px;background:#32D583}
#devis-view .bg-warn .bgx-use .bg-bar i{background:#FDB022}#devis-view .bg-bad .bgx-use .bg-bar i{background:#F04438}
#devis-view .bgx-use b{font-size:12px;font-weight:600;min-width:34px;text-align:right}
#devis-view .bgx-st{text-align:center}
#devis-view .bgx-chip{display:inline-flex;align-items:center;justify-content:center;height:22px;padding:0 9px;border-radius:999px;font-size:11.5px;font-weight:600;white-space:nowrap;max-width:110px;width:100%}
#devis-view .bgx-ok{background:#DDF4E4;color:#15703A}#devis-view .bgx-warn{background:#FFF1C2;color:#8A5A00}#devis-view .bgx-bad{background:#FDE0DC;color:#B42318}#devis-view .bgx-muted{background:#EEF0F4;color:#5B6178}
#devis-view .bg-row .rg-act{gap:0}
#devis-view .bg-row .bg-detail,#devis-view .bg-row .bg-money{grid-column:1/-1}
@media(max-width:1180px){#devis-view .bg-table .rg-head,#devis-view .bg-row{grid-template-columns:minmax(200px,1.6fr) 104px 96px 104px 112px 92px!important}#devis-view .bg-table .rg-head span:nth-child(2),#devis-view .bgx-client,#devis-view .bg-table .rg-head span:nth-child(6),#devis-view .bgx-use{display:none!important}}
@media(max-width:760px){#devis-view .bg-table .rg-head{display:none!important}#devis-view .bg-row{grid-template-columns:minmax(0,1fr) auto!important;row-gap:2px;padding:8px 12px!important}#devis-view .bg-row>.rg-cell{display:none!important}#devis-view .bg-row>.bg-remaining{display:block!important;grid-column:2;grid-row:1}#devis-view .bg-row>.bgx-st{display:block!important;grid-column:1;grid-row:2;text-align:left}#devis-view .bg-row>.rg-act{grid-column:2;grid-row:2;justify-content:flex-end}}

/* Tableau de bord du chantier (comme Vertuoza) */
.gcd{margin:12px 0 4px}
.gcd-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.gcd-card{background:#fff;border:1px solid #E4E7EC;border-radius:10px;padding:12px 16px;min-width:0}
.gcd-card h4{margin:0 0 10px;font-size:14px;font-weight:600;color:#101828}
.gcd-rent{grid-row:span 2}
.gcd-rent-body{display:flex;align-items:center;gap:20px;flex-wrap:wrap}
.gcd-donut-wrap{position:relative;width:150px;height:150px;flex:none}
.gcd-donut{width:150px;height:150px}
.gcd-donut-txt{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center}
.gcd-donut-txt b{font-size:20px;font-weight:700;color:#101828}.gcd-donut-txt small{font-size:11px;color:#667085}
.gcd-donut-txt.gcd-bad b{color:#B42318}.gcd-donut-txt.gcd-warn b{color:#B54708}.gcd-donut-txt.gcd-ok b{color:#15703A}
.gcd-lines{flex:1;min-width:180px;display:flex;flex-direction:column;gap:8px}
.gcd-l{display:flex;flex-direction:column}
.gcd-l span{font-size:11.5px;color:#667085;display:flex;align-items:center;gap:6px}
.gcd-l span i{width:7px;height:7px;border-radius:50%;display:inline-block}
.gcd-l b{font-size:15px;font-weight:600;color:#101828;font-variant-numeric:tabular-nums}
.gcd-details{margin-top:12px;border:1px solid #EEF1F5;border-radius:8px;padding:6px 10px}
.gcd-details summary{cursor:pointer;font-size:13px;font-weight:600;color:#344054}
.gcd-dl{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:8px}
.gcd-dl>div{display:grid;grid-template-columns:1fr auto;gap:3px 10px;font-size:12.5px;align-content:start}
.gcd-dl b{grid-column:1/-1;font-size:13px;color:#101828;margin-bottom:2px}
.gcd-dl span{color:#667085}.gcd-dl em{font-style:normal;text-align:right;font-variant-numeric:tabular-nums;color:#101828}
.gcd-two{display:grid;grid-template-columns:1fr 1fr;text-align:center}
.gcd-two>div+div{border-left:1px solid #EEF1F5}
.gcd-three{display:grid;grid-template-columns:repeat(3,1fr);text-align:center}
.gcd-three>div+div{border-left:1px solid #EEF1F5}
.gcd-two small,.gcd-three small{display:flex;align-items:center;justify-content:center;gap:6px;font-size:11.5px;color:#667085}
.gcd-two b{display:block;font-size:20px;font-weight:700;color:#101828;margin-top:4px;font-variant-numeric:tabular-nums}
.gcd-three b{display:block;font-size:16px;font-weight:700;color:#101828;margin-top:4px;font-variant-numeric:tabular-nums}
b.gcd-bad,.gcd-bad{color:#B42318!important}b.gcd-ok{color:#15703A}
.gcd-dot{width:7px;height:7px;border-radius:50%;background:#D0D5DD;display:inline-block}.gcd-dot.bad{background:#F04438}
.gcd-pill{font-style:normal;font-size:10.5px;font-weight:600;padding:0 6px;border-radius:999px;background:#EEF1F5;color:#344054}
.gcd-pill.warn{background:#FFF1C2;color:#8A5A00}.gcd-pill.bad{background:#FDE0DC;color:#B42318}
.gcd-bar{height:8px;border-radius:4px;background:#EEF1F5;overflow:hidden;margin-top:12px}
.gcd-bar i{display:block;height:100%;background:#1640D6;border-radius:4px}
.gcd-bar.warn i{background:#FDB022}.gcd-bar.bad i{background:#F04438}
.gcd-note{display:block;margin-top:8px;font-size:11.5px;color:#667085}
.gcd-link{border:0;background:none;padding:0;color:#1640D6;font-weight:600;font-size:11.5px;cursor:pointer;text-decoration:underline}
@media(max-width:900px){.gcd-grid{grid-template-columns:1fr}.gcd-rent{grid-row:auto}.gcd-dl{grid-template-columns:1fr}}
.list-item:has(details.document-more[open]),.rg-row:has(details.document-more[open]),.fx-row:has(details[open]){transform:none!important}
#devis-view .bg-table .rg-head span{text-align:left!important;font-size:12px!important;color:#5B6778!important;font-weight:600!important}
#devis-view .bg-table .rg-head span.rg-num{text-align:right!important}
#devis-view .bg-table .rg-head span:nth-child(7){text-align:center!important}
@media (max-width:760px){#gc-root .gc-filters select,#gc-root .gc-filters input,#gc-root .gc-head select,#gc-root .gc-head input,#gc-root select.gc-filter,#gc-root input.gc-filter{width:100%!important;max-width:none!important;flex:1 1 100%!important}}
.pur-tva-edit .pur-tva-q{flex-basis:100%;margin:0 0 4px;font-size:13px;color:#101828}
.pur-tva-edit .pur-tva-base{display:grid!important;grid-template-columns:1fr 1fr;gap:8px;flex-basis:100%}
.pur-tva-edit .pur-tva-opt{display:flex!important;align-items:flex-start!important;gap:8px!important;padding:8px 10px;border:1px solid #D0D5DD;border-radius:8px;background:#fff;cursor:pointer}
.pur-tva-edit .pur-tva-opt:has(input:checked){border-color:#1640D6;background:#EEF4FF}
.pur-tva-edit .pur-tva-opt span{display:flex;flex-direction:column;gap:2px;font-weight:400}
.pur-tva-edit .pur-tva-opt small{font-size:12px;color:#344054;font-variant-numeric:tabular-nums}
@media(max-width:600px){.pur-tva-edit .pur-tva-base{grid-template-columns:1fr}}
.pur-tva-edit .pur-tva-opt input{margin-top:3px!important}
.pur-tva-edit .pur-tva-opt .t{font-style:normal;font-size:13px;color:#101828}
.pur-tva-edit .pur-tva-q,.pur-tva-edit .pur-tva-base{order:3}
.pur-tva-edit .pur-tva-preview{order:4}.pur-tva-edit .pur-tva-actions{order:5}
.pur-tva-edit{display:flex;flex-wrap:wrap;gap:10px 12px;align-items:flex-end}

/* Devis & factures : tient dans la largeur, sans barre de défilement (v162) */
@media(min-width:761px){
 .ddv-table-wrap{overflow-x:visible!important}
 .ddv-table{table-layout:fixed;width:100%}
 .ddv-table th:nth-child(1){width:24%}
 .ddv-table th:nth-child(2){width:92px}
 .ddv-table th:nth-child(3){width:17%}
 .ddv-table th:nth-child(4){width:auto}
 .ddv-table th:nth-child(5){width:118px}
 .ddv-table th:nth-child(6){width:116px}
 .ddv-table th:nth-child(7){width:132px}
 .ddv-table td{overflow:hidden;text-overflow:ellipsis;padding:4px 10px!important;height:40px!important}
 .ddv-table td .ddv-client,.ddv-table td .ddv-ref{display:block;overflow:hidden;text-overflow:ellipsis}
 .ddv-table td.ddv-act{overflow:visible}
 .ddv-table .ddv-bill{padding:0 8px!important;height:28px!important;font-size:12px!important}
}
@media(min-width:761px) and (max-width:1250px){
 .ddv-table th:nth-child(4),.ddv-table td:nth-child(4){display:none}
}
@media(min-width:761px){
 .ddv-table th:nth-child(1){width:22%}
 .ddv-table th:nth-child(2){width:104px}
 .ddv-table th:nth-child(3){width:16%}
 .ddv-table th:nth-child(7){width:172px}
 .ddv-table td .ddv-client{display:flex!important;align-items:center;gap:8px;min-width:0;max-width:100%}
 .ddv-table td .ddv-client>:last-child{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 .ddv-card{overflow:visible!important}
 .ddv-menu{right:0!important;left:auto!important}
}

/* Lecture de plan — 3 étapes illustrées (v164) */
.plx-steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:0 0 16px}
.plx-step{position:relative;background:#fff;border:1px solid #E4E7EC;border-radius:12px;padding:12px 14px 14px}
.plx-badge{position:absolute;top:10px;left:12px;font-size:11px;font-weight:700;padding:2px 9px;border-radius:999px;color:#fff;background:#1640D6}
.plx-2 .plx-badge{background:#F79009}.plx-3 .plx-badge{background:#7A5AF8}
.plx-art{border-radius:9px;background:#EEF4FF;padding:28px 10px 8px;margin-bottom:10px}
.plx-2 .plx-art{background:#FFF6ED}.plx-3 .plx-art{background:#F4F3FF}
.plx-art svg{display:block;width:100%;height:auto;max-height:120px}
.plx-step h3{margin:0 0 4px;font-size:14px;color:#101828}
.plx-step p{margin:0;font-size:12.5px;line-height:1.45;color:#475467}
@media(max-width:900px){.plx-steps{grid-template-columns:1fr}}
#plan-measure-modal .pmt-btns .calc-measurement{font-weight:600}
.pmt-empty{padding:14px 4px;font-size:13px;color:#344054}
.pmt-empty>b{display:block;font-size:14px;color:#101828;margin-bottom:8px}
.pmt-empty ol{margin:0;padding-left:18px;display:grid;gap:8px;line-height:1.45}
#purchases-view .pst-btn,.bb-table .pst-btn{border:0;cursor:pointer;font-family:inherit}#purchases-view .pst-btn:hover,.bb-table .pst-btn:hover{filter:brightness(.95);text-decoration:underline}
#plan-measure-modal .pm-unit{min-width:42px;font-weight:700}#plan-measure-modal .pm-unit.is-on{background:#1640D6;color:#fff;border-color:#1640D6}
.plan-measure-magnifier{width:220px!important;height:220px!important;border:4px solid #fff!important;outline:2px solid #1640D6;box-shadow:0 10px 30px rgba(0,0,0,.35)!important}

/* Vodič : une consigne + un bouton (v167) */
.pmc{display:flex;align-items:center;gap:14px;margin:8px 14px;padding:12px 16px;border-radius:12px;background:linear-gradient(90deg,#EEF4FF,#F5F8FF);border:1px solid #C7D7FE}
.pmc[hidden]{display:none}
.pmc-n{flex:none;display:grid;place-items:center;width:36px;height:36px;border-radius:50%;background:#1640D6;color:#fff;font-weight:800;font-size:17px}
.pmc-txt{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.pmc-t{font-size:15px;color:#101828}
.pmc-d{font-size:13px;color:#344054;line-height:1.4}
.pmc-go{flex:none;min-height:40px;padding:0 18px!important;font-size:14px!important;font-weight:700}
@media(max-width:700px){.pmc{flex-wrap:wrap}.pmc-go{width:100%}}
@keyframes pmPulse{0%,100%{box-shadow:0 0 0 0 rgba(22,64,214,.5)}50%{box-shadow:0 0 0 8px rgba(22,64,214,0)}}
.pm-pulse{animation:pmPulse .8s ease-out 3}

/* Plan : barre épurée (v168) */
#plan-measure-guide{display:none!important}
#plan-measure-modal .pm-menu-item span{display:flex;flex-direction:column;gap:1px}
#plan-measure-modal .pm-menu-item small{font-weight:400;color:#667085}
#plan-measure-modal .pmc{margin-top:8px}

/* Devis : plus de place pour la description (v169) */
@media(min-width:900px){
 body #devis-builder-view .vze-table th:nth-child(3),body #devis-builder-view .vze-table td:nth-child(3){width:62px!important}
 body #devis-builder-view .vze-table th.vze-art-h,body #devis-builder-view .vze-table td.vze-art{width:62px!important}
 body #devis-builder-view .vze-table th:nth-child(6),body #devis-builder-view .vze-table td:nth-child(6){width:78px!important}
 body #devis-builder-view .vze-table th:nth-child(7),body #devis-builder-view .vze-table td:nth-child(7){width:86px!important}
 body #devis-builder-view .vze-table th:nth-child(8),body #devis-builder-view .vze-table td:nth-child(8){width:92px!important}
 body #devis-builder-view .vze-table th:nth-child(10),body #devis-builder-view .vze-table td:nth-child(10){width:58px!important}
 body #devis-builder-view .vze-table th:nth-child(11),body #devis-builder-view .vze-table td:nth-child(11){width:84px!important}
 body #devis-builder-view .vze-desc-box{display:flex;align-items:center;gap:4px;min-width:0}
 body #devis-builder-view .vze-desc-box .vze-cat{flex:0 0 108px;max-width:108px;font-size:12px!important;padding-left:8px!important;padding-right:20px!important;color:#5B6778;background-color:#F8FAFC!important}
 body #devis-builder-view .vze-desc-box .vze-desc-in{flex:1 1 auto;min-width:0}
 body #devis-builder-view .vze-desc-box .vze-mini{flex:none;width:24px;opacity:0;transition:opacity .12s}
 body #devis-builder-view .vze-line:hover .vze-mini,body #devis-builder-view .vze-line:focus-within .vze-mini,body #devis-builder-view .vze-mini.is-on{opacity:1}
 body #devis-builder-view .vze-unit select{padding-left:6px!important;padding-right:18px!important}
}
@media(min-width:900px){
 body #devis-builder-view .vze-table{table-layout:fixed!important;width:100%!important}
 body #devis-builder-view .vze-table th:nth-child(1){width:40px!important}
 body #devis-builder-view .vze-table th:nth-child(2){width:22px!important}
 body #devis-builder-view .vze-table th:nth-child(9){width:96px!important}
 body #devis-builder-view .vze-table th:nth-child(5){width:auto!important}
 body #devis-builder-view .vze-table td input,body #devis-builder-view .vze-table td select{min-width:0!important;max-width:100%}
}
@media(min-width:900px){
 body #devis-builder-view .vze-table th:nth-child(11),body #devis-builder-view .vze-table td:nth-child(11){width:100px!important}
 body #devis-builder-view .vze-table th:nth-child(5){width:auto!important}
 /* Icônes « description détaillée » et « commentaire » DANS le champ, à droite, visibles au survol : le champ prend toute la largeur. */
 body #devis-builder-view .vze-desc-box{position:relative}
 body #devis-builder-view .vze-desc-box .vze-mini{position:absolute;top:50%;transform:translateY(-50%);height:26px;width:26px;border-radius:6px;background:#fff;z-index:2}
 body #devis-builder-view .vze-desc-box .vze-mini[data-vze-long]{right:76px}
 body #devis-builder-view .vze-desc-box .vze-mini[data-vze-comment]{right:50px}
 body #devis-builder-view .vze-c-P .vze-desc-box .vze-mini[data-vze-long]{right:34px}
 body #devis-builder-view .vze-c-P .vze-desc-box .vze-mini[data-vze-comment]{right:8px}
 body #devis-builder-view .vze-line:hover .vze-desc-in .vze-in,body #devis-builder-view .vze-line:focus-within .vze-desc-in .vze-in{padding-right:104px!important}
 body #devis-builder-view .vze-c-P:hover .vze-desc-in .vze-in,body #devis-builder-view .vze-c-P:focus-within .vze-desc-in .vze-in{padding-right:64px!important}
 body #devis-builder-view .vze-desc-box .vze-mini:hover{background:#EEF4FF;color:#1640D6}
}
/* La ligne est déjà sous son titre : la catégorie n'est pas répétée (déplacer = poignée ≡). Seulement si la ligne n'a pas de catégorie. */
body #devis-builder-view .vze-desc-box .vze-cat:not(.is-empty){display:none!important}
body #devis-builder-view .vze-art-in::placeholder{color:#B0B7C3;font-size:12px}
/* Légende des types de lignes du devis */
.vze-legend{display:flex;flex-wrap:wrap;align-items:center;gap:6px 14px;margin:0 0 8px;padding:6px 10px;font-size:12px;color:#475467;background:#F8FAFC;border:1px solid #EEF1F5;border-radius:8px}
.vze-legend>span:first-child{font-weight:600;color:#344054}
.vze-lg{display:inline-flex;align-items:center;gap:5px;white-space:nowrap}
.vze-lg b{display:inline-grid;place-items:center;min-width:24px;height:18px;padding:0 4px;border-radius:4px;font-size:11px;background:#fff;border:1px solid #D0D5DD;color:#101828}
.vze-lg b.vze-lg-T{background:#0B1F66;color:#fff;border-color:#0B1F66}.vze-lg b.vze-lg-Ts{background:#5B6481;color:#fff;border-color:#5B6481}
.plib-note{padding:5px 12px;font-size:11.5px;color:#1640D6;background:#EEF4FF;border-bottom:1px solid #DCE6FB}
/* v170 — Rentabilité → Détails comme Vertuoza : une colonne, groupes, « + », frais généraux modifiables. */
.gcd-billed{margin:8px 0 0;font-size:12px;color:#667085}
.gcd-billed b{font-weight:600}
.gcd-pill.ok{background:#D1FADF;color:#05603A}
.gcv{display:flex;flex-direction:column;padding:6px 0 4px}
.gcv>div{display:flex;justify-content:space-between;align-items:center;gap:10px;min-height:24px}
.gcv-h b{font-size:13.5px;font-weight:600;color:#101828}
.gcv-h>b:last-child{display:inline-flex;align-items:center;gap:6px}
.gcv-sep{border-top:1px solid #EEF1F5;margin-top:6px;padding-top:6px}
.gcv-total b{font-size:14px}
.gcv-g b{font-size:12.5px;font-weight:600;color:#344054;display:inline-flex;align-items:center;gap:6px}
.gcv-s{padding-left:12px}
.gcv-s span{font-size:12px;color:#667085;display:inline-flex;align-items:center;gap:5px}
.gcv-s em{font-style:normal;font-size:12px;color:#667085}
.gcv-i{display:inline-grid;place-items:center;width:13px;height:13px;border-radius:50%;background:#475467;color:#fff;font-size:9px;font-style:normal;font-weight:700;cursor:help}
.gcv-add,.gcv-edit{display:inline-grid;place-items:center;width:18px;height:18px;padding:0;border:1px solid #D0D5DD;border-radius:4px;background:#fff;color:#344054;font-size:13px;line-height:1;cursor:pointer}
.gcv-add:hover,.gcv-edit:hover{border-color:#1D4ED8;color:#1D4ED8}
.gcv-edit svg{width:11px;height:11px;fill:none;stroke:currentColor;stroke-width:2}
.gcv-note{font-size:11px;color:#98A2B3;margin:-2px 0 2px}
.gcv-oh{display:inline-flex;align-items:center;gap:4px;font-size:12px;font-weight:400}
.gcv-oh input{width:58px;height:24px;padding:0 6px;border:1px solid #D0D5DD;border-radius:6px;font-size:12px}
.gcv-oh button{height:24px;padding:0 8px;border:0;border-radius:6px;background:#1D4ED8;color:#fff;font-size:12px;cursor:pointer}

.pmr-dup{color:#B54708;font-weight:600}

/* Lignes de liste : plus de « soulèvement » au survol. Le décalage de 1–2 px faisait sortir le pointeur de la
   ligne à son bord, la ligne redescendait sous le pointeur, et ainsi de suite : les boutons (⋯, PDF, suivi)
   clignotaient comme un clignotant. Le survol garde seulement le fond et l'ombre. */
.list-item:hover,.list-item:has(button,a):hover,.calendar-cell:hover,.calendar-nav-btn:hover,.lp-tile:hover{transform:none!important}

/* Factures clients : un bloc par client */
#factures-view .fx-group{display:flex;align-items:center;gap:10px;padding:14px 16px 8px;margin-top:6px;border-top:2px solid #E4E7EC;background:#F8FAFC}
#factures-view .fx-group:first-child{margin-top:0;border-top:0}
#factures-view .fx-group strong{font-size:14px;color:#101828}
#factures-view .fx-group small{color:#5B6678;font-size:12.5px}
#factures-view .fx-group small b{color:#B42318}
#factures-view .fx-group-ic{display:grid;place-items:center;width:26px;height:26px;border-radius:50%;background:#EEF2F7;color:#344054}
#factures-view .fx-group-ic svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.8}

/* Pastille « Devis en préparation » au-dessus du plan */
.plan-devis-pill{position:fixed;right:20px;bottom:20px;z-index:10050;display:flex;align-items:center;gap:10px;padding:12px 16px!important;border:0!important;border-radius:12px!important;background:#0B1F3A!important;color:#fff!important;font:inherit;font-size:14px!important;box-shadow:0 12px 32px rgba(16,24,40,.35);cursor:pointer}
.plan-devis-pill[hidden]{display:none}
.plan-devis-pill svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8}
.plan-devis-pill b{font-size:15px}
.plan-devis-pill em{font-style:normal;font-weight:700;margin-left:6px;padding-left:10px;border-left:1px solid rgba(255,255,255,.3)}
.plan-devis-pill:hover{background:#13315C!important}

/* Bardage complet */
.pmt-bdc{display:grid;gap:4px;margin:8px 0 4px}
.pmt-bdc .pm-bardage-complet{width:100%;min-height:42px;font-weight:700}
.pmt-bdc small{color:#667085;font-size:11.5px;line-height:1.35}
.bdc-box{max-width:1080px!important;width:calc(100vw - 32px)!important}
.bdc-intro{margin:0 0 12px;color:#475467;font-size:13.5px;line-height:1.45}
.bdc-opts{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:10px;margin-bottom:12px}
.bdc-opts label{display:grid;gap:4px;font-size:12.5px;font-weight:600;color:#344054}
.bdc-opts input{height:38px;padding:0 10px;border:1px solid #D0D5DD;border-radius:8px;font:inherit;font-size:14px}
.bdc-opts small{font-weight:400;color:#667085;font-size:11px}
.bdc-table td{vertical-align:top}
.bdc-table td b{display:block;font-size:13.5px;color:#101828}
.bdc-formula{display:block;color:#475467;font-size:12px;margin-top:2px}
.bdc-from{display:block;color:#067647;font-size:11.5px}
.bdc-miss{display:block;color:#B54708;font-size:11.5px}
.bdc-table input[type=number]{width:96px;height:34px;text-align:right;padding:0 8px;border:1px solid #D0D5DD;border-radius:7px;font:inherit}
.bdc-table tr.is-off td{opacity:.45}
.bdc-table tfoot td{border-top:2px solid #101828;padding-top:10px}
.bdc-box footer{display:flex;align-items:center;gap:10px;justify-content:flex-end;flex-wrap:wrap}
.bdc-note{margin-right:auto;color:#B54708;font-size:13px}

/* Calepinage lu sur le plan */
.pmt-cal{display:flex;gap:10px;align-items:center;justify-content:space-between;flex-wrap:wrap;margin:0 0 10px;padding:10px 12px;border:1px solid #ABEFC6;background:#ECFDF3;border-radius:10px}
.pmt-cal div{display:grid;gap:2px}
.pmt-cal small{color:#067647;font-size:11.5px}
.pmt-cal b{color:#101828;font-size:14px}
.pmt-cal .pm-calepinage-open{min-height:38px}
.cal-detail{margin:0 0 12px}
.cal-detail summary{cursor:pointer;font-weight:600;color:#344054;margin-bottom:6px}
.bdc-opts select,.bdc-opts input[type=text]{height:38px;padding:0 10px;border:1px solid #D0D5DD;border-radius:8px;font:inherit;font-size:14px;background:#fff}

.bdc-open{margin:0 0 12px;padding:10px 12px;border:1px solid #EAECF0;border-radius:10px;background:#F9FAFB;display:grid;gap:6px}
.bdc-open>small{color:#667085;font-size:12px}
.bdc-open-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:6px}
.bdc-open-list label{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:13px}
.bdc-open-list small{color:#667085}
.bdc-open-list select{height:32px;border:1px solid #D0D5DD;border-radius:7px;font:inherit;font-size:13px;background:#fff}
/* Lignes Titre / Sous-titre du devis : gardent leur fond au survol (sinon texte blanc sur blanc) */
#devis-builder-view tr.vze-t:hover td,#devis-builder-view tr.vze-t td{background:#0C1550!important;color:#fff}
#devis-builder-view tr.vze-t:hover td{background:#16206A!important}
#devis-builder-view tr.vze-ts:hover td,#devis-builder-view tr.vze-ts td{background:#646A82!important;color:#fff}
#devis-builder-view tr.vze-ts:hover td{background:#565C74!important}

.pa-nodays summary{color:#B54708}

.pa-bills{display:grid;gap:8px;margin:0 0 14px}
.pa-bill{display:grid;grid-template-columns:170px 130px 1fr 140px;gap:12px;align-items:start;padding:12px 14px;border:1px solid #EAECF0;border-left:4px solid #F79009;border-radius:10px;background:#fff}
.pa-bill.is-paid{border-left-color:#17B26A}
.pa-bill.is-adv{border-left-color:#2E90FA}
.pa-bill b{display:block;font-size:14px;color:#101828}
.pa-bill small{display:block;color:#667085;font-size:12px;line-height:1.4}
.pa-bill .ps-chip{justify-self:end;white-space:nowrap}
.pa-cumul{margin:4px 0 14px}
.pa-cumul summary{cursor:pointer;font-weight:600;color:#344054;margin-bottom:8px}
@media (max-width:640px){.pa-bill{grid-template-columns:1fr auto}.pa-bill-due,.pa-bill-paid{grid-column:1/-1}}
.ps-chip.ok,.ps-chip.bad,.ps-chip.warn{border-left:0}

/* Paiements des salariés : chaque personne dans sa propre carte, bien séparée (comme les factures par client) */
#pay-view .ps-folder{margin:0 0 14px;border:1px solid #E4E7EC;border-radius:12px;background:#fff;overflow:hidden}
#pay-view .ps-folder.is-open{border:2px solid #1640D6;box-shadow:0 6px 18px rgba(16,24,40,.08)}
#pay-view .ps-folder.is-open>.ps-folder-head{background:#EEF4FF;border-bottom:1px solid #C7D7FE}
#pay-view .ps-group-head{margin:18px 0 8px;padding-top:12px;border-top:2px solid #E4E7EC}
#pay-view .ps-group-head:first-child{margin-top:0;padding-top:0;border-top:0}

/* Paiements des salariés : même présentation que la liste des factures clients */
#pay-view .pa-ftable{background:#fff;border:1px solid #E2E6EC;border-radius:6px;overflow:hidden}
#pay-view .pa-fhead,#pay-view .pa-frow{display:grid;grid-template-columns:minmax(130px,1.2fr) 60px 110px 110px minmax(120px,1.2fr) 110px 96px;column-gap:14px;align-items:center;padding:0 16px}
#pay-view .pa-fhead{height:44px;background:#F5F6F8;border-bottom:1px solid #E2E6EC}
#pay-view .pa-fhead span{font-size:11px;font-weight:600;letter-spacing:.05em;text-transform:uppercase;color:#5B6678}
#pay-view .pa-fhead span:nth-child(3),#pay-view .pa-fhead span:nth-child(4),#pay-view .pa-fhead span:nth-child(6){text-align:right}
#pay-view .pa-frow{min-height:48px;border-bottom:1px solid #EDF0F4;font-size:13.5px;color:#344054}
#pay-view .pa-frow .num{text-align:right;font-variant-numeric:tabular-nums}
#pay-view .pa-frow .pa-due{color:#B42318;font-weight:700}
#pay-view .pa-frow b{color:#101828}
#pay-view .pa-fhow{color:#667085;font-size:12.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#pay-view .pa-fempty{color:#667085;font-size:13px}
#pay-view .pa-fsection{padding:10px 16px 6px;font-size:11.5px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:#5B6678;background:#fff;border-bottom:1px solid #EDF0F4}
#pay-view .pa-fgroup{display:flex;align-items:center;gap:10px;width:100%;padding:14px 16px 8px;border:0;border-top:2px solid #E4E7EC;background:#F8FAFC;text-align:left;font:inherit;cursor:pointer}
#pay-view .pa-fgroup strong{font-size:14px;color:#101828}
#pay-view .pa-fgroup small{color:#5B6678;font-size:12.5px}
#pay-view .pa-fgroup small b{color:#B42318}
#pay-view .pa-fgroup-more{margin-left:auto;font-size:12.5px;font-weight:600;color:#1640D6;white-space:nowrap}
#pay-view .pa-fgroup[aria-expanded="true"]{background:#EEF4FF}
#pay-view .pa-fdetail{padding:6px 16px 14px;border-bottom:2px solid #E4E7EC;background:#FCFCFD}
#pay-view .pa-fdetail .pa-bills,#pay-view .pa-fdetail .pa-bills-head{display:none}
@media (max-width:820px){#pay-view .pa-fhead{display:none}#pay-view .pa-frow{grid-template-columns:1fr auto;row-gap:2px;padding:10px 14px}#pay-view .pa-frow>span:nth-child(2),#pay-view .pa-frow>span:nth-child(5){display:none}#pay-view .pa-frow>span:nth-child(3)::before{content:'Dû ';color:#667085}#pay-view .pa-frow>span:nth-child(4)::before{content:'Payé ';color:#667085}#pay-view .pa-frow .num{text-align:left}#pay-view .pa-fgroup{flex-wrap:wrap}}

#pay-view .pa-dtable td.num,#pay-view .pa-dtable th.num{text-align:right;font-variant-numeric:tabular-nums}
#pay-view .pa-dtable .pa-due{color:#B42318;font-weight:700}
#pay-view .pa-parent td{background:#F8FAFC;font-weight:600}
#pay-view .pa-parent .ps-avatar{display:inline-grid;margin-right:8px;vertical-align:middle}
#pay-view .pa-sect td{padding:12px 16px 6px;font-size:11.5px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:#5B6678;background:#fff}
#pay-view .pa-how{color:#667085;font-size:12.5px}
#pay-view .pa-act{text-align:right}
#pay-view .pa-detail-row>td{padding:8px 16px 16px;background:#FCFCFD;border-bottom:2px solid #E4E7EC}
#pay-view .pa-detail-row .pa-bills,#pay-view .pa-detail-row .pa-bills-head{display:none}
#pay-view .pa-none-row{color:#667085;position:relative;padding-left:48px}
#pay-view .ddv-child td.ddv-num{position:relative;padding-left:48px}
#pay-view .pa-dtable tr.ddv-child td.ddv-num{padding-left:52px!important;position:relative}
#pay-view .pa-dtable td{white-space:nowrap}

.bdc-body{flex:1;min-height:0;overflow:auto;padding:14px 20px 4px}
.bdc-box,.bdc-box *{box-sizing:border-box}
.bdc-howto{margin:0 0 14px;padding:12px 14px;border:1px solid #D1E0FF;background:#F5F8FF;border-radius:10px;font-size:13px;color:#344054}
.bdc-howto ol{margin:6px 0 0;padding-left:20px;display:grid;gap:4px;line-height:1.45}
.bdc-warn{margin:0 0 12px;padding:10px 12px;border:1px solid #FEC84B;background:#FFFAEB;border-radius:8px;color:#B54708;font-size:13px}
.bdc-mode{display:inline-block;margin:3px 0 2px;padding:1px 7px;border-radius:999px;background:#EEF4FF;color:#1849A9;font-style:normal;font-size:11px;font-weight:600}

.bdc-planread{margin:0 0 12px;padding:10px 12px;border:1px solid #ABEFC6;background:#ECFDF3;border-radius:10px;display:grid;gap:4px;font-size:13px;color:#344054}
.bdc-planread b{color:#067647}
.bdc-planread small{color:#475467}
.bdc-ref-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(330px,1fr));gap:6px}
.bdc-ref-list label{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:13px}
.bdc-ref-list input{width:68px;height:32px;padding:0 6px;border:1px solid #D0D5DD;border-radius:7px;font:inherit;font-size:13px;text-align:right}
.bdc-ref-list span{display:flex;align-items:center;gap:4px}
.bdc-miss-in{color:#B54708}
.pmt-fac b{font-size:13.5px}

/* ===== Écran de plan « pro » (plan plein écran, outils en colonne, quantités à droite) ===== */
#plan-measure-modal.pmx .worker-detail-header{height:56px;min-height:56px;padding:0 0 0 14px!important;gap:14px!important;background:#1D2733!important;justify-content:flex-start!important}
#plan-measure-modal.pmx .worker-detail-header>div:first-child{display:none!important}
#plan-measure-modal.pmx .pmx-head{display:flex;align-items:center;height:38px;border:1px solid #3A4656;border-radius:6px;min-width:0}
#plan-measure-modal.pmx .pmx-head .plan-measure-zoom{display:flex!important;align-items:center;gap:6px;height:100%;padding:0 10px;border-right:1px solid #3A4656;background:transparent!important;color:#AEB7C4;font-size:13px}
#plan-measure-modal.pmx .pmx-head .plan-measure-zoom[hidden]{display:none!important}
#plan-measure-modal.pmx .pmx-head .pm-icon{width:28px!important;height:28px!important;min-height:28px!important;padding:0!important;border:0!important;background:transparent!important;color:#fff!important}
#plan-measure-modal.pmx .pmx-head .pm-icon svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2}
#plan-measure-modal.pmx .pmx-doc{display:flex;align-items:center;gap:8px;padding:0 12px;min-width:0}
#plan-measure-modal.pmx .pmx-chip{padding:2px 7px;border-radius:3px;background:#1C7CD6;color:#fff;font-size:11px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:280px}
#plan-measure-modal.pmx .pmx-chip-scale{background:#3B4FD8}
#plan-measure-modal.pmx .pmx-chip-scale.is-warn{background:#B54708}
#plan-measure-modal.pmx .pmx-auto{margin-left:auto;display:inline-flex;align-items:center;gap:8px;height:38px;padding:0 16px;border:0;border-radius:5px;background:#22A447;color:#fff;font:inherit;font-size:13px;font-weight:700;cursor:pointer;white-space:nowrap}
#plan-measure-modal.pmx .pmx-auto:hover{background:#1B8E3D}
#plan-measure-modal.pmx .pmx-auto svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2}
#plan-measure-modal.pmx .pmx-acts{display:flex;align-items:center;gap:2px}
#plan-measure-modal.pmx .pmx-acts>*{color:#AEB7C4}
#plan-measure-modal.pmx .pmx-acts summary,#plan-measure-modal.pmx .pmx-acts .pm-toggle,#plan-measure-modal.pmx .pmx-guide-btn{display:inline-grid!important;place-items:center;width:44px!important;height:56px!important;min-height:56px!important;padding:0!important;border:0!important;border-bottom:3px solid transparent!important;border-radius:0!important;background:transparent!important;color:#AEB7C4!important;font-size:15px!important;font-weight:700;cursor:pointer;list-style:none}
#plan-measure-modal.pmx .pmx-acts summary span{display:none}
#plan-measure-modal.pmx .pmx-acts summary svg,#plan-measure-modal.pmx .pmx-acts .pm-toggle svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8}
#plan-measure-modal.pmx .pmx-acts summary:hover,#plan-measure-modal.pmx .pmx-acts .pm-toggle:hover,#plan-measure-modal.pmx .pmx-guide-btn:hover{color:#fff!important}
#plan-measure-modal.pmx .pmx-acts .pm-toggle:not([aria-expanded="false"]){border-bottom-color:#22C55E!important;color:#fff!important}
#plan-measure-modal.pmx .pmx-acts .plan-measure-more-menu{right:0;left:auto;top:56px;z-index:30}
#plan-measure-modal.pmx #plan-measure-close{width:56px!important;height:56px!important;border-radius:0!important;color:#AEB7C4!important}
#plan-measure-modal.pmx .plan-measure-toolbar,#plan-measure-modal.pmx .pm-guide{display:none!important}
#plan-measure-modal.pmx .plan-measure-body{position:relative;flex:1;min-height:0;display:grid!important;grid-template-columns:minmax(0,1fr) 370px!important;gap:0!important;margin:0!important;padding:0!important}
#plan-measure-modal.pmx .plan-measure-body.list-collapsed{grid-template-columns:minmax(0,1fr)!important}
#plan-measure-modal.pmx .plan-measure-canvas-wrap{border:0!important;border-radius:0!important;background:#F2F4F7!important}
#plan-measure-modal.pmx .pmx-rail{position:absolute;left:10px;top:10px;z-index:6;display:flex;flex-direction:column;gap:6px}
#plan-measure-modal.pmx .pmx-grp{display:flex;flex-direction:column;gap:1px;padding:3px;border-radius:7px;background:#fff;box-shadow:0 1px 3px rgba(16,24,40,.14)}
#plan-measure-modal.pmx .pmx-rail .pm-tool{display:grid!important;place-items:center;width:30px!important;min-width:30px!important;height:30px!important;min-height:30px!important;padding:0!important;border:0!important;border-radius:5px!important;background:transparent!important;color:#344054!important;box-shadow:none!important;cursor:pointer}
#plan-measure-modal.pmx .pmx-rail .pm-tool span{display:none!important}
#plan-measure-modal.pmx .pmx-rail .pm-tool svg{width:15px!important;height:15px!important;fill:none;stroke:currentColor;stroke-width:1.8}
#plan-measure-modal.pmx .pmx-rail .pm-tool:hover{background:#F2F4F7!important}
#plan-measure-modal.pmx .pmx-rail .pm-tool.active{background:#E8EEFF!important;color:#1640D6!important}
#plan-measure-modal.pmx .pmx-rail #plan-measure-opening{color:#B42318!important}
#plan-measure-modal.pmx .pmx-rail .pmx-pick{color:#16A34A!important}
#plan-measure-modal.pmx .pmx-rail .pm-select{width:30px;height:24px;padding:0;font-size:10px}
#plan-measure-modal.pmx .pmx-rail .pm-zone-delete{width:30px;height:22px;border:0;background:transparent;color:#B42318;font-size:11px}
#plan-measure-modal.pmx .pmx-tip{position:absolute;left:52px;z-index:7;width:320px;padding:14px 16px;border:1px solid #E4E7EC;border-radius:10px;background:#fff;box-shadow:0 12px 32px rgba(16,24,40,.16);display:flex;flex-direction:column;gap:9px;color:#101828}
#plan-measure-modal.pmx .pmx-tip[hidden]{display:none}
#plan-measure-modal.pmx .pmx-tip-h{display:flex;align-items:center;gap:8px}
#plan-measure-modal.pmx .pmx-tip-h b{font-size:14px;margin-right:auto}
#plan-measure-modal.pmx .pmx-kbd{padding:1px 7px;border:1px solid #D0D5DD;border-radius:4px;font-size:11px;font-weight:600;color:#475467}
#plan-measure-modal.pmx .pmx-tip-x{width:26px;height:26px;border:0;border-radius:5px;background:#F2F4F7;color:#475467;cursor:pointer}
#plan-measure-modal.pmx .pmx-tip p{margin:0;font-size:13px;line-height:1.5;color:#344054}
#plan-measure-modal.pmx .pmx-tip-how{padding:10px 12px;border-radius:6px;background:#F9FAFB;border:1px solid #EAECF0;font-size:12.5px;line-height:1.65;white-space:pre-line}
#plan-measure-modal.pmx .pmx-tip small{font-size:12.5px;line-height:1.5;color:#067647;font-weight:600}
#plan-measure-modal.pmx .pmx-draw{position:absolute;left:50%;top:10px;transform:translateX(-50%);z-index:6;display:flex;gap:8px;align-items:center}
#plan-measure-modal.pmx .pmx-draw .pm-chip:not([hidden]),#plan-measure-modal.pmx .pmx-draw .plan-measure-candidates-actions:not([hidden]),#plan-measure-modal.pmx .pmx-draw .pm-results-btn:not([hidden]){box-shadow:0 4px 14px rgba(16,24,40,.16)}
#plan-measure-modal.pmx .pmx-draw .pm-draw{display:flex;gap:6px;background:transparent!important;padding:0!important}
#plan-measure-modal.pmx .pmx-draw .pm-chip{display:inline-flex;align-items:center;gap:6px;height:34px;padding:0 12px;border:1px solid #D0D5DD;border-radius:7px;background:#fff;font:inherit;font-size:13px;font-weight:600;color:#344054;cursor:pointer}
#plan-measure-modal.pmx .pmx-draw .pm-chip[hidden]{display:none}
#plan-measure-modal.pmx .pmx-draw .pm-chip svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:2}
#plan-measure-modal.pmx .pmx-draw .pm-chip-primary{background:#1640D6;border-color:#1640D6;color:#fff}
#plan-measure-modal.pmx .pmx-foot{position:absolute;left:10px;bottom:10px;z-index:6;display:flex;align-items:center;gap:8px;padding:5px 8px 5px 12px;border-radius:8px;background:#fff;box-shadow:0 1px 3px rgba(16,24,40,.14);max-width:calc(100% - 400px);flex-wrap:wrap}
#plan-measure-modal.pmx .plan-measure-body.list-collapsed .pmx-foot{max-width:calc(100% - 20px)}
#plan-measure-modal.pmx .pmx-foot .plan-measure-status{margin:0!important;font-size:12px;font-weight:600;color:#101828;white-space:nowrap}
#plan-measure-modal.pmx .pmx-foot .pm-view{display:flex;align-items:center;gap:4px}
#plan-measure-modal.pmx .pmx-foot button{height:28px!important;min-height:28px!important;padding:0 8px!important;font-size:12px!important;border-radius:6px!important}
#plan-measure-modal.pmx .pmx-foot .pm-icon{width:28px!important;padding:0!important}
#plan-measure-modal.pmx .pmx-foot .pm-icon svg{width:15px;height:15px}
#plan-measure-modal.pmx .plan-measure-list-wrap{display:flex!important;flex-direction:column;gap:0!important;padding:0!important;background:#fff;border-left:1px solid #E4E7EC;overflow:auto}
#plan-measure-modal.pmx .pmx-qbar{position:sticky;top:0;z-index:2;background:#fff}
#plan-measure-modal.pmx .pmx-tabs{display:flex;gap:16px;padding:0 16px;height:46px;align-items:center;border-bottom:1px solid #F2F4F7}
#plan-measure-modal.pmx .pmx-tabs button{height:46px;padding:0;border:0;border-bottom:2px solid transparent;background:transparent;font:inherit;font-size:13px;color:#98A2B3;cursor:pointer}
#plan-measure-modal.pmx .pmx-tabs button.is-on{color:#101828;font-weight:700;border-bottom-color:#101828}
#plan-measure-modal.pmx .pmx-search{display:flex;align-items:center;gap:10px;padding:0 16px;height:44px;border-bottom:1px solid #F2F4F7}
#plan-measure-modal.pmx .pmx-search svg{width:16px;height:16px;fill:none;stroke:#98A2B3;stroke-width:2;flex:none}
#plan-measure-modal.pmx .pmx-search input{flex:1;border:0!important;outline:0;background:transparent!important;font:inherit;font-size:13px;padding:0!important;box-shadow:none!important}
#plan-measure-modal.pmx #plan-measure-totals{padding:12px 14px 4px}
#plan-measure-modal.pmx #plan-measure-list{padding:4px 8px 12px}
#plan-measure-modal.pmx #plan-measure-list .pmt-row[hidden]{display:none!important}
#plan-measure-modal.pmx #plan-measure-clear-all{margin:0 14px}
#plan-measure-modal.pmx #plan-measure-coach{position:absolute;top:66px;left:50%;transform:translateX(-50%);z-index:8;max-width:min(760px,calc(100vw - 460px));box-shadow:0 8px 24px rgba(16,24,40,.16)}
@media (max-width:900px){
 #plan-measure-modal.pmx .plan-measure-body{grid-template-columns:1fr!important;grid-template-rows:minmax(0,1fr) 38vh}
 #plan-measure-modal.pmx .plan-measure-list-wrap{border-left:0;border-top:1px solid #E4E7EC}
 #plan-measure-modal.pmx .pmx-foot{max-width:calc(100% - 20px);bottom:calc(38vh + 10px)}
 #plan-measure-modal.pmx .pmx-head .pmx-doc{display:none}
 #plan-measure-modal.pmx .pmx-auto span{display:none}
 #plan-measure-modal.pmx .pmx-auto{padding:0 12px}
 #plan-measure-modal.pmx .pmx-tip{width:min(300px,calc(100vw - 70px))}
 #plan-measure-modal.pmx #plan-measure-coach{max-width:calc(100vw - 24px)}
}
#plan-measure-modal.pmx .pmx-rail{align-items:flex-start}
#plan-measure-modal.pmx .pmx-rail .pm-select[hidden],#plan-measure-modal.pmx .pmx-rail .pm-zone-delete[hidden]{display:none!important}
#plan-measure-modal.pmx .pmx-head{flex:0 1 auto}
#plan-measure-modal.pmx .pmx-acts summary::-webkit-details-marker{display:none}
#plan-measure-modal.pmx .pmx-acts summary::after,#plan-measure-modal.pmx .pmx-acts summary::before{content:none!important;display:none!important}
#plan-measure-modal.pmx .pmx-foot svg{fill:none;stroke:currentColor;stroke-width:2;width:15px;height:15px}
#plan-measure-modal.pmx .pmx-foot .pm-icon{display:inline-grid!important;place-items:center;border:1px solid #D0D5DD!important;background:#fff!important;color:#344054!important}
#plan-measure-modal.pmx .pmx-guide-btn{line-height:1!important;align-content:center}
/* Panneau de droite façon liste de quantités */
#plan-measure-modal.pmx #plan-measure-totals{display:flex;flex-direction:column;gap:10px}
#plan-measure-modal.pmx .pmt-cal{padding:10px 12px!important;border-radius:8px!important;background:#F6FEF9!important;border:1px solid #D1FADF!important}
#plan-measure-modal.pmx .pmt-cal b{font-size:13px!important}
#plan-measure-modal.pmx .pmt-cal small{font-size:11.5px!important;color:#475467!important;font-weight:500!important}
#plan-measure-modal.pmx .pmt-cal small:first-child{color:#067647!important;font-weight:600!important;text-transform:uppercase;letter-spacing:.04em;font-size:10.5px!important}
#plan-measure-modal.pmx .pmt-cal .primary{height:32px!important;min-height:32px!important;padding:0 12px!important;border-radius:6px!important;background:#fff!important;color:#067647!important;border:1px solid #A6F4C5!important;font-size:12.5px!important;box-shadow:none!important}
#plan-measure-modal.pmx .pmt-grid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:0!important;border:1px solid #EAECF0;border-radius:8px;overflow:hidden}
#plan-measure-modal.pmx .pmt-stat{padding:8px 10px!important;border:0!important;border-right:1px solid #EAECF0!important;border-radius:0!important;background:#fff!important;color:#101828!important;box-shadow:none!important}
#plan-measure-modal.pmx .pmt-stat:last-child{border-right:0!important}
#plan-measure-modal.pmx .pmt-stat small{font-size:10.5px!important;color:#667085!important;font-weight:600}
#plan-measure-modal.pmx .pmt-stat b{font-size:13.5px!important;color:#101828!important;font-variant-numeric:tabular-nums}
#plan-measure-modal.pmx .pmt-stat.is-main b{color:#1640D6!important}
#plan-measure-modal.pmx .pmt-stat.is-neg b{color:#B42318!important}
#plan-measure-modal.pmx .pmt-bdc .pm-bardage-complet{height:36px!important;min-height:36px!important;border-radius:6px!important;background:#1640D6!important;font-size:13px!important}
#plan-measure-modal.pmx .pmt-bdc small{display:none}
#plan-measure-modal.pmx .pmt-actions{display:flex;flex-wrap:wrap;gap:6px}
#plan-measure-modal.pmx .pmt-actions button{height:28px!important;min-height:28px!important;padding:0 10px!important;font-size:12px!important;border-radius:6px!important}
#plan-measure-modal.pmx .pmx-fold{display:flex;align-items:center;gap:8px;height:34px;padding:0 8px;margin-top:6px;font-size:13px;color:#101828}
#plan-measure-modal.pmx .pmx-fold-ic{width:14px;height:12px;border:1.6px solid #667085;border-radius:2px;position:relative}
#plan-measure-modal.pmx .pmx-fold b{font-weight:600}
#plan-measure-modal.pmx .pmx-fold em{font-style:normal;padding:0 6px;border-radius:4px;background:#F2F4F7;color:#667085;font-size:11px}
#plan-measure-modal.pmx .pmx-fold span:last-child{margin-left:auto;color:#475467;font-variant-numeric:tabular-nums}
#plan-measure-modal.pmx #plan-measure-list .pmt-row{display:grid!important;grid-template-columns:12px minmax(0,1fr) auto;align-items:center;gap:8px;min-height:38px;margin:0!important;padding:4px 8px 4px 28px!important;border:0!important;border-radius:6px!important;background:transparent!important;box-shadow:none!important}
#plan-measure-modal.pmx #plan-measure-list .pmt-row:hover{background:#F9FAFB!important}
#plan-measure-modal.pmx #plan-measure-list .pmt-row>i{width:11px!important;height:11px!important;border-radius:2px!important}
#plan-measure-modal.pmx #plan-measure-list .pmt-name strong{font-size:13px!important;font-weight:500!important}
#plan-measure-modal.pmx #plan-measure-list .pmt-name small{font-size:11.5px!important;color:#667085!important}
#plan-measure-modal.pmx #plan-measure-list .pmt-btns{display:flex;gap:4px;opacity:.0;transition:opacity .12s}
#plan-measure-modal.pmx #plan-measure-list .pmt-row:hover .pmt-btns,#plan-measure-modal.pmx #plan-measure-list .pmt-row:focus-within .pmt-btns{opacity:1}
#plan-measure-modal.pmx #plan-measure-list .pmt-btns button{height:26px!important;min-height:26px!important;padding:0 8px!important;font-size:11.5px!important;border-radius:5px!important}
#plan-measure-modal.pmx .pmt-empty{padding:12px 8px;font-size:12.5px;color:#475467}
#plan-measure-modal.pmx .pmt-empty b{font-size:13px;color:#101828}
#plan-measure-modal.pmx .pmt-empty ol{margin:8px 0 0;padding-left:18px;display:grid;gap:6px;line-height:1.45}
@media (hover:none){#plan-measure-modal.pmx #plan-measure-list .pmt-btns{opacity:1}}
/* finitions */
.pmt-q{display:none}
#plan-measure-modal.pmx #plan-measure-list .pmt-name{display:flex;align-items:center;gap:6px;min-width:0}
#plan-measure-modal.pmx #plan-measure-list .pmt-name strong{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:flex;align-items:center;gap:6px}
#plan-measure-modal.pmx #plan-measure-list .pmt-name strong .production-method-tag{padding:0 6px!important;border:0!important;border-radius:4px!important;background:#F2F4F7!important;color:#667085!important;font-size:11px!important;font-weight:500!important}
#plan-measure-modal.pmx #plan-measure-list .pmt-name small{display:none!important}
#plan-measure-modal.pmx #plan-measure-list .pmt-q{display:inline;font-size:13px;color:#475467;font-variant-numeric:tabular-nums;white-space:nowrap}
#plan-measure-modal.pmx #plan-measure-list .pmt-row.is-opening .pmt-q{color:#B42318}
#plan-measure-modal.pmx #plan-measure-list .pmt-btns{position:absolute;right:6px;top:50%;transform:translateY(-50%);padding-left:12px;background:linear-gradient(90deg,rgba(249,250,251,0),#F9FAFB 14px)}
#plan-measure-modal.pmx #plan-measure-list .pmt-row{position:relative;grid-template-columns:12px minmax(0,1fr)!important}
#plan-measure-modal.pmx .pmx-fold-ic{width:12px;height:12px;border:0;fill:none;stroke:#667085;stroke-width:2.4}
#plan-measure-modal.pmx .pmx-fold-dir{width:15px;height:15px;fill:none;stroke:#475467;stroke-width:1.7}
#plan-measure-modal.pmx .pmt-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
#plan-measure-modal.pmx .pmt-stat{border-bottom:1px solid #EAECF0!important}
#plan-measure-modal.pmx .pmt-stat:nth-child(2n){border-right:0!important}
#plan-measure-modal.pmx .pmt-actions{gap:0;border:1px solid #EAECF0;border-radius:8px;overflow:hidden}
#plan-measure-modal.pmx .pmt-actions button{flex:1 1 auto;height:30px!important;min-height:30px!important;border:0!important;border-right:1px solid #EAECF0!important;border-radius:0!important;background:#fff!important;color:#344054!important;font-weight:500!important;box-shadow:none!important}
#plan-measure-modal.pmx .pmt-actions button:last-child{border-right:0!important}
#plan-measure-modal.pmx .pmt-actions button:hover{background:#F9FAFB!important}
#plan-measure-modal.pmx #plan-measure-clear-all{height:28px!important;min-height:28px!important;margin:6px 14px 0!important;border:0!important;background:transparent!important;color:#B42318!important;font-size:12px!important;font-weight:500!important;box-shadow:none!important;justify-self:start;text-align:left;padding:0!important}
#plan-measure-modal.pmx .pmx-guide-btn{display:inline-flex!important;align-items:center!important;justify-content:center!important}
/* aide pas-à-pas : discrète, une ligne en haut du plan */
#plan-measure-modal.pmx #plan-measure-coach{display:flex;align-items:center;gap:10px;top:auto!important;bottom:56px;padding:6px 6px 6px 12px!important;border:1px solid #D0D5DD!important;border-radius:8px!important;background:#fff!important;max-width:min(640px,calc(100vw - 480px))!important}
#plan-measure-modal.pmx #plan-measure-coach .pmc-n{width:20px!important;height:20px!important;min-width:20px;font-size:11px!important;border-radius:50%!important}
#plan-measure-modal.pmx #plan-measure-coach .pmc-t{font-size:12.5px!important}
#plan-measure-modal.pmx #plan-measure-coach .pmc-d{display:none!important}
#plan-measure-modal.pmx #plan-measure-coach .pmc-go{height:30px!important;min-height:30px!important;padding:0 12px!important;font-size:12.5px!important;border-radius:6px!important;white-space:nowrap}
#plan-measure-modal.pmx #plan-measure-coach .pmc-txt{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#plan-measure-modal.pmx .pmx-qbar{order:0}
#plan-measure-modal.pmx #plan-measure-list{order:1}
#plan-measure-modal.pmx #plan-measure-clear-all{order:2}
#plan-measure-modal.pmx #plan-measure-totals{order:3;border-top:1px solid #F2F4F7;padding-top:12px!important;margin-top:6px}
#plan-measure-modal.pmx #plan-measure-list .pmt-row{min-height:32px!important;padding:2px 8px 2px 30px!important}
#plan-measure-modal.pmx .pmx-fold{height:32px;margin-top:2px}
#plan-measure-modal.pmx .pmx-guide-btn{margin:0!important;vertical-align:top}
#plan-measure-modal.pmx .pmx-foot .plan-measure-status:empty{display:none}
#plan-measure-modal.pmx .pmx-fold .pmx-fold-dir{stroke:var(--fam,#475467)}#plan-measure-modal.pmx .pmx-fold b{color:#101828}#plan-measure-modal.pmx .pmx-fold{border-left:3px solid var(--fam,transparent);padding-left:6px;border-radius:2px}
#plan-measure-modal.pmx #plan-measure-list .pmt-row{grid-template-columns:16px 12px minmax(0,1fr)!important;padding-left:14px!important}
#plan-measure-modal.pmx .pmx-vis{width:14px;height:14px;margin:0;accent-color:#1640D6;cursor:pointer}
#plan-measure-modal.pmx #plan-measure-list .pmt-row.is-hidden .pmt-name{opacity:.45}
#plan-measure-modal.pmx .pmx-fold{padding-left:4px}
#plan-measure-modal.pmx .pmx-fold .pmx-fold-ic{order:-1}
#plan-measure-modal.pmx #plan-measure-list .pmt-row>i{align-self:center!important}
/* Carte « Lu sur le plan » lisible */
#plan-measure-modal .pmx-fac{border:1px solid #E4E7EC;border-radius:10px;background:#fff;overflow:hidden}
#plan-measure-modal .pmx-fac-h{display:flex;align-items:center;gap:8px;padding:10px 12px;border-bottom:1px solid #F2F4F7;background:#F9FAFB}
#plan-measure-modal .pmx-fac-h svg{width:16px;height:16px;fill:none;stroke:#067647;stroke-width:1.8}
#plan-measure-modal .pmx-fac-h b{font-size:13px;color:#101828}
#plan-measure-modal .pmx-fac-h span{margin-left:auto;padding:1px 8px;border-radius:999px;background:#ECFDF3;color:#067647;font-size:11px;font-weight:600}
#plan-measure-modal .pmx-fac dl{display:grid;grid-template-columns:auto minmax(0,1fr);gap:0;margin:0;padding:4px 12px}
#plan-measure-modal .pmx-fac dt,#plan-measure-modal .pmx-fac dd{margin:0;padding:6px 0;border-bottom:1px solid #F2F4F7;font-size:12.5px;line-height:1.4}
#plan-measure-modal .pmx-fac dt{padding-right:14px;color:#667085;white-space:nowrap}
#plan-measure-modal .pmx-fac dd{color:#101828;font-weight:600;text-align:right;font-variant-numeric:tabular-nums}
#plan-measure-modal .pmx-fac dd small{display:block;font-weight:400;color:#667085;font-size:11.5px}
#plan-measure-modal .pmx-fac dt:nth-last-child(2),#plan-measure-modal .pmx-fac dd:last-child{border-bottom:0}
#plan-measure-modal .pmx-fac-go{display:block;width:calc(100% - 24px);margin:4px 12px 12px;height:34px;border:0;border-radius:6px;background:#1640D6;color:#fff;font:inherit;font-size:13px;font-weight:600;cursor:pointer}
#plan-measure-modal .pmx-fac-go:hover{background:#0E2FA8}
#plan-measure-modal .pmx-fac dt{font-weight:500!important}#plan-measure-modal .pmx-fac dd{font-weight:600!important}
#plan-measure-modal.pmx #plan-measure-totals .pmx-fac ~ .pmt-bdc{display:none!important}
#plan-measure-modal.pmx .pmt-bdc .pm-bardage-complet{background:#fff!important;color:#1640D6!important;border:1px solid #B2CCFF!important;font-weight:600!important}
#plan-measure-modal.pmx .pmt-bdc .pm-bardage-complet:hover{background:#F5F8FF!important}
#plan-measure-modal.pmx .pmt-grid::before{content:'Totaux de la page';grid-column:1/-1;padding:8px 10px 0;font-size:11px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:#667085}
#plan-measure-modal.pmx .pmt-actions{display:flex!important;flex-direction:column;gap:0;border:1px solid #EAECF0;border-radius:8px}
#plan-measure-modal.pmx .pmt-actions::before{content:'Envoyer au devis';padding:8px 10px 4px;font-size:11px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:#667085}
#plan-measure-modal.pmx .pmt-actions button{justify-content:flex-start!important;text-align:left!important;height:34px!important;min-height:34px!important;padding:0 10px!important;border:0!important;border-top:1px solid #F2F4F7!important;border-radius:0!important;color:#1640D6!important;font-weight:500!important;font-size:12.5px!important}
#plan-measure-modal.pmx .pmt-actions button:last-child{border-radius:0 0 8px 8px!important}
/* Carte façade v2 */
#plan-measure-modal .pmx-fac{border:1px solid #E4E7EC;border-radius:12px;background:#fff;overflow:hidden;box-shadow:0 1px 2px rgba(16,24,40,.05)}
#plan-measure-modal .pmx-fac-h{display:flex;align-items:center;gap:10px;padding:12px 14px;border-bottom:1px solid #F2F4F7;background:linear-gradient(180deg,#F8FAFF,#FFFFFF)}
#plan-measure-modal .pmx-fac-ic{display:grid;place-items:center;width:34px;height:34px;border-radius:9px;background:#EEF4FF;flex:none}
#plan-measure-modal .pmx-fac-ic svg{width:18px;height:18px;fill:none;stroke:#1640D6;stroke-width:1.8}
#plan-measure-modal .pmx-fac-h div{display:flex;flex-direction:column;gap:1px;min-width:0}
#plan-measure-modal .pmx-fac-h b{font-size:13.5px;color:#101828}
#plan-measure-modal .pmx-fac-h small{font-size:11.5px;color:#667085}
#plan-measure-modal .pmx-fstats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border-bottom:1px solid #F2F4F7}
#plan-measure-modal .pmx-fs{display:flex;flex-direction:column;gap:2px;padding:10px 12px;border-right:1px solid #F2F4F7;min-width:0}
#plan-measure-modal .pmx-fs:last-child{border-right:0}
#plan-measure-modal .pmx-fs span{font-size:11px;font-weight:600;color:#667085;text-transform:uppercase;letter-spacing:.04em}
#plan-measure-modal .pmx-fs b{font-size:17px;font-weight:700;color:#101828;font-variant-numeric:tabular-nums;white-space:nowrap}
#plan-measure-modal .pmx-fs small{font-size:11px;color:#98A2B3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#plan-measure-modal .pmx-fsec{padding:10px 14px;border-bottom:1px solid #F2F4F7}
#plan-measure-modal .pmx-fsec h5{display:flex;align-items:center;gap:6px;margin:0 0 8px;font-size:11px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:#667085}
#plan-measure-modal .pmx-fsec h5 em{font-style:normal;padding:0 6px;border-radius:4px;background:#F2F4F7;color:#344054;letter-spacing:0}
#plan-measure-modal .pmx-fsys{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}
#plan-measure-modal .pmx-fsys li{display:flex;align-items:center;gap:8px;font-size:13px;color:#101828}
#plan-measure-modal .pmx-fsys i{width:10px;height:10px;border-radius:3px;flex:none}
#plan-measure-modal .pmx-fsys span{flex:1;min-width:0}
#plan-measure-modal .pmx-fsys em{font-style:normal;padding:1px 8px;border-radius:999px;background:#F2F4F7;color:#344054;font-size:11.5px;font-weight:600;white-space:nowrap}
#plan-measure-modal .pmx-fops{display:flex;flex-wrap:wrap;gap:6px}
#plan-measure-modal .pmx-fops span{display:inline-flex;align-items:center;gap:4px;padding:3px 8px;border:1px solid #EAECF0;border-radius:6px;background:#F9FAFB;font-size:12px;font-weight:600;color:#344054}
#plan-measure-modal .pmx-fops b{font-weight:500;color:#667085}
#plan-measure-modal .pmx-fac-go{display:flex;align-items:center;justify-content:center;gap:6px;width:calc(100% - 28px);margin:12px 14px 14px;height:38px;border:0;border-radius:8px;background:#1640D6;color:#fff;font:inherit;font-size:13.5px;font-weight:600;cursor:pointer;box-shadow:0 1px 2px rgba(16,24,40,.12)}
#plan-measure-modal .pmx-fac-go svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2}
#plan-measure-modal .pmx-fac-go:hover{background:#0E2FA8}
#plan-measure-modal .pmx-fac-h small{font-weight:400!important}#plan-measure-modal .pmx-fac-h b{font-weight:700!important}
#plan-measure-modal .pmx-fwait{font-size:12px;color:#667085}#plan-measure-modal .pmx-fsys span small{margin-left:4px;padding:0 5px;border-radius:4px;background:#F2F4F7;color:#667085;font-size:11px}
/* Plein écran pendant la mesure : quantités en tiroir sur demande, plus d'aide flottante */
#plan-measure-modal.pmx .plan-measure-body{grid-template-columns:minmax(0,1fr)!important}
#plan-measure-modal.pmx .plan-measure-list-wrap{position:absolute;top:0;right:0;bottom:0;width:380px;max-width:92vw;z-index:9;box-shadow:-12px 0 32px rgba(16,24,40,.14)}
#plan-measure-modal.pmx .plan-measure-body.list-collapsed .plan-measure-list-wrap{display:none!important}
#plan-measure-modal.pmx .pmx-foot{max-width:calc(100% - 20px)!important}
#plan-measure-modal.pmx #plan-measure-coach{display:none!important}
#plan-measure-modal.pmx .pmx-plans{display:flex;align-items:center;gap:6px;height:100%;padding:0 10px;border-right:1px solid #3A4656;color:#AEB7C4;font-size:13px;white-space:nowrap}
#plan-measure-modal.pmx .pmx-plans button{display:grid;place-items:center;width:28px;height:28px;border:0;border-radius:5px;background:transparent;color:#fff;cursor:pointer}
#plan-measure-modal.pmx .pmx-plans button:hover:not(:disabled){background:rgba(255,255,255,.1)}
#plan-measure-modal.pmx .pmx-plans button:disabled{color:#5B6676;cursor:default}
#plan-measure-modal.pmx .pmx-plans svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2}
@media (max-width:900px){#plan-measure-modal.pmx .plan-measure-list-wrap{width:100%;max-width:none;top:auto;height:60vh;box-shadow:0 -12px 32px rgba(16,24,40,.18)}}
.bdc-src{display:inline-block;margin:3px 6px 2px 0;padding:1px 7px;border-radius:999px;font-style:normal;font-size:11px;font-weight:600}
.bdc-src.is-plan{background:#ECFDF3;color:#067647}
.bdc-src.is-hors{background:#F2F4F7;color:#475467}

/* ── Pointage : vue jour façon Vertuoza (bande de semaine + cartes) ── */
#time-view .work-calendar{display:grid;grid-template-columns:minmax(320px,380px) minmax(0,1fr);gap:28px;align-items:start}
#time-view .twm{min-width:0}
.twv{display:flex;flex-direction:column;gap:14px;min-width:0}
.twv-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.twv-month{position:relative;display:inline-flex;align-items:center;gap:4px;font-size:26px;font-weight:700;letter-spacing:-.02em;color:#0B1220;cursor:pointer}
.twv-month svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;margin-top:3px}
.twv-month input{position:absolute;inset:0;opacity:0;width:100%;cursor:pointer}
.twv-today{display:inline-flex;align-items:center;gap:8px;height:40px;padding:0 16px;border-radius:999px;border:0;background:#EEF0F4;color:#111827;font-family:inherit;font-weight:600;font-size:15px;line-height:1;cursor:pointer}
.twv-today svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2}
.twv-today:hover{background:#E2E6EE}
.twv-strip{display:flex;align-items:center;gap:4px}
.twv-days{flex:1;display:grid;grid-template-columns:repeat(7,1fr);gap:2px}
.twv-nav{flex:none;width:26px;height:44px;border:0;background:none;color:#64748B;font-size:22px;cursor:pointer;border-radius:8px}
.twv-nav:hover{background:#F1F5F9;color:#0B1220}
.twv-d{display:flex;flex-direction:column;align-items:center;gap:6px;padding:10px 0 8px;border:0;border-radius:14px;background:none;color:#111827;cursor:pointer;font:inherit}
.twv-d small{font-size:13px;color:#64748B;font-weight:500}
.twv-d b{font-size:21px;font-weight:600;line-height:1}
.twv-d.is-we b,.twv-d.is-we small{color:#94A3B8}
.twv-d.is-today:not(.is-sel) b{color:#1640D6}
.twv-d:hover:not(.is-sel){background:#F1F5F9}
.twv-d.is-sel{background:#1640D6;color:#fff;box-shadow:0 6px 16px rgba(22,64,214,.28)}
.twv-d.is-sel small,.twv-d.is-sel b{color:#fff}
.twv-dot{width:6px;height:6px;border-radius:50%;background:transparent}
.twv-dot.is-ok{background:#16A34A}.twv-dot.is-wait{background:#F59E0B}.twv-dot.is-no{background:#DC2626}.twv-dot.is-abs{background:#8B5CF6}.twv-dot.is-rdv{background:#3B82F6}
.twv-d.is-sel .twv-dot:not([class$="twv-dot"]){box-shadow:0 0 0 2px #fff}
.twv-cards{display:flex;flex-direction:column;gap:12px;padding:12px;margin:0 -4px;background:#F4F6F9;border-radius:16px}
.twv-card{background:#fff;border-radius:12px;padding:16px 16px 14px;box-shadow:0 1px 2px rgba(15,23,42,.06),0 2px 8px rgba(15,23,42,.04)}
.twv-card .twv-ch{display:flex;align-items:center;gap:10px}
.twv-card .twv-ch svg{width:20px;height:20px;fill:none;stroke:#0B1220;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex:none}
.twv-card .twv-ch b{font-size:17px;font-weight:700;color:#0B1220;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.twv-card p{margin:6px 0 0;color:#334155;font-size:15px}
.twv-time{display:flex;align-items:center;gap:10px;margin-top:12px}
.twv-clk{width:32px;height:32px;border-radius:9px;background:#E8EEFF;display:grid;place-items:center;flex:none}
.twv-clk svg{width:18px;height:18px;fill:none;stroke:#1640D6;stroke-width:2.2;stroke-linecap:round}
.twv-time b{font-size:16px;font-weight:600;color:#0B1220}
.twv-time em{font-style:normal;margin-left:auto;color:#475467;font-size:14px;font-weight:600}
.twv-acts{display:flex;gap:10px;margin-top:14px}
.twv-b{flex:1;height:42px;border-radius:8px;border:1px solid #D0D5DD;background:#fff;color:#111827;font-family:inherit;font-weight:600;font-size:15px;line-height:1;cursor:pointer;padding:0 10px}
.twv-b:hover{background:#F8FAFC}
.twv-b.is-pri{background:#1640D6;border-color:#1640D6;color:#fff}
.twv-b.is-pri:hover{background:#1234B4}
.twv-b.is-del{color:#B42318}
.twv-st{flex:none;font-size:12px;font-weight:700;padding:3px 9px;border-radius:999px}
.twv-st.is-ok{background:#ECFDF3;color:#067647}.twv-st.is-wait{background:#FFFAEB;color:#B54708}.twv-st.is-no{background:#FEF3F2;color:#B42318}
.twv-card.is-empty header svg{stroke:#94A3B8}
.twv-card.is-empty header b{color:#475467}
.twv-card.is-empty .twv-acts{flex-wrap:wrap}
.twv-card.is-empty .twv-b.is-pri{flex-basis:100%}
.twv-card.is-abs header svg{stroke:#7C3AED}
.twv-monthbtn{display:none}
@media (max-width:900px){
	#time-view .work-calendar{display:block}
	#time-view .twm{display:none;margin-top:18px}
	#time-view .work-calendar.twm-open .twm{display:block}
	.twv-monthbtn{display:block;height:44px;border-radius:10px;border:1px solid #D0D5DD;background:#fff;font-family:inherit;font-weight:600;font-size:15px;line-height:1;color:#111827;cursor:pointer}
	.twv-month{font-size:24px}
}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .twv-month{color:inherit}}
.twv-month span{white-space:nowrap}
.twv-card .twv-ch{display:flex;flex-direction:row;align-items:center;gap:10px;text-align:left}
@media (max-width:900px){
	#time-panel{display:flex;flex-direction:column}
	#time-panel > .tw-cal{order:1}
	#time-panel > .tw-kpis{order:2;margin-top:14px}
	#time-panel > .tw-summary-slot,#time-panel > .tw-entries{order:3}
	.twv-month{font-size:22px}
	.twv-today{height:36px;padding:0 13px;font-size:14px}
	#time-view .tw-cal{padding:14px 12px}
	.twv-cards{margin:0 -6px;padding:10px}
}
@media (min-width:901px){ #time-view .twm .work-calendar-head{display:none} }
#time-view .calendar-cell.is-twsel{outline:2px solid #1640D6;outline-offset:-2px;box-shadow:0 0 0 3px rgba(22,64,214,.15)}

/* ── Menu « ••• » de l'écran plan : liste verticale propre, icônes alignées à gauche ── */
#plan-measure-modal.pmx #plan-measure-tools-menu{position:relative}
#plan-measure-modal.pmx #plan-measure-tools-menu .pm-menu-list{position:absolute!important;top:52px!important;right:-8px!important;left:auto!important;width:340px!important;max-height:calc(100vh - 90px);overflow:auto;display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:2px!important;padding:8px!important;background:#fff!important;border:1px solid #E4E7EC!important;border-radius:12px!important;box-shadow:0 16px 40px rgba(15,23,42,.18)!important;color:#101828!important;z-index:40}
#plan-measure-modal.pmx #plan-measure-tools-menu #pm-more-tools{display:flex;flex-direction:column;gap:2px}
#plan-measure-modal.pmx #plan-measure-tools-menu .pm-menu-title{padding:10px 10px 4px!important;font-size:11px!important;font-weight:700!important;letter-spacing:.06em;text-transform:uppercase;color:#667085!important}
#plan-measure-modal.pmx #plan-measure-tools-menu .pm-menu-note{display:block!important;padding:0 10px 6px;font-size:12px;line-height:1.4;color:#667085}
#plan-measure-modal.pmx #plan-measure-tools-menu .pm-menu-sep{height:1px;margin:6px 4px;background:#EAECF0}
#plan-measure-modal.pmx #plan-measure-tools-menu .pm-menu-item,#plan-measure-modal.pmx #plan-measure-tools-menu #pm-more-tools>*{display:flex!important;flex-direction:row!important;align-items:flex-start!important;justify-content:flex-start!important;gap:12px!important;width:100%!important;height:auto!important;min-height:0!important;padding:9px 10px!important;margin:0!important;border:0!important;border-radius:8px!important;background:transparent!important;color:#101828!important;text-align:left!important;font-size:14px!important;font-weight:600!important;line-height:1.3!important;cursor:pointer;box-shadow:none!important}
#plan-measure-modal.pmx #plan-measure-tools-menu .pm-menu-item:hover,#plan-measure-modal.pmx #plan-measure-tools-menu #pm-more-tools>*:hover{background:#F2F4F7!important}
#plan-measure-modal.pmx #plan-measure-tools-menu .pm-menu-item svg,#plan-measure-modal.pmx #plan-measure-tools-menu #pm-more-tools svg{flex:none!important;width:18px!important;height:18px!important;margin-top:1px;fill:none!important;stroke:#475467!important;stroke-width:1.8!important;stroke-linecap:round;stroke-linejoin:round}
#plan-measure-modal.pmx #plan-measure-tools-menu .pm-menu-item span,#plan-measure-modal.pmx #plan-measure-tools-menu #pm-more-tools span{display:flex!important;flex-direction:column;gap:2px;min-width:0;font-size:14px!important;color:#101828!important}
#plan-measure-modal.pmx #plan-measure-tools-menu .pm-menu-item b{font-size:14px;font-weight:600}
#plan-measure-modal.pmx #plan-measure-tools-menu .pm-menu-item small,#plan-measure-modal.pmx #plan-measure-tools-menu #pm-more-tools small{display:block!important;font-size:12px!important;font-weight:400!important;color:#667085!important;line-height:1.35}
#plan-measure-modal.pmx #plan-measure-tools-menu .pm-menu-item:not(:has(svg)){padding-left:40px!important;flex-direction:column!important;gap:2px!important}
#plan-measure-modal.pmx #plan-measure-tools-menu .plan-measure-detect-hint:empty{display:none}
@media (max-width:700px){#plan-measure-modal.pmx #plan-measure-tools-menu .pm-menu-list{position:fixed!important;top:auto!important;bottom:0!important;left:0!important;right:0!important;width:auto!important;max-height:75vh;border-radius:16px 16px 0 0!important}}

/* ── Planning chantier : grille identique à Vertuoza ── */
#pw-root{--vz-blue:#1638D6;--vz-blue2:#2E4FE0;--vz-row:#D3D8F4;--vz-sub:#E4E7F8;--vz-we:#ECEEFB;--vz-today:#FDE7E7;--vz-line:#C9CFEE}
#pw-root .vz-head{margin-bottom:14px}
.vz-filters{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-bottom:12px}
.vz-filters select{height:38px;min-width:210px;padding:0 34px 0 12px;border:1px solid #E1E4EA;border-radius:6px;background:#fff;color:#475467;font-size:14px}
.vz-btn{height:38px;padding:0 18px;border:0;border-radius:6px;background:var(--vz-blue);color:#fff;font-weight:600;font-size:14px;cursor:pointer;box-shadow:0 2px 6px rgba(22,56,214,.25)}
.vz-btn:hover{background:#1230B8}
.vz-sp{flex:1}
.vz-bar{display:flex;flex-wrap:wrap;align-items:center;gap:16px;margin-bottom:10px}
.vz-weeks{display:flex;align-items:center;gap:10px;font-size:14px;color:#344054}
.vz-sq{width:30px;height:30px;border:0;border-radius:5px;background:var(--vz-blue);color:#fff;font-size:20px;font-weight:700;line-height:1;cursor:pointer;display:grid;place-items:center}
.vz-sq:disabled{opacity:.35;cursor:default}
.vz-nav{display:flex;align-items:center;gap:6px}
.vz-nav button{height:30px;min-width:30px;padding:0 10px;border:1px solid #D0D5DD;border-radius:6px;background:#fff;color:#111827;font-size:14px;font-weight:600;cursor:pointer}
.vz-nav strong{margin-left:6px;font-size:14px;color:#101828}
.vz-all{display:flex;align-items:center;gap:10px;font-size:13px;color:#475467}
.vz-yn{display:inline-flex;padding:2px;border:0;border-radius:6px;background:#EEF0F5;cursor:pointer}
.vz-yn span{padding:4px 10px;border-radius:5px;font-size:12px;font-weight:600;color:#667085}
.vz-yn:not(.is-on) span:first-child,.vz-yn.is-on span:last-child{background:#fff;color:#101828;box-shadow:0 1px 2px rgba(0,0,0,.12)}
.vz-yn.is-on span:last-child{background:var(--vz-blue);color:#fff}
.vz-wrap{overflow:auto;max-height:calc(100vh - 290px);border-radius:4px;box-shadow:0 1px 3px rgba(16,24,40,.08);background:#fff}
.vz-grid{border-collapse:separate;border-spacing:0;min-width:calc(270px + var(--vz-days) * 136px);width:100%;table-layout:fixed;font-size:13px}
.vz-grid col,.vz-grid th,.vz-grid td{box-sizing:border-box}
.vz-grid th,.vz-grid td{border-right:1px solid var(--vz-line);border-bottom:1px solid var(--vz-line);padding:0;vertical-align:middle}
.vz-grid thead th{position:sticky;background:var(--vz-blue);color:#fff;font-weight:700;text-align:center;border-color:#4A66E3}
.vz-h1 th{top:0;height:30px;font-size:13px;z-index:3}
.vz-h2 th{top:30px;height:52px;font-size:13px;z-index:3}
.vz-h2 th b{display:block;font-weight:700}
.vz-cnt{display:inline-flex;gap:3px;margin-top:4px}
.vz-cnt i{min-width:17px;height:17px;padding:0 4px;border-radius:999px;background:transparent;color:#fff;font-style:normal;font-size:10.5px;font-weight:700;line-height:17px}
.vz-cnt i.b{background:#5C78F0}
.vz-cnt i.d{background:#0B1F5C}
.vz-grid .vz-c0{position:sticky;left:0;z-index:2;width:230px;text-align:left}
.vz-grid .vz-c1{position:sticky;left:230px;z-index:2;width:40px;text-align:center}
.vz-grid thead .vz-c0{z-index:4;width:270px}
.vz-grid td{background:#fff;height:34px;padding:3px 5px}
.vz-proj td{background:var(--vz-row);height:40px}
.vz-proj td.vz-we{background:#C9CEF0}
.vz-proj td.vz-today{background:#F2D3DA}
.vz-sec td{background:#fff;height:30px}
.vz-sec .vz-c0,.vz-sub .vz-c0{background:var(--vz-sub)!important;color:#344054;font-size:12px;padding:0 10px}
.vz-sub .vz-c0{padding-left:20px;color:#667085}
.vz-sec .vz-c0 b{color:#1D2939;font-weight:700}
.vz-grid td.vz-we{background:var(--vz-we)}
.vz-grid td.vz-today{background:var(--vz-today)}
.vz-grid thead th.vz-today{background:#E54B4B}
.vz-tog{display:flex;align-items:center;gap:8px;width:100%;padding:4px 8px;border:0;background:none;text-align:left;color:#1D2939;cursor:pointer}
.vz-tog svg{flex:none;width:16px;height:16px;fill:none;stroke:#344054;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.vz-tog span{min-width:0;display:flex;flex-direction:column}
.vz-tog b{font-size:13px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.vz-tog small{font-size:11px;color:#667085;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.vz-doc{width:28px;height:28px;border:0;border-radius:6px;background:none;cursor:pointer;display:grid;place-items:center}
.vz-doc svg{width:16px;height:16px;fill:none;stroke:#7083E0;stroke-width:1.8}
.vz-doc:hover{background:#fff}
.vz-avs{display:flex;padding-left:6px}
.vz-av{width:26px;height:26px;border-radius:50%;margin-left:-6px;border:2px solid #fff;object-fit:cover;display:inline-grid;place-items:center;font-style:normal;font-size:10px;font-weight:700;color:#fff;background:#1638D6;box-shadow:0 1px 2px rgba(0,0,0,.15)}
.vz-av.pw-ind{background:#4C6BE8}.vz-av.pw-st{background:#8193EC}.vz-av.vz-more{background:#475467}
.vz-plus{display:block;margin:0 auto;width:20px;height:20px;border:0;border-radius:4px;background:var(--vz-blue);cursor:pointer;display:grid;place-items:center}
.vz-plus svg{width:14px;height:14px;fill:none;stroke:#fff;stroke-width:3;stroke-linecap:round}
.vz-plus:hover{background:#1230B8}
.vz-tall td{height:auto;min-height:90px;vertical-align:top;padding:6px 5px}
.vz-chips{display:flex;flex-direction:column;gap:3px;min-height:80px}
.vz-chip{display:block;width:100%;height:20px;padding:0 6px;border:0;border-radius:2px;color:#fff;font-size:11.5px;font-weight:600;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer}
.vz-chip.vz-ouvrier{background:#1638D6}
.vz-chip.vz-independant{background:#4C6BE8}
.vz-chip.vz-soustraitant{background:#8193EC}
.vz-chip:hover{filter:brightness(1.1)}
.vz-note{display:block;width:100%;padding:3px 6px;border:0;border-radius:2px;background:#FBD9D9;color:#B42318;font-size:11px;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer}
.vz-grid .pw-meteo{display:block;text-align:center;font-size:11px;color:#475467}
.vz-empty{padding:28px!important;text-align:center;color:#667085;background:#fff!important}
.vz-legend{margin-top:10px}
.vz-lg{display:inline-block;width:14px;height:10px;border-radius:2px;margin-right:6px;vertical-align:middle}
.vz-lg.vz-ouvrier{background:#1638D6}.vz-lg.vz-independant{background:#4C6BE8}.vz-lg.vz-soustraitant{background:#8193EC}.vz-lg-today{background:#FDE7E7;border:1px solid #F3B4B4}
@media (max-width:760px){
	.vz-filters select{min-width:0;flex:1 1 45%}
	.vz-filters .gc-seg{order:5;width:100%}
	.vz-grid .vz-c0{width:150px}.vz-grid .vz-c1{left:150px;width:34px}.vz-grid thead .vz-c0{width:184px}
	.vz-grid{min-width:calc(184px + var(--vz-days) * 118px)}
	.vz-wrap{max-height:none}
}
#pw-root .vz-grid{display:table!important;width:100%!important;border-collapse:separate!important;border-spacing:0!important}
#pw-root .vz-grid thead{display:table-header-group!important}
#pw-root .vz-grid tbody{display:table-row-group!important}
#pw-root .vz-grid tr{display:table-row!important}
#pw-root .vz-grid th,#pw-root .vz-grid td{display:table-cell!important}
#pw-root .vz-grid thead th{background:var(--vz-blue)!important;color:#fff!important;text-transform:none!important;letter-spacing:0!important}
#pw-root .vz-grid thead th.vz-today{background:#3352E6!important;box-shadow:inset 0 -3px 0 #F87171}
#pw-root .vz-filters select{width:auto!important;flex:0 1 240px;margin:0!important}
#pw-root .vz-legend i.vz-lg{width:14px;height:10px;border-radius:2px}
#pw-root .vz-cnt i:first-child{background:rgba(255,255,255,.18)}
#pw-root .vz-col0{width:230px}#pw-root .vz-col1{width:40px}
#pw-root .vz-grid .vz-c0,#pw-root .vz-grid thead .vz-c0,#pw-root .vz-grid .vz-c1{width:auto}
@media (max-width:760px){#pw-root .vz-col0{width:150px}#pw-root .vz-col1{width:34px}}
#pw-root .vz-wk{position:sticky;left:calc(50% - 40px)}
@media (max-width:760px){
	#pw-root .vz-wk{left:200px}
	#pw-root .vz-filters{display:grid;grid-template-columns:1fr 1fr;gap:8px}
	#pw-root .vz-filters select{width:100%!important;min-width:0;height:40px;font-size:13px}
	#pw-root .vz-filters .vz-sp{display:none}
	#pw-root .vz-filters .vz-btn{width:100%;height:40px}
	#pw-root .vz-filters .gc-seg{grid-column:1/-1;order:0;display:grid;grid-template-columns:1fr 1fr}
	#pw-root .vz-bar{gap:10px}
	#pw-root .vz-bar .vz-sp{display:none}
	#pw-root .vz-nav strong{font-size:13px}
}
#pw-root .vz-wk{display:inline-block}
#pw-root .vz-grid .vz-proj td{background:var(--vz-row)!important}
#pw-root .vz-grid .vz-proj td.vz-we{background:#C9CEF0!important}
#pw-root .vz-grid .vz-proj td.vz-today{background:#F2D3DA!important}
@media (max-width:760px){
	#pw-root .vz-filters .gc-seg{order:9}
	#pw-root .vz-filters .vz-btn{font-size:13px;padding:0 8px;white-space:nowrap}
}
#pw-root .vz-grid .vz-h1 th:not(.vz-c0){text-align:left!important;padding-left:14px}
#pw-root .vz-wk{left:284px}
@media (max-width:760px){#pw-root .vz-wk{left:196px}}
#pw-root .pwr-dialog .pwr-top{display:flex!important;background:#1638D6!important;color:#fff!important;padding:18px 24px!important;min-height:0!important;position:static!important;border:0!important}
#pw-root .pwr-dialog .pwr-top h3{display:block!important;color:#fff!important;font-size:24px!important;margin:0!important}
#pw-root .pwr-dialog .pwr-x{color:#fff!important;background:transparent!important;border:0!important;font-size:28px!important;display:block!important}
#pw-root .pwr-day{font-size:12.5px}

/* ── Pointage : en-tête, ouvriers et compteurs façon Vertuoza ── */
#time-view .tw-page-head .primary{background:#1638D6!important;border-color:#1638D6!important;color:#fff!important;border-radius:8px!important;box-shadow:0 2px 8px rgba(22,56,214,.25)}
#time-view .tw-page-head .primary:hover{background:#1230B8!important}
#time-view .tw-page-head .secondary{border-radius:8px!important;border:1px solid #D0D5DD!important;color:#101828!important;background:#fff!important}
#time-view .tw-switch{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
#time-view .tw-switch-label{font-size:12px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:#667085;margin-right:4px}
#time-view .tw-chip{display:inline-flex;align-items:center;gap:8px;height:40px;padding:0 14px 0 5px;border:1px solid #E4E7EC!important;border-radius:999px!important;background:#fff!important;color:#101828!important;font-weight:600;font-size:14px;cursor:pointer;box-shadow:0 1px 2px rgba(16,24,40,.05)}
#time-view .tw-chip:hover{border-color:#B9C4F5!important;background:#F5F7FF!important}
#time-view .tw-chip .tw-chip-av{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;background:#E8EEFF!important;color:#1638D6!important;font-size:11.5px;font-weight:700}
#time-view .tw-chip.is-on{background:#1638D6!important;border-color:#1638D6!important;color:#fff!important;box-shadow:0 4px 12px rgba(22,56,214,.28)}
#time-view .tw-chip.is-on .tw-chip-av{background:#fff!important;color:#1638D6!important}
#time-view .tw-chip.is-on small{color:#DCE3FF!important}
#time-view .tw-kpis{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px!important;background:transparent!important;border:0!important;box-shadow:none!important;padding:0!important}
#time-view .tw-kpi{position:relative;display:grid!important;grid-template-columns:44px 1fr;grid-template-rows:auto auto;column-gap:14px;align-items:center;padding:16px 18px!important;background:#fff!important;border:1px solid #E7EBF1!important;border-radius:12px!important;box-shadow:0 1px 3px rgba(16,24,40,.06)!important}
#time-view .tw-kpi::before{display:none!important}
#time-view .tw-kpi .tw-kic{grid-row:1/3;width:44px;height:44px;border-radius:10px;display:grid;place-items:center;background:#E8EEFF}
#time-view .tw-kpi .tw-kic svg{width:22px;height:22px;fill:none;stroke:#1638D6;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
#time-view .tw-kpi:nth-child(2) .tw-kic{background:#EEF4FF}
#time-view .tw-kpi-pending .tw-kic{background:#FFF6E5}#time-view .tw-kpi-pending .tw-kic svg{stroke:#DC6803}
#time-view .tw-kpi:nth-child(4) .tw-kic{background:#E7F8EF}#time-view .tw-kpi:nth-child(4) .tw-kic svg{stroke:#079455}
#time-view .tw-kpi small{grid-column:2;font-size:13px!important;color:#667085!important;font-weight:500}
#time-view .tw-kpi strong{grid-column:2;font-size:24px!important;font-weight:700!important;color:#101828!important;line-height:1.15}
#time-view .tw-kpi.time-year-summary:empty{display:none!important}
@media (max-width:900px){
	#time-view .tw-kpis{grid-template-columns:1fr 1fr;gap:10px!important}
	#time-view .tw-kpi{grid-template-columns:36px 1fr;padding:12px!important;column-gap:10px}
	#time-view .tw-kpi .tw-kic{width:36px;height:36px}
	#time-view .tw-kpi strong{font-size:19px!important}
	#time-view .tw-switch{flex-wrap:nowrap;overflow-x:auto;padding-bottom:4px;scrollbar-width:none}
	#time-view .tw-chip{flex:none}
}
/* Relevé PDF : carte claire façon Vertuoza */
#time-view .hours-pdf-panel{display:grid!important;grid-template-columns:44px 1fr auto auto;align-items:center;gap:14px;margin-top:20px;padding:16px 18px!important;background:#F8F9FC!important;border:1px solid #E7EBF1!important;border-radius:12px!important}
#time-view .hours-pdf-panel .hp-ic{width:44px;height:44px;border-radius:10px;background:#E8EEFF;display:grid;place-items:center}
#time-view .hours-pdf-panel .hp-ic svg{width:22px;height:22px;fill:none;stroke:#1638D6;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
#time-view .hours-pdf-panel .hp-txt{display:flex;flex-direction:column;gap:2px;min-width:0}
#time-view .hours-pdf-panel .hp-txt b{font-size:15px;color:#101828}
#time-view .hours-pdf-panel .hp-txt small{font-size:13px;color:#667085}
#time-view .hours-pdf-panel .hp-old{display:none!important}
#time-view .hours-pdf-panel .hp-month{margin:0!important}
#time-view .hours-pdf-panel .hp-month input{height:40px;min-width:170px;padding:0 12px;border:1px solid #D0D5DD!important;border-radius:8px!important;background:#fff!important;font-size:14px}
#time-view .hours-pdf-panel #download-hours-pdf{display:inline-flex;align-items:center;gap:8px;height:40px;padding:0 18px;border-radius:8px!important;background:#1638D6!important;border:1px solid #1638D6!important;color:#fff!important;font-weight:600;box-shadow:0 2px 8px rgba(22,56,214,.25)}
#time-view .hours-pdf-panel #download-hours-pdf svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round}
@media (max-width:760px){#time-view .hours-pdf-panel{grid-template-columns:40px 1fr}#time-view .hours-pdf-panel .hp-month,#time-view .hours-pdf-panel #download-hours-pdf{grid-column:1/-1;width:100%;justify-content:center}#time-view .hours-pdf-panel .hp-month input{width:100%}}
/* Résumé des ouvriers : tableau façon Vertuoza (en-tête bleu) */
#worker-month-summary{border-radius:12px!important;overflow:hidden}
#worker-month-summary .worker-month-summary-table thead th{background:#1638D6!important;color:#fff!important;font-weight:700!important;font-size:13px!important;text-transform:none!important;letter-spacing:0!important;border:0!important;padding:12px 16px!important}
#worker-month-summary .worker-month-summary-table tbody tr{cursor:pointer}
#worker-month-summary .worker-month-summary-table tbody tr:nth-child(even) td,#worker-month-summary .worker-month-summary-table tbody tr:nth-child(even) th{background:#F7F8FD}
#worker-month-summary .worker-month-summary-table tbody tr:hover td,#worker-month-summary .worker-month-summary-table tbody tr:hover th{background:#EEF1FD!important}
#worker-month-summary .worker-month-summary-table tbody tr.is-selected td,#worker-month-summary .worker-month-summary-table tbody tr.is-selected th{background:#E3E8FC!important}
#worker-month-summary .worker-month-summary-table tbody tr.is-selected th{box-shadow:inset 4px 0 0 #1638D6!important}
#worker-month-summary .worker-month-summary-table td,#worker-month-summary .worker-month-summary-table tbody th{padding:10px 16px!important;border-bottom:1px solid #EAECF0!important;vertical-align:middle}
#worker-month-summary .tw-sm-name{display:inline-flex;align-items:center;gap:10px;font-weight:600;color:#101828}
#worker-month-summary .tw-sm-av{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;background:#1638D6;color:#fff;font-style:normal;font-size:11px;font-weight:700}
#worker-month-summary tfoot th,#worker-month-summary tfoot td{background:#E8EEFF!important;color:#0B1F5C!important;font-weight:700!important;padding:12px 16px!important;border:0!important}
#worker-month-summary .tw-pill-wait{display:inline-block;min-width:24px;padding:2px 8px;border-radius:999px;background:#FFF4E5;color:#B54708;font-weight:700}
/* ── Journées de l'équipe ── */
.twt-modal{position:fixed;inset:0;z-index:2000;display:grid;place-items:center;padding:20px}
.twt-modal[hidden]{display:none}
.twt-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.45)}
.twt-dialog{position:relative;width:min(1100px,100%);max-height:calc(100vh - 40px);display:flex;flex-direction:column;background:#fff;border-radius:14px;overflow:hidden;box-shadow:0 24px 60px rgba(15,23,42,.3)}
.twt-top{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:18px 24px;background:#1638D6;color:#fff}
.twt-top h3{margin:0;font-size:22px;color:#fff}
.twt-top small{display:block;margin-top:4px;color:#DCE3FF;font-size:13px}
.twt-x{border:0;background:none;color:#fff;font-size:28px;line-height:1;cursor:pointer}
.twt-ctx{display:flex;flex-wrap:wrap;align-items:flex-end;gap:12px;padding:16px 24px;border-bottom:1px solid #EAECF0}
.twt-ctx label{display:flex;flex-direction:column;gap:4px;font-size:12px;font-weight:600;color:#475467}
.twt-ctx select,.twt-ctx input{height:38px;padding:0 10px;border:1px solid #D0D5DD;border-radius:8px;background:#fff;font-size:14px}
.twt-ctx select{min-width:240px}.twt-ctx input[type=number]{width:90px}
.twt-week{display:flex;align-items:center;gap:8px;margin-left:auto}
.twt-week button{width:34px;height:34px;border:1px solid #D0D5DD;border-radius:8px;background:#fff;font-size:18px;cursor:pointer}
.twt-week b{font-size:14px;color:#101828;white-space:nowrap}
.twt-wrap{overflow:auto;flex:1}
.twt-grid{width:100%;border-collapse:separate;border-spacing:0;font-size:13px}
.twt-grid thead th{position:sticky;top:0;z-index:2;background:#1638D6;color:#fff;font-weight:700;padding:0;height:42px;text-align:center}
.twt-grid thead th:first-child{text-align:left;padding:0 16px;min-width:250px}
.twt-col{width:100%;height:42px;border:0;background:none;color:#fff;font-weight:700;font-size:13px;cursor:pointer}
.twt-col:hover{background:rgba(255,255,255,.12)}
.twt-grid tbody th{text-align:left;padding:8px 16px;border-bottom:1px solid #EAECF0;background:#fff;position:sticky;left:0;z-index:1}
.twt-grid tbody th{display:flex;align-items:center;justify-content:space-between;gap:10px}
.twt-who{display:flex;align-items:center;gap:10px;min-width:0}
.twt-who i{flex:none;width:32px;height:32px;border-radius:50%;display:grid;place-items:center;background:#1638D6;color:#fff;font-style:normal;font-size:11px;font-weight:700}
.twt-who b{display:block;font-size:14px;color:#101828}
.twt-who small{display:block;font-size:12px;color:#667085;font-weight:500}
.twt-who em{color:#B54708;font-style:normal}
.twt-row{flex:none;height:26px;padding:0 8px;border:1px solid #D0D5DD;border-radius:6px;background:#fff;font-size:11.5px;font-weight:600;color:#344054;cursor:pointer}
.twt-grid td{text-align:center;padding:6px;border-bottom:1px solid #EAECF0;border-left:1px solid #F2F4F7}
.twt-grid .is-we{background:#F5F6FD}
.twt-grid thead th.is-we{background:#2E4FE0}
.twt-cell{width:44px;height:36px;border:1.5px dashed #C3CBF2;border-radius:8px;background:#fff;color:#fff;font-size:18px;font-weight:700;cursor:pointer}
.twt-cell:hover:not(:disabled){border-color:#1638D6;background:#F0F3FF}
.twt-cell.is-on{background:#1638D6;border:1.5px solid #1638D6}
.twt-cell:disabled{opacity:.35;cursor:not-allowed}
.twt-done{display:inline-block;padding:4px 8px;border-radius:999px;font-size:12px;font-weight:700}
.twt-done.is-ok{background:#ECFDF3;color:#067647}.twt-done.is-wait{background:#FFFAEB;color:#B54708}.twt-done.is-no{background:#FEF3F2;color:#B42318}
.twt-empty{padding:30px!important;color:#667085}
.twt-warn{margin:0;padding:10px 24px;background:#FFFAEB;color:#B54708;font-size:13px}
.twt-foot{display:flex;align-items:center;gap:10px;padding:14px 24px;border-top:1px solid #EAECF0;background:#F9FAFB}
.twt-sum{margin-right:auto;font-size:14px;color:#344054}
.twt-foot .primary{background:#1638D6!important;border-color:#1638D6!important;color:#fff!important}
#worker-month-summary .tw-sm-txt{display:flex;flex-direction:column}
#worker-month-summary .tw-sm-txt small{font-size:12px;font-weight:500;color:#667085}
@media (max-width:760px){.twt-modal{padding:0}.twt-dialog{max-height:100vh;height:100vh;border-radius:0}.twt-ctx select{min-width:0;width:100%}.twt-ctx label:first-child{flex:1 1 100%}.twt-week{margin-left:0;width:100%;justify-content:space-between}.twt-grid thead th:first-child{min-width:170px}.twt-row{display:none}.twt-foot{flex-wrap:wrap}.twt-sum{flex-basis:100%}}
#twt-modal .twt-top{display:flex!important;background:#1638D6!important;color:#fff!important;border:0!important;position:static!important}
#twt-modal .twt-top h3{display:block!important;color:#fff!important;margin:0!important;font-size:22px!important}
#twt-modal .twt-top small{color:#DCE3FF!important}
#twt-modal .twt-x{display:block!important;color:#fff!important;background:none!important}
#twt-modal .twt-grid thead th{background:#1638D6!important;color:#fff!important;text-transform:none!important;letter-spacing:0!important;border:0!important}
#twt-modal .twt-grid thead th.is-we{background:#2E4FE0!important}
#twt-modal .twt-col{color:#fff!important;background:none!important}
#twt-modal .twt-grid thead th:first-child{color:#fff!important}
#twt-modal .twt-top{border-radius:0!important}

/* ── Dossier de preuves façon Vertuoza : en-tête + cartes avec vignettes ── */
#proof-dossier{background:transparent!important;border:0!important;box-shadow:none!important;padding:0!important}
#proof-dossier .pd-head{display:flex;flex-wrap:wrap;align-items:center;gap:18px;padding:20px 22px;margin-bottom:16px;background:#fff;border:1px solid #E7EBF1;border-radius:14px;box-shadow:0 1px 3px rgba(16,24,40,.06)}
#proof-dossier .pd-hic{width:48px;height:48px;border-radius:12px;background:#1638D6;display:grid;place-items:center;flex:none}
#proof-dossier .pd-hic svg{width:24px;height:24px;fill:none;stroke:#fff;stroke-width:2;stroke-linejoin:round}
#proof-dossier .pd-ht{flex:1;min-width:220px;display:flex;flex-direction:column;gap:2px}
#proof-dossier .pd-ht small{font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:#667085}
#proof-dossier .pd-ht b{font-size:18px;color:#101828;line-height:1.3}
#proof-dossier .pd-ht span{font-size:13px;color:#667085}
#proof-dossier .pd-ring{width:64px;height:64px;flex:none}
#proof-dossier .pd-ring-bg{fill:none;stroke:#E8EEFF;stroke-width:7}
#proof-dossier .pd-ring-fg{fill:none;stroke:#1638D6;stroke-width:7;stroke-linecap:round}
#proof-dossier .pd-ring-fg.is-ok{stroke:#12B76A}
#proof-dossier .pd-ring text{font-size:14px;font-weight:700;fill:#101828}
#proof-dossier .pd-hs{display:flex;flex-direction:column;gap:3px;min-width:140px}
#proof-dossier .pd-hs b{font-size:20px;color:#101828}
#proof-dossier .pd-hs small{font-size:12px;color:#667085}
#proof-dossier .pd-badge{align-self:flex-start;margin-top:4px;padding:3px 10px;border-radius:999px;font-size:12px;font-weight:700}
#proof-dossier .pd-badge-ok{background:#ECFDF3;color:#067647}#proof-dossier .pd-badge-miss{background:#FEF3F2;color:#B42318}
#proof-dossier .pd-export{display:inline-flex;align-items:center;gap:8px;height:42px;padding:0 18px;border:0;border-radius:8px;background:#1638D6;color:#fff;font-weight:600;font-size:14px;cursor:pointer;box-shadow:0 2px 8px rgba(22,56,214,.25)}
#proof-dossier .pd-export:hover{background:#1230B8}
#proof-dossier .pd-export svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round}
#proof-dossier .pd-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
#proof-dossier .pd-card{display:flex;flex-direction:column;gap:14px;padding:16px 18px;background:#fff;border:1px solid #E7EBF1;border-radius:14px;box-shadow:0 1px 3px rgba(16,24,40,.05)}
#proof-dossier .pd-card header{display:flex;align-items:flex-start;gap:12px;background:none!important;padding:0!important;border:0!important;position:static!important}
#proof-dossier .pd-dot{flex:none;width:28px;height:28px;border-radius:50%;display:grid;place-items:center;font-weight:800;font-size:15px;color:#fff;background:#98A2B3}
#proof-dossier .pd-dot svg{width:16px;height:16px;fill:none;stroke:#fff;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}
#proof-dossier .is-ok .pd-dot{background:#12B76A}#proof-dossier .is-miss .pd-dot{background:#F04438}
#proof-dossier .pd-ct{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
#proof-dossier .pd-ct b{font-size:15px;color:#101828}
#proof-dossier .pd-ct .pd-n{color:#667085;font-weight:600}
#proof-dossier .pd-ct i{font-style:normal;font-size:11px;font-weight:600;color:#667085;background:#F2F4F7;padding:1px 7px;border-radius:999px;margin-left:4px}
#proof-dossier .pd-ct small{font-size:13px;color:#667085}
#proof-dossier .pd-plus{flex:none;display:inline-flex;align-items:center;gap:6px;height:34px;padding:0 12px;border:0;border-radius:8px;background:#1638D6;color:#fff;font-weight:600;font-size:13px;cursor:pointer}
#proof-dossier .pd-plus svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:2.6;stroke-linecap:round}
#proof-dossier .pd-plus:hover{background:#1230B8}
#proof-dossier .pd-tiles{display:flex;gap:10px;overflow-x:auto;padding-bottom:2px;scrollbar-width:thin}
#proof-dossier .pd-tile{flex:none;width:104px;display:flex;flex-direction:column;gap:5px;padding:0;border:0;background:none;text-align:left;cursor:pointer}
#proof-dossier .pd-tile-pic{position:relative;width:104px;height:88px;border-radius:10px;background:#F2F4F7 center/cover no-repeat;display:grid;place-items:center;border:1px solid #EAECF0;overflow:hidden}
#proof-dossier .pd-tile-pic svg{width:30px;height:30px;fill:none;stroke:#475467;stroke-width:1.6;stroke-linejoin:round}
#proof-dossier .pd-tile-pic em{position:absolute;left:8px;bottom:7px;padding:1px 6px;border-radius:4px;background:#1638D6;color:#fff;font-style:normal;font-size:10px;font-weight:700}
#proof-dossier .pd-tile.is-img .pd-tile-pic:not(.has-img){background:linear-gradient(90deg,#F2F4F7,#E9ECF2,#F2F4F7);background-size:200% 100%}
#proof-dossier .pd-tile:hover .pd-tile-pic{border-color:#1638D6;box-shadow:0 0 0 3px rgba(22,56,214,.12)}
#proof-dossier .pd-tile-name{font-size:12px;font-weight:600;color:#101828;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#proof-dossier .pd-tile small{font-size:11px;color:#98A2B3;margin-top:-3px}
#proof-dossier .pd-tile-add .pd-tile-pic{background:#fff;border:1.5px dashed #B9C4F5}
#proof-dossier .pd-tile-add .pd-tile-pic svg{stroke:#1638D6;stroke-width:2.4}
#proof-dossier .is-miss .pd-tile-add .pd-tile-pic{border-color:#F7B4AE;background:#FFFBFA}
#proof-dossier .is-miss .pd-tile-add .pd-tile-pic svg{stroke:#D92D20}
#proof-dossier .is-miss .pd-tile-add .pd-tile-name{color:#B42318;white-space:normal;font-size:11.5px;line-height:1.3}
#proof-dossier .pd-tile-add .pd-tile-name{white-space:normal;line-height:1.3}
#proof-dossier .pd-tile-more{width:88px;height:88px;border-radius:10px;background:#E8EEFF;color:#1638D6;font-weight:700;display:grid;place-items:center}
#proof-dossier .pd-none{font-size:13px;color:#98A2B3}
/* Colonne de droite et assistant : boutons bleus façon Vertuoza */
#evidence-summary-view .ev-upload button.primary,#evidence-summary-view .ev-send{background:#1638D6!important;border-color:#1638D6!important;color:#fff!important;border-radius:8px!important}
#evidence-summary-view .ev-chat,#evidence-summary-view .ev-upload,#evidence-summary-view .ev-seq{border-radius:14px!important}
#evidence-summary-view .ev-bot{background:#1638D6!important}
@media (max-width:900px){#proof-dossier .pd-cards{grid-template-columns:1fr}#proof-dossier .pd-head{padding:16px}#proof-dossier .pd-export{width:100%;justify-content:center}}
#proof-dossier .pd-export{background:#1638D6!important;color:#fff!important;border:0!important}

/* ── Planning : version détaillée comme la capture Vertuoza (en-tête clair, Temps, Ouvriers / Sous-traitants / Véhicules) ── */
#pw-root .vz-grid thead th{background:#F7F8FD!important;color:#475467!important;border-color:#E4E7F2!important;font-weight:600!important}
#pw-root .vz-grid .vz-h1 th{background:#EEF1FB!important;color:#1D2939!important;font-weight:700!important}
#pw-root .vz-grid thead th.vz-today{background:#fff!important;color:#101828!important;box-shadow:inset 0 -3px 0 #1638D6, 0 0 0 1px #E4E7F2}
#pw-root .vz-h2 th b{font-weight:600;color:inherit}
#pw-root .vz-cnt{gap:5px;margin-top:6px}
#pw-root .vz-cnt i{display:inline-flex;align-items:center;gap:3px;height:20px;padding:0 7px;border-radius:999px;color:#fff!important;font-size:11px;font-weight:700;background:none}
#pw-root .vz-cnt i svg{width:12px;height:12px;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
#pw-root .vz-cnt i.c-ouv{background:#3B6FE8!important}
#pw-root .vz-cnt i.c-st{background:#2E8F8A!important}
#pw-root .vz-cnt i.c-veh{background:#6E59D9!important}
#pw-root .vz-grid td{border-color:#E9ECF5}
#pw-root .vz-grid td.vz-today{background:#fff!important;box-shadow:inset 1px 0 0 #D5DCF7,inset -1px 0 0 #D5DCF7}
#pw-root .vz-grid td.vz-we{background:#FAFAFD!important}
#pw-root .vz-sec td{background:#E8ECFB!important}
#pw-root .vz-sec .vz-c0{background:#E8ECFB!important}
#pw-root .vz-sub .vz-c0{background:#fff!important;color:#344054!important;font-size:12.5px!important}
#pw-root .vz-sub .vz-c0 b,#pw-root .vz-sec .vz-c0 b{color:#101828;font-weight:700}
#pw-root .vz-edit{display:block;margin:0 auto;width:26px;height:24px;border:0;background:none;cursor:pointer;border-radius:6px}
#pw-root .vz-edit svg{width:15px;height:15px;fill:none;stroke:#344054;stroke-width:2}
#pw-root .vz-edit:hover{background:#fff}
#pw-root .vz-temps-row td{height:58px}
#pw-root .vz-temps{display:flex;align-items:center;justify-content:center;gap:6px;flex-wrap:wrap}
#pw-root .vz-temps i{font-style:normal;font-size:20px;line-height:1}
#pw-root .vz-temps b{font-size:17px;font-weight:700;color:#101828}
#pw-root .vz-temps small{flex-basis:100%;text-align:center;font-size:11px;color:#667085;margin-top:-2px}
#pw-root .vz-temps.is-none{color:#C0C5D2}
#pw-root .vz-lab{display:flex;align-items:center;gap:9px;font-weight:700;color:#101828}
#pw-root .vz-lab i{width:22px;height:22px;display:grid;place-items:center;flex:none}
#pw-root .vz-lab svg{width:18px;height:18px;fill:none;stroke:#1D2939;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
#pw-root .vz-res td{height:auto;padding:6px 8px;vertical-align:top}
#pw-root .vz-cards{display:flex;flex-direction:column;gap:6px}
#pw-root .vz-ph{display:block;width:100%;height:34px;border:0;border-radius:6px;cursor:pointer;opacity:.9}
#pw-root .vz-ph:hover{opacity:1;outline:2px dashed rgba(22,56,214,.35)}
#pw-root .vz-ph-ouvrier{background:#DFE8FC}#pw-root .vz-ph-soustraitant{background:#FCE4E4}#pw-root .vz-ph-vehicule{background:#E9E4FB}
#pw-root .vz-rc{position:relative;display:flex;align-items:stretch;border-radius:6px;border-left:3px solid;overflow:hidden}
#pw-root .vz-rc-ouvrier{background:#DFE8FC;border-color:#3B6FE8}
#pw-root .vz-rc-soustraitant{background:#FCE4E4;border-color:#E35D5D}
#pw-root .vz-rc-vehicule{background:#E9E4FB;border-color:#6E59D9}
#pw-root .vz-rc-main{flex:1;min-width:0;display:flex;align-items:center;gap:8px;padding:6px 18px 6px 7px;border:0;background:none;text-align:left;cursor:pointer}
#pw-root .vz-rc-ic{flex:none;width:24px;height:24px;border-radius:50%;display:grid;place-items:center;color:#fff}
#pw-root .vz-rc-ic svg{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
#pw-root .vz-rc-ouvrier .vz-rc-ic{background:#3B6FE8}
#pw-root .vz-rc-soustraitant .vz-rc-ic{background:#E35D5D;border-radius:5px}
#pw-root .vz-rc-vehicule .vz-rc-ic{background:#6E59D9;border-radius:5px}
#pw-root .vz-rc-t{display:flex;flex-direction:column;min-width:0}
#pw-root .vz-rc-t b{font-size:12.5px;font-weight:700;color:#101828;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#pw-root .vz-rc-t small{font-size:11px;color:#475467;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#pw-root .vz-rc-x{position:absolute;top:2px;right:3px;width:16px;height:16px;border:0;background:none;color:#344054;font-size:14px;font-weight:700;line-height:1;cursor:pointer;padding:0}
#pw-root .vz-rc-x:hover{color:#D92D20}
#pw-root .vz-av.pw-veh{background:#6E59D9}
#pw-root .vz-proj td{background:#F3F5FD!important}
#pw-root .vz-proj td.vz-today{background:#fff!important}
#pw-root .vz-proj td.vz-we{background:#F7F8FC!important}
#pw-root .vz-legend .vz-ouvrier{background:#3B6FE8}#pw-root .vz-legend .vz-soustraitant{background:#E35D5D}#pw-root .vz-legend .vz-independant{background:#2E8F8A}
#pw-root .vz-legend .vz-vehicule{background:#6E59D9}
#pw-root .vz-grid{min-width:calc(270px + var(--vz-days) * 168px)!important}
#pw-root .vz-grid .vz-proj td{background:#EEF1FB!important}
#pw-root .vz-grid .vz-proj td.vz-today{background:#F7F8FF!important}
#pw-root .vz-grid .vz-proj td.vz-we{background:#F3F4FA!important}
#pw-root .vz-grid .vz-sec td.vz-today,#pw-root .vz-grid .vz-sec td.vz-we{background:#E8ECFB!important}
@media (max-width:760px){#pw-root .vz-grid{min-width:calc(184px + var(--vz-days) * 150px)!important}}
.auto-class-hint{margin:8px 0 0;padding:8px 10px;border-radius:8px;background:#EEF2FF;color:#1E3A8A;font-size:12.5px;line-height:1.4}
.auto-class-hint b{color:#1638D6}

/* ── Équipes façon Vertuoza ── */
#settings-view .worker-add-toggle,#settings-view .worker-paid-quick{background:#1638D6!important;border-color:#1638D6!important;color:#fff!important;border-radius:8px!important;box-shadow:0 2px 8px rgba(22,56,214,.25)}
#settings-view .worker-add-toggle:hover{background:#1230B8!important}
#settings-view .worker-assignment-toggle,#settings-view .roster-month-field input{border-radius:8px!important}
#settings-view .worker-roster-summary{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px!important;background:transparent!important;border:0!important;box-shadow:none!important;padding:0!important}
#settings-view .worker-roster-summary>div{position:relative;display:grid!important;grid-template-columns:44px 1fr;grid-template-rows:auto auto auto;column-gap:14px;align-content:center;padding:16px 18px!important;background:#fff!important;border:1px solid #E7EBF1!important;border-radius:12px!important;box-shadow:0 1px 3px rgba(16,24,40,.06)!important}
#settings-view .worker-roster-summary>div::before{display:none!important}
#settings-view .wr-kic{grid-row:1/4;width:44px;height:44px;border-radius:10px;display:grid;place-items:center;background:#E8EEFF;align-self:center}
#settings-view .wr-kic svg{width:22px;height:22px;fill:none;stroke:#1638D6;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
#settings-view .summary-critical .wr-kic{background:#FEF3F2}#settings-view .summary-critical .wr-kic svg{stroke:#D92D20}
#settings-view .summary-attention .wr-kic{background:#FFF6E5}#settings-view .summary-attention .wr-kic svg{stroke:#DC6803}
#settings-view .summary-total .wr-kic{background:#E7F8EF}#settings-view .summary-total .wr-kic svg{stroke:#079455}
#settings-view .worker-roster-summary dt{grid-column:2;font-size:13px!important;color:#667085!important;font-weight:500!important;margin:0}
#settings-view .worker-roster-summary dd{grid-column:2;margin:0;font-size:24px!important;font-weight:700!important;color:#101828!important;line-height:1.2}
#settings-view .worker-roster-summary small{grid-column:2;font-size:12px!important;color:#667085!important}
#settings-view .worker-roster-panel{border-radius:12px!important;overflow:hidden}
#settings-view .worker-roster-table thead th{background:#1638D6!important;color:#fff!important;border:0!important;text-transform:none!important;letter-spacing:0!important}
#settings-view .worker-roster-table thead th .sort-header,#settings-view .worker-roster-table thead th button{color:#fff!important;background:none!important}
#settings-view .worker-roster-table tbody tr:nth-child(even) th,#settings-view .worker-roster-table tbody tr:nth-child(even) td{background:#F7F8FD}
#settings-view .worker-roster-table tbody tr:hover th,#settings-view .worker-roster-table tbody tr:hover td{background:#EEF1FD!important}
#settings-view .worker-company{display:block;font-size:12px;font-weight:600;color:#1638D6;margin-top:2px}
#settings-view .worker-avatar--roster{box-shadow:0 0 0 2px #fff,0 0 0 3px #D5DCF7}
@media (max-width:900px){#settings-view .worker-roster-summary{grid-template-columns:1fr 1fr;gap:10px!important}#settings-view .worker-roster-summary>div{grid-template-columns:36px 1fr;padding:12px!important;column-gap:10px}#settings-view .wr-kic{width:36px;height:36px}#settings-view .worker-roster-summary dd{font-size:19px!important}}
#settings-view .worker-company{margin-left:42px;margin-top:-4px}

/* ── Statistiques façon Vertuoza ── */
.stv-title{display:flex;align-items:center;gap:10px;margin:0 0 16px}
.stv-logo svg{width:36px;height:36px;display:block}
.stv-title h2{margin:0;font-size:30px;font-weight:700;color:#101828}
.stv-help{width:22px;height:22px;border-radius:50%;background:#1638D6;color:#fff;display:grid;place-items:center;font-size:13px;font-weight:800;cursor:help}
#st-root .st-tabs button.is-on{color:#1638D6!important;border-bottom-color:#1638D6!important;background:#fff!important}
#st-root .st-period{display:flex;align-items:center;gap:8px}
#st-root .st-arrow{font-size:18px;color:#101828}
#st-root .st-cal{width:46px;height:40px;padding:0!important;display:grid;place-items:center;background:#fff!important;border:1px solid #D0D5DD!important;border-radius:6px!important}
#st-root .st-cal svg{width:20px;height:20px;fill:none;stroke:#101828;stroke-width:2;stroke-linecap:round}
#st-root .st-cal:hover{background:#F2F4F7!important}
.stk-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:6px 0 22px}
.stk{background:#fff;border:1px solid #DDE1E8;border-radius:6px;display:flex;flex-direction:column}
.stk h4{margin:0;padding:14px 18px;border-bottom:1px solid #E4E7EC;font-size:15px;font-weight:600;color:#101828}
.stk-box{position:relative;margin:22px 24px 24px;min-height:112px;display:grid;place-items:center;background:#F2F4F7;border:1px solid #C8CDD6;border-radius:6px;box-shadow:inset 0 1px 0 #fff}
.stk-box b{font-size:30px;font-weight:600;color:#344054;letter-spacing:-.01em;position:relative;z-index:1}
.stk-box b.is-green{color:#2E8F5E}.stk-box b.is-red{color:#E5484D}
.stk-ic{position:absolute;top:8px;right:10px;opacity:.55}
.stk-ic svg{width:62px;height:62px;fill:#C3C8D2;stroke:#AEB4BF;stroke-width:1.6}
.stk-split{display:grid;grid-template-columns:1fr 1fr;margin:24px 12px;flex:1}
.stk-split>div{display:flex;flex-direction:column;align-items:center;gap:10px;padding:6px 8px}
.stk-split>div+div{border-left:1px solid #D0D5DD}
.stk-pill{padding:3px 26px;border-radius:999px;font-size:12px;font-weight:600}
.stk-pill.is-grey{background:#D9DEE7;color:#344054}.stk-pill.is-red{background:#F9C6C6;color:#9F1B1B}.stk-pill.is-blue{background:#CBD5E8;color:#1D2939}
.stk-split b{font-size:20px;font-weight:600;color:#344054}
.stk-split small{font-size:13px;color:#667085}
#st-root .st-late{color:#D92D20;font-weight:700}
@media (max-width:1200px){.stk-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:640px){.stk-grid{grid-template-columns:1fr}.stk-box b{font-size:26px}.stv-title h2{font-size:24px}}
.stk-split b{font-size:17px;white-space:nowrap}
.stk-box{padding:0 64px 0 14px}
.stk-box b{font-size:clamp(20px,2vw,30px);white-space:nowrap}
.stk-ic{top:50%;transform:translateY(-50%);right:8px;z-index:0}
.stk-ic svg{width:52px;height:52px}
#st-root .st-filters{display:flex;flex-wrap:wrap;align-items:center;gap:12px}
#st-root .st-filters select[data-st-project]{width:auto!important;min-width:220px;max-width:320px;flex:0 1 auto}
#st-root .st-quick{display:flex;gap:12px}
.stk-box:not(:has(.stk-ic)){padding:0 14px}

/* ── Tâches de l'équipe (gérant) façon Vertuoza ── */
.mtt{margin-bottom:18px;padding:18px 20px;background:#fff;border:1px solid #E7EBF1;border-radius:14px;box-shadow:0 1px 3px rgba(16,24,40,.06)}
.mtt-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}
.mtt-head h3{margin:0;font-size:18px;color:#101828}
.mtt-head small{color:#667085;font-size:13px}
.mtt-head select{height:40px;min-width:260px;padding:0 12px;border:1px solid #D0D5DD;border-radius:8px;background:#fff;font-size:14px}
.mtt-kpis{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:14px}
.mtt-kpis>div{padding:12px 14px;border-radius:10px;background:#F5F7FF;border:1px solid #E3E8FC}
.mtt-kpis small{display:block;font-size:12px;color:#667085}.mtt-kpis b{font-size:22px;color:#101828}
.mtt-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:12px}
.mtt-card{display:flex;flex-direction:column;gap:10px;padding:14px;border:1px solid #E4E7EC;border-radius:12px;background:#fff;border-left:4px solid #98A2B3}
.mtt-card.is-assigned{border-left-color:#1638D6}.mtt-card.is-done{border-left-color:#12B76A}.mtt-card.is-todo{border-left-color:#F79009}
.mtt-top{display:flex;align-items:center;gap:10px}
.mtt-ic{width:34px;height:34px;border-radius:9px;background:#E8EEFF;display:grid;place-items:center;flex:none}
.mtt-ic svg{width:18px;height:18px;fill:none;stroke:#1638D6;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.mtt-t{flex:1;min-width:0;display:flex;flex-direction:column}
.mtt-t b{font-size:15px;color:#101828;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mtt-t small{font-size:12px;color:#667085}
.mtt-st{flex:none;font-size:11.5px;font-weight:700;padding:3px 9px;border-radius:999px;background:#FFF4E5;color:#B54708}
.is-assigned .mtt-st{background:#E8EEFF;color:#1638D6}.is-done .mtt-st{background:#ECFDF3;color:#067647}
.mtt-bar{height:6px;border-radius:999px;background:#EEF0F5;overflow:hidden}.mtt-bar i{display:block;height:100%;background:#1638D6;border-radius:999px}
.is-done .mtt-bar i{background:#12B76A}
.mtt-who{display:flex;flex-wrap:wrap;gap:6px;min-height:26px}
.mtt-chip{display:inline-flex;align-items:center;gap:6px;padding:2px 10px 2px 2px;border-radius:999px;background:#F2F4F7;font-size:12.5px;font-weight:600;color:#101828}
.mtt-chip i{width:22px;height:22px;border-radius:50%;background:#1638D6;color:#fff;display:grid;place-items:center;font-style:normal;font-size:10px;font-weight:700}
.mtt-none{font-size:12.5px;color:#98A2B3}
.mtt-assign{display:flex;gap:8px}
.mtt-assign select{flex:1;min-width:0;height:38px;padding:0 10px;border:1px solid #D0D5DD;border-radius:8px;background:#fff;font-size:13.5px}
.mtt-btn{height:38px;padding:0 14px;border:0;border-radius:8px;background:#1638D6;color:#fff;font-weight:600;font-size:13.5px;cursor:pointer;white-space:nowrap}
.mtt-btn:hover{background:#1230B8}
.mtt-more{align-self:flex-start;border:0;background:none;color:#1638D6;font-size:12.5px;font-weight:600;cursor:pointer;padding:0}
.mtt-lines{list-style:none;margin:0;padding:8px 0 0;border-top:1px solid #EAECF0;display:flex;flex-direction:column;gap:6px}
.mtt-lines li{display:grid;grid-template-columns:10px 1fr;column-gap:8px;font-size:13px;color:#344054}
.mtt-lines small{grid-column:2;color:#667085;font-size:12px}
.mtt-dot{width:8px;height:8px;border-radius:50%;margin-top:5px;background:#D0D5DD}.mtt-dot.is-ok{background:#12B76A}.mtt-dot.is-wait{background:#1638D6}.mtt-dot.is-no{background:#F79009}
.mtt-empty{display:flex;flex-direction:column;align-items:center;gap:8px;padding:24px;text-align:center;color:#667085;border:1.5px dashed #D5DCF7;border-radius:12px;margin:0}
.mtt-empty b{color:#101828}
@media (max-width:640px){.mtt-head select{min-width:0;width:100%}.mtt-kpis b{font-size:18px}}
#mt-team .mtt-head{display:flex!important;flex-direction:row!important;padding:0!important;background:none!important;border:0!important;position:static!important}
#mt-team .mtt-head select{width:auto!important;flex:0 1 320px}
#mt-team .mtt-head h3{font-size:18px!important}

/* v175 — Tâche(s) façon Vertuoza */
.tt{margin:0 0 16px}
.tt-card{background:#fff;border:1px solid #E2E6EC;border-radius:10px;overflow:hidden}
.tt-band{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:12px 16px;background:#1D4ED8;color:#fff}
.tt-band h3{margin:0;font-size:18px;font-weight:700;color:#fff}
.tt-band span{font-size:12.5px;opacity:.9;flex:1}
.tt-band span b{color:#FFE4E1}
.tt-new{height:32px;padding:0 14px;border:0;border-radius:8px;background:#fff;color:#1D4ED8;font-size:13px;font-weight:600;cursor:pointer}
.tt-new-ghost{background:transparent;color:#fff;border:1px solid rgba(255,255,255,.6)}
.tt-filters{display:flex;flex-wrap:wrap;gap:8px;align-items:center;padding:10px 16px;border-bottom:1px solid #EAECF0}
#tt-root .tt-filters select{height:32px!important;min-height:0!important;width:auto!important;max-width:240px;padding:0 28px 0 10px!important;border:1px solid #D0D5DD!important;border-radius:8px!important;background-color:#fff!important;font-size:12.5px!important}
.tt-seg{display:inline-flex;margin-left:auto}
.tt-seg button{height:30px;padding:0 10px;border:1px solid #D0D5DD;background:#fff;color:#344054;font-size:12px;cursor:pointer;margin-left:-1px}
.tt-seg button:first-child{border-radius:6px 0 0 6px;margin-left:0}.tt-seg button:last-child{border-radius:0 6px 6px 0}
.tt-seg button.active{background:#EEF4FF;border-color:#1D4ED8;color:#1D4ED8;position:relative;z-index:1}
.tt-wrap{overflow-x:auto}
.tt-table{width:100%;border-collapse:collapse;font-size:13px;color:#344054;min-width:760px}
.tt-table th{text-align:left;padding:10px 12px;font-size:11.5px;font-weight:700;letter-spacing:.03em;text-transform:uppercase;color:#101828;border-bottom:1px solid #EAECF0;border-right:1px solid #F2F4F7;white-space:nowrap}
.tt-table td{padding:9px 12px;border-bottom:1px solid #F2F4F7;border-right:1px solid #F2F4F7;vertical-align:middle}
.tt-table th:last-child,.tt-table td:last-child{border-right:0;width:1%}
.tt-table td:first-child{white-space:nowrap;color:#475467;width:110px}
.tt-late{color:#B42318!important;font-weight:600}
.tt-late small{display:block;font-size:10.5px;font-weight:500}
.tt-desc{min-width:240px}
.tt-cat{display:inline-block;margin-right:6px;padding:1px 6px;border-radius:4px;background:#EEF4FF;color:#1D4ED8;font-size:10.5px;font-weight:700;vertical-align:1px}
.tt-st{height:26px;padding:0 12px;border:0;border-radius:6px;font-size:12px;font-weight:600;cursor:pointer;white-space:nowrap}
.tt-todo{background:#1D4ED8;color:#fff}.tt-doing{background:#F79009;color:#fff}.tt-done{background:#12B76A;color:#fff}
tr.is-done td{color:#98A2B3}
tr.is-done .tt-desc{text-decoration:line-through}
.tt-acts{display:flex;gap:4px;justify-content:flex-end;white-space:nowrap}
td.tt-acts{display:table-cell;text-align:right}
.tt-ic{display:inline-grid;place-items:center;width:28px;height:28px;padding:0;border:0;border-radius:6px;background:none;color:#1D4ED8;cursor:pointer}
.tt-ic:hover{background:#EEF4FF}
.tt-ic svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.tt-ok{color:#067647}.tt-del{color:#667085}.tt-del:hover{color:#B42318;background:#FEF3F2}
.tt-form td{background:#F8FAFF}
#tt-root .tt-form input,#tt-root .tt-form select{width:100%!important;height:32px!important;min-height:0!important;padding:0 8px!important;border:1px solid #D0D5DD!important;border-radius:6px!important;background:#fff!important;font-size:12.5px!important}
.tt-save{height:30px;padding:0 12px;border:0;border-radius:6px;background:#1D4ED8;color:#fff;font-size:12.5px;font-weight:600;cursor:pointer;margin-right:4px}
.tt-cancel{height:30px;padding:0 10px;border:1px solid #D0D5DD;border-radius:6px;background:#fff;font-size:12.5px;cursor:pointer}
.tt-empty{padding:22px 16px!important;text-align:center;color:#667085;font-size:13px}
@media (max-width:760px){.tt-seg{margin-left:0;width:100%}.tt-seg button{flex:1}.tt-band h3{font-size:16px}.tt-band span{flex-basis:100%;order:3}}
.tt-lines{margin-top:4px}
.tt-lines summary{cursor:pointer;font-size:12px;color:#1D4ED8;font-weight:600;list-style:none}
.tt-lines summary::-webkit-details-marker{display:none}
.tt-lines summary::before{content:'▸ '}
.tt-lines[open] summary::before{content:'▾ '}
.tt-lines ol{margin:6px 0 2px;padding-left:18px;font-size:12.5px;color:#475467;line-height:1.5}

/* v175 — App ouvrier : Chantiers du jour façon Vertuoza */
.wd{max-width:560px;margin:0 0 18px;background:#fff;border:1px solid #E2E6EC;border-radius:14px;padding:14px;position:relative}
.wd-head{display:flex;flex-direction:column;align-items:center;margin-bottom:10px}
.wd-head h3{margin:0;font-size:17px;font-weight:700;color:#101828}
.wd-head small{font-size:12px;color:#667085;text-transform:capitalize}
.wd-week{display:flex;align-items:center;gap:4px;margin-bottom:12px}
.wd-nav{flex:none;width:26px;height:44px;border:0;background:none;font-size:20px;color:#667085;cursor:pointer}
.wd-day{flex:1;display:flex;flex-direction:column;align-items:center;gap:1px;padding:6px 0;border:0;border-radius:8px;background:none;cursor:pointer;position:relative;min-width:0}
.wd-day small{font-size:10.5px;color:#667085}
.wd-day b{font-size:15px;color:#101828;font-weight:600}
.wd-day.is-we small,.wd-day.is-we b{color:#98A2B3}
.wd-day.is-today b{color:#1D4ED8}
.wd-day.is-on{background:#EEF4FF}
.wd-day.is-on b,.wd-day.is-on small{color:#1D4ED8}
.wd-day i{position:absolute;bottom:2px;width:4px;height:4px;border-radius:50%;background:#1D4ED8}
.wd-list{display:flex;flex-direction:column;gap:10px}
.wd-card{border:1px solid #EAECF0;border-radius:12px;padding:12px 14px;background:#fff;box-shadow:0 1px 2px rgba(16,24,40,.05)}
.wd-card h4{margin:0;font-size:15px;font-weight:700;color:#101828}
.wd-card p{margin:2px 0 8px;font-size:12.5px;color:#667085}
.wd-time{display:flex;align-items:center;gap:8px;font-size:13px;color:#344054;margin-bottom:10px}
.wd-clock{display:grid;place-items:center;width:24px;height:24px;border-radius:50%;background:#EEF4FF;color:#1D4ED8}
.wd-clock svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2}
.wd-note{display:block;font-size:12px;color:#475467;margin:-4px 0 10px}
.wd-btns{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.wd-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;height:38px;border:1px solid #D0D5DD;border-radius:8px;background:#fff;color:#344054;font-size:13px;font-weight:600;cursor:pointer}
.wd-btn svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
.wd-primary{background:#1D4ED8;border-color:#1D4ED8;color:#fff}
.wd-empty{text-align:center;color:#667085;font-size:13px;padding:18px 0}
.wd-sheet{position:fixed;inset:0;z-index:300;display:flex;align-items:flex-end;justify-content:center}
.wd-sheet[hidden]{display:none}
.wd-back{position:absolute;inset:0;background:rgba(16,24,40,.45)}
.wd-panel{position:relative;width:100%;max-width:520px;background:#fff;border-radius:16px 16px 0 0;padding:16px 16px calc(16px + env(safe-area-inset-bottom));box-shadow:0 -10px 30px rgba(16,24,40,.2)}
.wd-panel h4{margin:0 0 12px;font-size:15px;font-weight:700;color:#101828}
.wd-photo-btns{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.wd-pbtn{display:flex;flex-direction:column;align-items:center;gap:8px;padding:20px 8px;border:1px solid #EAECF0;border-radius:12px;background:#F9FAFB;font-size:13px;font-weight:600;color:#344054;cursor:pointer}
.wd-pbtn span{display:grid;place-items:center;width:36px;height:36px;border-radius:8px;background:#EEF4FF;color:#1D4ED8}
.wd-pbtn svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.wd-sheet-note{font-size:12px;color:#667085;margin:10px 0}
.wd-close{height:38px;padding:0 14px;border:1px solid #D0D5DD;border-radius:8px;background:#fff;font-size:13px;cursor:pointer;width:100%}
.wd-recap{display:flex;flex-direction:column}
.wd-rrow{display:flex;justify-content:space-between;align-items:center;gap:10px;min-height:42px;border-bottom:1px solid #F2F4F7;font-size:13px;color:#475467}
.wd-rrow b{color:#101828;font-weight:600;text-align:right}
.wd-switch{appearance:none;-webkit-appearance:none;width:40px;height:22px;border-radius:99px;background:#D0D5DD;position:relative;cursor:pointer;transition:background .15s;flex:none;margin:0}
.wd-switch::after{content:'';position:absolute;top:2px;left:2px;width:18px;height:18px;border-radius:50%;background:#fff;transition:left .15s;box-shadow:0 1px 2px rgba(0,0,0,.2)}
.wd-switch:checked{background:#1D4ED8}.wd-switch:checked::after{left:20px}
.wd-rlabel{display:flex;flex-direction:column;gap:6px;margin-top:10px;font-size:12.5px;font-weight:600;color:#344054}
.wd-rlabel textarea{border:1px solid #D0D5DD;border-radius:8px;padding:8px 10px;font:inherit;font-weight:400;font-size:13px;resize:vertical}
.wd-sheet-acts{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:12px}
@media (max-width:760px){.wd{margin:0 0 14px;border-radius:12px}}
#wd-root .wd-switch,.wd-sheet .wd-switch{appearance:none!important;-webkit-appearance:none!important;width:40px!important;height:22px!important;min-width:40px!important;border-radius:99px!important;border:0!important;background:#D0D5DD!important;box-shadow:none!important;padding:0!important}
#wd-root .wd-switch:checked,.wd-sheet .wd-switch:checked{background:#1D4ED8!important}
#wd-root .wd-switch::before,.wd-sheet .wd-switch::before{display:none!important}

/* v175 — Messages rangés : séparateur de jour, messages regroupés, suppression discrète, saisie qui s'agrandit */
#messages.cm-thread{display:flex;flex-direction:column;gap:2px;padding:14px 18px;background:#F8FAFC}
#messages .chat-day{display:flex;justify-content:center;margin:14px 0 8px;position:sticky;top:0;z-index:2}
#messages .chat-day span{padding:3px 12px;border-radius:99px;background:#EAECF0;color:#475467;font-size:11.5px;font-weight:600;text-transform:capitalize}
#messages .chat-bubble-row{display:flex;align-items:flex-end;gap:8px;margin-top:10px;position:relative}
#messages .chat-bubble-row.is-cont{margin-top:2px}
#messages .chat-bubble-row.sent{flex-direction:row-reverse}
#messages .chat-avatar,#messages .chat-avatar-space{flex:none;width:28px!important;height:28px!important;min-width:28px;font-size:10px!important}
#messages .chat-bubble{max-width:min(560px,72%);padding:7px 11px 5px;border-radius:14px;box-shadow:0 1px 1px rgba(16,24,40,.06);border:0!important}
#messages .chat-bubble.received{background:#fff;color:#101828;border-bottom-left-radius:4px}
#messages .chat-bubble.sent{background:#0B1F3A;color:#fff;border-bottom-right-radius:4px}
#messages .is-cont .chat-bubble.received{border-top-left-radius:4px}
#messages .is-cont .chat-bubble.sent{border-top-right-radius:4px}
#messages .chat-bubble-text{font-size:14px;line-height:1.4;white-space:pre-wrap;word-break:break-word}
#messages .chat-bubble-meta{display:flex;justify-content:flex-end;align-items:center;gap:4px;margin-top:2px}
#messages .chat-bubble-meta small{font-size:10.5px;opacity:.65}
#messages .chat-ticks{font-size:10.5px;opacity:.7}
#messages .chat-ticks.read{color:#7CC4FF;opacity:1}
#messages .chat-delete{align-self:center;width:22px;height:22px;padding:0;border:0;border-radius:50%;background:transparent;color:#98A2B3;font-size:11px;cursor:pointer;opacity:0;transition:opacity .15s}
#messages .chat-bubble-row:hover .chat-delete,#messages .chat-delete:focus{opacity:1}
#messages .chat-delete:hover{background:#FEF3F2;color:#B42318}
@media (hover:none){#messages .chat-delete{opacity:.35}}
#messages .chat-empty{margin:auto;color:#667085;font-size:13px;text-align:center}
#message-form.cm-compose{align-items:flex-end;gap:10px;padding:10px 14px}
#message-form textarea{min-height:42px!important;max-height:140px;resize:none!important;overflow-y:auto;line-height:1.4;padding:10px 14px!important;border-radius:21px!important;font-size:14px!important}
#message-form .cm-send{height:42px!important;min-height:0!important;border-radius:21px!important;padding:0 18px!important}
.cm-contact .cm-contact-txt small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
/* v174 — Situations de travaux (gérant), façon Vertuoza */
#production-view.sit-mode>.weather-strip,#production-view.sit-mode .production-head,#production-view.sit-mode #production-summary,#production-view.sit-mode #production-reports{display:none!important}
.sit{display:flex;flex-direction:column;gap:14px;margin-bottom:14px}
.sit-head{display:flex;justify-content:space-between;align-items:flex-end;gap:16px;flex-wrap:wrap}
.sit-head h2{margin:0;font-size:24px;font-weight:700;color:#101828}
.sit-head p{margin:4px 0 0;font-size:13px;color:#667085}
.sit-proj select{height:36px;max-width:340px;min-width:220px;padding:0 30px 0 12px;border:1px solid #D0D5DD;border-radius:8px;background:#fff;font-size:13px;font-weight:500;color:#101828;text-overflow:ellipsis}
.sit-card{background:#fff;border:1px solid #EAECF0;border-radius:10px}
.sit-pad{padding:14px 16px}
.sit-muted{color:#667085}
.sit-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.sit-kpi{display:flex;gap:10px;align-items:center;background:#fff;border:1px solid #EAECF0;border-radius:10px;padding:12px 14px}
.sit-kic{display:grid;place-items:center;width:34px;height:34px;border-radius:8px;background:#EEF4FF;color:#1D4ED8;flex:none}
.sit-kic svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.sit-kpi small{display:block;font-size:11.5px;color:#667085}
.sit-kpi b{display:block;font-size:17px;font-weight:700;color:#101828;line-height:1.25}
.sit-kpi em{display:block;font-style:normal;font-size:11px;color:#98A2B3}
.sit-progress{display:flex;align-items:center;gap:12px;font-size:12px;color:#475467}
.sit-progress b{color:#101828;min-width:52px;text-align:right}
.sit-bar{position:relative;display:inline-block;width:46px;height:5px;border-radius:99px;background:#EAECF0;vertical-align:middle;margin-right:6px;overflow:visible}
.sit-bar i{position:absolute;inset:0 auto 0 0;border-radius:99px;background:#1D4ED8}
.sit-bar-lg{flex:1;width:auto;height:8px;margin:0}
.sit-bar-lg s{position:absolute;top:-3px;width:2px;height:14px;background:#F79009;border-radius:2px}
.sit-grid{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:14px;align-items:start}
.sit-main{min-width:0;overflow:hidden}
.sit-tools{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;padding:10px 12px;border-bottom:1px solid #EAECF0}
.sit-tools-r{display:flex;gap:8px;align-items:center}
.sit-seg{display:inline-flex;align-items:center;gap:0;font-size:12px;color:#667085}
.sit-seg span{margin-right:8px}
.sit-seg button{height:28px;padding:0 10px;border:1px solid #D0D5DD;background:#fff;color:#344054;font-size:12px;cursor:pointer;margin-left:-1px}
.sit-seg button:first-of-type{border-radius:6px 0 0 6px;margin-left:0}.sit-seg button:last-of-type{border-radius:0 6px 6px 0}
.sit-seg button.active{background:#EEF4FF;border-color:#1D4ED8;color:#1D4ED8;position:relative;z-index:1}
.sit-btn{display:inline-flex;align-items:center;gap:6px;height:32px;padding:0 12px;border:1px solid #D0D5DD;border-radius:8px;background:#fff;color:#344054;font-size:12.5px;font-weight:500;cursor:pointer;white-space:nowrap;list-style:none}
.sit-btn::-webkit-details-marker{display:none}
.sit-btn:hover{border-color:#98A2B3}
.sit-primary{background:#0B1B33;border-color:#0B1B33;color:#fff}
.sit-primary:hover{background:#13294B}
.sit-primary:disabled{opacity:.45;cursor:not-allowed}
.sit-more{position:relative}
.sit-menu{position:absolute;right:0;top:36px;z-index:30;min-width:250px;background:#fff;border:1px solid #EAECF0;border-radius:10px;box-shadow:0 12px 24px rgba(16,24,40,.12);padding:6px;display:flex;flex-direction:column}
.sit-menu button{text-align:left;padding:8px 10px;border:0;background:none;border-radius:6px;font-size:13px;color:#344054;cursor:pointer}
.sit-menu button:hover{background:#F2F4F7}
.sit-table-wrap{overflow-x:auto}
.sit-tbl{width:100%;border-collapse:collapse;font-size:12.5px;color:#344054}
.sit-tbl th{position:sticky;top:0;background:#F9FAFB;font-size:11.5px;font-weight:600;color:#475467;text-align:left;padding:8px 8px;border-bottom:1px solid #EAECF0;white-space:nowrap}
.sit-tbl td{padding:5px 8px;border-bottom:1px solid #F2F4F7;vertical-align:middle;line-height:1.3}
.sit-tbl .r{text-align:right;white-space:nowrap}
.sit-tbl small{color:#98A2B3;font-size:11px}
.sit-tbl col.c-n{width:36px}.sit-tbl col.c-q{width:92px}.sit-tbl col.c-pu{width:92px}.sit-tbl col.c-tot{width:104px}.sit-tbl col.c-prior{width:86px}.sit-tbl col.c-in{width:128px}.sit-tbl col.c-cum{width:110px}.sit-tbl col.c-amt{width:112px}
.sit-n{color:#98A2B3;font-size:11.5px}
.sit-d span{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.sit-d small{display:block}
.sit-cat td{background:#F8FAFC;border-bottom:1px solid #EAECF0;padding:7px 8px}
.sit-cat td:first-child b{font-weight:600;color:#101828}
.sit-cat td:first-child small{margin-left:8px}
.sit-toggle{display:inline-grid;place-items:center;width:20px;height:20px;padding:0;margin-right:6px;border:0;background:none;color:#667085;cursor:pointer;vertical-align:middle}
.sit-toggle svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2;transform:rotate(90deg);transition:transform .15s}
.sit-cat.is-closed .sit-toggle svg{transform:none}
.sit-catpct input{width:100px;height:26px;padding:0 6px;border:1px dashed #D0D5DD;border-radius:6px;font-size:11.5px;text-align:right;background:#fff}
.sit-in{display:inline-flex;align-items:center;border:1px solid #D0D5DD;border-radius:6px;background:#fff;height:28px;overflow:hidden}
.sit-in input{width:76px;height:26px;border:0;padding:0 4px 0 8px;text-align:right;font-size:12.5px;background:transparent}
.sit-in input:focus{outline:none}
.sit-in:focus-within{border-color:#1D4ED8;box-shadow:0 0 0 3px rgba(29,78,216,.12)}
.sit-in em{font-style:normal;font-size:11px;color:#98A2B3;padding:0 8px 0 2px}
.sit-in.is-bad{border-color:#F04438;background:#FEF3F2}
.sit-line.is-done{color:#98A2B3}
.sit-line.is-done .sit-in{background:#F9FAFB}
.sit-side{position:sticky;top:84px;padding:14px 16px;display:flex;flex-direction:column;gap:2px}
.sit-side h4,.sit-card>h4,.sit-sec-head h4{margin:0 0 8px;font-size:14px;font-weight:600;color:#101828;display:flex;align-items:center;gap:8px}
.sit-card>h4{padding:14px 16px 0}
.sit-r{display:flex;justify-content:space-between;align-items:center;gap:10px;min-height:30px;font-size:12.5px;color:#475467;border-bottom:1px solid #F2F4F7}
.sit-r b{color:#101828;font-weight:600;white-space:nowrap}
.sit-strong{font-size:13px;color:#101828}.sit-strong b{font-size:14px}
.sit-net{border-bottom:0;margin-top:4px;padding:8px 10px;border-radius:8px;background:#EEF4FF;color:#1D4ED8;font-weight:600}
.sit-net b{color:#1D4ED8;font-size:16px}
.sit-tva select{height:26px;margin-left:6px;border:1px solid #D0D5DD;border-radius:6px;font-size:12px;padding:0 4px}
.sit-check{display:inline-flex;align-items:center;gap:6px}
.sit-side .sit-primary{height:40px;justify-content:center;margin-top:12px;font-size:13.5px}
.sit-hint{font-size:11px;color:#98A2B3;margin-top:6px;line-height:1.4}
.sit-hist,.sit-terr{margin-top:4px}
.sit-card .sit-tbl td:first-child,.sit-card .sit-tbl th:first-child{padding-left:16px}
.sit-card .sit-tbl td:last-child,.sit-card .sit-tbl th:last-child{padding-right:16px}
.sit-pill{display:inline-flex;align-items:center;height:20px;padding:0 8px;border-radius:99px;font-size:11px;font-weight:600;background:#F2F4F7;color:#344054;white-space:nowrap}
.sit-pill.ok{background:#ECFDF3;color:#067647}.sit-pill.warn{background:#FFFAEB;color:#B54708}.sit-pill.bad{background:#FEF3F2;color:#B42318}
.sit-link{border:0;background:none;color:#1D4ED8;font-size:12px;font-weight:600;cursor:pointer;padding:0}
.sit-sec-head{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:12px 16px 4px}
.sit-sec-head h4{margin:0}
.sit-acts{display:flex;gap:6px;justify-content:flex-end}
.sit-mini{height:24px;padding:0 8px;border:1px solid #D0D5DD;border-radius:6px;background:#fff;font-size:11.5px;cursor:pointer;color:#344054}
.sit-mini.ok{border-color:#067647;color:#067647}
.sit-empty{display:flex;flex-direction:column;align-items:center;text-align:center;gap:6px;padding:28px 16px}
.sit-empty b{font-size:14px;color:#101828}.sit-empty span{font-size:12.5px;color:#667085;max-width:460px}
.sit-empty-acts{display:flex;gap:8px;margin-top:8px}
.sit-declare{margin-top:6px;border:1px solid #EAECF0;border-radius:10px;background:#fff}
.sit-declare>summary{cursor:pointer;padding:12px 16px;font-size:14px;font-weight:600;color:#101828;list-style:none}
.sit-declare>summary::-webkit-details-marker{display:none}
.sit-declare>summary::before{content:'+';display:inline-grid;place-items:center;width:20px;height:20px;margin-right:8px;border:1px solid #D0D5DD;border-radius:5px;font-weight:500}
.sit-declare[open]>summary::before{content:'−'}
.sit-declare .production-panel{border:0;box-shadow:none;margin:0;padding-top:0}
.pr-line-field{display:flex;flex-direction:column;gap:6px;margin-top:10px;font-size:13px;font-weight:600;color:#344054}
.pr-line-field select{height:40px;border:1px solid #D0D5DD;border-radius:8px;padding:0 10px;font-weight:400}
@media (max-width:1100px){.sit-grid{grid-template-columns:1fr}.sit-side{position:static}.sit-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:760px){.sit-kpis{grid-template-columns:1fr 1fr;gap:8px}.sit-kpi{padding:10px}.sit-kpi b{font-size:15px}.sit-proj select{min-width:0;width:100%;max-width:none}.sit-head-r{width:100%}.sit-tbl{font-size:12px}.sit-tools{padding:8px}.sit-tools-r{width:100%;justify-content:space-between}}
.sit-pill,.sit-mini,.gcd-pill{border-left-width:1px}
.sit-pill{border:0!important}
.sit-mini.ok{border:1px solid #067647!important}
.gcd-pill.ok,.gcd-pill.bad,.gcd-pill.warn{border:0!important}
.sit-tbl col.c-q{width:84px}.sit-tbl col.c-pu{width:86px}.sit-tbl col.c-tot{width:98px}.sit-tbl col.c-prior{width:96px}.sit-tbl col.c-in{width:120px}.sit-tbl col.c-amt{width:104px}
.sit-grid{grid-template-columns:minmax(0,1fr) 280px}
.sit-catpct input,#sit-root .sit-catpct input{height:26px!important;min-height:0!important;width:96px!important;padding:0 6px!important;border:1px dashed #D0D5DD!important;border-radius:6px!important;background:#fff!important;font-size:11.5px!important;box-shadow:none!important}
#sit-root .sit-in input{height:26px!important;min-height:0!important;border:0!important;box-shadow:none!important;background:transparent!important;padding:0 4px 0 8px!important}
#sit-root .sit-tva select{height:26px!important;min-height:0!important;width:auto!important;padding:0 22px 0 6px!important;font-size:12px!important;border-radius:6px!important;margin-left:6px}
#sit-root .sit-tva{display:inline-flex;align-items:center}

/* v174 — Lignes & assignation : en-tête compact, compteurs-filtres, responsable modifiable dans la ligne, état vide utile */
#line-items-view>.section-head{display:flex;flex-wrap:wrap;align-items:flex-end;gap:6px 16px}
#line-items-view>.section-head>div:first-child{flex:1 1 auto}
#line-items-view>.section-head>span{order:3;flex-basis:100%;font-size:13px;color:#667085;margin:0}
#line-items-view .li-project select{max-width:340px!important;min-width:220px;width:auto!important;height:36px!important;font-size:13px!important;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}
#line-items-view .li-quick{max-width:520px;margin:12px 0}
.ln-kpis{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin:0 0 12px}
.ln-kpi{display:flex;flex-direction:column;align-items:flex-start;gap:2px;padding:10px 14px;border:1px solid #EAECF0;border-radius:10px;background:#fff;text-align:left;cursor:pointer;font:inherit}
.ln-kpi small{font-size:11.5px;color:#667085}
.ln-kpi b{font-size:18px;font-weight:700;color:#101828;line-height:1.2}
.ln-kpi em{font-style:normal;font-size:11px;color:#98A2B3}
.ln-kpi:hover{border-color:#98A2B3}
.ln-kpi.active{border-color:#1D4ED8;box-shadow:0 0 0 3px rgba(29,78,216,.1)}
.ln-who{position:relative;z-index:3;display:flex;align-items:center;gap:8px;min-width:0}
.ln-assign{height:30px!important;min-height:0!important;max-width:100%;padding:0 26px 0 8px!important;border:1px solid #D0D5DD!important;border-radius:6px!important;background-color:#fff!important;font-size:12.5px!important;color:#344054}
.ln-empty{display:flex;flex-direction:column;align-items:center;text-align:center;gap:8px;padding:40px 20px;border:1px dashed #D0D5DD;border-radius:12px;background:#fff}
.ln-empty-ic{display:grid;place-items:center;width:44px;height:44px;border-radius:10px;background:#EEF4FF;color:#1D4ED8}
.ln-empty-ic svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
.ln-empty b{font-size:15px;color:#101828}
.ln-empty span{max-width:520px;font-size:13px;color:#667085;line-height:1.5}
.ln-empty-acts{display:flex;gap:8px;margin-top:6px}
@media (max-width:760px){.ln-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.ln-kpis .ln-kpi:first-child{grid-column:1/-1}#line-items-view .li-project select{min-width:0;max-width:100%!important;width:100%!important}#line-items-view .li-actions{width:100%}}
@media (max-width:1100px){.sit-grid{grid-template-columns:1fr!important}.sit-side{position:static}}
@media (max-width:760px){.sit-main .sit-tbl{min-width:760px}.sit-hist{min-width:560px}.sit-terr{min-width:680px}.sit-terr .sit-d small{display:none}.sit-sec-head{flex-wrap:wrap}.sit-head h2{font-size:21px}}
.sit-info{display:grid;grid-template-columns:110px minmax(0,1fr) 150px 150px 190px;gap:10px;padding:12px 14px}
.sit-info label{display:flex;flex-direction:column;gap:4px;font-size:11.5px;font-weight:500;color:#667085}
#sit-root .sit-info input,#sit-root .sit-info select{height:34px!important;min-height:0!important;padding:0 10px!important;border:1px solid #D0D5DD!important;border-radius:8px!important;background:#fff!important;font-size:13px!important;color:#101828;box-shadow:none!important;width:100%}
#sit-root .sit-info input:disabled{background:#F9FAFB!important;color:#475467}
.sit-ded{display:inline-flex;align-items:center;gap:8px}
.sit-in-sm{height:26px}
#sit-root .sit-in-sm input{width:58px!important;height:24px!important}
.sit-saved{display:block;font-size:10.5px;color:#98A2B3;text-align:center;margin-top:4px}
@media (max-width:1100px){.sit-info{grid-template-columns:repeat(2,minmax(0,1fr))}.sit-info-ref{grid-column:1/-1}}

/* v174 — Créer devis / facture : les 3 cartes Client · Chantier · Document alignées et rangées */
#devis-builder-view .vze-info.vze-info3{align-items:stretch}
#devis-builder-view .vze-info3 .vze-grp{height:100%;gap:8px}
#devis-builder-view .vze-info3 .vze-grp h3{margin:0 0 2px}
#devis-builder-view .vze-info3 .vze-field>span{font-size:12px;font-weight:600;color:#344054}
#devis-builder-view .vze-info3 input,#devis-builder-view .vze-info3 select,#devis-builder-view .vze-info3 .vze-field>b{height:38px!important;min-height:0!important;font-size:13.5px!important}
#devis-builder-view .vze-grp[data-grp="chantier"]:has(.dc-new) .dc-site,#devis-builder-view .vze-grp[data-grp="chantier"]:has(.dc-new) .vze-grp-row{display:none!important}
#devis-builder-view .dc-new{display:grid!important;grid-template-columns:1fr;gap:8px;padding:10px;border:1px solid #C7D7FE;border-radius:8px;background:#F5F8FF}
#devis-builder-view .dc-new>b{font-size:12px;font-weight:600;color:#1D4ED8}
#devis-builder-view .dc-new input{width:100%;height:38px!important;padding:0 12px!important;border:1px solid #D0D5DD!important;border-radius:8px!important;background:#fff!important;font-size:13.5px!important;box-shadow:none!important}
#devis-builder-view .dc-new-acts{display:flex;gap:8px}
#devis-builder-view .dc-new-acts button{height:34px!important;min-height:0!important;padding:0 14px!important;font-size:13px!important;border-radius:8px!important}

/* v174 — Statistiques Général : compact comme Vertuoza (cartes plus petites, tout dans le cadre) */
.stk-grid{margin:4px 16px 18px!important;gap:10px!important}
.stk-card,.stk-grid>*{min-width:0}
.stk-grid h4,.stk-grid header,.stk-grid .stk-head{font-size:12.5px!important;padding:9px 12px!important}
.stk-box{margin:12px 14px 14px!important;min-height:74px!important;padding:0 52px 0 12px!important}
.stk-box b{font-size:clamp(18px,1.6vw,24px)!important}
.stk-ic svg{width:40px!important;height:40px!important}
.stk-split{margin:12px 8px 14px!important}
.stk-split>div{gap:6px!important}
.stk-split b{font-size:clamp(13px,1.1vw,15.5px)!important}
.stk-split small{font-size:11.5px!important}
.stk-pill{padding:2px 16px!important;font-size:11px!important}
.stk h4{font-size:12.5px!important;padding:9px 12px!important}
/* Groupes de discussion */
body[data-role="worker"] #cm-group-new,body[data-role="user"] #cm-group-new,body[data-role="comptable"] #cm-group-new{display:none!important}
#cm-group-new svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
.cm-avatar-group{background:#EEF4FF!important;color:#1D4ED8!important}
.cm-avatar-group svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
.cm-group-edit{margin-left:auto;height:30px;padding:0 12px;border:1px solid #D0D5DD;border-radius:8px;background:#fff;font-size:12.5px;font-weight:600;color:#344054;cursor:pointer}
.cm-chat-head{display:flex;align-items:center;gap:12px}
#messages .chat-sender{display:block;font-size:11.5px;font-weight:700;color:#1D4ED8;margin-bottom:1px}
.cmg{position:fixed;inset:0;z-index:400;display:grid;place-items:center;padding:16px}
.cmg-back{position:absolute;inset:0;background:rgba(16,24,40,.45)}
.cmg-dialog{position:relative;width:min(460px,100%);max-height:86vh;display:flex;flex-direction:column;gap:10px;background:#fff;border-radius:14px;padding:18px;box-shadow:0 20px 40px rgba(16,24,40,.25)}
.cmg-dialog h3{margin:0;font-size:17px;color:#101828}
.cmg-name{display:flex;flex-direction:column;gap:6px;font-size:12.5px;font-weight:600;color:#344054}
.cmg-name input{height:40px;border:1px solid #D0D5DD;border-radius:8px;padding:0 12px;font-size:14px}
.cmg-sub{display:flex;justify-content:space-between;align-items:center;font-size:12.5px;font-weight:600;color:#344054}
.cmg-link{border:0;background:none;color:#1D4ED8;font-size:12.5px;font-weight:600;cursor:pointer}
.cmg-list{overflow:auto;border:1px solid #EAECF0;border-radius:10px;max-height:300px}
.cmg-person{display:flex;align-items:center;gap:10px;padding:9px 12px;border-bottom:1px solid #F2F4F7;font-size:13.5px;cursor:pointer}
.cmg-person:last-child{border-bottom:0}
.cmg-person input{width:16px;height:16px}
.cmg-acts{display:flex;gap:8px;justify-content:flex-end;margin-top:4px}
.cmg-ok{height:38px;padding:0 16px;border:0;border-radius:8px;background:#0B1F3A;color:#fff;font-weight:600;cursor:pointer}
.cmg-cancel{height:38px;padding:0 14px;border:1px solid #D0D5DD;border-radius:8px;background:#fff;cursor:pointer}
.cmg-del{margin-right:auto;height:38px;padding:0 10px;border:0;background:none;color:#B42318;font-weight:600;cursor:pointer}

/* v176 — Facture de situation : lignes groupées par catégorie avec % par catégorie */
#sx-lines .sx-cat{display:grid;grid-template-columns:minmax(0,1fr) auto 96px 110px 118px 96px;gap:10px;align-items:center;padding:9px 12px;background:#F4F7FD;border-top:1px solid #E1E8F5;border-bottom:1px solid #E1E8F5}
#sx-lines .sx-cat b{font-size:13px;color:#0B1F3A}
#sx-lines .sx-cat small{font-size:11px;color:#667085}
#sx-lines .sx-cat .sx-a{font-weight:700;color:#0B1F3A}
#sx-lines .sx-cat-in input{border-style:dashed!important}
.sx-auto-note{margin:0 0 8px;padding:8px 12px;border-radius:8px;background:#FFFAEB;color:#8A5A00;font-size:12px}
#sx-lines .sx-sub{background:#FAFBFE;padding-left:26px;border-top:1px dashed #E1E8F5}
#sx-lines .sx-sub b{font-size:12.5px;font-weight:600;color:#344054}
.sit-sub td{padding:5px 8px;background:#FCFCFD;border-bottom:1px dashed #EAECF0}
.sit-sub b{font-size:12px;font-weight:600;color:#475467;padding-left:18px}

/* v217 — Curseur et saisie comme AutoCAD : réticule, accrochage, ligne élastique, polaire */
#plan-measure-canvas.is-cad{cursor:none}
#plan-cad-overlay{position:fixed;z-index:480;pointer-events:none;overflow:hidden}
#plan-cad-overlay[hidden]{display:none}
#plan-cad-overlay .cad-xh{stroke:#0F172A;stroke-width:1;opacity:.75;shape-rendering:crispEdges}
#plan-cad-overlay .cad-pick{fill:none;stroke:#0F172A;stroke-width:1.2;shape-rendering:crispEdges}
#plan-cad-overlay .cad-rubber{stroke:#1640D6;stroke-width:1.6;stroke-dasharray:7 5}
#plan-cad-overlay .cad-polar{stroke:#16A34A;stroke-width:1.2;stroke-dasharray:2 4}
#plan-cad-overlay .cad-osnap{fill:none;stroke:#65A30D;stroke-width:2.4}
#plan-cad-overlay .cad-dyn rect{fill:#0F172A;opacity:.88}
#plan-cad-overlay .cad-dyn text{fill:#fff;font:600 12px/1 ui-monospace,SFMono-Regular,Menlo,monospace}
#plan-cad-overlay .cad-tip rect{fill:#FEF9C3;stroke:#A16207;stroke-width:.8}
#plan-cad-overlay .cad-tip text{fill:#422006;font:600 11px/1 system-ui,sans-serif}
.plan-measure-canvas-wrap.is-cad-dark{background:#212830}
.plan-measure-canvas-wrap.is-cad-dark #plan-measure-canvas{filter:invert(1) hue-rotate(180deg)}
.plan-measure-canvas-wrap.is-cad-dark ~ * #plan-cad-overlay .cad-xh{stroke:#fff}
body:has(.plan-measure-canvas-wrap.is-cad-dark) #plan-cad-overlay .cad-xh,body:has(.plan-measure-canvas-wrap.is-cad-dark) #plan-cad-overlay .cad-pick{stroke:#F8FAFC}
body:has(.plan-measure-canvas-wrap.is-cad-dark) #plan-cad-overlay .cad-rubber{stroke:#FACC15}
/* v218 — titres des cartes Mon compte : jamais coupés (première lettre visible), retour à la ligne */
#account-settings-view .ac-card-head{overflow:visible!important;min-width:0}
#account-settings-view .ac-card-head h3{white-space:normal!important;overflow-wrap:anywhere;text-align:left!important;text-indent:0!important}
/* v219 — Journal des erreurs (Mon compte, administrateur) */
#error-check .erc-top{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}
#error-check .erc-top span{display:flex;gap:8px}
#error-check .erc-list{list-style:none;margin:0;padding:0;display:grid;gap:8px;max-height:520px;overflow:auto}
#error-check .erc-list li{border:1px solid #E4E7EC;border-radius:8px;padding:9px 11px;background:#fff;min-width:0}
#error-check .erc-h{display:flex;gap:8px;align-items:baseline;min-width:0}
#error-check .erc-h b{font-size:13px;font-weight:600;color:#101828;overflow-wrap:anywhere;flex:1;min-width:0}
#error-check .erc-h em{font-style:normal;font-size:12px;font-weight:700;color:#B42318}
#error-check .erc-src{font-size:10.5px;font-weight:700;text-transform:uppercase;letter-spacing:.03em;padding:2px 6px;border-radius:4px;flex:none}
#error-check .erc-srv{background:#FEE4E2;color:#B42318}
#error-check .erc-nav{background:#EEF4FF;color:#3538CD}
#error-check small{display:block;margin-top:3px;color:#667085;font-size:12px;overflow-wrap:anywhere}
#error-check details{margin-top:5px}#error-check summary{cursor:pointer;font-size:12px;color:#475467}
#error-check pre{white-space:pre-wrap;font-size:11px;background:#F9FAFB;padding:8px;border-radius:6px;margin:6px 0 0;max-height:200px;overflow:auto}
#error-check .erc-ok{margin:0;color:#067647;font-size:13px}
#error-check .erc-maint{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;margin-top:10px;padding-top:10px;border-top:1px solid #EAECF0}
#error-check .erc-maint small{margin:0;flex:1;min-width:200px}
#error-check .erc-maint span{display:flex;gap:8px;flex-wrap:wrap}
/* v221 — Modification d'une facture : bandeau clair */
.db-edit-bar{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin:0 0 12px;padding:10px 14px;border:1px solid #FEC84B;background:#FFFAEB;border-radius:10px;color:#93370D;font-size:13.5px}
.db-edit-bar[hidden]{display:none}
.db-edit-bar b{color:#7A2E0E}
#devis-builder-view.db-is-editing #devis-builder-number{background:#F2F4F7;color:#344054;font-weight:600}
/* v223 — notifications (toast) toujours lisibles : sous l'en-tête, au-dessus de tout */
#toast.toast{top:84px!important;right:20px!important;z-index:3000!important;max-width:min(460px,calc(100vw - 32px))!important;word-break:normal;overflow-wrap:anywhere}
@media(max-width:850px){#toast.toast{top:66px!important;left:12px!important;right:12px!important;max-width:none!important}}
#devis-builder-view.db-is-editing #devis-builder-supp-field{display:none!important}
/* Ouvrier : « Travaux du devis » au même style que Tâche(s) */
#my-tasks-panel.mt-devis{padding:0!important;border-radius:12px!important;overflow:hidden;border:1px solid #E7EBF1!important;background:#fff!important}
#my-tasks-panel .mt-devis-h{padding:14px 18px;background:#1638D6;color:#fff}
#my-tasks-panel .mt-devis-h h3{margin:0;color:#fff;font-size:18px}
#my-tasks-panel .mt-devis-h small{color:#DCE3FF}
#my-tasks-panel #my-tasks-list{padding:14px;display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:12px}
#my-tasks-panel .mt-card{border-radius:12px!important;border:1px solid #E4E7EC!important;border-left:4px solid #1638D6!important;box-shadow:none!important}
#my-tasks-panel .mt-card.mt-done{border-left-color:#12B76A!important}
#my-tasks-panel .mt-card button,#my-tasks-panel .mt-card .primary{border-radius:8px}

/* ── Fiches de paie : même présentation que le relevé bancaire, couleurs Vertuoza ── */
#payslips-view .ps-year select{height:40px;padding:0 34px 0 14px;border-radius:8px!important;border:0!important;background-color:#1638D6!important;color:#fff!important;font-weight:700;font-size:15px;box-shadow:0 2px 8px rgba(22,56,214,.25)}
#payslips-view .ps-kpis{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));gap:0!important;padding:0!important;background:#fff!important;border:1px solid #E7EBF1!important;border-radius:12px!important;overflow:hidden;box-shadow:0 1px 3px rgba(16,24,40,.05)}
#payslips-view .ps-kpi{display:flex!important;flex-direction:column!important;align-items:flex-start!important;gap:6px;padding:14px 18px!important;border:0!important;border-right:1px solid #EAECF0!important;border-radius:0!important;background:#fff!important;box-shadow:none!important}
#payslips-view .ps-kpi:last-child{border-right:0!important}
#payslips-view .ps-kpi span{font-size:11.5px!important;font-weight:700!important;letter-spacing:.06em;text-transform:uppercase;color:#475467!important}
#payslips-view .ps-kpi strong{font-size:20px!important;font-weight:700;color:#101828!important}
#payslips-view .ps-kpi.is-warn strong{color:#DC6803!important}
#payslips-view .ps-drop{border:1px solid #E7EBF1!important;border-radius:12px!important;background:#fff!important}
#payslips-view .ps-drop .primary,#payslips-view .ps-pending-bar .primary,#payslips-view .ps-small.primary{background:#1638D6!important;border-color:#1638D6!important;color:#fff!important;border-radius:8px!important}
#payslips-view .ps-drop-icon{background:#E8EEFF!important}
#payslips-view .ps-drop-icon svg{stroke:#1638D6!important}
#payslips-view .ps-months{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
#payslips-view .ps-months::before{content:'Mois :';font-size:13px;font-weight:600;color:#475467;margin-right:2px}
#payslips-view .ps-mchip{display:inline-flex!important;align-items:center;gap:7px;height:34px;padding:0 12px!important;border:1px solid #D0D5DD!important;border-radius:6px!important;background:#fff!important;color:#101828!important;font-weight:700!important;font-size:13.5px!important}
#payslips-view .ps-mchip b{font-weight:500;font-size:11.5px;color:#667085;background:none!important;padding:0!important}
#payslips-view .ps-mchip b::before{content:'· '}
#payslips-view .ps-mchip.is-on{background:#1638D6!important;border-color:#1638D6!important;color:#fff!important}
#payslips-view .ps-mchip.is-on b{color:#DCE3FF}
#payslips-view .ps-mchip.is-future{opacity:.45}
#payslips-view .ps-folders{display:flex;flex-direction:column;gap:0}
#payslips-view .ps-group-head{display:flex!important;align-items:center;justify-content:space-between;margin-top:18px;padding:13px 18px!important;background:#1638D6!important;color:#fff!important;border-radius:12px 12px 0 0;font-size:13px!important;font-weight:800!important;letter-spacing:.08em;text-transform:uppercase}
#payslips-view .ps-group-head span{font-size:12px;font-weight:600;letter-spacing:0;text-transform:none;background:rgba(255,255,255,.18)!important;color:#fff!important;padding:2px 10px;border-radius:999px}
#payslips-view .ps-folder{margin:0!important;border-radius:0!important;border:1px solid #E4E7EC!important;border-top:0!important;box-shadow:none!important;background:#fff!important}
#payslips-view .ps-group-head + .ps-folder{border-top:0!important}
#payslips-view .ps-folder:has(+ .ps-group-head),#payslips-view .ps-folder:last-child{border-radius:0 0 12px 12px!important}
#payslips-view .ps-folder-head{min-height:52px;padding:10px 16px!important;background:#F8F9FC!important}
#payslips-view .ps-folder-head:hover{background:#EEF1FB!important}
#payslips-view .ps-folder.is-open > .ps-folder-head{background:#EEF1FB!important;border-bottom:1px solid #DCE2F7}
#payslips-view .ps-avatar{background:#1638D6!important;color:#fff!important}
#payslips-view .ps-avatar.alert{background:#F79009!important}
#payslips-view .ps-folder-title strong{color:#101828;font-weight:700}
#payslips-view .ps-folder-title em{font-style:normal;font-size:11px;font-weight:700;padding:2px 8px;border-radius:999px;background:#E8EEFF;color:#1638D6;margin-left:6px}
#payslips-view .ps-count{background:#1638D6!important;color:#fff!important}
#payslips-view .ps-line{padding:11px 18px 11px 64px!important;border-top:1px solid #F2F4F7}
#payslips-view .ps-line:hover{background:#FAFBFF}
#payslips-view .ps-chip.ok{background:#ECFDF3!important;color:#067647!important}
#payslips-view .ps-chip.wait{background:#FFFAEB!important;color:#B54708!important}
#payslips-view .ps-chip.miss{background:#FEF3F2!important;color:#B42318!important}
#payslips-view .ps-ic{border-radius:8px!important}
#payslips-view .ps-ic:hover{border-color:#1638D6!important;color:#1638D6!important}
#payslips-view .ps-folder.is-open:not([data-folder]){border-radius:12px!important;border-top:1px solid #E4E7EC!important;overflow:hidden;margin-top:14px!important}
#payslips-view .ps-month-title{background:#1638D6!important;color:#fff!important}
#payslips-view .ps-month-title strong,#payslips-view .ps-month-title small{color:#fff!important}
#payslips-view .ps-month-title .primary{background:#fff!important;color:#1638D6!important}
#payslips-view .ps-mline{padding-left:18px!important}
@media (max-width:760px){#payslips-view .ps-kpis{grid-template-columns:1fr 1fr}#payslips-view .ps-kpi:nth-child(2){border-right:0!important}#payslips-view .ps-kpi:nth-child(-n+2){border-bottom:1px solid #EAECF0!important}#payslips-view .ps-line{padding-left:18px!important}}
#payslips-view .ps-mchip b{display:inline!important;position:static!important;margin:0!important;line-height:1}
#payslips-view .ps-mchip .dot{position:static!important}
#payslips-view .ps-folder.is-open > .ps-folder-head.ps-month-title{background:#1638D6!important;border-bottom:0}
#payslips-view .ps-folder.is-open > .ps-folder-head.ps-month-title strong,#payslips-view .ps-folder.is-open > .ps-folder-head.ps-month-title small{color:#fff!important}
#payslips-view .ps-ic.ok{background:#1638D6!important;border-color:#1638D6!important;color:#fff!important}
@media (max-width:760px){#payslips-view .ps-months::before{white-space:nowrap;align-self:center}}
/* Messages : couleurs Vertuoza */
#communication-view .cm-send,#communication-view #cm-broadcast .primary{background:#1638D6!important;border-color:#1638D6!important;color:#fff!important}
#communication-view .chat-bubble.sent{background:#1638D6!important;color:#fff!important}
#communication-view .cm-contact.active{background:#EEF1FB!important;box-shadow:inset 3px 0 0 #1638D6}
#communication-view .cm-contact-meta i{background:#1638D6!important}
#communication-view .cm-avatar{background:#1638D6!important;color:#fff!important}

/* ── Banque façon Vertuoza : bleu, cartes, bandeaux ── */
#bank-view .bk-import,#bank-view .section-head .primary{background:#1638D6!important;border-color:#1638D6!important;color:#fff!important;box-shadow:0 2px 8px rgba(22,56,214,.25)}
#bank-view .bk-import:hover{background:#1230B8!important}
body #bank-view .bk-year{border-radius:10px!important}
body #bank-view .bk-year.active{border-color:#1638D6!important;background:#1638D6!important;box-shadow:0 4px 12px rgba(22,56,214,.28)}
#bank-view .bk-card{border-radius:8px!important}
#bank-view .bk-card.active{background:#1638D6!important;border-color:#1638D6!important}
#bank-view .bk-detail{border-radius:14px!important;border-color:#E7EBF1!important;box-shadow:0 1px 3px rgba(16,24,40,.06)}
#bank-view .bk-detail>.panel-head{background:#F7F8FD!important;border-bottom:1px solid #E4E7F2}
#bank-view .bk-detail>.panel-head h3{color:#101828!important;font-weight:700!important}
#bank-view .bk-detail .panel-toolbar button{border-radius:8px!important}
#bank-view .bks-kpis{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;padding:16px;border:0!important;background:#F7F8FD}
#bank-view .bks-kpi{border:1px solid #E4E7EC!important;border-radius:12px;background:#fff!important;padding:14px 16px!important;box-shadow:0 1px 2px rgba(16,24,40,.04)}
#bank-view .bks-kpi small{color:#667085!important;letter-spacing:.04em}
#bank-view .bks-kpi strong{font-size:20px!important;color:#101828}
#bank-view .bks-kpi.strong{background:#EEF2FF!important;border-color:#C7D2FE!important}
#bank-view .bks-kpi.strong strong{color:#1638D6!important}
#bank-view .bkl-tools select{border-radius:8px}
#bank-view .bkl-part{border-radius:12px!important;border-color:#E4E7EC!important;box-shadow:0 1px 3px rgba(16,24,40,.05)}
#bank-view .bkl-part-head{background:#1638D6!important;color:#fff!important;padding:13px 18px!important}
#bank-view .bkl-part.neg .bkl-part-head{background:#1638D6!important}
#bank-view .bkl-part-head span{letter-spacing:.08em}
#bank-view .bkl-part.pos .bkl-part-head b{color:#B7F5CC!important}
#bank-view .bkl-part.neg .bkl-part-head b{color:#FFD3CF!important}
#bank-view .bkl-cat>summary{padding:11px 18px!important;background:#F8F9FC}
#bank-view .bkl-cat>summary:hover{background:#EEF1FB}
#bank-view .bkl-cat[open]>summary{background:#EEF1FB;box-shadow:inset 3px 0 0 #1638D6}
#bank-view .bkl-net{border:2px solid #1638D6!important;border-radius:12px!important;background:#EEF2FF!important}
#bank-view .bkl-net b{color:#1638D6!important}
#bank-view .bank-group-tabs button.active{color:#1638D6!important;border-bottom-color:#1638D6!important}
#bank-view .bank-group-tabs+.bank-group-tabs button.active{background:#1638D6!important;border-color:#1638D6!important}
@media (max-width:900px){#bank-view .bks-kpis{grid-template-columns:1fr 1fr}#bank-view .bks-kpi{border-top:1px solid #E4E7EC!important}}

/* ── Carnet de bord façon Vertuoza ── */
#vehicles-view .section-head .primary,#vehicles-view .worker-add-toggle{background:#1638D6!important;border-color:#1638D6!important;color:#fff!important;border-radius:8px!important;box-shadow:0 2px 8px rgba(22,56,214,.25)}
#vehicles-view .section-head .secondary{border-radius:8px!important}
#vehicles-view .veh-strip-head{display:flex;align-items:center;justify-content:space-between}
#vehicles-view .veh-add{color:#1638D6!important;font-weight:700}
#vehicles-view .veh-list{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(290px,1fr));gap:12px}
#vehicles-view .veh-list>*{border-radius:14px!important;border:1px solid #E4E7EC!important;border-left:4px solid #1638D6!important;background:#fff!important;box-shadow:0 1px 3px rgba(16,24,40,.06)!important;padding:16px!important}
#vehicles-view .veh-ic{background:#1638D6!important;border-radius:12px!important}
#vehicles-view .veh-ic svg{stroke:#fff!important}
#vehicles-view .veh-plate{display:inline-block;padding:2px 8px;border:2px solid #101828;border-radius:5px;background:#fff;font-family:'IBM Plex Mono',ui-monospace,monospace;font-weight:700;letter-spacing:.06em;font-size:12px;box-shadow:inset 6px 0 0 #1638D6;padding-left:12px}
#vehicles-view .rg-toolbar{background:#fff;border:1px solid #E7EBF1;border-radius:12px;padding:10px;gap:8px}
#vehicles-view .rg-toolbar select,#vehicles-view .rg-search{border-radius:8px!important}
#vehicles-view .rg-register{border-radius:12px!important;overflow:hidden}
#vehicles-view .trip-table thead th{background:#1638D6!important;color:#fff!important;border:0!important;text-transform:none!important;letter-spacing:0!important}
#vehicles-view .trip-table tbody tr:nth-child(even) td{background:#F7F8FD}
#vehicles-view .trip-table tbody tr:hover td{background:#EEF1FD!important}
#vehicles-view .trip-type{border-radius:999px;padding:2px 9px;background:#E8EEFF;color:#1638D6;font-weight:600;font-size:12px}
body #bank-view button.active:not(.bk-year){background:#1638D6!important;border-color:#1638D6!important;color:#fff!important}
body #bank-view button.active:not(.bk-year) small{color:#DCE3FF!important}
#vehicles-view .rg-register .rg-head,#vehicles-view .rg-register thead th,#vehicles-view .rg-register [class*="head"]:not(.veh-strip-head){background:#1638D6!important;color:#fff!important;border-color:#1638D6!important}
#vehicles-view .rg-register .rg-head *{color:#fff!important}
#vehicles-view .trip-type{display:inline-block!important;width:auto!important;max-width:100%}
/* Carnet de bord : haut de page plus compact */
#vehicles-view .section-head{margin-bottom:8px!important}
#vehicles-view .veh-strip{margin:0 0 10px!important}
#vehicles-view .veh-strip-head{margin-bottom:6px!important}
#vehicles-view .veh-list{grid-template-columns:repeat(auto-fill,minmax(250px,300px))!important;gap:10px!important}
#vehicles-view .veh-list>*{padding:9px 12px!important;min-height:0!important;border-radius:10px!important;gap:10px!important}
#vehicles-view .veh-ic{width:34px!important;height:34px!important;border-radius:9px!important}
#vehicles-view .veh-ic svg{width:18px!important;height:18px!important}
#vehicles-view .veh-txt{font-size:12px;line-height:1.35}
#vehicles-view .veh-txt strong,#vehicles-view .veh-txt b{font-size:13.5px}
#vehicles-view .veh-plate{font-size:11px;padding:1px 6px 1px 10px}
#vehicles-view .trip-cats{gap:8px!important;margin:0 0 10px!important}
#vehicles-view .trip-cats>*{padding:8px 12px!important;min-height:0!important;border-radius:10px!important}
#vehicles-view .trip-cats strong,#vehicles-view .trip-cats b{font-size:17px!important}
#vehicles-view .trip-cats small,#vehicles-view .trip-cats span{font-size:11.5px!important}
#vehicles-view .veh-list>*{height:auto!important;max-height:none;align-items:center!important}
#vehicles-view .veh-list>* *{margin-top:0;margin-bottom:0}
#vehicles-view .trip-cats>*.active,#vehicles-view .trip-cats>*[aria-pressed="true"],#vehicles-view .trip-cats>*.is-on{border-color:#1638D6!important;box-shadow:0 0 0 1px #1638D6!important}

/* ── Messages : options ── */
.cm-filters{display:flex;gap:6px;padding:0 0 8px}
.cm-filters button{display:inline-flex;align-items:center;gap:6px;height:30px;padding:0 12px;border:1px solid #E4E7EC;border-radius:999px;background:#fff;font-size:12.5px;font-weight:600;color:#344054;cursor:pointer}
.cm-filters button i{min-width:18px;height:18px;padding:0 5px;border-radius:999px;background:#1638D6;color:#fff;font-style:normal;font-size:11px;display:grid;place-items:center}
.cm-filters button.is-on{background:#1638D6;border-color:#1638D6;color:#fff}.cm-filters button.is-on i{background:#fff;color:#1638D6}
.cm-chat-head{display:flex!important;align-items:center}
.cm-chat-head>div{flex:1;min-width:0}
.cm-head-btn{width:38px;height:38px;border:1px solid #E4E7EC;border-radius:10px;background:#fff;display:grid;place-items:center;cursor:pointer;flex:none}
.cm-head-btn svg{width:18px;height:18px;fill:none;stroke:#344054;stroke-width:2}
.cm-head-btn:hover{border-color:#1638D6}.cm-head-btn:hover svg{stroke:#1638D6}
.cm-thread-search{display:flex;align-items:center;gap:10px;padding:8px 14px;border-bottom:1px solid #EAECF0;background:#F8F9FC}
.cm-thread-search[hidden]{display:none}
.cm-thread-search input{flex:1;height:36px;padding:0 12px;border:1px solid #D0D5DD;border-radius:8px;font-size:14px;background:#fff}
.cm-thread-search small{color:#667085;font-size:12.5px;white-space:nowrap}
#messages .cm-miss{display:none!important}
#messages mark{background:#FDE68A;color:inherit;border-radius:3px;padding:0 1px}
.cm-quick{display:flex;gap:6px;overflow-x:auto;padding:8px 14px 0;scrollbar-width:none}
.cm-quick::-webkit-scrollbar{display:none}
.cm-quick button{flex:none;height:30px;padding:0 12px;border:1px solid #D5DCF7;border-radius:999px;background:#F5F7FF;color:#1638D6;font-size:12.5px;font-weight:600;cursor:pointer;white-space:nowrap}
.cm-quick button:hover{background:#E8EEFF}
.chat-bubble-row{position:relative}
.chat-acts{display:inline-flex;gap:4px;align-self:center;opacity:0;transition:opacity .15s;margin:0 4px}
.chat-bubble-row:hover .chat-acts,.chat-bubble-row:focus-within .chat-acts{opacity:1}
.chat-acts button{width:28px;height:28px;border:1px solid #E4E7EC;border-radius:8px;background:#fff;display:grid;place-items:center;cursor:pointer;padding:0}
.chat-acts svg{width:14px;height:14px;fill:none;stroke:#475467;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.chat-acts button:hover{border-color:#1638D6}.chat-acts button:hover svg{stroke:#1638D6}
.chat-bubble-row.sent .chat-acts{order:-1}
@media (hover:none){.chat-acts{opacity:.85}}
/* Facture depuis le devis : texte de chaque ligne modifiable (montant inchangé) */
#sx-lines .sx-desc{display:block;padding:2px 4px;margin:-2px -4px;border-radius:5px;cursor:text;outline:none}
#sx-lines .sx-desc:hover{background:#F2F5FF;box-shadow:inset 0 0 0 1px #C7D2FE}
#sx-lines .sx-desc:focus{background:#fff;box-shadow:inset 0 0 0 2px #1638D6}
#sx-lines .sx-desc.is-edited{box-shadow:inset 3px 0 0 #F79009;background:#FFFAEB}
.vze-date{height:38px;width:100%;padding:0 10px;border:1px solid #D0D5DD;border-radius:8px;background:#fff;font-size:14px;color:#101828;font-family:inherit}
.vze-date:focus{outline:none;border-color:#1638D6;box-shadow:0 0 0 3px rgba(22,56,214,.15)}
.vze-date[hidden]{display:none}
#sx-lines .sx-unit{height:24px;padding:0 4px;border:1px solid #D0D5DD;border-radius:6px;background:#fff;font-size:12px;font-weight:600;color:#101828;cursor:pointer}
#sx-lines .sx-unit:hover{border-color:#1638D6}
#sx-lines .sx-unit.is-edited{border-color:#F79009;background:#FFFAEB}
/* Lecture de plan : onglet Calepinage clair */
.pmr-cal-kpis{display:grid;grid-template-columns:2fr 1fr 1fr;gap:12px;margin:12px 0}
.pmr-cal-kpis>div{padding:14px 16px;border:1px solid #E4E7EC;border-radius:12px;background:#fff;display:flex;flex-direction:column;gap:4px}
.pmr-cal-kpis small{font-size:12px;font-weight:600;color:#667085;text-transform:uppercase;letter-spacing:.04em}
.pmr-cal-kpis b{font-size:22px;color:#101828}
.pmr-cal-kpis span{font-size:12.5px;color:#667085;display:flex;gap:6px;flex-wrap:wrap}
.pmr-ral{font-style:normal;padding:2px 8px;border-radius:999px;background:#EEF2FF;color:#1638D6;font-weight:600}
.pmr-cal-t{width:100%;border-collapse:separate;border-spacing:0;border:1px solid #E4E7EC;border-radius:12px;overflow:hidden;font-size:14px}
.pmr-cal-t th{background:#1638D6;color:#fff;text-align:left;padding:10px 14px;font-weight:600}
.pmr-cal-t td{padding:9px 14px;border-top:1px solid #EAECF0}
.pmr-cal-t tbody tr:nth-child(even) td{background:#F7F8FD}
.pmr-cal-t .num{text-align:right;font-variant-numeric:tabular-nums}
.pmr-cal-t tfoot th{background:#EEF2FF;color:#1638D6}
.pmr-cal-t small{color:#667085}
.pmr-cal-acc{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:14px 0}
.pmr-cal-acc small{font-weight:600;color:#475467;margin-right:4px}
.pmr-cal-acc span{padding:6px 12px;border-radius:10px;background:#F2F4F7;font-size:13px}
.pmr-cal-go{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin-top:14px}
.pmr-cal-go .primary{background:#1638D6!important;border-color:#1638D6!important;color:#fff!important;border-radius:8px!important}
.pmr-cal-go small{color:#667085}
@media (max-width:760px){.pmr-cal-kpis{grid-template-columns:1fr}}
.pmr-supply{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:10px 0 12px}
.pmr-supply span{font-size:13px;font-weight:600;color:#475467;margin-right:4px}
.pmr-supply button{height:36px;padding:0 14px;border:1px solid #D0D5DD;border-radius:8px;background:#fff;font-size:13.5px;font-weight:600;color:#344054;cursor:pointer}
.pmr-supply button.is-on{background:#1638D6;border-color:#1638D6;color:#fff}
.pmr-supply-note{flex-basis:100%;font-size:12.5px;color:#667085;margin-top:2px}
.pmr-metre{border:1px solid #E4E7EC;border-radius:12px;background:#F8FAFF;padding:12px 14px;margin:8px 0 14px}
.pmr-metre-t{display:block;font-size:14px;color:#101828;margin-bottom:8px}
.pmr-metre-g{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:8px}
.pmr-metre-g>div{background:#fff;border:1px solid #E4E7EC;border-radius:10px;padding:8px 10px;display:flex;flex-direction:column;gap:2px;min-width:0}
.pmr-metre-g small{font-size:11.5px;color:#667085;font-weight:600;text-transform:uppercase;letter-spacing:.02em}
.pmr-metre-g b{font-size:17px;color:#1638D6;font-variant-numeric:tabular-nums}
.pmr-metre-g span{font-size:11.5px;color:#98A2B3}
details.pmr-aux{margin-top:12px;border:1px dashed #D0D5DD;border-radius:10px;padding:8px 12px;background:#FCFCFD}
details.pmr-aux>summary{cursor:pointer;font-size:13.5px;font-weight:600;color:#475467}
details.pmr-cotes>summary{cursor:pointer;font-size:12.5px;color:#475467;margin:4px 0}
.pmr-metre-how{margin:10px 0 0;padding-left:18px;font-size:13px;color:#475467;line-height:1.55}
.pmr-brief{margin:4px 0 12px;padding:10px 12px 10px 30px;border-radius:10px;background:#EEF2FF;color:#1D2939;font-size:14px;line-height:1.6}
@media (max-width:600px){.pmr-metre-g{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.pmr-metre-g b{font-size:15px}.pmr-metre-g small{font-size:10.5px;overflow-wrap:anywhere}.pmr-supply button{flex:1 1 auto}}
#plan-cad-overlay .cad-hl{stroke:#06B6D4;stroke-width:4;stroke-linecap:round;opacity:.55}
body:has(.plan-measure-canvas-wrap.is-cad-dark) #plan-cad-overlay .cad-hl{stroke:#22D3EE;opacity:.7}
#plan-cad-overlay .cad-tip rect{fill:#FFFBEB;stroke:#B45309;stroke-width:1}
#plan-cad-overlay .cad-tip text{fill:#1F2937;font:600 12px/1 system-ui,sans-serif}
.pm-osnap{position:relative;display:inline-block}
.pm-osnap>summary{list-style:none;cursor:pointer;min-width:30px;text-align:center;padding-left:6px!important;padding-right:6px!important}
.pm-osnap>summary::-webkit-details-marker{display:none}
#plan-measure-snap-toggle[hidden]+.pm-osnap{display:none}
.pm-osnap-pop{position:absolute;bottom:calc(100% + 8px);left:50%;transform:translateX(-50%);z-index:520;min-width:220px;background:#fff;border:1px solid #D0D5DD;border-radius:10px;box-shadow:0 12px 32px rgba(16,24,40,.18);padding:10px 12px;display:flex;flex-direction:column;gap:4px}
.pm-osnap-pop>b{font-size:13px;color:#101828;margin-bottom:2px}
.pm-osnap-pop>small{font-size:11.5px;color:#667085;margin-top:4px}
.pm-osnap-list{display:flex;flex-direction:column;gap:2px}
.pm-osnap-list label{display:flex;align-items:center;gap:8px;font-size:13.5px;color:#344054;padding:5px 4px;border-radius:6px;cursor:pointer;white-space:nowrap}
.pm-osnap-list label:hover{background:#F2F4F7}
.pm-osnap-list input{width:16px;height:16px;margin:0;accent-color:#1638D6}
.pm-osnap-list svg{width:16px;height:16px;fill:none;stroke:#65A30D;stroke-width:2.2}
/* Colonne de gauche : affichage et accrochage avec les outils */
#plan-measure-modal.pmx .pmx-rail{max-height:calc(100% - 64px);overflow:visible}
#plan-measure-modal.pmx .pmx-rail .pmx-view,#plan-measure-modal.pmx .pmx-rail .pmx-set{align-items:center}
#plan-measure-modal.pmx .pmx-rail .pm-icon,#plan-measure-modal.pmx .pmx-rail .pm-snap{display:grid!important;place-items:center;width:30px!important;min-width:30px!important;height:30px!important;min-height:30px!important;padding:0!important;border:0!important;border-radius:5px!important;background:transparent!important;color:#344054!important;box-shadow:none!important;font-size:11px!important;font-weight:700!important;cursor:pointer}
#plan-measure-modal.pmx .pmx-rail .pm-icon:hover,#plan-measure-modal.pmx .pmx-rail .pm-snap:hover{background:#F2F4F7!important}
#plan-measure-modal.pmx .pmx-rail .pm-icon svg,#plan-measure-modal.pmx .pmx-rail .pm-snap svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.8}
#plan-measure-modal.pmx .pmx-rail .pm-snap span{display:none}
#plan-measure-modal.pmx .pmx-rail .pm-snap.is-on{background:#E8EEFF!important;color:#1640D6!important}
#plan-measure-modal.pmx .pmx-rail #plan-measure-snap-toggle.is-on{background:#ECFDF3!important;color:#067647!important}
#plan-measure-modal.pmx .pmx-rail #plan-measure-zoom-level{display:block;width:30px;text-align:center;font-size:9.5px;font-weight:700;color:#475467;line-height:14px}
#plan-measure-modal.pmx .pmx-rail .pmx-v svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.8}
#plan-measure-modal.pmx .pmx-rail .pm-osnap>summary{height:16px!important;min-height:16px!important;font-size:10px!important;color:#667085!important}
#plan-measure-modal.pmx .pmx-rail .pm-osnap-pop{left:calc(100% + 10px);top:-40px;bottom:auto;transform:none}
#plan-measure-modal.pmx .pmx-foot{padding:6px 12px}
#plan-measure-modal.pmx .pmx-foot:not(:has(.plan-measure-status:not(:empty))){display:none}
@media (max-width:700px){#plan-measure-modal.pmx .pmx-rail{flex-wrap:wrap;max-height:440px;align-content:flex-start;column-gap:6px}}
#plan-measure-modal.pmx .pmx-rail-tg{display:grid;place-items:center;width:36px;height:26px;padding:0;border:0;border-radius:7px;background:#fff;color:#475467;box-shadow:0 1px 3px rgba(16,24,40,.14);cursor:pointer}
#plan-measure-modal.pmx .pmx-rail-tg:hover{color:#1640D6}
#plan-measure-modal.pmx .pmx-rail-tg svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2}
#plan-measure-modal.pmx .pmx-rail.is-min>.pmx-grp{display:none!important}
#plan-measure-modal.pmx .pmx-rail.is-min .pmx-rail-tg{height:36px}
.pmr-metre-top{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}
.pmr-metre-top .pmr-metre-t{margin:0}
.pmr-metre-top button{height:34px;padding:0 14px;border-radius:8px;font-size:13px;font-weight:700}
#pm-metre-legend{position:absolute;right:12px;bottom:12px;z-index:7;max-width:330px;display:flex;flex-direction:column;gap:5px;padding:12px 14px;border-radius:10px;background:#fff;border:1px solid #E4E7EC;box-shadow:0 10px 28px rgba(16,24,40,.18);font-size:13px;color:#344054}
#pm-metre-legend b{font-size:14px;color:#101828}
#pm-metre-legend strong{color:#101828}
#pm-metre-legend i{display:inline-block;width:12px;height:12px;border-radius:3px;margin-right:6px;vertical-align:-1px}
#pm-metre-legend .lg-f{background:rgba(22,56,214,.15);border:2px solid #1638D6}
#pm-metre-legend .lg-o{background:rgba(220,38,38,.3);border:2px solid #DC2626}
#pm-metre-legend .lg-d{background:rgba(234,88,12,.3);border:2px solid #EA580C}
#pm-metre-legend small{font-size:11.5px;color:#667085;line-height:1.4}
#pm-metre-legend button{align-self:flex-start;height:30px;padding:0 12px;font-size:12.5px}
#pm-seg-bar{position:absolute;left:50%;top:10px;transform:translateX(-50%);z-index:8;display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:center;max-width:calc(100% - 120px);padding:8px 10px 8px 14px;border-radius:10px;background:#fff;border:1px solid #D0D5DD;box-shadow:0 8px 24px rgba(16,24,40,.18);font-size:13px;color:#344054}
#pm-seg-bar[hidden]{display:none}
#pm-seg-bar b{color:#101828}
#pm-seg-bar button{height:32px;padding:0 12px;border-radius:7px;font-size:12.5px;font-weight:700;white-space:nowrap}
#pm-seg-bar .pm-seg-x{width:32px;padding:0;border:0;background:#F2F4F7;color:#475467;font-size:18px;cursor:pointer}
body:has(#pm-seg-bar:not([hidden])) #plan-measure-modal.pmx .pmx-draw{top:64px}
#plan-measure-modal .pm-layers[hidden]{display:none!important}
#plan-measure-modal.pmx .pmx-rail .pm-layers>summary{height:30px!important;min-height:30px!important}
#plan-measure-modal.pmx .pmx-rail .pm-layers>summary.is-on{background:#FFF7ED!important;color:#C2410C!important}
.pm-layers-pop{width:300px;max-height:min(70vh,520px);overflow:hidden;display:flex;flex-direction:column}
.pm-layers-acts{display:flex;gap:6px;margin:4px 0}
.pm-layers-acts button{flex:1;height:30px;border:1px solid #D0D5DD;border-radius:7px;background:#fff;font-size:12.5px;font-weight:600;color:#344054;cursor:pointer}
.pm-layers-acts button:hover{background:#F2F4F7}
.pm-layers-list{overflow:auto;display:flex;flex-direction:column;gap:1px;margin:2px -4px;padding:0 4px;min-height:0}
.pm-layer{display:flex;align-items:center;gap:4px;border-radius:6px}
.pm-layer:hover{background:#F2F4F7}
.pm-layer label{flex:1;display:flex;align-items:center;gap:8px;min-width:0;padding:5px 4px;font-size:13px;color:#344054;cursor:pointer}
.pm-layer input{width:16px;height:16px;margin:0;accent-color:#1638D6;flex:none}
.pm-layer i{width:14px;height:14px;border-radius:3px;border:1px solid rgba(0,0,0,.2);flex:none}
.pm-layer span{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pm-layer small{font-size:11px;color:#98A2B3;font-variant-numeric:tabular-nums}
.pm-layer button{height:24px;padding:0 8px;border:0;border-radius:5px;background:transparent;color:#1638D6;font-size:11.5px;font-weight:700;cursor:pointer;opacity:.0}
.pm-layer:hover button{opacity:1}
.pm-layer.is-off span{color:#98A2B3;text-decoration:line-through}
.pm-layers-state{color:#475467!important;margin-top:0!important}
#plan-measure-modal.pmx .pmx-rail .pm-layers .pm-layers-pop{top:auto;bottom:-70px}
/* Avancement des travaux sur le plan */
#pm-prog{position:absolute;top:10px;right:10px;bottom:10px;z-index:9;width:370px;max-width:calc(100% - 80px);display:flex;flex-direction:column;background:#fff;border:1px solid #E4E7EC;border-radius:12px;box-shadow:0 14px 36px rgba(16,24,40,.2);overflow:hidden;color:#101828}
#pm-prog[hidden]{display:none}
#pm-prog .pp-h{display:flex;align-items:center;justify-content:space-between;padding:12px 14px;border-bottom:1px solid #EAECF0}
#pm-prog .pp-h b{font-size:15px}
#pm-prog .pp-h button{width:30px;height:30px;border:0;border-radius:7px;background:#F2F4F7;font-size:18px;color:#475467;cursor:pointer}
#pm-prog .pp-empty{padding:16px;font-size:13.5px;color:#475467;line-height:1.5}
#pm-prog .pp-steps{list-style:none;margin:0;padding:10px 14px 4px;display:flex;flex-direction:column;gap:6px}
#pm-prog .pp-steps li{display:flex;align-items:center;gap:8px;font-size:13px;color:#98A2B3}
#pm-prog .pp-steps li b{display:grid;place-items:center;width:22px;height:22px;border-radius:50%;background:#F2F4F7;font-size:12px;color:#667085;flex:none}
#pm-prog .pp-steps li.is-now{color:#101828;font-weight:600}
#pm-prog .pp-steps li.is-now b{background:#1638D6;color:#fff}
#pm-prog .pp-steps li.is-done{color:#067647}
#pm-prog .pp-steps li.is-done b{background:#16A34A;color:#fff}
#pm-prog .pp-green{color:#15803D;font-weight:700}
#pm-prog .pp-how{display:flex;gap:10px;align-items:flex-start;margin:8px 14px;padding:10px 12px;border-radius:9px;background:#ECFDF3;border:1px solid #ABEFC6;font-size:13px;line-height:1.5;color:#054F31}
#pm-prog .pp-how.is-muted{background:#F9FAFB;border-color:#EAECF0;color:#475467}
#pm-prog .pp-how small{color:#067647}
#pm-prog .pp-tag{flex:none;padding:2px 8px;border-radius:6px;background:#16A34A;color:#fff;font-weight:700;font-size:12px}
#pm-prog .pp-list{flex:1;min-height:0;overflow:auto;padding:4px 10px 10px}
#pm-prog .pp-cat{margin:10px 4px 4px;font-size:11.5px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:#667085}
#pm-prog .pp-line{display:grid;grid-template-columns:24px 1fr;grid-template-areas:"no d" "no bar" "no n";column-gap:8px;row-gap:5px;width:100%;text-align:left;padding:9px 10px;margin:3px 0;border:1px solid #EAECF0;border-radius:9px;background:#fff;cursor:pointer;font:inherit;color:inherit}
#pm-prog .pp-line:hover{border-color:#B2CCFF;background:#F8FAFF}
#pm-prog .pp-line.is-sel{border:2px solid #16A34A;background:#F6FEF9;padding:8px 9px}
#pm-prog .pp-no{grid-area:no;display:grid;place-items:center;width:22px;height:22px;border-radius:6px;background:#15803D;color:#fff;font-size:11.5px;font-weight:700}
#pm-prog .pp-d{grid-area:d;font-size:13px;font-weight:600;line-height:1.35}
#pm-prog .pp-bar{grid-area:bar;position:relative;height:7px;border-radius:4px;background:#F2F4F7;overflow:hidden}
#pm-prog .pp-bar i{position:absolute;left:0;top:0;bottom:0;border-radius:4px}
#pm-prog .pp-bar .pp-done{background:#16A34A;opacity:.85}
#pm-prog .pp-bar .pp-inv{background:#98A2B3;z-index:1}
#pm-prog .pp-n{grid-area:n;display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 10px;font-size:12px;color:#475467}
#pm-prog .pp-n b{color:#101828;font-variant-numeric:tabular-nums}
#pm-prog .pp-n em{font-style:normal;font-weight:700;color:#15803D}
#pm-prog .pp-n small{color:#667085}
#pm-prog .pp-undo{margin:0 0 6px 34px;height:28px;padding:0 10px;border:1px solid #D0D5DD;border-radius:7px;background:#fff;font-size:12px;font-weight:600;color:#344054;cursor:pointer}
#pm-prog .pp-foot{padding:12px 14px;border-top:1px solid #EAECF0;display:flex;flex-direction:column;gap:6px}
#pm-prog .pp-foot button{height:42px;border-radius:9px;font-size:14px;font-weight:700}
#pm-prog .pp-foot button[disabled]{opacity:.5;cursor:not-allowed}
#pm-prog .pp-foot small{font-size:12px;color:#667085;line-height:1.4}
#plan-measure-modal.pmx .pmx-rail .pmx-prog{color:#15803D!important}
#plan-measure-modal.pmx .pmx-rail .pmx-prog.active{background:#DCFCE7!important;color:#14532D!important}
@media (max-width:700px){#pm-prog{left:10px;right:10px;top:auto;max-width:none;width:auto;height:55%}}
.pmr-calw{display:flex;flex-direction:column;gap:4px;margin:4px 0 12px;padding:10px 12px;border:1px solid #B2CCFF;border-radius:10px;background:#F5F8FF}
.pmr-calw label{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;font-size:13.5px;font-weight:700;color:#101828}
.pmr-calw label span{display:inline-flex;align-items:center;gap:6px;font-weight:600;color:#475467}
.pmr-calw input{width:96px;height:34px;padding:0 8px;border:1px solid #D0D5DD;border-radius:7px;font-size:14px;text-align:right}
.pmr-calw small{font-size:12px;color:#475467;line-height:1.45}
#pm-prog .pp-shape{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px}
#pm-prog .pp-shape button{height:30px;padding:0 10px;border:1px solid #ABEFC6;border-radius:7px;background:#fff;font-size:12px;font-weight:700;color:#067647;cursor:pointer}
#pm-prog .pp-shape button.is-on{background:#16A34A;border-color:#16A34A;color:#fff}
#pm-prog .pp-poly{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-top:8px;font-size:12px;color:#054F31}
#pm-prog .pp-poly button{height:28px;padding:0 10px;border:1px solid #D0D5DD;border-radius:7px;background:#fff;font-size:12px;font-weight:600;cursor:pointer}
#pm-prog .pp-poly button[disabled]{opacity:.5}
#pm-prog .pp-foot .secondary{height:36px;font-size:13px}
/* Barre d'affichage en haut (zoom, largeur, ajuster · unité, accrochage, calques, fond noir) */
#plan-measure-modal.pmx .pmx-tb{display:flex;align-items:center;gap:8px;margin-left:8px;margin-right:6px;min-width:0}
#plan-measure-modal.pmx .pmx-tb .pmx-grp{display:flex;flex-direction:row;align-items:center;gap:2px;padding:3px;border-radius:8px;background:#26313F;box-shadow:none;border:1px solid #3A4656}
#plan-measure-modal.pmx .pmx-tb .pm-icon,#plan-measure-modal.pmx .pmx-tb .pm-snap,#plan-measure-modal.pmx .pmx-tb .pm-tool{display:inline-flex!important;align-items:center;justify-content:center;gap:6px;min-width:32px!important;width:auto!important;height:32px!important;min-height:32px!important;padding:0 8px!important;border:0!important;border-radius:6px!important;background:transparent!important;color:#D0D5DD!important;box-shadow:none!important;font-size:12.5px!important;font-weight:600!important;cursor:pointer;white-space:nowrap}
#plan-measure-modal.pmx .pmx-tb .pm-icon:hover,#plan-measure-modal.pmx .pmx-tb .pm-snap:hover,#plan-measure-modal.pmx .pmx-tb .pm-tool:hover{background:#334155!important;color:#fff!important}
#plan-measure-modal.pmx .pmx-tb svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.9;flex:none}
#plan-measure-modal.pmx .pmx-tb .pm-snap span{display:inline}
#plan-measure-modal.pmx .pmx-tb .pm-snap.is-on{background:#1E3A8A!important;color:#fff!important}
#plan-measure-modal.pmx .pmx-tb #plan-measure-snap-toggle.is-on{background:#14532D!important;color:#BBF7D0!important}
#plan-measure-modal.pmx .pmx-tb #plan-measure-cad-bg.is-on{background:#000!important;color:#fff!important}
#plan-measure-modal.pmx .pmx-tb .pm-layers>summary.is-on{background:#7C2D12!important;color:#FED7AA!important}
#plan-measure-modal.pmx .pmx-tb #plan-measure-zoom-level{min-width:44px;text-align:center;font-size:12px;font-weight:700;color:#fff}
#plan-measure-modal.pmx .pmx-tb .pm-osnap{position:relative;display:inline-flex}
#plan-measure-modal.pmx .pmx-tb .pm-osnap>summary{list-style:none}
#plan-measure-modal.pmx .pmx-tb .pm-osnap>summary::-webkit-details-marker{display:none}
#plan-measure-modal.pmx .pmx-tb #plan-measure-osnap-menu>summary{min-width:22px!important;padding:0 4px!important;margin-left:-4px}
#plan-measure-modal.pmx .pmx-tb .pm-osnap-pop{position:fixed;bottom:auto;transform:none;z-index:600;color:#101828}
#plan-measure-modal.pmx .pmx-tb .pm-layers-pop{max-height:calc(100vh - 90px)}
#plan-measure-modal.pmx .pmx-foot[hidden]{display:none!important}
@media (max-width:1400px){#plan-measure-modal.pmx .pmx-tb .pm-snap span{display:none}}
@media (max-width:900px){
 #plan-measure-modal.pmx .worker-detail-header{height:auto!important;min-height:56px;flex-wrap:wrap;row-gap:4px;padding-bottom:6px!important}
 #plan-measure-modal.pmx .pmx-tb{order:10;flex-basis:100%;margin:0;overflow-x:auto;padding-right:8px}
}
#plan-measure-modal.pmx .pmx-tb .pm-osnap-pop small,#plan-measure-modal.pmx .pmx-tb .pm-layer small{display:inline;color:#667085!important;opacity:1;visibility:visible}
#plan-measure-modal.pmx .pmx-tb .pm-osnap-pop>small,#plan-measure-modal.pmx .pmx-tb .pm-layers-state{display:block!important;font-size:12px}
#plan-measure-modal.pmx .pmx-tb .pm-osnap-pop b{color:#101828}
#plan-measure-modal.pmx .pmx-tb .pm-layer span,#plan-measure-modal.pmx .pmx-tb .pm-osnap-list label{color:#344054}
#plan-measure-modal.pmx .pmx-tb .pm-layer small{display:inline!important;flex:none;font-size:11px}
#plan-measure-modal.pmx .pmx-tb .pm-layers-pop{width:340px}
/* Avancement : propositions des ouvriers */
#pm-prog .pp-pend{color:#C2410C!important;font-weight:700}
#pm-prog .pp-pending{margin:6px 10px 2px;padding:10px;border:1px solid #FDBA74;border-radius:10px;background:#FFF7ED;display:flex;flex-direction:column;gap:8px}
#pm-prog .pp-pending>b{font-size:13px;color:#9A3412}
#pm-prog .pp-batch{display:flex;gap:8px;align-items:flex-start;justify-content:space-between;padding:8px;border-radius:8px;background:#fff;border:1px solid #FED7AA;font-size:12.5px}
#pm-prog .pp-batch ul{margin:4px 0 0;padding-left:16px;color:#344054}
#pm-prog .pp-batch small{color:#667085}
#pm-prog .pp-batch>span{display:flex;flex-direction:column;gap:4px;flex:none}
#pm-prog .pp-batch button{height:28px;padding:0 10px;border-radius:7px;font-size:12px;font-weight:700;cursor:pointer;border:1px solid}
#pm-prog .pp-ok{background:#16A34A;border-color:#16A34A!important;color:#fff}
#pm-prog .pp-rej{background:#fff;border-color:#FDA29B!important;color:#B42318}
#pm-prog .pp-send{background:#EA580C!important;border-color:#EA580C!important}
/* Ouvrier dans le plan : seulement l'avancement et l'affichage */
#plan-measure-modal.pmx-worker .pmx-rail .pmx-grp:not(:has(#plan-measure-progress)),#plan-measure-modal.pmx-worker .pmx-auto,#plan-measure-modal.pmx-worker #plan-measure-tools-menu,#plan-measure-modal.pmx-worker #plan-measure-toggle-list{display:none!important}
/* Carte « plans » de l'ouvrier */
.wk-plans{margin:0 0 16px;padding:14px;border:1px solid #ABEFC6;border-radius:12px;background:#F6FEF9}
.wk-plans[hidden]{display:none}
.wk-plans-h{display:flex;gap:12px;align-items:center;margin-bottom:10px}
.wk-plans-h b{display:block;font-size:15px;color:#101828}
.wk-plans-h small{font-size:12.5px;color:#475467}
.wk-plans-ic{display:grid;place-items:center;width:40px;height:40px;border-radius:10px;background:#16A34A;color:#fff;flex:none}
.wk-plans-ic svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2}
.wk-plans-list{display:flex;flex-direction:column;gap:6px}
.wk-plans-list button{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:46px;padding:8px 12px;border:1px solid #D0D5DD;border-radius:9px;background:#fff;font:inherit;font-size:13.5px;color:#101828;text-align:left;cursor:pointer}
.wk-plans-list button span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.wk-plans-list button b{color:#15803D;flex:none}
/* Téléphone : les tableaux larges défilent dans leur cadre au lieu d'être coupés */
@media (max-width:700px){
 #my-tasks-view table,#st-factures-view table,#st-dossiers-view table,#devis-builder-view .vzt table,#production-view #sit-table{display:block;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
 #my-tasks-view .profile-photo-actions button,#my-tasks-view [class*="photo"] button{white-space:nowrap}
}
@media (max-width:700px){
 .worker-profile-actions{display:flex;flex-direction:column;gap:6px;width:100%}
 .worker-profile-actions .file-trigger{white-space:nowrap;text-align:center;justify-content:center}
}
/* Barre d'affichage collée aux actions (après « ? »), la croix toujours à droite, jamais recouverte */
#plan-measure-modal.pmx .pmx-auto{margin-left:12px!important}
#plan-measure-modal.pmx .pmx-tb{margin-left:10px!important;flex:0 1 auto;overflow:hidden}
#plan-measure-modal.pmx #plan-measure-close{margin-left:auto!important;flex:none}
#plan-measure-modal.pmx .worker-detail-header{overflow:visible}
#plan-measure-modal.pmx .worker-detail-header>*:not(.pmx-tb):not(#plan-measure-close){flex-shrink:0}
@media (max-width:1250px){#plan-measure-modal.pmx .pmx-auto span{display:none}}
#plan-measure-modal.pmx .pmx-acts{flex:0 0 auto!important}
/* Fond noir : tout le fond autour du plan est noir aussi (plus de bande blanche derrière) */
#plan-measure-modal .plan-measure-canvas-wrap.is-cad-dark,#plan-measure-modal.pmx .plan-measure-canvas-wrap.is-cad-dark{background:#0B0F14!important}
/* Fond noir : tout l'écran du plan passe en sombre (colonne d'outils, barres, panneaux), et revient en clair d'un clic */
#plan-measure-modal.pm-dark .plan-measure-card,#plan-measure-modal.pm-dark .plan-measure-body{background:#0B0F14!important}
#plan-measure-modal.pm-dark .pmx-grp,#plan-measure-modal.pm-dark .pmx-rail-tg{background:#1A222C!important;box-shadow:0 0 0 1px #2B3643!important}
#plan-measure-modal.pm-dark .pmx-rail .pm-tool,#plan-measure-modal.pm-dark .pmx-rail-tg{color:#D0D5DD!important}
#plan-measure-modal.pm-dark .pmx-rail .pm-tool:hover{background:#2B3643!important}
#plan-measure-modal.pm-dark .pmx-rail .pm-tool.active{background:#1E3A8A!important;color:#fff!important}
#plan-measure-modal.pm-dark .pmx-rail .pmx-prog{color:#4ADE80!important}
#plan-measure-modal.pm-dark .pmx-foot,#plan-measure-modal.pm-dark .pmx-draw .pm-chip:not(.pm-chip-primary),#plan-measure-modal.pm-dark #pm-seg-bar,#plan-measure-modal.pm-dark .pmx-tip{background:#1A222C!important;border-color:#2B3643!important;color:#E4E7EC!important}
#plan-measure-modal.pm-dark .pmx-foot .plan-measure-status,#plan-measure-modal.pm-dark #pm-seg-bar b,#plan-measure-modal.pm-dark .pmx-tip b,#plan-measure-modal.pm-dark .pmx-tip p{color:#E4E7EC!important}
#plan-measure-modal.pm-dark .pmx-tip-how{background:#111821!important;border-color:#2B3643!important;color:#D0D5DD!important}
#plan-measure-modal.pm-dark #pm-seg-bar .secondary{background:#111821!important;color:#E4E7EC!important;border-color:#2B3643!important}
#plan-measure-modal.pm-dark #pm-seg-bar .pm-seg-x{background:#2B3643!important;color:#E4E7EC!important}
#plan-measure-modal.pm-dark .plan-measure-list-wrap,#plan-measure-modal.pm-dark #plan-measure-list-wrap{background:#111821!important;color:#E4E7EC!important}
/* Fond noir : exactement le même noir que le fond du plan, partout autour */
#plan-measure-modal .plan-measure-canvas-wrap.is-cad-dark,#plan-measure-modal.pmx .plan-measure-canvas-wrap.is-cad-dark,#plan-measure-modal.pm-dark .plan-measure-card,#plan-measure-modal.pm-dark .plan-measure-body{background:#000!important}
/* Devis / facture : en-tête et blocs Client · Chantier · Document compacts (libellé à gauche, champ à droite) */
@media (min-width:901px){
 #devis-builder-view .vze-head{padding:12px 20px!important}
 #devis-builder-view .vze-head h2{font-size:21px!important}
 #devis-builder-view .vze-head .vze-titlebox svg{width:22px;height:22px}
 #devis-builder-view .vze-info3{gap:10px!important;padding-top:0!important;padding-bottom:8px!important}
 #devis-builder-view .vze-info3 .vze-grp{gap:6px!important;padding:10px 12px!important}
 #devis-builder-view .vze-info3 .vze-grp h3{font-size:13.5px!important;margin:0 0 2px!important}
 #devis-builder-view .vze-info3 .vze-grp h3 b{width:19px;height:19px;font-size:11px}
 #devis-builder-view .vze-info3 .vze-field{display:grid!important;grid-template-columns:92px minmax(0,1fr);align-items:center;gap:8px!important}
 #devis-builder-view .vze-info3 .vze-field>span{font-size:11.5px!important;color:#667085!important;font-weight:600;line-height:1.2}
 #devis-builder-view .vze-info3 input,#devis-builder-view .vze-info3 select,#devis-builder-view .vze-info3 .vze-field>b{height:32px!important;font-size:13px!important;padding:0 9px!important}
 #devis-builder-view .vze-info3 .vze-grp-row{gap:8px!important}
 #devis-builder-view .vze-info3 .vze-grp-row .vze-field{grid-template-columns:auto minmax(0,1fr)}
 #devis-builder-view .vze-info3 .vze-supp,#devis-builder-view .vze-info3 [class*="supp"]{padding:6px 10px!important}
}
@media (min-width:901px){
 #devis-builder-view .vze-info3 .vze-grp[data-grp="chantier"] .vze-grp-row{grid-template-columns:1fr!important}
 #devis-builder-view .vze-info3 .vze-grp[data-grp="chantier"] .vze-grp-row .vze-field{grid-template-columns:92px minmax(0,1fr)}
}
#plan-measure-modal.pmx .pmx-acts .plan-measure-more-menu{z-index:620!important}
#plan-measure-modal.pm-dark .pmx-acts .plan-measure-more-menu{background:#fff}
@media (min-width:701px){#plan-measure-modal.pmx #plan-measure-tools-menu .pm-menu-list{left:-6px!important;right:auto!important;z-index:620!important}}
/* Paramètres devis/factures : onglets sans barre de défilement grise (retour à la ligne si besoin) */
.ds-tabs{scrollbar-width:none}
.ds-tabs::-webkit-scrollbar{display:none;height:0}
@media (min-width:701px){.ds-tabs{flex-wrap:wrap!important;overflow:visible!important}}

/* Image d'en-tête (photo de réalisation) : réglage et aperçu */
.ds-logo.ds-photo img{width:100%;height:100%;object-fit:cover}
.ds-s-cotx{display:flex;flex-direction:column;gap:1px;min-width:0}
#ds-sheet .ds-s-co.has-photo{flex-direction:row;align-items:flex-start;gap:8px;max-width:66%}
#ds-sheet .ds-s-co img.ds-s-photo{position:static!important;flex:none;width:auto!important;max-width:74px!important;max-height:54px!important;object-fit:cover;object-position:center;margin:0!important;border:1px solid #E7EBF1;border-radius:2px}
#db-settings-host .ds-logo-row{flex-wrap:wrap}
#db-settings-host .ds-logo-txt{flex:1 1 150px;min-width:0}
#db-settings-host .ds-logo-btns{display:flex;flex-wrap:wrap;gap:6px}
#db-settings-host .ds-logo-btns .ds-btn{max-width:100%;white-space:nowrap}

.ds-logo.ds-photo2 img{object-fit:contain;padding:6px}
#ds-sheet .ds-s-co img.ds-s-img2{position:static!important;align-self:flex-start;max-width:86px!important;max-height:24px!important;object-fit:contain;object-position:left;margin:4px 0 0!important}
#ds-sheet .ds-s-co img.ds-s-photo{max-width:84px!important;max-height:72px!important}

.ds-ht{display:flex;flex-direction:column;gap:10px}
.ds-ht-row{display:flex;flex-direction:column;gap:6px;font-size:13px;font-weight:600;color:#344054}
.ds-ht-row input{height:40px;border:1px solid #D0D5DD;border-radius:8px;padding:0 12px;font:inherit;font-weight:500}
.ds-ht-fonts{display:flex;flex-wrap:wrap;gap:6px}
.ds-ht-fonts label{cursor:pointer}
.ds-ht-fonts input{position:absolute;opacity:0;pointer-events:none}
.ds-ht-fonts span{display:inline-flex;align-items:center;height:38px;padding:0 12px;border:1px solid #D0D5DD;border-radius:8px;background:#fff;font-size:19px;color:#1D2939}
.ds-ht-fonts input:checked+span{border-color:#1640D6;box-shadow:0 0 0 2px rgba(22,64,214,.18);color:#1640D6}
.ds-ht-fonts input:focus-visible+span{outline:2px solid #1640D6;outline-offset:2px}
.ds-ht-check{display:flex;align-items:center;gap:8px;font-size:13px;color:#344054}
#ds-sheet .ds-s-htext{display:inline-block;align-self:flex-start;margin-top:3px;font-size:17px;line-height:1.15;color:#222;text-underline-offset:3px;text-decoration-thickness:1.5px}

.ds-ht-opts{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:8px}
.ds-ht-row select{height:40px;border:1px solid #D0D5DD;border-radius:8px;padding:0 10px;font:inherit;font-weight:500;background:#fff}
#ds-sheet .ds-s-co{flex:1 1 auto}
#ds-sheet .ds-s-cotx{flex:1 1 auto}
#ds-sheet .ds-s-htext[data-align="center"]{align-self:center}
#ds-sheet .ds-s-htext[data-align="right"]{align-self:flex-end}
#ds-sheet .ds-s-htext[data-size="s"]{font-size:12px}
#ds-sheet .ds-s-htext[data-size="l"]{font-size:23px}

.ds-footer-box header .ds-footer-edit{margin-left:auto;border:0;background:none;padding:2px 0;font:inherit;font-size:12.5px;font-weight:600;color:#1640D6;cursor:pointer;text-decoration:underline;text-underline-offset:2px}
#db-settings-host .ds-footer-box header .ds-footer-edit{color:#fff!important}
.ds-footer-box textarea{display:block;width:100%;box-sizing:border-box;border:0;padding:14px;font:inherit;font-size:12.5px;line-height:1.55;color:#1D2939;resize:vertical;min-height:110px;outline:none}
.ds-footer-box textarea[hidden]{display:none}
.ds-footer-box.is-open{border-color:#1640D6;box-shadow:0 0 0 2px rgba(22,64,214,.12)}
#db-settings-host .ds-footer-box header{flex-wrap:wrap!important}
.ds-footer-box header .ds-footer-edit{white-space:nowrap}
.ds-footer-box textarea{min-height:150px}

/* Client : SIREN / n° TVA / particulier ; facture : période des travaux */
.dz-ids{display:grid;grid-template-columns:1fr 1fr;gap:6px}
.dz-ids input{min-width:0}
.dz-part{display:flex;align-items:center;gap:6px;font-size:12.5px;color:#475467;cursor:pointer;margin-top:2px}
.dz-part input{width:15px;height:15px;margin:0}
#devis-builder-view:not(.db-is-facture) label.vze-field.dc-fac{display:none!important}
.vze-field .dz-part{white-space:nowrap;font-size:13px}
.vze-field .dz-part input[type=checkbox]{width:16px!important;height:16px!important;min-width:0!important;padding:0!important;flex:none;margin:0}
.dz-part-wrap{display:flex;align-items:center;min-height:34px}
@media(max-width:520px){.dz-ids{grid-template-columns:1fr}}
#devis-builder-view #devis-builder-client-particulier{width:16px!important;height:16px!important;min-width:16px!important;max-width:16px!important;padding:0!important;border:0!important;background:none!important;box-shadow:none!important;appearance:auto!important;-webkit-appearance:checkbox!important;flex:none!important;margin:0!important}

#ds-sheet .ds-s-photo-c{text-align:center;margin-bottom:6px}
#ds-sheet img.ds-s-photo-x{display:block;max-width:74px;max-height:54px;object-fit:cover;border:1px solid #E7EBF1;border-radius:2px;margin:0 0 6px auto}
#ds-sheet .ds-s-photo-c img.ds-s-photo-x{margin:0 auto}
#ds-sheet img.ds-s-photo-x[data-size="s"],#ds-sheet .ds-s-co img.ds-s-photo[data-size="s"]{max-width:54px!important;max-height:40px!important}
#ds-sheet img.ds-s-photo-x[data-size="l"],#ds-sheet .ds-s-co img.ds-s-photo[data-size="l"]{max-width:98px!important;max-height:78px!important}
.ds-logo-name{margin-top:8px}
#ds-sheet[data-logo-pos="right"] .ds-s-doc{padding-top:46px}
#ds-sheet[data-logo-pos="right"][data-logo-size="small"] .ds-s-doc{padding-top:34px}
#ds-sheet[data-logo-pos="right"] .ds-s-co img.ds-s-photo{position:static!important}
#ds-sheet[data-logo-pos="right"][data-logo-size="large"] .ds-s-doc{padding-top:64px}

/* En-tête libre (aperçu) : éléments déplaçables, bouton rouge = retirer, coin jaune = taille */
#ds-sheet [data-drag]{cursor:grab;touch-action:none;outline:1px dashed transparent;outline-offset:2px}
#ds-sheet [data-drag]:hover{outline-color:#F0A202}
#ds-sheet .ds-free{position:absolute;z-index:3;cursor:grab;touch-action:none;user-select:none;line-height:1}
#ds-sheet .ds-free img{display:block;width:100%;height:auto;pointer-events:none}
#ds-sheet .ds-free .ds-free-txt{display:inline-block;white-space:nowrap;color:#222;line-height:1.1;text-underline-offset:.12em;pointer-events:none}
#ds-sheet .ds-free:hover,#ds-sheet .ds-free.is-active{outline:1px dashed #F0A202;outline-offset:2px}
#ds-sheet .ds-free-del{position:absolute;top:-9px;right:-9px;width:18px;height:18px;border-radius:50%;border:2px solid #fff;background:#D92D20;color:#fff;font:700 12px/1 Inter,sans-serif;display:grid;place-items:center;padding:0;cursor:pointer;box-shadow:0 1px 3px rgba(0,0,0,.3);opacity:0;transition:opacity .12s}
#ds-sheet .ds-free-rs{position:absolute;right:-7px;bottom:-7px;width:14px;height:14px;border-radius:3px;background:#F0A202;border:2px solid #fff;cursor:nwse-resize;box-shadow:0 1px 3px rgba(0,0,0,.3);opacity:0;transition:opacity .12s}
#ds-sheet .ds-free:hover .ds-free-del,#ds-sheet .ds-free:hover .ds-free-rs,#ds-sheet .ds-free.is-active .ds-free-del,#ds-sheet .ds-free.is-active .ds-free-rs{opacity:1}
@media (hover:none){#ds-sheet .ds-free-del,#ds-sheet .ds-free-rs{opacity:1}}
#ds-sheet .ds-free.is-active{cursor:grabbing}
#ds-sheet .ds-free-del{top:2px;right:2px}
#ds-sheet .ds-free-rs{right:2px;bottom:2px}

/* Disposition « client en haut à droite » (aperçu) */
#ds-sheet[data-layout="client"] .ds-s-doc > .ds-s-title,#ds-sheet[data-layout="client"] .ds-s-doc > dl,#ds-sheet[data-layout="client"] .ds-s-pclient{display:none!important}
#ds-sheet .ds-s-clientr{background:#F1F2F4;padding:7px 9px;border-radius:2px;display:flex;flex-direction:column;gap:1px;min-width:120px;text-align:left;margin-bottom:12px}
#ds-sheet .ds-s-clientr b{font-size:7.6px;color:#1D2939}
#ds-sheet .ds-s-numr{display:flex;flex-direction:column;align-items:flex-end;gap:1px}
#ds-sheet .ds-s-numr b{font-size:10px;color:var(--ds-accent)}
#ds-sheet .ds-s-numr span{font-size:6.6px;color:#344054}
#ds-sheet[data-layout="client"] .ds-s-parties{grid-template-columns:1fr 1fr}

/* Barre du haut : logo de l'entreprise à la place des initiales */
.tb-avatar.tb-avatar-logo{overflow:hidden;padding:3px;box-sizing:border-box}
.tb-avatar.tb-avatar-logo img{width:100%;height:100%;object-fit:contain;border-radius:50%}

/* Pied de page : éditeur sur toute la largeur, qui s'agrandit avec le texte, + aperçu comme sur le PDF */
.ds-two > .ds-foot-col{grid-column:1/-1}
.ds-footer-box textarea{min-height:90px;overflow:hidden;resize:none;text-align:center;line-height:1.6;font-size:13px}
.ds-footer-box p{text-align:center}
.ds-foot-prev{margin-top:14px}
.ds-foot-prev>b{display:block;font-size:13px;color:#1D2939;margin-bottom:6px}
.ds-foot-paper{background:linear-gradient(#E9F5E1,#F7FBF4);padding:18px 14px 14px;border-radius:6px}
.ds-foot-paper>div{background:#fff;box-shadow:0 2px 8px rgba(16,24,40,.12);padding:10px 14px;border-top:1px solid #D0D5DD;font-size:11px;line-height:1.5;color:#344054}
.ds-foot-paper .b{font-weight:400}

.ds-foot-align{margin-top:12px;max-width:260px}
#ds-sheet[data-foot-align="center"] .ds-s-foot{text-align:center}
#ds-sheet[data-foot-align="center"] .ds-s-foot span{margin-left:auto;margin-right:auto}
#ds-sheet .ds-s-foot{color:#344054}
.ds-foot-paper>div{text-align:center;color:#1D2939;font-size:11.5px}

#ds-sheet[data-layout="client"] .ds-s-parties{display:none!important}
#ds-sheet .ds-s-row2{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}
#ds-sheet .ds-s-proj{flex:0 1 46%}
#ds-sheet .ds-s-proj i{display:block;font-size:6.6px;color:#344054;margin-bottom:2px}
#ds-sheet .ds-s-proj div{background:#F1F2F4;padding:6px 9px;border-radius:2px;color:#1D2939;font-size:7px;line-height:1.45}

/* Modèle « client à droite » : pas de bande, grande photo dans le coin haut-gauche (aperçu) */
#ds-sheet[data-layout="client"] .ds-band{display:none}
#ds-sheet[data-layout="client"] .ds-s-co.has-photo{padding-left:30%;max-width:none;flex:1 1 auto}
#ds-sheet[data-layout="client"] .ds-s-co img.ds-s-photo{position:absolute!important;left:2.4%;top:1.7%;width:28%!important;max-width:none!important;max-height:30%!important;height:auto;object-fit:cover;border:0}
#ds-sheet[data-layout="client"] .ds-s-co.has-photo .ds-s-cotx{padding-top:14px}
#ds-sheet[data-layout="client"] .ds-s-cotx small{font-size:7px;color:#344054}
#ds-sheet[data-layout="client"][data-logo-pos="right"] .ds-s-co img:not(.ds-s-photo){max-width:110px;max-height:62px}
#ds-sheet[data-layout="client"][data-logo-pos="right"] .ds-s-doc{padding-top:68px}

#ds-sheet .ds-s-clientr{margin-right:6%;margin-bottom:4px;min-width:140px}
#ds-sheet .ds-s-row2{margin-top:-6px}
#ds-sheet[data-layout="client"] .ds-s-co img.ds-s-photo{left:.5%;top:.4%}
#ds-sheet .ds-s-clientr{margin-right:0}
.ddv-tag-av{background:#FEF3F2!important;color:#B42318!important}

/* Boutons « Supprimer » (sous-traitants, tâches, rapports) */
.stv-ico.stv-del,.vz-icon.vz-del{color:#B42318;font:700 15px/1 Inter,sans-serif}
.stv-ico.stv-del:hover,.vz-icon.vz-del:hover{background:#FEF3F2}
.sit-mini.sit-del{color:#B42318;border-color:#FDA29B}
/* v306 — Plan : seul le morceau visible est dessiné (comme AutoCAD) */
#plan-measure-space{display:block;flex:none;margin:auto;pointer-events:none}
.plan-measure-canvas-wrap > #plan-measure-canvas{position:absolute!important;margin:0!important;left:0;top:0}
.plan-measure-canvas-wrap.is-panning,.plan-measure-canvas-wrap.is-panning #plan-measure-canvas{cursor:grabbing!important}
/* v307 — Facture depuis le devis : même tableau pour les 3 façons de facturer, onglet actif bien visible */
.sx-modes button{transition:background .15s,color .15s}
.sx-modes button.active{background:#0B1B3F!important;color:#fff!important;box-shadow:0 1px 2px rgba(16,24,40,.2)}
.sx-modes button:not(.active):hover{background:#EEF2FF;color:#1E3A8A}
.sx-mode-hint{margin:8px 2px 4px;font-size:12.5px;color:#475467}
.sx-mode-hint b{color:#0B1B3F}
#devis-builder-progress-panel.sx-mode-category [data-sx-cat-input]{border:2px solid #2563EB!important;background:#EFF6FF!important;color:#1E3A8A;font-weight:700}
#devis-builder-progress-panel.sx-mode-category [data-sx-input],#devis-builder-progress-panel.sx-mode-global [data-sx-input],#devis-builder-progress-panel.sx-mode-global [data-sx-cat-input]{background:#F2F4F7!important;color:#667085;pointer-events:none}
#devis-builder-progress-panel.sx-mode-category .sx-tools,#devis-builder-progress-panel.sx-mode-global .sx-tools{opacity:.45;pointer-events:none}
#devis-builder-progress-panel.sx-mode-global [data-sx-pane="line"]{opacity:.75}
#devis-builder-progress-panel.sx-mode-global .sx-global{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:6px 0 12px;padding:12px 14px;border:2px solid #2563EB;background:#EFF6FF;border-radius:10px;font-weight:600;color:#1E3A8A}
#devis-builder-progress-panel.sx-mode-global .sx-global input{max-width:120px}
#devis-builder-progress-panel.sx-mode-global .sx-total{display:none!important}
/* v308 — Montant de la facture tapé directement → avancement calculé */
.vze-totals .vze-amount-entry{display:flex;flex-direction:column;align-items:stretch;gap:8px;padding:12px 18px;background:#EFF6FF;border-bottom:1px solid #DBEAFE}
.vze-totals .vze-amount-entry[hidden]{display:none}
.vze-totals .vze-amount-entry dt{font-weight:700;color:#1E3A8A;display:flex;flex-direction:column;gap:2px}
.vze-totals .vze-amount-entry dt small{font-weight:500;color:#475467;font-size:11.5px}
.vze-totals .vze-amount-entry dd{display:flex;gap:6px;margin:0}
.vze-totals .vze-amount-entry input{flex:1;min-width:0;height:36px;border:1px solid #93C5FD;border-radius:8px;padding:0 10px;font-weight:700;text-align:right;background:#fff}
.vze-totals .vze-amount-entry select{height:36px;border:1px solid #93C5FD;border-radius:8px;padding:0 6px;background:#fff}
.vze-totals .vze-amount-entry button{height:36px;border:0;border-radius:8px;padding:0 12px;background:#1D4ED8;color:#fff;font-weight:700;cursor:pointer}
.vze-totals .vze-amount-entry dd input{flex:1 1 auto!important;min-width:100px!important;width:auto!important}
.vze-totals .vze-amount-entry dd select{flex:0 0 auto!important;width:72px!important;min-width:0!important}
.vze-totals .vze-amount-entry dd button{flex:0 0 auto!important}
.vze-totals .vze-amount-entry dt{text-align:left!important;align-items:flex-start!important;color:#1E3A8A!important;font-size:13.5px!important}
.vze-totals .vze-amount-entry dd{width:100%!important;box-sizing:border-box;padding:0!important;justify-content:stretch!important;overflow:hidden}
.vze-totals .vze-amount-entry dd input{min-width:0!important;box-sizing:border-box}
.vze-totals .vze-amount-entry dt{padding:0!important;margin:0!important}
/* v310 — Bandeau « Réessayer » quand une page n'a pas pu se charger */
.view-crash{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:0 0 14px;padding:12px 16px;border:1px solid #FECDCA;background:#FEF3F2;border-radius:10px;color:#912018;font-size:13.5px}
.view-crash button{border:0;border-radius:8px;padding:8px 14px;background:#B42318;color:#fff;font-weight:700;cursor:pointer}

/* Matériaux de la légende (plan) */
#plan-measure-modal .pmx-leg{border:1px solid #E4E7EC;border-radius:10px;background:#fff;margin:10px 0;overflow:hidden}
#plan-measure-modal .pmx-leg-h{display:flex;flex-direction:column;gap:2px;padding:10px 12px;background:#F9FAFB;border-bottom:1px solid #F2F4F7}
#plan-measure-modal .pmx-leg-h small,#plan-measure-modal .pmx-leg-go small,#plan-measure-modal .pmx-leg-note{color:#667085;font-size:12px}
#plan-measure-modal .pmx-leg-go{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;padding:12px}
#plan-measure-modal .pmx-leg-wait{padding:12px;margin:0;color:#475467}
#plan-measure-modal .pmx-leg-list{list-style:none;margin:0;padding:0}
#plan-measure-modal .pmx-leg-list li{display:grid;grid-template-columns:auto 1fr auto;gap:10px;align-items:center;padding:9px 12px;border-bottom:1px solid #F2F4F7}
#plan-measure-modal .pmx-leg-list li.is-off{opacity:.62}
#plan-measure-modal .pmx-leg-list li.is-shown{background:#EEF4FF}
#plan-measure-modal .pmx-leg-chk{display:flex;align-items:center;gap:6px}
#plan-measure-modal .pmx-leg-chk input{width:18px;height:18px}
#plan-measure-modal .pmx-leg-n{display:inline-grid;place-items:center;min-width:26px;height:26px;border-radius:7px;font-weight:700;font-size:13px;border:1px solid rgba(16,24,40,.25)}
#plan-measure-modal .pmx-leg-t{min-width:0;display:flex;flex-direction:column;gap:2px}
#plan-measure-modal .pmx-leg-t b{overflow-wrap:anywhere}
#plan-measure-modal .pmx-leg-t small{color:#667085;font-size:12px;overflow-wrap:anywhere}
#plan-measure-modal .pmx-leg-also{font-style:italic}
#plan-measure-modal .pmx-leg-why{color:#B54708!important;font-size:12px}
#plan-measure-modal .pmx-leg-q{display:flex;flex-direction:column;align-items:flex-end;gap:4px;white-space:nowrap}
#plan-measure-modal .pmx-leg-q button{padding:3px 10px;font-size:12px}
#plan-measure-modal .pmx-leg-foot{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:10px 12px;background:#F9FAFB}
#plan-measure-modal .pmx-leg-note{display:block;padding:8px 12px 10px}

/* ===== Barre du haut claire et rangée (plan à gauche · étapes au centre · actions à droite) ===== */
#plan-measure-modal.pmx.pmx2 .worker-detail-header{background:#fff!important;border-bottom:1px solid #E4E7EC;color:#101828;gap:10px!important;padding:0 4px 0 12px!important}
#plan-measure-modal.pmx.pmx2 .pmx-head{border:0;height:40px;gap:8px}
#plan-measure-modal.pmx.pmx2 .pmx-head .plan-measure-zoom,#plan-measure-modal.pmx.pmx2 .pmx-plans{border-right:1px solid #EAECF0;color:#475467}
#plan-measure-modal.pmx.pmx2 .pmx-plans button,#plan-measure-modal.pmx.pmx2 .pmx-head .pm-icon{color:#344054!important}
#plan-measure-modal.pmx.pmx2 .pmx-plans button:hover:not(:disabled){background:#F2F4F7}
#plan-measure-modal.pmx.pmx2 .pmx-plans button:disabled{color:#D0D5DD}
#plan-measure-modal.pmx.pmx2 #pmx-doc-chip{background:#F2F4F7!important;color:#101828!important;border:0;max-width:min(46vw,520px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#plan-measure-modal.pmx.pmx2 .pmx-steps{display:flex;gap:2px;margin:0 auto;padding:0;list-style:none;flex:none}
#plan-measure-modal.pmx.pmx2 .pmx-steps li{border:0;background:transparent;padding:6px 12px 6px 6px;font-size:13px;font-weight:500;color:#667085;gap:8px}
#plan-measure-modal.pmx.pmx2 .pmx-steps li b{width:22px;height:22px;font-size:11.5px}
#plan-measure-modal.pmx.pmx2 .pmx-steps li.is-current{background:#EEF4FF;color:#1640D6;font-weight:700}
#plan-measure-modal.pmx.pmx2 .pmx-steps li.is-current b{background:#1640D6}
#plan-measure-modal.pmx.pmx2 .pmx-steps li.is-done{background:transparent;color:#067647}
#plan-measure-modal.pmx.pmx2 .pmx-steps li+li::before{content:'›';color:#D0D5DD;margin:0 6px 0 -6px;font-weight:400}
#plan-measure-modal.pmx.pmx2 .pmx-auto{margin-left:0;height:36px;border-radius:8px}
#plan-measure-modal.pmx.pmx2 .pmx-acts>*,#plan-measure-modal.pmx.pmx2 .pmx-acts summary,#plan-measure-modal.pmx.pmx2 .pmx-acts .pm-toggle,#plan-measure-modal.pmx.pmx2 .pmx-guide-btn{color:#475467!important}
#plan-measure-modal.pmx.pmx2 .pmx-acts summary:hover,#plan-measure-modal.pmx.pmx2 .pmx-acts .pm-toggle:hover,#plan-measure-modal.pmx.pmx2 .pmx-guide-btn:hover{color:#101828!important;background:#F9FAFB!important}
#plan-measure-modal.pmx.pmx2 .pmx-acts .pm-toggle:not([aria-expanded="false"]){color:#101828!important;border-bottom-color:#22A447!important}
#plan-measure-modal.pmx.pmx2 #plan-measure-close{color:#475467!important;background:transparent!important}
#plan-measure-modal.pmx.pmx2 #plan-measure-close:hover{color:#101828!important;background:#F2F4F7!important}
/* Zoom + réglages : barre flottante en bas à droite du plan, repliable */
#plan-measure-modal.pmx.pmx2 .pmx-tb.pmx-float{position:absolute;right:12px;bottom:12px;z-index:6;margin:0;display:flex;align-items:center;gap:6px;padding:4px;border-radius:10px;background:#fff;box-shadow:0 2px 10px rgba(16,24,40,.16);border:1px solid #E4E7EC}
#plan-measure-modal.pmx.pmx2 .pmx-float .pmx-grp{background:transparent;border:0;padding:0}
#plan-measure-modal.pmx.pmx2 .pmx-float .pmx-grp+.pmx-grp{border-left:1px solid #EAECF0;padding-left:6px}
#plan-measure-modal.pmx.pmx2 .pmx-float .pm-icon,#plan-measure-modal.pmx.pmx2 .pmx-float .pm-snap,#plan-measure-modal.pmx.pmx2 .pmx-float .pm-tool,#plan-measure-modal.pmx.pmx2 .pmx-float .pm-osnap>summary{background:transparent!important;color:#344054!important}
#plan-measure-modal.pmx.pmx2 .pmx-float .pm-icon:hover,#plan-measure-modal.pmx.pmx2 .pmx-float .pm-snap:hover,#plan-measure-modal.pmx.pmx2 .pmx-float .pm-tool:hover{background:#F2F4F7!important;color:#101828!important}
#plan-measure-modal.pmx.pmx2 .pmx-float .pm-snap.is-on{background:#E8EEFF!important;color:#1640D6!important}
#plan-measure-modal.pmx.pmx2 .pmx-float #plan-measure-snap-toggle.is-on{background:#DCFAE6!important;color:#067647!important}
#plan-measure-modal.pmx.pmx2 .pmx-float #plan-measure-cad-bg.is-on{background:#101828!important;color:#fff!important}
#plan-measure-modal.pmx.pmx2 .pmx-float #plan-measure-zoom-level{color:#101828}
#plan-measure-modal.pmx.pmx2 .pmx-tb-tg{display:grid;place-items:center;width:26px;height:32px;border:0;border-left:1px solid #EAECF0;background:transparent;color:#667085;cursor:pointer;padding:0}
#plan-measure-modal.pmx.pmx2 .pmx-tb-tg svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2}
#plan-measure-modal.pmx.pmx2 .pmx-float.is-min .pmx-set{display:none!important}
@media (max-width:900px){
 #plan-measure-modal.pmx.pmx2 .pmx-steps li{font-size:0;padding:4px;gap:0}
 #plan-measure-modal.pmx.pmx2 .pmx-steps li.is-current{font-size:12px;padding:4px 10px 4px 4px;gap:6px}
 #plan-measure-modal.pmx.pmx2 .pmx-steps li+li::before{display:none}
 #plan-measure-modal.pmx.pmx2 .pmx-tb.pmx-float{bottom:54px;right:8px;max-width:calc(100% - 16px);overflow-x:auto}
}
#plan-measure-modal.pmx.pmx2 .pmx-guide-btn{border:0!important;box-shadow:none!important;background:transparent!important}
/* Comparer deux versions */
#plan-measure-modal .pmx-cmp-pick{display:flex;flex-wrap:wrap;align-items:flex-end;gap:8px;padding:10px 12px}
#plan-measure-modal .pmx-cmp-pick label{display:flex;flex-direction:column;gap:4px;font-size:12px;color:#475467;flex:1;min-width:180px}
#plan-measure-modal .pmx-cmp-pick select{height:36px;border:1px solid #D0D5DD;border-radius:8px;padding:0 8px;font:inherit;font-size:13px;max-width:100%}
#plan-measure-modal .pmx-cmp-sum{display:flex;flex-direction:column;gap:4px;padding:10px 12px 0;font-size:12.5px;color:#344054}
#plan-measure-modal .pmx-cmp-sum i{display:inline-block;width:10px;height:10px;border-radius:2px;margin-right:6px}
#plan-measure-modal .pmx-cmp-sum i.is-new{background:#16A34A}#plan-measure-modal .pmx-cmp-sum i.is-old{background:#DC2626}
#plan-measure-modal .pmx-cmp-k{display:grid;grid-template-columns:1.4fr 1fr 1fr;gap:6px;padding:10px 12px}
#plan-measure-modal .pmx-cmp-k div{border-radius:8px;padding:8px 10px;background:#F9FAFB}#plan-measure-modal .pmx-cmp-k div.g{background:#ECFDF3}#plan-measure-modal .pmx-cmp-k div.r{background:#FEF3F2}
#plan-measure-modal .pmx-cmp-k b{display:block;font-size:18px}#plan-measure-modal .pmx-cmp-k span{font-size:11.5px;color:#475467}
#plan-measure-modal .pmx-cmp-t{width:calc(100% - 24px);margin:0 12px 6px;border-collapse:collapse;font-size:12.5px}
#plan-measure-modal .pmx-cmp-t th{text-align:right;font-weight:600;color:#667085;padding:6px 4px;border-bottom:1px solid #EAECF0}
#plan-measure-modal .pmx-cmp-t th:first-child,#plan-measure-modal .pmx-cmp-t td:first-child{text-align:left}
#plan-measure-modal .pmx-cmp-t td{text-align:right;padding:7px 4px;border-bottom:1px solid #F2F4F7;white-space:nowrap}
#plan-measure-modal .pmx-cmp-t td:first-child{white-space:normal;display:flex;align-items:center;gap:6px}
#plan-measure-modal .pmx-cmp-t .pmx-leg-n{min-width:14px;width:14px;height:14px;border-radius:3px}
#plan-measure-modal .pmx-cmp-t .is-up{color:#067647;font-weight:700}#plan-measure-modal .pmx-cmp-t .is-down{color:#B42318;font-weight:700}
/* Compter un symbole */
#plan-measure-modal .pmx-cnt-name{padding:10px 12px 0}
#plan-measure-modal .pmx-cnt-name label{display:flex;flex-direction:column;gap:4px;font-size:12px;color:#475467}
#plan-measure-modal .pmx-cnt-name input{height:36px;border:1px solid #D0D5DD;border-radius:8px;padding:0 10px;font:inherit;font-size:14px;font-weight:600}
#plan-measure-modal .pmx-cmp-k div.w{background:#FFFAEB}
#plan-measure-modal .pmx-cnt-rev{margin:0 12px 10px;padding:12px;border:1px solid #FEDF89;border-radius:10px;background:#FFFCF5;display:flex;flex-direction:column;gap:8px}
#plan-measure-modal .pmx-cnt-pt{display:flex;justify-content:space-between;align-items:center;font-size:13px;color:#475467}
#plan-measure-modal .pmx-cnt-pt button{padding:3px 10px;font-size:12px}
#plan-measure-modal .pmx-cnt-rev .tag{align-self:flex-start;background:#FEF0C7;color:#B54708;border-radius:6px;padding:3px 8px;font-size:12px;font-weight:600}
#plan-measure-modal .pmx-cnt-conf{display:flex;align-items:center;gap:8px;font-size:13px}
#plan-measure-modal .pmx-cnt-conf .bar{flex:1;height:8px;background:#F2F4F7;border-radius:4px;overflow:hidden}
#plan-measure-modal .pmx-cnt-conf .bar i{display:block;height:100%;background:#F79009}
#plan-measure-modal .pmx-cnt-rev small{color:#475467;font-size:12.5px}
#plan-measure-modal .pmx-cnt-btns{display:grid;grid-template-columns:1fr 1fr;gap:6px}
#plan-measure-modal .pmx-cnt-btns button{height:40px;border-radius:9px;font:inherit;font-size:14px;font-weight:700;cursor:pointer}
#plan-measure-modal .pmx-cnt-btns .pmx-ok{background:#079455;color:#fff;border:1px solid #079455}
#plan-measure-modal .pmx-cnt-btns .pmx-no{background:#fff;color:#D92D20;border:1px solid #FDA29B}
#plan-measure-modal .pmx-cnt-btns .secondary{font-weight:500;font-size:12.5px;height:34px}
#plan-measure-modal .pmx-cnt-done{margin:0 12px 10px;padding:10px 12px;border-radius:8px;background:#ECFDF3;color:#067647;font-weight:600}
#plan-measure-modal .pmx-cnt-more{display:flex;flex-wrap:wrap;gap:6px;padding:0 12px 10px}
#plan-measure-modal .pmx-cnt-more button{font-size:12.5px;padding:5px 10px}
#plan-measure-modal .pmx-cnt-op-q{padding:0 12px 10px;font-size:13px}
#plan-measure-modal .pmx-cnt-op{margin:0 12px 10px;padding:10px 12px;border:1px solid #D1E0FF;border-radius:10px;background:#F5F8FF}
#plan-measure-modal .pmx-cnt-op-h{display:flex;justify-content:space-between;align-items:center;font-size:13px}
#plan-measure-modal .pmx-cnt-dim{display:flex;align-items:flex-end;gap:8px;margin:8px 0 4px}
#plan-measure-modal .pmx-cnt-dim label{display:flex;flex-direction:column;gap:3px;font-size:12px;color:#475467;flex:1}
#plan-measure-modal .pmx-cnt-dim input{height:36px;border:1px solid #D0D5DD;border-radius:8px;padding:0 8px;font:inherit;font-size:14px;font-weight:600;width:100%}
#plan-measure-modal .pmx-cnt-dim span{padding-bottom:9px;color:#667085}
#plan-measure-modal .pmx-cnt-src{display:block;font-size:12px;color:#B54708}#plan-measure-modal .pmx-cnt-src.is-ok{color:#067647}
#plan-measure-modal .pmx-cnt-lines{list-style:none;margin:8px 0 0;padding:0}
#plan-measure-modal .pmx-cnt-lines li{display:grid;grid-template-columns:1fr auto;gap:0 8px;padding:6px 0;border-top:1px solid #E0EAFF;font-size:13px}
#plan-measure-modal .pmx-cnt-lines li b{white-space:nowrap}
#plan-measure-modal .pmx-cnt-lines li small{grid-column:1/-1;color:#667085;font-size:11.5px;padding-left:22px}
/* Quantitatif : gravité, score, mémo */
.pmr-grav{display:inline-block;font-style:normal;font-size:11px;font-weight:700;border-radius:5px;padding:1px 6px;margin:0 6px 2px 0}
.pmr-grav.is-ok{background:#ECFDF3;color:#067647}.pmr-grav.is-warn{background:#FFFAEB;color:#B54708}.pmr-grav.is-bad{background:#FEF3F2;color:#B42318}
.pmr-score{display:flex;align-items:baseline;flex-wrap:wrap;gap:6px;margin:0 0 10px;padding:12px 14px;border:1px solid #EAECF0;border-radius:10px;background:#fff}
.pmr-score b{font-size:30px;line-height:1}.pmr-score>span{color:#667085}.pmr-score small{color:#667085;margin-right:auto}
.pmr-memo{margin-top:10px;border:1px solid #D1E0FF;border-radius:10px;background:#F5F8FF;padding:10px 12px}
.pmr-memo summary{cursor:pointer;font-weight:700;color:#1640D6}
.pmr-memo textarea{width:100%;margin:8px 0;border:1px solid #D0D5DD;border-radius:8px;padding:10px;font:inherit;font-size:13px;line-height:1.5;background:#fff;resize:vertical}
/* Enveloppe estimée + Calibré / Risque */
.bdc-env{display:grid;grid-template-columns:auto 1fr;align-items:baseline;gap:2px 12px;margin:0 0 12px;padding:12px 14px;border:1px solid #EAECF0;border-radius:10px;background:#fff}
.bdc-env small{grid-column:1/-1;font-size:11px;font-weight:700;letter-spacing:.05em;color:#667085}
.bdc-env b{font-size:26px}.bdc-env span{font-size:12.5px;color:#475467}.bdc-env em{grid-column:1/-1;font-size:11.5px;color:#98A2B3;font-style:normal}
.bdc-env .is-risk{color:#B54708;font-style:normal;font-weight:600}
.bdc-hist{display:flex;flex-wrap:wrap;align-items:center;gap:4px 6px;margin-top:3px;font-size:12px;color:#475467}
.bdc-hist i{font-style:normal;font-size:11px;font-weight:700;border-radius:5px;padding:1px 6px}
.bdc-hist.is-cal i{background:#FEF0E7;color:#C2410C}.bdc-hist.is-risk i{background:#FFFAEB;color:#B54708}
.bdc-hist button{padding:1px 8px!important;font-size:11.5px!important;min-height:0!important;height:auto!important}
/* Barre du bas en « Fond noir » : toute sombre, texte et icônes clairs (plus de morceaux clairs / sombres mélangés) */
#plan-measure-modal.pmx.pmx2.pm-dark .pmx-tb.pmx-float{background:#1A222C!important;border-color:#2B3643!important;box-shadow:0 2px 12px rgba(0,0,0,.5)!important}
#plan-measure-modal.pmx.pmx2.pm-dark .pmx-float .pmx-grp{background:transparent!important;box-shadow:none!important}
#plan-measure-modal.pmx.pmx2.pm-dark .pmx-float .pmx-grp+.pmx-grp{border-left-color:#2B3643!important}
#plan-measure-modal.pmx.pmx2.pm-dark .pmx-float button,#plan-measure-modal.pmx.pmx2.pm-dark .pmx-float summary,#plan-measure-modal.pmx.pmx2.pm-dark .pmx-float .pm-icon,#plan-measure-modal.pmx.pmx2.pm-dark .pmx-float .pm-snap,#plan-measure-modal.pmx.pmx2.pm-dark .pmx-float .pm-osnap>summary,#plan-measure-modal.pmx.pmx2.pm-dark .pmx-float #plan-measure-zoom-level{background:transparent!important;color:#E4E7EC!important;border-color:transparent!important}
#plan-measure-modal.pmx.pmx2.pm-dark .pmx-float button:hover:not(:disabled),#plan-measure-modal.pmx.pmx2.pm-dark .pmx-float summary:hover{background:#2B3643!important;color:#fff!important}
#plan-measure-modal.pmx.pmx2.pm-dark .pmx-float button:disabled{color:#667085!important;opacity:1!important}
#plan-measure-modal.pmx.pmx2.pm-dark .pmx-float .pm-snap.is-on{background:#1E3A8A!important;color:#fff!important}
#plan-measure-modal.pmx.pmx2.pm-dark .pmx-float #plan-measure-snap-toggle.is-on{background:#065F46!important;color:#fff!important}
#plan-measure-modal.pmx.pmx2.pm-dark .pmx-float #plan-measure-cad-bg.is-on{background:#F8FAFC!important;color:#101828!important}
#plan-measure-modal.pmx.pmx2.pm-dark .pmx-tb-tg{color:#D0D5DD!important;border-left-color:#2B3643!important}
#plan-measure-modal.pmx.pmx2.pm-dark .pmx-rail .pm-select{background:#111821!important;color:#E4E7EC!important;border:1px solid #2B3643!important}
/* Barre claire : jamais de bouton grisé illisible */
#plan-measure-modal.pmx.pmx2:not(.pm-dark) .pmx-float button:disabled{color:#98A2B3!important;opacity:1!important}
#plan-measure-modal.pmx.pmx2:not(.pm-dark) .pmx-float .pmx-grp{background:transparent!important;box-shadow:none!important}
/* Liste de droite : toujours claire et lisible, même avec « Fond noir » (le fond noir ne concerne que le plan) */
#plan-measure-modal.pm-dark .plan-measure-list-wrap,#plan-measure-modal.pm-dark #plan-measure-list-wrap{background:#fff!important;color:#101828!important}
#plan-measure-modal .pmx-leg-h b{color:#101828}
/* Rapport de métrage */
#plan-measure-modal .pmx-rep{border-color:#C7D7FE}
#plan-measure-modal .pmx-rep .pmx-leg-h{background:#EEF4FF}
#plan-measure-modal .pmx-rep-opt{display:flex;flex-wrap:wrap;align-items:flex-end;gap:10px 18px;padding:10px 12px;border-bottom:1px solid #F2F4F7}
#plan-measure-modal .pmx-rep-opt label{display:flex;flex-direction:column;gap:4px;font-size:12px;color:#475467}
#plan-measure-modal .pmx-rep-opt label span{display:flex;align-items:center;gap:6px;font-weight:600;color:#101828}
#plan-measure-modal .pmx-rep-opt input[type=number]{width:70px;height:34px;border:1px solid #D0D5DD;border-radius:8px;padding:0 8px;font:inherit;font-size:14px;font-weight:600}
#plan-measure-modal .pmx-rep-opt .pmx-rep-chk{flex-direction:row;align-items:center;gap:8px;height:34px;font-size:13px;color:#101828}
#plan-measure-modal .pmx-rep-opt .pmx-rep-chk input{width:18px;height:18px}
#plan-measure-modal .pmx-rep-t{width:100%;border-collapse:collapse;font-size:13px}
#plan-measure-modal .pmx-rep-t td{padding:7px 12px;border-bottom:1px solid #F2F4F7;vertical-align:top}
#plan-measure-modal .pmx-rep-t td:nth-child(2){text-align:right;font-weight:700;white-space:nowrap;padding-right:4px}
#plan-measure-modal .pmx-rep-t td:nth-child(3){width:34px;color:#667085;padding-left:2px}
#plan-measure-modal .pmx-rep-t td b{display:block;font-weight:600;overflow-wrap:anywhere}
#plan-measure-modal .pmx-rep-t td small{display:block;color:#667085;font-size:11.5px}
#plan-measure-modal .pmx-rep-t .pmx-rep-g td{background:#F9FAFB;font-size:11px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:#344054;padding:6px 12px}
#plan-measure-modal .pmx-rep-t tr.is-ded td{color:#B42318}
#plan-measure-modal .pmx-rep-t tr.is-warn td small{color:#B54708}
#plan-measure-modal .pmx-rep-tot{display:grid;grid-template-columns:repeat(auto-fit,minmax(110px,1fr));gap:6px;padding:10px 12px}
#plan-measure-modal .pmx-rep-tot div{background:#F5F8FF;border:1px solid #D1E0FF;border-radius:8px;padding:8px 10px}
#plan-measure-modal .pmx-rep-tot div.is-ded{background:#FEF3F2;border-color:#FECDCA}
#plan-measure-modal .pmx-rep-tot span{display:block;font-size:11px;color:#475467;text-transform:uppercase;letter-spacing:.04em}
#plan-measure-modal .pmx-rep-tot b{font-size:17px;color:#101828}
#plan-measure-modal .pmx-rep-tot div.is-ded b{color:#B42318}
#plan-measure-modal .pmx-rep-btns{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end;padding:0 12px 10px}
#plan-measure-modal .pmx-rep-mode{display:flex;gap:4px;padding:10px 12px 0;flex-wrap:wrap}
#plan-measure-modal .pmx-rep-mode button{flex:1;min-width:max-content;height:34px;border:1px solid #D0D5DD;border-radius:8px;background:#fff;color:#344054;font:inherit;font-size:12.5px;font-weight:600;cursor:pointer;padding:0 10px}
#plan-measure-modal .pmx-rep-mode button.is-on{background:#1640D6;border-color:#1640D6;color:#fff}
#plan-measure-modal .pmx-rep-t thead th{font-size:11px;color:#667085;font-weight:600;text-align:right;padding:6px 6px;border-bottom:1px solid #EAECF0}
#plan-measure-modal .pmx-rep-t thead th:first-child{text-align:left;padding-left:12px}
#plan-measure-modal .pmx-rep-t td.pmx-rep-pu{width:84px;padding:5px 4px}
#plan-measure-modal .pmx-rep-t td.pmx-rep-pu input{width:80px;height:30px;border:1px solid #D0D5DD;border-radius:7px;padding:0 6px;font:inherit;font-size:13px;text-align:right}
#plan-measure-modal .pmx-rep-t td.pmx-rep-tl{text-align:right;font-weight:700;white-space:nowrap;padding-right:12px;width:86px}
#plan-measure-modal .pmx-rep-miss{color:#B42318;font-style:normal;font-weight:600}
#plan-measure-modal .pmx-rep-tot div.is-eur{background:#ECFDF3;border-color:#ABEFC6}
#plan-measure-modal .pmx-rep-tot div.is-eur b{color:#067647}
#plan-measure-modal .pmx-rep-tot div small{display:block;color:#B42318;font-size:11px}
#plan-measure-modal .pmx-rep-t.is-priced{table-layout:auto}
#plan-measure-modal .pmx-rep-t thead th:last-child{padding-right:12px}
#plan-measure-modal .pmx-rep-t td.pmx-rep-pu{width:66px}
#plan-measure-modal .pmx-rep-t td.pmx-rep-pu input{width:64px}
#plan-measure-modal .pmx-rep-t td.pmx-rep-tl{width:auto;padding-right:12px;font-size:12.5px}
#plan-measure-modal .pmx-rep-t.is-priced td:nth-child(2){padding-right:2px}
/* Liste de commande */
.ord-box{max-width:860px}
.ord-box header{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}
.ord-box .ord-x{border:0;background:transparent;font-size:20px;color:#475467;cursor:pointer;padding:4px 8px}
.ord-help{font-size:13px;color:#475467;margin:4px 20px 12px;line-height:1.5;background:#F9FAFB;border-radius:8px;padding:10px 12px}
.ord-table td,.ord-table th{vertical-align:middle}
.ord-table td:nth-child(2),.ord-table td:nth-child(4),.ord-table td:nth-child(5),.ord-table th:nth-child(2),.ord-table th:nth-child(4),.ord-table th:nth-child(5){text-align:right;white-space:nowrap}
.ord-table .ord-pack{white-space:nowrap}
.ord-table .ord-pack input[type=number]{width:72px;height:32px;border:1px solid #D0D5DD;border-radius:7px;padding:0 6px;text-align:right;font:inherit}
.ord-table .ord-pack input[type=text]{width:110px;height:32px;border:1px solid #D0D5DD;border-radius:7px;padding:0 6px;margin-left:4px;font:inherit;font-size:12.5px;color:#475467}
.ord-table .ord-n b{font-size:16px;color:#1640D6}
.ord-table .ord-rest{color:#667085;font-size:12.5px}
@media (max-width:640px){.ord-table .ord-pack input[type=text]{display:block;margin:4px 0 0;width:72px}}
/* Choix du dessin / de l'échelle dans la colonne de gauche : lisible en entier, pas « FA » */
#plan-measure-modal.pmx .pmx-rail .pm-select{width:auto!important;min-width:120px;max-width:200px;height:30px!important;padding:0 26px 0 8px!important;font-size:12px!important;font-weight:600;border-radius:8px;background-color:#fff;color:#101828;border:1px solid #D0D5DD;text-overflow:ellipsis;box-shadow:0 1px 4px rgba(16,24,40,.12)}
#plan-measure-modal.pmx.pmx2.pm-dark .pmx-rail .pm-select{background-color:#1A222C!important;color:#F2F4F7!important;border-color:#344054!important}
/* Récapitulatif façade du calepinage */
.pmr-calsum{margin:16px 0;padding:14px 16px;border:1px solid #C7D7FE;border-radius:12px;background:#F5F8FF}
.pmr-calsum h5{margin:0 0 10px;font-size:15px;color:#101828}
.pmr-calsum-in{display:flex;flex-wrap:wrap;gap:12px;margin-bottom:10px}
.pmr-calsum-in label{display:flex;flex-direction:column;gap:4px;font-size:12.5px;color:#475467;font-weight:600}
.pmr-calsum-in input{width:170px;height:38px;border:1px solid #D0D5DD;border-radius:8px;padding:0 10px;font:inherit;font-size:15px;font-weight:600;background:#fff}
.pmr-calsum-t{width:100%;border-collapse:collapse;background:#fff;border-radius:10px;overflow:hidden}
.pmr-calsum-t td{padding:9px 12px;border-bottom:1px solid #EAECF0;vertical-align:top}
.pmr-calsum-t td b{display:block;font-size:14px}
.pmr-calsum-t td small{display:block;color:#667085;font-size:12px;margin-top:2px}
.pmr-calsum-t td.num{text-align:right;white-space:nowrap;font-weight:700;font-size:15px}
.pmr-calsum-t tr.is-miss td.num i{color:#B54708;font-style:normal;font-size:13px}
.pmr-calsum-op{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-top:10px;font-size:13px;color:#475467}
#plan-measure-modal .pmx-cnt-types{margin:10px 12px 0;padding:8px 10px;border:1px solid #EAECF0;border-radius:10px;background:#F9FAFB}
#plan-measure-modal .pmx-cnt-types>small{display:block;font-size:11px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:#667085;margin-bottom:4px}
#plan-measure-modal .pmx-cnt-type{display:flex;flex-wrap:wrap;align-items:center;gap:6px 8px;padding:6px 0;border-top:1px solid #EAECF0;font-size:13px}
#plan-measure-modal .pmx-cnt-type:first-of-type{border-top:0}
#plan-measure-modal .pmx-cnt-type b{flex:1;min-width:80px}
#plan-measure-modal .pmx-cnt-type button{padding:2px 8px;font-size:12px}
#plan-measure-modal .pmx-cnt-tn{display:inline-grid;place-items:center;width:20px;height:20px;border-radius:5px;color:#fff;font-weight:700;font-size:11px}
#plan-measure-modal .pmx-rep-chk-l{list-style:none;margin:0;padding:8px 12px;display:flex;flex-direction:column;gap:4px;border-bottom:1px solid #F2F4F7}
#plan-measure-modal .pmx-rep-chk-l li{font-size:12.5px;line-height:1.4;padding:6px 8px;border-radius:7px}
#plan-measure-modal .pmx-rep-chk-l li.is-warn{background:#FFFAEB;color:#93370D}
#plan-measure-modal .pmx-rep-chk-l li.is-ok{background:#ECFDF3;color:#067647}
/* Choix du dessin / de l'échelle : bouton compact « 1:75 », liste au clic */
#plan-measure-modal.pmx .pmx-rail .pm-select.pmx-zone-native{position:absolute!important;width:1px!important;min-width:0!important;height:1px!important;opacity:0;pointer-events:none;padding:0!important;border:0!important}
#plan-measure-modal.pmx .pmx-rail .pmx-zone-btn{font-size:9.5px!important;font-weight:800!important;letter-spacing:-.02em;color:#1640D6!important;background:#EEF4FF!important}
#plan-measure-modal.pmx .pmx-rail .pmx-zone-btn[hidden]{display:none!important}
#plan-measure-modal.pmx.pm-dark .pmx-rail .pmx-zone-btn{background:#1E3A8A!important;color:#fff!important}
.pmx-zone-pop{position:fixed;z-index:10050;min-width:220px;max-width:min(320px,calc(100vw - 80px));padding:6px;border-radius:10px;background:#fff;border:1px solid #E4E7EC;box-shadow:0 10px 30px rgba(16,24,40,.22);display:flex;flex-direction:column;gap:2px}
.pmx-zone-pop[hidden]{display:none}
.pmx-zone-pop small{font-size:11px;font-weight:700;color:#667085;text-transform:uppercase;letter-spacing:.04em;padding:4px 8px}
.pmx-zone-pop button{text-align:left;border:0;background:transparent;border-radius:7px;padding:9px 10px;font:inherit;font-size:13.5px;font-weight:600;color:#101828;cursor:pointer}
.pmx-zone-pop button:hover{background:#F2F4F7}
.pmx-zone-pop button.is-on{background:#EEF4FF;color:#1640D6}
#plan-measure-modal .pmt-none{margin:0;padding:10px 12px;border:1px dashed #D0D5DD;border-radius:8px;font-size:12.5px;color:#475467;background:#F9FAFB}
/* Compter : cadre ajusté au contour */
.pmx-cnt-snap { margin: 6px 0; padding: 6px 8px; border-radius: 8px; font-size: 12.5px; background: #fff4e5; color: #8a4b00; }
.pmx-cnt-snap.ok { background: #e8f6ec; color: #1d6b35; }
/* Rapport : saisie largeur / hauteur du calepinage directement */
.pmx-rep-cal { margin: 8px 0; padding: 10px; border-radius: 10px; background: #fff4e5; border: 1px solid #f3c98b; display: grid; gap: 8px; font-size: 13px; color: #5b3a00; }
.pmx-rep-cal label { display: grid; gap: 4px; font-weight: 600; }
.pmx-rep-cal label small { font-weight: 400; }
.pmx-rep-cal span { display: flex; align-items: center; gap: 6px; }
.pmx-rep-cal input { width: 120px; padding: 8px; border: 1px solid #d9b77c; border-radius: 8px; background: #fff; color: #1f2937; font-size: 15px; }
/* Menu « … » (Autres outils) : toujours entièrement visible, collé au bord droit de l'écran */
#plan-measure-modal.pmx #plan-measure-tools-menu .pm-menu-list,#plan-measure-modal #plan-measure-tools-menu[open] .pm-menu-list{position:fixed!important;top:58px!important;right:12px!important;left:auto!important;width:min(340px,calc(100vw - 24px))!important;max-width:calc(100vw - 24px)!important;max-height:calc(100vh - 80px)!important;height:auto!important;bottom:auto!important;overflow:auto!important;box-sizing:border-box}
#plan-measure-modal #plan-measure-tools-menu .pm-menu-item span,#plan-measure-modal #plan-measure-tools-menu .pm-menu-item small,#plan-measure-modal #plan-measure-tools-menu .pm-menu-note{white-space:normal!important;overflow-wrap:anywhere;min-width:0}
/* Page « Lecture du plan » : en-tête court et clair ; réticule de mesure jamais par-dessus */
body:has(#plan-measure-color-scan:not([hidden])) #plan-cad-overlay,body:has(#plan-measure-color-scan:not([hidden])) #plan-measure-magnifier,body:has(#plan-measure-color-scan:not([hidden])) #plan-measure-snap-marker{display:none!important}
#plan-measure-color-scan .pmr-chips{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0 4px}
#plan-measure-color-scan .pmr-chip{display:inline-flex;align-items:center;padding:6px 12px;border-radius:999px;font-size:13.5px;font-weight:600;background:#EEF2F6;color:#344054;cursor:help}
#plan-measure-color-scan .pmr-chip.ok{background:#E7F6EC;color:#166534}
#plan-measure-color-scan .pmr-chip.warn{background:#FFF4E5;color:#8A4B00}
#plan-measure-color-scan .pmr-chip.bad{background:#FDECEC;color:#B42318}
#plan-measure-color-scan .pmr-views{margin:6px 0 0;font-size:14px;color:#344054}
#plan-measure-color-scan .pmr-steps{margin:6px 0 8px;padding-left:22px;font-size:14px;line-height:1.5;color:#344054}
#plan-measure-color-scan .pmr-head-tech{margin-bottom:12px}
#plan-measure-color-scan .pmr-why{display:grid;gap:2px;margin:0 0 12px;padding:12px 14px;border-radius:10px;background:#EEF4FF;border:1px solid #C7D7FE;font-size:14.5px;color:#1D2939}
#plan-measure-color-scan .pmr-why span{font-size:13.5px;color:#475467}
#plan-measure-color-scan .pmr-body{display:block!important}
#plan-measure-color-scan .pmr-body>*{max-width:none;float:none}
#plan-measure-color-scan .pmr-body>.pmr-cal-hint{display:block;margin:0 0 12px;padding:10px 12px;border-radius:10px;background:#FFF4E5;font-size:13.5px}
/* La page de résultats ne doit pas étirer ses blocs sur toute la hauteur de l'écran */
#plan-measure-modal #plan-measure-color-scan:not([hidden]){display:block!important;align-content:start!important}
#plan-measure-color-scan .pmr-head,#plan-measure-color-scan .pmr-why{align-content:start!important}
body #plan-measure-color-scan .pmr-topbar button{margin:0!important;flex:none}
#plan-measure-color-scan .pmr-chip{border:0!important;padding:6px 12px!important}
/* Doublons retirés : une seule entrée pour chaque fonction */
#plan-measure-run-detect,#plan-measure-metre-pdf{display:none!important}
.pmx-rep-more{display:grid;gap:4px;margin-top:10px;padding-top:10px;border-top:1px dashed #E4E7EC}
.pmx-rep-more small{font-size:12px;color:#667085}
.pmx-flash{box-shadow:0 0 0 3px #2E90FA!important;transition:box-shadow .3s}
.pmx-rep-type{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:4px 0 8px;font-size:13px;color:#344054}
.pmx-rep-type button{height:32px;padding:0 12px;border:1px solid #D0D5DD;border-radius:999px;background:#fff;color:#344054;font-size:13px;font-weight:600;cursor:pointer}
.pmx-rep-type button.is-on{background:#0B1F3A;border-color:#0B1F3A;color:#fff}
#plan-measure-color-scan .pmr-origin-btns{align-items:center}#plan-measure-color-scan .pmr-origin-btns>*{margin:0!important;min-height:38px!important;display:inline-flex;align-items:center}

#primary-nav .nav-section-items .nav-sub[data-nav-hidden],.nav-sub[data-nav-hidden]{display:none!important}

/* Pointage : « + Ouvrier » = Équipes › « + Ajouter un ouvrier » (plus complet) */
#tw-open-worker{display:none!important}

/* Pages regroupées (Devis & factures · Sous-traitance · Budget & lignes) : onglets en haut de page */
#primary-nav .nav-section-items .nav-sub[data-merged-hidden],#primary-nav .nav-sub[data-merged-hidden]{display:none!important}
.view>.vt-tabs{display:flex;gap:4px;margin:0 0 18px;border-bottom:1px solid #E3E7EE;overflow-x:auto;scrollbar-width:none}
.view>.vt-tabs::-webkit-scrollbar{display:none}
.vt-tabs .vt-tab{appearance:none;background:none!important;border:0!important;border-bottom:2px solid transparent!important;border-radius:0!important;box-shadow:none!important;margin:0 0 -1px;padding:10px 14px!important;font:600 14px/1.2 inherit;color:#667085!important;cursor:pointer;white-space:nowrap;min-height:0!important;transition:color .15s,border-color .15s}
.vt-tabs .vt-tab:hover{color:#0B1F3A!important}
.vt-tabs .vt-tab.is-on{color:var(--brand,#1660D9)!important;border-bottom-color:var(--brand,#1660D9)!important;cursor:default}
.vt-tabs .vt-tab:focus-visible{outline:2px solid var(--brand,#1660D9);outline-offset:-2px;border-radius:6px!important}
@media (max-width:640px){.view>.vt-tabs{margin:0 -16px 14px;padding:0 12px}.vt-tabs .vt-tab{flex:1 0 auto;padding:10px 12px!important}}

/* Avancement sur plan : détail en € (gérant) */
#pm-prog .pp-bar .pp-over{background:#F79009;z-index:2;border-radius:0 4px 4px 0}
#pm-prog .pp-money{grid-column:2;display:flex;flex-direction:column;gap:6px;margin-top:2px;padding-top:7px;border-top:1px dashed #EAECF0}
#pm-prog .pp-m-row small{color:#667085;font-size:11.5px}
#pm-prog .pp-m-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}
#pm-prog .pp-m-grid>span{display:flex;flex-direction:column;gap:1px;padding:5px 7px;border-radius:7px;background:#F9FAFB}
#pm-prog .pp-m-grid small{font-size:10.5px;color:#667085;text-transform:uppercase;letter-spacing:.03em}
#pm-prog .pp-m-grid b{font-size:12.5px;color:#101828;font-variant-numeric:tabular-nums;white-space:nowrap}
#pm-prog .pp-m-grid .is-next{background:#ECFDF3}
#pm-prog .pp-m-grid .is-next b{color:#067647}
#pm-prog .pp-m-warn{font-size:11.5px;line-height:1.35;color:#B54708;background:#FFFAEB;border:1px solid #FEDF89;border-radius:7px;padding:6px 8px}
#pm-prog .pp-sum{display:grid;grid-template-columns:repeat(2,1fr);gap:6px;margin:10px 0 6px}
#pm-prog .pp-sum>div{display:flex;flex-direction:column;gap:1px;padding:8px 10px;border:1px solid #EAECF0;border-radius:9px;background:#fff}
#pm-prog .pp-sum small{font-size:10.5px;color:#667085;text-transform:uppercase;letter-spacing:.03em}
#pm-prog .pp-sum b{font-size:14px;color:#101828;font-variant-numeric:tabular-nums}
#pm-prog .pp-sum em{font-style:normal;font-size:11.5px;color:#667085}
#pm-prog .pp-sum .is-next{background:#ECFDF3;border-color:#ABEFC6}
#pm-prog .pp-sum .is-next b{color:#067647}
#pm-prog .pp-legend{display:flex;flex-wrap:wrap;gap:4px 12px;margin:0 0 8px;font-size:11.5px;color:#667085}
#pm-prog .pp-legend span{display:inline-flex;align-items:center;gap:5px}
#pm-prog .pp-legend i{width:12px;height:6px;border-radius:3px;display:inline-block}
#pm-prog .pp-legend .lg-done{background:#16A34A}
#pm-prog .pp-legend .lg-inv{background:#98A2B3}
#pm-prog .pp-legend .lg-over{background:#F79009}

/* Avancement sur plan : phases d'une ligne (équerres → laine → cornières → panneaux) */
#pm-prog .pp-ph{margin:8px 0 4px;padding:10px;border:1px solid #D0E1FF;border-radius:10px;background:#F5F9FF;display:flex;flex-direction:column;gap:8px}
#pm-prog .pp-ph-h{display:flex;align-items:baseline;justify-content:space-between;gap:8px;flex-wrap:wrap}
#pm-prog .pp-ph-h b{font-size:13px;color:#0B1F3A}
#pm-prog .pp-ph-h small{flex-basis:100%;font-size:11.5px;color:#667085}
#pm-prog .pp-ph-link,#pm-prog .pp-ph-close{background:none!important;border:0!important;box-shadow:none!important;color:#1660D9!important;font:600 12.5px/1 inherit;cursor:pointer;padding:2px 4px!important;min-height:0!important}
#pm-prog .pp-ph-close{font-size:18px;color:#667085!important}
#pm-prog .pp-ph-chips{display:flex;flex-wrap:wrap;gap:6px}
#pm-prog .pp-chip{display:inline-flex;align-items:center;gap:6px;padding:6px 10px!important;min-height:0!important;border:1px solid #D0D5DD!important;border-radius:999px!important;background:#fff!important;box-shadow:none!important;color:#344054!important;font:500 12.5px/1.2 inherit;cursor:pointer}
#pm-prog .pp-chip small{color:#98A2B3;font-size:11px}
#pm-prog .pp-chip .pp-chk{display:inline-grid;place-items:center;width:15px;height:15px;border-radius:4px;border:1.5px solid #98A2B3;font-size:10px;color:#fff}
#pm-prog .pp-chip.is-on{border-color:#16A34A!important;background:#ECFDF3!important;color:#065F46!important}
#pm-prog .pp-chip.is-on .pp-chk{background:#16A34A;border-color:#16A34A}
#pm-prog .pp-ph-hint{font-size:11.5px;color:#667085;line-height:1.35}
#pm-prog .pp-ph-foot{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;font-size:12px;color:#475467}
#pm-prog .pp-ph-del{background:none!important;border:1px solid #FDA29B!important;color:#B42318!important;border-radius:7px!important;padding:5px 9px!important;min-height:0!important;font:600 12px/1 inherit;box-shadow:none!important;cursor:pointer}
#pm-prog .pp-ph-mark{border-color:#1660D9;background:#EEF4FF}
#pm-prog .pp-ph-add{flex-direction:row;align-items:center;justify-content:space-between;flex-wrap:wrap;background:#F9FAFB;border-style:dashed;border-color:#D0D5DD;font-size:12px;color:#475467}
#pm-prog .pp-ph-add button,#pm-prog .pp-ph-tools button,#pm-prog .pp-ph-presets button{background:#fff!important;border:1px solid #D0D5DD!important;border-radius:7px!important;padding:5px 9px!important;min-height:0!important;box-shadow:none!important;color:#1660D9!important;font:600 12px/1.1 inherit;cursor:pointer}
#pm-prog .pp-ph-presets{display:flex;flex-wrap:wrap;align-items:center;gap:6px;font-size:11.5px;color:#667085}
#pm-prog .pp-ph-rows{display:flex;flex-direction:column;gap:6px}
#pm-prog .pp-ph-row{display:grid;grid-template-columns:20px 1fr 78px 26px;gap:6px;align-items:center}
#pm-prog .pp-ph-no{display:grid;place-items:center;width:20px;height:20px;border-radius:6px;background:#1660D9;color:#fff;font-size:11px;font-weight:700}
#pm-prog .pp-ph-row input{width:100%;min-width:0;height:32px!important;padding:0 8px!important;font-size:13px!important;border-radius:7px!important}
#pm-prog .pp-ph-w{display:flex;align-items:center;gap:3px;font-size:12px;color:#667085}
#pm-prog .pp-ph-w input{text-align:right}
#pm-prog .pp-ph-x{background:none!important;border:0!important;box-shadow:none!important;color:#98A2B3!important;font-size:18px;cursor:pointer;padding:0!important;min-height:0!important}
#pm-prog .pp-ph-x:hover{color:#B42318!important}
#pm-prog .pp-ph-empty{font-size:12px;color:#667085;margin:0}
#pm-prog .pp-ph-tools{display:flex;align-items:center;justify-content:space-between;gap:8px}
#pm-prog .pp-ph-sum{font-size:12px;font-weight:700;color:#B54708}
#pm-prog .pp-ph-sum.is-ok{color:#067647}
#pm-prog .pp-ph-note{font-size:11px;color:#667085;margin:0;line-height:1.35}
#pm-prog .pp-ph-act{display:flex;justify-content:flex-end;gap:6px;flex-wrap:wrap}
#pm-prog .pp-ph-act button{padding:7px 12px!important;min-height:0!important;font-size:12.5px!important}
#pm-prog .pp-ph-off{color:#B42318!important}
#pm-prog .pp-phl{grid-column:2;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px 10px;margin-top:1px}
#pm-prog .pp-phl>span{display:grid;grid-template-columns:minmax(0,1fr) 34px;grid-template-areas:"t p" "b b";gap:2px 4px;align-items:center;font-size:11px;color:#475467}
#pm-prog .pp-phl em{grid-area:t;font-style:normal;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#pm-prog .pp-phl small{grid-area:p;text-align:right;font-weight:700;color:#15803D;font-variant-numeric:tabular-nums}
#pm-prog .pp-phl i{grid-area:b;display:block;height:4px;border-radius:2px;background:#E4E7EC;overflow:hidden}
#pm-prog .pp-phl i b{display:block;height:100%;background:#16A34A;border-radius:2px}

/* Plan : « Effacer les annotations du plan » */
.pm-menu-item.pm-menu-danger span{color:#B42318}
.pe-modal{position:fixed;inset:0;z-index:100000;display:grid;place-items:center;padding:16px;background:rgba(16,24,40,.55)}
.pe-dialog{width:min(460px,100%);max-height:calc(100vh - 32px);overflow:auto;background:#fff;border-radius:14px;box-shadow:0 24px 48px rgba(16,24,40,.25);padding:18px;display:flex;flex-direction:column;gap:12px;color:#101828}
.pe-head{display:flex;align-items:center;justify-content:space-between;gap:10px}
.pe-head h3{margin:0;font-size:17px}
.pe-x{background:none!important;border:0!important;box-shadow:none!important;font-size:22px;color:#667085!important;cursor:pointer;padding:0 4px!important;min-height:0!important}
.pe-lead{margin:0;font-size:13px;color:#475467}
.pe-list{display:flex;flex-direction:column;gap:8px}
.pe-opt{display:flex;gap:10px;align-items:flex-start;padding:10px 12px;border:1px solid #EAECF0;border-radius:10px;cursor:pointer}
.pe-opt:has(input:checked){border-color:#FDA29B;background:#FEF3F2}
.pe-opt input{width:16px!important;height:16px!important;margin-top:2px;accent-color:#D92D20;flex:none}
.pe-opt b{display:block;font-size:14px}
.pe-opt small{display:block;font-size:12px;color:#667085;margin-top:2px;line-height:1.35}
.pe-opt.is-off{opacity:.55;cursor:default}
.pe-warn{margin:0;font-size:12px;color:#B42318}
.pe-act{display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap}
.pe-go{background:#D92D20!important;border:1px solid #D92D20!important;color:#fff!important;border-radius:10px!important;font-weight:700!important;padding:9px 16px!important;cursor:pointer}
.pe-go:disabled{opacity:.5;cursor:default}

/* Avancement : saisie directe de la quantité faite */
#pm-prog .pp-man{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin:-1px 0 6px;padding:9px 10px;border:2px solid #16A34A;border-top:1px dashed #ABEFC6;border-radius:0 0 9px 9px;background:#F6FEF9}
#pm-prog .pp-man-l{display:flex;flex-direction:column;line-height:1.2}
#pm-prog .pp-man-l b{font-size:13px;color:#065F46}
#pm-prog .pp-man-l small{font-size:11px;color:#667085}
#pm-prog .pp-man-in{display:flex;align-items:center;gap:4px}
#pm-prog .pp-man-in button{width:34px;height:34px;min-height:0!important;padding:0!important;border:1px solid #D0D5DD!important;border-radius:8px!important;background:#fff!important;box-shadow:none!important;color:#101828!important;font:700 18px/1 inherit;cursor:pointer}
#pm-prog .pp-man-in button:disabled{opacity:.4;cursor:default}
#pm-prog .pp-man-in input{width:84px!important;height:34px!important;padding:0 8px!important;text-align:right;font:600 14px/1 inherit!important;font-variant-numeric:tabular-nums;border-radius:8px!important}
#pm-prog .pp-man-u{min-width:22px;font-size:12.5px;color:#475467}
#pm-prog .pp-line.is-sel:has(+ .pp-man){border-radius:9px 9px 0 0;margin-bottom:0}

/* ===== Menu latéral : plus lisible, fond bleu nuit comme la barre du haut (logo inchangé) ===== */
html body aside.sidebar,html body aside.sidebar nav#primary-nav{background:#0B1F3A!important;color:#E6ECF5!important;border-right:1px solid rgba(255,255,255,.06)!important;scrollbar-color:rgba(255,255,255,.22) transparent}
html body aside.sidebar::-webkit-scrollbar{width:8px}
html body aside.sidebar::-webkit-scrollbar-thumb{background:rgba(255,255,255,.22);border-radius:8px}
html body nav#primary-nav .nav-section{margin:0 0 6px}
html body nav#primary-nav .nav-section-head{display:flex!important;align-items:center!important;gap:8px!important;width:100%;padding:14px 10px 6px!important;background:none!important;border:0!important;box-shadow:none!important;color:#8FB4FF!important;font-size:11px!important;font-weight:700!important;letter-spacing:.05em!important;text-transform:uppercase!important;white-space:nowrap!important;cursor:pointer}
html body nav#primary-nav .nav-section-head:hover{color:#BFD3FF!important}
html body nav#primary-nav .nav-section-head svg,html body nav#primary-nav .nav-section-head .nav-section-icon svg{stroke:currentColor!important;color:currentColor!important;opacity:1!important}
html body nav#primary-nav .nav-section-head .nav-section-icon{display:inline-grid!important;width:18px;height:18px;color:#8FB4FF!important;opacity:1!important}
html body nav#primary-nav .nav-section-items .nav,html body nav#primary-nav .nav-section-items .nav-sub{color:#E6ECF5!important;font-size:15px!important;font-weight:500!important;padding:9px 12px!important;border-radius:8px!important;background:transparent!important;margin:1px 0!important}
html body nav#primary-nav .nav-section-items .nav svg,html body nav#primary-nav .nav-section-items .nav-sub svg{color:#9FB2CF!important;stroke:#9FB2CF!important}
html body nav#primary-nav .nav-section-items .nav:hover,html body nav#primary-nav .nav-section-items .nav-sub:hover{background:rgba(255,255,255,.08)!important;color:#fff!important}
html body nav#primary-nav .nav-section-items .nav.active,html body nav#primary-nav .nav-section-items .nav-sub.active{background:#1660D9!important;color:#fff!important;font-weight:700!important;box-shadow:0 2px 8px rgba(22,96,217,.35)!important}
html body nav#primary-nav .nav-section-items .nav.active svg,html body nav#primary-nav .nav-section-items .nav-sub.active svg{color:#fff!important;stroke:#fff!important}
html body nav#primary-nav .nav-section-items .nav-sub:focus-visible{outline:2px solid #8FB4FF!important;outline-offset:1px}
html body nav#primary-nav .nav-group-submenu .nav-sub{font-size:14px!important;color:#C9D6EA!important}
html body aside.sidebar .company-identity-strip{background:rgba(255,255,255,.06)!important;border-color:rgba(255,255,255,.1)!important;color:#E6ECF5!important}
/* Barre du bas (mobile) : libellés et icônes plus contrastés */
html body nav.mtab{background:#fff!important;border-top:1px solid #D0D5DD!important;box-shadow:0 -4px 16px rgba(16,24,40,.08)!important}
html body nav.mtab button{color:#1F2A44!important;font-weight:600!important}
html body nav.mtab button svg{stroke:#1F2A44!important;color:#1F2A44!important}
html body nav.mtab button.active,html body nav.mtab button[aria-current="page"]{color:#1660D9!important}
html body nav.mtab button.active svg,html body nav.mtab button[aria-current="page"] svg{stroke:#1660D9!important;color:#1660D9!important}

/* Onglets des pages regroupées : bien visibles (segments, onglet actif en bleu plein) */
html body .view>.vt-tabs{display:inline-flex!important;gap:4px!important;margin:0 0 20px!important;padding:5px!important;border:1px solid #D0D5DD!important;border-radius:12px!important;background:#EEF2F7!important;max-width:100%;overflow-x:auto}
html body .vt-tabs .vt-tab{margin:0!important;padding:9px 20px!important;border:0!important;border-radius:9px!important;background:transparent!important;color:#1F2A44!important;font-size:15px!important;font-weight:600!important;line-height:1.2!important}
html body .vt-tabs .vt-tab:hover{background:#fff!important;color:#0B1F3A!important}
html body .vt-tabs .vt-tab.is-on{background:#1660D9!important;color:#fff!important;font-weight:700!important;box-shadow:0 2px 6px rgba(22,96,217,.35)!important}
@media (max-width:640px){html body .view>.vt-tabs{display:flex!important;margin:0 0 14px!important}html body .vt-tabs .vt-tab{flex:1 1 0;padding:10px 8px!important;font-size:14.5px!important;text-align:center}}

/* Avancement : ligne au forfait mesurée sur le plan */
#pm-prog .pp-ref{margin:8px 0 4px;padding:10px;border:1px solid #FEDF89;border-radius:10px;background:#FFFAEB;display:flex;flex-direction:column;gap:6px;font-size:12.5px;color:#7A2E0E}
#pm-prog .pp-ref b{font-size:13px;color:#93370D}
#pm-prog .pp-ref.is-set{flex-direction:row;align-items:center;justify-content:space-between;background:#F0F9FF;border-color:#B9E6FE;color:#0B4A6F}
#pm-prog .pp-ref.is-set b{color:#0B4A6F}
#pm-prog .pp-ref-in{display:flex;gap:6px;flex-wrap:wrap;align-items:center}
#pm-prog .pp-ref-in input{width:100px!important;height:34px!important;padding:0 8px!important;text-align:right;border-radius:8px!important}
#pm-prog .pp-ref-in select{width:auto!important;height:34px!important;padding:0 26px 0 8px!important;border-radius:8px!important}
#pm-prog .pp-ref-in button{padding:7px 12px!important;min-height:0!important;font-size:12.5px!important}
#pm-prog .pp-ref-off{color:#B42318!important}

/* Menu ••• du plan : doublons retirés (« Lancer l’analyse » = bouton « Mesure auto » ; « Chercher par couleur » = bouton « Couleur » de la barre d’outils) */
#plan-measure-tools-menu #plan-measure-run-detect,#plan-measure-tools-menu #plan-measure-pick-color{display:none!important}
/* Avancement : tout le contenu défile d'un bloc (les lignes restent visibles), récap compact */
#pm-prog .pp-scroll{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
#pm-prog .pp-scroll .pp-list{flex:none;overflow:visible;min-height:0}
#pm-prog .pp-sum{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:5px!important;margin:8px 10px 4px!important}
#pm-prog .pp-sum>div{display:grid!important;grid-template-columns:1fr auto;grid-template-areas:'s s' 'b e';align-items:baseline;column-gap:6px;padding:6px 9px!important;border-radius:8px!important;min-width:0}#pm-prog .pp-sum>div small{grid-area:s}#pm-prog .pp-sum>div b{grid-area:b}#pm-prog .pp-sum>div em{grid-area:e}
#pm-prog .pp-sum small{font-size:9.5px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#pm-prog .pp-sum b{font-size:13.5px!important;white-space:nowrap}
#pm-prog .pp-sum em{font-size:10.5px!important}
#pm-prog .pp-legend{margin:0 12px 6px!important;font-size:11px!important}
#pm-prog .pp-steps{flex-direction:row!important;flex-wrap:wrap;gap:4px 12px!important;padding:8px 14px 2px!important;font-size:12.5px}
#pm-prog .pp-steps small{display:none}
#pm-prog .pp-how{margin-left:10px!important;margin-right:10px!important}
#pm-prog .pp-foot{flex:none}
#pm-prog .pp-foot>small,#pm-prog .pp-foot>p{font-size:11px!important;line-height:1.35}
@media (max-width:700px){#pm-prog{height:70%!important}}

/* Menu latéral réductible (ordinateur) */
.tb-sb-toggle{display:none}
@media (min-width:821px){
	html body .tb-sb-toggle{display:inline-grid;place-items:center;flex:none;width:38px;height:38px;margin:0 12px 0 -6px;padding:0!important;min-height:0!important;border:1px solid rgba(255,255,255,.18)!important;border-radius:9px!important;background:rgba(255,255,255,.06)!important;box-shadow:none!important;color:#E6ECF5!important;cursor:pointer}
	html body .tb-sb-toggle:hover{background:rgba(255,255,255,.14)!important;color:#fff!important}
	html body .tb-sb-toggle svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
	html body.sb-min .tb-sb-toggle .sb-arrow{transform:rotate(180deg);transform-origin:13.5px 12px}
	html body.sb-min .app-shell{grid-template-columns:72px minmax(0,1fr)!important}
	html body.sb-min aside.sidebar .brand strong,html body.sb-min #company-identity-strip{display:none!important}
	html body.sb-min aside.sidebar .brand{justify-content:center!important;padding-left:0!important;padding-right:0!important}
	html body.sb-min nav#primary-nav{padding:10px 8px!important;overflow-x:hidden!important}
	html body.sb-min nav#primary-nav .nav-section-head{justify-content:center!important;padding:12px 0 6px!important;pointer-events:none;border-top:1px solid rgba(255,255,255,.08)!important}
	html body.sb-min nav#primary-nav .nav-section:first-child .nav-section-head{border-top:0!important}
	html body.sb-min nav#primary-nav .nav-section-head>span:not(.nav-section-icon),html body.sb-min nav#primary-nav .nav-section-head .nav-section-chev{display:none!important}
	html body.sb-min nav#primary-nav [data-section-items]{display:block!important;padding-left:0!important;margin-left:0!important;border-left:0!important}
	html body.sb-min nav#primary-nav [data-section-items][hidden]{display:block!important}
	html body.sb-min nav#primary-nav .nav-section-items .nav,html body.sb-min nav#primary-nav .nav-section-items .nav-sub{justify-content:center!important;gap:0!important;padding:10px 0!important}
	html body.sb-min nav#primary-nav .nav-section-items .nav>span,html body.sb-min nav#primary-nav .nav-section-items .nav-sub>span,html body.sb-min nav#primary-nav .nav-group-arrow,html body.sb-min nav#primary-nav .nav-group-submenu{display:none!important}
	html body.sb-min nav#primary-nav .nav-section-items svg:not(.nav-group-arrow){display:block!important;width:21px!important;height:21px!important;margin:0!important;fill:none!important;stroke:#C9D6EA!important;stroke-width:2!important;stroke-linecap:round;stroke-linejoin:round;opacity:1!important;visibility:visible!important}
	html body.sb-min nav#primary-nav .nav-section-items .active svg:not(.nav-group-arrow){stroke:#fff!important}
	html body.sb-min nav#primary-nav .nav-section-items .nav:hover svg,html body.sb-min nav#primary-nav .nav-section-items .nav-sub:hover svg{stroke:#fff!important}
}

/* Plan : doublons retirés — « Exporter le métré (PDF) » du menu = « PDF du métré » du Rapport de métrage ;
   « Chiffrer la façade » = « Chiffrage façade détaillé → » du Rapport de métrage */
#plan-measure-tools-menu #plan-measure-metre-pdf{display:none!important}
.pmx-fac .pmx-fac-go{display:none!important}

/* Situation : % de catégorie sous le déjà facturé */
.sx-cat-in.is-low input,label.is-low input[data-category-percent]{border-color:#F79009!important;background:#FFFAEB!important}
.sx-cat-warn{display:block;box-sizing:border-box;margin:0 0 4px;padding:5px 8px;border-radius:7px;background:#FFFAEB;border:1px solid #FEDF89;color:#B54708;font-size:11.5px;line-height:1.35;font-weight:600}

/* Devis & factures : suivi d'un devis envoyé pour signature */
.ddv-st .ddv-track{display:table;margin:4px auto 0;padding:1px 7px;border-radius:999px;font-size:11px;font-weight:600;line-height:18px;white-space:nowrap;cursor:help;vertical-align:middle}
.ddv-track-info{background:#EEF4FF;color:#1849A9}
.ddv-track-ok{background:#ECFDF3;color:#067647}
.ddv-track-warn{background:#FFFAEB;color:#B54708}
/* ---------- Contacts clients ---------- */
.cl-page .cl-tools{margin:0 0 12px}
.cl-page #cl-search{width:100%;max-width:520px;height:42px;padding:0 14px;border:1px solid #D0D5DD;border-radius:10px;font-size:15px;background:#fff;color:#101828;box-sizing:border-box}
.cl-list{display:grid;gap:10px}
.cl-card{background:#fff;border:1px solid #E4E7EC;border-radius:12px;overflow:hidden}
.cl-card.is-open{border-color:#B2CCFF;box-shadow:0 2px 10px rgba(16,24,40,.06)}
.cl-head{display:flex;align-items:center;gap:12px;width:100%;padding:12px 14px;border:0;background:none;text-align:left;cursor:pointer;color:#101828}
.cl-av{flex:none;width:38px;height:38px;border-radius:50%;display:grid;place-items:center;background:#EEF4FF;color:#1849A9;font-weight:700;font-size:14px}
.cl-name{display:grid;gap:2px;min-width:0;flex:1}
.cl-name b{font-size:15.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cl-name small{font-size:12.5px;color:#667085}
.cl-chev{color:#667085}
.cl-body{padding:4px 14px 14px;display:grid;gap:10px}
.cl-body h4{margin:6px 0 0;font-size:13px;text-transform:uppercase;letter-spacing:.04em;color:#475467}
.cl-tw{overflow-x:auto}
.cl-table{width:100%;border-collapse:collapse;font-size:14px;min-width:720px}
.cl-table th{text-align:left;font-size:12px;font-weight:600;color:#667085;padding:6px 6px;border-bottom:1px solid #EAECF0}
.cl-table td{padding:4px 6px;border-bottom:1px solid #F2F4F7;vertical-align:middle}
.cl-table input,.cl-add input{width:100%;height:34px;padding:0 8px;border:1px solid transparent;border-radius:8px;background:#F9FAFB;font-size:14px;color:#101828;box-sizing:border-box}
.cl-table input:hover,.cl-table input:focus{border-color:#D0D5DD;background:#fff;outline:none}
.cl-table input.cl-saved{border-color:#32D583;background:#ECFDF3}
.cl-sent{font-size:13px;color:#344054;white-space:nowrap}
.cl-sent small{display:block;color:#667085;font-size:12px}
.cl-auto{display:inline-block;margin-left:6px;padding:1px 6px;border-radius:999px;background:#EEF4FF;color:#1849A9;font-size:11px;font-weight:600}
.cl-act{white-space:nowrap;text-align:right}
.cl-act a,.cl-act button{display:inline-grid;place-items:center;width:30px;height:30px;margin-left:2px;border-radius:8px;border:1px solid #EAECF0;background:#fff;color:#344054;text-decoration:none;font-size:15px;cursor:pointer}
.cl-act button:hover{background:#FEF3F2;color:#B42318;border-color:#FDA29B}
.cl-add{display:grid;grid-template-columns:1.2fr 1fr 1.4fr 1fr auto;gap:6px}
.cl-add input{border-color:#D0D5DD;background:#fff}
.cl-add button{height:34px;padding:0 12px;white-space:nowrap}
.cl-cols{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.cl-ul{margin:4px 0 0;padding:0;list-style:none;display:grid;gap:4px;font-size:14px;color:#344054}
.cl-ul small{color:#667085}
.cl-ul span{font-size:12px;color:#B54708;margin-left:4px}
.cl-ul span.ok{color:#067647}
.cl-empty{margin:4px 0;font-size:13.5px;color:#667085}
@media (max-width:720px){.cl-add{grid-template-columns:1fr 1fr}.cl-add button{grid-column:1/-1}.cl-cols{grid-template-columns:1fr}}
.cl-page .cl-tools{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.cl-page .cl-tools #cl-search{flex:1;min-width:220px}
.cl-page #cl-new-mail{height:42px;padding:0 16px;white-space:nowrap}
.clm-layer{position:fixed;inset:0;z-index:100000;background:rgba(16,24,40,.45);display:grid;place-items:center;padding:16px}
.clm{width:min(620px,100%);max-height:calc(100vh - 32px);overflow:auto;background:#fff;border-radius:14px;box-shadow:0 20px 50px rgba(16,24,40,.25);display:grid;gap:10px;padding:16px;box-sizing:border-box;color:#101828}
.clm header{display:flex;justify-content:space-between;align-items:center;font-size:17px}
.clm header button{width:34px;height:34px;border:0;border-radius:8px;background:#F2F4F7;font-size:20px;cursor:pointer}
.clm label{display:grid;gap:4px;font-size:13px;font-weight:600;color:#344054}
.clm input,.clm textarea{width:100%;box-sizing:border-box;padding:10px 12px;border:1px solid #D0D5DD;border-radius:10px;font:inherit;font-size:15px;font-weight:400;color:#101828;background:#fff}
.clm textarea{resize:vertical;min-height:160px}
.clm small{color:#667085;font-size:12.5px}
.clm footer{display:flex;justify-content:flex-end;gap:8px}
.clm footer button{height:40px;padding:0 18px}
/* Connexion sur téléphone (texte agrandi par le système) : rien ne doit être coupé */
#login-modal #login-roles,#login-roles{height:auto!important;min-height:0!important;overflow:hidden}
#login-modal #login-roles button,#login-roles button{height:auto!important;min-height:44px!important;box-sizing:border-box;display:flex!important;align-items:center;justify-content:center;padding:8px 4px!important;line-height:1.2!important;white-space:normal;overflow-wrap:anywhere;text-align:center}
@media (max-width:420px){#login-roles button{font-size:12.5px!important}}
#login-error,#login-modal #login-error{height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important;line-height:1.4!important;box-sizing:border-box}
#login-error:empty{display:none!important}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
/* Pointage › Résumé des ouvriers : initiales toujours en rond, plus petites ; tableau compact sur téléphone */
#time-view .tw-sm-name{display:flex!important;align-items:center;gap:8px;min-width:0}
#time-view .tw-sm-av{flex:0 0 28px!important;width:28px!important;height:28px!important;min-width:28px!important;max-width:28px!important;aspect-ratio:1/1;border-radius:50%!important;display:inline-grid!important;place-items:center;padding:0!important;font-size:11px!important;font-style:normal;font-weight:700;line-height:1!important;letter-spacing:0}
@media (max-width:640px){
	#time-view .worker-month-summary-table{min-width:0!important}
	#time-view .worker-month-summary th,#time-view .worker-month-summary td{padding:0 8px!important;font-size:13px!important}
	#time-view .worker-month-summary thead th{height:36px!important;white-space:nowrap;vertical-align:middle}
	#time-view .worker-month-summary td{height:44px!important;white-space:nowrap}
	#time-view .tw-sm-av{flex-basis:24px!important;width:24px!important;height:24px!important;min-width:24px!important;max-width:24px!important;font-size:10px!important}
	#time-view .tw-sm-txt{font-size:13px;line-height:1.25}
	#time-view .tw-sm-txt small{font-size:11px}
}
.cl-kinds{display:inline-flex;gap:4px;padding:4px;margin:0 0 10px;border-radius:12px;background:#EEF1F5}
.cl-kinds button{height:36px;padding:0 14px;border:0;border-radius:9px;background:transparent;color:#344054;font-size:14px;font-weight:600;cursor:pointer}
.cl-kinds button.is-on{background:#fff;color:#0B1F3A;box-shadow:0 1px 3px rgba(16,24,40,.12)}
.cl-page #cl-new{height:42px;padding:0 14px}
@media (max-width:480px){.cl-kinds{display:flex}.cl-kinds button{flex:1;padding:0 6px;font-size:13px}}
.cl-hbtn{all:unset;cursor:pointer;display:block;font-size:13px;color:#344054;line-height:1.3}
.cl-hbtn small{display:block;color:#1849A9;font-size:12px;font-weight:600}
.cl-hbtn:hover small{text-decoration:underline}
.cl-hist td{background:#F8FAFC;padding:8px 12px!important}
.cl-hist ol{margin:0;padding:0;list-style:none;display:grid;gap:6px}
.cl-hist li{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;font-size:13.5px;color:#101828}
.cl-hist time{min-width:110px;color:#667085;font-size:12.5px;font-variant-numeric:tabular-nums}
.cl-hist i{border:0!important;box-shadow:none!important;font-style:normal;font-size:12px;padding:2px 8px;border-radius:999px;background:#F2F4F7;color:#475467}
.cl-hist i.ok{background:#ECFDF3;color:#067647}
.cl-hist i.strong{font-weight:700}
/* Commandes fournisseurs */
.cl-orders{display:grid;gap:8px}
.cl-ord{border:1px solid #EAECF0;border-radius:10px;background:#fff}
.cl-ord.is-open{border-color:#B2CCFF}
.cl-ord-h{all:unset;box-sizing:border-box;cursor:pointer;display:grid;grid-template-columns:auto 1fr auto;grid-template-areas:"st t ch" "st s ch";align-items:center;gap:2px 10px;width:100%;padding:10px 12px}
.cl-ord-h .cl-ord-st{grid-area:st}.cl-ord-h b{grid-area:t;font-size:14px;color:#101828}.cl-ord-h small{grid-area:s;font-size:12.5px;color:#667085}.cl-ord-h>span:last-child{grid-area:ch;color:#667085}
.cl-ord-st{font-size:12px;font-weight:700;padding:3px 9px;border-radius:999px;background:#EEF4FF;color:#1849A9;white-space:nowrap}
.cl-ord-st.st-confirmee{background:#FFF4E5;color:#8A4B00}.cl-ord-st.st-livree{background:#ECFDF3;color:#067647}.cl-ord-st.st-annulee{background:#F2F4F7;color:#667085;text-decoration:line-through}
.cl-ord em{font-style:normal;font-weight:700}.cl-ord em.ok{color:#067647}.cl-ord em.bad{color:#B42318}
.cl-ord-b{padding:0 12px 12px;display:grid;gap:10px}
.cl-ord-steps{display:flex;flex-wrap:wrap;gap:6px}
.cl-ord-steps button{height:32px;padding:0 12px;border:1px solid #D0D5DD;border-radius:999px;background:#fff;color:#344054;font-size:13px;font-weight:600;cursor:pointer}
.cl-ord-steps button.is-on{background:#0B1F3A;border-color:#0B1F3A;color:#fff}
.cl-ord-steps .cl-ord-cancel{margin-left:auto;color:#B42318;border-color:#FDA29B}
.cl-ord-t{width:100%;border-collapse:collapse;font-size:13.5px}
.cl-ord-t th{text-align:left;font-size:12px;color:#667085;font-weight:600;padding:6px;border-bottom:1px solid #EAECF0}
.cl-ord-t td{padding:5px 6px;border-bottom:1px solid #F2F4F7}
.cl-ord-t input{width:110px;height:32px;padding:0 8px;border:1px solid #D0D5DD;border-radius:8px;font-size:14px}
.cl-ord-all{justify-self:start;height:34px}
.cl-ord-inv{display:grid;gap:4px;font-size:13px;font-weight:600;color:#344054}
.cl-ord-inv select{height:36px;border:1px solid #D0D5DD;border-radius:8px;padding:0 8px;font-size:14px;max-width:100%}
.cl-ord em{border:0!important;padding:0!important;box-shadow:none!important;background:none!important}
/* Chantier › Matériaux */
.gc-mat{display:grid;gap:10px;padding:16px!important}
.gc-mat h4{margin:4px 0 0;font-size:14px}
.gm-alert{padding:10px 12px;border-radius:10px;background:#EEF4FF;color:#1D2939;font-size:14px}
.gm-alert.bad{background:#FEF3F2;color:#B42318;font-weight:600}
.gm-alert.warn{background:#FFF4E5;color:#8A4B00}
.gm-tw{overflow-x:auto}
.gm-t{width:100%;border-collapse:collapse;font-size:14px;min-width:640px}
.gm-t th{text-align:left;font-size:12px;color:#667085;font-weight:600;padding:8px 6px;border-bottom:1px solid #EAECF0}
.gm-t td{padding:8px 6px;border-bottom:1px solid #F2F4F7;vertical-align:top}
.gc-mat em{font-style:normal;font-weight:700;border:0!important;padding:0!important;background:none!important}
.gc-mat em.bad{color:#B42318}.gc-mat em.ok{color:#067647}
.gm-orders{list-style:none;margin:0;padding:0;display:grid;gap:6px;font-size:14px}
.gm-orders small{color:#667085}
.cl-ord-inv input[type=date]{height:36px;border:1px solid #D0D5DD;border-radius:8px;padding:0 8px;font-size:14px;max-width:220px}
.cl-ord-inv small{font-weight:400;color:#667085}
.cl-ord-conf{margin:0;padding:8px 10px;border-radius:8px;background:#ECFDF3;color:#067647;font-size:13.5px;font-weight:600}.cl-ord-wait{margin:0;font-size:13px;color:#667085}
/* Journées de l'équipe : saisie du tarif dans la fenêtre ; sur téléphone, une carte par ouvrier avec les 7 jours */
.twt-rate{display:inline-flex;align-items:center;gap:4px;margin-top:4px;color:#475467}
.twt-rate input{width:80px;height:30px;padding:0 6px;border:1px solid #F79009;border-radius:6px;font-size:14px;background:#fff}
.twt-rate button{height:30px;padding:0 10px;border:0;border-radius:6px;background:#1638D6;color:#fff;font-weight:700;font-size:13px;cursor:pointer}
@media (max-width:640px){
	.twt-modal{padding:0;place-items:stretch}
	.twt-dialog{width:100%;max-height:100dvh;height:100dvh;border-radius:0}
	.twt-top{padding:12px 16px;align-items:center}
	.twt-top h3{font-size:18px}
	.twt-top small{display:none}
	.twt-x{font-size:30px;padding:4px 8px}
	.twt-ctx{display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px;padding:10px 12px}
	.twt-ctx label:first-child{grid-column:1/-1}
	.twt-ctx select{min-width:0;width:100%}
	.twt-ctx input,.twt-ctx select{height:40px;width:100%;box-sizing:border-box}
	.twt-ctx input[type=number]{width:100%}
	.twt-week{grid-column:1/-1;margin:0;justify-content:space-between}
	.twt-week b{font-size:13.5px}
	.twt-wrap{overflow-y:auto;overflow-x:hidden;padding:8px 10px}
	.twt-grid,.twt-grid tbody{display:block;width:100%}
	.twt-grid thead{display:none}
	.twt-grid tbody tr{display:grid;grid-template-columns:repeat(7,1fr);gap:4px;padding:10px 8px;margin-bottom:8px;border:1px solid #EAECF0;border-radius:12px;background:#fff}
	.twt-grid tbody th{grid-column:1/-1;position:static;padding:0 0 6px;border:0;background:none}
	.twt-grid td{display:flex;flex-direction:column;align-items:center;gap:3px;padding:0;border:0;background:none!important}
	.twt-grid td::before{content:attr(data-d);font-size:10.5px;font-weight:600;color:#667085;white-space:pre-line;text-align:center;line-height:1.15}
	.twt-grid td.is-we::before{color:#98A2B3}
	.twt-cell{width:100%;max-width:44px;height:40px;font-size:18px}
	.twt-done{padding:0;width:100%;max-width:44px;height:40px;display:grid;place-items:center;border-radius:8px;font-size:11px;line-height:1.1;white-space:normal}
	.twt-row{height:30px}
	.twt-foot{position:sticky;bottom:0;display:grid!important;grid-template-columns:1fr 1fr;gap:8px;padding:10px 12px!important;background:#fff;border-top:1px solid #EAECF0}
	.twt-foot .twt-sum{grid-column:1/-1}
	.twt-foot [data-twt-save]{grid-column:1/-1;height:46px}
	.twt-foot button{width:100%;height:42px}
}
@media (max-width:640px){
	.twt-top{display:flex!important;flex-direction:row!important;justify-content:space-between!important;align-items:center!important;text-align:left!important}
	.twt-top>div{flex:1;min-width:0}
	.twt-grid td::before{min-height:26px;display:flex;align-items:flex-end;justify-content:center}
	.twt-grid tbody th{flex-wrap:wrap}
}
/* Audit téléphone : onglets RGE qui débordaient, carte « Ma photo de profil » trop étroite, tableaux sous-traitance compacts */
@media (max-width:640px){
	.rge-tabs{display:grid!important;grid-template-columns:repeat(3,1fr);gap:4px;overflow:visible!important}
	.rge-tabs button{white-space:normal!important;min-width:0!important;padding:6px 4px!important;font-size:12.5px!important;line-height:1.2;text-align:center;justify-content:center}
	.rge-tabs button svg{display:none}
	#my-tasks-view .worker-profile-panel,#my-tasks-view section:has(> .worker-profile-heading),#my-tasks-view div:has(> .worker-profile-heading){display:block!important}
	.worker-profile-heading{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
	.worker-profile-heading + *{width:100%}
	.worker-profile-actions{display:grid!important;grid-template-columns:1fr 1fr;gap:8px;width:100%}
	.worker-profile-actions>*{width:100%;min-width:0;justify-content:center;text-align:center}
	#st-dossiers-view table,#st-factures-view table{font-size:12.5px}
	#st-dossiers-view th,#st-dossiers-view td,#st-factures-view th,#st-factures-view td{padding-left:6px!important;padding-right:6px!important}
}
@media (max-width:640px){#my-tasks-view td[colspan]{white-space:normal!important}}
/* ---------- Plan sur téléphone : une seule barre en haut, le plan prend tout l'écran, actions de dessin en bas ---------- */
@media (max-width:640px){
	#plan-measure-modal.pmx .worker-detail-header{display:flex!important;flex-wrap:nowrap!important;align-items:center!important;gap:4px!important;height:50px!important;min-height:0!important;padding:4px 6px!important;overflow:hidden}
	#plan-measure-modal.pmx .pmx-head{order:0;flex:none;height:auto!important}
	#plan-measure-modal.pmx .pmx-plans{gap:0!important;font-size:12px!important;height:34px!important}
	#plan-measure-modal.pmx .pmx-plans button{width:24px!important;height:30px!important;padding:0!important}
	#plan-measure-modal.pmx .pmx-plans button svg{width:15px;height:15px}
	#plan-measure-modal.pmx #pmx-plan-pos{white-space:nowrap;font-size:12px}
	#plan-measure-modal.pmx .pmx-steps{order:1;flex:1 1 auto;min-width:0;display:flex!important;justify-content:center;gap:3px!important;margin:0!important;padding:0!important}
	#plan-measure-modal.pmx .pmx-steps li{font-size:0!important;padding:0!important;min-width:0!important;width:26px!important;height:26px!important;display:grid!important;place-items:center;border-radius:50%!important}
	#plan-measure-modal.pmx .pmx-steps li b{font-size:13px!important;width:26px!important;height:26px!important;margin:0!important;display:grid;place-items:center}
	#plan-measure-modal.pmx .pmx-auto{order:2;flex:none;width:36px!important;height:36px!important;padding:0!important}
	#plan-measure-modal.pmx .pmx-acts{order:3;flex:none;height:auto!important;gap:0!important;margin:0!important;padding:0!important}
	#plan-measure-modal.pmx .pmx-acts>*,#plan-measure-modal.pmx .pmx-acts summary{width:34px!important;height:36px!important;min-width:0!important;padding:0!important;display:grid!important;place-items:center}
	#plan-measure-modal.pmx #plan-measure-close{order:4;flex:none;width:36px!important;height:36px!important;font-size:22px!important;padding:0!important}
	#plan-measure-modal.pmx .plan-measure-body.list-collapsed{grid-template-rows:minmax(0,1fr)!important;grid-template-columns:minmax(0,1fr)!important}
	#plan-measure-modal.pmx .plan-measure-body.list-collapsed .plan-measure-list-wrap{display:none!important}
	/* Rail d'outils : plus fin */
	#plan-measure-modal.pmx .pmx-rail{left:6px!important;top:6px!important;gap:2px!important;padding:3px!important}
	#plan-measure-modal.pmx .pmx-rail button{width:34px!important;height:34px!important;min-height:0!important}
	/* Boutons « Dernier point / Terminer / Annuler » : une barre en bas, au-dessus de la barre de zoom */
	#plan-measure-modal.pmx .plan-measure-body .pmx-draw{position:fixed!important;left:8px!important;right:8px!important;top:auto!important;bottom:72px!important;transform:none!important;z-index:30;justify-content:center;flex-wrap:wrap;pointer-events:none}
	#plan-measure-modal.pmx .plan-measure-body .pmx-draw>*{pointer-events:auto}
	#plan-measure-modal.pmx .plan-measure-body .pmx-draw span.pm-draw{display:flex!important;width:100%;gap:6px!important}
	#plan-measure-modal.pmx .plan-measure-body .pmx-draw span.pm-draw > button:not([hidden]){flex:1;min-width:0!important;height:44px!important;padding:0 6px!important;font-size:14px!important;white-space:nowrap;justify-content:center;margin:0!important}
	/* Info-bulle de mesure : courte, pas de « tapez une longueur » sur écran tactile */
	#plan-measure-modal.pmx .pmx-float{bottom:10px!important;left:8px!important;right:8px!important;height:auto!important;padding:4px!important}
	#plan-measure-modal.pmx .pmx-float button{min-width:34px!important;height:36px!important;padding:0 6px!important}
}
@media (max-width:640px){
	#plan-measure-modal.pmx .pmx-plans:has(#pmx-plan-prev:disabled):has(#pmx-plan-next:disabled){display:none!important}
	#plan-measure-modal.pmx #plan-measure-guide-open{display:none!important}
	#plan-measure-modal.pmx .pmx-acts summary{list-style:none;font-size:18px;line-height:1}
	#plan-measure-modal.pmx .pmx-acts summary::-webkit-details-marker{display:none}
}
/* Viseur tactile : croix fine au-dessus du doigt */
#pm-aim{position:fixed;z-index:3000;pointer-events:none;transform:translate(-50%,-50%)}
#pm-aim[hidden]{display:none}
#pm-aim i{display:block;width:44px;height:44px;border-radius:50%;border:2px solid #F04438;box-shadow:0 0 0 2px rgba(255,255,255,.9);background:radial-gradient(circle,transparent 2px,transparent 3px),linear-gradient(#F04438,#F04438) center/2px 100% no-repeat,linear-gradient(#F04438,#F04438) center/100% 2px no-repeat}
#pm-aim span{position:absolute;left:50%;top:52px;transform:translateX(-50%);white-space:nowrap;font-size:11px;font-weight:600;color:#fff;background:rgba(16,24,40,.8);padding:2px 8px;border-radius:999px}
/* Bandeau de mesure sur téléphone */
#pm-mob-banner{display:none}
@media (max-width:640px){
	#pm-mob-banner:not([hidden]){position:fixed;z-index:31;top:56px;left:50px;right:8px;display:grid;grid-template-columns:1fr auto;align-items:center;gap:2px 10px;padding:8px 12px;border-radius:12px;background:#0B1F3A;color:#fff;box-shadow:0 6px 18px rgba(0,0,0,.25);pointer-events:none}
	#pm-mob-banner div{display:grid;min-width:0}
	#pm-mob-banner b{font-size:12px;font-weight:700;color:#9FC3FF;text-transform:uppercase;letter-spacing:.04em}
	#pm-mob-banner span{font-size:15px;font-weight:600;line-height:1.25}
	#pm-mob-banner strong{font-size:20px;font-weight:800;white-space:nowrap;color:#fff}
	#pm-mob-banner small{grid-column:1/-1;font-size:11px;color:#B7C4D6}
}
@media (max-width:640px){#pm-mob-banner{pointer-events:auto!important}#pm-mob-banner [data-tap-auto]{margin-left:6px;padding:2px 8px;border:1px solid #6B86B8;border-radius:999px;background:transparent;color:#fff;font-size:11px;font-weight:700}}
@media (max-width:640px){#plan-measure-modal.pmx .pmx-tip{display:none!important}}
/* Fiche client : logo, informations, modifier / supprimer */
.cl-av{position:relative;overflow:hidden}
.cl-av img{position:absolute;inset:5px;width:calc(100% - 10px);height:calc(100% - 10px);object-fit:contain;background:#fff;border-radius:50%;z-index:1}
.cl-av em{font-style:normal}
.cl-fiche{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:8px 16px;padding:10px 12px;border:1px solid #EAECF0;border-radius:10px;background:#F9FAFB}
.cl-fiche>div small{display:block;font-size:11.5px;color:#667085;font-weight:600}
.cl-fiche>div b{font-size:14px;color:#101828;font-weight:600;overflow-wrap:anywhere}
.cl-fiche .cl-fiche-btns{grid-column:1/-1;display:flex;gap:8px;justify-content:flex-end}
.cl-fiche .cl-fiche-btns button{height:36px;padding:0 14px}
.cl-fiche .cl-del-card{color:#B42318;border-color:#FDA29B}
.cl-fiche.is-edit label{display:grid;gap:4px;font-size:12.5px;font-weight:600;color:#344054}
.cl-fiche.is-edit .wide{grid-column:1/-1}
.cl-fiche.is-edit input{height:38px;padding:0 10px;border:1px solid #D0D5DD;border-radius:8px;font-size:14px;background:#fff;width:100%;box-sizing:border-box}
.cl-siret{display:flex;gap:6px}.cl-siret button{height:38px;padding:0 12px;white-space:nowrap}
.cl-card{position:relative}
.cl-quick-del{position:absolute;top:12px;right:40px;width:34px;height:34px;border:1px solid #EAECF0;border-radius:8px;background:#fff;color:#B42318;font-size:15px;cursor:pointer;display:grid;place-items:center}
.cl-quick-del:hover{background:#FEF3F2;border-color:#FDA29B}
.cl-head{padding-right:84px!important}
.cl-ord-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:6px}
.cl-ord-head h4{margin:0}
.cl-new-order{height:36px;padding:0 14px}
.clm select{width:100%;height:42px;border:1px solid #D0D5DD;border-radius:10px;padding:0 10px;font-size:15px;background:#fff}
.cl-guess{display:flex;flex-wrap:wrap;align-items:center;gap:8px 10px;padding:8px 10px;border-radius:10px;background:#EEF4FF;font-size:13.5px;color:#1D2939}
.cl-guess .cl-av{width:34px;height:34px;flex:none}
.cl-guess button{height:32px;padding:0 12px}
.cl-fiche>.cl-empty{grid-column:1/-1;margin:0}
/* Contacts : documents obligatoires des sous-traitants + import */
.cl-dbadge{font-style:normal;font-weight:700}
.cl-dbadge.is-bad{color:#B42318}.cl-dbadge.is-soon{color:#B4541B}.cl-dbadge.is-ok{color:#137A3B}
.cl-docs{margin:14px 0}
.cl-docs h4 small{font-weight:400;color:#5B6B7D}
.cl-dtable td{vertical-align:middle}
.cl-dtable .ok{color:#137A3B;font-weight:700}.cl-dtable .soon{color:#B4541B;font-weight:700}.cl-dtable .bad{color:#B42318;font-weight:700}.cl-dtable .none{color:#8A96A3}
.cl-req{font-style:normal;font-size:11px;color:#B4541B;margin-left:4px}
.cl-dtable button{height:30px;padding:0 10px}
.cl-dlink{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:10px 0;padding:10px;border:1px dashed #C9D1DB;border-radius:12px;background:#F8FAFC}
.cl-dlink span{flex:1 1 100%;font-size:13px;color:#5B6B7D}
.cl-dlink input{flex:1 1 220px;min-width:0;height:36px;font-size:12px}
.cl-dlink button{height:36px;padding:0 12px}
.cl-dform{display:flex;flex-wrap:wrap;align-items:flex-end;gap:8px;margin:8px 0}
.cl-dform select{flex:1 1 220px;height:38px}
.cl-dform label{display:flex;flex-direction:column;font-size:12px;color:#5B6B7D;gap:3px}
.cl-dform input[type=date]{height:38px}
.cl-dform input[type=file]{flex:1 1 200px;min-width:0;font-size:13px}
.cl-dform button{height:38px}
.cl-dall summary{cursor:pointer;font-size:13px;font-weight:700;margin:8px 0}
.cl-dall li button{height:28px;padding:0 9px}
@media (max-width:640px){.cl-dform>*{flex:1 1 100%}.cl-dform label{flex:1 1 45%}.cl-dlink button{flex:1 1 45%}}
.pc-dossier{margin-top:16px}
/* Ouvrir mon compte fournisseur */
.pc-cardwrap{display:flex;flex-direction:column;gap:6px}
.pc-cardwrap .pc-card{flex:1}
.pc-site{display:block;text-align:center;padding:8px 10px;border:1px solid #C9D1DB;border-radius:10px;font-size:13px;font-weight:700;color:#0F1F33;text-decoration:none;background:#fff}
.pc-site:hover{background:#F4F6F9}
.cl-ord-head .cl-site{margin-left:auto;display:inline-flex;align-items:center;height:36px;padding:0 12px;border:1px solid #C9D1DB;border-radius:10px;font-weight:700;font-size:13px;color:#0F1F33;text-decoration:none;background:#fff}
@media (max-width:640px){.cl-ord-head{flex-wrap:wrap}.cl-ord-head h4{flex:1 1 100%}.cl-ord-head .cl-site{margin-left:0}}
/* Chantier › Dossier */
.gc-dos{padding:16px}
.gdo-head{display:flex;gap:14px;align-items:flex-start;justify-content:space-between;flex-wrap:wrap}
.gdo-head h4{margin:0 0 4px}.gdo-head h4 small{font-weight:400;color:#5B6B7D}
.gdo-drop{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-width:200px;padding:12px 16px;border:2px dashed #9FB0C4;border-radius:12px;cursor:pointer;background:#F8FAFC;color:#0F1F33}
.gdo-drop small{color:#5B6B7D;font-size:12px}
.gdo-drop:hover{background:#EEF3F8}
.gdo-folders{display:flex;flex-direction:column;gap:8px;margin-top:12px}
.gdo-folder{border:1px solid #E2E6EC;border-radius:12px;background:#fff}
.gdo-folder summary{display:flex;justify-content:space-between;align-items:center;padding:12px 14px;cursor:pointer;font-weight:700;list-style:none}
.gdo-folder summary::-webkit-details-marker{display:none}
.gdo-folder summary::before{content:'📁';margin-right:8px}
.gdo-folder summary span{flex:1}
.gdo-folder summary em{font-style:normal;background:#EEF1F5;border-radius:999px;padding:2px 10px;font-size:12px}
.gdo-folder ul{list-style:none;margin:0;padding:0 10px 10px}
.gdo-folder>.gc-hint{padding:0 14px 12px;margin:0}
.gdo-item{display:flex;align-items:center;gap:10px;padding:9px 4px;border-top:1px solid #EEF1F5}
.gdo-ic{font-size:20px}
.gdo-main{flex:1;min-width:0;display:flex;flex-direction:column}
.gdo-main b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px}
.gdo-main small{color:#5B6B7D;font-size:12px}
.gdo-src{font-style:normal;margin-left:6px;padding:1px 7px;border-radius:999px;background:#EEF1F5;color:#5B6B7D}
.gdo-src.is-mail{background:#E8F0FB;color:#1F4E9A}.gdo-src.is-sign{background:#E9F8EF;color:#137A3B}
.gdo-acts{display:flex;gap:6px;align-items:center;flex-wrap:wrap;justify-content:flex-end}
.gdo-acts button{height:32px;padding:0 10px}.gdo-acts select{height:32px;max-width:150px;font-size:12px}
.gdo-pending{border:1px solid #F3C98B;background:#FFF8EC;border-radius:12px;padding:12px;margin-bottom:12px}
.gdo-prow{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-top:8px}
.gdo-prow>span{flex:1 1 220px;display:flex;flex-direction:column;min-width:0}.gdo-prow small{color:#5B6B7D}
.gdo-prow select,.gdo-prow button{height:36px}
.clm-att{margin:4px 0;font-size:13px;font-weight:700}
.gsg{max-width:760px}
.gsg-nav{display:flex;gap:10px;align-items:center;justify-content:center;margin:6px 0}
.gsg-page{position:relative;max-height:52vh;overflow:auto;border:1px solid #E2E6EC;border-radius:10px;background:#F4F6F9}
.gsg-page img{display:block;width:100%;cursor:crosshair}
.gsg-mark{position:absolute;transform:translate(-50%,-50%);padding:10px 26px;border:2px dashed #E86A1A;background:rgba(232,106,26,.12);color:#B4541B;font-weight:700;font-size:12px;border-radius:8px;pointer-events:none;white-space:nowrap}
.gsg-pad{display:block;width:100%;height:140px;border:1px solid #C9D1DB;border-radius:10px;background:#fff;touch-action:none}
.gsg-clear{margin-top:6px}
.gsg-chk{display:flex;gap:8px;align-items:center;font-weight:400}
.gsg-actions{display:flex;justify-content:flex-end;margin-top:10px}
@media (max-width:640px){.gdo-item{flex-wrap:wrap}.gdo-acts{flex:1 1 100%;justify-content:flex-start}.gdo-drop{flex:1 1 100%}.gsg-page{max-height:45vh}}
.pcd-al{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:8px 0}
.pcd-al a{display:inline-flex;align-items:center;height:36px;padding:0 12px;border:1px solid #C9D1DB;border-radius:10px;font-weight:700;font-size:13px;color:#0F1F33;text-decoration:none;background:#fff}
.pcd-al small{color:#5B6B7D;flex:1 1 220px}
.pcd-site{display:inline-flex;align-items:center;height:30px;padding:0 10px;border:1px solid #C9D1DB;border-radius:9px;font-size:12px;font-weight:700;color:#0F1F33;text-decoration:none;background:#fff;white-space:nowrap}
/* Carte PRO › Mes comptes en ligne */
.pca-h{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}
.pca-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:8px;margin-top:10px}
.pca-tile{display:flex;align-items:center;gap:10px;padding:10px 12px;border:1px solid #E2E6EC;border-radius:12px;background:#fff;color:#0F1F33;text-decoration:none;min-width:0}
.pca-tile:hover{background:#F4F6F9;border-color:#C9D1DB}
.pca-tile img{width:22px;height:22px;border-radius:5px;flex:0 0 22px}
.pca-tile span{flex:1;min-width:0;display:flex;flex-direction:column}
.pca-tile b{font-size:13.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pca-tile small{font-size:11.5px;color:#5B6B7D;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pca-tile em{font-style:normal;color:#5B6B7D}
.pca-edit{display:flex;flex-direction:column;gap:8px;margin-top:10px}
.pca-row{display:grid;grid-template-columns:1fr 1.3fr 1.5fr auto;gap:6px;align-items:center}
.pca-row input{height:36px;min-width:0}
.pca-actions{display:flex;gap:8px;justify-content:flex-end;flex-wrap:wrap;margin-top:10px}
@media (max-width:640px){.pca-row{grid-template-columns:1fr 1fr;padding-bottom:8px;border-bottom:1px solid #EEF1F5}.pca-row input[data-k="login"]{grid-column:1/2}.pca-grid{grid-template-columns:1fr 1fr}}
.gdo-hbtns{display:flex;gap:8px;flex-wrap:wrap}
.gdo-pdf{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-width:180px;padding:12px 16px;height:auto;border-radius:12px;font-weight:700}
.gdo-pdf small{font-weight:400;color:#5B6B7D;font-size:12px}
@media (max-width:640px){.gdo-hbtns{flex:1 1 100%}.gdo-hbtns>*{flex:1 1 45%;min-width:0}}
.pcr-h{margin-top:22px;padding-top:16px;border-top:1px solid #E2E6EC}
.pcr-refs li{font-size:13px}
.pcr-actions{display:flex;justify-content:flex-end;margin-top:10px}
/* Connexion téléphone : profils en 2 × 2, jamais coupés, même avec un texte agrandi par le système */
#login-modal #login-form #login-roles{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;height:auto!important;max-height:none!important;overflow:visible!important}
#login-modal #login-form #login-roles button{height:auto!important;min-height:44px!important;max-height:none!important;overflow:visible!important}
@media (max-width:520px){#login-modal #login-form #login-roles{grid-template-columns:repeat(2,minmax(0,1fr))!important}#login-modal #login-form #login-roles button{border-left:0!important;border-top:1px solid #C3C8CF}#login-modal #login-form #login-roles button:nth-child(2n){border-left:1px solid #C3C8CF!important}#login-modal #login-form #login-roles button:nth-child(-n+2){border-top:0}}
#login-modal #login-form #login-error{height:auto!important;max-height:none!important;overflow:visible!important}
/* La carte de connexion a une hauteur fixe sur téléphone : ses éléments ne doivent jamais être écrasés
   (ils se chevauchaient : profils, bouton, message d'erreur). La carte défile à la place. */
/* La carte de connexion (grille) a une hauteur fixe sur téléphone : avec min-height:0 ses lignes s'écrasaient
   et les éléments se chevauchaient. Chaque élément garde au moins la hauteur de son contenu ; la carte défile. */
#login-modal.modal{overflow-y:auto!important;align-items:start!important}
#login-modal #login-form{display:flex!important;flex-direction:column;height:auto!important;max-height:none!important;overflow:visible!important}
#login-modal #login-form > *{flex-shrink:0!important}
#login-modal #login-form #login-roles,#login-modal #login-form #login-error{min-height:min-content!important}
#login-modal #login-form [hidden]{display:none!important}
/* Envois en attente (chantier sans réseau) */
#outbox-badge{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(76px + env(safe-area-inset-bottom,0px));z-index:9000;padding:10px 16px;border:0;border-radius:999px;background:#B4541B;color:#fff;font-weight:700;font-size:14px;box-shadow:0 6px 20px rgba(0,0,0,.25);cursor:pointer}
@media (min-width:900px){#outbox-badge{bottom:20px}}
/* Export comptable */
.compta-btn{margin-left:auto;height:38px;padding:0 14px;white-space:nowrap}
.cpx-presets{display:flex;flex-wrap:wrap;gap:6px}
.cpx-presets button{height:34px;padding:0 12px}
.cpx-presets button[aria-pressed="true"]{background:#0F1F33;color:#fff;border-color:#0F1F33}
.cpx-dates{display:flex;gap:10px}.cpx-dates label{flex:1}
.cpx-files{display:flex;flex-direction:column;gap:8px}
.cpx-files button{display:flex;flex-direction:column;align-items:flex-start;gap:2px;height:auto;padding:10px 14px;text-align:left;font-weight:700}
.cpx-files button small{font-weight:400;opacity:.8}
/* Chantier › Décompte final (DGD) */
.gc-dgd{padding:16px}
.dgd-head h4{margin:0 0 4px}
.dgd-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:10px}
.dgd-card{border:1px solid #E2E6EC;border-radius:12px;padding:14px;background:#fff;display:flex;flex-direction:column;gap:6px}
.dgd-card h5{margin:8px 0 4px;font-size:13px;text-transform:uppercase;letter-spacing:.04em;color:#5B6B7D}
.dgd-card h5:first-child{margin-top:0}
.dgd-r{display:flex;justify-content:space-between;gap:10px;font-size:14px;padding:3px 0}
.dgd-r span{min-width:0}.dgd-r b{white-space:nowrap}
.dgd-r i{font-style:normal;font-size:11.5px;margin-left:6px}.dgd-r i.ok{color:#137A3B}.dgd-r i.no{color:#B42318}
.dgd-r.is-total{border-top:1px solid #E2E6EC;padding-top:7px;font-weight:700}
.dgd-r.is-due{font-size:16px;font-weight:800;color:#0F1F33;background:#EEF4FB;border-radius:8px;padding:8px}
.dgd-form label{display:flex;flex-direction:column;gap:3px;font-size:13px;font-weight:600}
.dgd-form label small{font-weight:400;color:#5B6B7D}
.dgd-form input,.dgd-form select{height:38px}
.dgd-deds{display:flex;flex-direction:column;gap:6px;font-size:13px;font-weight:600}
.dgd-ded{display:grid;grid-template-columns:1.6fr 1fr;gap:6px}
.dgd-sum{margin-top:8px;border-top:2px solid #0F1F33;padding-top:8px}
.dgd-actions{display:flex;gap:8px;justify-content:flex-end;margin-top:8px}
@media (max-width:760px){.dgd-grid{grid-template-columns:1fr}}
.cpx-bar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:4px 0 10px}
.cpx-bar button{height:38px;padding:0 14px}
.cpx-bar small{color:#5B6B7D}
/* Avancement sur plan : légende en mots + couleurs */
.pp-legend{display:flex;flex-wrap:wrap;gap:6px 12px;padding:6px 2px 8px;font-size:12px;font-weight:600;color:#1D2D3E}
.pp-legend span{display:inline-flex;align-items:center;gap:6px}
.pp-legend i{width:14px;height:14px;border-radius:3px;display:inline-block;border:1.5px solid}
.pp-legend i.is-done{background:rgba(22,163,74,.35);border-color:#15803D}
.pp-legend i.is-part{background:rgba(217,119,6,.3);border-color:#B45309}
.pp-legend i.is-prop{background:rgba(234,88,12,.22);border-color:#EA580C;border-style:dashed}
.erc-tests{border:1px solid #E2E6EC;border-radius:10px;padding:10px 12px;margin-bottom:10px;font-size:13px}
.erc-tests.is-ok{background:#E9F8EF;border-color:#A6E3BC}.erc-tests.is-bad{background:#FFF4EC;border-color:#F3C98B}
.erc-tests span{color:#B42318;font-weight:700}.erc-tests ul{margin:6px 0 0;padding-left:18px;max-height:180px;overflow:auto}
/* Plan : nom court sous chaque outil de la colonne de gauche (écran large) */
#plan-measure-modal.pmx .pmx-rail .pm-tool .pmx-lbl{display:none;font-style:normal}
@media (min-width:700px){
#plan-measure-modal.pmx .pmx-rail .pm-tool:has(.pmx-lbl){width:68px!important;min-width:68px!important;max-width:68px!important;overflow:hidden;height:auto!important;min-height:42px!important;padding:5px 2px 4px!important;gap:2px;grid-auto-flow:row}
#plan-measure-modal.pmx .pmx-rail .pm-tool .pmx-lbl{display:block;max-width:64px;overflow:hidden;text-overflow:ellipsis;font-size:9.5px;line-height:1.1;font-weight:700;letter-spacing:-.01em;white-space:nowrap;color:inherit}
}
/* Trait exact : bouton Quitter bien visible */
#pm-seg-bar .pm-seg-exit{background:#fff;border:1px solid #D0D5DD;color:#B42318}

/* Colonne d'outils : jamais coupée au bord gauche ; le bouton « ‹ » ne recouvre plus « Échelle » */
@media (min-width:700px){#plan-measure-modal.pmx .pmx-rail{left:10px!important;transform:none!important;align-items:stretch}
#plan-measure-modal.pmx .pmx-rail>.pmx-grp{align-items:center}
#plan-measure-modal.pmx .pmx-rail>.pmx-rail-tg{position:static!important;margin:0 0 4px;align-self:flex-start}}
/* Viseur de mesure bien visible sur fond clair ET sur fond noir : jaune vif cerné de noir, plus épais */
#plan-cad-overlay .cad-xh,body:has(.plan-measure-canvas-wrap.is-cad-dark) #plan-cad-overlay .cad-xh{stroke:#FACC15!important;stroke-width:1.6!important;opacity:1!important;filter:drop-shadow(0 0 1px rgba(0,0,0,.95)) drop-shadow(0 0 1px rgba(0,0,0,.95))}
#plan-cad-overlay .cad-pick,body:has(.plan-measure-canvas-wrap.is-cad-dark) #plan-cad-overlay .cad-pick{stroke:#FACC15!important;stroke-width:2!important;filter:drop-shadow(0 0 1px rgba(0,0,0,.95))}
#plan-cad-overlay .cad-hl,body:has(.plan-measure-canvas-wrap.is-cad-dark) #plan-cad-overlay .cad-hl{stroke:#22D3EE!important;stroke-width:5!important;opacity:.95!important;filter:drop-shadow(0 0 2px rgba(0,0,0,.9))}
/* Barre du trait choisi : en bas, au-dessus de la barre de zoom — le haut du dessin (titres) reste visible */
#pm-seg-bar{top:auto!important;bottom:78px!important}
@media (max-width:700px){#pm-seg-bar{bottom:calc(84px + env(safe-area-inset-bottom,0px))!important}}
/* Nombre de quantités sur le bouton du panneau de droite */
#plan-measure-toggle-list{position:relative}
#plan-measure-toggle-list[data-n]:not([data-n="0"])::after{content:attr(data-n);position:absolute;top:-4px;right:-6px;min-width:17px;height:17px;padding:0 4px;border-radius:9px;background:#1640D6;color:#fff;font-size:10.5px;font-weight:800;line-height:17px;text-align:center}
/* Plan simplifié : outils secondaires sous « Plus », réglages de dessin repliés */
#plan-measure-modal.pmx .pmx-rail .pmx-more[hidden]{display:none!important}
#plan-measure-modal.pmx .pmx-rail .pmx-more-tg.is-on{background:#E8EEFF!important;color:#1640D6!important}
#plan-measure-modal.pmx .pmx-rail .pmx-more-tg svg{fill:currentColor;stroke:none}
#plan-measure-modal.pmx .pmx-set.is-folded>*:not(.pmx-set-tg){display:none!important}
#plan-measure-modal.pmx .pmx-set-tg.is-on{background:#E8EEFF;color:#1640D6}
#plan-measure-modal.pmx .pmx-set-tg svg{fill:none;stroke:currentColor;stroke-width:1.8}
/* Plan › résumé en tête du panneau de droite */
.pms{margin:12px 12px 10px;border:2px solid #0F1F33;border-radius:12px;padding:12px 14px;background:#fff}
.pms h4{margin:0 0 8px;font-size:14px;text-transform:uppercase;letter-spacing:.04em;color:#0F1F33}
.pms-r{display:flex;justify-content:space-between;align-items:flex-start;gap:10px;padding:6px 0;border-top:1px solid #EEF1F5;font-size:14px}
.pms-r:first-of-type{border-top:0}
.pms-r span{display:flex;flex-direction:column;min-width:0}
.pms-r small{color:#667085;font-size:11.5px;font-weight:400}
.pms-r b{white-space:nowrap;font-size:15px}
.pms-r.is-neg b{color:#B42318}
.pms-r.is-main{background:#EEF4FB;border-radius:8px;padding:8px;border-top:0;margin-top:2px}
.pms-r.is-main b{font-size:18px;color:#1640D6}
.pms-warn{margin:8px 0 0;padding:8px 10px;border-radius:8px;background:#FFF4EC;color:#9A3412;font-size:12.5px;line-height:1.4}
.pms-ok{margin:8px 0 0;color:#137A3B;font-size:12.5px;font-weight:700}
.pms-more{margin:10px 12px;border:1px solid #E4E7EC;border-radius:10px;background:#fff}
.pms-more summary{cursor:pointer;padding:10px 12px;font-weight:700;font-size:13px;color:#344054}
.pms-fac{margin-top:10px;border-top:1px solid #E4E7EC;padding-top:8px}
.pms-fac-h{font-weight:800;font-size:13px;margin-bottom:6px}.pms-fac-h small{font-weight:400;color:#667085}
.pms-fac table{width:100%;border-collapse:collapse;font-size:12.5px}
.pms-fac th{text-align:right;font-weight:700;color:#475467;padding:4px 3px;border-bottom:1px solid #E4E7EC;font-size:11.5px}
.pms-fac th:first-child,.pms-fac td:first-child{text-align:left}
.pms-fac td{text-align:right;padding:6px 3px;border-bottom:1px solid #F2F4F7;vertical-align:top;white-space:nowrap}
.pms-fac td:first-child{white-space:normal}
.pms-fac td small{display:block;color:#667085;font-size:11px;font-weight:400}
.pms-fac tfoot td{font-weight:800;border-top:2px solid #0F1F33;border-bottom:0}
.pms-note{display:block;margin-top:6px;color:#667085;font-size:11px;line-height:1.35}
.pms-w{display:flex;align-items:center;gap:6px;margin-top:4px;font-size:11.5px;color:#344054}.pms-w input{width:90px;height:28px;padding:0 6px;font-size:12.5px}

/* Plusieurs devis par chantier + acompte par devis */
#devis-builder-view .dz-supp select{margin-top:6px;font-size:12px;padding:4px 6px;border:1px solid #D0D5DD;border-radius:6px;background:#fff;max-width:100%}
#devis-builder-view .dz-dep{display:inline-flex;align-items:center;gap:6px;margin-top:8px;font-size:12.5px;color:#0B1F3A}
#devis-builder-view .dz-dep select{font-size:12.5px;padding:4px 6px;border:1px solid #D0D5DD;border-radius:6px;background:#fff}
#devis-builder-view .dz-dep[hidden]{display:none}

/* Mentions obligatoires (Réglages documents) */
#ds-legal-check{border-radius:10px;padding:10px 14px;margin:0 0 14px;font-size:13px;line-height:1.45}
#ds-legal-check.is-missing{background:#FFF7E6;border:1px solid #F5C26B;color:#7A4B00}
#ds-legal-check.is-ok{background:#ECFDF3;border:1px solid #A6E3BE;color:#066A38}
#ds-legal-check ul{margin:6px 0 6px 18px;padding:0}
#ds-legal-check small{color:#8A6A2E}

/* Statistiques : comparaison an dernier + trésorerie */
.stk.stc,.stk.stt{margin-top:14px}
.stc h4 small{font-weight:500;color:#667085;font-size:12px}
.stc-head,.stc-row{display:grid;grid-template-columns:1.6fr 1fr 1fr .9fr;gap:8px;align-items:center;padding:7px 0;border-bottom:1px solid #EEF0F4;font-size:13.5px}
.stc-head{font-size:11.5px;color:#667085;text-transform:uppercase;letter-spacing:.03em}
.stc-row b{font-variant-numeric:tabular-nums}.stc-row em{font-style:normal;color:#667085;font-variant-numeric:tabular-nums}
.stc-up{color:#067647;font-weight:700}.stc-down{color:#B42318;font-weight:700}.stc-na{color:#98A2B3}
.stt-row{display:flex;justify-content:space-between;gap:12px;padding:8px 0;border-bottom:1px solid #EEF0F4;font-size:14px}
.stt-row span small{display:block;color:#667085;font-size:12px}
.stt-row b{font-variant-numeric:tabular-nums;white-space:nowrap}
.stt-row.is-in b{color:#067647}.stt-row.is-out b{color:#B42318}
.stt-total{border-bottom:0;border-top:2px solid #0B1F3A;font-weight:700;font-size:15px}
.stt-total.is-neg b{color:#B42318}
.stt-note{color:#667085;font-size:12px;margin:8px 0 0}
@media (max-width:640px){.stc-head{display:none}.stc-row{grid-template-columns:1fr 1fr;row-gap:2px}.stc-row span{grid-column:1/-1;font-weight:600}}
/* Statistiques : encadrés comparaison / trésorerie alignés sur les cartes */
#st-root .stk.stc,#st-root .stk.stt{margin:14px 16px 0}
#st-root .stc-head,#st-root .stc-row,#st-root .stt-row{padding-left:14px;padding-right:14px}
#st-root .stt-note{padding:0 14px 12px}
#st-root .stc-row:last-child,#st-root .stt-total{border-bottom:0}
#st-root .stk.stt{margin-bottom:18px}

/* Paiements salariés : origine du dû et alertes par mois */
.pa-flags{display:flex;flex-wrap:wrap;gap:4px;margin-top:4px}
.pa-src,.pa-warn{font-style:normal;font-size:11px;line-height:1.5;padding:0 6px;border-radius:999px;white-space:nowrap}
.pa-src{background:#F2F4F7;color:#475467}.pa-src.is-slip{background:#EEF4FF;color:#3538CD}
.pa-warn{background:#FEF0C7;color:#93370D}
/* Repères du mois : retour à la ligne, jamais coupés */
.pa-flags{flex-direction:column;align-items:flex-start}
.pa-src,.pa-warn{white-space:normal;max-width:100%}

/* Comparer deux versions d'un plan */
.pcmp .pcmp-box{width:min(1200px,96vw);max-height:94vh;display:flex;flex-direction:column}
.pcmp-bar{display:flex;flex-wrap:wrap;gap:10px 14px;align-items:flex-end;padding:10px 16px}
.pcmp-bar label{display:flex;flex-direction:column;gap:4px;font-size:12px;color:#475467}
.pcmp-bar select{min-width:260px;max-width:100%}
.pcmp-bar select,.pcmp-bar input[type=number]{padding:6px 8px;border:1px solid #D0D5DD;border-radius:8px;font-size:13px;background:#fff}
.pcmp-bar input[type=number]{width:70px}
.pcmp-bar .pcmp-chk{flex-direction:row;align-items:center;gap:6px;font-size:13px;color:#101828}
.pcmp-legend{display:flex;flex-wrap:wrap;gap:14px;padding:0 16px 8px;font-size:12.5px}
.pcmp-legend .is-del{color:#DC2626}.pcmp-legend .is-add{color:#16A34A}.pcmp-legend .is-same{color:#98A2B3}
.pcmp-qty{margin:0 16px 8px;border-collapse:collapse;font-size:13px;min-width:min(520px,100%)}
.pcmp-qty th,.pcmp-qty td{padding:5px 10px;border-bottom:1px solid #EAECF0;text-align:right}
.pcmp-qty th:first-child,.pcmp-qty td:first-child{text-align:left}
.pcmp-qty td.is-add{color:#16A34A;font-weight:700}.pcmp-qty td.is-del{color:#DC2626;font-weight:700}
.pcmp-zoom{display:flex;gap:6px;align-items:center;padding:0 16px 8px}
.pcmp-zoom button{border:1px solid #D0D5DD;background:#fff;border-radius:6px;padding:4px 10px;cursor:pointer}
.pcmp-zoom small{color:#475467;margin-left:8px}
.pcmp-view{flex:1;overflow:auto;margin:0 16px 16px;border:1px solid #EAECF0;border-radius:8px;background:#fff;min-height:240px}
.pcmp-view img{display:block;width:100%;height:auto}
.pcmp-hint{padding:18px;color:#475467}.pcmp-hint.is-err{color:#B42318}

/* Surface nette de bardage + matériaux */
#pm-net-panel{position:absolute;right:12px;top:12px;z-index:8;width:min(470px,calc(100% - 24px));max-height:calc(100% - 24px);overflow:auto;padding:12px 14px;border-radius:12px;background:#fff;border:1px solid #E4E7EC;box-shadow:0 12px 32px rgba(16,24,40,.2);font-size:13px;color:#344054}
#pm-net-panel header{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}
#pm-net-panel header b{font-size:15px;color:#101828}
#pm-net-panel header button{border:0;background:none;font-size:20px;cursor:pointer;color:#667085}
.pn-step{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:8px 0}
.pn-step>span{width:100%;font-weight:600;color:#101828}
.pn-sw{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.pn-chip{display:inline-flex;align-items:center;gap:4px;border:1px solid #D0D5DD;border-radius:999px;padding:2px 8px 2px 3px;background:#fff;cursor:pointer;font-size:12px}
.pn-chip i{width:18px;height:18px;border-radius:50%;border:1px solid #98A2B3;display:inline-block}
.pn-link{border:0;background:none;color:#1D4ED8;cursor:pointer;font-weight:600}
.pn-tab{width:100%;border-collapse:collapse;margin-top:6px}
.pn-tab th,.pn-tab td{padding:6px 5px;border-bottom:1px solid #EAECF0;text-align:right;vertical-align:top}
.pn-tab th:nth-child(2),.pn-tab td:nth-child(2){text-align:left}
.pn-tab td small{display:block;color:#667085;font-size:11px}
.pn-tab .pn-big{color:#B54708}
.pn-tab tr.is-off td{opacity:.45}
.pn-tab .pn-name{width:100%;border:1px solid transparent;border-radius:4px;padding:1px 3px;font:inherit;color:#101828}
.pn-tab .pn-name:hover,.pn-tab .pn-name:focus{border-color:#D0D5DD}
.pn-tab select{font-size:12px;padding:2px;border:1px solid #D0D5DD;border-radius:4px}
.pn-tab tfoot td{border-bottom:0;font-weight:600}
.pn-w{display:flex;align-items:center;gap:6px;margin-top:8px}
.pn-w input{width:70px;padding:3px 6px;border:1px solid #D0D5DD;border-radius:6px}
.pn-note{color:#475467;font-size:12px;margin:8px 0}
.pn-note i{display:inline-block;width:10px;height:10px;border-radius:2px;margin:0 4px 0 2px;vertical-align:-1px}
.pn-g{background:rgba(22,163,74,.6)}.pn-r{background:rgba(220,38,38,.6)}
.pn-act{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end}
.pmat .pmat-box{width:min(760px,96vw);max-height:92vh;overflow:auto}
.pmat-hyp{display:flex;flex-wrap:wrap;gap:8px 14px;align-items:center;padding:10px 16px;background:#F9FAFB;border-bottom:1px solid #EAECF0;font-size:13px}
.pmat-hyp b{width:100%}
.pmat-hyp input:not([type=checkbox]){width:60px;padding:3px 6px;border:1px solid #D0D5DD;border-radius:6px;margin:0 3px}
.pmat-hyp small{width:100%;color:#667085}
.pmat-tab{width:calc(100% - 32px);margin:10px 16px;border-collapse:collapse;font-size:13.5px}
.pmat-tab th,.pmat-tab td{padding:7px 6px;border-bottom:1px solid #EAECF0;text-align:left;vertical-align:top}
.pmat-tab td:nth-child(2){white-space:nowrap}
.pmat-tab small{color:#667085}
.pmat-act{display:flex;gap:8px;justify-content:flex-end;padding:0 16px 16px}
@media (max-width:640px){#pm-net-panel{top:auto;bottom:8px;max-height:60%}}
/* ===== Plan : Annoter (nuage, flèche, texte, tampon) ===== */
#plan-measure-modal.pmx .pmx-gt{display:block;font-size:9px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:#667085;text-align:center;padding:2px 0 1px}
#plan-measure-modal.pm-dark .pmx-gt{color:#98A2B3}
.pa-panel{position:absolute;right:12px;top:12px;z-index:8;width:min(380px,calc(100% - 24px));max-height:calc(100% - 24px);overflow:auto;padding:12px 14px;border-radius:12px;background:#fff;border:1px solid #E4E7EC;box-shadow:0 12px 32px rgba(16,24,40,.2);font-size:13px;color:#344054}
.pa-panel header{display:flex;justify-content:space-between;align-items:center;margin-bottom:6px}
.pa-panel header b{font-size:15px;color:#101828}
.pa-panel header button{border:0;background:none;font-size:20px;cursor:pointer;color:#667085}
.pa-step{margin:10px 0}
.pa-step>span{display:block;font-weight:600;color:#101828;margin-bottom:6px}
.pa-tools,.pa-cols,.pa-stamps{display:flex;flex-wrap:wrap;gap:6px}
.pa-tool,.pa-col,.pa-stamp{border:1px solid #D0D5DD;background:#fff;border-radius:8px;padding:6px 10px;font:inherit;font-size:13px;cursor:pointer;color:#344054}
.pa-tool.is-on{background:#1640D6;border-color:#1640D6;color:#fff}
.pa-col{display:inline-flex;align-items:center;gap:6px}
.pa-col::before{content:"";width:12px;height:12px;border-radius:50%;background:var(--c)}
.pa-col.is-on{border-color:var(--c);box-shadow:0 0 0 2px var(--c) inset}
.pa-stamp{font-weight:800;font-size:11px;letter-spacing:.03em;color:var(--c);border-color:var(--c)}
.pa-stamp.is-on{background:var(--c);color:#fff}
.pa-hint{margin:6px 0 0;color:#475467;font-size:12px}
.pa-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}
.pa-list li{display:grid;grid-template-columns:22px 1fr;gap:4px 8px;align-items:start;padding:6px;border:1px solid #EAECF0;border-radius:8px}
.pa-list li>i{width:20px;height:20px;border-radius:50%;color:#fff;font-style:normal;font-weight:700;font-size:11px;display:grid;place-items:center}
.pa-list li small{display:block;color:#475467;word-break:break-word}
.pa-list li em{font-style:normal;color:#15803D;font-weight:600;font-size:12px}
.pa-list li.is-done{opacity:.6}
.pa-list li>span{grid-column:2;display:flex;gap:6px;flex-wrap:wrap}
.pa-list li>span button{border:1px solid #D0D5DD;background:#fff;border-radius:6px;padding:2px 8px;font-size:12px;cursor:pointer}
.pa-list li>span .pa-del{color:#B42318}
.pa-act{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end;margin-top:10px}
/* ===== Plan : Ouvrages types / Copier vers une page ===== */
.pot{position:fixed;inset:0;z-index:10000;display:grid;place-items:center;padding:16px;background:rgba(11,31,58,.45)}
.pot-box{width:min(1100px,100%);max-height:calc(100vh - 32px);display:flex;flex-direction:column;background:#fff;border-radius:12px;box-shadow:0 24px 60px rgba(11,31,58,.3);overflow:hidden}
.pot-box>header{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;border-bottom:1px solid #EAECF0}
.pot-box>header small{color:#667085}.pot-box>header h3{margin:0;font-size:18px;color:#101828}
.pot-q{display:flex;flex-wrap:wrap;gap:6px 16px;padding:10px 16px;background:#F5F8FF;border-bottom:1px solid #EAECF0;font-size:13px;color:#344054}
.pot-q>b{width:100%;color:#1640D6}
.pot-body{display:grid;grid-template-columns:220px 1fr;min-height:0;flex:1;overflow:hidden}
.pot-list{display:flex;flex-direction:column;gap:4px;padding:10px;border-right:1px solid #EAECF0;overflow:auto;background:#FCFCFD}
.pot-list button{text-align:left;border:1px solid transparent;background:none;border-radius:8px;padding:8px 10px;cursor:pointer;font:inherit;color:#344054}
.pot-list button small{display:block;color:#667085;font-size:12px}
.pot-list button.is-on{background:#EEF4FF;border-color:#C7D7FE;color:#1640D6}
.pot-list .pot-add{color:#1D4ED8;font-weight:600}
.pot-main{overflow:auto;padding:14px 16px;min-width:0}
.pot-name{display:flex;flex-direction:column;gap:4px;font-size:12px;color:#475467;margin-bottom:10px}
.pot-name input{font-size:16px;font-weight:600;padding:7px 10px;border:1px solid #D0D5DD;border-radius:8px;max-width:420px}
.pot-tw{overflow:auto}
.pot-t{width:100%;border-collapse:collapse;font-size:13px}
.pot-t th{text-align:left;font-size:11px;text-transform:uppercase;color:#667085;padding:6px 5px;border-bottom:1px solid #EAECF0;white-space:nowrap}
.pot-t td{padding:5px;border-bottom:1px solid #F2F4F7;vertical-align:top}
.pot-t textarea{width:100%;min-width:220px;font:inherit;padding:5px 7px;border:1px solid #D0D5DD;border-radius:6px;resize:vertical}
.pot-t input,.pot-t select{font:inherit;padding:5px 7px;border:1px solid #D0D5DD;border-radius:6px;background:#fff}
.pot-t .pot-u{width:52px}.pot-t .pot-n{width:72px;text-align:right}
.pot-t .pot-r{text-align:right;white-space:nowrap}
.pot-x{border:0;background:none;color:#B42318;cursor:pointer;font-size:15px}
.pot-help{color:#475467;font-size:12px;margin:8px 0}
.pot-foot{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:10px;margin-top:12px}
.pot-foot small{margin-right:auto;color:#667085}
.pot-tot{font-size:14px}
.pot-empty ol{padding-left:18px;line-height:1.6}
.pot-from label{display:flex;flex-direction:column;gap:4px;font-size:12px;color:#475467;margin:8px 0}
.pot-from select{padding:6px 8px;border:1px solid #D0D5DD;border-radius:8px;max-width:420px}
.pot-fl{display:flex;flex-direction:column;gap:2px;max-height:46vh;overflow:auto;border:1px solid #EAECF0;border-radius:8px;padding:6px}
.pot-fl label{display:grid!important;grid-template-columns:20px 1fr auto;gap:8px;align-items:start;flex-direction:row!important;margin:0!important;padding:5px;font-size:13px!important;color:#344054!important;border-radius:6px}
.pot-fl label:hover{background:#F9FAFB}
.pot-fl em{font-style:normal;color:#667085;white-space:nowrap}
.pcp-box{width:min(620px,100%)}
.pcp-in{padding:12px 16px;overflow:auto}
.pcp-to{display:flex;align-items:center;gap:8px;font-weight:600;color:#101828}
.pcp-to select{padding:6px 10px;border:1px solid #D0D5DD;border-radius:8px}
.pcp-note{background:#FFFAEB;border:1px solid #FEDF89;color:#93370D;border-radius:8px;padding:8px 10px;font-size:12px}
@media (max-width:720px){.pot-body{grid-template-columns:1fr}.pot-list{flex-direction:row;flex-wrap:wrap;border-right:0;border-bottom:1px solid #EAECF0}}
.pot-t td:nth-child(5){white-space:nowrap}
.pcp-to select{width:auto!important;flex:0 0 100px}
.pn-tab td small.pn-ex{color:#15803D;font-weight:600}
.pn-tab td small.pn-ap{color:#B54708}
.pn-q{margin:8px 0;padding:8px 10px;border-radius:8px;font-size:12px;line-height:1.45}
.pn-q-ok{background:#ECFDF3;border:1px solid #ABEFC6;color:#05603A}
.pn-q-warn{background:#FFFAEB;border:1px solid #FEDF89;color:#93370D}
.pn-q-bad{background:#FEF3F2;border:1px solid #FECDCA;color:#912018}
/* ===== Pages pleine largeur des outils du plan ===== */
.tp{position:fixed;inset:0;z-index:10001;background:#F2F4F7;overflow:auto;color:#344054;font-size:14px}
.tp-top{position:sticky;top:0;z-index:2;display:flex;flex-wrap:wrap;align-items:center;gap:12px 20px;padding:12px 24px;background:#fff;border-bottom:1px solid #E4E7EC;box-shadow:0 1px 3px rgba(16,24,40,.06)}
.tp-back{border:1px solid #D0D5DD;background:#fff;border-radius:8px;padding:8px 12px;font:inherit;font-weight:600;cursor:pointer;color:#344054}
.tp-back:hover{background:#F9FAFB}
.tp-ttl{min-width:220px;flex:1}
.tp-ttl h2{margin:0;font-size:19px;color:#101828}
.tp-ttl small{color:#667085}
.tp-kpis{display:flex;flex-wrap:wrap;gap:8px}
.tp-kpi{min-width:110px;padding:6px 12px;border:1px solid #E4E7EC;border-radius:10px;background:#F9FAFB}
.tp-kpi b{display:block;font-size:16px;color:#101828;font-variant-numeric:tabular-nums}
.tp-kpi small{color:#667085;font-size:11px}
.tp-kpi-main{background:#EEF4FF;border-color:#C7D7FE}.tp-kpi-main b{color:#1640D6}
.tp-tools{display:flex;align-items:center;gap:8px}
.tp-state{color:#667085;font-size:12px}
.tp-main{max-width:1320px;margin:0 auto;padding:20px 24px 60px;display:flex;flex-direction:column;gap:18px}
.tp-sec{background:#fff;border:1px solid #E4E7EC;border-radius:12px;padding:16px 18px}
.tp-sec h3{margin:0 0 4px;font-size:16px;color:#101828}
.tp-help{color:#475467;font-size:13px;margin:4px 0 12px;line-height:1.5}
.tp-form{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:12px}
.tp-form label,.tp-src{display:flex;flex-direction:column;gap:4px;font-size:12px;font-weight:600;color:#475467}
.tp-form select,.tp-form input,.tp-src input{font:inherit;font-weight:400;font-size:14px;padding:8px 10px;border:1px solid #D0D5DD;border-radius:8px;background:#fff;color:#101828}
.tp-src{max-width:560px;margin-bottom:12px}
.tp-tw{overflow:auto;border:1px solid #E4E7EC;border-radius:8px}
.tp-t{width:100%;border-collapse:collapse;font-size:13px;font-variant-numeric:tabular-nums}
.tp-t th{background:#F9FAFB;text-align:left;font-size:11px;font-weight:600;color:#475467;padding:8px 10px;border-bottom:1px solid #E4E7EC;border-right:1px solid #F2F4F7;white-space:nowrap;vertical-align:bottom}
.tp-t td{padding:6px 10px;border-bottom:1px solid #F2F4F7;border-right:1px solid #F2F4F7;vertical-align:top}
.tp-t .r{text-align:right}.tp-t .c{text-align:center}
.tp-t th.tp-g,.tp-t td.tp-g{background:#F5F8FF}.tp-t th.tp-g2,.tp-t td.tp-g2{background:#FFFAEB}
.tp-t input{width:86px;font:inherit;text-align:right;padding:5px 7px;border:1px solid #D0D5DD;border-radius:6px;color:#1640D6;background:#fff}
.tp-t input.tp-name{width:170px;text-align:left;color:#101828;font-weight:600}
.tp-t input::placeholder{color:#B54708;font-style:italic}
.tp-t td small{display:block;color:#667085;font-size:11px}
.tp-t tfoot td{background:#F9FAFB;font-weight:700;color:#101828;border-top:2px solid #E4E7EC}
.tp-res td b{color:#101828}
.tp-t tr.tp-bad td{background:#FEF3F2}
.tp-err{color:#B42318;font-size:12px;margin-top:4px;max-width:340px}
.tp-x{border:0;background:none;color:#B42318;cursor:pointer;font-size:15px}
.tp-empty{text-align:center;color:#667085;padding:18px!important}
.tp-row{display:flex;flex-wrap:wrap;gap:16px;margin-top:10px}
.tp-rules{margin:0;padding-left:18px;line-height:1.6}
.tp-src-list{font-size:12px;color:#667085;margin-top:12px}
.tp-warn{color:#B54708;font-weight:600}
@media (max-width:720px){.tp-top{padding:10px 16px}.tp-main{padding:14px 16px 40px}}
@media print{body>*:not(.tp){display:none!important}.tp{position:static;overflow:visible;background:#fff}.tp-top{position:static;box-shadow:none}.tp-back,.tp-tools,.pn-link,.tp-x{display:none!important}.tp-sec{break-inside:avoid;border:0;padding:8px 0}.tp-t input{border:0;color:#101828}}
/* ===================== Écran du plan « pm3 » : plein écran, étapes, tuiles ===================== */
#plan-measure-modal.pmx.pmx2.pm3{position:fixed!important;inset:0!important;z-index:9000;background:#0B1220!important;padding:0!important}
#plan-measure-modal.pmx.pmx2.pm3 .plan-measure-card{position:fixed!important;inset:0!important;width:100vw!important;height:100dvh!important;max-width:none!important;max-height:none!important;margin:0!important;border-radius:0!important;transform:none!important;padding:0!important;display:flex!important;flex-direction:column!important;background:#0B1220!important;border:0!important;box-shadow:none!important;overflow:hidden!important}
/* En-tête sombre, en relief */
#plan-measure-modal.pmx.pmx2.pm3 .worker-detail-header{flex:0 0 auto;margin:0!important;padding:10px 16px!important;min-height:60px;background:linear-gradient(180deg,#152038,#101A2E)!important;border-bottom:1px solid #22304D!important;box-shadow:0 6px 18px rgba(0,0,0,.35);color:#E6EAF2!important;position:relative;z-index:8;gap:12px!important}
#plan-measure-modal.pmx.pmx2.pm3 .worker-detail-header h2,#plan-measure-modal.pmx.pmx2.pm3 .worker-detail-header small,#plan-measure-modal.pmx.pmx2.pm3 .worker-detail-header p{color:#E6EAF2!important}
#plan-measure-modal.pmx.pmx2.pm3 .worker-detail-header button,#plan-measure-modal.pmx.pmx2.pm3 .worker-detail-header summary,#plan-measure-modal.pmx.pmx2.pm3 .pmx-head>*{color:#DCE4F5!important}
#plan-measure-modal.pmx.pmx2.pm3 .worker-detail-header button:not(.pmx-auto),#plan-measure-modal.pmx.pmx2.pm3 .worker-detail-header summary{background:linear-gradient(180deg,#1D2A47,#172238)!important;border:1px solid #2B3B5E!important;border-radius:10px!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.08),0 2px 6px rgba(0,0,0,.35)!important}
#plan-measure-modal.pmx.pmx2.pm3 .pmx-head,#plan-measure-modal.pmx.pmx2.pm3 .pmx-plans,#plan-measure-modal.pmx.pmx2.pm3 #plan-measure-page-nav{background:transparent!important;border-color:#2B3B5E!important;color:#DCE4F5!important}
#plan-measure-modal.pmx.pmx2.pm3 .pmx-auto{background:linear-gradient(180deg,#22C55E,#16A34A)!important;border:1px solid #15803D!important;color:#fff!important;border-radius:10px!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.35),0 4px 12px rgba(22,163,74,.45)!important}
#plan-measure-modal.pmx.pmx2.pm3 .pmx-steps,#plan-measure-modal.pmx.pmx2.pm3 .pm-guide,#plan-measure-modal.pmx.pmx2.pm3 .pmx-rail,#plan-measure-modal.pmx.pmx2.pm3 .pmx-tip,#plan-measure-modal.pmx.pmx2.pm3 .plan-measure-toolbar{display:none!important}
/* Corps : outils | plan | mesures */
#plan-measure-modal.pmx.pmx2.pm3 .plan-measure-body{flex:1 1 auto!important;min-height:0!important;height:auto!important;display:grid!important;grid-template-columns:252px minmax(0,1fr) auto!important;grid-template-rows:minmax(0,1fr)!important;gap:0!important;margin:0!important;padding:0!important;position:relative}
#plan-measure-modal.pmx.pmx2.pm3.pm3-min .plan-measure-body{grid-template-columns:0 minmax(0,1fr) auto!important}
#plan-measure-modal.pmx.pmx2.pm3 .plan-measure-canvas-wrap{grid-column:2;grid-row:1;background:radial-gradient(ellipse at center,#22304D 0%,#0B1220 78%)!important;border:0!important;border-radius:0!important;min-height:0!important;height:100%!important}
#plan-measure-modal.pmx.pmx2.pm3 .plan-measure-list-wrap{grid-column:3;grid-row:1;position:relative!important;inset:auto!important;top:auto!important;height:100%!important;max-height:none!important;width:340px!important;border-radius:0!important;border:0!important;border-left:1px solid #22304D!important;box-shadow:-6px 0 18px rgba(0,0,0,.3)!important;overflow:auto!important}
/* Colonne d'outils */
.pm3-rail{grid-column:1;grid-row:1;min-height:0;overflow:auto;padding:12px 12px 16px;display:flex;flex-direction:column;gap:14px;background:linear-gradient(180deg,#121B2F,#0E1627);border-right:1px solid #22304D;box-shadow:6px 0 18px rgba(0,0,0,.3);z-index:6;color:#E6EAF2}
#plan-measure-modal.pmx.pmx2.pm3-min .pm3-rail{display:none}
.pm3-hide{align-self:flex-end;display:inline-flex;align-items:center;gap:4px;border:1px solid #2B3B5E;background:#172238;color:#9FB0D0;border-radius:8px;padding:4px 9px;font:inherit;font-size:12px;font-weight:600;cursor:pointer}
.pm3-hide svg{width:14px;height:14px}
.pm3-show{position:absolute;left:12px;top:12px;z-index:7;display:none;align-items:center;gap:6px;padding:9px 14px;border-radius:10px;border:1px solid #3B82F6;background:linear-gradient(180deg,#22345E,#1A2A4D);color:#fff;font:inherit;font-weight:700;cursor:pointer;box-shadow:0 6px 16px rgba(0,0,0,.45)}
.pm3-show svg{width:18px;height:18px}
#plan-measure-modal.pmx.pmx2.pm3-min .pm3-show{display:inline-flex}
.pm3-steps{display:grid;grid-template-columns:repeat(4,1fr);gap:4px;background:#0B1220;border:1px solid #22304D;border-radius:12px;padding:4px}
.pm3-st{border:0;background:none;text-align:center;padding:7px 2px;border-radius:9px;font:inherit;font-size:11px;font-weight:700;color:#8EA0C2;cursor:pointer;line-height:1.2}
.pm3-st b{display:block;font-size:15px}
.pm3-st:hover{color:#fff}
.pm3-st.on{background:linear-gradient(180deg,#2563EB,#1D4ED8);color:#fff;box-shadow:inset 0 1px 0 rgba(255,255,255,.3),0 3px 10px rgba(37,99,235,.5)}
.pm3-grp>small{display:block;font-size:10px;letter-spacing:.08em;text-transform:uppercase;color:#6E80A5;font-weight:700;margin:0 4px 8px}
.pm3-tiles{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.pm3-t{border-radius:12px;padding:10px 6px;background:linear-gradient(180deg,#1B2742,#152036);border:1px solid #26365A;box-shadow:inset 0 1px 0 rgba(255,255,255,.07),0 3px 8px rgba(0,0,0,.35);display:flex;flex-direction:column;align-items:center;gap:6px;font:inherit;font-size:12px;font-weight:600;color:#DCE4F5;cursor:pointer;transition:transform .08s,box-shadow .12s;text-align:center;line-height:1.2}
.pm3-t:hover{transform:translateY(-1px);border-color:#3B5A94}
.pm3-t:active{transform:translateY(1px)}
.pm3-t.on{background:linear-gradient(180deg,#22345E,#1A2A4D);border-color:#3B82F6;box-shadow:0 0 0 1px #3B82F6,0 6px 16px rgba(59,130,246,.35);color:#fff}
.pm3-ic{width:34px;height:34px;border-radius:10px;display:grid;place-items:center;color:#fff;box-shadow:inset 0 1px 0 rgba(255,255,255,.35),0 3px 8px rgba(0,0,0,.4)}
.pm3-ic svg{width:18px;height:18px;stroke:#fff!important;fill:none}
.pm3-ic svg *{stroke:#fff}
.pm3-ic.c1{background:linear-gradient(145deg,#60A5FA,#2563EB)}.pm3-ic.c2{background:linear-gradient(145deg,#4ADE80,#16A34A)}.pm3-ic.c3{background:linear-gradient(145deg,#F87171,#DC2626)}.pm3-ic.c4{background:linear-gradient(145deg,#FBBF24,#D97706)}.pm3-ic.c5{background:linear-gradient(145deg,#A78BFA,#7C3AED)}.pm3-ic.c6{background:linear-gradient(145deg,#2DD4BF,#0D9488)}
.pm3-help{border-radius:12px;padding:10px 12px;background:rgba(59,130,246,.1);border:1px solid rgba(96,165,250,.35);font-size:12px;color:#BFD3FF;line-height:1.5}
.pm3-help b{display:block;color:#fff;font-size:13px;margin-bottom:2px}
.pm3-help p{margin:0;white-space:pre-line}
/* Barre de tracé, zoom, statut : posés sur le plan */
#plan-measure-modal.pmx.pmx2.pm3 .plan-measure-body .pmx-draw{left:calc(50% - 44px)!important;top:12px!important}
#plan-measure-modal.pmx.pmx2.pm3.pm3-min .plan-measure-body .pmx-draw{left:calc(50% - 170px)!important}
#plan-measure-modal.pmx.pmx2.pm3 .pmx-float{background:rgba(16,26,46,.9)!important;backdrop-filter:blur(6px);border:1px solid #2B3B5E!important;border-radius:12px!important;box-shadow:0 8px 20px rgba(0,0,0,.45)!important;color:#DCE4F5!important}
#plan-measure-modal.pmx.pmx2.pm3 .pmx-float button,#plan-measure-modal.pmx.pmx2.pm3 .pmx-float summary,#plan-measure-modal.pmx.pmx2.pm3 .pmx-float span{color:#DCE4F5!important}
#plan-measure-modal.pmx.pmx2.pm3 .pmx-float button,#plan-measure-modal.pmx.pmx2.pm3 .pmx-float summary{background:#1D2A47!important;border:1px solid #2B3B5E!important;border-radius:8px!important}
#plan-measure-modal.pmx.pmx2.pm3 .pmx-foot{left:calc(252px + 16px)!important}
@media (max-width:900px){
	#plan-measure-modal.pmx.pmx2.pm3 .plan-measure-body{grid-template-columns:0 minmax(0,1fr)!important;grid-template-rows:minmax(0,1fr) auto!important}
	.pm3-rail{position:absolute;left:0;top:0;bottom:0;width:250px}
	#plan-measure-modal.pmx.pmx2.pm3 .plan-measure-list-wrap{grid-column:1/-1;grid-row:2;width:100%!important;height:38vh!important;border-left:0!important;border-top:1px solid #22304D!important}
}
#plan-measure-modal.pmx.pmx2.pm3 .worker-detail-header svg{stroke:#DCE4F5!important;color:#DCE4F5!important}
#plan-measure-modal.pmx.pmx2.pm3 .worker-detail-header svg circle{fill:#DCE4F5!important}
#plan-measure-modal.pmx.pmx2.pm3 .pmx-auto svg{stroke:#fff!important;fill:#fff!important}
#plan-measure-modal.pmx.pmx2.pm3 #plan-measure-close{width:40px;height:40px;display:grid;place-items:center;font-size:20px;background:linear-gradient(180deg,#1D2A47,#172238)!important;border:1px solid #2B3B5E!important;border-radius:10px!important;color:#DCE4F5!important}
#plan-measure-modal.pmx.pmx2.pm3 .worker-detail-header button:disabled{opacity:.35}
#plan-measure-modal.pmx.pmx2.pm3 .worker-detail-header button{min-height:36px}
#plan-measure-modal.pmx.pmx2.pm3 .worker-detail-header #pmx-plan-pos,#plan-measure-modal.pmx.pmx2.pm3 .worker-detail-header #plan-measure-page-label{color:#DCE4F5!important;font-weight:600}
#plan-measure-modal.pmx.pmx2.pm3 .worker-detail-header #plan-measure-close,#plan-measure-modal.pmx.pmx2.pm3 .worker-detail-header .icon-close{background:linear-gradient(180deg,#1D2A47,#172238)!important;border:1px solid #2B3B5E!important;color:#DCE4F5!important;border-radius:10px!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.08),0 2px 6px rgba(0,0,0,.35)!important}
/* ===== pm3 : en-tête propre + panneau de droite (maquette validée) ===== */
#plan-measure-modal.pmx.pmx2.pm3 .worker-detail-header{display:none!important}
.pm3-head{flex:0 0 auto;height:64px;display:flex;align-items:center;gap:12px;padding:0 16px;background:linear-gradient(180deg,#152038,#101A2E);border-bottom:1px solid #22304D;box-shadow:0 6px 18px rgba(0,0,0,.35);position:relative;z-index:9;color:#E6EAF2;font-size:14px}
.pm3-logo{width:36px;height:36px;border-radius:10px;flex:0 0 auto;display:grid;place-items:center;font-weight:800;color:#fff;background:linear-gradient(145deg,#3B82F6,#1D4ED8);box-shadow:inset 0 1px 0 rgba(255,255,255,.35),0 4px 10px rgba(29,78,216,.5)}
.pm3-hb{height:38px;display:inline-flex;align-items:center;gap:7px;padding:0 13px;border-radius:10px;border:1px solid #2B3B5E;background:linear-gradient(180deg,#1D2A47,#172238);color:#DCE4F5;font:inherit;font-size:14px;font-weight:600;cursor:pointer;box-shadow:inset 0 1px 0 rgba(255,255,255,.08),0 2px 6px rgba(0,0,0,.35)}
.pm3-hb:hover{border-color:#3B5A94;color:#fff}.pm3-hb:disabled{opacity:.35;cursor:default}
.pm3-hb svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.pm3-sq{width:38px;padding:0;justify-content:center}
.pm3-ht{min-width:0;max-width:440px;display:flex;flex-direction:column;line-height:1.25}
.pm3-ht b{font-size:15px;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pm3-ht small{font-size:12.5px;color:#8EA0C2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pm3-pages{display:inline-flex;gap:6px}.pm3-pages[hidden]{display:none}
.pm3-scale{height:32px;padding:0 12px;border-radius:999px;font:inherit;font-size:13px;font-weight:700;cursor:pointer;white-space:nowrap}
.pm3-scale.ok{background:rgba(34,197,94,.14);color:#4ADE80;border:1px solid rgba(74,222,128,.35)}
.pm3-scale.warn{background:rgba(245,158,11,.16);color:#FBBF24;border:1px solid rgba(251,191,36,.45)}
.pm3-flex{flex:1}
.pm3-exp{position:relative}
.pm3-menu{position:fixed;width:300px;padding:6px;border-radius:12px;background:#152038;border:1px solid #2B3B5E;box-shadow:0 18px 40px rgba(0,0,0,.55);display:flex;flex-direction:column;z-index:10050}
.pm3-menu[hidden]{display:none}
.pm3-menu button{text-align:left;border:0;background:none;border-radius:8px;padding:9px 10px;color:#E6EAF2;font:inherit;cursor:pointer}
.pm3-menu button:hover{background:#1D2A47}
.pm3-menu b{display:block;font-size:14px}.pm3-menu small{color:#8EA0C2;font-size:12px}
.pm3-menu hr{border:0;border-top:1px solid #22304D;margin:4px 6px}
.pm3-auto{height:40px;display:inline-flex;align-items:center;gap:7px;padding:0 16px;border-radius:10px;border:1px solid #15803D;background:linear-gradient(180deg,#22C55E,#16A34A);color:#fff;font:inherit;font-size:14px;font-weight:700;cursor:pointer;box-shadow:inset 0 1px 0 rgba(255,255,255,.35),0 4px 12px rgba(22,163,74,.45)}
.pm3-auto svg{width:16px;height:16px;fill:#fff}
/* Panneau de droite */
#plan-measure-modal.pmx.pmx2.pm3 .plan-measure-list-wrap{display:none!important}
#plan-measure-modal.pmx.pmx2.pm3.pm3-full .plan-measure-list-wrap{display:block!important}
#plan-measure-modal.pmx.pmx2.pm3.pm3-full .pm3-side{display:none}
.pm3-backsum{margin:10px 12px;border:1px solid #D0D5DD;background:#fff;border-radius:8px;padding:7px 12px;font:inherit;font-weight:600;cursor:pointer}
.pm3-side{grid-column:3;grid-row:1;width:340px;min-height:0;display:flex;flex-direction:column;background:linear-gradient(180deg,#121B2F,#0E1627);border-left:1px solid #22304D;box-shadow:-6px 0 18px rgba(0,0,0,.3);color:#E6EAF2;z-index:6}
.pm3-sh{display:flex;justify-content:space-between;align-items:center;padding:16px 16px 10px}
.pm3-sh b{font-size:15px}
.pm3-sh button{border:0;background:none;color:#60A5FA;font:inherit;font-weight:700;font-size:13px;cursor:pointer}
.pm3-kp{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:0 14px 12px}
.pm3-k{border-radius:12px;padding:10px 12px;background:linear-gradient(180deg,#1B2742,#152036);border:1px solid #26365A;box-shadow:inset 0 1px 0 rgba(255,255,255,.06),0 3px 8px rgba(0,0,0,.3)}
.pm3-k b{display:block;font-size:18px;font-variant-numeric:tabular-nums;white-space:nowrap}.pm3-k small{font-size:11.5px;color:#8EA0C2}
.pm3-k.main{border-color:#3B82F6;background:linear-gradient(180deg,#1E3A8A,#172554)}
.pm3-rows{flex:1;min-height:0;overflow:auto;padding:0 14px 10px;display:flex;flex-direction:column;gap:8px}
.pm3-row{position:relative;border-radius:12px;padding:10px 12px;background:#141F36;border:1px solid #22304D;display:grid;grid-template-columns:10px minmax(0,1fr) auto;gap:10px;align-items:center;font-size:13.5px}
.pm3-row>i{width:10px;height:34px;border-radius:4px}
.pm3-row>i.g{background:linear-gradient(#4ADE80,#16A34A)}.pm3-row>i.r{background:linear-gradient(#F87171,#DC2626)}.pm3-row>i.v{background:linear-gradient(#A78BFA,#7C3AED)}
.pm3-row>div{min-width:0}.pm3-row>div b{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pm3-row small{display:block;color:#8EA0C2;font-size:11.5px}
.pm3-row>b{font-variant-numeric:tabular-nums;white-space:nowrap}.pm3-row>b.neg{color:#FCA5A5}
.pm3-ra{position:absolute;right:8px;top:50%;transform:translateY(-50%);display:none;gap:6px;background:#141F36;padding-left:8px}
.pm3-row:hover .pm3-ra,.pm3-row:focus-within .pm3-ra{display:flex}
.pm3-ra button{border:1px solid #2B3B5E;background:#1D2A47;color:#DCE4F5;border-radius:8px;padding:5px 10px;font:inherit;font-size:12px;font-weight:600;cursor:pointer}
.pm3-ra button.x{color:#FCA5A5}
.pm3-empty{border:1px dashed #2B3B5E;border-radius:12px;padding:14px;color:#BFD3FF;font-size:13px;line-height:1.55}
.pm3-empty p{margin:6px 0 10px}
.pm3-sf{padding:14px;border-top:1px solid #22304D;display:grid;grid-template-columns:1fr 1fr;gap:8px}
.pm3-btn{height:42px;border-radius:10px;border:1px solid #2B3B5E;background:linear-gradient(180deg,#1D2A47,#172238);color:#DCE4F5;font:inherit;font-size:14px;font-weight:700;cursor:pointer;box-shadow:inset 0 1px 0 rgba(255,255,255,.08),0 2px 6px rgba(0,0,0,.35)}
.pm3-btn.blue{background:linear-gradient(180deg,#3B82F6,#1D4ED8);border-color:#1E40AF;color:#fff;box-shadow:inset 0 1px 0 rgba(255,255,255,.3),0 4px 12px rgba(29,78,216,.45)}
.pm3-btn:disabled{opacity:.4;cursor:default}
.pm3-empty .pm3-btn{width:100%}
@media (max-width:900px){.pm3-side{grid-column:1/-1;grid-row:2;width:100%;height:40vh}.pm3-ht{max-width:160px}.pm3-exp,.pm3-logo{display:none}}
#plan-measure-modal.pmx.pmx2.pm3 .plan-measure-body .pmx-float{position:absolute!important;right:356px!important;left:auto!important;bottom:16px!important;top:auto!important;transform:none!important;z-index:7}
#plan-measure-modal.pmx.pmx2.pm3.pm3-full .plan-measure-body .pmx-float{right:356px!important}
@media (max-width:900px){#plan-measure-modal.pmx.pmx2.pm3 .plan-measure-body .pmx-float{right:12px!important;bottom:calc(40vh + 12px)!important}}
#plan-measure-modal .pm3-head{z-index:60!important}
#plan-measure-modal .pm3-head{overflow:visible!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;position:relative!important;top:auto!important}
/* ===================== Disposition « Revu » ===================== */
#plan-measure-modal.pmx.pmx2.pm3.rv .pm3-rail,#plan-measure-modal.pmx.pmx2.pm3.rv .pm3-show,#plan-measure-modal.rv .pm3-head .pm3-pages,#plan-measure-modal.rv .pm3-head .pm3-scale{display:none!important}
#plan-measure-modal.pmx.pmx2.pm3.rv .plan-measure-card{background:#1E1F22!important}
#plan-measure-modal.rv .pm3-head{height:50px;background:#2B2D31;border-bottom:1px solid #3A3D42;box-shadow:0 2px 8px rgba(0,0,0,.35)}
#plan-measure-modal.rv .pm3-logo{width:30px;height:30px;font-size:13px;border-radius:8px}
#plan-measure-modal.rv .pm3-hb{height:34px;background:#36393F;border-color:#4A4E56;box-shadow:none;font-size:13.5px}
#plan-measure-modal.rv .pm3-hb:hover{background:#40444B}
#plan-measure-modal.rv .pm3-hb.pm3-devis{background:#2563EB;border-color:#1D4ED8;color:#fff}
#plan-measure-modal.rv .pm3-auto{height:34px;box-shadow:none}
#plan-measure-modal.rv .pm3-ht small{color:#A0A6B0}
/* Corps : panneaux | panneau ouvert | plan | outils */
#plan-measure-modal.pmx.pmx2.pm3.rv .plan-measure-body,#plan-measure-modal.pmx.pmx2.pm3.pm3-min.rv .plan-measure-body{grid-template-columns:46px auto minmax(0,1fr) 50px!important}
#plan-measure-modal.pmx.pmx2.pm3.rv .plan-measure-canvas-wrap{grid-column:3!important;background:#5A5D63!important}
#plan-measure-modal.pmx.pmx2.pm3.rv .pm3-side{grid-column:2;display:none;width:320px;background:#26282C;border-left:1px solid #3A3D42;border-right:1px solid #3A3D42;box-shadow:none}
#plan-measure-modal.pmx.pmx2.pm3.rv.rv-p-mesures .pm3-side{display:flex}
#plan-measure-modal.pmx.pmx2.pm3.rv.pm3-full .plan-measure-list-wrap{grid-column:2!important;width:360px!important;border-left:0!important;border-right:1px solid #3A3D42!important}
#plan-measure-modal.rv .pm3-k{background:#2F3237;border-color:#40444B;box-shadow:none}
#plan-measure-modal.rv .pm3-k.main{background:#1E3A8A;border-color:#3B82F6}
#plan-measure-modal.rv .pm3-row{background:#2F3237;border-color:#40444B}
#plan-measure-modal.rv .pm3-ra{background:#2F3237}
#plan-measure-modal.rv .pm3-sf{border-color:#3A3D42}
#plan-measure-modal.rv .pm3-btn{background:#36393F;border-color:#4A4E56;box-shadow:none}
#plan-measure-modal.rv .pm3-btn.blue{background:#2563EB;border-color:#1D4ED8}
.rv-left,.rv-tools{grid-row:1;min-height:0;display:flex;flex-direction:column;align-items:center;gap:2px;padding:8px 0;background:#2B2D31;overflow-y:auto;overflow-x:hidden;z-index:6}
.rv-left{grid-column:1;border-right:1px solid #3A3D42}
.rv-tools{grid-column:4;border-left:1px solid #3A3D42}
.rv-b{width:38px;height:38px;flex:0 0 auto;display:grid;place-items:center;border:1px solid transparent;border-radius:7px;background:none;color:#D4D7DD;cursor:pointer;padding:0}
.rv-b svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.rv-b:hover{background:#3A3D42;color:#fff}
.rv-b.on{background:#1D4ED8;border-color:#3B82F6;color:#fff}
.rv-b:disabled{opacity:.35;cursor:default}
.rv-b.sm{width:28px;height:28px}.rv-b.sm svg{width:16px;height:16px}
.rv-sep{width:26px;height:1px;background:#454950;margin:6px 0;flex:0 0 auto}
.rv-flex{flex:1}
.rv-tip{position:fixed;z-index:10060;max-width:300px;padding:8px 10px;border-radius:8px;background:#111214;border:1px solid #454950;color:#E8EAED;font-size:12.5px;line-height:1.45;box-shadow:0 8px 20px rgba(0,0,0,.5);pointer-events:none}
.rv-tip b{font-size:13px;color:#fff}.rv-tip kbd{margin-left:8px;padding:0 5px;border:1px solid #5A5E66;border-radius:4px;font:inherit;font-size:11px;color:#C8CCD2}
.rv-tip span{display:block;margin-top:3px;color:#B9BEC6}
.rv-foot{flex:0 0 auto;height:40px;display:flex;align-items:center;gap:14px;padding:0 12px;background:#2B2D31;border-top:1px solid #3A3D42;color:#D4D7DD;font-size:13px;z-index:7}
.rv-hint{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#B9BEC6}.rv-hint b{color:#fff;margin-right:6px}
.rv-pages{display:flex;align-items:center;gap:6px;font-weight:600}.rv-pages[hidden]{display:none}
.rv-zoom .pmx-tb{position:static!important;transform:none!important;background:transparent!important;border:0!important;box-shadow:none!important;padding:0!important;display:flex;align-items:center;gap:4px}
.rv-zoom .pmx-tb button,.rv-zoom .pmx-tb summary{height:28px!important;min-height:0!important;background:#36393F!important;border:1px solid #4A4E56!important;color:#D4D7DD!important;border-radius:6px!important}
.rv-zoom .pmx-tb svg{stroke:#D4D7DD!important}
.rv-zoom .pmx-tb-tg{display:none!important}
.rv-scale{height:28px;padding:0 10px;border-radius:6px;font:inherit;font-size:12.5px;font-weight:700;cursor:pointer}
.rv-scale.ok{background:rgba(34,197,94,.14);color:#4ADE80;border:1px solid rgba(74,222,128,.35)}
.rv-scale.warn{background:rgba(245,158,11,.16);color:#FBBF24;border:1px solid rgba(251,191,36,.45)}
.rv-total{font-weight:700;color:#fff;white-space:nowrap}
#plan-measure-modal.rv .plan-measure-body .pmx-draw{left:50%!important}
@media (max-width:900px){#plan-measure-modal.pmx.pmx2.pm3.rv .plan-measure-body{grid-template-columns:42px 0 minmax(0,1fr) 46px!important;grid-template-rows:minmax(0,1fr)!important}#plan-measure-modal.pmx.pmx2.pm3.rv.rv-p-mesures .pm3-side{position:absolute;left:42px;top:0;bottom:0;z-index:8}.rv-hint,.rv-total{display:none}}
#plan-measure-modal.rv .pm3-head{background:#2B2D31!important;border-bottom:1px solid #3A3D42!important}
#plan-measure-modal.rv .pm3-sf{display:none!important}
#plan-measure-modal.rv .pm3-side{background:#26282C!important}
.rv-rot{width:auto!important;padding:0 8px!important;gap:6px;display:inline-flex!important;align-items:center;border:1px solid #4A4E56!important;background:#36393F!important;font:inherit;font-size:12.5px;font-weight:600}
.rv-rot span{color:#D4D7DD}
html:has(#plan-measure-modal.pm3:not([hidden])),body:has(#plan-measure-modal.pm3:not([hidden])){overflow:hidden!important}
/* Panneaux d'outil (Surface nette, Annoter) rangés dans la colonne de gauche, en sombre, sans cacher le plan */
#plan-measure-modal.rv .plan-measure-body>#pm-net-panel,#plan-measure-modal.rv .plan-measure-body>#pa-panel{position:relative!important;inset:auto!important;left:auto!important;right:auto!important!important;top:auto!important;transform:none!important;grid-column:2!important;grid-row:1!important;width:340px!important;max-width:none!important;max-height:none!important;height:100%!important;margin:0!important;border-radius:0!important;box-shadow:none!important;border:0!important;border-right:1px solid #3A3D42!important;background:#26282C!important;color:#E6EAF2!important;overflow:auto!important;z-index:6!important;padding:14px 14px 18px!important}
#plan-measure-modal.rv .plan-measure-body:has(>#pm-net-panel) .pm3-side,#plan-measure-modal.rv .plan-measure-body:has(>#pa-panel) .pm3-side,#plan-measure-modal.rv .plan-measure-body:has(>#pm-net-panel) .plan-measure-list-wrap,#plan-measure-modal.rv .plan-measure-body:has(>#pa-panel) .plan-measure-list-wrap{display:none!important}
#plan-measure-modal.rv .plan-measure-body:has(>#pm-net-panel)>#pa-panel{display:none!important}
#plan-measure-modal.rv #pm-net-panel *,#plan-measure-modal.rv #pa-panel *{color:inherit;border-color:#40444B!important}
#plan-measure-modal.rv #pm-net-panel b,#plan-measure-modal.rv #pm-net-panel h3,#plan-measure-modal.rv #pm-net-panel h4,#plan-measure-modal.rv #pa-panel b{color:#fff!important}
#plan-measure-modal.rv #pm-net-panel small,#plan-measure-modal.rv #pm-net-panel p,#plan-measure-modal.rv #pa-panel small,#plan-measure-modal.rv #pa-panel .pa-hint{color:#A9AFB8!important}
#plan-measure-modal.rv #pm-net-panel input,#plan-measure-modal.rv #pm-net-panel select,#plan-measure-modal.rv #pa-panel input{background:#1E1F22!important;color:#fff!important;border:1px solid #4A4E56!important;border-radius:6px!important}
#plan-measure-modal.rv #pm-net-panel button,#plan-measure-modal.rv #pa-panel button{background:#36393F!important;color:#E6EAF2!important;border:1px solid #4A4E56!important;box-shadow:none!important}
#plan-measure-modal.rv #pm-net-panel button.primary,#plan-measure-modal.rv #pm-net-panel .pm-btn.primary,#plan-measure-modal.rv #pa-panel .pm-btn.primary,#plan-measure-modal.rv #pa-panel .pa-tool.is-on{background:#2563EB!important;border-color:#1D4ED8!important;color:#fff!important}
#plan-measure-modal.rv #pm-net-panel table,#plan-measure-modal.rv #pm-net-panel tr,#plan-measure-modal.rv #pm-net-panel td,#plan-measure-modal.rv #pm-net-panel th{background:transparent!important}
#plan-measure-modal.rv #pm-net-panel .pn-q-ok{background:rgba(34,197,94,.12)!important;color:#86EFAC!important}
#plan-measure-modal.rv #pm-net-panel .pn-q-warn{background:rgba(245,158,11,.12)!important;color:#FCD34D!important}
#plan-measure-modal.rv #pm-net-panel .pn-q-bad{background:rgba(239,68,68,.12)!important;color:#FCA5A5!important}
#plan-measure-modal.rv #pa-panel .pa-col.is-on{box-shadow:0 0 0 2px var(--c) inset!important}
#plan-measure-modal.rv #pa-panel .pa-stamp{color:var(--c)!important;border-color:var(--c)!important}
#plan-measure-modal.rv #pa-panel .pa-stamp.is-on{background:var(--c)!important;color:#fff!important}
#plan-measure-modal.rv #pa-panel .pa-list li{background:#2F3237}
#plan-measure-modal.rv .plan-measure-body>#pm-net-panel{width:450px!important;font-size:13px}
#plan-measure-modal.rv #pm-net-panel table{width:100%;font-size:12.5px}
#plan-measure-modal.rv #pm-net-panel td,#plan-measure-modal.rv #pm-net-panel th{padding:6px 4px!important}
#plan-measure-modal.rv #pm-net-panel input[data-net-name]{width:110px!important}
#plan-measure-modal.rv #pm-net-panel th{color:#A9AFB8!important;font-weight:600}
#plan-measure-modal.rv #pm-net-panel label,#plan-measure-modal.rv #pm-net-panel span,#plan-measure-modal.rv #pm-net-panel td,#plan-measure-modal.rv #pm-net-panel div{color:#D4D7DD!important}
#plan-measure-modal.rv #pm-net-panel td b{color:#fff!important}
/* ===================== Ruban (onglets + outils nommés) ===================== */
#plan-measure-modal.rb-on .rv-left,#plan-measure-modal.rb-on .rv-tools{display:none!important}
#plan-measure-modal.pmx.pmx2.pm3.rv.rb-on .plan-measure-body{grid-template-columns:0 auto minmax(0,1fr) 0!important}
.rb{flex:0 0 auto;background:#F3F4F6;border-bottom:1px solid #D0D5DD;color:#101828;position:relative;z-index:8;box-shadow:0 2px 6px rgba(0,0,0,.18)}
.rb-tabs{display:flex;gap:2px;padding:0 10px;background:#2B2D31}
.rb-tab{border:0;background:none;color:#C8CCD2;font:inherit;font-size:13.5px;font-weight:600;padding:8px 16px 7px;border-radius:7px 7px 0 0;cursor:pointer}
.rb-tab:hover{color:#fff;background:#36393F}
.rb-tab.on{background:#F3F4F6;color:#1D4ED8}
.rb-row{display:flex;align-items:stretch;gap:0;padding:6px 8px 2px;overflow-x:auto;scrollbar-width:thin}
.rb-grp{display:flex;flex-direction:column;align-items:center;padding:0 8px;border-right:1px solid #D0D5DD}
.rb-grp:last-child{border-right:0}
.rb-items{display:flex;gap:2px}
.rb-grp>small{font-size:11px;color:#667085;margin:2px 0 3px;white-space:nowrap}
.rb-b{min-width:66px;height:58px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:4px 6px;border:1px solid transparent;border-radius:7px;background:none;color:#1D2939;font:inherit;font-size:12px;font-weight:600;cursor:pointer;white-space:nowrap}
.rb-b svg{width:22px;height:22px;fill:none;stroke:#1D4ED8;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.rb-b:hover{background:#E4E7EC;border-color:#D0D5DD}
.rb-b.on{background:#DBEAFE;border-color:#3B82F6;color:#1D4ED8}
.rb-b[data-rb="plan-measure-calibrate"] svg{stroke:#D97706}
.rb-b[data-rb^="pmx-annot"] svg,.rb-b[data-rb="plan-measure-opening"] svg,.rb-b[data-rb="plan-measure-erase"] svg{stroke:#DC2626}
.rb-b[data-rb="pmx-net"] svg,.rb-b[data-rb="plan-measure-polygon"] svg,.rb-b[data-rb="rb-devis"] svg{stroke:#16A34A}
@media (max-width:900px){.rb-b{min-width:56px;height:52px;font-size:11px}.rb-tab{padding:7px 10px}}
#plan-measure-modal.rb-on .pm3-head .pm3-exp,#plan-measure-modal.rb-on .pm3-head .pm3-devis,#plan-measure-modal.rb-on .pm3-head .pm3-auto,#plan-measure-modal.rb-on .rv-rot{display:none!important}
/* Ruban sombre façon AutoCAD / TrueView, icônes en couleur, fond du plan comme l'espace objet */
.rb{background:#3B4453!important;border-bottom:1px solid #262C36!important;color:#E7EAF0!important}
.rb-tabs{background:#262C36!important}
.rb-tab{color:#B8C0CC!important}.rb-tab:hover{background:#323A46!important;color:#fff!important}
.rb-tab.on{background:#3B4453!important;color:#fff!important;box-shadow:inset 0 2px 0 #3B82F6}
.rb-grp{border-right:1px solid #4E586A!important;padding-bottom:0!important}
.rb-grp>small{width:100%;text-align:center;margin:3px 0 0!important;padding:2px 0 3px;background:#323A46;color:#AEB6C2!important;border-radius:0 0 3px 3px}
.rb-b{color:#E7EAF0!important}
.rb-b svg.pro{width:28px;height:28px;stroke-width:1.4;stroke-linejoin:round;stroke-linecap:round}
.rb-b svg.pro *{vector-effect:non-scaling-stroke}
.rb-b:hover{background:#4A5466!important;border-color:#5C6780!important}
.rb-b.on{background:#1E3A8A!important;border-color:#3B82F6!important;color:#fff!important}
#plan-measure-modal.pmx.pmx2.pm3.rv .plan-measure-canvas-wrap{background:#212830!important}
#plan-measure-modal.pmx.pmx2.pm3.rv .plan-measure-canvas-wrap.is-cad-dark{background:#212830!important}
/* Ruban plus fin */
#plan-measure-modal.rv .pm3-head{height:42px!important;padding:0 10px!important;gap:10px!important}
#plan-measure-modal.rv .pm3-logo{width:26px!important;height:26px!important;font-size:11px!important}
#plan-measure-modal.rv .pm3-hb{height:28px!important;font-size:12.5px!important;padding:0 10px!important}
#plan-measure-modal.rv .pm3-hb.pm3-sq{width:28px!important;padding:0!important}
#plan-measure-modal.rv .pm3-ht{flex-direction:row!important;align-items:baseline;gap:10px}
#plan-measure-modal.rv .pm3-ht b{font-size:13.5px!important}
#plan-measure-modal.rv .pm3-ht small{font-size:12px!important}
.rb-tabs{padding:0 6px!important}
.rb-tab{font-size:12.5px!important;padding:5px 12px 4px!important}
.rb-row{padding:3px 6px 0!important}
.rb-grp{padding:0 5px!important}
.rb-b{min-width:54px!important;height:42px!important;gap:2px!important;padding:2px 5px!important;font-size:11.5px!important;font-weight:500!important;border-radius:5px!important}
.rb-b svg,.rb-b svg.pro{width:20px!important;height:20px!important}
.rb-grp>small{font-size:10px!important;padding:1px 0 2px!important;margin-top:2px!important}
.rv-foot{height:32px!important;font-size:12px!important}
.rv-zoom .pmx-tb button,.rv-zoom .pmx-tb summary{height:24px!important}
.rv-scale{height:24px!important}
#plan-measure-modal.rv .pm3-ht{max-width:none!important;flex:0 1 auto}
/* Une seule barre en haut : plan + onglets ; ruban fin dessous ; aucun espace entre les barres */
#plan-measure-modal.pmx.pmx2.pm3.rv .plan-measure-card{gap:0!important;row-gap:0!important}
#plan-measure-modal.rv .pm3-head .rb-tabs{display:flex;align-self:flex-end;gap:2px;background:transparent!important;padding:0 0 0 18px!important;height:100%;align-items:flex-end}
#plan-measure-modal.rv .pm3-head .rb-tab{height:32px;padding:0 14px!important;border-radius:6px 6px 0 0!important;font-size:13px!important;color:#C3C9D3!important}
#plan-measure-modal.rv .pm3-head .rb-tab.on{background:#3B4453!important;color:#fff!important;box-shadow:inset 0 2px 0 #3B82F6!important}
#plan-measure-modal.rv .pm3-head{border-bottom:0!important;box-shadow:none!important;background:#262C36!important}
#plan-measure-modal.rv .pm3-ht small{display:none}
#plan-measure-modal.rv .pm3-ht{max-width:340px!important}
#plan-measure-modal.rv .pm3-ht b{overflow:hidden;text-overflow:ellipsis}
.rb-row{padding:2px 6px 0!important}
.rb-b{height:40px!important}
#plan-measure-modal .pm3-head{margin:0!important}
/* Icônes Tabler, couleur par groupe ; groupes en panneaux visibles (comme AutoCAD) */
.rb-b svg.ti{width:24px!important;height:24px!important;fill:none!important;stroke:currentColor!important;stroke-width:1.6!important;stroke-linecap:round;stroke-linejoin:round;color:#9CC8FF}
.rb-row{gap:6px!important;padding:5px 8px 5px!important;align-items:stretch}
.rb-grp{background:#323A47!important;border:1px solid #4E586A!important;border-radius:5px!important;padding:3px 3px 0!important;overflow:hidden}
.rb-grp:last-child{border-right:1px solid #4E586A!important}
.rb-grp>small{background:#283039!important;margin:3px -3px 0!important;width:calc(100% + 6px)!important;border-top:1px solid #4E586A;border-radius:0!important;letter-spacing:.02em}
.rb-b{color:#E7EAF0!important}
.rb-grp:nth-child(1) .rb-b svg.ti{color:#F5B544}
.rb-grp:nth-child(2) .rb-b svg.ti{color:#5AB0FF}
.rb-grp:nth-child(3) .rb-b svg.ti{color:#4ADE80}
.rb-row[aria-label="Annoter"] .rb-grp:nth-child(1) svg.ti{color:#F87171}
.rb-row[aria-label="Annoter"] .rb-grp:nth-child(2) svg.ti{color:#CBD5E1}
.rb-row[aria-label="Calculer"] .rb-grp:nth-child(1) svg.ti{color:#60A5FA}
.rb-row[aria-label="Calculer"] .rb-grp:nth-child(2) svg.ti{color:#C084FC}
.rb-row[aria-label="Devis et export"] .rb-grp:nth-child(1) svg.ti{color:#4ADE80}
.rb-row[aria-label="Devis et export"] .rb-grp:nth-child(2) svg.ti{color:#CBD5E1}
.rb-row[aria-label="Devis et export"] .rb-grp:nth-child(3) svg.ti{color:#F87171}
.rb-row[aria-label="Affichage"] svg.ti{color:#CBD5E1!important}
.rb-b.on svg.ti{color:#fff!important}
/* Fond du plan comme l'espace objet d'AutoCAD (#212830) : le papier inversé prend la couleur du fond */
#plan-measure-modal.pmx.pmx2.pm3.rv .plan-measure-canvas-wrap.is-cad-dark{background:#212830!important;isolation:isolate}
#plan-measure-modal.pmx.pmx2.pm3.rv .plan-measure-canvas-wrap.is-cad-dark #plan-measure-canvas{mix-blend-mode:lighten}
#plan-measure-modal.pmx.pmx2.pm3.rv.pm-dark .plan-measure-body{background:#212830!important}
.rb-b svg.ti{flex:0 0 auto!important;min-height:24px}
.rb-b{height:50px!important;gap:3px!important;justify-content:center}
/* Panneau Surface nette : tableau compact et lisible */
#plan-measure-modal.rv #pm-net-panel .pn-tab td,#plan-measure-modal.rv #pm-net-panel .pn-tab th{white-space:nowrap;vertical-align:middle!important}
#plan-measure-modal.rv #pm-net-panel .pn-tab td small{white-space:normal;display:block;font-size:11px!important;line-height:1.3;max-width:120px}
#plan-measure-modal.rv #pm-net-panel input[data-net-name]{width:96px!important;height:28px!important;padding:0 6px!important;font-size:12.5px!important}
#plan-measure-modal.rv #pm-net-panel select[data-net-den]{height:28px!important;padding:0 2px!important;font-size:12px!important;width:64px}
#plan-measure-modal.rv #pm-net-panel .pn-tab tr.is-off td{opacity:.45}
#plan-measure-modal.rv #pm-net-panel .pn-tab td b{font-variant-numeric:tabular-nums}
#plan-measure-modal.rv #pm-net-panel small.pn-ex,#plan-measure-modal.rv #pm-net-panel small.pn-ap{display:inline-block!important;margin-top:2px;padding:0 5px;border-radius:4px;font-size:10.5px!important}
#plan-measure-modal.rv #pm-net-panel small.pn-ex{background:rgba(34,197,94,.18);color:#86EFAC!important}
#plan-measure-modal.rv #pm-net-panel small.pn-ap{background:rgba(245,158,11,.18);color:#FCD34D!important}
#plan-measure-modal.rv #pm-net-panel header{display:flex;justify-content:space-between;align-items:center;margin-bottom:6px}
#plan-measure-modal.rv #pm-net-panel header b{font-size:15px}
#plan-measure-modal.rv #pm-net-panel .pn-step>span{display:block;font-weight:600;margin-bottom:6px;color:#fff!important}
#plan-measure-modal.rv #pm-net-panel .pn-zone{background:rgba(59,130,246,.10)!important;border-color:#3B82F6!important}
#pm-net-panel.is-zone>.pn-step:not(:first-of-type){display:none!important}
/* ===================== Style BricsCAD : barres très sombres, ruban dense, fond quadrillé ===================== */
#plan-measure-modal.rv .pm3-head{height:36px!important;background:#1B1C1F!important;border-bottom:1px solid #2E3035!important}
#plan-measure-modal.rv .pm3-logo{width:22px!important;height:22px!important;border-radius:5px!important;font-size:10px!important;box-shadow:none!important}
#plan-measure-modal.rv .pm3-hb{height:24px!important;font-size:12px!important;background:#2A2B2F!important;border:1px solid #3A3C42!important;border-radius:4px!important;color:#D7D9DE!important}
#plan-measure-modal.rv .pm3-hb.pm3-sq{width:24px!important}
#plan-measure-modal.rv .pm3-ht b{font-size:12.5px!important;font-weight:600!important;color:#E4E6EA!important;background:#2A2B2F;border:1px solid #3A3C42;border-bottom:0;border-radius:4px 4px 0 0;padding:6px 12px 8px;margin-bottom:-9px}
#plan-measure-modal.rv .pm3-head .rb-tabs{padding-left:12px!important}
#plan-measure-modal.rv .pm3-head .rb-tab{height:26px!important;padding:0 10px!important;font-size:12px!important;font-weight:500!important;color:#AEB2BA!important;background:none!important;border-radius:0!important;box-shadow:none!important;border-bottom:2px solid transparent!important}
#plan-measure-modal.rv .pm3-head .rb-tab:hover{color:#fff!important}
#plan-measure-modal.rv .pm3-head .rb-tab.on{color:#fff!important;border-bottom-color:#2F81F7!important;background:none!important}
.rb{background:#26272B!important;border-bottom:1px solid #34363C!important;box-shadow:none!important}
.rb-row{gap:0!important;padding:4px 4px 0!important}
.rb-grp{background:none!important;border:0!important;border-right:1px solid #3A3C42!important;border-radius:0!important;padding:0 6px!important}
.rb-grp:last-child{border-right:1px solid #3A3C42!important}
.rb-grp>small{background:none!important;border:0!important;margin:1px 0 2px!important;width:auto!important;font-size:9.5px!important;letter-spacing:.06em;text-transform:uppercase;color:#8B9099!important}
.rb-grp>small::after{content:" ⌄";font-size:9px}
.rb-b{min-width:50px!important;height:46px!important;border-radius:3px!important;font-size:11px!important;font-weight:400!important;color:#D7D9DE!important;gap:3px!important}
.rb-b:hover{background:#34363C!important;border-color:#45484F!important}
.rb-b.on{background:#1F3A66!important;border-color:#2F81F7!important}
.rb-b svg.ti{width:22px!important;height:22px!important;min-height:22px;stroke-width:1.5!important;filter:none}
.rb-grp:nth-child(1) .rb-b svg.ti{color:#F2C14E}.rb-grp:nth-child(2) .rb-b svg.ti{color:#7CB7FF}.rb-grp:nth-child(3) .rb-b svg.ti{color:#6EDC9A}
/* Fond du plan : gris CAO sombre avec quadrillage, comme l'espace objet */
#plan-measure-modal.pmx.pmx2.pm3.rv .plan-measure-canvas-wrap,#plan-measure-modal.pmx.pmx2.pm3.rv .plan-measure-canvas-wrap.is-cad-dark{background-color:#212226!important;background-image:linear-gradient(rgba(255,255,255,.07) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.07) 1px,transparent 1px),linear-gradient(rgba(255,255,255,.03) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.03) 1px,transparent 1px)!important;background-size:100px 100px,100px 100px,20px 20px,20px 20px!important;background-attachment:local!important}
#plan-measure-modal.pmx.pmx2.pm3.rv.pm-dark .plan-measure-body{background:#212226!important}
/* Panneau de gauche et barre d'état assortis */
#plan-measure-modal.pmx.pmx2.pm3.rv .pm3-side,#plan-measure-modal.rv .plan-measure-body>#pm-net-panel,#plan-measure-modal.rv .plan-measure-body>#pa-panel{background:#26272B!important;border-color:#34363C!important}
#plan-measure-modal.rv .pm3-k,#plan-measure-modal.rv .pm3-row{background:#2E3035!important;border-color:#3A3C42!important}
.rv-foot{background:#1B1C1F!important;border-top:1px solid #2E3035!important;height:28px!important;font-size:11.5px!important}
.rv-foot .rv-hint{color:#AEB2BA!important}
.rv-scale{height:20px!important;border-radius:3px!important;font-size:11px!important;text-transform:uppercase;letter-spacing:.03em}
.rv-zoom .pmx-tb button,.rv-zoom .pmx-tb summary{height:20px!important;background:#2A2B2F!important;border-color:#3A3C42!important;border-radius:3px!important}
.rv-total{font-size:11.5px!important}
/* Taille des boutons comme BricsCAD : 2 grands + petits empilés */
.rb-items{display:grid!important;grid-auto-flow:column;grid-template-rows:20px 20px;gap:2px 2px!important;align-items:stretch}
.rb-b{grid-row:span 2;min-width:44px!important;height:auto!important;padding:2px 4px!important;font-size:10.5px!important;gap:2px!important}
.rb-b svg.ti{width:20px!important;height:20px!important;min-height:20px}
.rb-b.sm{grid-row:span 1;flex-direction:row!important;justify-content:flex-start!important;gap:5px!important;min-width:0!important;padding:0 6px 0 3px!important;font-size:10.5px!important}
.rb-b.sm svg.ti{width:15px!important;height:15px!important;min-height:15px}
.rb-row{padding:3px 4px 0!important}
.rb-grp>small{margin:2px 0 1px!important;font-size:9px!important}
/* ===================== BricsCAD à l'identique ===================== */
#plan-measure-modal.pmx.pmx2.pm3.rv.rb-on .plan-measure-body{grid-template-columns:40px 0 minmax(0,1fr) 300px!important}
#plan-measure-modal.rb-on .rv-left{display:flex!important;grid-column:1!important;background:#2B2B2B!important;border-right:1px solid #3A3A3A!important;width:40px}
#plan-measure-modal.rb-on .rv-left .rv-b{width:32px;height:32px;color:#C8C8C8}
#plan-measure-modal.pmx.pmx2.pm3.rv .pm3-side,#plan-measure-modal.rv .plan-measure-body>#pm-net-panel,#plan-measure-modal.rv .plan-measure-body>#pa-panel,#plan-measure-modal.pmx.pmx2.pm3.rv.pm3-full .plan-measure-list-wrap{grid-column:4!important;width:300px!important;border-left:1px solid #3A3A3A!important;border-right:0!important;background:#252526!important}
#plan-measure-modal.rv .plan-measure-body>#pm-net-panel{width:300px!important}
#plan-measure-modal.pmx.pmx2.pm3.rv .plan-measure-canvas-wrap{grid-column:3!important}
/* Barres */
#plan-measure-modal.rv .pm3-head{height:30px!important;background:#1F1F1F!important;border-bottom:1px solid #2D2D2D!important}
#plan-measure-modal.rv .pm3-ht b{background:none!important;border:0!important;padding:0!important;margin:0!important;font-weight:400!important;font-size:12px!important;color:#CFCFCF!important}
.bc-tabrow{display:flex;align-items:center;height:28px;background:#2B2B2B;padding:0 6px;gap:6px;position:relative;z-index:8}
.bc-app{width:22px;height:20px;border-radius:3px;background:#2F6FE0;color:#fff;font-size:10px;font-weight:800;display:grid;place-items:center}
.bc-tabrow .rb-tabs{display:flex;gap:0;background:none!important;padding:0 0 0 6px!important}
.bc-tabrow .rb-tab{height:28px!important;padding:0 12px!important;font-size:12.5px!important;font-weight:400!important;color:#D0D0D0!important;background:none!important;border-radius:0!important;box-shadow:none!important;border-bottom:2px solid transparent!important}
.bc-tabrow .rb-tab:hover{background:#3A3A3A!important;color:#fff!important}
.bc-tabrow .rb-tab.on{color:#fff!important;background:#333!important;border-bottom-color:#2F81F7!important}
.rb{background:#2B2B2B!important;border-bottom:1px solid #1F1F1F!important}
.rb-row{padding:4px 6px 0!important}
.rb-grp{border-right:1px solid #3F3F3F!important;padding:0 6px!important}
.rb-grp>small{color:#BDBDBD!important;font-size:10px!important;font-weight:700;letter-spacing:.05em;margin:3px 0 3px!important}
.rb-items{display:flex!important;gap:1px!important}
.rb-b{grid-row:auto!important;flex-direction:column!important;justify-content:flex-start!important;min-width:46px!important;max-width:74px;height:60px!important;padding:2px 3px!important;font-size:11px!important;line-height:1.15;white-space:normal!important;text-align:center;color:#E0E0E0!important;border-radius:2px!important}
.rb-b span{display:block;max-width:70px}
.rb-b svg.ti{width:30px!important;height:30px!important;min-height:30px;flex:0 0 30px!important}
.rb-b svg.ti .ti-f *{fill:currentColor;fill-opacity:.28;stroke:none!important}
.rb-b svg.ti .ti-s *{fill:none}
.rb-b svg.ti{stroke-width:1.35!important}
.rb-b:hover{background:#3C3C3C!important;border-color:#4A4A4A!important}
.rb-b.on{background:#264F78!important;border-color:#3A79C9!important}
.bc-docs{display:flex;align-items:flex-end;height:24px;background:#1F1F1F;padding:0 6px;gap:2px;border-bottom:1px solid #3A3A3A}
.bc-doc{height:22px;display:inline-flex;align-items:center;padding:0 10px;font:inherit;font-size:11.5px;color:#BDBDBD;background:#2B2B2B;border:1px solid #3A3A3A;border-bottom:0;border-radius:2px 2px 0 0;cursor:pointer}
.bc-doc.on{background:#3A3A3A;color:#fff;font-style:italic}
.bc-plus{color:#BDBDBD;padding:0 8px 3px;font-size:14px}
/* Fond du plan */
#plan-measure-modal.pmx.pmx2.pm3.rv .plan-measure-canvas-wrap,#plan-measure-modal.pmx.pmx2.pm3.rv .plan-measure-canvas-wrap.is-cad-dark{background:#1F1F1F!important;background-image:none!important}
#plan-measure-modal.pmx.pmx2.pm3.rv.pm-dark .plan-measure-body{background:#1F1F1F!important}
/* Ligne de commande flottante et barre d'état */
.bc-cmd{position:relative;z-index:7;height:24px;display:flex;align-items:center;padding:0 10px;background:#1B1B1B;border-top:1px solid #333;font-family:Consolas,'Courier New',monospace;font-size:12px;color:#BDBDBD}
.bc-cmd::before{content:"⁝ ";color:#777;margin-right:6px}
.bc-cmd .rv-hint{flex:1;color:#D0D0D0!important;font-style:italic}
.bc-cmd .rv-hint b{font-style:normal;color:#fff;text-transform:uppercase;font-size:11px;letter-spacing:.04em}
.rv-foot{height:22px!important;background:#2B2B2B!important;border-top:1px solid #3A3A3A!important;font-size:11px!important;gap:6px!important;padding:0 6px!important}
.rv-foot .rv-hint{display:none}
.rv-foot>*{font-size:11px!important}
.rv-foot::before{content:"Prêt";color:#BDBDBD;margin-right:auto}
.rv-scale{height:18px!important;padding:0 6px!important;background:#3A3A3A!important;color:#fff!important;border:1px solid #4A4A4A!important;border-radius:0!important;font-size:10.5px!important}
.rv-total{color:#E0E0E0!important;font-weight:600!important;padding-left:8px;border-left:1px solid #4A4A4A}
.rv-zoom .pmx-tb button,.rv-zoom .pmx-tb summary{height:18px!important;border-radius:0!important;background:#3A3A3A!important;border-color:#4A4A4A!important}
.rv-pages{font-size:11px}
/* Panneau de droite façon liste des calques */
#plan-measure-modal.rv .pm3-sh{padding:10px 12px 8px!important}
#plan-measure-modal.rv .pm3-sh b{font-size:14px!important;font-weight:500}
#plan-measure-modal.rv .pm3-kp{padding:0 10px 8px!important;gap:6px!important}
#plan-measure-modal.rv .pm3-k{padding:6px 8px!important;border-radius:3px!important;background:#2D2D2D!important;border-color:#3A3A3A!important}
#plan-measure-modal.rv .pm3-k b{font-size:15px!important}
#plan-measure-modal.rv .pm3-k.main{background:#264F78!important;border-color:#3A79C9!important}
#plan-measure-modal.rv .pm3-rows{padding:0 0 10px!important;gap:0!important;border-top:1px solid #3A3A3A}
#plan-measure-modal.rv .pm3-row{border-radius:0!important;border:0!important;border-bottom:1px solid #333!important;background:transparent!important;padding:5px 12px!important;font-size:12.5px!important;grid-template-columns:12px minmax(0,1fr) auto!important}
#plan-measure-modal.rv .pm3-row:hover{background:#2F3A4A!important}
#plan-measure-modal.rv .pm3-row>i{width:12px!important;height:12px!important;border-radius:2px!important}
#plan-measure-modal.rv .pm3-row small{font-size:10.5px!important}
#plan-measure-modal.rv .pm3-ra{background:#2F3A4A!important}
.bc-cmd .rv-hint:empty::before{content:"Choisissez un outil dans le ruban…";color:#8A8A8A}
.rv-foot{overflow:hidden}
.rv-zoom .pmx-tb{max-width:280px;overflow:hidden}
.rv-zoom .pmx-set,.rv-zoom .pmx-set-tg,.rv-zoom .pmx-tb>.pmx-grp:not(.pmx-view){display:none!important}
.rv-pages span{color:#E0E0E0}
.rv-pages .rv-b.sm{width:18px!important;height:18px!important}
/* ===================== BricsCAD : disposition finale ===================== */
#plan-measure-modal.pmx.pmx2.pm3.rv.rb-on.bc .plan-measure-body{grid-template-columns:40px 0 minmax(0,1fr) auto 40px!important}
#plan-measure-modal.bc .bc-left{grid-column:1;grid-row:1;display:flex;flex-direction:column;align-items:center;gap:6px;padding:10px 0;background:#1F1F1F;border-right:1px solid #333;z-index:6}
#plan-measure-modal.bc .bc-left .rv-b,#plan-measure-modal.bc .rv-left .rv-b{width:30px;height:30px;color:#D6D6D6;border-radius:3px}
#plan-measure-modal.bc .bc-left .rv-b svg,#plan-measure-modal.bc .rv-left .rv-b svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.6}
#plan-measure-modal.rb-on.bc .rv-left{grid-column:5!important;background:#1F1F1F!important;border-right:0!important;border-left:1px solid #333!important;padding-top:10px}
#plan-measure-modal.bc .rv-left .rv-sep{width:22px;background:#3A3A3A}
#plan-measure-modal.pmx.pmx2.pm3.rv.bc .pm3-side,#plan-measure-modal.bc .plan-measure-body>#pm-net-panel,#plan-measure-modal.bc .plan-measure-body>#pa-panel,#plan-measure-modal.pmx.pmx2.pm3.rv.pm3-full.bc .plan-measure-list-wrap{grid-column:4!important}
/* En-tête = barre de titre + barre d'accès rapide */
#plan-measure-modal.bc .pm3-head{height:34px!important;background:#2B2B2B!important;gap:6px!important}
#plan-measure-modal.bc .pm3-head>[data-pm3-back]{display:none!important}
#plan-measure-modal.bc .pm3-ht{max-width:260px!important}
.bc-qat{display:flex;align-items:center;gap:1px;margin-left:8px}
.bc-q{width:26px;height:26px;display:grid;place-items:center;border:1px solid transparent;border-radius:2px;background:none;color:#D6D6D6;cursor:pointer}
.bc-q:hover{background:#3C3C3C;border-color:#4A4A4A}
.bc-q svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.bc-qs{width:1px;height:18px;background:#4A4A4A;margin:0 5px}
.bc-sel{height:22px;min-width:120px;padding:0 6px;background:#3A3A3A;border:1px solid #4A4A4A;border-radius:0;color:#E6E6E6;font:inherit;font-size:12px;text-align:left;cursor:pointer;margin-left:4px}
.bc-sel:disabled{opacity:.8}
/* Rangée d'onglets avec recherche */
.bc-tabrow{height:30px!important;background:#2B2B2B!important}
.bc-search{margin-left:auto;display:flex;align-items:center;gap:6px;height:22px;width:220px;padding:0 8px;background:#1F1F1F;border:1px solid #3A3A3A;border-radius:2px;color:#9A9A9A}
.bc-search svg{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:2}
.bc-search input{flex:1;min-width:0;background:none;border:0;outline:0;color:#E6E6E6;font:inherit;font-size:12px}
/* Ruban : grandes icônes, objets clairs avec accents de couleur, groupes sans cadre */
.rb{background:#2B2B2B!important}
.rb-row{padding:6px 10px 0!important;gap:8px!important}
.rb-grp{border-right:0!important;padding:0 4px!important}
.rb-grp+.rb-grp{border-left:1px solid #3A3A3A!important;padding-left:12px!important}
.rb-items{gap:4px!important}
.rb-b{min-width:50px!important;max-width:78px;height:66px!important;font-size:11.5px!important;color:#E8E8E8!important;padding:3px 4px!important}
.rb-b svg.ti{width:34px!important;height:34px!important;min-height:34px;flex:0 0 34px!important;stroke-width:1.25!important}
.rb-b svg.ti .ti-s *{stroke:#EDEDED!important}
.rb-b svg.ti .ti-f *{fill-opacity:.6!important}
.rb-grp>small{font-size:10.5px!important;color:#C8C8C8!important;margin:2px 0 4px!important}
/* Onglets de documents */
.bc-docs{height:26px!important;background:#1F1F1F!important}
.bc-doc{height:22px!important;font-size:12px!important;background:#2B2B2B!important}
.bc-doc.on{background:#1F1F1F!important;border-color:#4A4A4A!important;font-weight:700;font-style:normal!important}
/* Ligne de commande flottante */
#plan-measure-modal.bc .plan-measure-body>.bc-cmd{position:absolute;left:calc(50% - 190px);transform:translateX(-50%);bottom:14px;width:min(640px,46%);height:24px;background:rgba(28,28,28,.92);border:1px solid #3A3A3A;border-radius:2px;z-index:9;box-shadow:0 2px 8px rgba(0,0,0,.4)}
/* Barre d'état */
.rv-foot::before{display:none!important}
.bc-layouts{display:flex;align-items:stretch;height:100%;margin-right:auto}
.bc-layouts button{border:0;border-right:1px solid #3A3A3A;background:none;color:#BDBDBD;font:inherit;font-size:11px;padding:0 10px;cursor:pointer}
.bc-layouts button.on{color:#fff;font-weight:700;background:#1F1F1F}
.bc-tog{display:flex;align-items:stretch;height:100%;gap:0}
.bc-tog>*{display:flex;align-items:center;padding:0 7px;border:0;border-left:1px solid #3A3A3A;background:none;color:#8C8C8C;font:inherit;font-size:10.5px;letter-spacing:.03em;cursor:pointer}
.bc-tog .bc-xy{color:#D6D6D6;font-family:Consolas,monospace;min-width:150px;justify-content:flex-end;cursor:default}
.bc-tog button.on{color:#fff;background:#3A5A88}
#plan-measure-modal.bc .rv-pages{display:none!important}
#plan-measure-modal .bc-sel,#plan-measure-modal select.bc-sel{background:#3A3A3A!important;color:#E6E6E6!important;border:1px solid #4A4A4A!important;border-radius:0!important;box-shadow:none!important;height:22px!important;padding:0 6px!important;font-size:12px!important}
.bc-search{background:#1F1F1F!important}
.bc-search input,.bc-search input[type=search]{background:transparent!important;border:0!important;box-shadow:none!important;color:#E6E6E6!important;height:20px!important;padding:0!important;font-size:12px!important}
.rb-b svg.ti .ti-f *{fill-opacity:.38!important}
/* Icônes BIM, plus petites */
.rb-b svg.bim{width:28px!important;height:28px!important;min-height:28px;flex:0 0 28px!important}
.rb-b{height:56px!important;min-width:46px!important;font-size:11px!important}
.rb-b.on svg.bim{filter:drop-shadow(0 0 2px rgba(47,129,247,.8))}
/* Plan plus grand : barres compactes, ruban repliable */
#plan-measure-modal.bc .pm3-head{height:28px!important}
.bc-tabrow{height:26px!important}
.bc-tabrow .rb-tab{height:26px!important;font-size:12px!important;padding:0 10px!important}
.rb-row{padding:3px 8px 0!important;gap:6px!important}
.rb-b{height:auto!important;min-height:44px;min-width:42px!important;max-width:70px;padding:2px 3px!important;font-size:10.5px!important;line-height:1.1!important;gap:2px!important}
.rb-b span{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.rb-b svg.bim{width:24px!important;height:24px!important;min-height:24px;flex:0 0 24px!important}
.rb-grp>small{margin:1px 0 2px!important;font-size:9.5px!important}
.bc-docs{height:22px!important}.bc-doc{height:20px!important;font-size:11px!important}
.rv-foot{height:22px!important}
#plan-measure-modal.bc-rb-min .rb{display:none}
#plan-measure-modal.bc-rb-min.bc-rb-peek .rb{display:block;position:absolute;left:0;right:0;top:54px;z-index:30;box-shadow:0 8px 20px rgba(0,0,0,.5)!important}
.bc-mini{margin-left:6px;width:22px;height:20px;border:1px solid #3A3A3A;background:#1F1F1F;color:#D6D6D6;font-size:11px;cursor:pointer;border-radius:2px}
#plan-measure-modal .bc-qat select,#plan-measure-modal .bc-qat .bc-sel{background:#3A3A3A!important;color:#E6E6E6!important;border:1px solid #4A4A4A!important;border-radius:0!important;height:20px!important;min-height:0!important;padding:0 6px!important;font-size:11.5px!important;box-shadow:none!important;width:auto!important}
#plan-measure-modal .bc-search,#plan-measure-modal .bc-search:focus-within{background:#1F1F1F!important;border:1px solid #3A3A3A!important;height:20px!important}
#plan-measure-modal .bc-search input{background:transparent!important;border:0!important;outline:0!important;box-shadow:none!important;color:#E6E6E6!important;height:18px!important;min-height:0!important;padding:0!important;font-size:11.5px!important;width:100%!important}
.pn-zone td small{display:block;font-size:10.5px;opacity:.7;font-weight:400}
.pn-zone td{vertical-align:top;border-bottom:1px solid rgba(255,255,255,.06)}
/* Ruban encore plus fin ; fond de l'espace objet AutoCAD */
.rb-row{padding:2px 6px 0!important;gap:4px!important}
.rb-b{min-height:0!important;height:38px!important;min-width:38px!important;max-width:none!important;padding:1px 4px!important;font-size:10.5px!important;gap:1px!important;white-space:nowrap!important}
.rb-b span{display:block!important;-webkit-line-clamp:unset!important;white-space:nowrap!important}
.rb-b svg.bim{width:20px!important;height:20px!important;min-height:20px;flex:0 0 20px!important}
.rb-grp>small{margin:0 0 1px!important;font-size:9px!important;line-height:11px}
.bc-tabrow{height:24px!important}.bc-tabrow .rb-tab{height:24px!important;font-size:11.5px!important}
#plan-measure-modal.bc .pm3-head{height:26px!important}
.bc-docs{height:20px!important}.bc-doc{height:18px!important;font-size:10.5px!important}
#plan-measure-modal.pmx.pmx2.pm3.rv .plan-measure-canvas-wrap,#plan-measure-modal.pmx.pmx2.pm3.rv .plan-measure-canvas-wrap.is-cad-dark,#plan-measure-modal.pmx.pmx2.pm3.rv.pm-dark .plan-measure-body{background:#212830!important;background-image:none!important}
.bc-app{display:none!important}
.rb-b svg.bim{width:26px!important;height:26px!important;min-height:26px;flex:0 0 26px!important;filter:drop-shadow(0 1px 1px rgba(0,0,0,.45))}
.rb-b{height:42px!important}
.rb-b span{max-width:none!important;overflow:visible!important}
#pm-prog .pp-zone{display:block;width:calc(100% - 16px);margin:8px;height:34px;font-weight:700}
