/* ---------- Police : Inter (embarquée dans dist/fonts) ---------- */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/inter-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: italic; font-weight: 100 900; font-display: swap;
  src: url("fonts/inter-latin-wght-italic.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: italic; font-weight: 100 900; font-display: swap;
  src: url("fonts/inter-latin-ext-wght-italic.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ---------- Thème : blanc cassé, accent orange #FF6600 ---------- */
:root {
  --font-ui: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-text: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "Cascadia Code", Consolas, monospace;

  --bg-primary: #f8f6f1;
  --bg-secondary: #f0ede6;
  --bg-tertiary: #e8e4db;
  --bg-hover: #e7e3d9;
  --bg-active: #ded9cd;
  --border: #e2ddd2;
  --text-normal: #2b2a27;
  --text-muted: #6b6860;
  --text-faint: #9e9a8f;
  --text-heading: #1b1a18;
  --accent: #ff6600;
  --accent-rgb: 255, 102, 0;
  --accent-soft: rgba(var(--accent-rgb), 0.12);
  --on-accent: #ffffff;
  --danger: #d93025;
  --highlight: rgba(255, 196, 0, 0.38);
  --code-bg: #efebe3;
  --inline-code: #c24e00;
  --tag-bg: rgba(var(--accent-rgb), 0.1);
  --graph-node: #8e8a7f;
  --graph-line: #c4bdae;
  --graph-unresolved: #c8c3b7;
  --shadow: rgba(40, 30, 10, 0.14);
  --scrollbar: #d6d1c5;
  --radius: 6px;
  --editor-width: 760px;
}

* { box-sizing: border-box; }
html, body, #root { margin: 0; height: 100%; overflow: hidden; }
body {
  background: var(--bg-primary);
  color: var(--text-normal);
  font-family: var(--font-ui);
  font-size: 13px;
  -webkit-font-smoothing: antialiased;
  user-select: none;
}
button { font: inherit; color: inherit; }
input { font: inherit; color: inherit; }
kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
}
mark { background: var(--highlight); color: inherit; border-radius: 2px; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--scrollbar); border-radius: 6px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background-color: #c2bcae; }
::-webkit-scrollbar-corner { background: transparent; }

.icon { flex-shrink: 0; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; padding: 0;
  background: transparent; border: none; border-radius: var(--radius);
  color: var(--text-muted); cursor: pointer;
}
.icon-btn:hover { background: var(--bg-hover); color: var(--text-normal); }
.icon-btn.is-active, .icon-btn.is-on { color: var(--accent); background: var(--accent-soft); }

.btn {
  background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 6px 14px; cursor: pointer;
}
.btn:hover { background: var(--bg-hover); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; font-weight: 600; }
.btn.small { padding: 4px 10px; font-size: 12px; }
.btn.tiny { padding: 1px 8px; font-size: 11px; margin-left: auto; }
.btn.big { padding: 10px 22px; font-size: 14px; }
.clickable { cursor: pointer; }

/* ---------- Accueil ---------- */
.starter, .loading {
  height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  text-align: center;
}
.starter h1 { margin: 0; font-size: 32px; color: var(--text-heading); letter-spacing: -0.5px; }
.starter-logo { color: var(--accent); }
.starter-kicker { font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin-top: 8px; }
.starter-sub { color: var(--text-muted); margin: 0 0 18px; font-size: 15px; }
.starter-hint { color: var(--text-faint); max-width: 420px; margin-top: 18px; line-height: 1.5; }
.loading { color: var(--text-muted); }

/* ---------- Structure ---------- */
.app { display: flex; flex-direction: column; height: 100%; }
.app-body { flex: 1; display: flex; min-height: 0; }
.ribbon {
  width: 44px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 8px 0; background: var(--bg-secondary); border-right: 1px solid var(--border);
}
.ribbon-spacer { flex: 1; }
.sidebar {
  position: relative; flex-shrink: 0; display: flex; flex-direction: column;
  background: var(--bg-secondary); overflow: hidden; transition: width 0.12s ease;
}
.sidebar-left { border-right: 1px solid var(--border); }
.sidebar-right { border-left: 1px solid var(--border); }
.sidebar.is-collapsed { border: none; }
.resizing-col .sidebar { transition: none; }
.sidebar-tabs { display: flex; gap: 2px; padding: 6px 8px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.sidebar-body { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.sidebar-title { padding: 10px 12px 4px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-faint); }
.sidebar-resizer { position: absolute; top: 0; bottom: 0; width: 5px; cursor: col-resize; z-index: 5; }
.sidebar-left .sidebar-resizer { right: -2px; }
.sidebar-right .sidebar-resizer { left: -2px; }
.sidebar-resizer:hover { background: var(--accent-soft); }
.resizing-col, .resizing-col * { cursor: col-resize !important; user-select: none !important; }
.resizing-row, .resizing-row * { cursor: row-resize !important; user-select: none !important; }

.status-bar {
  height: 24px; flex-shrink: 0; display: flex; justify-content: flex-end; align-items: center; gap: 16px;
  padding: 0 14px; font-size: 11.5px; color: var(--text-faint);
  background: var(--bg-secondary); border-top: 1px solid var(--border);
}
.status-bar span { display: inline-flex; align-items: center; gap: 4px; }
.status-bar .clickable:hover { color: var(--text-normal); }

/* ---------- Panneaux latéraux ---------- */
.pane { flex: 1; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.pane-actions { display: flex; gap: 2px; padding: 2px 8px 6px; flex-shrink: 0; }
.pane-body { flex: 1; overflow-y: auto; padding: 4px 8px 16px; }
.pane-empty { color: var(--text-faint); padding: 12px; font-size: 12.5px; }
.pane-empty.small { padding: 4px 8px; }
.pane-section { margin-bottom: 14px; }
.pane-section-title {
  display: flex; align-items: center; gap: 6px; padding: 6px 4px;
  font-size: 12px; font-weight: 600; color: var(--text-muted);
}
.badge { margin-left: auto; font-size: 11px; color: var(--text-faint); background: var(--bg-tertiary); border-radius: 8px; padding: 0 7px; font-weight: 500; }

.tree { flex: 1; overflow-y: auto; padding: 0 6px 20px; }
.tree-item {
  display: flex; align-items: center; gap: 4px; height: 26px; padding-right: 8px;
  border-radius: var(--radius); color: var(--text-muted); cursor: pointer; white-space: nowrap;
}
.tree-item:hover { background: var(--bg-hover); color: var(--text-normal); }
.tree-item.is-active { background: var(--accent-soft); color: var(--text-heading); }
.tree-item.is-folder { color: var(--text-normal); font-weight: 500; }
.tree-item.drop-target { background: var(--accent-soft); outline: 1px dashed var(--accent); }
.tree-spacer { width: 12px; flex-shrink: 0; }
.tree-name { overflow: hidden; text-overflow: ellipsis; }
.tree-ext { margin-left: auto; font-size: 10px; text-transform: uppercase; color: var(--text-faint); background: var(--bg-tertiary); border-radius: 4px; padding: 0 4px; }

.search-bar {
  display: flex; align-items: center; gap: 6px; margin: 2px 8px 6px; padding: 0 4px 0 8px;
  background: var(--bg-primary); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text-faint);
}
.search-bar:focus-within { border-color: var(--accent); }
.search-input { flex: 1; min-width: 0; background: transparent; border: none; outline: none; padding: 7px 0; }
.search-case { width: 26px; height: 22px; font-size: 11px; font-weight: 600; }
.search-summary { padding: 0 12px 6px; font-size: 11.5px; color: var(--text-faint); }
.search-results { flex: 1; overflow-y: auto; padding: 0 6px 20px; }
.search-file { margin-bottom: 6px; }
.search-file-title { display: flex; align-items: center; gap: 5px; padding: 4px 6px; border-radius: var(--radius); cursor: pointer; font-weight: 500; }
.search-file-title:hover { background: var(--bg-hover); }
.search-file.collapsed .search-matches { display: none; }
.search-file.collapsed .search-file-title svg { transform: rotate(-90deg); }
.search-count { margin-left: auto; color: var(--text-faint); font-size: 11px; font-weight: 400; }
.search-match, .bl-context {
  display: flex; align-items: baseline; gap: 6px;
  margin: 2px 0 2px 16px; padding: 5px 8px; border-radius: var(--radius); cursor: pointer;
  background: var(--bg-primary); color: var(--text-muted); font-size: 12px; line-height: 1.45;
  white-space: pre-wrap; word-break: break-word;
}
.search-match, .bl-context { display: block; }
.bl-context .btn.tiny { float: right; margin: 0 0 0 8px; }
.search-match:hover, .bl-context:hover { color: var(--text-normal); background: var(--bg-hover); }
.search-more { margin-left: 24px; color: var(--text-faint); font-size: 11.5px; }

.bl-file { margin-bottom: 10px; }
.bl-title { display: flex; align-items: baseline; gap: 6px; padding: 3px 6px; cursor: pointer; border-radius: var(--radius); font-weight: 500; }
.bl-title:hover { background: var(--bg-hover); }
.bl-folder { color: var(--text-faint); font-size: 11px; font-weight: 400; }
.bl-context { margin-left: 6px; }
.ctx-link { color: var(--accent); }
.link-row { display: flex; align-items: center; gap: 6px; padding: 4px 6px; border-radius: var(--radius); cursor: pointer; color: var(--text-muted); }
.link-row:hover { background: var(--bg-hover); color: var(--text-normal); }
.link-row.unresolved { color: var(--text-faint); }
.outline-item { padding: 4px 8px; border-radius: var(--radius); cursor: pointer; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.outline-item:hover { background: var(--bg-hover); color: var(--text-normal); }
.outline-item.level-1 { color: var(--text-normal); font-weight: 600; }

/* ---------- Espace de travail ---------- */
.workspace-main { flex: 1; min-width: 0; display: flex; }
.workspace-main > .split { flex: 1; }
.split { display: flex; min-width: 0; min-height: 0; }
.split-row { flex-direction: row; }
.split-column { flex-direction: column; }
.resizer { flex-shrink: 0; background: var(--border); }
.resizer-row { width: 1px; cursor: col-resize; position: relative; }
.resizer-column { height: 1px; cursor: row-resize; position: relative; }
.resizer::after { content: ""; position: absolute; inset: -3px; }
.resizer:hover { background: var(--accent); }

.tab-group { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.tab-header {
  display: flex; align-items: flex-end; height: 38px; flex-shrink: 0; padding: 0 6px;
  background: var(--bg-secondary); border-bottom: 1px solid var(--border);
}
.tabs { display: flex; align-items: flex-end; gap: 2px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 6px 0 10px;
  max-width: 220px; min-width: 90px; border-radius: 7px 7px 0 0; cursor: default;
  color: var(--text-faint); white-space: nowrap;
}
.tab:hover { background: var(--bg-hover); color: var(--text-muted); }
.tab.is-active { background: var(--bg-primary); color: var(--text-normal); box-shadow: 0 1px 0 var(--bg-primary), inset 0 2px 0 var(--accent); }
.tab-group:not(.is-active) .tab.is-active { box-shadow: 0 1px 0 var(--bg-primary); }
.tab-group:not(.is-active) .tab.is-active { color: var(--text-muted); }
.tab-title { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.tab-close { display: inline-flex; padding: 3px; border-radius: 4px; opacity: 0; }
.tab:hover .tab-close, .tab.is-active .tab-close { opacity: 0.8; }
.tab-close:hover { background: var(--bg-active); opacity: 1; }
.tab-add { margin: 0 0 3px 4px; width: 26px; height: 26px; }
.tab-content { flex: 1; min-height: 0; display: flex; position: relative; }

.view { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.view-header {
  display: flex; align-items: center; height: 36px; flex-shrink: 0; padding: 0 8px 0 14px; gap: 8px;
}
.view-crumbs { flex: 1; min-width: 0; display: flex; justify-content: center; gap: 4px; color: var(--text-muted); font-size: 12.5px; overflow: hidden; white-space: nowrap; }
.crumb.muted, .crumb-sep { color: var(--text-faint); }
.view-actions { display: flex; gap: 2px; }

/* ---------- Note ---------- */
.markdown-scroller { flex: 1; overflow-y: auto; overflow-x: hidden; }
.markdown-sizer { max-width: var(--editor-width); margin: 0 auto; padding: 24px 32px 50vh; }
.inline-title {
  font-family: var(--font-text); font-size: 2.1em; font-weight: 700; color: var(--text-heading);
  line-height: 1.25; margin-bottom: 0.6em; outline: none; user-select: text; letter-spacing: -0.015em;
  word-break: break-word;
}
.note-linked { margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--border, rgba(0,0,0,0.1)); }
.note-linked:empty { display: none; }
.note-linked-title { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 10px; }
.note-linked-title .badge { margin-left: 0; }
.note-linked-list { list-style: none; margin: 0; padding: 0; columns: 2 260px; column-gap: 32px; }
.note-linked-list li { break-inside: avoid; padding: 3px 0; line-height: 1.4; }
.note-linked-link { color: var(--accent); text-decoration: none; }
.note-linked-link:hover { text-decoration: underline; }
.inline-title:empty::before { content: "Sans titre"; color: var(--text-faint); }

.empty-view { align-items: center; justify-content: center; }
.empty-inner { display: flex; flex-direction: column; gap: 6px; min-width: 300px; }
.empty-title { font-size: 20px; font-weight: 600; color: var(--text-muted); margin-bottom: 12px; text-align: center; }
.empty-action {
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  background: transparent; border: none; border-radius: var(--radius); padding: 8px 12px; cursor: pointer; color: var(--accent);
}
.empty-action:hover { background: var(--bg-hover); }

/* ---------- Éditeur CodeMirror ---------- */
.cm-editor { font-family: var(--font-text); font-size: 16px; color: var(--text-normal); background: transparent; }
.cm-editor.cm-focused { outline: none; }
.cm-scroller { font-family: inherit !important; line-height: 1.65; overflow: visible !important; }
.cm-content { padding: 0 0 40px; caret-color: var(--accent); user-select: text; }
.cm-line { padding: 0; }
.cm-cursor { border-left: 2px solid var(--accent) !important; }
.cm-selectionBackground, .cm-focused .cm-selectionBackground, ::selection { background: rgba(var(--accent-rgb), 0.2) !important; }
.cm-selectionMatch { background: rgba(var(--accent-rgb), 0.1); }
.cm-placeholder { color: var(--text-faint); }
.cm-gutters { display: none; }

.cm-heading { color: var(--text-heading); font-weight: 700; letter-spacing: -0.01em; }
.cm-h1 { font-size: 1.85em; line-height: 1.3; padding-top: 0.4em !important; }
.cm-h2 { font-size: 1.5em; line-height: 1.35; padding-top: 0.35em !important; }
.cm-h3 { font-size: 1.28em; padding-top: 0.3em !important; }
.cm-h4 { font-size: 1.12em; }
.cm-h5 { font-size: 1em; }
.cm-h6 { font-size: 0.92em; color: var(--text-muted); }
.cm-strong { font-weight: 700; }
.cm-em { font-style: italic; }
.cm-strike { text-decoration: line-through; color: var(--text-muted); }
.cm-highlight { background: var(--highlight); border-radius: 2px; }
.cm-inline-code {
  font-family: var(--font-mono); font-size: 0.86em; background: var(--code-bg);
  border-radius: 4px; padding: 0.1em 0.3em; color: var(--inline-code);
}
.cm-codeblock { font-family: var(--font-mono); font-size: 0.86em; background: var(--code-bg); padding: 0 16px !important; }
.cm-codeblock-start { border-radius: 6px 6px 0 0; padding-top: 6px !important; }
.cm-codeblock-end { border-radius: 0 0 6px 6px; padding-bottom: 6px !important; }
.cm-image-embed { display: block; margin: 6px 0; line-height: 0; }
.cm-image-embed img { max-width: 100%; height: auto; border-radius: 6px; cursor: default; }
.cm-image-embed.is-broken { line-height: 1.5; font-size: 0.85em; color: var(--text-faint); border: 1px dashed var(--border); border-radius: 6px; padding: 8px 12px; }
.cm-code-lang { float: right; font-size: 11px; color: var(--text-faint); font-family: var(--font-ui); }
.cm-quote { border-left: 3px solid var(--accent); padding-left: 16px !important; color: var(--text-muted); }
.cm-hr-line { display: inline-block; width: 100%; height: 1px; background: var(--border); vertical-align: middle; }
.cm-bullet { color: var(--text-faint); display: inline-block; width: 0.9em; }
.cm-task-checkbox {
  appearance: none; width: 15px; height: 15px; margin: 0 6px 0 0; vertical-align: -2px;
  border: 1.5px solid var(--text-faint); border-radius: 4px; cursor: pointer; position: relative;
}
.cm-task-checkbox:checked { background: var(--accent); border-color: var(--accent); }
.cm-task-checkbox:checked::after {
  content: ""; position: absolute; left: 4px; top: 1px; width: 4px; height: 8px;
  border: solid var(--on-accent); border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.cm-task-done { color: var(--text-faint); text-decoration: line-through; }
.cm-wikilink { color: var(--accent); cursor: pointer; text-decoration: none; }
.cm-wikilink:hover { text-decoration: underline; }
.cm-wikilink.is-unresolved, .cm-wikilink-raw.is-unresolved { opacity: 0.6; }
.cm-wikilink.is-embed { font-style: italic; }
.cm-wikilink-bracket { color: var(--text-faint); }
.cm-wikilink-raw { color: var(--accent); }
.cm-wikilink-alias { color: var(--text-muted); }
.cm-ext-link { color: var(--accent); text-decoration: underline; text-decoration-color: rgba(var(--accent-rgb), .4); cursor: pointer; }
.cm-url { color: var(--text-faint); }
.cm-tag { color: var(--accent); background: var(--tag-bg); border-radius: 10px; padding: 0.05em 0.45em; font-size: 0.9em; }

.cm-tooltip { background: var(--bg-tertiary) !important; border: 1px solid var(--border) !important; border-radius: var(--radius); box-shadow: 0 10px 30px var(--shadow); }
.cm-tooltip-autocomplete > ul { font-family: var(--font-ui) !important; font-size: 13px; max-height: 280px !important; }
.cm-tooltip-autocomplete > ul > li { padding: 5px 10px !important; display: flex; gap: 10px; }
.cm-tooltip-autocomplete > ul > li[aria-selected] { background: var(--accent-soft) !important; color: var(--text-heading) !important; }
.cm-completionDetail { margin-left: auto; color: var(--text-faint); font-style: normal !important; font-size: 11.5px; }
.cm-completionMatchedText { text-decoration: none !important; color: var(--accent); font-weight: 600; }
.cm-panels { background: var(--bg-secondary) !important; color: var(--text-normal) !important; border-color: var(--border) !important; }
.cm-panel.cm-search { font-family: var(--font-ui); padding: 6px 8px !important; }
.cm-panel.cm-search input, .cm-panel.cm-search button { background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: 4px; color: var(--text-normal); padding: 3px 8px; }
.cm-searchMatch { background: rgba(255, 208, 0, 0.25); }
.cm-searchMatch-selected { background: rgba(255, 208, 0, 0.5); }

/* ---------- Graphe ---------- */
.graph-view { position: relative; background: var(--bg-primary); }
.graph-canvas { position: absolute; inset: 0; }
.graph-controls {
  position: absolute; top: 10px; right: 10px; width: 220px; padding: 6px;
  background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 8px 24px var(--shadow);
}
.graph-controls.collapsed { width: auto; }
.graph-controls.collapsed .graph-controls-body { display: none; }
.graph-controls-toggle { float: right; }
.graph-controls-body { clear: both; display: flex; flex-direction: column; gap: 8px; padding: 4px 6px 6px; }
.graph-filter { background: var(--bg-primary); border: 1px solid var(--border); border-radius: var(--radius); padding: 5px 8px; outline: none; }
.sidebar-body > .graph-view { flex: 1; min-height: 0; }
.graph-view.is-compact .graph-controls { top: 6px; right: 6px; width: 200px; }
.graph-view.is-compact .graph-controls.collapsed { width: auto; }
.graph-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--text-faint); pointer-events: none; }
.graph-range-value { color: var(--accent); font-weight: 600; }
.graph-check { display: flex; gap: 8px; align-items: center; color: var(--text-muted); }
.graph-range { display: flex; flex-direction: column; gap: 2px; color: var(--text-muted); font-size: 12px; }
.graph-range input { accent-color: var(--accent); }

/* ---------- Menus, modales, notifications ---------- */
.menu {
  position: fixed; z-index: 100; min-width: 200px; padding: 4px;
  background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 12px 32px var(--shadow);
}
.menu-item { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 5px; cursor: pointer; }
.menu-item:hover { background: var(--bg-active); }
.menu-item.danger { color: var(--danger); }
.menu-icon-pad { width: 14px; }
.menu-sep { height: 1px; margin: 4px 6px; background: var(--border); }

.modal-backdrop { position: fixed; inset: 0; z-index: 90; background: rgba(30,25,15,.22); display: flex; justify-content: center; align-items: flex-start; padding-top: 12vh; }
.modal {
  width: min(560px, 92vw); background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: 10px; box-shadow: 0 24px 60px var(--shadow); overflow: hidden;
}
.modal.prompt { padding: 18px; width: min(440px, 92vw); }
.modal-title { font-size: 15px; font-weight: 600; margin-bottom: 12px; }
.modal-text { color: var(--text-muted); margin: 0 0 16px; line-height: 1.5; }
.prompt-input { width: 100%; padding: 8px 10px; background: var(--bg-primary); border: 1px solid var(--border); border-radius: var(--radius); outline: none; }
.prompt-input:focus { border-color: var(--accent); }
.prompt-error { color: var(--danger); font-size: 12px; min-height: 18px; margin-top: 4px; }
.modal-buttons { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }

.suggest-input { width: 100%; padding: 14px 16px; background: transparent; border: none; border-bottom: 1px solid var(--border); outline: none; font-size: 15px; }
.suggest-list { max-height: 50vh; overflow-y: auto; padding: 6px; }
.suggest-item { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: var(--radius); cursor: pointer; }
.suggest-item.is-selected { background: var(--bg-active); }
.suggest-text { flex-shrink: 0; max-width: 70%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest-text mark { background: none; color: var(--accent); font-weight: 600; }
.suggest-sub { color: var(--text-faint); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest-hint { margin-left: auto; }
.suggest-empty { color: var(--text-faint); padding: 10px; }
.suggest-footer { padding: 8px 14px; font-size: 11.5px; color: var(--text-faint); border-top: 1px solid var(--border); }

.notices { position: fixed; top: 14px; right: 14px; z-index: 120; display: flex; flex-direction: column; gap: 8px; }
.notice {
  background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 14px; box-shadow: 0 8px 24px var(--shadow); max-width: 340px; animation: notice-in .15s ease;
}
@keyframes notice-in { from { opacity: 0; transform: translateY(-6px); } }

/* ---------- Version web : connexion et choix de l'espace ---------- */
.auth-form { display: flex; flex-direction: column; gap: 10px; width: min(340px, 90vw); margin-top: 6px; }
.auth-form .btn { margin-top: 4px; }
.link-btn { background: none; border: none; color: var(--accent); cursor: pointer; margin-top: 14px; font-size: 13px; }
.link-btn:hover { text-decoration: underline; }
.ws-list { display: flex; flex-direction: column; gap: 6px; width: min(420px, 90vw); margin: 8px 0 14px; }
.ws-item { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 8px; cursor: pointer; text-align: left; }
.ws-item:hover { border-color: var(--accent); }
.ws-item .icon { color: var(--accent); }
.ws-name { flex: 1; font-weight: 500; }
.ws-role { color: var(--text-faint); font-size: 12px; }
.ws-actions { display: flex; gap: 8px; }

/* ---------- Constellation locale en grand ---------- */
.modal-backdrop:has(.graph-modal) { padding-top: 4vh; }
.modal.graph-modal { width: 94vw; height: 90vh; max-width: none; display: flex; flex-direction: column; background: var(--bg-primary); }
.graph-modal-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px 10px 16px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.graph-modal-title { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--text-muted); min-width: 0; }
.graph-modal-title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.graph-modal-title .icon { color: var(--accent); }
.graph-modal-actions { display: flex; align-items: center; gap: 6px; }
.modal.graph-modal > .graph-view { flex: 1; min-height: 0; }
.graph-expand { position: absolute; top: 6px; right: 40px; background: var(--bg-secondary); border: 1px solid var(--border); }
.graph-view.is-compact .graph-controls:not(.collapsed) ~ .graph-expand,
.graph-view.is-compact .graph-controls:not(.collapsed) ~ .graph-badge { display: none; }
.graph-badge { position: absolute; top: 6px; right: 74px; border: 1px solid transparent; }
.sidebar-tabs[hidden] { display: none; }

/* ---------- Administration ---------- */
.admin-page { height: 100%; overflow-y: auto; user-select: text; }
.admin-header {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 32px; background: var(--bg-secondary); border-bottom: 1px solid var(--border);
}
.admin-brand { display: flex; align-items: center; gap: 10px; color: var(--accent); }
.admin-kicker { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.admin-title { font-size: 17px; font-weight: 700; color: var(--text-heading); }
.admin-header-actions { display: flex; align-items: center; gap: 12px; }
.admin-header-actions a.btn { text-decoration: none; color: inherit; }
.admin-me { color: var(--text-faint); font-size: 12.5px; }
.admin-body { max-width: 1180px; margin: 0 auto; padding: 28px 32px 80px; }
.admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.admin-stat { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px; }
.admin-stat-value { font-size: 26px; font-weight: 700; color: var(--text-heading); letter-spacing: -0.02em; }
.admin-stat-label { color: var(--text-muted); margin-top: 2px; }
.admin-note { color: var(--text-faint); font-size: 12.5px; margin: 10px 0 0; line-height: 1.5; }
.admin-section { margin-top: 34px; }
.admin-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.admin-section-head h2 { font-size: 16px; margin: 0; color: var(--text-heading); }
.admin-table-wrap { border: 1px solid var(--border); border-radius: 10px; overflow-x: auto; background: var(--bg-primary); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th { text-align: left; font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-faint); padding: 10px 14px; background: var(--bg-secondary); border-bottom: 1px solid var(--border); white-space: nowrap; }
.admin-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; white-space: nowrap; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr.is-muted td { opacity: 0.6; }
.admin-actions { text-align: right; width: 1%; }
.admin-user { display: flex; align-items: center; gap: 8px; }
.admin-email { font-weight: 500; color: var(--text-normal); }
.admin-sub { color: var(--text-faint); font-size: 12px; margin-top: 2px; }
.admin-you { color: var(--text-faint); font-size: 11.5px; }
.pill { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 10px; white-space: nowrap; }
.pill.ok { background: rgba(46, 160, 67, 0.13); color: #2a7a3a; }
.pill.warn { background: rgba(214, 150, 0, 0.16); color: #8a6100; }
.pill.danger { background: rgba(217, 48, 37, 0.12); color: var(--danger); }
.pill.accent { background: var(--accent-soft); color: var(--accent); }
.icon-btn.danger-hover:hover { color: var(--danger); }
.auth-form.wide { width: 100%; margin: 0; }
@media (max-width: 760px) { .admin-stats { grid-template-columns: repeat(2, 1fr); } .admin-body, .admin-header { padding-left: 16px; padding-right: 16px; } .admin-me { display: none; } }

/* ---------- Mon compte, double authentification, fiche compte ---------- */
.readonly-banner { background: rgba(214, 150, 0, 0.16); color: #7a5600; padding: 8px 16px; font-size: 13px; text-align: center; border-bottom: 1px solid rgba(214,150,0,.3); }
.modal.account-modal { width: min(560px, 94vw); padding: 20px 22px; max-height: 88vh; overflow-y: auto; }
.account-section { border-top: 1px solid var(--border); padding: 14px 0; }
.account-section:first-child { border-top: none; padding-top: 0; }
.account-section h3 { margin: 0 0 8px; font-size: 13.5px; color: var(--text-heading); }
.account-id { display: flex; flex-direction: column; gap: 2px; }
.account-plan { color: var(--text-muted); margin: 6px 0 0; }
.account-ok { color: #2a7a3a; margin: 0 0 8px; }
.muted { color: var(--text-faint); }
.account-details summary { cursor: pointer; color: var(--text-muted); margin-bottom: 8px; }
.btn.danger-outline { border-color: rgba(217,48,37,.4); color: var(--danger); background: transparent; }
.btn.danger-outline:hover { background: rgba(217,48,37,.08); }
.tfa-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 12px; line-height: 1.5; color: var(--text-normal); }
.tfa-qr { margin: 10px 0 6px; }
.tfa-qr img { border-radius: 8px; border: 1px solid var(--border); background: #fff; padding: 6px; }
.tfa-secret { font-size: 12px; color: var(--text-muted); }
.tfa-secret code, .recovery-codes code { font-family: var(--font-mono); background: var(--code-bg); padding: 2px 6px; border-radius: 4px; user-select: all; }
.code-input { font-family: var(--font-mono); font-size: 18px; letter-spacing: 0.2em; text-align: center; margin-top: 8px; }
.tfa-success { display: flex; align-items: center; gap: 8px; color: #2a7a3a; font-weight: 600; margin-bottom: 8px; }
.recovery-codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 10px 0 4px; }
.recovery-codes code { text-align: center; font-size: 14px; padding: 6px; }
.tfa-gate { max-width: 560px; margin: 30px auto; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 12px; padding: 24px 26px; }
.tfa-gate h2 { margin: 0 0 8px; font-size: 18px; color: var(--text-heading); }

.admin-tabs { display: flex; gap: 4px; max-width: 1180px; margin: 0 auto; padding: 14px 32px 0; border-bottom: 1px solid var(--border); }
.admin-tab { background: none; border: none; padding: 8px 14px; border-radius: 8px 8px 0 0; cursor: pointer; color: var(--text-muted); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.admin-tab:hover { color: var(--text-normal); background: var(--bg-hover); }
.admin-tab.is-active { color: var(--text-heading); border-bottom-color: var(--accent); }
.admin-stats.six { grid-template-columns: repeat(6, 1fr); }
.admin-stat.alert { border-color: rgba(217,48,37,.4); background: rgba(217,48,37,.06); }
.admin-stat.alert .admin-stat-value { color: var(--danger); }
.admin-head-actions { display: flex; gap: 8px; align-items: center; }
.admin-search { padding: 6px 10px; background: var(--bg-primary); border: 1px solid var(--border); border-radius: var(--radius); outline: none; min-width: 220px; }
.admin-search:focus { border-color: var(--accent); }
.clickable-rows tbody tr { cursor: pointer; }
.clickable-rows tbody tr:hover td { background: var(--bg-hover); }
.admin-table.audit td.wrap { white-space: normal; min-width: 280px; }
.admin-table tr.is-alert td { background: rgba(217,48,37,.05); }
.admin-pager { display: flex; justify-content: space-between; margin-top: 10px; }
.pill.neutral { background: var(--bg-tertiary); color: var(--text-muted); }
.plan-input { width: 90px; padding: 5px 8px; background: var(--bg-primary); border: 1px solid var(--border); border-radius: var(--radius); outline: none; }
.plan-input.wide { width: 160px; font-weight: 600; }
.plan-input:focus { border-color: var(--accent); }
.plan-cell { display: flex; align-items: center; gap: 6px; }

.drawer-backdrop { justify-content: flex-end; align-items: stretch; padding: 0 !important; }
.modal.user-drawer { width: min(720px, 100vw); height: 100vh; max-height: none; border-radius: 0; overflow-y: auto; animation: drawer-in .18s ease; }
@keyframes drawer-in { from { transform: translateX(40px); opacity: 0; } }
.drawer-content { padding: 20px 24px 40px; user-select: text; }
.drawer-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.drawer-title { font-size: 18px; font-weight: 700; color: var(--text-heading); word-break: break-all; }
.drawer-pills { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.drawer-meta { margin-top: 8px; }
.drawer-actions { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 4px; }
.drawer-section { border-top: 1px solid var(--border); padding: 16px 0 6px; margin-top: 12px; }
.drawer-section h3 { margin: 0 0 10px; font-size: 13.5px; color: var(--text-heading); }
.drawer-section-head { display: flex; justify-content: space-between; align-items: center; }
.drawer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.drawer-grid.three { grid-template-columns: repeat(3, 1fr); }
.drawer-grid label, .drawer-full { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text-muted); }
.drawer-full { margin-top: 10px; }
.admin-note-input { resize: vertical; font-family: inherit; }
.drawer-list { display: flex; flex-direction: column; gap: 6px; }
.drawer-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 10px; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 8px; }
.usage-text { font-size: 13px; margin: 2px 0 6px; }
.usage-bar { height: 6px; background: var(--bg-tertiary); border-radius: 3px; overflow: hidden; }
.usage-bar > div { height: 100%; background: var(--accent); }
.usage-bar.warn > div { background: #d69600; }
.usage-bar.danger > div { background: var(--danger); }
select.prompt-input { appearance: auto; }
@media (max-width: 1000px) { .admin-stats.six { grid-template-columns: repeat(3, 1fr); } .drawer-grid, .drawer-grid.three { grid-template-columns: 1fr; } }

/* ---------- Membres d'un espace (rôles) ---------- */
.members-modal { width: min(620px, 92vw); }
.member-list { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; margin: 8px 0 12px; }
.member-list > p { margin: 0; padding: 12px 14px; }
.member-row { display: grid; grid-template-columns: 1fr 150px 28px; align-items: center; gap: 10px; padding: 9px 12px; background: var(--bg-primary, #fff); }
.member-row + .member-row { border-top: 1px solid var(--border); }
.member-row .admin-email { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.role-select {
  font: inherit; font-size: 13px; color: var(--text-normal); background: var(--bg-secondary, #f3f0ea);
  border: 1px solid var(--border); border-radius: 6px; padding: 5px 8px; cursor: pointer; width: 100%;
}
.role-select:focus { outline: none; border-color: var(--accent); }
.member-add { display: grid; grid-template-columns: 1fr 150px auto; gap: 10px; align-items: center; margin-bottom: 8px; }
.member-add .prompt-input { margin: 0; }
.ws-empty { color: var(--text-muted); font-size: 14px; text-align: center; padding: 14px 8px; margin: 0; }

/* Réglages repliés : le bouton « … » a la même taille que les autres boutons du graphe */
.graph-controls.collapsed { padding: 0; box-shadow: none; border-radius: var(--radius); }
.graph-controls.collapsed .graph-controls-toggle { float: none; display: flex; width: 28px; height: 28px; }
.graph-badge, .graph-expand { width: 30px; height: 30px; }

/* ---------- Paywall ---------- */
.paywall { position: relative; min-height: 360px; margin-top: 8px; }
.paywall-teaser {
  filter: blur(5px); user-select: none; pointer-events: none; color: var(--text-normal);
  line-height: 1.7; font-size: 16px;
  -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent 95%); mask-image: linear-gradient(to bottom, #000 30%, transparent 95%);
}
.paywall-teaser p { margin: 0 0 10px; }
.paywall-card {
  position: absolute; left: 50%; top: 70px; transform: translateX(-50%); width: min(440px, 90%);
  background: var(--bg-primary); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 16px 40px var(--shadow); padding: 26px 28px; text-align: center;
}
.paywall-icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); margin-bottom: 10px; }
.paywall-card h3 { margin: 0 0 8px; font-size: 18px; color: var(--text-heading); }
.paywall-card p { margin: 0 0 18px; color: var(--text-muted); font-size: 14px; line-height: 1.55; }
.paywall-card .btn { text-decoration: none; display: inline-flex; }
.paywall-muted { margin: 0 !important; }
.paywall-loading { color: var(--text-faint); }
/* Badge « notes gratuites restantes » (comptes Gratuits), en bas à droite */
.reads-badge {
  position: fixed; right: 16px; bottom: 34px; z-index: 40;
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px;
  background: var(--bg-primary); color: var(--text-normal); font-size: 12.5px;
  border: 1px solid rgba(var(--accent-rgb), 0.45); border-radius: 999px;
  box-shadow: 0 6px 18px var(--shadow); user-select: none;
}
.reads-badge[hidden] { display: none; }
.reads-badge .icon { color: var(--accent); }
.reads-count { font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.reads-badge.is-low { border-color: var(--accent); }
.reads-badge.is-empty { border-color: #c0392b; }
.reads-badge.is-empty .icon, .reads-badge.is-empty .reads-count { color: #c0392b; }
.drawer-reads { margin-top: 12px; }
.admin-setting { margin-top: 22px; padding: 16px 18px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-primary); }
.admin-setting h3 { margin: 0 0 4px; font-size: 14px; }
.admin-setting-row { display: flex; gap: 10px; align-items: center; }
.admin-setting-row .prompt-input { margin: 0; flex: 1; }
.drawer-reads-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }

/* ---------- Mode édition : thème sombre ---------- */
body.theme-dark {
  --bg-primary: #1f1f1f;
  --bg-secondary: #262626;
  --bg-tertiary: #2f2f2f;
  --bg-hover: #333333;
  --bg-active: #3b3b3b;
  --border: #383838;
  --text-normal: #dcddde;
  --text-muted: #a3a3a3;
  --text-faint: #707070;
  --text-heading: #f3f3f3;
  --accent-soft: rgba(var(--accent-rgb), 0.18);
  --highlight: rgba(255, 196, 0, 0.3);
  --code-bg: #2a2a2a;
  --inline-code: #ff8f4a;
  --tag-bg: rgba(var(--accent-rgb), 0.16);
  --graph-node: #9a9a9a;
  --graph-line: #4a4a4a;
  --graph-unresolved: #555555;
  --shadow: rgba(0, 0, 0, 0.5);
  --scrollbar: #444444;
  --draft: #4ade80;
  color-scheme: dark;
}
body.theme-dark ::-webkit-scrollbar-thumb:hover { background-color: #555; }

/* Brouillons dans l'arbre des fichiers */
.tree-item.is-draft { color: var(--draft, #2f9e44); }
.tree-item.is-draft.is-active { color: var(--draft, #2f9e44); }

/* Bouton « Passer en mode édition » et « Publier » */
.ribbon .publish-btn { color: var(--accent); }

/* ---------- Fenêtre « Publier les modifications » ---------- */
.modal.publish-modal { width: min(760px, 94vw); max-height: 84vh; display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.publish-head { display: flex; align-items: center; gap: 8px; padding: 14px 18px; font-size: 15px; font-weight: 600; color: var(--text-heading); border-bottom: 1px solid var(--border); }
.publish-head .icon { color: var(--accent); }
.publish-body { flex: 1; overflow: auto; padding: 4px 10px 10px; min-height: 280px; }
.publish-section { border-bottom: 1px solid var(--border); }
.publish-section-head { display: flex; align-items: center; gap: 8px; padding: 12px 6px; cursor: pointer; }
.publish-section-title { font-size: 14px; font-weight: 600; color: var(--text-heading); flex: 1; }
.publish-section.is-added .publish-section-title { color: var(--draft, #2f9e44); }
.publish-section.is-deleted .publish-section-title { color: var(--danger); }
.publish-count { color: var(--text-muted); font-size: 12px; }
.link-btn { background: none; border: none; color: var(--text-faint); font-size: 12px; cursor: pointer; padding: 2px 4px; }
.link-btn:hover { color: var(--accent); }
.publish-chevron { width: 14px; display: inline-flex; color: var(--text-faint); }
.publish-tree { padding-bottom: 6px; }
.publish-row { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: var(--radius); cursor: pointer; color: var(--text-normal); }
.publish-row:hover { background: var(--bg-hover); }
.publish-row input { margin: 0; accent-color: var(--accent); cursor: pointer; }
.publish-row .icon { color: var(--text-faint); flex: none; }
.publish-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.publish-sub { color: var(--text-faint); font-size: 11px; }
.publish-empty { color: var(--text-faint); padding: 2px 30px 8px; }
.publish-foot { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-top: 1px solid var(--border); }
.publish-summary { flex: 1; color: var(--text-muted); }

/* Dossiers masqués aux lecteurs (visibles seulement en mode édition) */
.tree-item.is-hidden { opacity: 0.5; }
.tree-hidden { display: inline-flex; margin-left: 6px; color: var(--text-faint); }

/* ---------- Corbeille ---------- */
.trash-help { margin: 0; padding: 10px 18px 0; color: var(--text-muted); font-size: 12px; }
.trash-modal .publish-body { min-height: 200px; padding: 8px 10px; }
.trash-row { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: var(--radius); }
.trash-row:hover { background: var(--bg-hover); }
.trash-row > .icon { color: var(--text-faint); flex: none; }
.trash-info { flex: 1; min-width: 0; }
.trash-name { color: var(--text-normal); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trash-folder { color: var(--text-faint); font-size: 11px; margin-left: 8px; }
.trash-meta { color: var(--text-muted); font-size: 11.5px; margin-top: 2px; }
.trash-pending { color: var(--accent); }
.trash-empty { color: var(--text-faint); text-align: center; padding: 40px 0; }
.trash-row .btn.small { display: inline-flex; align-items: center; gap: 4px; flex: none; }

/* ---------- Barre de mise en forme de l'éditeur ---------- */
.format-bar { display: flex; align-items: center; gap: 2px; flex: none; }
.fmt-btn { width: 28px; height: 28px; font-size: 14px; color: var(--text-muted); }
.fmt-btn.fmt-bold { font-weight: 700; }
.fmt-btn.fmt-italic { font-style: italic; font-family: Georgia, "Times New Roman", serif; font-size: 15px; }

/* ---------- Lecteurs intégrés (YouTube, Vimeo, X, Spotify…) ---------- */
.cm-embed { display: block; margin: 8px 0; max-width: 640px; }
.cm-embed iframe { display: block; width: 100%; border: 0; border-radius: 10px; background: var(--bg-tertiary); }
.cm-embed.is-video iframe { aspect-ratio: 16 / 9; height: auto; }
.cm-embed.is-post { max-width: 550px; }
.cm-embed-source { display: inline-block; margin-top: 4px; font-size: 12px; color: var(--text-faint); text-decoration: none; }
.cm-embed-source:hover { color: var(--accent); }

/* ---------- Sandbox : repère permanent (absent en production) ---------- */
body.env-sandbox::before {
  content: ""; position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 1000; pointer-events: none;
  background: repeating-linear-gradient(135deg, #ff6600 0 12px, #1b1a18 12px 24px);
}
.env-ribbon {
  position: fixed; top: 3px; left: 50%; transform: translateX(-50%); z-index: 1000; pointer-events: none; opacity: 0.92;
  background: #1b1a18; color: #ff6600; font-size: 10px; font-weight: 700; letter-spacing: 0.12em;
  padding: 2px 10px; border-radius: 0 0 6px 6px; user-select: none;
}

/* ---------- Page publique d'une note (visiteurs) ---------- */
.public-page { height: 100%; overflow: auto; background: var(--bg-primary); user-select: text; }
.public-top { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; padding: 12px 24px; background: var(--bg-primary); border-bottom: 1px solid var(--border); }
.public-brand { display: inline-flex; align-items: center; gap: 8px; color: var(--text-heading); text-decoration: none; font-weight: 700; font-size: 14px; }
.public-brand .icon { color: var(--accent); }
.public-brand-sub { color: var(--text-faint); font-weight: 500; }
.public-top .btn { text-decoration: none; }
.public-article { max-width: 760px; margin: 0 auto; padding: 48px 24px 80px; }
.public-space { color: var(--accent); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 10px; }
.public-title { font-size: 34px; line-height: 1.2; margin: 0 0 24px; color: var(--text-heading); }
.public-image { display: block; width: 100%; max-height: 420px; object-fit: cover; border-radius: 12px; margin-bottom: 24px; }
.public-teaser { position: relative; font-size: 16px; line-height: 1.7; color: var(--text-normal); max-height: 220px; overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 25%, transparent 100%); mask-image: linear-gradient(to bottom, #000 25%, transparent 100%); }
.public-teaser p { margin: 0 0 12px; }
.public-teaser p:nth-child(n + 3) { filter: blur(4px); user-select: none; }
.public-cta { margin: 8px auto 0; max-width: 460px; text-align: center; background: var(--bg-primary); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 16px 40px var(--shadow); padding: 26px 28px; }
.public-cta h3 { margin: 0 0 8px; font-size: 18px; color: var(--text-heading); }
.public-cta p { margin: 0 0 18px; color: var(--text-muted); font-size: 14px; line-height: 1.55; }
.public-cta .btn { text-decoration: none; display: inline-flex; }
.public-cta.subtle { box-shadow: none; margin-top: 40px; max-width: none; }
.public-content .cm-editor { background: transparent; font-size: 16px; }
.public-content .cm-content { padding: 0; }
.public-muted { color: var(--text-muted); margin-bottom: 24px; }
.modal.share-modal { width: min(640px, 94vw); padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.share-body { padding: 8px 10px 4px; min-height: 120px; }
.share-url { font-family: var(--font-mono); font-size: 12px; user-select: all; }
.share-create { display: flex; justify-content: center; padding: 14px 0 10px; }
.share-full { color: var(--text-muted); margin: 0; font-size: 13px; text-align: center; }
.slug-input { width: 150px; margin: 0; padding: 4px 8px; font-size: 12px; font-family: var(--font-mono); }
.slug-prefix { color: var(--text-faint); font-family: var(--font-mono); font-size: 12px; margin-right: 2px; }

.public-cta-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

/* ---------- Page d'inscription ---------- */
.signup-layout { max-width: 1040px; margin: 0 auto; padding: 56px 24px 80px; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr); gap: 56px; align-items: start; }
@media (max-width: 860px) { .signup-layout { grid-template-columns: 1fr; gap: 32px; padding-top: 32px; } }
.signup-title { font-size: 34px; line-height: 1.15; margin: 0 0 12px; color: var(--text-heading); letter-spacing: -0.5px; }
.signup-subtitle { font-size: 16px; line-height: 1.6; color: var(--text-muted); margin: 0 0 28px; }
.plan-cards { display: flex; flex-direction: column; gap: 12px; }
.plan-card { display: block; width: 100%; text-align: left; background: var(--bg-primary); border: 1.5px solid var(--border); border-radius: 12px; padding: 16px 18px; cursor: pointer; color: var(--text-normal); font: inherit; transition: border-color 0.15s, box-shadow 0.15s; }
.plan-card:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.plan-card.is-selected { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent); }
.plan-card-head { display: flex; align-items: center; gap: 10px; }
.plan-radio { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--text-faint); flex: none; position: relative; }
.plan-card.is-selected .plan-radio { border-color: var(--accent); }
.plan-card.is-selected .plan-radio::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--accent); }
.plan-name { font-weight: 700; font-size: 16px; color: var(--text-heading); }
.plan-price { margin-left: auto; font-weight: 600; color: var(--accent); font-size: 14px; }
.plan-points { list-style: none; margin: 10px 0 0 26px; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.plan-points li { display: flex; align-items: flex-start; gap: 7px; font-size: 14px; color: var(--text-muted); line-height: 1.4; }
.plan-points .icon { color: var(--accent); flex: none; margin-top: 2px; }
.plan-paid-note { font-size: 13px; color: var(--text-muted); line-height: 1.5; margin: 14px 2px 0; }
.plan-paid-note:empty { display: none; }
.signup-box { background: var(--bg-primary); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 16px 40px var(--shadow); padding: 28px; position: sticky; top: 80px; }
.signup-box h2 { margin: 0 0 16px; font-size: 20px; color: var(--text-heading); }
.signup-label { font-size: 13px; font-weight: 600; color: var(--text-muted); margin: 4px 0 -4px; }
.signup-terms { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--text-muted); line-height: 1.45; margin-top: 6px; cursor: pointer; }
.signup-terms input { margin-top: 2px; accent-color: var(--accent); flex: none; }
.signup-terms a { color: var(--accent); }
.signup-small { font-size: 12.5px; color: var(--text-faint); line-height: 1.5; margin: 0; }
.signup-switch { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); font-size: 14px; color: var(--text-muted); text-align: center; }
.link-btn.inline { display: inline; padding: 0; margin: 0; font-size: 14px; color: var(--accent); font-weight: 600; }
.signup-message { max-width: 480px; margin: 80px auto; padding: 0 24px; text-align: center; }
.signup-message h1 { font-size: 26px; margin: 14px 0 10px; color: var(--text-heading); }
.signup-message p { color: var(--text-muted); line-height: 1.6; font-size: 15px; }
.paywall-icon.big { width: 52px; height: 52px; margin: 0 auto; }
.signup-resend { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 18px; }
.signup-resend.column .prompt-input { max-width: 320px; }
.prompt-error .signup-resend { margin-top: 8px; align-items: flex-start; }
.signup-admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; margin-top: 12px; }
.signup-admin-field { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--text-muted); font-weight: 600; }
.signup-admin-field .prompt-input { font-weight: 400; margin: 0; resize: vertical; }
.admin-setting-row.end { justify-content: flex-end; margin-top: 12px; }
.signup-admin-sub { margin: 22px 0 8px; font-size: 14px; color: var(--text-heading); }
.signup-admin-check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; white-space: nowrap; }
.signup-admin-check input { accent-color: var(--accent); }
textarea.plan-desc { min-width: 240px; resize: vertical; font: inherit; font-size: 13px; line-height: 1.4; }
.admin-setting h3 .pill { margin-left: 8px; vertical-align: middle; font-size: 11px; }
textarea.prompt-input { font: inherit; font-size: 14px; line-height: 1.45; }
textarea.plan-desc { font-weight: 400; }
.admin-setting td input.plan-input.wide { min-width: 220px; }
.admin-note a { color: var(--accent); }
.plan-input.pay { width: 210px; }
.admin-actions .icon-btn { vertical-align: middle; margin-left: 4px; }
/* Tableau des formules : compact, colonne d'actions toujours visible */
.admin-table input.plan-input[type="number"] { width: 80px; }
.admin-table .plan-input.wide { width: 140px; }
.plan-input.pay { width: 170px; }
.admin-table th, .admin-table td { padding-left: 10px; padding-right: 10px; }
.admin-table td.admin-actions { position: sticky; right: 0; background: var(--bg-primary); white-space: nowrap; box-shadow: -8px 0 8px -8px var(--shadow); }

/* ---------- Logo de l'espace ---------- */
.sidebar-brand { display: flex; align-items: center; justify-content: flex-start; width: 100%; padding: 18px 16px 14px; background: none; border: none; cursor: pointer; flex: none; border-bottom: 1px solid var(--border); }
.sidebar-brand:hover { background: var(--bg-hover); }
.sidebar-brand-logo { display: block; max-width: 100%; max-height: 52px; object-fit: contain; object-position: left center; pointer-events: none; }
.sidebar.is-collapsed .sidebar-brand { display: none; }
/* Logo foncé sur fond sombre : inversion des couleurs en gardant les teintes */
.logo-auto-dark { filter: invert(1) hue-rotate(180deg); }
.public-brand-logo { display: block; height: 32px; width: auto; max-width: 260px; object-fit: contain; }
.starter-brand-logo { display: block; width: 280px; max-width: 80%; height: auto; margin: 0 auto 6px; }
.logo-modal { width: 560px; max-width: calc(100vw - 32px); }
.logo-modal-body { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 12px; }
@media (max-width: 600px) { .logo-modal-body { grid-template-columns: 1fr; } }
.logo-card { border: 1px solid var(--border); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.logo-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; }
.logo-preview { height: 84px; border-radius: 8px; display: flex; align-items: center; justify-content: center; padding: 10px; border: 1px solid var(--border); }
.logo-preview.light { background: #ffffff; }
.logo-preview.dark { background: #1e1e1e; }
.logo-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.logo-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.logo-actions .btn { display: inline-flex; align-items: center; gap: 6px; }
.admin-logo-thumb { display: block; height: 26px; max-width: 120px; object-fit: contain; }
.admin-logo-btn { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; background: none; border: 1px dashed transparent; border-radius: 6px; padding: 4px 6px; cursor: pointer; }
.admin-logo-btn:hover { border-color: var(--border); background: var(--bg-hover); }
.modal.logo-modal { padding: 20px 22px 16px; }
/* Nom d'espace modifiable dans l'administration : ressemble à du texte, devient un champ au survol */
.ws-name-input { width: 170px; margin: 0; font-weight: 500; font-size: 14px; background: transparent; border-color: transparent; padding: 5px 8px; }
.ws-name-input:hover { border-color: var(--border); background: var(--bg-primary); }
.ws-name-input:focus { border-color: var(--accent); background: var(--bg-primary); }

/* ---------- Espaces Pro ---------- */
.base-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; color: var(--text-muted); background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 999px; padding: 2px 9px; margin-right: 6px; white-space: nowrap; cursor: help; }
/* Pages propres à l'espace Pro : petite pastille orange */
.tree-item.is-own .tree-name::after { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-left: 7px; vertical-align: middle; }
.pill.pro { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.ws-kind { margin: 3px 0 0 8px; }
.pro-modal { width: 480px; max-width: calc(100vw - 32px); padding: 20px 22px 16px; }
.pro-form { display: flex; flex-direction: column; gap: 12px; margin: 10px 0; }
.pro-form select.prompt-input { margin: 0; }
.prices-block { margin-bottom: 34px; }
.price-cell { display: flex; align-items: center; gap: 6px; white-space: nowrap; }

/* ---------- Console Pro ---------- */
.console-logo { height: 26px; width: auto; display: block; }
.console-invite { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.console-invite .prompt-input { margin: 0; flex: 1 1 240px; }
.console-invite select.console-role { flex: 0 1 260px; }
select.console-role.small { width: auto; padding: 4px 8px; font-size: 13px; margin: 0; }
.console-linkbox { margin-top: 14px; border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--border)); background: color-mix(in srgb, var(--accent) 6%, var(--bg-primary)); border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.console-linkbox-head { display: flex; align-items: center; gap: 8px; color: var(--text-heading); }
.console-linkbox-head .icon { color: var(--accent); }
.console-link-row { display: flex; gap: 8px; align-items: center; }
.console-link-row .prompt-input { margin: 0; flex: 1; font-family: var(--font-mono, monospace); font-size: 12.5px; }
.console-space { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.console-space .btn { display: inline-flex; align-items: center; gap: 6px; }
.invite-box { max-width: 460px; }
.invite-form { text-align: left; margin: 18px auto 10px; }
.invite-warning { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; font-size: 14px; }
.create-hint { margin: 2px 0 6px; line-height: 1.45; }
.pro-callout { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; margin-bottom: 10px; border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--border)); background: color-mix(in srgb, var(--accent) 7%, transparent); border-radius: 8px; }
.small-pill { font-size: 10.5px; padding: 1px 7px; margin-left: 6px; vertical-align: middle; }
.public-home-btn { text-decoration: none; display: inline-block; }

/* ---------- Abonnement ---------- */
.billing-body { max-width: 1040px; }
.billing-banner { display: flex; align-items: center; gap: 9px; padding: 11px 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-secondary); margin-bottom: 18px; font-size: 14px; }
.billing-banner.ok { border-color: color-mix(in srgb, #2e9d5b 45%, var(--border)); background: color-mix(in srgb, #2e9d5b 9%, var(--bg-primary)); }
.billing-banner.ok .icon { color: #2e9d5b; }
.billing-current { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-primary); }
.billing-current .btn { display: inline-flex; align-items: center; gap: 6px; }
.billing-plan { font-size: 22px; font-weight: 700; color: var(--text-heading); margin: 2px 0; }
.billing-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.billing-head h2 { margin: 0; }
.billing-toggle { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--bg-secondary); border: 1px solid var(--border); }
.billing-toggle-btn { border: none; background: none; padding: 6px 14px; border-radius: 999px; font: inherit; font-size: 13.5px; color: var(--text-muted); cursor: pointer; display: inline-flex; align-items: center; gap: 7px; }
.billing-toggle-btn.is-active { background: var(--bg-primary); color: var(--text-heading); font-weight: 600; box-shadow: 0 1px 3px var(--shadow); }
.billing-save { font-size: 11px; font-weight: 600; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); padding: 1px 7px; border-radius: 999px; }
.billing-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.billing-card { display: flex; flex-direction: column; gap: 12px; padding: 20px; border: 1.5px solid var(--border); border-radius: 14px; background: var(--bg-primary); }
.billing-card.is-current { border-color: color-mix(in srgb, #2e9d5b 50%, var(--border)); }
.billing-card.is-wanted { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent); }
.billing-card-head { display: flex; align-items: center; justify-content: space-between; }
.billing-amount { font-size: 30px; font-weight: 700; color: var(--text-heading); letter-spacing: -0.5px; }
.billing-unit { font-size: 14px; color: var(--text-muted); }
.billing-seats { font-size: 13px; color: var(--text-muted); line-height: 1.5; padding: 8px 10px; background: var(--bg-secondary); border-radius: 8px; }
.billing-card .plan-points { margin-left: 0; flex: 1; }
.billing-action .btn { width: 100%; justify-content: center; }
.billing-note { line-height: 1.45; }
.billing-legal { margin-top: 18px; }

/* ---------- Pages juridiques et pied de page ---------- */
.legal-footer { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 10px; padding: 22px 16px 26px; font-size: 12.5px; color: var(--text-faint); }
.legal-footer a { color: var(--text-muted); text-decoration: none; }
.legal-footer a:hover { color: var(--accent); text-decoration: underline; }
.legal-sep { color: var(--text-faint); }
.starter.auth .legal-footer { margin-top: 18px; padding-bottom: 0; }
.legal-page { height: 100%; overflow: auto; background: var(--bg-primary); user-select: text; }
.legal-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 1080px; margin: 0 auto; padding: 18px 24px; }
.legal-brand img { display: block; height: 40px; width: auto; }
.legal-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 40px; max-width: 1080px; margin: 0 auto; padding: 8px 24px 24px; }
.legal-nav { position: sticky; top: 16px; align-self: start; display: flex; flex-direction: column; gap: 2px; }
.legal-nav a { padding: 7px 10px; border-radius: 8px; color: var(--text-muted); text-decoration: none; font-size: 14px; }
.legal-nav a:hover { background: var(--bg-secondary); color: var(--text-normal); }
.legal-nav a.is-active { background: var(--accent-soft); color: var(--text-heading); font-weight: 600; }
.legal-text { max-width: 760px; color: var(--text-normal); font-size: 15px; line-height: 1.65; }
.legal-text h1 { font-size: 30px; line-height: 1.2; color: var(--text-heading); margin: 0 0 4px; letter-spacing: -0.4px; }
.legal-text h1 + p { color: var(--text-faint); font-size: 13.5px; margin-top: 0; }
.legal-text h2 { font-size: 19px; color: var(--text-heading); margin: 30px 0 8px; }
.legal-text a { color: var(--accent); }
.legal-text ul, .legal-text ol { padding-left: 22px; }
.legal-text li { margin: 3px 0; }
.legal-text blockquote { margin: 12px 0; padding: 10px 16px; border-left: 3px solid var(--accent); background: var(--bg-secondary); border-radius: 0 8px 8px 0; }
.legal-text table { width: 100%; border-collapse: collapse; margin: 12px 0 16px; font-size: 14px; }
.legal-text th, .legal-text td { border: 1px solid var(--border); padding: 7px 10px; text-align: left; vertical-align: top; }
.legal-text th { background: var(--bg-secondary); color: var(--text-heading); font-weight: 600; }
@media (max-width: 760px) {
  .legal-layout { grid-template-columns: 1fr; gap: 16px; }
  .legal-nav { position: static; flex-direction: row; flex-wrap: wrap; }
  .legal-text table { display: block; overflow-x: auto; }
}
a.btn, a.btn:hover { text-decoration: none; }

/* ---------- Aide ---------- */
.modal.help-modal { width: min(720px, 94vw); padding: 18px 22px; max-height: 90vh; overflow-y: auto; }
.help-modal .modal-title { display: flex; align-items: center; gap: 8px; }
.help-tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 14px; }
.help-tab { border: none; background: none; padding: 8px 12px; font: inherit; font-size: 14px; color: var(--text-muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.help-tab:hover { color: var(--text-normal); }
.help-tab.is-active { color: var(--text-heading); border-bottom-color: var(--accent); font-weight: 600; }
.help-panel { padding-right: 2px; }
.help-item { border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; margin-bottom: 8px; background: var(--bg-primary); }
.help-item summary { cursor: pointer; font-weight: 600; color: var(--text-heading); }
.help-item ul { margin: 8px 0 2px; padding-left: 20px; line-height: 1.55; color: var(--text-normal); }
.help-form { display: flex; flex-direction: column; gap: 10px; }
.help-field { display: flex; flex-direction: column; gap: 4px; }
.help-label { font-size: 13px; font-weight: 600; color: var(--text-muted); }
.help-hint { font-size: 12.5px; color: var(--text-faint); margin: 0; }
.help-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.help-textarea { resize: vertical; min-height: 90px; font: inherit; }
.help-done { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 24px 8px; color: var(--text-normal); }
.help-done .icon { color: #2e9d5b; }
.help-legal { display: flex; flex-direction: column; gap: 6px; }
.help-legal-link { display: inline-flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; color: var(--text-normal); text-decoration: none; }
.help-legal-link:hover { border-color: var(--accent); color: var(--accent); }
.help-page { max-width: 760px; margin: 0 auto; padding: 8px 24px 24px; }
.help-page h1 { font-size: 30px; color: var(--text-heading); margin: 0 0 14px; }
.public-report { margin-top: 28px; font-size: 13px; }
.public-report a { color: var(--text-faint); }
@media (max-width: 600px) { .help-two { grid-template-columns: 1fr; } }

/* ---------- Paramètres du compte : export ---------- */
.export-list { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 8px; max-height: 220px; overflow-y: auto; }
.export-row { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.export-row .muted { color: var(--text-faint); margin-left: 4px; }

/* ---------- Administration : signalements ---------- */
.report-list { display: flex; flex-direction: column; gap: 12px; }
.report-card { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; background: var(--bg-primary); }
.report-card.is-done { opacity: 0.8; }
.report-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.report-body { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.report-body a { color: var(--accent); word-break: break-all; }
.report-details { white-space: pre-wrap; background: var(--bg-secondary); border-radius: 8px; padding: 8px 10px; }
.report-decision { white-space: pre-wrap; border-left: 3px solid #2e9d5b; padding: 4px 10px; }
.report-form textarea { width: 100%; resize: vertical; font: inherit; }
a.btn:not(.primary) { color: var(--text-normal); }
.account-plan a { color: var(--accent); }
.export-all { font-size: 13px; color: var(--accent); background: none; border: none; padding: 0; cursor: pointer; align-self: flex-start; }
/* ---------- Paramètres du compte (page /compte) ---------- */
.account-page-title { font-size: 22px; color: var(--text-heading); margin: 8px 0 14px; scroll-margin-top: 16px; }
.account-page-title + .billing-current { margin-bottom: 8px; }
#compte { margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--border); }
.account-page-sections { max-width: 640px; padding-bottom: 24px; }
.account-page-sections .modal-buttons { justify-content: flex-start; }
/* ---------- Abonnement Mollie ---------- */
.billing-banner.test { border-style: dashed; color: var(--text-muted); font-size: 13px; }
.billing-alert { color: #b54708; font-size: 13.5px; margin-top: 4px; display: flex; gap: 6px; align-items: flex-start; }
.order-table { width: 100%; border-collapse: collapse; margin: 6px 0 10px; font-size: 14px; }
.order-table td { padding: 6px 2px; border-bottom: 1px solid var(--border); }
.order-table .n { text-align: right; white-space: nowrap; }
.order-total td { font-weight: 700; border-bottom: none; font-size: 15px; }
.invoice-list { display: flex; flex-direction: column; gap: 4px; }
.invoice-row { display: grid; grid-template-columns: 16px 1fr auto auto; gap: 12px; align-items: center; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; color: var(--text-normal); text-decoration: none; font-size: 14px; }
.invoice-row:hover { border-color: var(--accent); }
.invoice-row .n { text-align: right; font-variant-numeric: tabular-nums; }
