:root { --bg:#f4f5f8; --panel:#fff; --ink:#1b2130; --muted:#667085; --line:#e4e7ee; --brand:#d62828; --side:#141a29; --side-ink:#c6cddc;
  --ok:#17803f; --ok-bg:#e3f5ea; --warn:#9a5b00; --warn-bg:#fdf0d5; --none:#52586a; --none-bg:#eceef3; --focus:#2563eb; }
@media (prefers-color-scheme: dark) { :root { --bg:#0e131f; --panel:#171e2e; --ink:#e7eaf2; --muted:#8f98ad; --line:#263049; --side:#090d16;
  --ok:#5fd18a; --ok-bg:#12331f; --warn:#f2b44d; --warn-bg:#3a2a0c; --none:#a4abbc; --none-bg:#232b3f; } }
* { box-sizing:border-box }
body { margin:0; font:14px/1.5 system-ui,"Segoe UI",Roboto,sans-serif; background:var(--bg); color:var(--ink); }
[hidden] { display:none !important }
button, input, select { font:inherit; color:inherit }
:focus-visible { outline:2px solid var(--focus); outline-offset:2px }
main a:not(.btn) { color:#4c8dff } .muted { color:var(--muted) } .small { font-size:12px } .sp { flex:1 }
.err { color:var(--brand) } .banner { padding:8px 20px; background:var(--warn-bg) }
.btn { cursor:pointer; background:var(--panel); border:1px solid var(--line); border-radius:8px; padding:7px 13px }
.btn:hover { border-color:var(--brand) } .btn.pri { background:var(--brand); border-color:var(--brand); color:#fff; font-weight:600 }
input, select { background:var(--bg); border:1px solid var(--line); border-radius:8px; padding:7px 10px }

#login { min-height:100vh; display:grid; place-items:center; padding:16px }
.login-card { background:var(--panel); border:1px solid var(--line); border-radius:14px; padding:28px; width:min(380px,100%); display:grid; gap:12px }
.login-card label { display:grid; gap:4px; font-size:13px; color:var(--muted) }
.brand { font-weight:800; letter-spacing:.3px } .brand span { color:var(--brand) } .brand.big { font-size:26px; color:var(--ink) }

#shell { display:flex; min-height:100vh }
nav { width:236px; flex-shrink:0; background:var(--side); color:var(--side-ink); padding:14px 0; display:flex; flex-direction:column; position:sticky; top:0; height:100vh; overflow:auto }
nav .brand { color:#fff; font-size:19px; padding:6px 18px 14px }
nav h3 { font-size:11px; letter-spacing:.9px; text-transform:uppercase; opacity:.55; margin:14px 18px 4px; font-weight:600 }
nav a { display:flex; align-items:center; gap:10px; padding:9px 18px; color:inherit; text-decoration:none; border-left:3px solid transparent }
nav a:hover { background:rgba(255,255,255,.07) } nav a.on { background:rgba(255,255,255,.12); color:#fff; border-left-color:var(--brand) }
nav a.soon { opacity:.6 } nav a .tag { margin-left:auto; font-size:10px; border:1px solid rgba(255,255,255,.3); border-radius:99px; padding:0 6px }
nav svg { width:17px; height:17px; stroke:currentColor; fill:none; stroke-width:1.8; flex-shrink:0 }
main { flex:1; min-width:0; display:flex; flex-direction:column }
header { display:flex; align-items:center; gap:12px; padding:12px 22px; background:var(--panel); border-bottom:1px solid var(--line); position:sticky; top:0; z-index:5 }
header h1 { font-size:17px; margin:0 }
.demo { font-size:12px; color:var(--warn); background:var(--warn-bg); padding:2px 9px; border-radius:99px }
#view { padding:20px 22px 40px }

.kpis { display:grid; grid-template-columns:repeat(auto-fit,minmax(170px,1fr)); gap:14px; margin-bottom:18px }
.card { background:var(--panel); border:1px solid var(--line); border-radius:12px; padding:16px }
.kpi b { display:block; font-size:28px; line-height:1.15 } .kpi span { color:var(--muted); font-size:13px }
.kpi.ok b { color:var(--ok) } .kpi.warn b { color:var(--warn) }
.cols { display:grid; grid-template-columns:minmax(0,3fr) minmax(0,2fr); gap:14px } @media (max-width:980px) { .cols { grid-template-columns:1fr } }
.card h2 { font-size:14px; margin:0 0 10px }

.bell { position:relative; padding:6px 10px } .bell.on { border-color:var(--brand) }
.bell i { position:absolute; top:-6px; right:-6px; min-width:18px; height:18px; border-radius:9px; background:var(--brand); color:#fff; font:600 11px/18px system-ui; font-style:normal; text-align:center; padding:0 4px }
.rempop { position:fixed; top:58px; right:16px; z-index:60; width:min(420px,calc(100vw - 32px)); max-height:calc(100vh - 80px); overflow:auto; background:var(--panel); border:1px solid var(--line); border-radius:12px; box-shadow:0 8px 28px rgba(0,0,0,.3); padding:12px 14px }
.rempop h4 { margin:12px 0 4px; font-size:12px; color:var(--muted); text-transform:uppercase; letter-spacing:.03em }
.remi { display:flex; gap:8px; justify-content:space-between; align-items:center; padding:8px 0; border-top:1px solid var(--line) } .remi.due b { color:var(--brand) } .remi.done b { text-decoration:line-through; opacity:.6 }
.fchip { display:inline-flex; gap:3px; align-items:baseline; font-size:11.5px; color:var(--muted); border:1px solid var(--line); border-radius:6px; padding:0 6px } .fchip b { color:var(--ink, inherit); font-weight:600 }
.frow { display:flex; flex-wrap:wrap; gap:8px; align-items:center; padding:8px 0; border-top:1px solid var(--line) } .frow .f-name { flex:1 1 180px; min-width:0 }
.tbar.tis { grid-template-columns:minmax(120px,32%) 1fr 64px } .tbar.tis div i { margin:2px 0 } .tbar.tis i.cur { background:#9ca3af }
.goal-folder { font-size:13px; text-transform:uppercase; letter-spacing:.03em; color:var(--muted); margin:6px 0 8px }
.goal-st { font-size:12px; padding:1px 8px; border-radius:99px; background:var(--line) } .goal-st.ok { color:var(--ok); background:color-mix(in srgb, var(--ok) 15%, transparent) }
.goal-st.warn { color:var(--warn); background:var(--warn-bg) } .goal-st.late { color:var(--brand); background:color-mix(in srgb, var(--brand) 15%, transparent) }
.goal-bar { position:relative; height:10px; border-radius:5px; background:var(--line); overflow:visible } .goal-bar span { display:block; height:100%; border-radius:5px; background:var(--ok) }
.goal-bar i { position:absolute; top:-3px; bottom:-3px; width:2px; background:var(--ink, #fff); opacity:.7 }
.vmark { font-size:18px; line-height:22px; text-align:center; filter:drop-shadow(0 1px 2px rgba(0,0,0,.5)) }
.legend-i { display:inline-block; width:10px; height:10px; border-radius:2px; vertical-align:middle }
.tm-board { display:grid; grid-auto-flow:column; grid-auto-columns:minmax(260px,300px); gap:12px; overflow-x:auto; padding-bottom:8px; align-items:start }
.tm-head { display:flex; justify-content:space-between; gap:8px; align-items:baseline; margin-bottom:6px } .tm-grp summary { cursor:pointer; font-size:13px; padding:4px 0 } .tm-grp.late summary { color:var(--brand) }
.tm-task { display:flex; gap:8px; padding:5px 0; border-top:1px dashed var(--line); font-size:13px } .tm-task > i { flex:none; width:8px; height:8px; border-radius:50%; margin-top:6px }
.tbar { display:grid; grid-template-columns:minmax(90px,38%) 1fr auto; gap:8px; align-items:center; font-size:13px; padding:3px 0 } .tbar span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap }
.tbar i { display:block; height:8px; border-radius:4px; background:var(--brand); opacity:.75 } .tbar b { font-variant-numeric:tabular-nums; font-weight:600 }
.toolbar { display:flex; flex-wrap:wrap; gap:10px; align-items:end; margin-bottom:14px }
.toolbar label { display:grid; gap:3px; font-size:12px; color:var(--muted) }
table { width:100%; border-collapse:collapse; background:var(--panel); border:1px solid var(--line); border-radius:12px; overflow:hidden }
th, td { text-align:left; padding:9px 12px; border-bottom:1px solid var(--line); font-size:13px; vertical-align:top }
th { color:var(--muted); font-weight:600; background:var(--bg) }
tbody tr[data-id] { cursor:pointer } tbody tr[data-id]:hover { background:var(--bg) } tbody tr.sel { outline:2px solid var(--focus); outline-offset:-2px }
.chip { display:inline-flex; align-items:center; gap:5px; border-radius:99px; padding:2px 10px; font-size:12px; font-weight:600; white-space:nowrap }
.chip.confirmed { background:var(--ok-bg); color:var(--ok) } .chip.startok { background:transparent; color:var(--ok); border:1px dashed var(--ok) } .chip.check { background:var(--warn-bg); color:var(--warn) } .chip.nodata { background:var(--none-bg); color:var(--none) }
.split { display:grid; grid-template-columns:minmax(0,3fr) minmax(320px,2fr); gap:14px; align-items:start } @media (max-width:1100px) { .split { grid-template-columns:1fr } }
.detail { position:sticky; top:70px } #map { height:340px; border-radius:10px; border:1px solid var(--line); margin:10px 0 }
.detail dl { display:grid; grid-template-columns:auto 1fr; gap:4px 12px; margin:0; font-size:13px } .detail dt { color:var(--muted) } .detail dd { margin:0 }
.ev { padding:8px 0; border-top:1px solid var(--line) } .ev:first-of-type { border-top:0 }

.grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(290px,1fr)); gap:14px }
.chips { display:flex; flex-wrap:wrap; gap:6px; margin:10px 0; min-height:28px }
.pill { background:var(--bg); border:1px solid var(--line); border-radius:99px; padding:3px 10px; font-size:13px }
.row { display:flex; gap:8px; flex-wrap:wrap } .hist { margin-top:10px; font-size:12.5px; color:var(--muted) } .hist div { padding:3px 0; border-top:1px dashed var(--line) }
dialog { border:1px solid var(--line); border-radius:12px; background:var(--panel); color:var(--ink); padding:20px; width:min(460px,92vw) } dialog::backdrop { background:rgba(0,0,0,.5) }
.techs { max-height:44vh; overflow:auto; margin:12px 0; border:1px solid var(--line); border-radius:8px }
.techs label { display:flex; gap:9px; padding:7px 10px; border-bottom:1px solid var(--line); cursor:pointer } .techs label:last-child { border:0 } .techs small { margin-left:auto; color:var(--muted) }
.soonbox ul { margin:8px 0 0; padding-left:20px } .soonbox li { margin:4px 0 }
.bars { display:flex; align-items:flex-end; gap:10px; height:150px; margin-top:6px } .bars .col { flex:1; display:flex; flex-direction:column; justify-content:flex-end; height:100%; text-align:center; font-size:11px; color:var(--muted) }
.bars .stack { display:flex; flex-direction:column-reverse; gap:2px } .bars .stack i { display:block; border-radius:3px; min-height:2px } .bars .stack .confirmed { background:var(--ok) } .bars .stack .startok { background:color-mix(in srgb, var(--ok) 45%, transparent) } .bars .stack .check { background:var(--warn) } .bars .stack .nodata { background:var(--none) }
@media (max-width:760px) { nav { width:60px } nav a span, nav h3, nav .brand span, nav .tag { display:none } nav a { justify-content:center; padding:11px 0 } #view { padding:14px } }

/* ---- modules Bilan (projets, facturation, RH) ---- */
h3 { font-size:14px; margin:0 0 8px }
a.kpi { text-decoration:none; color:inherit; display:block } a.kpi:hover { border-color:var(--brand) }
.kpi.bad b { color:var(--brand) }
.chip.late { background:#fde4e4; color:#a11 } @media (prefers-color-scheme: dark) { .chip.late { background:#3d1717; color:#ff8f8f } }
.neg { color:var(--brand) } .posv { color:var(--ok) }
td.num, th.num { text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap } td.c { text-align:center }
.tabs { display:flex; gap:4px; border-bottom:1px solid var(--line); margin-bottom:16px; flex-wrap:wrap }
.tab { cursor:pointer; background:none; border:0; border-bottom:3px solid transparent; padding:9px 14px; color:var(--muted); font-weight:600 } .tab:hover { color:var(--ink) } .tab.on { color:var(--ink); border-bottom-color:var(--brand) }
.head { display:flex; justify-content:space-between; gap:12px; align-items:flex-start; flex-wrap:wrap; margin-bottom:14px } .big { font-size:20px; margin:0 0 4px }
.form2 { display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:10px 14px } @media (max-width:560px) { .form2 { grid-template-columns:1fr } }
.fld { display:grid; gap:3px; font-size:12.5px; color:var(--muted) } .fld input, .fld select, .fld textarea { width:100%; color:var(--ink) }
textarea { font:inherit; color:inherit; background:var(--bg); border:1px solid var(--line); border-radius:8px; padding:7px 10px; width:100%; resize:vertical }
label.inline { display:inline-flex; gap:7px; align-items:center; font-size:13px; color:var(--ink); cursor:pointer }
.btn.sm { padding:3px 9px; font-size:12.5px; margin-right:4px } .btn:disabled { opacity:.5; cursor:not-allowed }
.row.end { justify-content:flex-end }
.monthbar { display:inline-flex; align-items:center; gap:10px; font-size:15px } .monthbar b { min-width:140px; text-align:center }
table.plain { border:0; border-radius:0; background:none } table.plain td { padding:5px 8px } table.plain tr.tot td { border-top:2px solid var(--line); border-bottom:0 }
table.total { margin-top:6px; background:var(--panel) } table.total td { font-weight:600 }
dialog.wide { width:min(720px, 94vw) } #dlg { max-height:92vh; overflow:auto }
.line { display:grid; grid-template-columns:2fr .6fr 1fr 1.6fr; gap:6px; margin-bottom:6px } .line input, .line select { min-width:0 }
nav .who { margin-top:auto; padding:14px 18px; border-top:1px solid rgba(255,255,255,.1); font-size:12px; display:grid } nav .who b { color:#fff; font-size:13px } nav .who span { opacity:.6 }
code.diff { font-size:11.5px; word-break:break-all; color:var(--muted); background:none }
td a { color:#4c8dff }

.tablewrap { overflow-x:auto; max-width:100%; border-radius:12px } .tablewrap > table { min-width:max-content } .cols > *, .split > * { min-width:0 }


/* ---- planning (Gantt) ---- */
.badge { background:var(--brand); color:#fff; border-radius:99px; padding:0 7px; font-size:11px; margin-left:4px }
.gtool { align-items:end } .seg { display:inline-flex; border:1px solid var(--line); border-radius:8px; overflow:hidden } .seg button { background:var(--panel); border:0; padding:7px 12px; cursor:pointer; color:var(--ink) } .seg button.on { background:var(--brand); color:#fff }
.dot { display:inline-block; width:10px; height:10px; border-radius:50%; flex-shrink:0 }
.techs .tg { background:var(--bg); font-size:11px; text-transform:uppercase; letter-spacing:.5px; color:var(--muted); padding:5px 10px; font-weight:600 }
details summary { cursor:pointer; margin:8px 0; font-weight:600; font-size:13px }
/* ---- taches (Plane) ---- */
.notice { background:var(--warn-bg); color:var(--warn); border-radius:8px; padding:8px 12px; margin-bottom:12px; font-size:13px }
.chip.st { background:color-mix(in srgb, var(--c) 18%, transparent); color:var(--ink); border:1px solid color-mix(in srgb, var(--c) 55%, transparent) } .chip.st i { width:8px; height:8px; border-radius:50%; background:var(--c); display:inline-block }
table.tasks tr.done td { opacity:.6 } table.tasks td { vertical-align:middle }
.inl { padding:3px 6px; font-size:12.5px; max-width:140px }
.prio { font-size:12px; padding:1px 8px; border-radius:99px } .pr-urgent { background:#fde4e4; color:#a11 } .pr-high { background:#fdf0d5; color:#9a5b00 } .pr-medium { background:#e6eefc; color:#1d4ed8 } .pr-low { background:var(--none-bg); color:var(--none) }
@media (prefers-color-scheme: dark) { .pr-urgent { background:#3d1717; color:#ff8f8f } .pr-high { background:#3a2a0c; color:#f2b44d } .pr-medium { background:#16284d; color:#8db4ff } }
.bar { display:inline-block; width:120px; height:8px; border-radius:99px; background:var(--line); overflow:hidden; vertical-align:middle; margin-left:10px } .bar i { display:block; height:100%; background:var(--ok) }
a.btn { color:inherit; text-decoration:none; display:inline-block } a.btn.pri { color:#fff }

/* Assistant IA */
.ai-fab { position:fixed; right:18px; bottom:18px; z-index:50; display:flex; align-items:center; gap:7px; cursor:pointer; background:var(--brand); color:#fff; border:0; border-radius:99px; padding:11px 18px; font-weight:600; font-size:14px; box-shadow:0 4px 16px rgba(0,0,0,.3) }
.ai-fab:hover { filter:brightness(1.1) } .ai-fab[hidden] { display:none } .ai-open .ai-fab { display:none }
.ai-panel { position:fixed; top:0; right:0; bottom:0; width:min(440px,100vw); z-index:60; background:var(--panel); border-left:1px solid var(--line); box-shadow:-6px 0 24px rgba(0,0,0,.25); display:flex; flex-direction:column }
.ai-panel[hidden] { display:none }
.ai-panel header { display:flex; align-items:center; gap:6px; padding:12px 14px; border-bottom:1px solid var(--line) }
.ai-log { flex:1; overflow:auto; padding:14px; display:flex; flex-direction:column; gap:10px }
.ai-msg { max-width:92%; border-radius:12px; padding:8px 12px; line-height:1.45; overflow-wrap:anywhere }
.ai-msg p { margin:0 0 6px } .ai-msg p:last-child { margin:0 } .ai-msg ul { margin:4px 0 6px 18px; padding:0 } .ai-msg a { color:var(--focus) }
.ai-msg.user { align-self:flex-end; background:var(--brand); color:#fff } .ai-msg.assistant { align-self:flex-start; background:var(--bg); border:1px solid var(--line) }
.ai-hello { display:flex; flex-wrap:wrap; gap:6px; align-items:flex-start } .ai-hello p { flex-basis:100% }
.ai-prop { margin-top:8px; padding:9px 11px; border:1px solid var(--warn); background:var(--warn-bg); border-radius:10px }
.ai-prop.done { border-color:var(--ok); background:var(--ok-bg) } .ai-prop.skipped { opacity:.6 } .ai-prop.wait { opacity:.7 }
.ai-ptitle { font-weight:600; margin-bottom:3px } .ai-ok { color:var(--ok); font-weight:600 } .ai-prop pre { margin:4px 0 0; max-height:160px; overflow:auto; font-size:11.5px; white-space:pre-wrap }
.ai-form { display:flex; gap:8px; padding:10px 14px; border-top:1px solid var(--line) } .ai-form textarea { flex:1; resize:none; border:1px solid var(--line); border-radius:8px; padding:8px; background:var(--bg); color:var(--ink); font:inherit }
.ai-foot { padding:0 14px 10px }
@media (min-width:1100px) { .ai-open main { margin-right:440px } }
.instance-badge { margin:0; padding:6px 10px; border-radius:8px; background:var(--warn-bg); color:var(--warn); font-weight:700; text-align:center; letter-spacing:.05em }
.sysalert { padding:8px 22px; background:#fde4e4; color:#7a1010; font-size:13px; border-bottom:1px solid #f5b5b5 } .sysalert a { color:inherit; font-weight:600 }
@media (prefers-color-scheme: dark) { .sysalert { background:#3d1717; color:#ffc2c2; border-color:#5c2323 } }
/* ---- taches natives : lignes, tableau (kanban), calendrier, fiche */
.link { background:none; border:0; padding:0; color:#4c8dff; cursor:pointer; font:inherit; text-align:left }
.tlist { display:flex; flex-direction:column } .tlist.card { padding:4px 12px }
.trow { display:grid; grid-template-columns:20px minmax(0,1fr) auto; gap:10px; align-items:center; padding:7px 0 7px calc(var(--d,0) * 22px); border-top:1px solid var(--line) }
.tlist > .trow:first-child { border-top:0 } .trow:hover { background:color-mix(in srgb, var(--line) 35%, transparent) }
.trow.done .tname { text-decoration:line-through; opacity:.6 }
.tname { background:none; border:0; padding:0; font:inherit; color:var(--ink); cursor:pointer; text-align:left; font-weight:500 } .tname:hover { color:#4c8dff; text-decoration:underline }
.tmain { min-width:0 } .tmeta { display:flex; flex-wrap:wrap; gap:4px 10px; font-size:12px; color:var(--muted); margin-top:2px } .tmeta:empty { display:none }
.tacts { display:flex; gap:6px; align-items:center; flex-wrap:wrap; justify-content:flex-end }
.pjb { font-size:11.5px; padding:0 6px; border-radius:5px; background:color-mix(in srgb, var(--brand) 14%, transparent); color:var(--brand) }
.lbl { font-size:11px; padding:0 7px; border-radius:99px; background:color-mix(in srgb, var(--c) 20%, transparent); color:var(--ink); border:1px solid color-mix(in srgb, var(--c) 50%, transparent) }
.avs { display:inline-flex } .avs i { font-style:normal; width:24px; height:24px; border-radius:50%; display:inline-grid; place-items:center; font-size:10.5px; font-weight:700; background:#5b6b8c; color:#fff; border:2px solid var(--panel); margin-left:-6px } .avs i:first-child { margin-left:0 }
.stsel { border-color:color-mix(in srgb, var(--c) 60%, transparent); background:color-mix(in srgb, var(--c) 14%, var(--bg)); font-weight:600 }
.inl.late { color:var(--brand); border-color:var(--brand) } .inl.today { color:var(--ok); border-color:var(--ok) }
.sec > summary { cursor:pointer; font-weight:600; padding:8px 0; display:flex; gap:8px; align-items:center; list-style:none } .sec > summary::-webkit-details-marker { display:none }
.sec > summary::before { content:'▸'; color:var(--muted) } .sec[open] > summary::before { content:'▾' } .sec.late > summary { color:var(--brand) } details.sec.card { margin-bottom:12px; padding:8px 14px }
@media (max-width:760px) { .trow { grid-template-columns:20px minmax(0,1fr) } .tacts { grid-column:2; justify-content:flex-start } }

.board { display:grid; grid-auto-flow:column; grid-auto-columns:minmax(250px, 1fr); gap:12px; overflow-x:auto; padding-bottom:8px; align-items:start }
.kcol { background:color-mix(in srgb, var(--c) 7%, var(--panel)); border:1px solid var(--line); border-top:3px solid var(--c); border-radius:10px; padding:8px; min-height:160px }
.kcol.over { outline:2px dashed var(--c) } .kcol h3 { font-size:13px; margin:2px 4px 8px; display:flex; gap:6px; align-items:center } .kcol h3 i { width:9px; height:9px; border-radius:50%; background:var(--c) }
.kdrop { display:flex; flex-direction:column; gap:8px; min-height:30px } .kadd { margin-top:8px; width:100% }
.kcard { background:var(--panel); border:1px solid var(--line); border-radius:8px; padding:8px 10px; cursor:grab } .kcard.drag { opacity:.4 } .kcard[draggable=false] { cursor:default }
.kfoot { display:flex; gap:6px; align-items:center; margin-top:6px; flex-wrap:wrap }

.cal { border:1px solid var(--line); border-radius:10px; overflow:hidden; background:var(--panel) }
.calh, .calg { display:grid; grid-template-columns:repeat(7, minmax(0,1fr)) } .calh span { padding:6px 8px; font-size:12px; color:var(--muted); border-bottom:1px solid var(--line) }
.cday { min-height:104px; border-right:1px solid var(--line); border-bottom:1px solid var(--line); padding:4px; display:flex; flex-direction:column; gap:3px; min-width:0 }
.cday:nth-child(7n) { border-right:0 } .cday.other { background:var(--bg); opacity:.75 } .cday.today .cnum { background:var(--brand); color:#fff; border-radius:99px; padding:0 7px } .cday.over { outline:2px dashed var(--focus); outline-offset:-3px }
.cnum { font-size:12px; font-weight:600; align-self:flex-start } .cev { font:inherit; font-size:11.5px; text-align:left; border:0; border-left:3px solid var(--c); background:color-mix(in srgb, var(--c) 14%, var(--panel)); color:var(--ink); border-radius:4px; padding:1px 5px; cursor:pointer; white-space:nowrap; overflow:hidden; text-overflow:ellipsis }
.cev.done { opacity:.5; text-decoration:line-through } .cev.late { box-shadow:inset 0 0 0 1px var(--brand) }

.tpanel { position:fixed; top:0; right:0; bottom:0; width:min(560px,100vw); z-index:55; background:var(--panel); border-left:1px solid var(--line); box-shadow:-6px 0 24px rgba(0,0,0,.22); overflow:auto; padding:14px 20px 40px }
@media (min-width:1200px) { .tp-open main { margin-right:560px } }
.tp-head { display:flex; gap:6px; align-items:center; margin-bottom:6px } .tp-name { font-size:19px; font-weight:700; border:1px solid transparent; background:none; resize:none; padding:4px 6px; overflow:hidden } .tp-name:hover, .tp-name:focus { border-color:var(--line); background:var(--bg) }
.tp-grid { display:grid; grid-template-columns:110px minmax(0,1fr); gap:8px 12px; align-items:center; margin:10px 0 6px; font-size:13.5px } .tp-grid > span { color:var(--muted); font-size:12.5px }
.tpanel h3 { font-size:13px; margin:18px 0 6px; text-transform:uppercase; letter-spacing:.03em; color:var(--muted) } .tp-desc { white-space:normal }
.pick summary { cursor:pointer; list-style:none } .pick summary::-webkit-details-marker { display:none } .pick[open] > div { display:grid; gap:4px; padding:8px; border:1px solid var(--line); border-radius:8px; margin-top:6px; max-height:260px; overflow:auto }
.att { display:grid; grid-template-columns:52px minmax(0,1fr) auto; gap:10px; align-items:center; padding:6px 0; border-top:1px solid var(--line) } .att img { width:52px; height:40px; object-fit:cover; border-radius:6px; cursor:pointer } .ficon { font-size:22px; text-align:center }
.com { padding:8px 0; border-top:1px solid var(--line) } .cbody { margin-top:2px } #tp-comform { margin-top:8px } .tp-act { margin-top:16px; font-size:12.5px } .tp-act > div { padding:3px 0; border-top:1px dashed var(--line) }
.strow { display:grid; grid-template-columns:38px minmax(0,1fr) 150px auto auto; gap:6px; align-items:center; margin-top:6px } .strow input[type=color], .lcard input[type=color] { padding:0; width:34px; height:30px }
.ai-tbl { overflow:auto; margin:4px 0 6px } .ai-tbl table { border-collapse:collapse; font-size:12.5px } .ai-tbl th, .ai-tbl td { border:1px solid var(--line); padding:3px 7px; text-align:left } .ai-tbl th { background:var(--panel) }

/* Historique d'un projet (chronologie) */
.hist h2 { margin-top:0 } .hist-f { display:flex; gap:6px; flex-wrap:wrap; margin-bottom:10px }
.hist .tl { max-height:520px; overflow:auto; padding-right:4px }
.tl-day { position:sticky; top:0; background:var(--panel); font-weight:600; font-size:12px; color:var(--muted); padding:8px 0 4px; z-index:1 }
.tl-row { display:flex; gap:10px; padding:7px 0; border-bottom:1px solid var(--line) } .tl-ic { width:24px; text-align:center; flex:none }
.tl-b { min-width:0 } .tl-t { overflow-wrap:anywhere } .tl-d { white-space:pre-wrap; overflow-wrap:anywhere }/* Sites de pointage : liste / édition à gauche, carte à droite */
.sites-wrap { display:grid; grid-template-columns:360px 1fr; gap:12px; height:calc(100vh - 150px); min-height:480px }
.sites-side { overflow:auto; padding:12px } .sites-mapbox { position:relative; padding:0; overflow:hidden } #smap { position:absolute; inset:0 }
.sites-hint { position:absolute; left:50%; transform:translateX(-50%); bottom:14px; z-index:500; background:rgba(15,23,42,.88); color:#fff; padding:7px 12px; border-radius:8px; font-size:12px; max-width:80% }
.sites-tabs { display:flex; gap:6px; margin-bottom:10px } .sites-tabs button { flex:1; padding:7px; border-radius:8px; border:1px solid var(--line); background:var(--bg); cursor:pointer; font-weight:600; color:var(--ink) } .sites-tabs button.on { background:var(--brand); border-color:var(--brand); color:#fff }
.sites-tools { display:flex; gap:8px } .sites-tools input { flex:1; min-width:0 }
.sites-list { display:flex; flex-direction:column; gap:6px; margin-top:8px }
.sites-item { display:flex; flex-direction:column; gap:3px; text-align:left; padding:9px 10px; border:1px solid var(--line); border-radius:8px; background:var(--panel); color:var(--ink); cursor:pointer; font:inherit }
.sites-item:hover { border-color:var(--brand) } .sites-item.warn { border-color:#f59e0b; background:rgba(245,158,11,.07) }
.sites-acts { display:flex; flex-wrap:wrap; gap:6px; margin-top:4px }
.sites-edit .fld { display:flex; flex-direction:column; gap:4px; margin-bottom:8px } .sites-edit .fld span { font-size:12px; color:var(--muted) } .sites-edit input[type=range] { padding:0 }
.sites-projs { max-height:220px; overflow:auto; border:1px solid var(--line); border-radius:8px; padding:4px; margin-bottom:8px }
.sites-proj { display:flex; gap:8px; align-items:flex-start; padding:5px 6px; font-size:12.5px; border-radius:6px; cursor:pointer } .sites-proj:hover { background:var(--bg) } .sites-proj input { margin-top:2px }
@media (max-width:900px) { .sites-wrap { grid-template-columns:1fr; height:auto } .sites-mapbox { height:60vh } }
