/* ===== Symetree Space — feuille de style ===== */
:root {
    --bg: #ffffff; --side: #f7f6f3; --text: #37352f; --muted: #9b9a97; --faint: #c4c3bf;
    --border: #e9e9e7; --hover: rgba(55,53,47,.06); --active: rgba(55,53,47,.1);
    --accent: #2383e2; --accent-soft: rgba(35,131,226,.14); --callout: #f1f1ef; --code: #f7f6f3;
    --menu: #ffffff; --shadow: 0 8px 24px rgba(15,15,15,.14), 0 0 0 1px rgba(15,15,15,.05);
    --sel: rgba(35,131,226,.28); --danger: #eb5757; --done: #9b9a97; --ok: #2e9e6b;
    --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
    --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --tag-gray: #e3e2e0; --tag-gray-t: #32302c; --tag-brown: #eee0da; --tag-brown-t: #442a1e; --tag-orange: #fadec9; --tag-orange-t: #49290e;
    --tag-yellow: #fdecc8; --tag-yellow-t: #402c1b; --tag-green: #dbeddb; --tag-green-t: #1c3829; --tag-blue: #d3e5ef; --tag-blue-t: #183347;
    --tag-purple: #e8deee; --tag-purple-t: #412454; --tag-pink: #f5e0e9; --tag-pink-t: #4c2337; --tag-red: #ffe2dd; --tag-red-t: #5d1715;
}
:root[data-theme="dark"] {
    --bg: #191919; --side: #202020; --text: #d4d4d4; --muted: #7d7d7d; --faint: #4a4a4a;
    --border: #2f2f2f; --hover: rgba(255,255,255,.055); --active: rgba(255,255,255,.1);
    --accent: #529cca; --accent-soft: rgba(82,156,202,.2); --callout: #262626; --code: #202020;
    --menu: #252525; --shadow: 0 8px 24px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.08);
    --sel: rgba(82,156,202,.35); --danger: #ff7369; --done: #7d7d7d; --ok: #4dab7d;
    --tag-gray: #5a5a5a; --tag-gray-t: #eee; --tag-brown: #603b2c; --tag-brown-t: #f3e2d8; --tag-orange: #854c1d; --tag-orange-t: #fbe3d0;
    --tag-yellow: #89632a; --tag-yellow-t: #fdf0d0; --tag-green: #2b593f; --tag-green-t: #ddf0dd; --tag-blue: #28456c; --tag-blue-t: #d5e6f3;
    --tag-purple: #493063; --tag-purple-t: #eadff2; --tag-pink: #69314c; --tag-pink-t: #f7e2ec; --tag-red: #6e3630; --tag-red-t: #ffe2dd;
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #191919; --side: #202020; --text: #d4d4d4; --muted: #7d7d7d; --faint: #4a4a4a;
        --border: #2f2f2f; --hover: rgba(255,255,255,.055); --active: rgba(255,255,255,.1);
        --accent: #529cca; --accent-soft: rgba(82,156,202,.2); --callout: #262626; --code: #202020;
        --menu: #252525; --shadow: 0 8px 24px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.08);
        --sel: rgba(82,156,202,.35); --danger: #ff7369; --done: #7d7d7d; --ok: #4dab7d;
        --tag-gray: #5a5a5a; --tag-gray-t: #eee; --tag-brown: #603b2c; --tag-brown-t: #f3e2d8; --tag-orange: #854c1d; --tag-orange-t: #fbe3d0;
        --tag-yellow: #89632a; --tag-yellow-t: #fdf0d0; --tag-green: #2b593f; --tag-green-t: #ddf0dd; --tag-blue: #28456c; --tag-blue-t: #d5e6f3;
        --tag-purple: #493063; --tag-purple-t: #eadff2; --tag-pink: #69314c; --tag-pink-t: #f7e2ec; --tag-red: #6e3630; --tag-red-t: #ffe2dd;
    }
}
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 1rem; line-height: 1.5; -webkit-font-smoothing: antialiased; }
::selection { background: var(--sel); }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-radius: 4px; }
[contenteditable]:focus-visible { outline: none; }
.muted { color: var(--muted); } .small { font-size: .8rem; } .grow { flex: 1; min-width: 0; } .inline { display: inline; } .pad { padding: 1rem 0; }
.inp { font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: .4rem .6rem; width: 100%; min-width: 0; }
.inp:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 2px var(--accent-soft); }
.inp-sm { padding: .25rem .45rem; font-size: .85rem; width: auto; } .inp-xs { width: 3.5rem; text-align: center; }
.btn { display: inline-flex; align-items: center; gap: .35rem; padding: .4rem .8rem; border-radius: 6px; border: 1px solid var(--border); background: var(--bg); font-size: .9rem; white-space: nowrap; }
.btn:hover { background: var(--hover); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; } .btn-primary:hover { filter: brightness(1.08); background: var(--accent); }
.btn-danger { color: var(--danger); } .btn-danger:hover { background: rgba(235,87,87,.1); }
.btn-sm { padding: .25rem .55rem; font-size: .8rem; } .btn-block { width: 100%; justify-content: center; }
.lbl { display: flex; flex-direction: column; gap: .25rem; font-size: .8rem; color: var(--muted); font-weight: 500; }
.lbl .inp { color: var(--text); font-weight: 400; font-size: .9rem; }
.icon-btn { width: 26px; height: 26px; border-radius: 4px; display: inline-grid; place-items: center; color: var(--muted); font-size: .9rem; flex: none; }
.icon-btn:hover { background: var(--hover); color: var(--text); } .icon-btn.danger:hover { color: var(--danger); }
.sep { height: 1px; background: var(--border); margin: .35rem 0; }
.row-acts { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.danger { color: var(--danger); }
.readonly { cursor: default; }

/* ===== Structure ===== */
.app { display: flex; height: 100%; overflow: hidden; }
.sidebar { width: 250px; flex: none; background: var(--side); border-right: 1px solid var(--border); display: flex; flex-direction: column; font-size: .875rem; transition: transform .2s ease; }
.side-head { display: flex; align-items: center; gap: .25rem; padding: .6rem .5rem .4rem .6rem; position: relative; }
.ws-btn { display: flex; align-items: center; gap: .45rem; flex: 1; min-width: 0; padding: .3rem .4rem; border-radius: 5px; font-weight: 600; text-align: left; }
.ws-btn:hover { background: var(--hover); }
.ws-ico { width: 22px; height: 22px; border-radius: 5px; background: var(--bg); display: grid; place-items: center; font-size: .85rem; border: 1px solid var(--border); flex: none; }
.ws-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .chev-small { color: var(--muted); font-size: .7rem; }
.pop-user { display: flex; align-items: center; gap: .6rem; padding: .4rem .5rem; font-size: .85rem; line-height: 1.25; } .pop-user small { display: block; color: var(--muted); font-size: .72rem; }
.avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff; display: inline-grid; place-items: center; font-size: .72rem; font-weight: 700; flex: none; }
.search { margin: .1rem .5rem .4rem; position: relative; }
.search input { width: 100%; border: 1px solid var(--border); background: var(--bg); color: var(--text); border-radius: 6px; padding: .35rem .6rem .35rem 1.8rem; font: inherit; font-size: .85rem; }
.search::before { content: "⌕"; position: absolute; left: .55rem; top: .18rem; color: var(--muted); font-size: 1rem; pointer-events: none; }
.side-label { padding: .6rem .9rem .2rem; font-size: .68rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.tree { flex: 1; overflow: auto; padding: 0 .4rem .5rem; }
.node { display: flex; align-items: center; gap: .1rem; padding: .15rem .3rem; border-radius: 4px; color: var(--text); min-height: 28px; user-select: none; width: 100%; text-align: left; text-decoration: none; }
.node:hover { background: var(--hover); } .node.active { background: var(--active); font-weight: 600; }
.node-link { display: flex; align-items: center; gap: .3rem; flex: 1; min-width: 0; text-decoration: none; color: inherit; padding: .1rem 0; }
.node .chev { width: 20px; height: 20px; border-radius: 3px; display: grid; place-items: center; color: var(--muted); font-size: .6rem; flex: none; transition: transform .12s; }
.node .chev:hover { background: var(--active); color: var(--text); } .node .chev.open { transform: rotate(90deg); } .node .chev.leaf { visibility: hidden; }
.node .ico { width: 20px; text-align: center; flex: none; font-size: .95rem; }
.node .ttl { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.node .acts { display: none; } .node:hover .acts { display: flex; }
.node .acts button { width: 22px; height: 22px; border-radius: 3px; color: var(--muted); font-size: .9rem; } .node .acts button:hover { background: var(--active); color: var(--text); }
.children[hidden] { display: none; }
.empty-tree { color: var(--muted); padding: .5rem .9rem; font-size: .8rem; }
.side-foot { border-top: 1px solid var(--border); padding: .4rem; } .side-foot .node { color: var(--muted); } .side-foot .node:hover { color: var(--text); }
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar { display: flex; align-items: center; gap: .5rem; padding: .45rem .75rem; font-size: .85rem; min-height: 45px; }
.crumbs { display: flex; align-items: center; gap: .25rem; overflow: hidden; white-space: nowrap; flex: 1; min-width: 0; }
.crumbs a, .crumb-current { padding: .15rem .4rem; border-radius: 4px; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
.crumbs a:hover { background: var(--hover); } .crumbs .sep { color: var(--faint); height: auto; background: none; margin: 0; }
.top-acts { display: flex; align-items: center; gap: .25rem; } .top-acts .meta { color: var(--muted); font-size: .78rem; white-space: nowrap; margin-right: .3rem; }
.tb { padding: .25rem .5rem; border-radius: 4px; color: var(--muted); white-space: nowrap; font-size: .85rem; text-decoration: none; display: inline-flex; align-items: center; }
.tb:hover { background: var(--hover); color: var(--text); } .tb.on { color: var(--accent); font-weight: 600; } .tb.danger { color: var(--danger); }
.menu-btn { display: none; }
.rel-wrap { position: relative; }
.scroller { flex: 1; overflow-y: auto; overflow-x: hidden; }
.flash { margin: .5rem .75rem 0; padding: .5rem .8rem; border-radius: 6px; font-size: .85rem; background: var(--callout); border-left: 3px solid var(--ok); opacity: 0; transition: opacity .2s; }
.flash.show { opacity: 1; } .flash-error { border-left-color: var(--danger); }
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 39; display: none; }
.toast { position: fixed; left: 50%; bottom: 1.25rem; transform: translateX(-50%) translateY(20px); background: var(--text); color: var(--bg); padding: .5rem .9rem; border-radius: 6px; font-size: .85rem; opacity: 0; transition: .2s; pointer-events: none; z-index: 90; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translateX(-50%); }

/* ===== Popovers ===== */
.pop { position: absolute; z-index: 50; top: calc(100% + 4px); left: 0; background: var(--menu); box-shadow: var(--shadow); border-radius: 8px; min-width: 240px; max-width: min(360px, calc(100vw - 32px)); max-height: min(70vh, 480px); overflow: auto; padding: .35rem; font-size: .875rem; color: var(--text); text-align: left; font-weight: 400; }
.pop-right { left: auto; right: 0; } .pop-flip { left: auto; right: 0; } .pop-up { top: auto; bottom: calc(100% + 4px); }
.pop-wide { min-width: 340px; max-width: min(520px, calc(100vw - 32px)); } .pop-tall { max-height: min(80vh, 640px); }
.editor-pop, .cell-pop { position: fixed; top: 0; left: 0; }
.cell-pop { min-width: 260px; padding: .4rem; } .cell-pop .inp { margin-bottom: .3rem; width: 100%; }
.pick-list { max-height: 260px; overflow: auto; } .pick-list .item.on { background: var(--accent-soft); } .check-mark { width: 16px; color: var(--accent); font-weight: 700; }
.pop .pop-label { font-size: .68rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: .5rem .5rem .25rem; }
.pop .item { display: flex; align-items: center; gap: .6rem; width: 100%; text-align: left; padding: .35rem .5rem; border-radius: 5px; color: var(--text); text-decoration: none; }
.pop .item:hover, .pop .item.hl { background: var(--hover); } .pop .item.danger { color: var(--danger); }
.pop .item .sym { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 4px; background: var(--bg); font-size: .85rem; font-weight: 600; }
.pop .item .lbl { display: flex; flex-direction: column; line-height: 1.25; color: var(--text); font-weight: 400; font-size: .875rem; } .pop .item .lbl small { color: var(--muted); font-size: .72rem; }
.pop .item .kbd { margin-left: auto; color: var(--muted); font-size: .7rem; font-family: var(--mono); }
.pop-form { display: flex; flex-direction: column; gap: .5rem; padding: .4rem .5rem .5rem; }
.pop .sep { margin: .3rem 0; }
.emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: .1rem; padding: .2rem; }
.emoji-grid button { font-size: 1.25rem; height: 34px; border-radius: 4px; } .emoji-grid button:hover { background: var(--hover); }
.radio-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .35rem; }
.radio-card { display: flex; align-items: center; gap: .4rem; padding: .4rem .5rem; border: 1px solid var(--border); border-radius: 6px; cursor: pointer; font-size: .85rem; color: var(--text); }
.radio-card:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); } .radio-card input { display: none; } .radio-card .sym { font-size: 1rem; }
.fmt { position: fixed; z-index: 60; display: flex; background: var(--menu); box-shadow: var(--shadow); border-radius: 6px; padding: .15rem; gap: .05rem; }
.fmt button { width: 30px; height: 28px; border-radius: 4px; font-size: .85rem; color: var(--text); } .fmt button:hover { background: var(--hover); }
.fmt .b { font-weight: 700; } .fmt .i { font-style: italic; } .fmt .u { text-decoration: underline; } .fmt .s { text-decoration: line-through; } .fmt .c { font-family: var(--mono); font-size: .75rem; }
.details > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: .3rem; } .details > summary::before { content: "▸"; color: var(--muted); font-size: .7rem; } .details[open] > summary::before { content: "▾"; }
.prop-edit { border: 1px solid var(--border); border-radius: 6px; margin: .3rem .5rem; padding: .3rem .5rem; }
.prop-edit > summary { cursor: pointer; display: flex; align-items: center; gap: .4rem; font-size: .85rem; padding: .2rem 0; list-style: none; }
.prop-edit .pop-form { padding: .3rem 0; }
.choices-edit { display: flex; flex-direction: column; gap: .3rem; padding: .3rem 0; }
.choice-line { display: flex; gap: .3rem; align-items: center; } .choice-line .inp { flex: 1; }
.color-sel { font: inherit; font-size: .75rem; border: 1px solid var(--border); border-radius: 4px; padding: .2rem; background: var(--bg); color: var(--text); width: 6rem; }
.prop-list { display: flex; flex-direction: column; } .prop-item { display: flex; align-items: center; gap: .5rem; padding: .3rem .5rem; font-size: .85rem; border-radius: 4px; } .prop-item:hover { background: var(--hover); }
.prop-ico { width: 20px; text-align: center; color: var(--muted); font-size: .8rem; flex: none; }
.switch { position: relative; width: 30px; height: 18px; flex: none; cursor: pointer; } .switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch-ui { position: absolute; inset: 0; background: var(--accent); border-radius: 9px; transition: .15s; } .switch-ui::after { content: ""; position: absolute; top: 2px; left: 14px; width: 14px; height: 14px; background: #fff; border-radius: 50%; transition: .15s; }
.switch input:checked + .switch-ui { background: var(--faint); } .switch input:checked + .switch-ui::after { left: 2px; }

/* ===== Page ===== */
.cover { height: 200px; background: var(--cover-bg, linear-gradient(120deg,#c2e9fb,#a1c4fd)); position: relative; }
.cover .cover-acts { position: absolute; right: 1rem; bottom: .6rem; display: flex; gap: .3rem; opacity: 0; transition: opacity .15s; } .cover:hover .cover-acts, .cover:focus-within .cover-acts { opacity: 1; }
.cover-acts button { background: rgba(255,255,255,.85); color: #37352f; font-size: .75rem; padding: .25rem .5rem; border-radius: 4px; box-shadow: 0 1px 2px rgba(0,0,0,.15); }
.page { max-width: 760px; margin: 0 auto; padding: 0 clamp(16px, 6vw, 56px) 20vh; }
.page-wide { max-width: none; padding-left: clamp(16px, 4vw, 48px); padding-right: clamp(16px, 4vw, 48px); padding-bottom: 4rem; }
.page + .page { padding-top: 0; }
.page-head { padding-top: 2.5rem; position: relative; } .page-head.has-cover { padding-top: 0; margin-top: -36px; }
.page-icon { font-size: 4.25rem; line-height: 1; width: 78px; height: 78px; display: grid; place-items: center; border-radius: 8px; user-select: none; }
.page-icon:hover { background: var(--hover); } .page-icon.none { display: none; }
.head-acts { display: flex; gap: .25rem; margin: .5rem 0 .25rem; opacity: 0; transition: opacity .15s; height: 26px; }
.page-head:hover .head-acts, .head-acts:focus-within { opacity: 1; }
.head-acts button { color: var(--muted); font-size: .78rem; padding: .2rem .45rem; border-radius: 4px; } .head-acts button:hover { background: var(--hover); color: var(--text); }
.title { font-size: 2.5rem; font-weight: 700; line-height: 1.2; margin: 0 0 .5rem; outline: none; word-break: break-word; text-wrap: balance; }
.title:empty::before { content: attr(data-placeholder); color: var(--faint); }
.banner { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; background: var(--callout); border-left: 3px solid var(--danger); padding: .6rem .9rem; border-radius: 4px; margin: 1.5rem 0; font-size: .9rem; }
.readonly-blocks p { margin: .3rem 0; } .readonly-blocks .ro-h1 { font-size: 1.6rem; font-weight: 700; } .readonly-blocks .ro-h2 { font-size: 1.3rem; font-weight: 600; } .readonly-blocks .ro-h3 { font-size: 1.1rem; font-weight: 600; }
.readonly-blocks .ro-bullet::before, .readonly-blocks .ro-todo::before { content: "• "; } .readonly-blocks .ro-quote { border-left: 3px solid var(--text); padding-left: .8rem; }
.search-big { display: flex; gap: .5rem; margin: 1rem 0; }
.result-list { display: flex; flex-direction: column; gap: .2rem; }
.result { display: flex; align-items: center; gap: .7rem; padding: .5rem .6rem; border-radius: 6px; text-decoration: none; }
.result:hover { background: var(--hover); } .result .ico { font-size: 1.2rem; width: 28px; text-align: center; flex: none; }
.result .grow { display: flex; flex-direction: column; line-height: 1.3; } .result-title { font-weight: 500; text-decoration: none; } .result small { font-size: .75rem; } .snippet { color: var(--muted); }

/* ===== Blocs ===== */
.blocks { padding-top: .5rem; }
.block { position: relative; display: flex; align-items: flex-start; gap: .25rem; padding: .15rem 0; margin-left: -38px; padding-left: 38px; border-radius: 3px; }
.block .handle { position: absolute; left: 10px; top: .3rem; width: 22px; height: 22px; display: grid; place-items: center; color: var(--faint); opacity: 0; cursor: grab; border-radius: 4px; font-size: 1rem; letter-spacing: -.15em; user-select: none; }
.block:hover .handle, .block:focus-within .handle { opacity: 1; } .block .handle:hover { background: var(--hover); color: var(--muted); }
.block.dragging { opacity: .35; }
.block.drop-top::before, .block.drop-bottom::after { content: ""; position: absolute; left: 38px; right: 0; height: 3px; background: var(--accent); border-radius: 2px; pointer-events: none; }
.block.drop-top::before { top: -2px; } .block.drop-bottom::after { bottom: -2px; }
.content { flex: 1; min-width: 0; outline: none; white-space: pre-wrap; word-break: break-word; padding: .15rem .1rem; caret-color: var(--text); }
.content:empty::before { content: attr(data-placeholder); color: var(--faint); pointer-events: none; }
.content b, .content strong { font-weight: 600; }
.content code { font-family: var(--mono); font-size: .85em; background: var(--accent-soft); color: #eb5757; padding: .1em .3em; border-radius: 3px; }
.content a { color: inherit; text-decoration: underline; text-decoration-color: var(--faint); text-underline-offset: 2px; }
.b-h1 .content { font-size: 1.875rem; font-weight: 700; line-height: 1.3; margin-top: 1.4rem; }
.b-h2 .content { font-size: 1.5rem; font-weight: 600; line-height: 1.3; margin-top: 1.1rem; }
.b-h3 .content { font-size: 1.25rem; font-weight: 600; line-height: 1.3; margin-top: .8rem; }
.b-h1 .handle { top: 1.75rem; } .b-h2 .handle { top: 1.35rem; } .b-h3 .handle { top: 1rem; }
.prefix { flex: none; width: 24px; display: grid; place-items: center; height: 1.5rem; margin-top: .15rem; color: var(--text); font-variant-numeric: tabular-nums; font-size: .9rem; }
.b-bullet .prefix::before { content: "•"; font-size: 1.4rem; line-height: 1; }
.b-todo .prefix input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.b-todo.done .content { color: var(--done); text-decoration: line-through; }
.b-quote .content { border-left: 3px solid var(--text); padding-left: .9rem; margin: .2rem 0; font-size: 1.05rem; }
.b-callout { margin: .25rem 0; } .b-callout .callout { flex: 1; display: flex; gap: .6rem; background: var(--callout); border-radius: 4px; padding: .8rem 1rem; min-width: 0; }
.b-callout .emoji { flex: none; font-size: 1.25rem; line-height: 1.4; cursor: pointer; }
.b-code .content { font-family: var(--mono); font-size: .85rem; background: var(--code); border: 1px solid var(--border); border-radius: 4px; padding: 1rem 1.1rem; line-height: 1.55; tab-size: 2; }
.b-divider { padding: .5rem 0; } .b-divider .rule { flex: 1; height: 1px; background: var(--border); }
.b-page .pagelink { flex: 1; display: flex; align-items: center; gap: .5rem; padding: .2rem .3rem; border-radius: 4px; text-decoration: underline; text-decoration-color: var(--faint); text-underline-offset: 3px; font-weight: 500; }
.b-page .pagelink:hover { background: var(--hover); } .b-page .pagelink .ico { width: 22px; text-align: center; }
.add-line { margin-top: .5rem; color: var(--faint); font-size: .85rem; padding: .25rem .1rem; cursor: text; opacity: 0; transition: opacity .15s; }
.page:hover .add-line { opacity: 1; }

/* ===== Propriétés d'une ligne ===== */
.props { display: flex; flex-direction: column; margin: .5rem 0 1rem; border-bottom: 1px solid var(--border); padding-bottom: .5rem; }
.prop-row { display: flex; align-items: flex-start; gap: .5rem; min-height: 34px; }
.prop-name { width: 170px; flex: none; color: var(--muted); font-size: .85rem; display: flex; align-items: center; gap: .3rem; padding: .35rem .3rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prop-val { flex: 1; min-width: 0; padding: .3rem .4rem; border-radius: 4px; min-height: 30px; }
.prop-val:hover { background: var(--hover); } .prop-add { padding: .3rem .3rem; }

/* ===== Cellules ===== */
.cell { cursor: pointer; } .cell:hover { background: var(--hover); } .cell.editing { background: var(--bg); box-shadow: inset 0 0 0 2px var(--accent); cursor: text; } .cell.saving { opacity: .6; }
.cell-input { width: 100%; font: inherit; color: var(--text); background: transparent; border: 0; outline: none; padding: 0; resize: vertical; min-width: 80px; }
.tag { display: inline-block; padding: .05rem .5rem; border-radius: 3px; font-size: .8rem; line-height: 1.5; margin: .1rem .25rem .1rem 0; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.tag-gray { background: var(--tag-gray); color: var(--tag-gray-t); } .tag-brown { background: var(--tag-brown); color: var(--tag-brown-t); } .tag-orange { background: var(--tag-orange); color: var(--tag-orange-t); }
.tag-yellow { background: var(--tag-yellow); color: var(--tag-yellow-t); } .tag-green { background: var(--tag-green); color: var(--tag-green-t); } .tag-blue { background: var(--tag-blue); color: var(--tag-blue-t); }
.tag-purple { background: var(--tag-purple); color: var(--tag-purple-t); } .tag-pink { background: var(--tag-pink); color: var(--tag-pink-t); } .tag-red { background: var(--tag-red); color: var(--tag-red-t); }
.check { display: inline-grid; place-items: center; width: 16px; height: 16px; border: 1.5px solid var(--faint); border-radius: 3px; font-size: .7rem; color: #fff; }
.check.on { background: var(--accent); border-color: var(--accent); }
.num { font-variant-numeric: tabular-nums; } .date { white-space: nowrap; }
.link { color: var(--text); text-decoration: underline; text-decoration-color: var(--faint); text-underline-offset: 2px; }
.person { display: inline-flex; align-items: center; gap: .3rem; margin-right: .5rem; font-size: .85rem; } .person .avatar { width: 20px; height: 20px; font-size: .6rem; }
.rel { display: inline-block; text-decoration: underline; text-decoration-color: var(--faint); text-underline-offset: 2px; margin-right: .5rem; }
.txt { white-space: pre-wrap; }

/* ===== Base : barre de vues ===== */
.db { margin-top: .5rem; }
.view-bar { display: flex; align-items: center; justify-content: space-between; gap: .5rem; border-bottom: 1px solid var(--border); flex-wrap: wrap; padding-bottom: .2rem; margin-bottom: .6rem; }
.view-tabs { display: flex; align-items: center; gap: .1rem; overflow-x: auto; max-width: 100%; }
.vtab { display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .55rem; border-radius: 4px; font-size: .85rem; color: var(--muted); text-decoration: none; white-space: nowrap; border-bottom: 2px solid transparent; }
.vtab:hover { background: var(--hover); color: var(--text); } .vtab.active { color: var(--text); font-weight: 600; border-bottom-color: var(--text); border-radius: 4px 4px 0 0; }
.vtab-add { font-size: 1rem; } .vico { font-size: .8rem; }
.view-tools { display: flex; align-items: center; gap: .15rem; flex-wrap: wrap; }
.tool-lbl { display: inline-flex; align-items: center; gap: .3rem; font-size: .8rem; color: var(--muted); margin-right: .3rem; }
.vs-list { display: flex; flex-direction: column; gap: .35rem; } .vs-row { display: flex; gap: .3rem; align-items: center; flex-wrap: wrap; } .vs-row .inp { flex: 1; min-width: 90px; }

/* ===== Tableau ===== */
.table-wrap { overflow-x: auto; margin: 0 -8px; padding: 0 8px; }
.dbt { border-collapse: collapse; width: 100%; font-size: .875rem; min-width: 600px; }
.dbt th { text-align: left; font-weight: 500; color: var(--muted); font-size: .8rem; padding: .35rem .6rem; border-bottom: 1px solid var(--border); white-space: nowrap; }
.dbt th .prop-ico { margin-right: .3rem; }
.dbt td { padding: .3rem .6rem; border-bottom: 1px solid var(--border); vertical-align: top; max-width: 320px; min-width: 110px; }
.dbt tr.dragging { opacity: .4; }
.td-title { position: relative; min-width: 220px; white-space: nowrap; } .td-title .cell-title { display: inline-block; font-weight: 500; padding: .1rem .3rem; border-radius: 3px; max-width: 320px; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.drag-handle { color: var(--faint); cursor: grab; opacity: 0; margin-right: .2rem; letter-spacing: -.15em; font-size: .9rem; } tr:hover .drag-handle { opacity: 1; }
.open-btn { font-size: .72rem; color: var(--muted); padding: .1rem .4rem; border-radius: 3px; border: 1px solid var(--border); background: var(--bg); text-decoration: none; opacity: 0; margin-left: .3rem; vertical-align: middle; }
tr:hover .open-btn, .open-btn:focus { opacity: 1; } .open-btn:hover { background: var(--hover); color: var(--text); }
.td-acts { width: 34px; min-width: 34px; } .td-acts .icon-btn { opacity: 0; } tr:hover .td-acts .icon-btn { opacity: 1; }
.th-acts { width: 34px; } .empty-row { color: var(--muted); padding: 1rem .6rem; text-align: center; }
.dbt tfoot td { border-bottom: 0; padding: .3rem .4rem; } .dbt tfoot .count { float: right; padding-top: .3rem; }
.add-row { color: var(--muted); font-size: .85rem; padding: .3rem .4rem; border-radius: 4px; width: 100%; text-align: left; } .add-row:hover { background: var(--hover); color: var(--text); }

/* ===== Kanban ===== */
.board { display: flex; gap: .75rem; overflow-x: auto; padding-bottom: 1rem; align-items: flex-start; }
.col { flex: 0 0 260px; background: var(--side); border-radius: 8px; padding: .5rem; min-height: 120px; transition: box-shadow .15s; }
.col.over { box-shadow: inset 0 0 0 2px var(--accent); }
.col-head { display: flex; align-items: center; justify-content: space-between; padding: .2rem .3rem .5rem; } .col-head .count { font-size: .8rem; }
.cards { display: flex; flex-direction: column; gap: .4rem; min-height: 20px; }
.card { display: block; background: var(--bg); border-radius: 6px; padding: .55rem .7rem; box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 0 0 1px var(--border); text-decoration: none; font-size: .85rem; cursor: grab; }
.card:hover { box-shadow: 0 2px 6px rgba(0,0,0,.12), 0 0 0 1px var(--border); } .card.dragging { opacity: .4; }
.card-title { font-weight: 500; margin-bottom: .2rem; } .card-prop { color: var(--muted); font-size: .78rem; margin-top: .15rem; overflow: hidden; text-overflow: ellipsis; } .card-prop .tag { font-size: .72rem; }
.col .add-row { margin-top: .3rem; }

/* ===== Calendrier ===== */
.cal-nav { display: flex; align-items: center; gap: .3rem; margin-bottom: .5rem; } .cal-month { font-size: 1rem; padding: 0 .3rem; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-left: 1px solid var(--border); border-top: 1px solid var(--border); }
.cal-dow { font-size: .72rem; color: var(--muted); text-align: center; padding: .3rem 0; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--side); }
.cal-day { min-height: 96px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: .25rem; font-size: .8rem; display: flex; flex-direction: column; gap: .15rem; transition: background .1s; }
.cal-day.other { background: var(--side); color: var(--muted); }
.cal-day.today .cal-num { color: var(--accent); font-weight: 700; } .cal-day.over { background: var(--accent-soft); }
.cal-num { display: flex; justify-content: space-between; align-items: center; font-variant-numeric: tabular-nums; padding: 0 .2rem; }
.cal-add button { opacity: 0; width: 20px; height: 20px; border-radius: 3px; color: var(--muted); } .cal-day:hover .cal-add button { opacity: 1; } .cal-add button:hover { background: var(--hover); color: var(--text); }
.chip { display: block; font-size: .75rem; padding: .1rem .4rem; border-radius: 3px; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: grab; }
.chip.dragging { opacity: .4; }

/* ===== Liste ===== */
.list { display: flex; flex-direction: column; }
.list-row { display: flex; align-items: center; gap: .6rem; padding: .45rem .5rem; border-bottom: 1px solid var(--border); text-decoration: none; font-size: .9rem; }
.list-row:hover { background: var(--hover); } .list-row .ico { width: 22px; text-align: center; flex: none; }
.list-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.list-props { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; justify-content: flex-end; font-size: .8rem; color: var(--muted); }
.list-prop .tag { margin: 0; }

/* ===== Connexion ===== */
.login-body { background: var(--side); }
.login { min-height: 100%; display: grid; place-items: center; padding: 1rem; }
.login-card { background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 2rem; width: min(380px, 100%); display: flex; flex-direction: column; gap: .8rem; box-shadow: 0 8px 30px rgba(0,0,0,.06); }
.login-logo { font-size: 2.5rem; } .login-card h1 { margin: 0; font-size: 1.5rem; } .login-card p { margin: 0 0 .5rem; }

/* ===== Mobile ===== */
@media (max-width: 768px) {
    .sidebar { position: fixed; top: 0; bottom: 0; left: 0; z-index: 40; transform: translateX(-100%); }
    .app.side-open .sidebar { transform: none; } .app.side-open .overlay { display: block; }
    .menu-btn { display: grid; } .top-acts .meta { display: none; }
    .block { margin-left: -30px; padding-left: 30px; } .block .handle { left: 4px; opacity: .6; }
    .cover { height: 130px; } .title { font-size: 1.9rem; }
    .prop-name { width: 120px; } .cal-day { min-height: 64px; } .chip { font-size: .65rem; }
    .pop-wide { min-width: 0; width: calc(100vw - 32px); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }

/* ===== Lot C : commentaires & partage ===== */
.comments { position: fixed; top: 0; right: 0; bottom: 0; width: min(380px, 100vw); background: var(--bg); border-left: 1px solid var(--border); box-shadow: -8px 0 24px rgba(0,0,0,.08); transform: translateX(100%); transition: transform .2s ease; z-index: 45; display: flex; flex-direction: column; }
.comments.open { transform: none; }
.comments-head { display: flex; align-items: center; gap: .5rem; padding: .7rem .9rem; border-bottom: 1px solid var(--border); } .comments-head strong { flex: 1; }
.comments-body { flex: 1; overflow: auto; padding: .8rem .9rem; display: flex; flex-direction: column; gap: .8rem; }
.comment-form { display: flex; flex-direction: column; gap: .4rem; } .comment-form textarea { resize: vertical; font-size: .9rem; }
.comment-target { font-size: .78rem; color: var(--accent); }
.thread { border: 1px solid var(--border); border-radius: 8px; padding: .6rem .7rem; display: flex; flex-direction: column; gap: .5rem; scroll-margin-top: 1rem; }
.thread.resolved { opacity: .6; } .thread.resolved .comment-body { text-decoration: line-through; text-decoration-color: var(--faint); }
.thread:target { box-shadow: 0 0 0 2px var(--accent); }
.comment { display: flex; gap: .5rem; align-items: flex-start; } .comment.reply { margin-left: 1.4rem; }
.comment-meta { font-size: .8rem; display: flex; gap: .4rem; align-items: baseline; flex-wrap: wrap; } .comment-body { font-size: .9rem; white-space: pre-wrap; word-break: break-word; }
.thread-acts { display: flex; gap: .7rem; align-items: center; flex-wrap: wrap; padding-left: 2rem; }
.link-btn { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; font-size: .85rem; } .link-btn:hover { color: var(--text); } .link-btn.danger:hover { color: var(--danger); }
.reply-box summary { list-style: none; cursor: pointer; } .reply-box[open] summary { margin-bottom: .4rem; }
.check-lbl { display: inline-flex; align-items: center; gap: .3rem; font-size: .8rem; color: var(--muted); }
.share-list { display: flex; flex-direction: column; gap: .4rem; padding: 0 .5rem .4rem; }
.share-item { display: flex; align-items: center; gap: .5rem; font-size: .85rem; } .share-item .grow { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; } .share-item small { font-size: .72rem; }
.share-url { font-size: .75rem; font-family: var(--mono); } .link-avatar { background: var(--callout); color: var(--text); }
.block .bubble { position: absolute; right: -28px; top: .35rem; font-size: .7rem; color: var(--accent); background: var(--accent-soft); border-radius: 10px; padding: 0 .4rem; cursor: pointer; }
.block.flash-block { background: var(--accent-soft); transition: background 1s; }
.is-readonly .content { cursor: default; } .is-readonly .handle { display: none; } .is-readonly .head-acts, .is-readonly .cover-acts { display: none; } .is-readonly .page-icon { cursor: default; pointer-events: none; }
.side-meta { padding: .4rem .9rem; }

/* ===== Lot D : images, fichiers, versions ===== */
.b-image .figure { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: .25rem; }
.b-image img { max-width: 100%; border-radius: 4px; display: block; }
.b-image .caption { font-size: .8rem; color: var(--muted); outline: none; min-width: 60px; }
.b-image .caption:empty::before { content: "Légende…"; color: var(--faint); }
.b-file .filecard { flex: 1; display: flex; align-items: center; gap: .6rem; padding: .5rem .7rem; border: 1px solid var(--border); border-radius: 6px; text-decoration: none; }
.b-file .filecard:hover { background: var(--hover); } .b-file .filecard small { color: var(--muted); }
.upload-hint { font-size: .8rem; color: var(--muted); padding: .3rem 0; }
.versions { display: grid; grid-template-columns: 240px 1fr; gap: 1rem; }
.version-list { display: flex; flex-direction: column; gap: .15rem; max-height: 70vh; overflow: auto; }
.version-item { display: flex; flex-direction: column; padding: .4rem .6rem; border-radius: 6px; text-decoration: none; font-size: .85rem; } .version-item:hover { background: var(--hover); } .version-item.active { background: var(--active); }
.version-preview { border: 1px solid var(--border); border-radius: 8px; padding: 1rem; }
@media (max-width: 768px) { .versions { grid-template-columns: 1fr; } }

/* ===== Impression / PDF ===== */
@media print {
    .sidebar, .topbar, .comments, .overlay, .add-line, .handle, .bubble, .cover-acts, .head-acts, .view-tools, .vtab-add, .open-btn, .td-acts, .th-acts, .add-row, .cal-add, .drag-handle, .toast, .fmt, .editor-pop, .cell-pop { display: none !important; }
    .app { display: block; height: auto; overflow: visible; } .scroller { overflow: visible; } .main { display: block; }
    .page { max-width: none; padding: 0 0 1rem; } .block { margin-left: 0; padding-left: 0; page-break-inside: avoid; }
    body { background: #fff; color: #000; } .cover { height: 120px; }
    a { text-decoration: none; color: inherit; }
}

/* ===== Compléments éditeur : tableau, dépliant, base incluse ===== */
.b-table { display: block; margin-left: 0; padding-left: 0; }
.b-table .handle { left: -28px; }
.b-table .tbl-wrap { overflow-x: auto; }
.b-table table { border-collapse: collapse; width: 100%; font-size: .9rem; }
.b-table td { border: 1px solid var(--border); padding: .35rem .55rem; min-width: 90px; vertical-align: top; outline: none; white-space: pre-wrap; word-break: break-word; }
.b-table tr.hdr td { background: var(--side); font-weight: 600; }
.b-table td:focus { box-shadow: inset 0 0 0 2px var(--accent); }
.b-table .tbl-acts { display: flex; gap: .3rem; margin-top: .25rem; opacity: 0; transition: opacity .15s; }
.b-table:hover .tbl-acts, .b-table:focus-within .tbl-acts { opacity: 1; }
.b-table .tbl-acts button { font-size: .75rem; color: var(--muted); padding: .15rem .4rem; border-radius: 4px; border: 1px solid var(--border); }
.b-table .tbl-acts button:hover { background: var(--hover); color: var(--text); }
.b-toggle { flex-direction: column; align-items: stretch; }
.b-toggle .toggle-head { display: flex; align-items: flex-start; gap: .25rem; }
.b-toggle .chev { width: 24px; height: 1.6rem; display: grid; place-items: center; color: var(--muted); font-size: .7rem; cursor: pointer; border-radius: 4px; flex: none; transition: transform .12s; }
.b-toggle .chev:hover { background: var(--hover); } .b-toggle.open .chev { transform: rotate(90deg); }
.b-toggle .toggle-head .content { font-weight: 500; }
.toggle-children { margin-left: 24px; padding-left: .5rem; border-left: 2px solid var(--border); display: none; }
.b-toggle.open + .toggle-children, .toggle-children.open { display: block; }
.toggle-children:empty::after { content: "Vide. Tapez ici ou glissez un bloc."; color: var(--faint); font-size: .8rem; display: block; padding: .2rem; }
.b-dbview { display: block; margin-left: 0; padding-left: 0; }
.b-dbview .handle { left: -28px; }
.db-embed { border: 1px solid var(--border); border-radius: 8px; padding: .5rem .75rem .25rem; margin: .3rem 0; }
.embed-bar { display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap; margin-bottom: .3rem; }
.embed-title { font-weight: 600; text-decoration: none; } .embed-title:hover { text-decoration: underline; }
.db-embed .dbt { min-width: 0; } .db-embed .table-wrap { margin: 0; padding: 0; }
.dbt tbody.group-head td { background: var(--side); padding: .4rem .6rem; border-bottom: 1px solid var(--border); }
.date-range { display: flex; align-items: center; gap: .3rem; } .date-range .cell-input { width: auto; }
.filelink { white-space: nowrap; }
@media print { .b-table .tbl-acts { display: none; } .toggle-children { display: block !important; } }

/* ===== Barre latérale : favoris, bases, menu, aperçu ===== */
.node.is-db .node-link .ico { background: var(--accent-soft); border-radius: 4px; font-size: .8rem; }
.db-badge { font-size: .6rem; font-weight: 700; letter-spacing: .05em; color: var(--accent); border: 1px solid var(--accent); border-radius: 3px; padding: 0 .25rem; margin-left: .3rem; line-height: 1.3; flex: none; }
.node .acts { display: none; align-items: center; gap: .05rem; }
.node:hover .acts, .node:focus-within .acts { display: flex; }
.node .acts .more { width: 22px; height: 22px; border-radius: 3px; color: var(--muted); font-size: .8rem; letter-spacing: -.05em; }
.node .acts .more:hover { background: var(--active); color: var(--text); }
.side-pop { position: fixed; top: 0; left: 0; z-index: 70; min-width: 230px; }
.top-tools { display: flex; align-items: center; gap: .15rem; }
.peek-panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(46vw, 760px); background: var(--bg); border-left: 1px solid var(--border); box-shadow: -8px 0 24px rgba(0,0,0,.12); z-index: 44; display: flex; flex-direction: column; }
.peek-head { display: flex; align-items: center; justify-content: space-between; padding: .3rem .6rem; border-bottom: 1px solid var(--border); }
.peek-panel iframe { flex: 1; border: 0; width: 100%; }
.peek-mode .sidebar, .peek-mode .menu-btn, .peek-mode .comments { display: none !important; }
.peek-mode .main { width: 100%; }
@media (max-width: 768px) { .peek-panel { width: 100vw; } }

/* ===== Boîte de réception des commentaires ===== */
.side-inbox { padding: 0 .5rem .2rem; position: relative; }
.inbox-btn { position: relative; }
.badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 .35rem; border-radius: 9px; background: #e5484d; color: #fff; font-size: .7rem; font-weight: 700; margin-left: .4rem; }
.pop-inbox { left: .5rem; min-width: 300px; max-width: 360px; }
.inbox-item { display: flex; flex-direction: column; gap: .2rem; padding: .5rem .6rem; border-radius: 6px; text-decoration: none; border-top: 1px solid var(--border); }
.inbox-item:hover { background: var(--hover); }
.inbox-page { font-weight: 600; font-size: .85rem; display: flex; align-items: center; }
.inbox-line { font-size: .8rem; color: var(--muted); line-height: 1.3; } .inbox-line strong { color: var(--text); }

/* ===== Nœuds de la barre latérale façon Notion : icône au repos, chevron au survol ===== */
.node .chev { display: none; }
.node .node-link .ico { display: inline-block; }
.node:hover .chev, .node:focus-within .chev { display: grid; }
.node:hover .node-link .ico, .node:focus-within .node-link .ico { display: none; }
.node .chev.leaf { visibility: visible; }
.node .acts { margin-left: auto; }
.fav-node .chev { display: none !important; } .fav-node:hover .node-link .ico { display: inline-block !important; }
.children .empty-tree { padding-top: .15rem; padding-bottom: .15rem; }

/* ===== Barre latérale : repli, icônes nues, boîte en icône ===== */
.side-head { gap: .15rem; padding-right: .45rem; }
.collapse-btn { opacity: 0; transition: opacity .15s; }
.sidebar:hover .collapse-btn, .collapse-btn:focus-visible { opacity: 1; }
.ws-ico { background: none; border: 0; width: auto; height: auto; font-size: 1rem; }
.ws-ico img { width: 20px; height: 20px; display: block; }
.ws-btn { padding-left: .2rem; }
.side-inbox { padding: 0; position: relative; }
.inbox-btn { position: relative; }
.badge-dot { position: absolute; top: -4px; right: -6px; margin: 0; min-width: 16px; height: 16px; font-size: .65rem; padding: 0 .3rem; }
.pop-inbox { left: auto; right: 0; }
.node.is-db .node-link .ico { background: none; border-radius: 0; font-size: .95rem; }
.node .ico { font-size: 1rem; }
.expand-btn { display: none; }
.app.side-collapsed .sidebar { display: none; }
.app.side-collapsed .expand-btn { display: grid; }
@media (max-width: 768px) { .app.side-collapsed .sidebar { display: flex; } .expand-btn { display: none !important; } }

/* ===== Barre d'onglets ===== */
.tabbar { display: flex; align-items: center; gap: .1rem; padding: .3rem .5rem 0; border-bottom: 1px solid var(--border); background: var(--side); min-height: 38px; }
.tabs { display: flex; align-items: flex-end; gap: .1rem; overflow-x: auto; flex: 1; min-width: 0; scrollbar-width: none; }
.tab { display: flex; align-items: center; gap: .35rem; padding: .35rem .5rem .35rem .7rem; border-radius: 8px 8px 0 0; font-size: .85rem; color: var(--muted); text-decoration: none; max-width: 220px; min-width: 90px; white-space: nowrap; border: 1px solid transparent; border-bottom: 0; }
.tab:hover { background: var(--hover); color: var(--text); }
.tab.active { background: var(--bg); color: var(--text); border-color: var(--border); margin-bottom: -1px; }
.tab-title { overflow: hidden; text-overflow: ellipsis; flex: 1; } .tab-ico { flex: none; }
.tab-close { width: 18px; height: 18px; border-radius: 3px; color: var(--muted); font-size: .7rem; opacity: 0; flex: none; }
.tab:hover .tab-close, .tab.active .tab-close { opacity: 1; } .tab-close:hover { background: var(--active); color: var(--text); }
.tab-add { flex: none; }
.tabbar .icon-btn { font-size: 1.1rem; }
.top-tools .meta { margin: 0 .3rem; }
.top-tools .star.on { color: #e8b400; }
.top-tools .tb svg { vertical-align: -3px; }
@media (max-width: 768px) { .tabbar { display: none; } }
@media print { .tabbar { display: none !important; } }
/* Aperçu latéral : masqué par défaut, glisse depuis la droite */
.peek-panel[hidden] { display: none !important; }
.peek-panel { transform: translateX(100%); animation: peek-in .22s ease forwards; }
@keyframes peek-in { to { transform: none; } }

/* ===== Tableaux : lignes compactes, texte tronqué avec « … », texte complet au survol ===== */
.dbt td { padding: .2rem .6rem; vertical-align: middle; position: relative; }
.dbt td .txt { display: block; max-width: 320px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.5; }
.dbt td .txt br { display: none; }
.dbt td .txt::after { content: ""; display: block; }
.cell-preview { position: fixed; z-index: 60; max-width: min(520px, 80vw); white-space: pre-wrap; word-break: break-word; background: var(--bg); color: var(--text); box-shadow: 0 6px 24px rgba(0,0,0,.28); border: 1px solid var(--border); border-radius: 6px; padding: .3rem .6rem; font-size: .875rem; line-height: 1.5; cursor: pointer; }
.dbt td .tag { margin: .1rem .2rem .1rem 0; }
.dbt td.cell-multi_select, .dbt td.cell-person, .dbt td.cell-relation { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Structure façon Notion : colonnes séparées, titre avec icône de page */
.dbt th, .dbt td { border-right: 1px solid var(--border); }
.dbt th:last-child, .dbt td:last-child, .dbt tfoot td, .dbt .group-head td { border-right: 0; }
.dbt th { padding: .3rem .6rem; }
.dbt th .prop-ico { color: var(--faint); }
.td-title .cell-title { font-weight: 500; }
.td-title .row-ico { display: inline-block; width: 1.2em; margin-right: .15em; color: var(--muted); text-align: center; }
.dbt tr:hover td { background: var(--hover); }
.dbt td .txt.long { max-width: none; }
.td-title .cell-title { max-width: 250px; }

/* ===== Colonnes redimensionnables ===== */
.dbt-fixed { table-layout: fixed; min-width: 0; }
.dbt-fixed th, .dbt-fixed td { overflow: hidden; }
.dbt-fixed th { position: relative; overflow: visible; text-overflow: ellipsis; }
.dbt-fixed td .txt { max-width: none; }
.td-title .cell-title { max-width: 100%; }
.col-grip { position: absolute; top: 0; right: -4px; width: 8px; height: 100%; cursor: col-resize; z-index: 2; }
.col-grip::after { content: ""; position: absolute; left: 3px; top: 15%; height: 70%; width: 2px; background: var(--accent); opacity: 0; transition: opacity .12s; }
.col-grip:hover::after, th.resizing .col-grip::after { opacity: 1; }
.table-wrap { padding-right: 1rem; }

/* ===== Blocs masqués pour les invités ===== */
.block.is-private { position: relative; }
.block.is-private > .content, .block.is-private > .callout, .block.is-private > .figure, .block.is-private > .filecard, .block.is-private > .rule, .block.is-private > .b-table, .block.is-private > .toggle-head { opacity: .62; }
.block.is-private::before { content: ""; position: absolute; left: -.55rem; top: .1rem; bottom: .1rem; width: 2px; border-radius: 2px; background: var(--accent); opacity: .5; }
.priv-badge { position: absolute; right: -1.25rem; top: .2rem; font-size: .7rem; opacity: .5; }
.priv-badge:hover { opacity: 1; }
@media print { .priv-badge { display: none; } }

/* ===== Écran des comptes ===== */
.acc-new { display: flex; gap: .4rem; flex-wrap: wrap; margin: 1rem 0 1.5rem; }
.acc-new .inp { width: auto; min-width: 150px; }
.acc-table { font-size: .875rem; }
.acc-table td { padding: .5rem .6rem; vertical-align: middle; }
.acc-acts { white-space: nowrap; } .acc-acts .inline { display: inline-block; margin-right: .25rem; }
.acc-link .btn { white-space: nowrap; }
.forgot-link { display: block; text-align: center; margin-top: .8rem; text-decoration: none; }
.forgot-link:hover { color: var(--text); text-decoration: underline; }

/* ===== Colonnes : déplacement et colonne Titre figée ===== */
.dbt th[draggable="true"] { cursor: grab; }
.dbt th.dragging { opacity: .45; }
.dbt th.drop-left::before, .dbt th.drop-right::after { content: ""; position: absolute; top: 0; bottom: 0; width: 2px; background: var(--accent); }
.dbt th.drop-left::before { left: -1px; } .dbt th.drop-right::after { right: -1px; }
.dbt th.th-title, .dbt td.td-title { position: sticky; left: 0; z-index: 3; background: var(--bg); }
.dbt th.th-title { z-index: 4; background: var(--side); }
.dbt tr:hover td.td-title { background: var(--hover); }
.dbt tbody.group-head td { position: static; }
.dbt td.td-title::after { content: ""; position: absolute; top: 0; right: -1px; bottom: 0; width: 1px; background: var(--border); }

/* ===== Réglage fin d'un partage ===== */
.scope-pop { max-height: 60vh; overflow-y: auto; }
.scope-list { display: flex; flex-direction: column; gap: .25rem; margin: .2rem 0 .6rem; max-height: 180px; overflow-y: auto; }
.scope-list .check-lbl { font-size: .82rem; align-items: flex-start; }
.scope-list .check-lbl span { line-height: 1.35; }
.scope-pop .lbl { margin-bottom: .5rem; }

/* ===== Connecteur Claude / API ===== */
.acc-h2 { margin: 2.5rem 0 .4rem; font-size: 1.35rem; }
.acc-h3 { margin: 1.6rem 0 .5rem; font-size: 1rem; }
.acc-url { display: flex; gap: .4rem; align-items: center; margin: .6rem 0; max-width: 640px; }
.acc-url .inp { flex: 1; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .82rem; }
.acc-newkey { border: 1px solid var(--accent); border-radius: 8px; padding: .8rem 1rem; margin: 1rem 0; background: var(--hover); }
.acc-log td { font-size: .8rem; padding: .3rem .6rem; }
.acc-log tr.is-error td { color: var(--muted); }
.consent-list { margin: .8rem 0 1rem 1.1rem; padding: 0; line-height: 1.7; font-size: .9rem; }
.login-logo img { display: block; width: 72px; height: 72px; }

/* ===== Typographies Symetree (pack identité visuelle) =====
   NexaText : titres en gras, corps en Regular. PumpOpti Demi-Bold : police d'accompagnement (nom de marque). */
@font-face { font-family: "NexaText"; src: url("/fonts/NexaText-Thin.woff2") format("woff2"); font-weight: 100; font-style: normal; font-display: swap; }
@font-face { font-family: "NexaText"; src: url("/fonts/NexaText-Light.woff2") format("woff2"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "NexaText"; src: url("/fonts/NexaText-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "NexaText"; src: url("/fonts/NexaText-Bold.woff2") format("woff2"); font-weight: 600 800; font-style: normal; font-display: swap; }
@font-face { font-family: "PumpOpti"; src: url("/fonts/PumpOpti-DemiBold.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
:root { --sans: "NexaText", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; --brand: "PumpOpti", "NexaText", sans-serif; }
input, select, textarea { font-family: inherit; }
.title, .b-h1 .content, .login-card h1, .page-title { font-weight: 700; letter-spacing: -.01em; }
.ws-name, .brand-name { font-family: var(--brand); font-weight: 600; letter-spacing: .01em; }

/* Sélecteur d'options façon Notion (cellules de base et propriétés de fiche) */
.pick-pop { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.pick-head { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem; padding: .45rem .55rem; background: var(--hover); border-bottom: 1px solid var(--border); min-height: 2.4rem; }
.pick-head .tag { margin: 0; display: inline-flex; align-items: center; gap: .2rem; padding-right: .25rem; }
.pick-x { border: 0; background: none; color: inherit; opacity: .65; cursor: pointer; padding: 0 .15rem; font-size: .95rem; line-height: 1; }
.pick-x:hover { opacity: 1; }
.pick-pop .pick-input { box-shadow: none; border-radius: 0; height: auto; flex: 1; min-width: 5rem; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: .875rem; padding: .15rem 0; }
.pick-pop .pick-hint { padding: .55rem .7rem .3rem; text-transform: none; letter-spacing: 0; font-size: .75rem; }
.pick-pop .pick-list { padding: 0 .35rem .4rem; max-height: 280px; }
.pick-pop .item { gap: .45rem; }
.pick-pop .item .tag { margin: 0; }
.pick-dots { color: var(--muted); font-size: .7rem; letter-spacing: -.15em; width: .8rem; opacity: .7; }
.pick-empty { padding: .4rem .5rem; margin: 0; }
.tag-plain { background: var(--hover); color: var(--text); }

/* Déplacement de lignes à la poignée */
.drag-handle { touch-action: none; user-select: none; }
body.row-dragging, body.row-dragging * { cursor: grabbing !important; user-select: none; }
.dbt tr.dragging { opacity: .55; background: var(--accent-soft); }

/* Sélecteur de date façon Notion */
.date-pop { width: 280px; padding: .5rem; }
.date-pop .dp-fields { display: flex; flex-direction: column; gap: .35rem; margin-bottom: .5rem; }
.date-pop .dp-field { display: flex; gap: .35rem; border: 1px solid var(--border); border-radius: 6px; background: var(--hover); padding: .3rem .5rem; }
.date-pop .dp-field.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.date-pop .dp-date, .date-pop .dp-time { border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: .875rem; min-width: 0; }
.date-pop .dp-date { flex: 1; } .date-pop .dp-time { width: 5.5rem; }
.date-pop .dp-head { display: flex; align-items: center; gap: .35rem; padding: .2rem .25rem .4rem; }
.date-pop .dp-month { flex: 1; font-weight: 600; font-size: .85rem; }
.date-pop .dp-today { border: 0; background: none; color: var(--muted); font-size: .8rem; cursor: pointer; padding: .15rem .3rem; border-radius: 4px; }
.date-pop .dp-nav { border: 0; background: none; color: var(--text); font-size: 1.05rem; cursor: pointer; width: 1.6rem; height: 1.6rem; border-radius: 4px; }
.date-pop .dp-today:hover, .date-pop .dp-nav:hover { background: var(--hover); }
.date-pop .dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.date-pop .dp-dow { font-size: .72rem; color: var(--muted); padding: .2rem 0; }
.date-pop .dp-day { border: 0; background: none; color: var(--text); font: inherit; font-size: .82rem; height: 2rem; border-radius: 50%; cursor: pointer; }
.date-pop .dp-day:hover { background: var(--hover); }
.date-pop .dp-day.out { color: var(--faint); }
.date-pop .dp-day.range { background: var(--accent-soft); border-radius: 4px; }
.date-pop .dp-day.today { color: #fff; background: #eb5757; }
.date-pop .dp-day.sel { color: #fff; background: #2383e2; border-radius: 6px; }
.date-pop .dp-opts { border-top: 1px solid var(--border); margin-top: .5rem; padding-top: .35rem; display: flex; flex-direction: column; }
.date-pop .dp-opt { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .35rem .25rem; font-size: .85rem; color: var(--text); cursor: pointer; }
.date-pop .dp-format { border: 0; background: transparent; color: var(--muted); font: inherit; font-size: .8rem; text-align: right; cursor: pointer; }
.date-pop .dp-format option { background: var(--menu); color: var(--text); }
.date-pop .dp-switch { appearance: none; width: 2rem; height: 1.15rem; border-radius: 999px; background: var(--border); position: relative; cursor: pointer; transition: background .15s; flex: none; }
.date-pop .dp-switch::after { content: ''; position: absolute; top: .15rem; left: .15rem; width: .85rem; height: .85rem; border-radius: 50%; background: #fff; transition: transform .15s; }
.date-pop .dp-switch:checked { background: #2383e2; } .date-pop .dp-switch:checked::after { transform: translateX(.85rem); }
.date-pop .dp-clear { border-top: 1px solid var(--border); margin-top: .35rem; border-radius: 0 0 5px 5px; }
