/* ============================================================
   OPUS ONE — ROUND 3 COMPONENT STYLES
   ============================================================ */

/* ---------- Heatmap (Charge) ---------- */
.heatmap { width: 100%; border-collapse: separate; border-spacing: 0; }
.heatmap th { padding: 6px 4px; font-size: var(--fs-micro); font-weight: var(--fw-medium); color: var(--text-faint); text-align: center; white-space: nowrap; }
.heatmap th.hm-name { text-align: left; width: 180px; padding-left: var(--s3); position: sticky; left: 0; background: var(--bg-elevated); z-index: 2; }
.heatmap td.hm-name { position: sticky; left: 0; background: var(--bg-elevated); z-index: 1; padding-left: var(--s3); }
.hm-cell { width: 22px; height: 30px; padding: 2px; }
.hm-box { width: 100%; height: 100%; border-radius: 4px; cursor: pointer; transition: transform var(--dur-fast) var(--ease); position: relative; }
.hm-box:hover { transform: scale(1.18); z-index: 3; box-shadow: 0 0 0 2px var(--bg-elevated), var(--shadow-sm); }
.hm-l0 { background: var(--bg-sunken); }
.hm-l1 { background: color-mix(in srgb, var(--accent) 35%, var(--bg-sunken)); }
.hm-l2 { background: color-mix(in srgb, var(--accent) 75%, transparent); }
.hm-l3 { background: var(--c-amber); }
.hm-l4 { background: var(--c-red); }
.hm-weekend { opacity: 0.45; }
.hm-legend { display: flex; align-items: center; gap: 6px; font-size: var(--fs-xs); color: var(--text-muted); }
.hm-legend .hm-sw { width: 16px; height: 16px; border-radius: 4px; }
.cap-badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: var(--r-full); font-size: var(--fs-xs); font-weight: var(--fw-semibold); }
.cap-low { background: var(--c-green-bg); color: var(--c-green-fg); }
.cap-mid { background: var(--c-amber-bg); color: var(--c-amber-fg); }
.cap-high { background: var(--c-red-bg); color: var(--c-red-fg); }

/* ---------- Timer (Time-tracking) ---------- */
.timer-card { padding: var(--s6); display: flex; align-items: center; gap: var(--s8); flex-wrap: wrap; }
.timer-display { font-family: var(--font-mono); font-size: 52px; font-weight: 700; letter-spacing: -0.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.timer-display.running { color: var(--text); }
.timer-sub { font-size: var(--fs-sm); color: var(--text-muted); margin-top: 6px; }
.timer-controls { display: flex; align-items: center; gap: var(--s2); }
.timer-big-btn { width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex: none; box-shadow: var(--shadow-sm); transition: transform var(--dur-fast) var(--ease), background var(--dur-fast); }
.timer-big-btn:active { transform: scale(0.94); }
.timer-big-btn.start { background: var(--accent); color: var(--text-on-accent); }
.timer-big-btn.start:hover { background: var(--accent-press); }
.timer-big-btn.stop { background: var(--c-red); color: #fff; }

.weekbar { display: flex; align-items: flex-end; gap: 10px; height: 120px; padding-top: 10px; }
.weekbar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.weekbar-bar { width: 100%; max-width: 34px; border-radius: 6px 6px 0 0; background: var(--accent); transition: height var(--dur-slow) var(--ease); min-height: 3px; }
.weekbar-bar.empty { background: var(--bg-active); }
.weekbar-lab { font-size: var(--fs-xs); color: var(--text-muted); }
.weekbar-val { font-size: var(--fs-micro); color: var(--text-faint); font-variant-numeric: tabular-nums; }

/* ---------- Leaderboard ---------- */
.lb-row { display: flex; align-items: center; gap: var(--s3); padding: 11px var(--s4); border-bottom: 1px solid var(--border-subtle); transition: background var(--dur-fast); }
.lb-row:last-child { border-bottom: none; }
.lb-row:hover { background: var(--bg-hover); }
.lb-rank { width: 30px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text-muted); flex: none; }
.lb-medal { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: var(--fs-xs); font-weight: 700; }
.lb-medal.g1 { background: #FDF0C8; color: #94730E; }
.lb-medal.g2 { background: #ECEEF1; color: #6B7280; }
.lb-medal.g3 { background: #F6E6D8; color: #9A5B2A; }
[data-theme="dark"] .lb-medal.g1 { background: #3A310F; color: #F4D679; }
[data-theme="dark"] .lb-medal.g2 { background: #2A2D31; color: #C4CBD4; }
[data-theme="dark"] .lb-medal.g3 { background: #321F12; color: #E0A877; }
.lb-bar { flex: 1; max-width: 180px; }

/* ---------- Tree (Plan de call) ---------- */
.tree { font-size: var(--fs-sm); }
.tree-node { }
.tree-row { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: var(--r-md); transition: background var(--dur-fast); position: relative; }
.tree-row:hover { background: var(--bg-hover); }
.tree-toggle { width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; color: var(--text-muted); flex: none; cursor: pointer; border-radius: 4px; }
.tree-toggle:hover { background: var(--bg-active); }
.tree-toggle.leaf { visibility: hidden; }
.tree-toggle svg { transition: transform var(--dur) var(--ease); }
.tree-toggle.collapsed svg { transform: rotate(-90deg); }
.tree-title { font-weight: var(--fw-medium); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree-meta { display: flex; align-items: center; gap: 10px; flex: none; }
.tree-actions { display: flex; gap: 1px; opacity: 0; transition: opacity var(--dur-fast); }
.tree-row:hover .tree-actions { opacity: 1; }
.tree-children { margin-left: 17px; padding-left: 14px; border-left: 1.5px solid var(--border); }
.tree-grip { color: var(--text-faint); cursor: grab; width: 14px; height: 14px; opacity: 0; flex: none; }
.tree-row:hover .tree-grip { opacity: 1; }

/* ---------- Settings (Configuration) ---------- */
.setting-row { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s5); padding: 14px 0; border-bottom: 1px solid var(--border-subtle); }
.setting-row:last-child { border-bottom: none; }
.setting-info { flex: 1; min-width: 0; }
.setting-name { font-size: var(--fs-sm); font-weight: var(--fw-medium); }
.setting-desc { font-size: var(--fs-xs); color: var(--text-muted); margin-top: 2px; max-width: 460px; }
.setting-control { flex: none; }
.log-tail { font-family: var(--font-mono); font-size: var(--fs-xs); line-height: 1.7; background: var(--bg-sunken); border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px 14px; max-height: 180px; overflow: auto; color: var(--text-secondary); }
.log-tail .ok { color: var(--c-green-fg); }
.log-tail .warn { color: var(--c-amber-fg); }

/* settings nav */
.settings-layout { display: grid; grid-template-columns: 200px 1fr; gap: var(--s6); align-items: start; }
.settings-nav { position: sticky; top: 0; display: flex; flex-direction: column; gap: 1px; }
.settings-nav button { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: var(--r-md); font-size: var(--fs-sm); color: var(--text-secondary); text-align: left; transition: background var(--dur-fast); }
.settings-nav button svg { width: 15px; height: 15px; color: var(--text-muted); }
.settings-nav button:hover { background: var(--bg-hover); }
.settings-nav button.active { background: var(--accent-soft); color: var(--text); font-weight: var(--fw-semibold); }
.settings-nav button.active svg { color: var(--text); }
@media (max-width: 1000px) { .settings-layout { grid-template-columns: 1fr; } .settings-nav { flex-direction: row; flex-wrap: wrap; position: static; } }

/* ---------- Release notes ---------- */
.release { border-bottom: 1px solid var(--border); padding: var(--s5) 0; }
.release:last-child { border-bottom: none; }
.release-head { display: flex; align-items: center; gap: var(--s3); cursor: pointer; }
.release-ver { font-family: var(--font-mono); font-size: var(--fs-sm); font-weight: var(--fw-semibold); padding: 2px 8px; border-radius: var(--r-sm); background: var(--bg-sunken); border: 1px solid var(--border); flex: none; }
.release-body { margin-top: 12px; padding-left: 4px; }

/* ---------- Auth ---------- */
.auth-stage { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; padding: var(--s6); background: var(--bg); overflow: auto; z-index: 1; }
.auth-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.auth-bg::before { content: ""; position: absolute; top: -20%; left: 50%; transform: translateX(-50%); width: 720px; height: 720px; border-radius: 50%; background: radial-gradient(circle, var(--accent-soft), transparent 62%); opacity: 0.7; }
.auth-card { position: relative; width: 100%; max-width: 396px; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--r-2xl); box-shadow: var(--shadow-lg); padding: var(--s8); z-index: 1; }
.auth-logo { display: flex; align-items: center; gap: 10px; justify-content: center; margin-bottom: var(--s6); }
.auth-logo img { width: 34px; height: 34px; }
.auth-logo .wm { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.auth-title { font-size: var(--fs-2xl); font-weight: 700; letter-spacing: -0.018em; text-align: center; }
.auth-sub { font-size: var(--fs-sm); color: var(--text-muted); text-align: center; margin-top: 6px; margin-bottom: var(--s6); }
.auth-field { margin-bottom: var(--s4); }
.auth-foot { text-align: center; margin-top: var(--s5); font-size: var(--fs-sm); color: var(--text-muted); }
.auth-link { color: var(--c-blue-fg); font-weight: var(--fw-medium); cursor: pointer; }
.auth-link:hover { text-decoration: underline; }
.auth-switcher { position: fixed; bottom: var(--s5); left: 50%; transform: translateX(-50%); display: flex; gap: 4px; padding: 4px; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--r-full); box-shadow: var(--shadow-md); z-index: 5; }
.auth-switcher button { padding: 6px 12px; border-radius: var(--r-full); font-size: var(--fs-xs); font-weight: var(--fw-medium); color: var(--text-muted); }
.auth-switcher button.active { background: var(--accent-soft); color: var(--text); }

/* otp inputs */
.otp-group { display: flex; gap: 8px; justify-content: center; margin: var(--s2) 0 var(--s4); }
.otp-input { width: 46px; height: 54px; text-align: center; font-size: 22px; font-weight: 700; font-family: var(--font-mono); border: 1px solid var(--border-strong); border-radius: var(--r-md); background: var(--bg-elevated); color: var(--text); }
.otp-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.otp-input.filled { border-color: var(--accent); }

/* code blocks */
.codebox { font-family: var(--font-mono); font-size: var(--fs-xs); line-height: 1.6; background: var(--bg-sunken); border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px 14px; overflow: auto; white-space: pre; color: var(--text-secondary); }
.token-pill { font-family: var(--font-mono); font-size: var(--fs-xs); background: var(--bg-sunken); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 3px 8px; color: var(--text-secondary); }

/* favorites */
.fav-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s4); }
@media (max-width: 900px) { .fav-grid { grid-template-columns: 1fr; } }
.fav-item { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: var(--r-md); transition: background var(--dur-fast); cursor: pointer; }
.fav-item:hover { background: var(--bg-hover); }
.fav-ic { width: 32px; height: 32px; border-radius: var(--r-md); background: var(--bg-sunken); display: flex; align-items: center; justify-content: center; color: var(--text-muted); flex: none; }
.fav-star { opacity: 0; transition: opacity var(--dur-fast); }
.fav-item:hover .fav-star { opacity: 1; }

/* generic settings/section card grid */
.cards-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); align-items: start; }
@media (max-width: 1000px) { .cards-2 { grid-template-columns: 1fr; } }

/* ---------- Plan de call : script prompter ---------- */
.callscript { display: grid; grid-template-columns: 248px 1fr; gap: var(--s4); height: 100%; min-height: 0; }
@media (max-width: 620px) { .callscript { grid-template-columns: 1fr; } }

/* left stepper */
.cs-stepper { display: flex; flex-direction: column; min-height: 0; }
.cs-stepper-scroll { overflow-y: auto; flex: 1; padding: var(--s2); }
.cs-progress { padding: 12px 14px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; flex: none; }
.cs-node { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: var(--r-md); cursor: pointer; transition: background var(--dur-fast); position: relative; user-select: none; }
.cs-node:hover { background: var(--bg-hover); }
.cs-node.active { background: var(--accent-soft); }
.cs-node.active::before { content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 3px; border-radius: 999px; background: var(--accent); }
.cs-node.on-path { background: color-mix(in srgb, var(--accent-soft) 55%, transparent); }
.cs-node-mark { width: 20px; height: 20px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; border: 1.5px solid var(--border-strong); background: var(--bg-elevated); transition: all var(--dur-fast); }
.cs-node-mark.visited { background: var(--c-green); border-color: var(--c-green); color: #fff; }
.cs-node-mark.active { border-color: var(--accent); background: var(--accent); }
.cs-node-mark.active .cs-pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--text-on-accent); }
.cs-node-label { flex: 1; font-size: var(--fs-sm); font-weight: var(--fw-medium); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-node.active .cs-node-label { font-weight: var(--fw-semibold); }
.cs-node-chev { width: 16px; height: 16px; color: var(--text-faint); flex: none; transition: transform var(--dur) var(--ease); cursor: pointer; }
.cs-node-chev.collapsed { transform: rotate(-90deg); }
.cs-children { margin-left: 16px; padding-left: 12px; border-left: 1.5px solid var(--border); }

/* right script panel */
.cs-panel { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.cs-panel-head { padding: var(--s5) var(--s6) var(--s4); border-bottom: 1px solid var(--border); flex: none; }
.cs-breadcrumb { display: flex; align-items: center; gap: 6px; font-size: var(--fs-xs); color: var(--text-muted); margin-bottom: 8px; flex-wrap: wrap; }
.cs-breadcrumb .back-link { display: inline-flex; align-items: center; gap: 4px; color: var(--c-blue-fg); font-weight: var(--fw-medium); cursor: pointer; }
.cs-breadcrumb .back-link:hover { text-decoration: underline; }
.cs-panel-body { flex: 1; overflow-y: auto; padding: var(--s6); }
.cs-panel-foot { flex: none; border-top: 1px solid var(--border); padding: var(--s4) var(--s6); background: var(--bg-elevated); }

/* script bubbles */
.cs-bubble { display: flex; gap: var(--s3); padding: 14px 16px; border-radius: var(--r-lg); background: var(--bg-sunken); border: 1px solid var(--border-subtle); margin-bottom: 12px; }
.cs-bubble-tag { flex: none; }
.cs-bubble-tag .pill { text-transform: uppercase; letter-spacing: 0.04em; font-size: 10px; }
.cs-bubble-text { font-size: var(--fs-lg); line-height: 1.55; color: var(--text); flex: 1; }
.cs-bubble.is-script .cs-bubble-text { font-size: 19px; line-height: 1.55; }
.cs-bubble.is-script { background: var(--bg-elevated); border-color: var(--border-strong); }
.cs-bubble.is-reflexe { background: var(--c-violet-bg); border-color: transparent; }
.cs-bubble.is-reflexe .cs-bubble-text { font-size: var(--fs-base); color: var(--c-violet-fg); }
.cs-bubble.is-cta { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.cs-bubble.is-pitch { background: var(--c-blue-bg); border-color: transparent; }
.cs-bubble.is-pitch .cs-bubble-text { color: var(--c-blue-fg); }

.cs-alert { display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--r-md); background: var(--c-amber-bg); color: var(--c-amber-fg); margin-bottom: 12px; font-size: var(--fs-sm); line-height: 1.5; }
.cs-alert svg { flex: none; margin-top: 1px; }

.cs-reveal { margin-bottom: 12px; border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; }
.cs-reveal-head { display: flex; align-items: center; gap: 8px; padding: 11px 14px; cursor: pointer; font-size: var(--fs-sm); font-weight: var(--fw-medium); color: var(--text-secondary); transition: background var(--dur-fast); }
.cs-reveal-head:hover { background: var(--bg-hover); }
.cs-reveal-head .rv-chev { transition: transform var(--dur) var(--ease); color: var(--text-muted); }
.cs-reveal.open .rv-chev { transform: rotate(90deg); }
.cs-reveal-body { padding: 0 14px 12px 36px; }
.cs-reveal-body ul { margin: 0; padding-left: 18px; }
.cs-reveal-body li { font-size: var(--fs-sm); color: var(--text-secondary); margin-bottom: 5px; line-height: 1.5; }

.cs-checklist { border: 1px solid var(--border); border-radius: var(--r-md); padding: 6px; margin-bottom: 12px; background: var(--bg-elevated); }
.cs-check-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--r-sm); cursor: pointer; transition: background var(--dur-fast); }
.cs-check-item:hover { background: var(--bg-hover); }
.cs-check-item .cs-check-text { font-size: var(--fs-sm); color: var(--text); }
.cs-check-item.done .cs-check-text { color: var(--text-faint); text-decoration: line-through; }

/* branch buttons */
.cs-branches { display: flex; flex-direction: column; gap: 8px; }
.cs-branch-label { font-size: var(--fs-xs); font-weight: var(--fw-semibold); text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-faint); margin-bottom: 4px; }
.cs-branch { display: flex; align-items: center; gap: 11px; width: 100%; padding: 12px 14px; border-radius: var(--r-md); border: 1.5px solid var(--border-strong); background: var(--bg-elevated); font-size: var(--fs-base); font-weight: var(--fw-medium); color: var(--text); text-align: left; transition: all var(--dur-fast) var(--ease); }
.cs-branch:hover { transform: translateX(2px); }
.cs-branch .cs-branch-ic { width: 26px; height: 26px; border-radius: 7px; flex: none; display: flex; align-items: center; justify-content: center; }
.cs-branch .cs-branch-arrow { margin-left: auto; color: var(--text-faint); }
.cs-branch.green { border-color: color-mix(in srgb, var(--c-green) 45%, transparent); }
.cs-branch.green:hover { background: var(--c-green-bg); border-color: var(--c-green); }
.cs-branch.green .cs-branch-ic { background: var(--c-green-bg); color: var(--c-green-fg); }
.cs-branch.amber { border-color: color-mix(in srgb, var(--c-amber) 45%, transparent); }
.cs-branch.amber:hover { background: var(--c-amber-bg); border-color: var(--c-amber); }
.cs-branch.amber .cs-branch-ic { background: var(--c-amber-bg); color: var(--c-amber-fg); }
.cs-branch.red { border-color: color-mix(in srgb, var(--c-red) 45%, transparent); }
.cs-branch.red:hover { background: var(--c-red-bg); border-color: var(--c-red); }
.cs-branch.red .cs-branch-ic { background: var(--c-red-bg); color: var(--c-red-fg); }
.cs-branch-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (max-width: 1200px) { .cs-branch-grid { grid-template-columns: 1fr; } }

/* ---------- Plan de call : ÉDITEUR admin ---------- */
/* editable tree rows */
.cs-node.editable { padding-right: 4px; }
.cs-node .cs-edit-actions { display: flex; gap: 1px; position: absolute; right: 3px; top: 50%; transform: translateY(-50%); padding-left: 18px; background: linear-gradient(90deg, transparent, var(--bg-hover) 22%); opacity: 0; transition: opacity var(--dur-fast); }
.cs-node:hover .cs-edit-actions { opacity: 1; }
.cs-node.active .cs-edit-actions { background: linear-gradient(90deg, transparent, var(--accent-soft) 22%); }
.cs-node .cs-grip { color: var(--text-faint); cursor: grab; width: 14px; height: 14px; flex: none; opacity: 0; }
.cs-node:hover .cs-grip { opacity: 1; }
.cs-node.dragging { opacity: 0.4; }
.cs-node.drop-before { box-shadow: inset 0 2px 0 var(--accent); }
.cs-node.drop-after { box-shadow: inset 0 -2px 0 var(--accent); }
.cs-rename-input { flex: 1; min-width: 0; font-size: var(--fs-sm); font-weight: var(--fw-medium); padding: 2px 6px; border: 1px solid var(--accent); border-radius: var(--r-sm); background: var(--bg-elevated); color: var(--text); outline: none; box-shadow: 0 0 0 3px var(--accent-ring); }
.cs-addsection { display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 10px; margin-top: 6px; border-radius: var(--r-md); border: 1.5px dashed var(--border-strong); background: transparent; color: var(--text-muted); font-size: var(--fs-sm); font-weight: var(--fw-medium); transition: all var(--dur-fast); }
.cs-addsection:hover { border-color: var(--accent); color: var(--text); background: var(--accent-soft); }

/* node editor (right column) */
.cs-editor-body { flex: 1; overflow-y: auto; padding: var(--s5) var(--s6); }
.cs-editor-section-label { display: flex; align-items: center; justify-content: space-between; margin: 20px 0 10px; }
.cs-editor-section-label:first-child { margin-top: 0; }

/* block editor card */
.blk { border: 1px solid var(--border); border-radius: var(--r-lg); margin-bottom: 10px; background: var(--bg-elevated); overflow: hidden; }
.blk.dragging { opacity: 0.4; }
.blk.drop-target { box-shadow: inset 0 2px 0 var(--accent); }
.blk-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: var(--bg-sunken); border-bottom: 1px solid var(--border-subtle); }
.blk-grip { color: var(--text-faint); cursor: grab; flex: none; }
.blk-kind { font-size: var(--fs-xs); font-weight: var(--fw-semibold); text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); display: inline-flex; align-items: center; gap: 6px; }
.blk-head-actions { margin-left: auto; display: flex; gap: 1px; }
.blk-body { padding: 12px; }
.blk-body .input, .blk-body .textarea, .blk-body .select { margin-bottom: 8px; }
.blk-body .input:last-child, .blk-body .textarea:last-child { margin-bottom: 0; }
.blk-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.blk-row .input { margin-bottom: 0; }
.blk-tone-row { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.blk-tone { padding: 4px 10px; border-radius: var(--r-full); font-size: var(--fs-xs); font-weight: var(--fw-medium); border: 1.5px solid var(--border-strong); background: var(--bg-elevated); color: var(--text-muted); cursor: pointer; }
.blk-tone.active { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }

/* branch editor row */
.brn { display: flex; align-items: center; gap: 8px; padding: 8px; border: 1px solid var(--border); border-radius: var(--r-md); margin-bottom: 8px; background: var(--bg-elevated); }
.brn-swatch { width: 24px; height: 24px; border-radius: 6px; flex: none; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.brn .input, .brn .select { margin-bottom: 0; }
.brn-colors { display: flex; gap: 4px; }
.brn-color-dot { width: 18px; height: 18px; border-radius: 5px; cursor: pointer; border: 2px solid transparent; }
.brn-color-dot.active { border-color: var(--text); }
.add-block-menu { display: flex; gap: 6px; flex-wrap: wrap; }

/* ===== Plan de call (live) — porté du legacy, scopé .cp-content-body ===== */
.cp-content-body { line-height:1.6; }
.cp-content-body .v-title { font-size:20px; font-weight:700; margin-bottom:4px; color:var(--text); }
.cp-content-body .v-sub { font-size:13px; color:var(--text-muted); margin-bottom:16px; }
.cp-content-body .v-alert { background:#FFF8E1; border:1px solid #FFE082; border-radius:8px; padding:10px 14px; font-size:12.5px; color:#E65100; margin-bottom:12px; line-height:1.5; }
.cp-content-body .v-alert.red { background:#FFEBEE; border-color:#FFCDD2; color:#C62828; }
.cp-content-body .bubble { background:var(--bg-elevated); border:1px solid var(--border); border-radius:10px; padding:14px 18px; margin-bottom:8px; box-shadow:0 1px 4px rgba(0,0,0,.04); }
.cp-content-body .bubble-label { font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.4px; margin-bottom:5px; }
.cp-content-body .bl-reflexe { color:#FF9900; }
.cp-content-body .bl-dev { color:#3B82F6; }
.cp-content-body .bl-rebond { color:#7C3AED; }
.cp-content-body .bl-cta { color:#2D9F5D; }
.cp-content-body .bl-warn { color:#E8453C; }
.cp-content-body .bl-script { color:var(--text); }
.cp-content-body .bl-branch { color:var(--text-muted); }
.cp-content-body .bubble q { display:block; font-size:13.5px; line-height:1.65; color:var(--text); border-left:3px solid var(--accent); padding-left:12px; quotes:none; font-style:normal; }
.cp-content-body .bubble p { font-size:12.5px; color:var(--text-muted); line-height:1.5; margin-top:4px; }
.cp-content-body .bubble ul { list-style:none; margin-top:4px; padding-left:0; }
.cp-content-body .bubble li { font-size:12.5px; color:var(--text); padding:2px 0; line-height:1.5; }
.cp-content-body .bubble li::before { content:"• "; color:#FF9900; font-weight:700; }
.cp-content-body .reveal-btn { display:inline-flex; align-items:center; gap:4px; padding:5px 10px; background:var(--bg-sunken); border:1px solid var(--border); border-radius:5px; font-family:inherit; font-size:11px; font-weight:600; color:var(--text-muted); cursor:pointer; margin:4px 4px 4px 0; transition:all .1s; }
.cp-content-body .reveal-btn:hover { background:var(--bg); color:var(--text); }
.cp-content-body .reveal-content { display:none; margin-top:8px; }
.cp-content-body .reveal-content.open { display:block; }
.cp-content-body .branch-bar { display:flex; flex-wrap:wrap; gap:6px; margin-top:16px; padding-top:12px; border-top:1px solid var(--border); }
.cp-content-body .branch-btn { padding:8px 14px; border:2px solid; border-radius:8px; font-family:inherit; font-size:12px; font-weight:600; cursor:pointer; transition:all .15s; background:transparent; }
.cp-content-body .branch-btn:hover { transform:translateY(-1px); }
.cp-content-body .bb-green { background:#E8F5E9; border-color:#2D9F5D; color:#1B5E20; }
.cp-content-body .bb-green:hover { background:#2D9F5D; color:#fff; }
.cp-content-body .bb-orange { background:#FFF3E0; border-color:#FF9900; color:#E65100; }
.cp-content-body .bb-orange:hover { background:#FF9900; color:#fff; }
.cp-content-body .bb-blue { background:#E3F2FD; border-color:#3B82F6; color:#1565C0; }
.cp-content-body .bb-blue:hover { background:#3B82F6; color:#fff; }
.cp-content-body .bb-red { background:#FFEBEE; border-color:#E8453C; color:#C62828; }
.cp-content-body .bb-red:hover { background:#E8453C; color:#fff; }
.cp-content-body .back-link { display:inline-flex; align-items:center; gap:4px; font-size:11px; font-weight:600; color:var(--text-muted); cursor:pointer; margin-bottom:12px; padding:4px 8px; border-radius:4px; transition:all .1s; }
.cp-content-body .back-link:hover { background:var(--bg-sunken); color:var(--text); }
.cp-content-body .obj-grid { display:grid; grid-template-columns:1fr 1fr; gap:6px; margin-top:8px; }
.cp-content-body .obj-pick { padding:8px 10px; background:var(--bg-elevated); border:1px solid var(--border); border-radius:6px; font-family:inherit; font-size:11.5px; font-weight:500; color:var(--text); cursor:pointer; text-align:left; transition:all .1s; line-height:1.4; }
.cp-content-body .obj-pick:hover { border-color:var(--accent); background:var(--bg-sunken); }
.cp-content-body .obj-pick .on { font-weight:700; color:var(--text); font-size:12px; }
.cp-content-body .chk { display:flex; align-items:flex-start; gap:8px; padding:5px 0; font-size:12.5px; color:var(--text); }
.cp-content-body .chk-box { width:16px; height:16px; border:2px solid var(--border); border-radius:3px; flex-shrink:0; cursor:pointer; display:flex; align-items:center; justify-content:center; font-size:10px; color:#fff; transition:all .1s; margin-top:1px; }
.cp-content-body .chk-box.done { background:#2D9F5D; border-color:#2D9F5D; }
.cp-content-body strong { font-weight:700; }

/* Édition inline depuis la liste de tâches (statut/priorité/échéance/assigné cliquables) */
.inline-trig { display: inline-flex; align-items: center; gap: 4px; border-radius: 7px; padding: 1px 4px; margin: -1px -2px; cursor: pointer; transition: background .12s ease, box-shadow .12s ease; }
.inline-trig:hover { background: var(--bg-sunken); box-shadow: inset 0 0 0 1px var(--border); }
.inline-trig:hover .t-deadline { color: var(--text); }
.inline-pop .menu { padding: 4px; }

/* Échéances — code couleur GLOBAL (liste + kanban + tiroir + dashboards), theme-aware via tokens.
   overdue = rouge gras · today = bleu gras · future = inchangé (muted). Les règles .trow (layout.css)
   gardent la même valeur ; ces règles couvrent partout ailleurs où deadlineHtml() est rendu (kanban…). */
.t-deadline.overdue { color: var(--c-red-fg); font-weight: var(--fw-bold); }
.t-deadline.today   { color: var(--c-blue-fg); font-weight: var(--fw-bold); }

/* Réordonnancement des sous-tâches par glisser-déposer */
.chk-item[draggable="true"] { cursor: default; }
.chk-item.dragging { opacity: .45; }
.chk-item.drag-over { box-shadow: inset 0 2px 0 0 var(--accent); background: var(--accent-soft); }

/* Colonnes Kanban repliables (Terminée / Annulée fermées par défaut) */
.kcol-head .kchev { width: 14px; height: 14px; color: var(--text-muted); flex: none; transition: transform var(--dur) var(--ease); }
.kcol.collapsed .kcol-head .kchev { transform: rotate(-90deg); }
.kcol.collapsed { width: 188px; }
.kcol.collapsed .kcol-body { min-height: 30px; opacity: .65; }

/* ── @mentions : menu d'autocomplétion (flottant) + indicateur live ────────── */
.mention-pop {
  position: fixed; z-index: 1000;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--r-md); box-shadow: var(--shadow-lg);
  padding: 4px; max-height: 264px; overflow-y: auto;
  animation: menuIn var(--dur-fast) var(--ease-out);
}
.mention-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px; border-radius: var(--r-sm);
  cursor: pointer; font-size: var(--fs-sm); white-space: nowrap;
}
.mention-item.active, .mention-item:hover { background: var(--accent-soft); }
.mention-item .mention-ava {
  width: 22px; height: 22px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: var(--fw-medium); color: #fff; background: var(--accent);
}
.mention-item .mi-name { font-weight: var(--fw-medium); color: var(--text); }
.mention-item .mi-handle { color: var(--text-muted); margin-left: auto; padding-left: 14px; }

/* indicateur sous le composer : qui sera notifié (réutilise le style .mention jaune) */
.mention-hint { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 6px; font-size: var(--fs-sm); }
.mention-hint .mh-label { color: var(--text-muted); }
