/* BusinessLabs R2 — colonne latérale unique (release 101 proposée). Claude 2026-11-24. Same-origin stylesheet, no inline
   style. Loaded LAST (just before </body>) : neutralises the floating position of the sections moved into #skl-side
   (.odc-box of chat.css, .env-bar of envelope.css) without touching those files. Theme = app.css tokens (light/dark).
   z-index known: .talk 50, .odc-box 31, .env-bar/.cto-box/.toast 30, .drawer 20, .scrim 19 -> column 15 (wide), 45 (mobile). */
:root{--skl-side-w:440px;--skl-red:#FE0002}

/* column shell */
.skl-side{position:fixed;top:0;right:0;bottom:0;width:var(--skl-side-w);z-index:15;display:flex;flex-direction:column;
  background:var(--surface,#fff);color:var(--text,#1d1d1b);border-left:1px solid var(--border,#e3e1dc);
  font:14px/1.5 var(--font,system-ui,sans-serif);box-sizing:border-box}
.skl-side[hidden]{display:none!important}
.skl-side-head{display:flex;align-items:flex-end;gap:4px;padding:6px 6px 0 8px;border-bottom:1px solid var(--border,#e3e1dc);
  background:var(--bg,#f7f7f5);flex:none;min-height:57px}
.skl-tabs{display:flex;flex:1;min-width:0;overflow-x:auto;scrollbar-width:none}
.skl-tabs::-webkit-scrollbar{display:none}
.skl-tab{flex:none;display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:0 8px;margin:0;border:0;
  border-bottom:2px solid transparent;background:transparent;color:var(--muted,#6b6a65);cursor:pointer;white-space:nowrap;
  font:600 13px/1 var(--font,system-ui,sans-serif)}
.skl-tab:hover{color:var(--text,#1d1d1b)}
.skl-tab[aria-selected="true"]{color:var(--text,#1d1d1b);border-bottom-color:var(--skl-red)}
.skl-tab:focus-visible{outline:2px solid var(--accent,#c4643c);outline-offset:-2px}
.skl-badge{display:inline-grid;place-items:center;min-width:18px;height:18px;padding:0 5px;border-radius:9px;
  background:var(--skl-red);color:#fff;font:700 11px/1 var(--font,system-ui,sans-serif);box-sizing:border-box}
.skl-close{flex:none;display:inline-grid;place-items:center;width:40px;height:40px;margin:0 0 2px;border:0;border-radius:10px;
  background:transparent;color:var(--muted,#6b6a65);cursor:pointer}
.skl-close:hover{background:var(--surface-2,#f0efec);color:var(--text,#1d1d1b)}
.skl-panes{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:16px}
.skl-pane[hidden]{display:none!important}
.skl-foot{flex:none;border-top:1px solid var(--border,#e3e1dc);padding:12px 16px;background:var(--surface,#fff)}
.skl-foot[hidden]{display:none!important}

/* header launcher (opens / closes the column; badge = open questions, red dot = active series) */
.skl-launch{position:relative}
.skl-launch .skl-launch-badge{position:absolute;top:2px;right:0;min-width:16px;height:16px;font-size:10px;padding:0 4px}
.skl-launch.skl-series-on::after{content:"";position:absolute;bottom:6px;right:6px;width:8px;height:8px;border-radius:50%;
  background:var(--skl-red)}
.skl-launch[aria-expanded="true"]{color:var(--text,#1d1d1b);background:var(--surface-2,#f0efec)}

/* moved sections: no floating, no own card, same rhythm everywhere */
#skl-side .odc-box,#skl-side .odm,#skl-side .env-bar{position:static!important;inset:auto!important;top:auto;right:auto;
  bottom:auto;left:auto;width:auto!important;max-width:none!important;z-index:auto!important;margin:0;box-shadow:none;
  float:none;font:14px/1.5 var(--font,system-ui,sans-serif);color:var(--text,#1d1d1b)}
#skl-side .odc-box[hidden],#skl-side .odm[hidden],#skl-side .env-bar[hidden],#skl-side .odc-box [hidden]{display:none!important}
#skl-side .odc-box+.odc-box{margin-top:24px}
#skl-side h2{margin:0 0 4px;font:600 16px/1.3 var(--font,system-ui,sans-serif);letter-spacing:-.1px;color:var(--text,#1d1d1b)}
#skl-side .odm h2{margin-top:0}
#skl-side .odm>h2+.odc-text{color:var(--muted,#6b6a65);font-size:13px;margin-bottom:12px}
#skl-side .odc-text{margin:4px 0;font-size:14px;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere}
#skl-side .odc-box>.odc-text:first-of-type{color:var(--muted,#6b6a65);font-size:13px;margin-bottom:12px}
#skl-side .odc-msg{margin:8px 0 0;font-size:13px;color:var(--muted,#6b6a65);min-height:0}
#skl-side .odc-msg:empty{display:none}
#skl-side .odc-msg.err{color:var(--skl-red)}
#skl-side .odc-exec{display:block;margin-top:4px;font:12px/1.4 var(--mono,ui-monospace,monospace);color:var(--muted,#6b6a65);
  overflow-wrap:anywhere}
#skl-side .odc-who{display:block;font-size:13px;font-weight:600;color:var(--text,#1d1d1b);overflow-wrap:anywhere}

/* lists: the pane scrolls, not each list */
#skl-side .odc-log{list-style:none;margin:8px 0 0;padding:0;max-height:none;overflow:visible}
#skl-side .odc-line{padding:12px 0;border-bottom:1px solid var(--border,#e3e1dc)}
#skl-side .odc-line:last-child{border-bottom:0}

/* actions: one aligned row, wraps cleanly; free text takes the full width, the main button goes to the right */
#skl-side .odc-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:8px}
#skl-side .odc-actions>label{display:inline-flex;flex-direction:row;align-items:center;gap:6px;margin:0;font-size:14px;font-weight:500;
  white-space:nowrap}
#skl-side .odc-actions>label>input[type="checkbox"]{width:16px;height:16px;min-height:0;margin:0;padding:0;accent-color:var(--skl-red)}
#skl-side .odc-actions textarea,#skl-side .odc-actions .odc-form{flex:1 1 100%;width:100%;min-height:64px;margin:0;box-sizing:border-box;
  border:1px solid var(--border,#e3e1dc);border-radius:10px;padding:8px 10px;font:14px/1.45 var(--font,system-ui,sans-serif);
  background:var(--bg,#f7f7f5);color:inherit;resize:vertical}
#skl-side .odc-actions select,#skl-side .odc-role{flex:1 1 160px;min-width:0;min-height:36px;padding:0 10px;border-radius:8px;
  border:1px solid var(--border,#e3e1dc);background:var(--bg,#f7f7f5);color:var(--text,#1d1d1b);font:14px var(--font,system-ui,sans-serif)}
#skl-side .odc-run,#skl-side .odc-send,#skl-side .odc-new,#skl-side .env-bar button{display:inline-flex;align-items:center;
  justify-content:center;min-height:36px;padding:0 12px;margin:0;border-radius:8px;white-space:nowrap;cursor:pointer;
  font:600 13px/1 var(--font,system-ui,sans-serif);box-sizing:border-box}
#skl-side .odc-run{border:1px solid var(--skl-red);background:var(--surface,#fff);color:var(--skl-red)}
#skl-side .odc-run.sug,#skl-side .odc-send{border:1px solid var(--skl-red);background:var(--skl-red);color:#fff}
#skl-side .odc-run.alt,#skl-side .odc-new{border:1px solid var(--border,#e3e1dc);background:var(--surface,#fff);color:var(--muted,#6b6a65)}
#skl-side .odc-actions .odc-send{margin-left:auto}
#skl-side button:disabled{opacity:.55;cursor:default}
#skl-side .odc-box>.odc-run.alt:first-of-type{margin:0 0 4px}

/* « Suivi » type selector (Questions, Missions, …): compact chips */
#skl-side #suivi>.odc-actions{gap:6px;margin:0 0 4px}
#skl-side #suivi>.odc-actions>.odc-run{min-height:30px;padding:0 10px;border-radius:15px;font-size:12px}
#skl-side #suivi>.odc-actions>.odc-run:not(.alt){background:var(--text,#1d1d1b);border-color:var(--text,#1d1d1b);color:var(--surface,#fff)}

/* « Conversation OD »: the column tab replaces its floating toggle */
#skl-side .odc-toggle{display:none!important}
#skl-side .odc-panel{clear:none;margin:0;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none}
#skl-side .odc-mode{margin:0 0 8px;font-size:12px;color:var(--muted,#6b6a65)}
#skl-side .odc-panel>.odc-form{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
#skl-side .odc-panel>.odc-form textarea{flex:1 1 100%;min-height:64px;box-sizing:border-box;border:1px solid var(--border,#e3e1dc);
  border-radius:10px;padding:8px 10px;font:14px/1.45 var(--font,system-ui,sans-serif);background:var(--bg,#f7f7f5);color:inherit}
#skl-side .odc-panel>.odc-form .odc-send{margin-left:auto;order:2}
#skl-side .odc-panel>.odc-form .odc-new{order:1}

/* « Série de missions » docked at the bottom of the column (stays visible whatever the tab) */
#skl-side .env-bar{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:8px;align-items:center;padding:0 0 0 12px;border:0;
  border-left:4px solid var(--skl-red);border-radius:0;background:transparent}
#skl-side .env-bar>.env-title,#skl-side .env-bar>.env-caps,#skl-side .env-bar>.env-msg{grid-column:1/-1}
#skl-side .env-bar>input[hidden]+.env-row{grid-column:1/-1}
#skl-side .env-bar .env-title{margin:0 0 2px;font-size:14px}
#skl-side .env-bar .env-caps{margin:0 0 8px;font-size:12px;line-height:1.45;color:var(--muted,#6b6a65)}
#skl-side .env-bar input{min-height:36px;margin:0;background:var(--bg,#f7f7f5)}
#skl-side .env-bar .env-row{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end}
#skl-side .env-bar .env-go{border:1px solid var(--skl-red);background:var(--skl-red);color:#fff}
#skl-side .env-bar .env-revoke{border:1px solid var(--skl-red);background:transparent;color:var(--skl-red)}

/* wide screens: the column takes its own space; the voice widget moves left of it */
@media (min-width:960px){
  body.skl-side-on .app{margin-right:var(--skl-side-w)}
  body.skl-side-on .talk{right:calc(var(--skl-side-w) + 20px)!important;bottom:84px!important}
}
/* phones / narrow windows: the column is a full-screen panel, closed by default (header button) */
@media (max-width:959.98px){
  .skl-side{left:0;width:auto;z-index:45;border-left:0;padding-bottom:env(safe-area-inset-bottom)}
  .skl-panes{padding:16px max(16px,env(safe-area-inset-right)) 24px max(16px,env(safe-area-inset-left))}
  .skl-tab{padding:0 6px;font-size:12px}
  body.skl-side-modal{overflow:hidden}
}
