:root{--onglets:0px;--p:#111;--s:#FFD800;--a:#C8102E;--bg:#EDEDEA;--card:#fff;--tx:#111;--mut:#454545;--line:#BDBDB6;--ok:#2E7D32;--warn:#B45309;--bad:#B91C1C;--info:#1D4ED8;--r:6px;--side:236px;--font:system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;--sh:0 1px 2px rgba(0,0,0,.06),0 1px 3px rgba(0,0,0,.05);--topbar:54px;--tete:44px}
*{box-sizing:border-box}html,body{margin:0;height:100%}body{font-family:var(--font);font-size:14px;color:var(--tx);background:var(--bg);-webkit-font-smoothing:antialiased}
a{color:inherit}button,input,select,textarea{font:inherit;color:inherit}
.boot{display:flex;height:100vh;align-items:center;justify-content:center;color:#888}
.app{display:flex;height:100vh;overflow:hidden}
.side{width:var(--side);background:var(--p);color:#eee;flex-shrink:0;display:flex;flex-direction:column;position:sticky;top:0;height:100vh;overflow:auto;z-index:30}
.side .brand{padding:14px 14px 10px;border-bottom:3px solid var(--s);background:#fff}
.side .brand img{max-width:100%;max-height:48px;display:block}
.side .brand .nm{color:#111;font-weight:700}
.side nav{padding:8px 6px 20px}
.side .grp{font-size:10.5px;text-transform:uppercase;letter-spacing:.08em;color:#8d8d8d;margin:14px 10px 4px}
.side a.it{display:flex;align-items:center;gap:10px;padding:7px 10px;border-radius:5px;text-decoration:none;color:#ddd;font-size:13.5px}
.side a.it:hover{background:#262626;color:#fff}.side a.it.on{background:var(--s);color:#111;font-weight:600}
.side a.it svg{flex-shrink:0;opacity:.9}
.main{flex:1;min-width:0;display:flex;flex-direction:column;min-height:0}
.top{height:54px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:10px;padding:0 16px;position:sticky;top:0;z-index:20}
.top .search{flex:1;max-width:520px;position:relative}
.top .search input{width:100%;padding:8px 10px 8px 34px;border:1px solid var(--line);border-radius:20px;background:#fafafa}
.top .search svg{position:absolute;left:11px;top:9px;color:#888}
.results{position:absolute;top:40px;left:0;right:0;background:#fff;border:1px solid var(--line);border-radius:8px;box-shadow:0 8px 24px rgba(0,0,0,.12);max-height:420px;overflow:auto}
.results a{display:flex;gap:8px;padding:8px 12px;text-decoration:none;border-bottom:1px solid #f1f1f1}.results a:hover{background:#fffbe0}
.results .ty{font-size:11px;color:var(--mut);min-width:90px}
.iconbtn{position:relative;border:0;background:transparent;padding:7px;border-radius:6px;cursor:pointer;display:inline-flex;align-items:center;gap:6px}
.iconbtn:hover{background:#f0f0ee}.iconbtn:disabled{opacity:.35;cursor:default}.iconbtn:disabled:hover{background:transparent}
.top .retour{border:1px solid var(--line);border-radius:20px;padding:6px 12px 6px 8px}.dot{position:absolute;top:2px;right:2px;background:var(--a);color:#fff;border-radius:9px;font-size:10px;padding:0 5px;line-height:15px}
.content{padding:0 20px 60px;max-width:1500px;width:100%;flex:1;overflow:auto;scroll-padding-top:70px}
h1{font-size:21px;margin:0 0 4px}h2{font-size:16px;margin:0 0 10px}h3{font-size:14px;margin:14px 0 8px}
.sub{color:var(--mut);margin-bottom:14px}
.pagehead{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:14px}
.actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.btn{display:inline-flex;align-items:center;gap:6px;border:1px solid #cfcfca;background:#fff;padding:7px 12px;border-radius:var(--r);cursor:pointer;font-weight:500;text-decoration:none;white-space:nowrap}
.btn:hover{background:#f5f5f2}.btn:disabled{opacity:.5;cursor:not-allowed}
.btn.pri{background:var(--p);color:#fff;border-color:var(--p)}.btn.pri:hover{background:#333}
.btn.acc{background:var(--s);border-color:#e6c300;color:#111}.btn.acc:hover{filter:brightness(.96)}
.btn.dng{color:var(--bad);border-color:#f0c3c3}.btn.sm{padding:4px 8px;font-size:12.5px}.btn.big{padding:14px 18px;font-size:16px}
.card{background:var(--card);border:1px solid var(--line);border-radius:8px;box-shadow:var(--sh);padding:14px}
.grid{display:grid;gap:12px}.g2{grid-template-columns:repeat(2,minmax(0,1fr))}.g3{grid-template-columns:repeat(3,minmax(0,1fr))}.g4{grid-template-columns:repeat(4,minmax(0,1fr))}
.kpis{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:10px}
.kpi{display:block;text-decoration:none;background:#fff;border:1px solid var(--line);border-left:4px solid #cfcfca;border-radius:8px;padding:11px 12px;box-shadow:var(--sh)}
.kpi:hover{border-color:#bbb}.kpi .l{font-size:12.5px;color:var(--mut)}.kpi .v{font-size:22px;font-weight:700;margin-top:4px}.kpi .d{font-size:11.5px;color:var(--mut);margin-top:2px}
.kpi.action{border-left-color:var(--s)}.kpi.alerte{border-left-color:var(--a)}.kpi.ok{border-left-color:var(--ok)}.kpi.info{border-left-color:#999}
.sect{margin:18px 0 8px;font-size:12px;text-transform:uppercase;letter-spacing:.07em;color:var(--mut);font-weight:600}
table.t{width:100%;border-collapse:collapse;background:#fff}
table.t th{text-align:left;font-size:12px;font-weight:700;color:#222;background:#E4E4DF;border-bottom:1px solid var(--line);padding:8px;white-space:nowrap;position:sticky;top:var(--th-haut,0px);z-index:12}
table.t td{border-bottom:1px solid #D9D9D3;padding:7px 8px;vertical-align:top}
table.t tr.click:hover td{background:#fffbe6;cursor:pointer}table.t td.n,table.t th.n{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.tablewrap{overflow:auto;border:1px solid var(--line);border-radius:8px;background:#fff}
/* L'en-tête colle en haut de son propre cadre : c'est lui qui défile, pas la page. */
.tablewrap table.t th{top:0}
.chip{display:inline-flex;align-items:center;gap:4px;padding:2px 8px;border-radius:12px;font-size:12px;font-weight:500;background:#eee;color:#333;white-space:nowrap}
.chip.ok{background:#1E7B34;color:#fff}.chip.warn{background:#FFD800;color:#111}.chip.bad{background:#B91C1C;color:#fff}.chip.info{background:#1E40AF;color:#fff}.chip.mut{background:#D4D4CF;color:#222}
.muted{color:var(--mut)}.small{font-size:12px}.b{font-weight:600}.right{text-align:right}.nowrap{white-space:nowrap}.mono{font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12.5px}
.row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.between{justify-content:space-between}.col{display:flex;flex-direction:column;gap:6px}.grow{flex:1}
.form{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:10px 14px}
.fld{display:flex;flex-direction:column;gap:4px}.fld.wide{grid-column:1/-1}
.fld label{font-size:12px;color:#444;font-weight:600}.fld .req{color:var(--a)}
.in,select.in,textarea.in{border:1px solid #cfcfca;border-radius:var(--r);padding:7px 9px;background:#fff;width:100%;min-width:0}
.in:focus{outline:2px solid var(--s);outline-offset:0;border-color:#b69a00}textarea.in{min-height:70px;resize:vertical}
.in.sm{padding:4px 6px}.masked{background:repeating-linear-gradient(45deg,#f4f4f4,#f4f4f4 6px,#ececec 6px,#ececec 12px);color:#777}
.tabs{display:flex;flex-wrap:wrap;gap:2px 0;border-bottom:1px solid var(--line);margin-bottom:12px}
.tabs button{border:0;background:transparent;padding:9px 12px;cursor:pointer;border-bottom:3px solid transparent;color:#555;white-space:nowrap}
.tabs button.on{border-bottom-color:var(--s);color:#111;font-weight:600}
.modalbg{position:fixed;inset:0;background:rgba(0,0,0,.4);display:flex;align-items:flex-start;justify-content:center;z-index:100;padding:40px 12px;overflow:auto}
.modal{background:#fff;border-radius:10px;width:100%;max-width:640px;box-shadow:0 20px 60px rgba(0,0,0,.3)}
.modal.wide{max-width:980px}.modal .hd{padding:14px 16px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center}
.modal .bd{padding:16px}.modal .ft{padding:12px 16px;border-top:1px solid var(--line);display:flex;justify-content:flex-end;gap:8px}
.toast{position:fixed;bottom:18px;left:50%;transform:translateX(-50%);background:#111;color:#fff;padding:10px 16px;border-radius:8px;z-index:200;max-width:90vw;box-shadow:0 8px 24px rgba(0,0,0,.25)}
.toast.err{background:var(--bad)}
.alert{padding:10px 12px;border-radius:6px;margin:8px 0;border:1px solid}.alert.bad{background:#FDECEC;border-color:#F3C2C2;color:#7F1D1D}
.alert.warn{background:#FFF8E1;border-color:#F5D776;color:#6B4400}.alert.ok{background:#EAF6EC;border-color:#BFE0C5;color:#1E5A26}.alert.info{background:#EEF3FE;border-color:#C9D7FA;color:#1E3A8A}
.empty{padding:28px;text-align:center;color:var(--mut)}
.login{min-height:100vh;display:flex;align-items:center;justify-content:center;background:linear-gradient(160deg,#111 0,#111 45%,#FFD800 45%,#FFD800 47%,#f4f4f2 47%)}
.login .box{background:#fff;padding:28px;border-radius:12px;width:100%;max-width:400px;box-shadow:0 20px 50px rgba(0,0,0,.25)}
.login img{max-width:230px;margin-bottom:14px}
.demo-users{margin-top:14px;font-size:12px;color:#555;border-top:1px dashed #ddd;padding-top:10px}
.demo-users button{border:1px solid #ddd;background:#fafafa;border-radius:12px;padding:3px 8px;margin:2px;cursor:pointer;font-size:11.5px}
/* Agenda */
.ag{overflow:auto;border:1px solid var(--line);border-radius:8px;background:#fff}
.ag table{border-collapse:separate;border-spacing:0;min-width:100%}
.ag th,.ag td{border-right:1px solid #CFCFC8;border-bottom:1px solid #CFCFC8;padding:4px;vertical-align:top}
.ag th{background:#E4E4DF;font-size:12px;position:sticky;top:0;z-index:12;color:#111}.ag th.today{background:#FFD800;color:#111}.ag th.we{background:#D6D6D0}
.ag td.res{position:sticky;left:0;background:#fff;z-index:1;min-width:190px;max-width:210px;font-size:12.5px}
.ag td.cell{min-width:132px;height:54px;cursor:copy}.ag td.cell.drop{background:#FFE866;outline:2px dashed #111;outline-offset:-3px}.ag td.cell.we{background:#E9E9E4}
.blk{font-size:11.5px;border-radius:4px;padding:3px 5px;margin-bottom:3px;cursor:grab;border-left:4px solid #111;background:#FFD800;color:#111;line-height:1.25;overflow:hidden}
.blk.opt{background:#fff;border:2px dashed #111;border-left-width:4px}
.blk.rep{background:#B91C1C;border-left-color:#5c0d0d;color:#fff}.blk.rep .b{color:#fff!important}.blk.mis{background:#1E40AF;border-left-color:#0b1d5c;color:#fff}
.blk.una{background:#4B5563;border-left-color:#1f2937;color:#fff;cursor:default}.blk.una.panne{background:#7F1D1D;border-left-color:#3b0a0a}
.blk.forced{outline:2px dashed #B91C1C;outline-offset:1px}
.legend{display:flex;gap:14px;flex-wrap:wrap;font-size:12.5px;color:#222;margin:8px 0;position:sticky;top:calc(var(--tete) + var(--onglets));z-index:13;background:var(--bg);padding:6px 0}.legend span{display:inline-flex;align-items:center;gap:6px}
.legend i{width:16px;height:16px;border-radius:3px;display:inline-block;border:1px solid #111}
/* Chat */
.chat{display:flex;flex-direction:column;height:560px;border:1px solid var(--line);border-radius:8px;background:#fff}
.chat .msgs{flex:1;overflow:auto;padding:12px;display:flex;flex-direction:column;gap:8px;background:#fbfbf9}
.msg{max-width:78%;background:#fff;border:1px solid #e6e6e2;border-radius:10px;padding:8px 10px}.msg.me{align-self:flex-end;background:#FFF8CC;border-color:#f0dd7a}
.msg.sys{align-self:center;background:#eee;font-size:12px;color:#555}.msg .who{font-size:11.5px;color:var(--mut);margin-bottom:2px}
.chat .send{display:flex;gap:8px;padding:10px;border-top:1px solid var(--line)}
/* Assistant */
.assist{position:fixed;top:0;right:0;width:420px;max-width:100vw;height:100vh;background:#fff;border-left:1px solid var(--line);box-shadow:-10px 0 30px rgba(0,0,0,.12);z-index:60;display:flex;flex-direction:column}
.assist .hd{padding:12px 14px;border-bottom:3px solid var(--s);display:flex;justify-content:space-between;align-items:center;background:#111;color:#fff}
.assist .body{flex:1;overflow:auto;padding:12px;display:flex;flex-direction:column;gap:10px;background:#fafaf8}
.bubble{border-radius:10px;padding:9px 11px;white-space:pre-wrap;line-height:1.4}.bubble.q{align-self:flex-end;background:#111;color:#fff;max-width:85%}
.bubble.a{background:#fff;border:1px solid #e5e5e0}.cites{margin-top:6px;display:flex;flex-direction:column;gap:3px}.cites a{font-size:12px}
.proposal{border:2px dashed var(--s);border-radius:8px;padding:10px;background:#FFFCEB;margin-top:8px}
.ctxbox{font-size:11.5px;color:#666;background:#f2f2ef;border-radius:6px;padding:6px 8px;margin-top:6px}
.assist .inp{display:flex;gap:6px;padding:10px;border-top:1px solid var(--line)}
/* Mobile */
.mob-only{display:none}
.burger{display:none}
.bigbtns{display:grid;grid-template-columns:1fr 1fr;gap:10px}.bigbtns .btn{justify-content:center;padding:18px 10px;font-size:15px}
.sig{border:1px dashed #999;border-radius:6px;background:#fff;touch-action:none;width:100%;height:150px}
.steps{display:flex;gap:6px;flex-wrap:wrap;margin:6px 0}.steps .st{padding:3px 9px;border-radius:12px;background:#eee;font-size:12px}.steps .st.on{background:var(--p);color:#fff}.steps .st.done{background:#E6F4EA;color:#1E6B2A}
.lines td .in{padding:4px 6px}.totals{min-width:280px}.totals>div{display:flex;justify-content:space-between;gap:8px;padding:3px 0}.totals>div.small,.totals>div.alert{display:block}.totals .gt{font-weight:700;font-size:16px;border-top:2px solid var(--p);padding-top:6px;margin-top:4px}
.pbar{height:8px;background:#eee;border-radius:4px;overflow:hidden}.pbar i{display:block;height:100%;background:var(--s)}
.offline{background:var(--a);color:#fff;text-align:center;font-size:12.5px;padding:4px}
.checklist label{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:6px 0;border-bottom:1px solid #f0f0f0}
.seg{display:inline-flex;flex-wrap:wrap;max-width:100%;border:1px solid #ccc;border-radius:6px}.seg button{border:0;background:#fff;padding:5px 10px;cursor:pointer;border-right:1px solid #ddd}.seg button:first-child{border-radius:5px 0 0 5px}.seg button:last-child{border-right:0;border-radius:0 5px 5px 0}.seg button.on{background:var(--p);color:#fff}
@media (max-width:900px){
 .side{position:fixed;left:0;transform:translateX(-100%);transition:transform .2s;box-shadow:none}.side.open{transform:none;box-shadow:0 0 40px rgba(0,0,0,.4)}
 .burger{display:inline-flex}.content{padding:0 12px 80px}.g2,.g3,.g4{grid-template-columns:1fr}.mob-only{display:block}.desk-only{display:none}
 .top .uname{display:none}.assist{width:100vw}.modal{max-width:100%}.kpis{grid-template-columns:repeat(2,1fr)}
 .btn{padding:9px 12px}table.t td,table.t th{padding:7px 6px}
}
@media print{.side,.top,.assist,.actions,.noprint{display:none!important}.content{padding:0}body{background:#fff}}

/* Contraste : texte secondaire plus foncé */
.muted{color:#4a4a4a}.kpi .l,.kpi .d{color:#3d3d3d}.sub{color:#3d3d3d}.small.muted{color:#4a4a4a}
.kpi{border-color:#C9C9C2}.card{border-color:#C9C9C2}.in,select.in,textarea.in{border-color:#9d9d95}
/* Légende planning (couleurs franches) */
.legend i.t-pers,.rchip.t-pers{background:#FFD800;color:#111}.legend i.t-veh,.rchip.t-veh{background:#1E40AF;color:#fff}.legend i.t-mach,.rchip.t-mach{background:#111;color:#fff}
.legend i.t-cont,.rchip.t-cont{background:#6D28D9;color:#fff}.legend i.t-mat,.rchip.t-mat{background:#0F766E;color:#fff}.legend i.rep{background:#B91C1C}
.rchip{display:flex;align-items:center;gap:4px;font-size:11.5px;font-weight:600;border-radius:4px;padding:2px 4px 2px 5px;margin-bottom:3px;cursor:grab;border:1px solid #111;white-space:nowrap;overflow:hidden}
.rchip span{overflow:hidden;text-overflow:ellipsis}.rchip.rep{background:#B91C1C!important;color:#fff!important;border-style:dashed}
.rchip .x{margin-left:auto;border:0;background:rgba(0,0,0,.25);color:inherit;border-radius:3px;cursor:pointer;font-weight:700;padding:0 5px;line-height:15px}
.ag td.wcell{min-width:118px;height:64px}.sticky-l{position:sticky;left:0;z-index:1;background:#fff}.ag th.sticky-l{z-index:3;background:#E4E4DF}
.dropopts{display:flex;flex-wrap:wrap;gap:10px;align-items:center;background:#111;color:#fff;border-radius:6px;padding:7px 10px;margin-bottom:8px;font-size:13px}
.dropopts .in{width:auto;background:#fff;color:#111}.dropopts .small{color:#ddd}
/* Planning + réservoir : 1 écran = côte à côte ; 2 écrans = réservoir détaché */
.planwrap{display:grid;grid-template-columns:minmax(0,1fr);gap:12px}.planwrap.withpool{grid-template-columns:minmax(0,1fr) 430px}
.poolside{position:sticky;top:calc(var(--tete) + 10px);align-self:start;max-height:calc(100vh - 80px)}
.pool{background:#fff;border:2px solid #111;border-radius:8px;display:flex;flex-direction:column;max-height:calc(100vh - 80px)}
.pool.detached{max-height:none;min-height:100vh;border:0;border-radius:0}
.pool-hd{display:flex;align-items:center;gap:8px;padding:8px;background:#111;color:#fff;border-radius:6px 6px 0 0}.pool-hd .small{color:#ddd}
.pool-hd .iconbtn{color:#fff}.pool-body{overflow:auto;flex:1}
.pooltab th{position:sticky;top:0;z-index:12}.pooltab tr.filters th{top:31px;background:#F4F4F0;padding:4px;z-index:11}.pooltab .in.sm{min-width:60px}
tr.drag{cursor:grab}tr.drag:hover td{background:#FFF3A0}tr.drag.indisponible td{color:#555;background:#F1F1EE}tr.drag td svg{color:#555}
.ag tr.filters td{background:#F4F4F0}
.winwrap{padding:12px;background:#fff;min-height:100vh}
/* Calendrier mois / année */
.layers{display:flex;flex-wrap:wrap;gap:10px;margin:6px 0 12px}.lay{display:inline-flex;align-items:center;gap:6px;border:1px solid #111;border-radius:16px;padding:4px 10px;background:#fff;cursor:pointer;font-size:13px;font-weight:600}
.bub{display:inline-flex;min-width:18px;height:18px;padding:0 5px;border-radius:9px;font-size:11px;font-weight:700;align-items:center;justify-content:center;border:1px solid #111}
.b-chantier{background:#FFD800;color:#111}.b-mission{background:#1E40AF;color:#fff}.b-absence{background:#4B5563;color:#fff}.b-panne{background:#7F1D1D;color:#fff}.b-probleme{background:#DC2626;color:#fff}
.mgrid{display:grid;grid-template-columns:repeat(7,1fr);gap:4px}.mh{font-size:12px;font-weight:700;text-align:center;padding:4px;background:#E4E4DF;border-radius:4px}
.md{min-height:92px;border:1px solid #BDBDB6;border-radius:6px;background:#fff;text-align:left;padding:5px;cursor:pointer;display:flex;flex-direction:column;gap:4px;font:inherit}
.md:hover{border-color:#111}.md.we{background:#EFEFEA}.md.today{outline:3px solid #FFD800;outline-offset:-3px}.md.pb{border:2px solid #DC2626}.md .dn{font-weight:700}
.empty-d{border:0;background:transparent;min-height:0}.bubbles{display:flex;flex-wrap:wrap;gap:3px}
.ygrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:14px}.ymonth{background:#fff;border:1px solid #BDBDB6;border-radius:8px;padding:8px}
.ymh{border:0;background:#111;color:#fff;width:100%;border-radius:4px;padding:4px;font-weight:700;text-transform:capitalize;cursor:pointer;margin-bottom:6px}
.mgrid.small{gap:2px}.mgrid.small .mh{font-size:10px;padding:1px}.mgrid.small .md{min-height:30px;padding:2px;border-radius:3px;font-size:10.5px;gap:1px}
.bubbles.sm .bub{min-width:7px;width:7px;height:7px;padding:0;border-width:0}
/* Vue terrain (téléphone) */
.terrain{max-width:560px;margin:0 auto;display:flex;flex-direction:column;gap:10px}.t-hello{font-size:19px;font-weight:700}
.t-card{background:#fff;border:1px solid #BDBDB6;border-radius:10px;padding:12px;display:block;text-decoration:none;color:inherit}
.t-title{display:flex;align-items:center;gap:8px;font-weight:700;font-size:16px;margin-bottom:8px}
.t-item{display:block;padding:10px;border:1px solid #BDBDB6;border-radius:8px;margin-top:6px;text-decoration:none;color:inherit;background:#fff}.t-item:active{background:#FFF3A0}
.t-link{display:flex;justify-content:space-between;align-items:center;margin-top:8px;font-weight:600}
.t-big{display:flex;align-items:center;gap:10px;font-weight:700;font-size:16px;background:#111;color:#fff;border-color:#111}
.t-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.t-tile{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;min-height:96px;border:2px solid #111;border-radius:10px;background:#FFD800;color:#111;font-weight:700;font-size:14px;text-decoration:none;text-align:center;cursor:pointer;font-family:inherit}
.t-tile.red{background:#B91C1C;color:#fff;border-color:#5c0d0d}
.t-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;text-align:center}.t-stats div{background:#EDEDEA;border-radius:8px;padding:6px;font-size:12px}.t-stats b{display:block;font-size:22px}
.t-stats .red{background:#B91C1C;color:#fff}
@media (max-width:1100px){.planwrap.withpool{grid-template-columns:1fr}.poolside{position:static;max-height:none}.pool{max-height:520px}}
/* ---- v0.9.2 ---- */
.tgap{background:#B91C1C;color:#fff;font-size:11px;font-weight:700;border-radius:4px;padding:1px 5px;margin-bottom:3px;display:flex;align-items:center;gap:3px}
.legend i.gap{background:#B91C1C}
.md .ferie{display:block;font-size:10px;color:#6B21A8;font-weight:700;line-height:1.1}
.md.fer{background:#F5F0FF}
.t-card.install{background:#111;color:#fff}.t-card.install .small{color:#eee}
.scanvid{width:100%;border-radius:8px;background:#000;max-height:60vh}
.t-card.lev{display:flex;gap:10px;align-items:center;font-size:15px}
.lev-en_ordre{background:#E7F6EA;border-color:#1E7B34}.lev-non_conforme,.lev-echu{background:#FDECEC;border-color:#B91C1C;color:#7F1D1D}
.timer{font-size:34px;font-weight:800;font-variant-numeric:tabular-nums;text-align:center;letter-spacing:1px;margin:6px 0}
.t-tile.light{background:#fff;border-color:#BDBDB6}
.ok-txt{color:#1E7B34;font-weight:600}
.warn-bg{background:#FFD800!important;color:#000!important;font-weight:700}
.vehform{border:1px solid var(--line);border-radius:8px;padding:8px;margin-bottom:8px;display:flex;flex-direction:column;gap:6px}
.vehform .row>*{flex:1}
.stepgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:8px}
.stepgrid .btn{justify-content:center}
.sigpad{width:100%;height:160px;border:2px dashed #999;border-radius:8px;background:#fff;touch-action:none;display:block;margin-bottom:6px}
.pick{padding:6px 0;border-bottom:1px solid #eee}
.terrain.wide{max-width:760px}
.steps{display:flex;flex-wrap:wrap;gap:4px}.step{font-size:12px;border-radius:4px;padding:2px 6px;border:1px solid}
.step.ok{background:#1E7B34;color:#fff;border-color:#1E7B34}.step.bad{background:#B91C1C;color:#fff;border-color:#B91C1C}.step.wait{background:#fff;color:#454545;border-color:#999}
tr.row-bad td{background:#FDECEC}
.card.wide2,.grid .fld.wide{grid-column:1/-1}
.grid.g2>.fld.wide{background:var(--card);border:1px solid var(--line);border-radius:8px;padding:10px}
.postits{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:14px}
.postit{width:190px;min-height:110px;padding:10px;border-radius:4px;box-shadow:0 3px 8px rgba(0,0,0,.18);display:flex;flex-direction:column;justify-content:space-between;font-size:14px;white-space:pre-wrap}
.postit.jaune{background:#FFF59D}.postit.vert{background:#C8F7C5}.postit.bleu{background:#CFE3FF}.postit.rose{background:#FFD1E3}
.postit.done{opacity:.5;text-decoration:line-through}
.postit.new{background:#fff;border:2px dashed #BDBDB6;box-shadow:none}.postit.new textarea{border:0;resize:none;height:70px;font:inherit;background:transparent;outline:none}
.postit .iconbtn{padding:2px}
.hint{position:fixed;z-index:60;background:#111;color:#fff;border:0;border-radius:8px;padding:8px 10px;font-size:12.5px;max-width:320px;box-shadow:0 8px 24px rgba(0,0,0,.25);line-height:1.35}
.helpbox{position:fixed;z-index:300;width:320px;background:#fff;border:2px solid #111;border-radius:10px;padding:12px;box-shadow:0 10px 30px rgba(0,0,0,.3);font-size:14px}
.checklist .seg button{padding:6px 9px}
@media (max-width:480px){.checklist label{flex-wrap:wrap}.checklist label>span{flex:1 1 100%}}
/* ---- v0.9.3.1 : commandes figées pendant le défilement ---- */
.content .pagehead{position:sticky;top:0;z-index:15;background:var(--bg);margin:0 -20px 14px;padding:16px 20px 10px;border-bottom:1px solid transparent}
.content .pagehead.stuck{border-bottom-color:var(--line);box-shadow:0 4px 8px -6px rgba(0,0,0,.25)}
.content .pagehead.embarque{position:static;margin:0 0 10px;padding:0;background:transparent;box-shadow:none;border:0}
.content .card .pagehead,.content .modal .pagehead{position:static;margin:0 0 14px;padding:0;background:transparent;box-shadow:none;border:0}
.tablewrap{max-height:calc(100vh - 210px)}
table.t th{z-index:2}
.modal .hd{position:sticky;top:0;background:#fff;z-index:5;border-radius:10px 10px 0 0}
.modal .ft{position:sticky;bottom:0;background:#fff;z-index:5;border-radius:0 0 10px 10px}
@media (max-width:900px){.content .pagehead{margin:0 -12px 12px;padding:12px 12px 8px}.tablewrap{max-height:calc(100vh - 190px)}}
/* ---- v0.9.4 : menu par dossiers métier ---- */
.side .fold{margin:2px 0}
.side .fold-hd{display:flex;align-items:center;gap:9px;width:100%;border:0;background:transparent;color:#bdbdb6;font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;padding:9px 10px;border-radius:5px;cursor:pointer;text-align:left}
.side .fold-hd span{flex:1}.side .fold-hd:hover{background:#1f1f1f;color:#fff}
.side .fold.open>.fold-hd{color:#fff}
.side .fold-items{display:none;padding:0 0 6px 8px}.side .fold.open>.fold-items{display:block}
.side .fold-items a.it{font-size:13.5px;padding:6px 10px}
.side .dot-on{width:7px;height:7px;border-radius:50%;background:var(--s);display:inline-block}
/* Bandeau des procédures applicables à l'écran */
.procban{display:flex;align-items:center;gap:10px;flex-wrap:wrap;background:#EEF4FF;border:1px solid #BFD3FB;border-left:4px solid var(--info);border-radius:6px;padding:7px 12px;margin:0 0 12px;font-size:13px}
.procban .t{flex:1;min-width:200px}
.proc-steps{margin:8px 0 0;padding-left:20px}.proc-steps li{margin:4px 0}
/* Tuiles des bases de données */
.tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:12px}
.tile{display:flex;gap:12px;align-items:flex-start;background:#fff;border:1px solid #C9C9C2;border-radius:8px;padding:14px;text-decoration:none;color:inherit;cursor:pointer}
.tile:hover{border-color:#111;box-shadow:var(--sh)}.tile svg{flex-shrink:0;margin-top:2px}.tile .d{color:#4a4a4a;font-size:12.5px;margin-top:3px}
.shortcuts{display:flex;gap:6px;flex-wrap:wrap;margin:-4px 0 12px}.shortcuts .lbl{font-size:12px;color:#4a4a4a;align-self:center;margin-right:4px}
.filterban{display:flex;gap:10px;align-items:center;background:#FFF8D6;border:1px solid #E8D27A;border-radius:6px;padding:6px 12px;margin-bottom:10px;font-size:13px}
/* Fenêtres surgissantes des alertes (robots) */
.alertpops{position:fixed;left:calc(var(--side) + 16px);bottom:16px;z-index:90;display:flex;flex-direction:column;gap:8px;max-width:360px}
.alertpop{background:#fff;border:1px solid #F3C2C2;border-left:5px solid var(--bad);border-radius:8px;padding:10px 12px;box-shadow:0 8px 24px rgba(0,0,0,.18)}
@media (max-width:900px){.alertpops{left:12px;right:12px;max-width:none}}

/* ---- Volets figés : seul le contenu défile, jamais les commandes ----
   Les enveloppes neutres des pages sont effacées de la mise en page pour que la barre
   de commandes et les onglets se figent par rapport à la zone qui défile, où qu'ils soient. */
.content > div:not([class]):has(> .pagehead), .content > div:not([class]) > div:not([class]):has(> .pagehead){display:contents}
.content .pagehead h1{margin-bottom:2px}
.content .pagehead .sub{margin-bottom:0}
.tabs{position:sticky;top:var(--tete);z-index:14;background:var(--bg);box-shadow:0 1px 0 var(--line)}
.content .pagehead ~ * .tabs, .content .pagehead + .tabs{top:0}

.hint b{display:block;margin-bottom:2px}.hint .btn{background:#fff;color:#111;border:0}.hint .muted{color:#c9c9c4}

/* Réservoir : un carré par jour */
.jours{display:flex;gap:2px}
.jours .j{width:18px;height:18px;border-radius:4px;font-size:10px;line-height:18px;text-align:center;color:#fff;background:#1E7B34;font-weight:600}
.jours .j.a_arbitrer{background:#B45309}.jours .j.indisponible{background:#B91C1C}.jours .j.we{opacity:.55}

/* Dépôt de fichiers par glisser-déposer */
.depot{border:1.5px dashed transparent;border-radius:8px;padding:4px;min-width:150px}
.depot:hover{border-color:#cfcfca}
.depot.survol{border-color:var(--s);background:#fffbe0}
.depot.grand{border-color:#b9b9b2;padding:22px;text-align:center;background:#fff}
/* Aide à la rédaction : dicter, corriger / reformuler */
.assiste{display:flex;flex-direction:column;gap:6px;width:100%}
.assiste-champ{position:relative}.assiste-champ textarea{padding-right:40px;width:100%}.assiste.ligne .assiste-champ input{padding-right:70px;width:100%}
.assiste-btns{position:absolute;right:4px;top:4px;display:flex;gap:2px}.assiste:not(.ligne) .assiste-btns{flex-direction:column}
.assiste-btns .btn{padding:3px 6px;opacity:.65}.assiste-btns .btn:hover{opacity:1}.assiste-btns .btn.on{color:#c0392b;opacity:1;animation:pulse 1s infinite}
@keyframes pulse{50%{opacity:.4}}
.assiste-prop{border:1px dashed var(--line);border-radius:8px;padding:8px;background:#fffdf2}.assiste-texte{white-space:pre-wrap;margin:4px 0 8px}
/* Chat chantier façon messagerie : photos et séparateurs de jour */
.chat-photo{display:block;max-width:260px;max-height:260px;border-radius:8px;margin:4px 0;object-fit:cover}
.jour-sep{align-self:center;font-size:11.5px;color:var(--mut);background:#eee;border-radius:10px;padding:2px 10px;margin:6px 0}
.vignettes{display:flex;flex-wrap:wrap;gap:6px;margin:6px 0}.vignettes img{width:96px;height:96px;object-fit:cover;border-radius:6px;border:1px solid var(--line)}
/* Réunions : sondage de dates */
.sondage td.rep{text-align:center;cursor:default;font-weight:600}.sondage td.rep.oui{background:#e3f6e5;color:#1e7b34}.sondage td.rep.si_besoin{background:#fff4d6;color:#8a6100}.sondage td.rep.non{background:#fde7e7;color:#a32020}
.sondage td.moi{cursor:pointer;outline:2px solid #f0dd7a;outline-offset:-2px}.sondage th.accord{background:#e3f6e5}.sondage th.fixe{background:#1e7b34;color:#fff}
/* Visionneuse de documents (2e écran ou fenêtre à côté) */
.visionneuse{display:flex;flex-direction:column;height:100vh;background:#2b2b2b}
.vis-barre{display:flex;align-items:center;gap:8px;padding:6px 10px;background:var(--bg,#fff);border-bottom:1px solid var(--line);flex-wrap:wrap}
.vis-titre{flex:1;min-width:120px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.vis-corps{flex:1;display:flex;align-items:center;justify-content:center;overflow:auto}
.vis-corps img{max-width:100%;max-height:100%;object-fit:contain;background:#fff}.vis-corps iframe{width:100%;height:100%;border:0;background:#fff}
.vis-barre select.in{width:auto;max-width:260px}
.bigbtns .btn.big{flex:1 1 150px;min-width:0;white-space:normal}
.meme-bon td{border-top:none;padding-top:1px}

/* Téléphone : les couches figées se replient sur la seule barre du haut. */
@media (max-width:820px){:root{--tete:0px}}
