/* CouleurCafe — styles ported from the "Budget Secteurs" design. */
body{margin:0;background:#F4F5F7}
a{color:#1C5CAB}a:hover{color:#123F78}
.app{font-family:'IBM Plex Sans',system-ui,sans-serif;color:#14171C;font-variant-numeric:tabular-nums}
.sr{position:absolute;left:-9999px}
.mono{font-family:'IBM Plex Mono',ui-monospace,monospace}
.lbl{font-size:12px;color:#5F6573;font-weight:500}
.fl{font-size:13px;font-weight:600;color:#14171C}
.v.over{color:#B2450E}.v.under{color:#1C5CAB}.v.flat{color:#5F6573}
.dot-over{background:#EB6834}.dot-under{background:#2A78D6}.dot-flat{background:#8A909C}
.dot-act{background:#2A78D6}.dot-arch{background:#A3A8B3}.dot-new{background:#6250D6}
[x-cloak]{display:none!important}

/* Admin sidebar */
.side a.nav{display:flex;align-items:center;gap:10px;padding:9px 12px;border-radius:8px;color:#3D4350;text-decoration:none;font-size:14px;font-weight:500;min-height:24px}
.side a.nav:hover{background:#ECEEF2;color:#14171C}
.side a.nav.on{background:#E8F0FB;color:#123F78}
.side a.sub{display:flex;align-items:center;gap:10px;padding:6px 12px 6px 14px;border-radius:8px;color:#3D4350;text-decoration:none;font-size:13px}
.side a.sub:hover{background:#ECEEF2}
.side button.nav{font:inherit;width:100%;border:0;background:transparent;cursor:pointer;display:flex;align-items:center;gap:10px;padding:9px 12px;border-radius:8px;color:#3D4350;font-size:14px;font-weight:500}
.side button.nav:hover{background:#ECEEF2;color:#14171C}

/* Controls */
.card{background:#FFFFFF;border:1px solid #E1E4E9;border-radius:12px}
.btn{font:inherit;font-size:14px;font-weight:500;display:inline-flex;align-items:center;justify-content:center;gap:8px;height:40px;padding:0 16px;border-radius:8px;border:1px solid #CDD2DA;background:#FFFFFF;color:#14171C;cursor:pointer;white-space:nowrap;text-decoration:none;box-sizing:border-box}
.btn:hover{background:#F4F5F7;color:#14171C}
.btn:disabled{color:#8A909C;background:#F7F8FA;cursor:not-allowed}
.btn.pri{background:#1C5CAB;border-color:#1C5CAB;color:#FFFFFF}
.btn.pri:hover{background:#174D90}
.btn.pri:disabled{background:#A9BFDD;border-color:#A9BFDD;color:#FFFFFF}
.btn.danger{color:#9A3C0C;border-color:#F0C3AA}
.btn.danger:hover{background:#FDEEE6}
.btn.sm{height:32px;padding:0 12px;font-size:13px}
.fsel{font:inherit;font-size:14px;height:40px;padding:0 12px;border-radius:8px;border:1px solid #CDD2DA;background:#FFFFFF;color:#14171C}
.fi{font:inherit;font-size:14px;height:40px;width:100%;box-sizing:border-box;border:1px solid #CDD2DA;border-radius:8px;padding:0 12px;color:#14171C;background:#FFFFFF}
.fi[readonly]{background:#F7F8FA;color:#3D4350}
.fi.err{border-color:#B2450E;box-shadow:0 0 0 1px #B2450E}
.ta{font:inherit;font-size:14px;line-height:1.45;width:100%;box-sizing:border-box;border:1px solid #CDD2DA;border-radius:8px;padding:10px 12px;resize:vertical;color:#14171C;background:#FFFFFF}
.rsel{font:inherit;font-size:13px;height:34px;padding:0 8px;border-radius:8px;border:1px solid #CDD2DA;background:#FFFFFF;color:#14171C}
.fi:focus,.ta:focus,.rsel:focus,.fsel:focus,.selc:focus{outline:2px solid #1C5CAB;outline-offset:1px}
.iconbtn{width:36px;height:36px;border-radius:8px;border:0;background:transparent;color:#5F6573;display:inline-flex;align-items:center;justify-content:center;cursor:pointer}
.iconbtn:hover{background:#ECEEF2;color:#14171C}
.iconbtn.danger:hover{background:#FDEEE6;color:#9A3C0C}
.av{width:28px;height:28px;border-radius:50%;background:#E8F0FB;color:#123F78;font-size:11px;font-weight:600;display:flex;align-items:center;justify-content:center;flex:none}
.av.lg{width:32px;height:32px;font-size:12px}
.av.sm{width:24px;height:24px;font-size:10px;border:2px solid #FFFFFF;margin-left:-6px}
.av.sm:first-child{margin-left:0}
.chip{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:500;padding:3px 8px;border-radius:999px;background:#F0F1F4;color:#3D4350}
.chip.over,.chip.warn{background:#FDEEE6;color:#9A3C0C}
.chip.under,.chip.ok{background:#E8F0FB;color:#1C5CAB}
.chip.flat{background:#F0F1F4;color:#3D4350}
.err-t{font-size:12px;color:#9A3C0C;display:flex;align-items:center;gap:6px}

/* Tables & charts (overview, analyses) */
.tbl{width:100%;border-collapse:collapse;font-size:14px}
.tbl th{font-size:12px;font-weight:600;color:#5F6573;text-align:left;padding:10px 12px;border-bottom:1px solid #E1E4E9;white-space:nowrap;background:#FAFBFC}
.tbl td{padding:12px;border-bottom:1px solid #EEF0F3;white-space:nowrap}
.tbl tbody tr:hover td{background:#F8F9FB}
.tbl .r{text-align:right}
.tbl tfoot td{font-weight:600;border-top:1px solid #CDD2DA;border-bottom:0;background:#FAFBFC}
.track{position:relative;height:8px;border-radius:4px;background:#EEF0F3;width:140px}
.fill{position:absolute;left:0;top:0;bottom:0;background:#2A78D6;border-radius:4px 0 0 4px}
.overfill{position:absolute;top:0;bottom:0;background:#EB6834;border-radius:0 4px 4px 0;margin-left:2px}
.mark100{position:absolute;top:-3px;bottom:-3px;width:2px;background:#14171C;left:83.333%}
.feed li{list-style:none;display:flex;gap:12px;padding:12px 0;border-bottom:1px solid #EEF0F3}
.feed li:last-child{border-bottom:0}
.fchip{font:inherit;font-size:13px;font-weight:500;height:36px;padding:0 14px;border-radius:999px;border:1px solid #CDD2DA;background:#FFFFFF;color:#3D4350;cursor:pointer;display:inline-flex;align-items:center;gap:6px}
.fchip:hover{background:#F4F5F7}
.fchip.on{background:#14171C;border-color:#14171C;color:#FFFFFF}
.hm{height:36px;border-radius:4px;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:500}
.h0c{background:#F7F8FA;color:#8A909C}.h1c{background:#256ABF;color:#FFFFFF}.h2c{background:#B7D3F6;color:#14171C}.h3c{background:#F0EFEC;color:#14171C}.h4c{background:#F6C4AC;color:#14171C}.h5c{background:#EB6834;color:#14171C}
.role{font:inherit;font-size:12px;font-weight:500;height:30px;min-width:96px;padding:0 10px;border-radius:6px;border:1px solid transparent;cursor:pointer}
.role.r-resp{background:#14171C;color:#FFFFFF}
.role.r-edit{background:#E8F0FB;color:#123F78;border-color:#B7D3F6}
.role.r-read{background:#F4F5F7;color:#3D4350;border-color:#E1E4E9}
.role.r-none{background:#FFFFFF;color:#8A909C;border-color:#E1E4E9;border-style:dashed}

/* Sector management */
.srow{display:flex;align-items:center;gap:12px;width:100%;text-align:left;font:inherit;padding:12px 14px;border:0;border-bottom:1px solid #EEF0F3;background:#FFFFFF;cursor:pointer;color:#14171C}
.srow:hover{background:#F8F9FB}
.srow.on{background:#E8F0FB;box-shadow:inset 3px 0 0 #1C5CAB}
.srow.arch{color:#5F6573}
.urow{display:grid;grid-template-columns:minmax(0,1fr) 150px 40px;gap:12px;align-items:center;padding:10px 0;border-bottom:1px solid #EEF0F3}
.pick{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:8px}
.pick:hover{background:#F4F5F7}

/* Sector sheet (spreadsheet) */
.top a.nav{display:inline-flex;align-items:center;gap:8px;height:40px;padding:0 12px;border-radius:8px;color:#3D4350;text-decoration:none;font-size:14px;font-weight:500}
.top a.nav:hover{background:#ECEEF2;color:#14171C}
.top a.nav.on{background:#E8F0FB;color:#123F78}
.sheet .btn{height:36px;padding:0 14px}
.selc{font:inherit;font-size:14px;height:36px;padding:0 10px;border-radius:8px;border:1px solid #CDD2DA;background:#FFFFFF;color:#14171C}
.selc.big{font-size:18px;font-weight:600;height:40px;border-color:transparent;background:transparent;padding:0 6px;margin-left:-6px}
.selc.big:hover{background:#ECEEF2}
.kpi{display:flex;flex-direction:column;gap:2px;padding:0 20px;border-left:1px solid #E1E4E9}
.kpi:first-child{border-left:0;padding-left:0}
.kpi b{font-size:18px;font-weight:600}
.gridbox{overflow:auto;max-height:600px;background:#FFFFFF;border-bottom:1px solid #CDD2DA}
.row{display:grid;grid-template-columns:48px 268px 172px 124px 132px 132px 124px 92px minmax(136px,1fr);min-width:1180px}
.c{height:32px;box-sizing:border-box;border-right:1px solid #E6E8EC;border-bottom:1px solid #E6E8EC;display:flex;align-items:center;gap:6px;padding:0 8px;font-size:13px;position:relative;background:#FFFFFF;min-width:0;overflow:hidden;white-space:nowrap;cursor:cell}
.c.num{justify-content:flex-end}
.c.sel{box-shadow:inset 0 0 0 2px #1C5CAB;overflow:visible;z-index:2}
.c.sel::after{content:'';position:absolute;right:-4px;bottom:-4px;width:7px;height:7px;background:#1C5CAB;border:1px solid #FFFFFF}
.gut{position:sticky;left:0;z-index:3;background:#F4F5F7;color:#5F6573;font-size:11px;justify-content:center;padding:0;cursor:default}
.ca{position:sticky;left:48px;z-index:3}
.c.ca.sel{z-index:4}
.hdr .c{height:26px;background:#F4F5F7;color:#5F6573;font-size:11px;font-weight:500;justify-content:center;position:sticky;top:0;z-index:5;cursor:default}
.hdr .c.on{background:#DCE7F7;color:#123F78;font-weight:600}
.hdr .gut,.thead .gut{z-index:7}
.hdr .ca,.thead .ca{z-index:6}
.thead .c{position:sticky;top:26px;z-index:5;background:#FAFBFC;font-size:12px;font-weight:600;color:#3D4350;height:34px;cursor:default;border-bottom:1px solid #CDD2DA}
.row.cat .c{background:#F1F4F9;font-weight:600}
.row.cat .gut{background:#E6EBF2}
.row.rowsel .gut{background:#DCE7F7;color:#123F78;font-weight:600}
.row.kid .c{background:#FBFCFD}
.row.kid .gut{background:#F4F5F7}
.row.ghost .c{color:#5F6573;background:#FFFFFF}
.row.total .c{background:#F4F5F7;font-weight:700;border-top:1px solid #CDD2DA;height:36px}
.in{font:inherit;font-size:13px;border:0;background:transparent;width:100%;height:30px;padding:0;color:#14171C;outline:none;min-width:0;cursor:cell}
.in.num{text-align:right}
.in.ana{font-family:'IBM Plex Mono',ui-monospace,monospace;font-size:12px}
.in[readonly]{cursor:cell;color:#3D4350}
.in::placeholder{color:#8A909C}
.fx{font-family:'IBM Plex Mono',ui-monospace,monospace;font-size:11px;color:#1C5CAB;background:#E8F0FB;border-radius:4px;padding:1px 5px;margin-right:auto}
.chev{width:24px;height:24px;border:0;background:transparent;border-radius:4px;display:inline-flex;align-items:center;justify-content:center;color:#3D4350;cursor:pointer;flex:none;padding:0}
.chev:hover{background:#E1E4E9}
.chev svg{transition:transform .15s}
.chev.open svg{transform:rotate(90deg)}
.pill{font-size:11px;font-weight:500;color:#1C5CAB;background:#E8F0FB;border-radius:999px;padding:1px 7px;flex:none}
.combtn{display:inline-flex;align-items:center;gap:4px;height:24px;padding:0 6px;border-radius:6px;border:0;background:transparent;color:#5F6573;font:inherit;font-size:12px;font-weight:500;cursor:pointer;flex:none}
.combtn:hover{background:#E1E4E9;color:#14171C}
.combtn.on{background:#DCE7F7;color:#123F78}
.ghostbtn{display:inline-flex;align-items:center;gap:6px;border:0;background:transparent;font:inherit;font-size:13px;color:#1C5CAB;cursor:pointer;padding:0 4px;height:28px;border-radius:6px}
.ghostbtn:hover{background:#E8F0FB}
.del{width:24px;height:24px;border:0;background:transparent;border-radius:4px;color:#5F6573;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;flex:none;padding:0;opacity:0}
.row:hover .del,.del:focus-visible{opacity:1}
.del:hover{background:#FDEEE6;color:#9A3C0C}
.tab{font:inherit;font-size:13px;font-weight:500;height:34px;padding:0 14px;border:1px solid #E1E4E9;border-top:0;background:#F4F5F7;color:#3D4350;cursor:pointer;display:inline-flex;align-items:center;gap:8px;border-radius:0 0 8px 8px;margin-top:-1px;text-decoration:none}
.tab:hover{background:#ECEEF2;color:#3D4350}
.tab.on{background:#FFFFFF;color:#123F78;font-weight:600;border-color:#CDD2DA;box-shadow:inset 0 2px 0 #1C5CAB}
.c.hascom{overflow:visible}
.c.hascom:hover{z-index:10}
.cmark{position:absolute;top:0;right:0;width:18px;height:18px;padding:0;border:0;background:transparent;cursor:pointer;z-index:3}
.cmark::after{content:'';position:absolute;top:0;right:0;border-style:solid;border-width:0 9px 9px 0;border-color:transparent #6250D6 transparent transparent}
.c.resolved .cmark::after{border-color:transparent #A3A8B3 transparent transparent}
.cpop{display:none;position:absolute;top:calc(100% + 4px);right:0;width:270px;white-space:normal;text-align:left;background:#FFFFFF;border:1px solid #CDD2DA;border-radius:8px;padding:10px 12px;box-shadow:0 8px 24px rgba(20,23,28,.16);z-index:20;font-size:12px;line-height:1.45;color:#14171C;pointer-events:none;font-weight:400}
.c.hascom:hover .cpop{display:block}
.badge-adm{font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.04em;color:#4A3BB0;background:#EEEBFB;border-radius:4px;padding:1px 6px}
.fxbtn{display:inline-flex;align-items:center;gap:6px;height:26px;padding:0 10px;border-radius:6px;border:1px solid #CDD2DA;background:#FFFFFF;font:inherit;font-size:12px;font-weight:500;color:#14171C;cursor:pointer;margin-left:8px}
.fxbtn:hover{background:#F4F5F7}
.cadd{position:absolute;left:4px;top:50%;transform:translateY(-50%);width:24px;height:24px;border:0;border-radius:6px;background:#EEEBFB;color:#4A3BB0;display:inline-flex;align-items:center;justify-content:center;opacity:0;cursor:pointer;padding:0;z-index:3}
.c:hover .cadd,.c.sel .cadd,.cadd:focus-visible{opacity:1}
.cadd:hover{background:#DDD7F7}
.ctx{position:fixed;z-index:50;min-width:220px;background:#FFFFFF;border:1px solid #CDD2DA;border-radius:8px;box-shadow:0 8px 24px rgba(20,23,28,.16);padding:4px;display:flex;flex-direction:column}
.ctx button{font:inherit;font-size:13px;text-align:left;border:0;background:transparent;color:#14171C;padding:0 10px;height:32px;border-radius:6px;cursor:pointer}
.ctx button:hover,.ctx button:focus-visible{background:#F1F4F9;outline:none}
.ctx button.danger{color:#9A3C0C}
.ctx button.danger:hover,.ctx button.danger:focus-visible{background:#FDEEE6}
.ctx-sep{height:1px;background:#E1E4E9;margin:4px 0}
