
:root {
  --ink: #111111;
  --muted: #77736d;
  --line: #c9c4ba;
  --line-dark: #111111;
  --panel: #f3efe5;
  --paper: #fbfaf6;
  --white: #ffffff;
  --accent: #fe0000;
  --accent-soft: #ffe3df;
  --shadow: 0 12px 28px rgba(17, 17, 17, .12), 0 2px 7px rgba(17, 17, 17, .08);
  --cream: #f3efe5;
  --yellow: #f5e89a;
  --pink: #f4d7d7;
  --blue: #d7e5ec;
  --green: #dce7d5;
  --gray: #e4e1dc;
  --ui-font: Arial, Helvetica, sans-serif;
  --editorial-font: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; overflow: hidden; }
body {
  font-family: var(--ui-font);
  color: var(--ink);
  background: var(--paper);
  user-select: none;
}
button, input, textarea { font: inherit; }
button { color: inherit; }
.hidden { display: none !important; }

#app { height: 100%; display: grid; grid-template-columns: 264px 1fr; }

.sidebar {
  min-width: 0;
  background: var(--paper);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  border-right: 2px solid var(--ink);
  z-index: 20;
}
.brand-row { padding: 20px 18px 16px; border-bottom: 1px solid var(--ink); }
.brand-lockup { display: inline-block; }
.brand-name {
  font-family: var(--ui-font);
  font-size: 24px;
  line-height: .9;
  font-weight: 900;
  letter-spacing: -.08em;
}
.brand-slash { color: var(--accent); padding-left: 2px; }
.brand-subtitle { margin-top: 8px; font-size: 9px; font-weight: 800; letter-spacing: .23em; }

.sidebar-create-actions { display: grid; grid-template-columns: 1fr 40px; gap: 7px; padding: 14px 14px 10px; }
.primary-button,
.folder-button {
  min-height: 38px;
  border: 1px solid var(--ink);
  border-radius: 0;
  cursor: pointer;
  font-weight: 800;
}
.primary-button { background: var(--accent); color: white; padding: 9px 11px; text-align: left; }
.primary-button:hover { background: #db0000; }
.folder-button { background: var(--paper); font-size: 17px; }
.folder-button:hover { background: var(--ink); color: white; }

.search-box {
  margin: 0 14px 12px;
  height: 35px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: white;
  color: var(--muted);
  border: 1px solid var(--line);
}
.search-box:focus-within { border-color: var(--ink); }
.search-box input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); user-select: text; font-size: 12px; }
.search-box input::placeholder { color: #9a968f; }

.board-list { flex: 1; min-height: 0; overflow-y: auto; padding: 0 10px 12px; }
.sidebar-section-label {
  margin: 12px 4px 5px;
  padding: 0 5px 5px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.unfiled-drop-zone.drag-target { border-color: var(--accent); color: var(--accent); }
.folder-block { margin: 3px 0 7px; }
.folder-row {
  display: grid;
  grid-template-columns: 18px 27px minmax(0, 1fr) 25px;
  align-items: center;
  min-height: 38px;
  border: 1px solid transparent;
  cursor: pointer;
}
.folder-row:hover { background: white; border-color: var(--line); }
.folder-row.drag-target { border-color: var(--folder-color, var(--accent)); box-shadow: inset 4px 0 0 var(--folder-color, var(--accent)); }
.folder-toggle,
.folder-menu {
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
  color: var(--muted);
}
.folder-toggle { font-size: 12px; }
.folder-badge {
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  background: var(--folder-color, var(--accent));
  color: white;
  border: 1px solid var(--ink);
  font-size: 12px;
  font-weight: 900;
}
.folder-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 800; padding-left: 6px; }
.folder-menu { opacity: 0; font-size: 16px; }
.folder-row:hover .folder-menu { opacity: 1; }
.folder-menu:hover { color: var(--accent); }
.folder-children { padding: 2px 0 2px 20px; }
.folder-empty { margin: 4px 0 4px 16px; color: #aaa59d; font-size: 10px; font-style: italic; }

.board-row {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) 24px;
  align-items: center;
  min-height: 34px;
  border-left: 3px solid transparent;
  cursor: pointer;
  color: #403d38;
}
.board-row::before { content: "□"; color: #a09b92; font-size: 10px; }
.board-row:hover { background: white; }
.board-row.active { background: var(--panel); border-left-color: var(--accent); color: var(--ink); }
.board-row.active::before { content: "■"; color: var(--accent); }
.board-row.dragging { opacity: .35; }
.board-row-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--editorial-font); font-size: 12px; padding: 7px 2px; }
.board-row-menu { border: 0; background: transparent; color: #938f88; cursor: pointer; opacity: 0; }
.board-row:hover .board-row-menu,
.board-row.active .board-row-menu { opacity: 1; }
.board-row-menu:hover { color: var(--accent); }

.sidebar-footer { border-top: 1px solid var(--ink); padding: 11px 14px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.storage-status { color: var(--muted); font-size: 10px; white-space: nowrap; }
.storage-status.saving::before { content: "●"; color: #c78600; margin-right: 5px; }
.storage-status.saved::before { content: "●"; color: #18803d; margin-right: 5px; }
.quiet-button { border: 0; background: transparent; color: var(--ink); font-size: 10px; font-weight: 700; cursor: pointer; padding: 4px; }
.quiet-button:hover { color: var(--accent); }

.workspace { min-width: 0; display: grid; grid-template-rows: 61px 1fr; background: var(--paper); }
.topbar {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto minmax(150px, 1fr);
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  background: rgba(251, 250, 246, .97);
  border-bottom: 1px solid var(--ink);
  z-index: 15;
}
.board-title {
  width: min(100%, 380px);
  border: 1px solid transparent;
  background: transparent;
  padding: 6px 7px;
  border-radius: 0;
  font-family: var(--editorial-font);
  font-weight: 700;
  font-size: 17px;
  user-select: text;
}
.board-title:hover { background: white; }
.board-title:focus { outline: 0; border-color: var(--ink); background: white; box-shadow: 4px 4px 0 var(--accent-soft); }
.toolbar { display: flex; align-items: center; gap: 0; background: var(--ink); border: 1px solid var(--ink); }
.tool-button {
  border: 0;
  border-right: 1px solid #444;
  background: var(--ink);
  color: white;
  padding: 8px 9px;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.tool-button:last-child { border-right: 0; }
.tool-button:hover { background: #2d2d2d; }
.tool-button.active { background: var(--accent); color: white; }
.top-actions { justify-self: end; display: flex; align-items: center; gap: 5px; }
.icon-button,
.secondary-button { border: 1px solid var(--ink); background: var(--paper); border-radius: 0; cursor: pointer; }
.icon-button { width: 34px; height: 34px; font-size: 18px; }
.icon-button:disabled { opacity: .28; cursor: default; }
.secondary-button { padding: 8px 11px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.icon-button:hover:not(:disabled),
.secondary-button:hover { background: var(--ink); color: white; }

.menu-wrap { position: relative; }
.dropdown { position: absolute; right: 0; top: calc(100% + 7px); min-width: 225px; padding: 5px; background: white; border: 1px solid var(--ink); box-shadow: 7px 7px 0 rgba(17,17,17,.12); z-index: 100; }
.dropdown button { width: 100%; display: block; border: 0; background: transparent; text-align: left; padding: 9px 10px; cursor: pointer; font-size: 12px; }
.dropdown button:hover { background: var(--accent); color: white; }
.dropdown-separator { height: 1px; background: var(--line); margin: 5px 4px; }

.viewport {
  position: relative;
  overflow: hidden;
  outline: 0;
  cursor: crosshair;
  background-color: var(--paper);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M9.5 12h5M12 9.5v5' stroke='%239a9a96' stroke-width='.75' stroke-linecap='square' opacity='.58'/%3E%3C/svg%3E");
  background-size: 24px 24px;
}
.viewport.panning { cursor: grabbing; }
.viewport.tool-note,
.viewport.tool-list,
.viewport.tool-column,
.viewport.tool-connect { cursor: crosshair; }
.viewport.drag-over { box-shadow: inset 0 0 0 4px var(--accent); }
.world { position: absolute; left: 0; top: 0; width: 1px; height: 1px; transform-origin: 0 0; }
.connections { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 1; }
.connection-visible { fill: none; stroke: #77736d; stroke-width: 1.7; marker-end: url(#arrowhead); }
.connection-hit { fill: none; stroke: transparent; stroke-width: 14; pointer-events: stroke; cursor: pointer; }
.connection-group.selected .connection-visible { stroke: var(--accent); stroke-width: 2.8; }

.marquee {
  position: absolute;
  z-index: 50;
  border: 1px solid var(--accent);
  background: rgba(254, 0, 0, .075);
  pointer-events: none;
}

.board-item {
  position: absolute;
  min-width: 160px;
  min-height: 90px;
  border-radius: 2px;
  background: var(--cream);
  border: 1px solid rgba(17,17,17,.5);
  box-shadow: 3px 4px 0 rgba(17,17,17,.08);
  z-index: 2;
  overflow: hidden;
  transform-origin: top left;
}
.board-item:hover { box-shadow: 5px 7px 0 rgba(17,17,17,.11); }
.board-item.selected { outline: 2px solid var(--accent); outline-offset: 2px; box-shadow: 5px 7px 0 rgba(254,0,0,.13); }
.board-item.connect-source { outline: 2px dashed var(--accent); outline-offset: 3px; }
.board-item[data-color="cream"] { background: var(--cream); }
.board-item[data-color="yellow"] { background: var(--yellow); }
.board-item[data-color="pink"] { background: var(--pink); }
.board-item[data-color="blue"] { background: var(--blue); }
.board-item[data-color="green"] { background: var(--green); }
.board-item[data-color="gray"] { background: var(--gray); }
.item-header { height: 35px; display: flex; align-items: center; gap: 7px; padding: 5px 8px; cursor: move; border-bottom: 1px solid rgba(17,17,17,.28); background: rgba(255,255,255,.2); }
.drag-dots { color: rgba(17,17,17,.45); letter-spacing: -2px; font-size: 12px; width: 12px; flex: 0 0 12px; }
.item-title { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; font-family: var(--editorial-font); font-size: 12px; font-weight: 700; padding: 3px; user-select: text; }
.item-title:focus { background: rgba(255,255,255,.5); }
.item-type-icon { opacity: .62; font-size: 11px; color: var(--accent); }
.note-body { height: calc(100% - 35px); padding: 12px 13px; overflow: auto; font-family: var(--editorial-font); font-size: 14px; line-height: 1.48; outline: 0; user-select: text; cursor: text; white-space: pre-wrap; }
.note-body:empty::before { content: attr(data-placeholder); color: rgba(45,45,45,.4); }
.list-body { height: calc(100% - 35px); padding: 9px 10px 12px; overflow: auto; }
.list-row { display: grid; grid-template-columns: 18px 1fr 20px; align-items: start; gap: 6px; margin: 4px 0; }
.list-row input[type="checkbox"] { margin-top: 5px; accent-color: var(--accent); }
.list-row input[type="text"] { min-width: 0; border: 0; background: transparent; outline: 0; padding: 3px 2px; font-family: var(--editorial-font); font-size: 13px; user-select: text; }
.list-row.done input[type="text"] { text-decoration: line-through; opacity: .52; }
.row-delete { opacity: 0; border: 0; background: transparent; cursor: pointer; }
.list-row:hover .row-delete { opacity: .5; }
.row-delete:hover { opacity: 1 !important; color: var(--accent); }
.add-row { border: 0; background: transparent; color: var(--accent); cursor: pointer; padding: 6px 3px; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.column-item { background: #e7e3da !important; }
.column-body { height: calc(100% - 35px); padding: 9px; overflow-y: auto; }
.column-card { position: relative; background: var(--paper); border: 1px solid rgba(17,17,17,.35); border-radius: 1px; padding: 10px 27px 10px 10px; margin-bottom: 8px; box-shadow: 2px 2px 0 rgba(17,17,17,.06); }
.column-card textarea { display: block; width: 100%; min-height: 48px; resize: vertical; border: 0; outline: 0; background: transparent; font-family: var(--editorial-font); line-height: 1.4; font-size: 13px; user-select: text; }
.column-card-delete { position: absolute; right: 5px; top: 5px; border: 0; background: transparent; cursor: pointer; opacity: 0; }
.column-card:hover .column-card-delete { opacity: .45; }
.column-card-delete:hover { opacity: 1 !important; color: var(--accent); }
.column-add { width: 100%; border: 1px dashed #88837b; color: #5d5953; background: transparent; border-radius: 0; padding: 8px; cursor: pointer; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.column-add:hover { border-color: var(--accent); color: var(--accent); background: rgba(254,0,0,.04); }
.image-item { background: white !important; }
.image-body { height: calc(100% - 35px); display: flex; flex-direction: column; background: #e7e4dd; }
.image-body img { display: block; width: 100%; flex: 1; min-height: 0; object-fit: contain; pointer-events: none; }
.image-caption { flex: 0 0 auto; border: 0; border-top: 1px solid #bdb8b0; outline: 0; padding: 8px 9px; font-family: var(--editorial-font); font-size: 12px; user-select: text; background: white; }
.resize-handle { position: absolute; right: 0; bottom: 0; width: 18px; height: 18px; cursor: nwse-resize; z-index: 3; }
.resize-handle::after { content: ""; position: absolute; right: 4px; bottom: 4px; width: 7px; height: 7px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }

.selection-toolbar { position: absolute; z-index: 60; display: flex; align-items: center; gap: 5px; background: var(--ink); border: 1px solid var(--ink); padding: 6px; box-shadow: 5px 5px 0 rgba(17,17,17,.15); transform: translate(-50%, -100%); }
.selection-toolbar button { border: 0; cursor: pointer; }
.selection-toolbar > button:not(.swatch) { background: transparent; color: white; width: 28px; height: 28px; }
.selection-toolbar > button:not(.swatch):hover { background: var(--accent); }
.selection-count { color: white; min-width: 20px; padding: 0 4px; font-size: 10px; font-weight: 800; }
.swatch { width: 18px; height: 18px; border-radius: 50%; outline: 1px solid rgba(255,255,255,.55); }
.swatch[data-color="cream"] { background: var(--cream); }
.swatch[data-color="yellow"] { background: var(--yellow); }
.swatch[data-color="pink"] { background: var(--pink); }
.swatch[data-color="blue"] { background: var(--blue); }
.swatch[data-color="green"] { background: var(--green); }
.swatch[data-color="gray"] { background: var(--gray); }
.toolbar-divider { width: 1px; height: 21px; background: rgba(255,255,255,.25); margin: 0 2px; }

.empty-state { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px; color: #8a857e; pointer-events: none; }
.empty-state strong { color: var(--ink); font-family: var(--editorial-font); font-size: 16px; }
.empty-state span { font-size: 11px; }
.empty-icon { width: 46px; height: 46px; display: grid; place-items: center; background: var(--accent); color: white; border: 1px solid var(--ink); box-shadow: 4px 4px 0 rgba(17,17,17,.12); font-size: 24px; }
.connect-hint { position: absolute; z-index: 40; top: 16px; left: 50%; transform: translateX(-50%); background: var(--ink); color: white; padding: 8px 12px; border-left: 4px solid var(--accent); font-size: 11px; box-shadow: var(--shadow); }
.zoom-controls { position: absolute; z-index: 25; right: 15px; bottom: 15px; display: flex; align-items: center; background: var(--paper); border: 1px solid var(--ink); box-shadow: 4px 4px 0 rgba(17,17,17,.09); overflow: hidden; }
.zoom-controls button { border: 0; background: var(--paper); height: 33px; min-width: 34px; cursor: pointer; }
.zoom-controls button + button { border-left: 1px solid var(--ink); }
#zoom-reset { min-width: 58px; font-size: 10px; }
.zoom-controls button:hover { background: var(--ink); color: white; }

#help-dialog,
#folder-dialog,
#canvas-folder-dialog,
#comment-dialog,
#footnote-dialog { border: 1px solid var(--ink); padding: 0; border-radius: 0; box-shadow: 12px 12px 0 rgba(17,17,17,.18); width: min(540px, calc(100vw - 32px)); background: var(--paper); }
#folder-dialog { width: min(460px, calc(100vw - 32px)); }
#help-dialog::backdrop,
#folder-dialog::backdrop,
#canvas-folder-dialog::backdrop,
#comment-dialog::backdrop,
#footnote-dialog::backdrop { background: rgba(17,17,17,.52); }
#help-dialog form,
#folder-dialog form,
#canvas-folder-dialog form,
#comment-dialog form,
#footnote-dialog form { padding: 20px 22px 22px; }
.dialog-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 18px; border-bottom: 1px solid var(--ink); padding-bottom: 12px; }
.dialog-header h2 { margin: 2px 0 0; font-family: var(--editorial-font); font-size: 22px; }
.dialog-kicker { color: var(--accent); font-size: 9px; font-weight: 900; letter-spacing: .18em; }
.dialog-close { border: 0; background: transparent; font-size: 27px; line-height: 1; cursor: pointer; color: var(--ink); }
.dialog-close:hover { color: var(--accent); }
.shortcut-grid { display: grid; grid-template-columns: max-content 1fr; gap: 10px 18px; align-items: center; font-size: 12px; }
kbd { display: inline-block; border: 1px solid var(--ink); border-bottom-width: 2px; border-radius: 0; padding: 3px 6px; background: white; font-family: var(--ui-font); font-size: 10px; color: var(--ink); }
.dialog-note { margin: 18px 0 0; padding: 11px 12px; border-left: 4px solid var(--accent); background: var(--panel); color: #4f4b45; font-family: var(--editorial-font); font-size: 12px; line-height: 1.45; }
.field-label { display: block; margin: 15px 0 7px; color: var(--muted); font-size: 9px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.dialog-input { width: 100%; border: 1px solid var(--ink); background: white; padding: 10px 11px; outline: 0; user-select: text; font-family: var(--editorial-font); font-size: 15px; }
.dialog-input:focus { box-shadow: 4px 4px 0 var(--accent-soft); }
.folder-option-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.folder-option {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--ink);
  background: white;
  cursor: pointer;
  font-weight: 900;
}
.folder-option:hover { transform: translateY(-1px); }
.folder-option.selected { outline: 3px solid var(--accent); outline-offset: 2px; }
.color-options .folder-option { background: var(--option-color); color: transparent; }
.dialog-actions { display: flex; align-items: center; gap: 8px; margin-top: 24px; padding-top: 14px; border-top: 1px solid var(--line); }
.dialog-spacer { flex: 1; }
.dialog-primary,
.dialog-secondary,
.danger-button { border: 1px solid var(--ink); border-radius: 0; padding: 9px 12px; cursor: pointer; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.dialog-primary { background: var(--accent); color: white; }
.dialog-primary:hover { background: #d90000; }
.dialog-secondary { background: white; }
.dialog-secondary:hover { background: var(--ink); color: white; }
.danger-button { background: white; color: var(--accent); border-color: var(--accent); }
.danger-button:hover { background: var(--accent); color: white; }

.toast-region { position: fixed; z-index: 1000; right: 18px; bottom: 18px; display: grid; gap: 8px; pointer-events: none; }
.toast { background: var(--ink); color: white; padding: 10px 13px; border-left: 4px solid var(--accent); box-shadow: 5px 5px 0 rgba(17,17,17,.15); font-size: 11px; animation: toast-in .18s ease-out; }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }

@media (max-width: 1040px) {
  #app { grid-template-columns: 218px 1fr; }
  .tool-button span { display: none; }
  .topbar { grid-template-columns: minmax(120px, 1fr) auto minmax(110px, 1fr); }
}
@media (max-width: 720px) {
  #app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .topbar { grid-template-columns: 1fr auto; }
  .toolbar { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); z-index: 50; box-shadow: var(--shadow); }
  .top-actions { grid-column: 2; }
}

/* Navigation imbriquée et dossiers directement sur le canevas */
.board-navigation { min-width: 0; display: flex; align-items: center; gap: 8px; }
.board-title-stack { min-width: 0; flex: 1; display: grid; align-content: center; }
.board-breadcrumb { min-height: 11px; margin: 0 0 -2px 7px; color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.parent-board-button { width: 32px; height: 32px; flex: 0 0 32px; border: 1px solid var(--ink); background: var(--paper); cursor: pointer; font-size: 18px; }
.parent-board-button:hover { background: var(--ink); color: white; }

.viewport.tool-folder,
.viewport.tool-article { cursor: crosshair; }

.folder-canvas-item {
  min-width: 112px;
  min-height: 128px;
  border: 0;
  background: transparent !important;
  box-shadow: none;
  overflow: visible;
}
.folder-canvas-item:hover { box-shadow: none; }
.folder-canvas-item.selected { outline: 1px solid var(--accent); outline-offset: 5px; box-shadow: none; }
.canvas-folder-card { position: relative; width: 100%; height: 100%; display: grid; grid-template-rows: 86px 25px 18px; justify-items: center; align-items: center; padding: 3px 5px 0; }
.canvas-folder-icon {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  border: 1px solid rgba(17,17,17,.48);
  background: var(--canvas-folder-color);
  color: var(--ink);
  cursor: move;
  box-shadow: 4px 5px 0 rgba(17,17,17,.10);
  transition: transform .12s ease, box-shadow .12s ease;
}
.canvas-folder-card:hover .canvas-folder-icon { transform: translateY(-2px); box-shadow: 5px 7px 0 rgba(17,17,17,.12); }
.canvas-folder-title { width: 100%; min-width: 0; border: 0; background: transparent; outline: 0; padding: 2px 3px; text-align: center; font-family: var(--editorial-font); font-size: 13px; font-weight: 700; user-select: text; text-overflow: ellipsis; }
.canvas-folder-title:focus { background: white; box-shadow: 2px 2px 0 var(--accent-soft); }
.canvas-folder-meta { width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); text-align: center; font-size: 9px; }
.canvas-folder-config { position: absolute; z-index: 4; right: 4px; top: 2px; width: 27px; height: 22px; border: 0; background: rgba(251,250,246,.9); cursor: pointer; opacity: 0; font-size: 12px; }
.canvas-folder-card:hover .canvas-folder-config,
.folder-canvas-item.selected .canvas-folder-config { opacity: 1; }
.canvas-folder-config:hover { background: var(--ink); color: white; }
.canvas-icon-option { color: var(--ink); }
.canvas-icon-option svg { pointer-events: none; }

/* Carte Article : édition riche, notes et fils de commentaires */
.article-item { background: white !important; min-width: 520px; min-height: 360px; }
.article-body { height: calc(100% - 35px); min-height: 0; display: grid; grid-template-rows: 34px 1fr; background: white; }
.article-editor-toolbar { display: flex; align-items: center; gap: 2px; padding: 3px 5px; border-bottom: 1px solid var(--line); background: var(--panel); overflow-x: auto; }
.article-format-button { min-width: 27px; height: 26px; border: 1px solid transparent; background: transparent; cursor: pointer; font-family: var(--ui-font); font-size: 11px; }
.article-format-button:hover,
.article-format-button.active { border-color: var(--ink); background: white; }
.article-format-button.active { box-shadow: inset 0 -3px 0 var(--accent); }
.highlight-symbol { padding: 0 2px; background: #fff1a8; }
.toolbar-list-symbol { font-size: 18px; line-height: 0; }
.article-layout { min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 0; transition: grid-template-columns .16s ease; }
.article-layout.comments-open { grid-template-columns: minmax(0, 1fr) 232px; }
.article-main { min-width: 0; min-height: 0; overflow: auto; background: #fff; }
.article-editor { min-height: calc(100% - 18px); padding: 18px 20px 24px; outline: 0; cursor: text; user-select: text; font-family: var(--editorial-font); font-size: 15px; line-height: 1.58; }
.article-editor:empty::before { content: attr(data-placeholder); color: #9b968e; }
.article-editor p { margin: 0 0 1em; }
.article-editor h1,
.article-editor h2,
.article-editor h3 { margin: 1.15em 0 .55em; line-height: 1.15; }
.article-editor h2 { font-size: 23px; }
.article-editor h3 { font-size: 18px; }
.article-editor ul,
.article-editor ol { padding-left: 1.5em; }
.article-comment-anchor { background: #ffe0dc; color: inherit; border-bottom: 2px solid var(--accent); cursor: pointer; }
.article-comment-anchor.resolved { background: #e7e4dd; border-bottom-color: #9a968f; }
.article-comment-anchor.flash { animation: comment-flash .9s ease; }
@keyframes comment-flash { 0%,100% { box-shadow: none; } 45% { box-shadow: 0 0 0 4px rgba(254,0,0,.25); } }
.article-footnote-ref { margin-left: 1px; color: var(--accent); font-family: var(--ui-font); font-size: .72em; font-weight: 800; cursor: pointer; }
.article-footnotes { margin: 0 20px 24px; padding-top: 11px; border-top: 1px solid var(--ink); }
.article-footnotes-heading { margin-bottom: 8px; color: var(--muted); font-size: 9px; font-weight: 900; letter-spacing: .15em; text-transform: uppercase; }
.article-footnote-row { display: grid; grid-template-columns: 20px 1fr 22px; align-items: start; gap: 6px; margin-bottom: 7px; font-family: var(--editorial-font); font-size: 12px; }
.article-footnote-row textarea { width: 100%; resize: vertical; border: 0; border-bottom: 1px solid var(--line); outline: 0; background: transparent; font-family: inherit; font-size: 12px; line-height: 1.4; user-select: text; }
.article-footnote-row button { border: 0; background: transparent; cursor: pointer; }
.article-footnote-row button:hover { color: var(--accent); }
.article-comments { min-width: 0; overflow-y: auto; border-left: 1px solid var(--ink); background: #f3efe5; }
.article-layout:not(.comments-open) .article-comments { visibility: hidden; }
.article-comments-header { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; padding: 10px 11px; border-bottom: 1px solid var(--ink); background: var(--ink); color: white; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
.article-comments-header span { min-width: 19px; height: 19px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); }
.article-comments-empty { padding: 15px 12px; color: var(--muted); font-family: var(--editorial-font); font-size: 11px; line-height: 1.45; }
.article-comment-thread { margin: 9px; padding: 9px; border: 1px solid rgba(17,17,17,.35); background: white; box-shadow: 2px 2px 0 rgba(17,17,17,.06); }
.article-comment-thread.resolved { opacity: .62; }
.article-comment-quote { width: 100%; margin: 0 0 8px; padding: 0 0 7px; border: 0; border-bottom: 1px solid var(--line); background: transparent; cursor: pointer; color: #514d47; text-align: left; font-family: var(--editorial-font); font-size: 11px; font-style: italic; line-height: 1.35; }
.article-comment-quote:hover { color: var(--accent); }
.article-comment-bubble { margin: 7px 0; }
.article-comment-meta { color: var(--muted); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.article-comment-text { margin-top: 3px; font-family: var(--editorial-font); font-size: 11px; line-height: 1.4; white-space: pre-wrap; user-select: text; }
.article-reply-row { display: grid; grid-template-columns: 1fr 27px; gap: 4px; margin-top: 9px; }
.article-reply-row textarea { width: 100%; resize: vertical; border: 1px solid var(--line); outline: 0; padding: 6px; font-family: var(--editorial-font); font-size: 10px; user-select: text; }
.article-reply-row textarea:focus { border-color: var(--ink); }
.article-reply-row button { border: 1px solid var(--ink); background: var(--ink); color: white; cursor: pointer; }
.article-reply-row button:hover { background: var(--accent); }
.article-comment-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 7px; }
.article-comment-actions button { border: 0; background: transparent; padding: 2px 0; cursor: pointer; color: var(--muted); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.article-comment-actions button:hover { color: var(--accent); }

#canvas-folder-dialog,
#comment-dialog,
#footnote-dialog { border: 1px solid var(--ink); padding: 0; border-radius: 0; box-shadow: 12px 12px 0 rgba(17,17,17,.18); width: min(500px, calc(100vw - 32px)); background: var(--paper); }
#canvas-folder-dialog::backdrop,
#comment-dialog::backdrop,
#footnote-dialog::backdrop { background: rgba(17,17,17,.52); }
#canvas-folder-dialog form,
#comment-dialog form,
#footnote-dialog form { padding: 20px 22px 22px; }
.comment-dialog-text { resize: vertical; min-height: 96px; font-size: 13px; line-height: 1.45; }
.comment-quote { margin: 0 0 12px; padding: 10px 12px; border-left: 4px solid var(--accent); background: white; color: #4d4943; font-family: var(--editorial-font); font-size: 12px; font-style: italic; line-height: 1.45; max-height: 120px; overflow: auto; user-select: text; }

/* --------------------------------------------------------------------------
   Planche Oblique 0.4 — palette latérale, cartes souples et médias
   -------------------------------------------------------------------------- */
:root {
  --rail: #f0f0ed;
  --paper-raised: rgba(255,255,255,.94);
  --hairline: rgba(17,17,17,.14);
  --soft-shadow: 0 18px 42px rgba(22,25,30,.10), 0 3px 10px rgba(22,25,30,.06);
  --card-radius: 15px;
}

#app { grid-template-columns: 248px 1fr; }
.sidebar { border-right: 1px solid var(--ink); box-shadow: 7px 0 22px rgba(17,17,17,.035); }
.brand-row { padding: 19px 18px 15px; }
.primary-button,
.folder-button,
.search-box,
.icon-button,
.secondary-button,
.parent-board-button { border-radius: 8px; }
.primary-button { border-color: var(--accent); box-shadow: 0 5px 15px rgba(226,26,22,.14); }
.search-box { background: rgba(255,255,255,.72); }
.folder-row { border-radius: 8px; padding-right: 3px; }
.folder-badge { border-radius: 7px; }
.board-row { border-radius: 6px; margin: 1px 0; }
.board-row.active { box-shadow: inset 0 0 0 1px rgba(17,17,17,.05); }

.workspace { grid-template-rows: 59px minmax(0,1fr); }
.topbar {
  grid-template-columns: minmax(210px,1fr) minmax(180px,360px) minmax(210px,1fr);
  padding: 0 16px;
  background: rgba(251,250,246,.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(17,17,17,.28);
}
.topbar-center {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(20px,1fr) auto minmax(20px,1fr);
  align-items: center;
  gap: 10px;
  color: #76726c;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .22em;
  white-space: nowrap;
}
.topbar-rule { height: 1px; background: rgba(17,17,17,.24); }
.board-title { border-radius: 8px; font-size: 18px; }
.board-title:focus { box-shadow: 0 0 0 3px rgba(226,26,22,.11); }
.dropdown { border-radius: 10px; box-shadow: var(--soft-shadow); overflow: hidden; }
.dropdown button { border-radius: 6px; }

.canvas-shell {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: 68px minmax(0,1fr);
  background: var(--paper);
}
.tool-rail {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
  padding: 8px 6px 14px;
  background: rgba(240,240,237,.96);
  border-right: 1px solid rgba(17,17,17,.23);
  z-index: 12;
  scrollbar-width: thin;
}
.tool-rail .tool-button {
  position: relative;
  width: 56px;
  min-height: 53px;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 3px;
  padding: 5px 2px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #39414c;
  font-size: 8px;
  line-height: 1.1;
  cursor: pointer;
  transition: background .14s ease, color .14s ease, border-color .14s ease, transform .14s ease;
}
.tool-rail .tool-button:last-child { border-right: 1px solid transparent; }
.tool-rail .tool-button:hover {
  background: rgba(255,255,255,.9);
  border-color: rgba(17,17,17,.14);
  color: var(--ink);
  transform: translateY(-1px);
}
.tool-rail .tool-button.active {
  background: white;
  color: var(--accent);
  border-color: rgba(226,26,22,.28);
  box-shadow: 0 5px 13px rgba(17,17,17,.07);
}
.tool-rail .tool-button.active::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--accent);
}
.tool-rail .tool-button.dragging { opacity: .35; transform: scale(.94); }
.tool-glyph {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
}
.tool-glyph svg,
.drawing-tool svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tool-rail-divider { height: 1px; margin: 6px 7px; background: rgba(17,17,17,.16); }

.viewport {
  background-color: #fbfbf9;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M9.5 12h5M12 9.5v5' stroke='%23a7aaac' stroke-width='.62' stroke-linecap='round' opacity='.46'/%3E%3C/svg%3E");
  background-size: 24px 24px;
}
.viewport.drag-over::after {
  content: "Déposer pour ajouter";
  position: absolute;
  inset: 14px;
  z-index: 45;
  display: grid;
  place-items: center;
  border: 2px dashed rgba(226,26,22,.55);
  border-radius: 18px;
  color: var(--accent);
  background: rgba(255,255,255,.54);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
  pointer-events: none;
}

.board-item {
  border-radius: var(--card-radius);
  border: 1px solid rgba(20,24,29,.24);
  box-shadow: 0 13px 29px rgba(28,32,38,.075), 0 2px 5px rgba(28,32,38,.045);
  background-clip: padding-box;
}
.board-item:hover { box-shadow: 0 18px 38px rgba(28,32,38,.11), 0 4px 9px rgba(28,32,38,.055); }
.board-item.selected {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  box-shadow: 0 18px 38px rgba(226,26,22,.10), 0 3px 7px rgba(28,32,38,.06);
}
.item-header {
  height: 39px;
  padding: 6px 10px;
  border-bottom: 1px solid rgba(17,17,17,.13);
  border-radius: var(--card-radius) var(--card-radius) 0 0;
  background: rgba(255,255,255,.46);
}
.drag-dots { color: #8d9093; letter-spacing: -2px; }
.item-title { font-size: 11px; letter-spacing: .015em; }
.item-type-icon { color: #5e646c; }
.note-body { padding: 15px 16px 18px; }
.column-body { padding: 11px; }
.column-card {
  border-radius: 10px;
  border-color: rgba(17,17,17,.18);
  box-shadow: 0 4px 10px rgba(17,17,17,.05);
}
.add-row,
.column-add { border-radius: 8px; }
.resize-handle { border-radius: 0 0 12px 0; }
.selection-toolbar { border-radius: 12px; box-shadow: var(--soft-shadow); }
.zoom-controls { border-radius: 11px; overflow: hidden; box-shadow: var(--soft-shadow); }

.image-item,
.video-item,
.drawing-item,
.article-item { background: white !important; }
.image-body,
.drawing-body {
  height: calc(100% - 39px);
  padding: 8px;
  background: #ebeae6;
  border-radius: 0 0 var(--card-radius) var(--card-radius);
}
.image-body img,
.drawing-body img {
  width: 100%;
  flex: 1;
  min-height: 0;
  object-fit: contain;
  border-radius: 10px;
  background: rgba(255,255,255,.62);
}
.image-caption { border-radius: 7px; margin-top: 6px; }
.drawing-body { position: relative; display: flex; }
.drawing-edit-button {
  position: absolute;
  right: 14px;
  top: 14px;
  padding: 6px 9px;
  border: 1px solid rgba(17,17,17,.22);
  border-radius: 8px;
  background: rgba(255,255,255,.9);
  opacity: 0;
  cursor: pointer;
  font-size: 9px;
  font-weight: 800;
  box-shadow: 0 5px 13px rgba(17,17,17,.08);
}
.drawing-body:hover .drawing-edit-button { opacity: 1; }
.drawing-edit-button:hover { background: var(--ink); color: white; }

.video-body {
  height: calc(100% - 39px);
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0,1fr) 38px;
  padding: 8px;
  gap: 6px;
  background: #e9e8e4;
  border-radius: 0 0 var(--card-radius) var(--card-radius);
}
.video-frame-wrap {
  min-height: 0;
  overflow: hidden;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: #101113;
}
.video-frame-wrap iframe,
.video-frame-wrap video { width: 100%; height: 100%; border: 0; object-fit: contain; }
.video-footer { min-width: 0; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 8px; }
.video-provider {
  padding: 5px 7px;
  border-radius: 6px;
  background: var(--ink);
  color: white;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: .1em;
}
.video-caption { min-width: 0; border: 0; border-radius: 7px; outline: 0; padding: 7px 9px; background: rgba(255,255,255,.72); user-select: text; font-family: var(--editorial-font); font-size: 10px; }
.video-caption:focus { background: white; box-shadow: 0 0 0 2px rgba(226,26,22,.13); }
.video-fallback { padding: 22px; display: grid; justify-items: center; gap: 10px; color: white; text-align: center; }
.video-fallback a { color: white; text-underline-offset: 3px; }
.video-play-mark { width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.65); border-radius: 50%; }

.folder-canvas-item {
  min-width: 122px;
  min-height: 138px;
  border-radius: 16px;
}
.folder-canvas-item.selected { outline-offset: 7px; border-radius: 17px; }
.canvas-folder-card { grid-template-rows: 91px 25px 18px; padding-top: 1px; }
.canvas-folder-icon {
  position: relative;
  width: 88px;
  height: 88px;
  overflow: hidden;
  border: 1px solid rgba(17,17,17,.18);
  border-radius: 19px;
  color: white;
  box-shadow: 0 14px 26px rgba(24,28,33,.13), inset 0 1px 0 rgba(255,255,255,.25);
}
.canvas-folder-icon::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, rgba(255,255,255,.18), transparent 44%, rgba(0,0,0,.08));
}
.canvas-folder-icon::after {
  content: "";
  position: absolute;
  right: -17px;
  bottom: 13px;
  width: 62px;
  height: 3px;
  background: rgba(255,255,255,.55);
  transform: rotate(-42deg);
  transform-origin: center;
}
.canvas-folder-icon svg { position: relative; z-index: 1; filter: drop-shadow(0 1px 0 rgba(0,0,0,.12)); }
.canvas-folder-card:hover .canvas-folder-icon { transform: translateY(-3px); box-shadow: 0 19px 32px rgba(24,28,33,.16), inset 0 1px 0 rgba(255,255,255,.25); }
.canvas-folder-title { font-size: 13px; }
.canvas-folder-config,
.canvas-folder-grip {
  position: absolute;
  z-index: 5;
  top: -3px;
  width: 28px;
  height: 25px;
  border: 1px solid rgba(17,17,17,.15);
  border-radius: 8px;
  background: rgba(255,255,255,.91);
  cursor: pointer;
  opacity: 0;
  box-shadow: 0 4px 10px rgba(17,17,17,.06);
}
.canvas-folder-config { right: -1px; }
.canvas-folder-grip { left: -1px; color: #767b82; cursor: grab; }
.canvas-folder-grip:active { cursor: grabbing; }
.canvas-folder-card:hover .canvas-folder-config,
.canvas-folder-card:hover .canvas-folder-grip,
.folder-canvas-item.selected .canvas-folder-config,
.folder-canvas-item.selected .canvas-folder-grip { opacity: 1; }
.canvas-folder-config:hover,
.canvas-folder-grip:hover { background: var(--ink); color: white; }
.canvas-folder-drop-label {
  position: absolute;
  left: 50%;
  top: 39px;
  z-index: 7;
  transform: translate(-50%,-50%) scale(.92);
  padding: 7px 10px;
  border-radius: 999px;
  background: white;
  color: var(--accent);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 0 8px 22px rgba(17,17,17,.16);
}
.folder-canvas-item.drop-target .canvas-folder-icon {
  transform: translateY(-5px) scale(1.08);
  outline: 3px solid var(--accent);
  outline-offset: 5px;
  box-shadow: 0 24px 42px rgba(226,26,22,.20);
}
.folder-canvas-item.drop-target .canvas-folder-drop-label { opacity: 1; transform: translate(-50%,-50%) scale(1); }
.folder-drop-hint {
  position: absolute;
  z-index: 80;
  padding: 8px 11px;
  border-radius: 9px;
  background: var(--ink);
  color: white;
  box-shadow: var(--soft-shadow);
  pointer-events: none;
  font-size: 9px;
  font-weight: 800;
}

.article-item { border-radius: 16px; }
.article-body { height: calc(100% - 39px); border-radius: 0 0 16px 16px; overflow: hidden; }
.article-editor-toolbar { background: #f3f1eb; }
.article-format-button { border-radius: 6px; }
.article-comment-thread { border-radius: 10px; box-shadow: 0 5px 14px rgba(17,17,17,.055); }
.article-reply-row textarea { border-radius: 7px; }

#canvas-folder-dialog,
#comment-dialog,
#footnote-dialog,
#video-dialog {
  border: 1px solid rgba(17,17,17,.42);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 26px 70px rgba(17,17,17,.25);
}
#video-dialog::backdrop,
.drawing-dialog::backdrop { background: rgba(15,18,23,.58); backdrop-filter: blur(3px); }
#video-dialog form { padding: 20px 22px 22px; }
.dialog-input { border-radius: 9px; }
.dialog-primary,
.dialog-secondary,
.danger-button { border-radius: 8px; }

.drawing-dialog {
  width: min(1380px, calc(100vw - 42px));
  height: min(900px, calc(100vh - 42px));
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  border-radius: 18px;
  overflow: hidden;
  background: #f6f6f3;
  box-shadow: 0 30px 90px rgba(11,14,19,.32);
}
.drawing-dialog form { width: 100%; height: 100%; display: grid; grid-template-rows: minmax(0,1fr) 58px; padding: 0; }
.drawing-stage {
  position: relative;
  min-height: 0;
  overflow: hidden;
  background-color: #fbfbf9;
  background-image: radial-gradient(circle, rgba(121,126,132,.28) .8px, transparent .9px);
  background-size: 16px 16px;
}
#drawing-canvas { display: block; width: 100%; height: 100%; cursor: crosshair; touch-action: none; }
#drawing-canvas.eraser-active { cursor: cell; }
.drawing-help {
  position: absolute;
  left: 18px;
  top: 16px;
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(255,255,255,.78);
  color: #85898e;
  font-size: 9px;
  pointer-events: none;
}
.drawing-toolbar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border-top: 1px solid rgba(17,17,17,.16);
  background: rgba(255,255,255,.96);
  box-shadow: 0 -9px 30px rgba(17,17,17,.06);
}
.drawing-tool-group { display: flex; gap: 4px; }
.drawing-tool,
.drawing-action {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  cursor: pointer;
}
.drawing-tool:hover,
.drawing-action:hover { background: #f0f1f2; border-color: rgba(17,17,17,.12); }
.drawing-tool.active { background: #17243a; color: white; }
.drawing-action { font-size: 19px; }
.drawing-action:disabled { opacity: .25; cursor: default; }
.drawing-divider { width: 1px; height: 29px; margin: 0 3px; background: rgba(17,17,17,.14); }
.drawing-color-label { position: relative; width: 38px; height: 38px; display: grid; place-items: center; cursor: pointer; }
.drawing-color-label input { position: absolute; opacity: 0; pointer-events: none; }
.drawing-color-label span { width: 24px; height: 24px; border: 4px solid #eef0f1; border-radius: 7px; background: #17243a; box-shadow: 0 0 0 1px rgba(17,17,17,.28); }
.drawing-color-label:has(input[value="#17243a"]) span { background: #17243a; }
.drawing-size-label { min-width: 116px; display: flex; align-items: center; gap: 8px; }
.drawing-size-label input { width: 82px; accent-color: #17243a; }
#drawing-size-preview { flex: 0 0 auto; display: block; border-radius: 50%; }
.drawing-spacer { flex: 1; }
.drawing-discard,
.drawing-save {
  height: 36px;
  padding: 0 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
}
.drawing-discard { border: 1px solid rgba(17,17,17,.22); background: white; }
.drawing-save { border: 1px solid var(--accent); background: var(--accent); color: white; }
.drawing-save:hover { background: #c91512; }

@media (max-width: 1120px) {
  #app { grid-template-columns: 214px 1fr; }
  .topbar-center { display: none; }
  .topbar { grid-template-columns: minmax(170px,1fr) auto; }
  .top-actions { grid-column: 2; }
}
@media (max-width: 760px) {
  .canvas-shell { grid-template-columns: 56px minmax(0,1fr); }
  .tool-rail { padding-inline: 3px; }
  .tool-rail .tool-button { width: 48px; }
  .drawing-toolbar { gap: 3px; padding-inline: 7px; }
  .drawing-size-label { display: none; }
  .drawing-discard,
  .drawing-save { padding-inline: 10px; }
}
.canvas-icon-options { max-height: 190px; overflow-y: auto; padding: 4px; }
.canvas-icon-options .folder-option {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border-color: rgba(17,17,17,.22);
  color: #17243a;
  box-shadow: 0 5px 12px rgba(17,17,17,.045);
}
.canvas-icon-options .folder-option:hover { color: var(--accent); border-color: rgba(226,26,22,.35); }
.color-options .folder-option { border-radius: 11px; border-color: rgba(17,17,17,.22); }

/* ──────────────────────────────────────────────────────────────
   Planche Oblique 0.5 — arborescence, fil d’Ariane, dessin direct
   ────────────────────────────────────────────────────────────── */
:root {
  --tree-width: 304px;
  --topbar-height: 64px;
  --ui-font: "Aptos", "Segoe UI", Helvetica, Arial, sans-serif;
  --condensed-font: "Aptos Narrow", "Arial Narrow", "Roboto Condensed", "Helvetica Neue", Arial, sans-serif;
}

#app {
  height: 100%;
  display: grid;
  grid-template-rows: var(--topbar-height) minmax(0, 1fr);
  grid-template-columns: 1fr;
  background: var(--paper);
}

.topbar {
  position: relative;
  z-index: 100;
  min-width: 0;
  height: var(--topbar-height);
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 13px;
  padding: 0 17px 0 20px;
  border-bottom: 1px solid rgba(17,17,17,.2);
  background: rgba(251,250,246,.97);
  box-shadow: 0 5px 20px rgba(17,17,17,.035);
}

.oblique-wordmark {
  width: 116px;
  height: 34px;
  display: block;
  flex: 0 0 auto;
  color: var(--ink);
  text-decoration: none;
}
.oblique-wordmark svg { width: 100%; height: 100%; overflow: visible; }
.oblique-wordmark text {
  fill: currentColor;
  font-family: "Helvetica Neue", "Nimbus Sans L", Arial, sans-serif;
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -1.85px;
}
.oblique-wordmark:hover { color: var(--accent); }
.brand-path-slash {
  color: var(--accent);
  font-family: var(--condensed-font);
  font-size: 33px;
  font-weight: 300;
  line-height: 1;
  transform: translateY(-1px);
}
.path-navigation {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  overflow: hidden;
  white-space: nowrap;
}
.board-breadcrumb {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  overflow: hidden;
  color: #66625d;
  font-family: var(--condensed-font);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .055em;
  text-transform: uppercase;
}
.breadcrumb-segment {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  border: 0;
  padding: 4px 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-transform: uppercase;
}
.breadcrumb-segment:hover { color: var(--accent); }
.breadcrumb-separator { color: #aaa49b; font-weight: 400; }
.board-title {
  min-width: 115px;
  max-width: min(360px, 34vw);
  width: auto;
  height: 32px;
  border: 0;
  border-bottom: 1px solid transparent;
  padding: 2px 3px 1px;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--condensed-font);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .075em;
  text-transform: uppercase;
  user-select: text;
}
.board-title:hover { border-bottom-color: rgba(17,17,17,.2); }
.board-title:focus { border-bottom-color: var(--accent); }
.parent-board-button {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(17,17,17,.16);
  border-radius: 50%;
  background: white;
  cursor: pointer;
}
.parent-board-button:hover { border-color: var(--accent); color: var(--accent); }
.tree-toggle {
  height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(17,17,17,.17);
  border-radius: 8px;
  padding: 0 10px;
  background: white;
  cursor: pointer;
  color: #4e4c48;
  font-family: var(--condensed-font);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.tree-toggle:hover { border-color: var(--ink); color: var(--ink); }
.tree-toggle-glyph { width: 17px; display: grid; gap: 3px; }
.tree-toggle-glyph i { display: block; height: 1px; background: currentColor; }
.tree-toggle-glyph i:nth-child(2) { width: 12px; }
.top-actions { justify-self: end; }

.app-body {
  min-height: 0;
  display: grid;
  grid-template-columns: var(--tree-width) minmax(0, 1fr);
  transition: grid-template-columns .22s ease;
}
#app.tree-collapsed .app-body { grid-template-columns: 0 minmax(0, 1fr); }
.tree-panel {
  min-width: 0;
  width: var(--tree-width);
  height: 100%;
  display: grid;
  grid-template-rows: auto auto minmax(0,1fr) auto;
  overflow: hidden;
  border-right: 1px solid rgba(17,17,17,.18);
  background: #f8f6f0;
  box-shadow: 7px 0 22px rgba(17,17,17,.035);
  transition: transform .22s ease, opacity .18s ease;
  z-index: 30;
}
#app.tree-collapsed .tree-panel { transform: translateX(-100%); opacity: 0; pointer-events: none; }
.tree-panel-head {
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(0,1fr) 34px;
  align-items: center;
  gap: 10px;
  padding: 11px 13px 8px 15px;
  border-bottom: 1px solid rgba(17,17,17,.1);
}
.tree-panel-head div { min-width: 0; display: grid; gap: 2px; }
.tree-panel-head strong {
  font-family: var(--condensed-font);
  font-size: 11px;
  letter-spacing: .16em;
}
.tree-panel-head span { color: #8a857d; font-size: 7px; font-weight: 800; letter-spacing: .18em; }
.tree-new-board {
  width: 32px;
  height: 32px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--accent);
  color: white;
  cursor: pointer;
  font-size: 19px;
}
.tree-new-board:hover { background: var(--ink); }
.tree-search {
  height: 34px;
  margin: 9px 12px 7px;
  display: flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(17,17,17,.13);
  border-radius: 8px;
  padding: 0 9px;
  background: rgba(255,255,255,.8);
  color: #8b877f;
}
.tree-search:focus-within { border-color: rgba(17,17,17,.45); background: white; }
.tree-search svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.tree-search input { min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); user-select: text; font-size: 11px; }
.element-tree { min-height: 0; overflow: auto; padding: 5px 9px 18px 10px; scrollbar-width: thin; }
.tree-list, .tree-children { list-style: none; margin: 0; padding: 0; }
.tree-children {
  position: relative;
  margin-left: 14px;
  padding-left: 14px;
}
.tree-children::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0;
  bottom: 14px;
  border-left: 1px solid #c9c4ba;
}
.tree-node { position: relative; min-width: 0; }
.tree-children > .tree-node::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 17px;
  width: 11px;
  border-top: 1px solid #c9c4ba;
}
.tree-row {
  min-width: 0;
  min-height: 34px;
  display: grid;
  grid-template-columns: 18px 23px minmax(0,1fr) auto;
  align-items: center;
  gap: 4px;
  margin: 1px 0;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 2px 5px 2px 2px;
  cursor: pointer;
  color: #47443f;
}
.tree-row:hover { background: rgba(255,255,255,.88); border-color: rgba(17,17,17,.09); }
.tree-row.current { background: #fff; border-color: rgba(17,17,17,.18); box-shadow: inset 3px 0 0 var(--accent); color: var(--ink); }
.tree-row.selected-leaf { color: var(--accent); }
.tree-expander {
  width: 18px;
  height: 24px;
  border: 0;
  padding: 0;
  background: transparent;
  color: #8b867e;
  cursor: pointer;
  font-size: 10px;
}
.tree-expander.empty { visibility: hidden; }
.tree-node-icon {
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  color: #6d6962;
}
.tree-node-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tree-node-icon.folder-mark { color: var(--node-color, var(--accent)); }
.tree-node-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--condensed-font);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .055em;
  text-transform: uppercase;
}
.tree-node.board-root > .tree-row .tree-node-label { font-size: 11px; font-weight: 850; letter-spacing: .09em; }
.tree-node-kind { color: #aaa49b; font-size: 7px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.tree-row-menu { width: 23px; height: 23px; border: 0; background: transparent; color: #aaa49b; cursor: pointer; opacity: 0; }
.tree-row:hover .tree-row-menu, .tree-row.current .tree-row-menu { opacity: 1; }
.tree-row-menu:hover { color: var(--accent); }
.tree-empty { padding: 18px 14px; color: #918c84; font-size: 10px; line-height: 1.45; }
.tree-panel-footer {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  border-top: 1px solid rgba(17,17,17,.13);
  background: rgba(251,250,246,.88);
}

.workspace { min-width: 0; min-height: 0; display: block; background: var(--paper); }
.canvas-shell { height: 100%; min-height: 0; }
.viewport { border-left: 0; }

/* Six-point move grip on every object */
.item-grip, .canvas-folder-grip {
  position: absolute;
  z-index: 18;
  left: -12px;
  top: 10px;
  width: 24px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(17,17,17,.16);
  border-radius: 8px;
  padding: 0;
  background: rgba(255,255,255,.94);
  color: #68645e;
  cursor: grab;
  box-shadow: 0 5px 14px rgba(17,17,17,.09);
  opacity: .72;
  transition: opacity .12s ease, transform .12s ease, background .12s ease;
}
.item-grip:hover, .canvas-folder-grip:hover { opacity: 1; transform: translateX(-2px); background: var(--ink); color: white; }
.item-grip:active, .canvas-folder-grip:active { cursor: grabbing; }
.six-dot-grip {
  width: 10px;
  display: grid;
  grid-template-columns: repeat(2, 3px);
  grid-auto-rows: 3px;
  gap: 2px;
}
.six-dot-grip i { width: 3px; height: 3px; display: block; border-radius: 50%; background: currentColor; }
.item-header { cursor: default; padding-left: 14px; }
.item-header .drag-dots { display: none; }

/* Folder cards: no surrounding frame, high-impact symbol, uppercase label */
.folder-canvas-item {
  overflow: visible;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.folder-canvas-item:hover { box-shadow: none !important; }
.folder-canvas-item.selected {
  outline: 1px solid rgba(17,17,17,.42);
  outline-offset: 8px;
  box-shadow: none !important;
}
.canvas-folder-card {
  position: relative;
  height: 100%;
  display: grid;
  grid-template-rows: minmax(82px,1fr) auto auto;
  justify-items: center;
  align-items: center;
  padding: 0 3px;
}
.canvas-folder-icon {
  position: relative;
  width: 96px;
  height: 88px;
  display: grid;
  place-items: center;
  overflow: visible;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--canvas-folder-color);
  box-shadow: none !important;
  filter: drop-shadow(0 8px 10px rgba(17,17,17,.11));
  transition: transform .16s ease, filter .16s ease;
}
.canvas-folder-icon::before {
  content: "";
  position: absolute;
  width: 82px;
  height: 5px;
  background: color-mix(in srgb, var(--canvas-folder-color) 82%, white);
  transform: rotate(-34deg);
  opacity: .34;
  z-index: 0;
}
.canvas-folder-icon::after {
  content: "";
  position: absolute;
  left: 15px;
  bottom: 8px;
  width: 28px;
  height: 3px;
  background: var(--canvas-folder-color);
  transform: none;
  opacity: 1;
}
.canvas-folder-icon svg { position: relative; z-index: 1; width: 66px; height: 66px; stroke-width: 2.25; filter: none; }
.canvas-folder-card:hover .canvas-folder-icon { transform: translateY(-4px) scale(1.035); filter: drop-shadow(0 13px 15px rgba(17,17,17,.15)); box-shadow: none !important; }
.canvas-folder-title {
  width: 100%;
  border: 0;
  outline: 0;
  padding: 2px 1px;
  background: transparent;
  color: var(--ink);
  font-family: var(--condensed-font);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .13em;
  line-height: 1.12;
  text-align: center;
  text-transform: uppercase;
}
.canvas-folder-title:focus { background: white; box-shadow: 0 2px 0 var(--accent); }
.canvas-folder-meta {
  color: #8b867e;
  font-family: var(--condensed-font);
  font-size: 7px;
  font-weight: 750;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.canvas-folder-config {
  right: -9px;
  top: 1px;
  border: 0;
  border-radius: 7px;
  background: rgba(255,255,255,.91);
}
.canvas-folder-grip { left: -12px; top: 9px; }
.folder-canvas-item.drop-target .canvas-folder-icon {
  outline: 0;
  transform: translateY(-5px) scale(1.11);
  filter: drop-shadow(0 15px 18px rgba(226,26,22,.25));
  box-shadow: none;
}

/* Frameless drawings: the selection rectangle only appears on click */
.board-item.drawing-item {
  overflow: visible;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.board-item.drawing-item:hover { box-shadow: none !important; }
.board-item.drawing-item.selected {
  outline: 1px solid rgba(17,17,17,.52);
  outline-offset: 5px;
  box-shadow: none !important;
}
.drawing-item .drawing-body { width: 100%; height: 100%; padding: 0; background: transparent; overflow: visible; }
.drawing-item .drawing-body img { width: 100%; height: 100%; object-fit: contain; border-radius: 0; background: transparent; }
.drawing-item .item-grip,
.drawing-item .resize-handle { opacity: 0; }
.drawing-item:hover .item-grip,
.drawing-item.selected .item-grip,
.drawing-item.selected .resize-handle { opacity: 1; }
.drawing-edit-button { display: none; }
.drawing-item .resize-handle { background: rgba(255,255,255,.86); border-radius: 4px; }

/* Direct drawing layer */
.inline-drawing-canvas {
  position: absolute;
  inset: 0;
  z-index: 52;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: crosshair;
  background: transparent;
}
.inline-drawing-canvas.eraser-active { cursor: cell; }
.viewport.drawing-active::after {
  content: "DESSIN DIRECT — TRACEZ SUR LE CANEVAS";
  position: absolute;
  z-index: 53;
  left: 18px;
  top: 15px;
  padding: 6px 9px;
  border-radius: 6px;
  background: rgba(255,255,255,.82);
  color: #7f7a72;
  pointer-events: none;
  font-family: var(--condensed-font);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .13em;
}
.inline-drawing-toolbar {
  position: absolute;
  z-index: 70;
  left: 50%;
  bottom: 17px;
  transform: translateX(-50%);
  min-width: min(690px, calc(100% - 34px));
  height: 54px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 9px;
  border: 1px solid rgba(17,17,17,.14);
  border-radius: 12px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 15px 42px rgba(17,17,17,.15);
}
.inline-drawing-toolbar .drawing-tool,
.inline-drawing-toolbar .drawing-action { width: 38px; height: 38px; }
.drawing-mode-label { color: #8a857e; font-family: var(--condensed-font); font-size: 8px; font-weight: 850; letter-spacing: .13em; white-space: nowrap; }

@media (max-width: 980px) {
  :root { --tree-width: 252px; }
  .tree-toggle-label { display: none; }
  .tree-toggle { width: 36px; justify-content: center; padding: 0; }
  .oblique-wordmark { width: 101px; }
  .topbar { gap: 9px; padding-inline: 12px; }
  .board-title { max-width: 180px; }
}
@media (max-width: 700px) {
  .app-body { grid-template-columns: 0 minmax(0,1fr); }
  .tree-panel { position: absolute; left: 0; top: var(--topbar-height); bottom: 0; z-index: 95; transform: translateX(-100%); }
  #app:not(.tree-collapsed) .tree-panel { transform: translateX(0); opacity: 1; pointer-events: auto; }
  .brand-path-slash { display: none; }
  .board-breadcrumb { display: none; }
  .topbar { grid-template-columns: auto minmax(0,1fr) auto auto; }
}

/* ──────────────────────────────────────────────────────────────
   Planche Oblique 0.6 — rail rétractable, aperçus de liens, DOCX
   ────────────────────────────────────────────────────────────── */
:root { --tree-rail-width: 38px; }

.topbar { grid-template-columns: auto auto minmax(0, 1fr) auto; }
.app-body { grid-template-columns: var(--tree-width) minmax(0, 1fr); }
#app.tree-collapsed .app-body { grid-template-columns: var(--tree-rail-width) minmax(0, 1fr); }
.tree-panel {
  position: relative;
  width: var(--tree-width);
  transform: none !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  transition: width .22s ease, background .22s ease, box-shadow .22s ease;
}
.tree-panel-head { grid-template-columns: minmax(0,1fr) 32px 28px; padding-right: 8px; }
.tree-panel-title { min-width: 0; }
.tree-collapse-button {
  width: 27px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  border-left: 1px solid rgba(17,17,17,.13);
  padding: 0 0 0 4px;
  background: transparent;
  color: #69655f;
  cursor: pointer;
  transition: color .15s ease, transform .22s ease;
}
.tree-collapse-button:hover { color: var(--accent); }
.tree-collapse-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#app.tree-collapsed .tree-panel { width: var(--tree-rail-width); background: #f1eee7; box-shadow: 4px 0 12px rgba(17,17,17,.035); }
#app.tree-collapsed .tree-panel-head {
  height: 100%;
  min-height: 0;
  display: block;
  padding: 0;
  border: 0;
}
#app.tree-collapsed .tree-panel-title,
#app.tree-collapsed .tree-new-board,
#app.tree-collapsed .tree-search,
#app.tree-collapsed .element-tree,
#app.tree-collapsed .tree-panel-footer { display: none !important; }
#app.tree-collapsed .tree-collapse-button {
  position: absolute;
  left: 5px;
  top: 12px;
  width: 28px;
  height: 34px;
  border: 0;
  border-radius: 7px;
  padding: 0;
  background: rgba(255,255,255,.82);
  box-shadow: 0 2px 7px rgba(17,17,17,.08);
}
#app.tree-collapsed .tree-collapse-button svg { transform: rotate(180deg); }

.link-item { min-width: 280px; min-height: 190px; background: white !important; }
.link-body { height: calc(100% - 39px); min-height: 0; padding: 8px; background: #ebeae6; border-radius: 0 0 var(--card-radius) var(--card-radius); }
.link-preview {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(92px, 48%) minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(17,17,17,.16);
  border-radius: 12px;
  background: white;
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 5px 13px rgba(17,17,17,.05);
}
.link-preview-media { position: relative; min-height: 0; overflow: hidden; background: #17243a; }
.link-preview-media img { width: 100%; height: 100%; display: block; object-fit: cover; }
.link-preview-media.empty,
.link-preview-media.image-error { background: linear-gradient(135deg, #17243a, #35445d); }
.link-preview-media.image-error img { display: none; }
.link-preview-fallback-mark {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  color: rgba(255,255,255,.84);
  font-family: var(--condensed-font);
  font-size: 32px;
  font-weight: 900;
  letter-spacing: .08em;
}
.link-preview-media.empty .link-preview-fallback-mark,
.link-preview-media.image-error .link-preview-fallback-mark { display: grid; }
.link-preview-content { min-height: 0; display: flex; flex-direction: column; gap: 7px; padding: 11px 13px 10px; }
.link-preview-source { min-width: 0; display: flex; align-items: center; gap: 7px; color: #7c6b83; font-size: 9px; }
.link-preview-source img { width: 16px; height: 16px; border-radius: 3px; object-fit: contain; }
.link-preview-source span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-preview-title {
  outline: 0;
  color: #111;
  font-family: var(--ui-font);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.25;
  user-select: text;
}
.link-preview-title:empty::before,
.link-preview-description:empty::before { content: attr(data-placeholder); color: #98948e; }
.link-preview-title:focus,
.link-preview-description:focus { box-shadow: inset 0 -1px 0 var(--accent); }
.link-preview-description {
  min-height: 0;
  overflow: hidden;
  outline: 0;
  color: #373737;
  font-family: var(--editorial-font);
  font-size: 11px;
  line-height: 1.48;
  user-select: text;
}
.link-preview-actions { margin-top: auto; display: flex; align-items: center; justify-content: space-between; color: #78736c; font-size: 7px; font-weight: 850; letter-spacing: .11em; }
.link-preview-actions button { width: 25px; height: 22px; border: 0; border-radius: 5px; background: #f0eee8; cursor: pointer; }
.link-preview-actions button:hover { background: var(--ink); color: white; }

.article-body { position: relative; }
.article-body.docx-drop-target::after,
.article-item.docx-importing .article-body::after {
  content: "DÉPOSER LE DOCUMENT WORD ICI";
  position: absolute;
  z-index: 20;
  inset: 8px;
  display: grid;
  place-items: center;
  border: 2px dashed var(--accent);
  border-radius: 11px;
  background: rgba(251,250,246,.94);
  color: var(--accent);
  font-family: var(--condensed-font);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .14em;
  pointer-events: none;
}
.article-item.docx-importing .article-body::after { content: "IMPORTATION DU DOCUMENT…"; }
.docx-import-button { width: auto !important; padding-inline: 7px !important; }
.docx-button-label { font-family: var(--condensed-font); font-size: 8px; font-weight: 900; letter-spacing: .08em; }
.article-editor .docx-inline-image { display: block; max-width: 100%; margin: 1.1em auto; border-radius: 8px; }
.article-editor .docx-table { width: 100%; border-collapse: collapse; margin: 1em 0; font-family: var(--ui-font); font-size: 12px; }
.article-editor .docx-table td { border: 1px solid #ccc7bd; padding: 7px 8px; vertical-align: top; }
.article-editor blockquote { margin: 1.1em 0; padding: .15em 0 .15em 1.1em; border-left: 3px solid var(--accent); color: #55514c; }
.article-editor a { color: #7a246c; text-decoration-thickness: 1px; text-underline-offset: 2px; }

#link-dialog { border: 1px solid rgba(17,17,17,.42); border-radius: 16px; overflow: hidden; box-shadow: 0 26px 70px rgba(17,17,17,.25); }
#link-dialog::backdrop { background: rgba(15,18,23,.58); backdrop-filter: blur(3px); }
#link-dialog form { padding: 20px 22px 22px; }

@media (max-width: 760px) {
  .topbar { grid-template-columns: auto auto minmax(0,1fr) auto; }
  #app.tree-collapsed .app-body { grid-template-columns: var(--tree-rail-width) minmax(0,1fr); }
}

/* ──────────────────────────────────────────────────────────────
   Planche Oblique 0.7 — objets directs, main universelle, volet article
   ────────────────────────────────────────────────────────────── */
:root {
  --article-pane-min: 480px;
}

.topbar {
  grid-template-columns: 24px auto auto minmax(0, 1fr) auto;
  gap: 11px;
  padding-left: 10px;
}
.topbar-tree-toggle {
  width: 22px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(17,17,17,.22);
  border-radius: 3px;
  background: rgba(255,255,255,.72);
  color: #5d5954;
  cursor: pointer;
}
.topbar-tree-toggle:hover { border-color: var(--ink); color: var(--ink); background: white; }
.topbar-tree-toggle svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .18s ease;
}
#app.tree-collapsed .topbar-tree-toggle svg { transform: rotate(180deg); }

.app-body { grid-template-columns: var(--tree-width) minmax(0, 1fr); }
#app.tree-collapsed .app-body { grid-template-columns: 0 minmax(0, 1fr); }
.tree-panel {
  width: var(--tree-width) !important;
  transform: translateX(0) !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  transition: transform .2s ease, opacity .15s ease;
}
#app.tree-collapsed .tree-panel {
  width: var(--tree-width) !important;
  transform: translateX(-100%) !important;
  opacity: 0 !important;
  pointer-events: none !important;
  box-shadow: none !important;
}
.tree-panel-head { grid-template-columns: minmax(0,1fr) 32px; padding-right: 12px; }
.tree-collapse-button { display: none !important; }
#app.tree-collapsed .tree-panel-title,
#app.tree-collapsed .tree-new-board,
#app.tree-collapsed .tree-search,
#app.tree-collapsed .element-tree,
#app.tree-collapsed .tree-panel-footer { display: initial; }

.canvas-shell {
  grid-template-columns: 68px minmax(0,1fr);
  transition: grid-template-columns .18s ease;
}
.canvas-shell.article-pane-open {
  grid-template-columns: 68px minmax(320px, 1fr) minmax(var(--article-pane-min), 50%);
}

/* Aucun titre de fenêtre sur les éléments ordinaires. */
.board-item {
  cursor: grab;
  overflow: hidden;
  border-color: rgba(17,17,17,.18);
  box-shadow: 0 8px 24px rgba(17,17,17,.065), 0 1px 3px rgba(17,17,17,.05);
}
.board-item:hover { box-shadow: 0 11px 29px rgba(17,17,17,.085), 0 2px 5px rgba(17,17,17,.055); }
.board-item.selected {
  outline: 1px solid rgba(17,17,17,.62);
  outline-offset: 2px;
  box-shadow: 0 11px 29px rgba(17,17,17,.09), 0 2px 5px rgba(17,17,17,.06);
}
.board-item.connect-source {
  outline: 1px dashed rgba(17,17,17,.7);
  outline-offset: 3px;
}
.item-grip,
.canvas-folder-grip,
.six-dot-grip { display: none !important; }

.note-body,
.list-body,
.column-body { height: 100%; }
.note-body { padding: 17px 18px; }
.list-body { padding: 15px 18px 17px; }
.column-body { padding: 13px; }
.image-body,
.drawing-body,
.video-body,
.link-body { height: 100%; border-radius: inherit; }
.image-body { padding: 0; background: transparent; }
.image-body img { border-radius: inherit; background: transparent; }
.image-caption {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  width: auto;
  min-width: 0;
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(7px);
  opacity: 0;
  transition: opacity .12s ease;
}
.image-item:hover .image-caption,
.image-caption:focus { opacity: 1; }
.video-body { grid-template-rows: minmax(0,1fr) 38px; padding: 0; gap: 0; background: #111; }
.video-frame-wrap { border-radius: inherit; }
.video-footer {
  padding: 0 9px;
  background: rgba(255,255,255,.96);
  border-top: 1px solid rgba(17,17,17,.12);
}
.link-body { padding: 0; background: transparent; }
.link-preview { border: 0; border-radius: inherit; box-shadow: none; }
.link-preview-actions a {
  color: inherit;
  text-decoration: none;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
}
.link-preview-actions a:hover { color: var(--accent); }
.drawing-item { background: transparent !important; border-color: transparent; box-shadow: none; }
.drawing-item:hover { box-shadow: none; }
.drawing-item.selected { outline-color: rgba(17,17,17,.56); }
.drawing-body { padding: 0; background: transparent; }
.drawing-body img { border-radius: 0; background: transparent; }

/* La barre noire est réservée aux articles. */
.article-item {
  min-width: 300px;
  min-height: 180px;
  background: white !important;
  border-radius: 10px;
}
.article-card-header {
  height: 38px;
  padding: 4px 10px;
  border: 0;
  border-radius: 9px 9px 0 0;
  background: #111;
  color: white;
}
.article-card-title {
  color: white;
  font-family: var(--condensed-font);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .045em;
}
.article-card-title:focus { background: rgba(255,255,255,.12); }
.article-card-body {
  height: calc(100% - 38px);
  display: grid;
  grid-template-rows: minmax(0,1fr) auto;
  gap: 10px;
  padding: 18px 19px 14px;
  background: white;
  cursor: grab;
}
.article-card-excerpt {
  overflow: hidden;
  color: #292724;
  font-family: var(--editorial-font);
  font-size: 14px;
  line-height: 1.55;
}
.article-card-meta {
  padding-top: 9px;
  border-top: 1px solid rgba(17,17,17,.12);
  color: #8a857e;
  font-family: var(--condensed-font);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.article-pane {
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-rows: 54px minmax(0,1fr);
  border-left: 1px solid rgba(17,17,17,.35);
  background: #fff;
  box-shadow: -12px 0 30px rgba(17,17,17,.07);
  z-index: 40;
}
.article-pane-header {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0,1fr) 38px;
  align-items: center;
  gap: 10px;
  padding: 0 8px 0 15px;
  background: #111;
  color: white;
}
.article-pane-mark {
  color: #b9b5ae;
  font-family: var(--condensed-font);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .16em;
}
.article-pane-title {
  min-width: 0;
  width: 100%;
  border: 0;
  border-bottom: 1px solid transparent;
  outline: 0;
  padding: 5px 2px;
  background: transparent;
  color: white;
  font-family: var(--condensed-font);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .045em;
  user-select: text;
}
.article-pane-title:focus { border-bottom-color: rgba(255,255,255,.5); }
.article-pane-close {
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  color: white;
  cursor: pointer;
  font-size: 23px;
  font-weight: 300;
}
.article-pane-close:hover { background: #2c2c2c; }
.article-pane-content { min-height: 0; overflow: hidden; background: white; }
.article-pane-content > .article-body {
  height: 100%;
  border-radius: 0;
  overflow: hidden;
}
.article-pane-content .article-editor-toolbar { min-height: 42px; padding-inline: 9px; }
.article-pane-content .article-layout.comments-open { grid-template-columns: minmax(0,1fr) minmax(220px, 31%); }
.article-pane-content .article-editor { padding: 34px 7% 56px; font-size: 16px; line-height: 1.65; }

/* Espace transforme tout le canevas en main, y compris au-dessus des objets. */
.space-pan-ready .viewport,
.space-pan-ready .viewport *,
.viewport.panning,
.viewport.panning * { cursor: grab !important; }
.viewport.panning,
.viewport.panning * { cursor: grabbing !important; }

/* Le retour visuel du glisser-déposer reste discret et ne cadre plus toute la page en rouge. */
.viewport.drag-over { box-shadow: none; }
.viewport.drag-over::after {
  inset: 18px;
  border: 1px dashed rgba(17,17,17,.34);
  border-radius: 10px;
  color: #5f5b55;
  background: rgba(255,255,255,.38);
}

@media (max-width: 1180px) {
  :root { --article-pane-min: 420px; }
  .canvas-shell.article-pane-open { grid-template-columns: 60px minmax(260px, .9fr) minmax(420px, 1.1fr); }
  .tool-rail { width: 60px; }
}
@media (max-width: 850px) {
  .canvas-shell.article-pane-open { grid-template-columns: 60px minmax(0,1fr); }
  .article-pane {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(92%, 650px);
  }
}
.note-body { cursor: grab; overflow: auto; }
.note-editor {
  width: 100%;
  min-height: 1.55em;
  outline: 0;
  cursor: text;
  user-select: text;
  white-space: pre-wrap;
}
.note-editor:empty::before { content: attr(data-placeholder); color: rgba(45,45,45,.38); }
.note-body:empty::before { content: none; }

/* ──────────────────────────────────────────────────────────────
   Planche Oblique 0.8 — menus contextuels et atelier éditorial WP
   ────────────────────────────────────────────────────────────── */

/* La palette flottante ne garde que les actions utiles. */
.selection-toolbar {
  gap: 2px;
  padding: 4px;
  border-radius: 7px;
  box-shadow: 0 8px 22px rgba(17,17,17,.16);
}
.selection-toolbar .selection-count { padding-inline: 7px; }

/* Menu contextuel natif à l'application. */
.app-context-menu {
  position: fixed;
  z-index: 10000;
  width: min(286px, calc(100vw - 16px));
  max-height: min(70vh, 620px);
  overflow-y: auto;
  padding: 5px;
  border: 1px solid rgba(17,17,17,.28);
  border-radius: 10px;
  background: rgba(251,250,246,.985);
  box-shadow: 0 18px 48px rgba(17,17,17,.22), 0 2px 8px rgba(17,17,17,.09);
  backdrop-filter: blur(12px);
}
.context-menu-item {
  width: 100%;
  min-height: 35px;
  display: grid;
  grid-template-columns: 24px minmax(0,1fr) auto;
  align-items: center;
  gap: 7px;
  border: 0;
  border-radius: 6px;
  padding: 6px 9px 6px 7px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  font-family: var(--ui-font);
  font-size: 11px;
}
.context-menu-item:hover { background: var(--ink); color: #fff; }
.context-menu-item.danger { color: #b81916; }
.context-menu-item.danger:hover { background: #b81916; color: #fff; }
.context-menu-item:disabled { opacity: .38; cursor: default; }
.context-menu-item:disabled:hover { background: transparent; color: inherit; }
.context-menu-icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  color: currentColor;
  font-family: var(--condensed-font);
  font-size: 13px;
  font-weight: 850;
}
.context-menu-item kbd {
  border: 0;
  background: transparent;
  color: #918c84;
  font-family: var(--ui-font);
  font-size: 8px;
}
.context-menu-item:hover kbd { color: rgba(255,255,255,.68); }
.context-menu-separator { height: 1px; margin: 4px 7px; background: rgba(17,17,17,.13); }

/* Arborescence : chevrons à chaque niveau, toujours indépendants du chemin actif. */
.tree-expander {
  display: grid;
  place-items: center;
  border-radius: 4px;
  font-size: 11px;
  transition: background .12s ease, color .12s ease;
}
.tree-expander:not(.empty):hover { background: rgba(17,17,17,.08); color: var(--ink); }

/* Dossiers : symbole massif, aucun cadre de carte, aucun trait oblique. */
.canvas-folder-config { display: none !important; }
.canvas-folder-icon {
  width: 88px;
  height: 88px;
  border-radius: 21px !important;
  background: var(--canvas-folder-color) !important;
  color: #fff;
  filter: drop-shadow(0 10px 14px rgba(17,17,17,.17));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.23) !important;
}
.canvas-folder-icon::before,
.canvas-folder-icon::after { display: none !important; }
.canvas-folder-icon svg {
  width: 59px;
  height: 59px;
  stroke-width: 2.55;
  filter: drop-shadow(0 1px 0 rgba(0,0,0,.12));
}
.canvas-folder-card:hover .canvas-folder-icon {
  transform: translateY(-4px) scale(1.045);
  filter: drop-shadow(0 16px 19px rgba(17,17,17,.21));
}
.canvas-folder-title {
  margin-top: 5px;
  font-size: 13px;
  font-weight: 950;
  letter-spacing: .145em;
}
.canvas-folder-meta { margin-top: 3px; font-size: 7px; letter-spacing: .12em; }

/* Volet article : titre, commande d'export, paramètres, texte, marge statistique. */
.article-pane-header { grid-template-columns: auto minmax(0,1fr) auto 38px; }
.article-pane-export {
  height: 30px;
  border: 1px solid rgba(255,255,255,.38);
  border-radius: 4px;
  padding: 0 10px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font-family: var(--condensed-font);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .09em;
}
.article-pane-export:hover { border-color: #fff; background: #fff; color: #111; }
.article-pane-content > .article-body {
  display: grid;
  grid-template-rows: auto auto minmax(0,1fr) auto;
}
.article-settings {
  border-bottom: 1px solid rgba(17,17,17,.16);
  background: #fbfaf6;
}
.article-settings-top {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  padding: 6px 14px;
}
.article-format-field,
.article-chapo-field,
.article-review-fields label {
  font-family: var(--condensed-font);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .11em;
  color: #77736d;
}
.article-format-field { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.article-format-field select {
  height: 29px;
  border: 1px solid rgba(17,17,17,.26);
  border-radius: 4px;
  padding: 0 27px 0 8px;
  background: #fff;
  color: #111;
  font-family: var(--condensed-font);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .06em;
}
.article-chapo-field {
  display: grid;
  grid-template-columns: 54px minmax(0,1fr);
  align-items: start;
  gap: 8px;
  padding: 9px 14px 11px;
  border-top: 1px solid rgba(17,17,17,.09);
  background: #f3efe5;
}
.article-chapo-field > span { padding-top: 5px; color: #504c46; }
.article-chapo-editor {
  min-height: 46px;
  max-height: 112px;
  overflow-y: auto;
  outline: 0;
  padding: 3px 5px;
  color: #26231f;
  font-family: var(--editorial-font);
  font-size: 13px;
  font-weight: 520;
  letter-spacing: 0;
  line-height: 1.48;
  text-transform: none;
}
.article-chapo-editor:empty::before { content: attr(data-placeholder); color: #9b958c; }
.article-chapo-editor:focus { background: rgba(255,255,255,.58); box-shadow: inset 2px 0 0 var(--accent); }
.article-review-fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 7px;
  padding: 9px 14px 12px;
  border-top: 1px solid rgba(17,17,17,.11);
  background: #ece8df;
}
.article-review-fields label { display: grid; gap: 4px; }
.article-review-fields input {
  min-width: 0;
  height: 30px;
  border: 0;
  border-bottom: 1px solid #8f8980;
  outline: 0;
  padding: 4px 2px;
  background: transparent;
  color: #111;
  font-family: var(--editorial-font);
  font-size: 11px;
  letter-spacing: 0;
}
.article-review-fields input:focus { border-bottom-color: var(--accent); background: rgba(255,255,255,.55); }
.article-statusbar {
  min-height: 31px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  border-top: 1px solid rgba(17,17,17,.18);
  padding: 0 12px;
  background: #f7f5ef;
  color: #77736d;
  font-family: var(--condensed-font);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: .075em;
  text-transform: uppercase;
}
.article-statusbar span { padding: 0 9px; line-height: 16px; }
.article-statusbar span + span { border-left: 1px solid rgba(17,17,17,.17); }
.article-editor blockquote.oblique-citation {
  margin: 2em 4%;
  padding: 1.1em 1.5em;
  border: 0;
  border-top: 1px solid #111;
  border-bottom: 1px solid #111;
  color: #111;
  text-align: center;
  font-size: 1.18em;
  line-height: 1.45;
}
.article-editor blockquote.oblique-citation p:last-of-type { margin-bottom: 0; }
.article-editor blockquote.oblique-citation cite {
  display: block;
  margin-top: .9em;
  color: #77736d;
  font-family: var(--condensed-font);
  font-size: .58em;
  font-style: normal;
  font-weight: 850;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.article-editor figure.oblique-article-image { margin: 1.8em 0; }
.article-editor figure.oblique-article-image img { display: block; max-width: 100%; height: auto; border-radius: 8px; }
.article-editor figure.oblique-article-image figcaption {
  min-height: 1.4em;
  padding: 6px 2px 0;
  color: #77736d;
  font-family: var(--ui-font);
  font-size: 10px;
  text-align: center;
}
.article-editor figure.oblique-article-image figcaption:empty::before { content: "Ajouter une légende…"; color: #aaa49b; }
.article-card-meta { line-height: 1.45; }

#quote-dialog {
  width: min(520px, calc(100vw - 32px));
  border: 1px solid var(--ink);
  border-radius: 9px;
  padding: 0;
  background: var(--paper);
  box-shadow: 0 24px 70px rgba(17,17,17,.28);
}
#quote-dialog::backdrop { background: rgba(17,17,17,.54); backdrop-filter: blur(2px); }
#quote-dialog form { padding: 20px 22px 22px; }
.optional-field { color: #aaa49b; font-size: .85em; font-weight: 600; letter-spacing: 0; text-transform: none; }

@media (max-width: 980px) {
  .article-review-fields { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .article-pane-export { padding-inline: 7px; font-size: 8px; }
}

/* ──────────────────────────────────────────────────────────────
   Planche Oblique 0.9 — image liée, statut éditorial, validations
   ────────────────────────────────────────────────────────────── */
.article-settings-top {
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 10px 18px;
}
.article-visibility-field {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.article-visibility-field legend {
  float: left;
  margin: 0 8px 0 0;
  padding: 0;
  color: #77736d;
  font-family: var(--condensed-font);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .11em;
}
.article-segmented-control {
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(17,17,17,.27);
  border-radius: 4px;
  background: #fff;
}
.article-segmented-control label { cursor: pointer; }
.article-segmented-control input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.article-segmented-control span {
  min-width: 58px;
  height: 28px;
  display: grid;
  place-items: center;
  padding: 0 8px;
  color: #77736d;
  font-family: var(--condensed-font);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .08em;
  transition: background .12s ease, color .12s ease;
}
.article-segmented-control label + label span { border-left: 1px solid rgba(17,17,17,.18); }
.article-segmented-control input:checked + span { background: #111; color: #fff; }
.article-segmented-control input:focus-visible + span { box-shadow: inset 0 0 0 2px var(--accent); }

.article-validators-field {
  display: grid;
  grid-template-columns: 90px minmax(0,1fr);
  align-items: center;
  gap: 9px;
  min-height: 43px;
  padding: 7px 14px;
  border-top: 1px solid rgba(17,17,17,.1);
  background: #f7f4ed;
}
.article-validators-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 7px;
  color: #56514b;
  font-family: var(--condensed-font);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .1em;
}
.article-validators-head span { color: #8a857e; }
.article-validators-body {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
}
.article-validator-chips {
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}
.article-validator-chip {
  height: 27px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 190px;
  padding: 0 3px 0 9px;
  border: 1px solid rgba(17,17,17,.27);
  border-radius: 999px;
  background: #fff;
  color: #27231f;
  font-family: var(--editorial-font);
  font-size: 10px;
}
.article-validator-chip > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.article-validator-chip button {
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #77736d;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
}
.article-validator-chip button:hover { background: #111; color: #fff; }
.article-validator-entry {
  min-width: 155px;
  flex: 1 1 220px;
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 5px;
}
.article-validator-entry input {
  min-width: 0;
  height: 28px;
  border: 0;
  border-bottom: 1px solid rgba(17,17,17,.35);
  outline: 0;
  padding: 3px 4px;
  background: rgba(255,255,255,.72);
  color: #111;
  font-family: var(--editorial-font);
  font-size: 10px;
}
.article-validator-entry input:focus { border-bottom-color: var(--accent); }
.article-validator-entry button {
  height: 28px;
  border: 1px solid rgba(17,17,17,.28);
  border-radius: 3px;
  padding: 0 8px;
  background: #fff;
  color: #111;
  cursor: pointer;
  font-family: var(--condensed-font);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .08em;
}
.article-validator-entry button:hover:not(:disabled) { background: #111; color: #fff; }
.article-validator-entry input:disabled,
.article-validator-entry button:disabled { opacity: .48; cursor: not-allowed; }

.article-featured-panel {
  border-top: 1px solid rgba(17,17,17,.12);
  background: #fff;
}
.article-section-toggle {
  width: 100%;
  min-height: 35px;
  display: grid;
  grid-template-columns: 18px auto minmax(0,1fr);
  align-items: center;
  gap: 7px;
  border: 0;
  padding: 0 14px;
  background: #ede9e0;
  color: #111;
  cursor: pointer;
  text-align: left;
}
.article-section-toggle strong {
  font-family: var(--condensed-font);
  font-size: 8px;
  font-weight: 950;
  letter-spacing: .11em;
}
.article-section-summary {
  overflow: hidden;
  color: #817c75;
  font-family: var(--editorial-font);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.article-section-chevron {
  display: inline-block;
  color: #5f5a54;
  font-size: 15px;
  transform: rotate(-90deg);
  transition: transform .15s ease;
}
.article-featured-panel.open .article-section-chevron { transform: rotate(0deg); }
.article-featured-content { display: none; padding: 9px 14px 11px; }
.article-featured-panel.open .article-featured-content { display: block; }
.article-featured-dropzone {
  min-height: 82px;
  border: 1px dashed rgba(17,17,17,.34);
  border-radius: 7px;
  background: #fbfaf6;
  transition: border-color .12s ease, background .12s ease;
}
.article-featured-dropzone.drag-over { border-color: var(--accent); background: #fff2ef; }
.article-featured-empty {
  width: 100%;
  min-height: 82px;
  display: grid;
  grid-template-columns: 30px auto 1fr;
  align-items: center;
  gap: 8px;
  border: 0;
  padding: 10px 13px;
  background: transparent;
  color: #111;
  cursor: pointer;
  text-align: left;
}
.article-featured-empty strong {
  font-family: var(--condensed-font);
  font-size: 9px;
  font-weight: 950;
  letter-spacing: .09em;
}
.article-featured-empty small { color: #8a857e; font-family: var(--editorial-font); font-size: 10px; }
.article-featured-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #111;
  color: #fff;
  font-size: 18px;
  font-weight: 300;
}
.article-featured-dropzone.has-image {
  display: grid;
  grid-template-columns: minmax(130px, 27%) minmax(0,1fr);
  gap: 11px;
  padding: 8px;
  border-style: solid;
}
.article-featured-dropzone > img {
  width: 100%;
  height: 110px;
  display: block;
  object-fit: cover;
  border-radius: 5px;
  background: #e7e3db;
}
.article-featured-fields {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  align-content: start;
  gap: 6px 9px;
}
.article-featured-filename {
  grid-column: 1 / -1;
  overflow: hidden;
  color: #3a3530;
  font-family: var(--condensed-font);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .06em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.article-featured-fields label {
  min-width: 0;
  display: grid;
  gap: 3px;
  color: #77736d;
  font-family: var(--condensed-font);
  font-size: 7px;
  font-weight: 900;
  letter-spacing: .09em;
}
.article-featured-fields input {
  min-width: 0;
  height: 27px;
  border: 0;
  border-bottom: 1px solid rgba(17,17,17,.32);
  outline: 0;
  padding: 3px 2px;
  background: transparent;
  color: #111;
  font-family: var(--editorial-font);
  font-size: 10px;
}
.article-featured-fields input:focus { border-bottom-color: var(--accent); }
.article-featured-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 5px;
}
.article-featured-actions button {
  height: 25px;
  border: 1px solid rgba(17,17,17,.3);
  border-radius: 3px;
  padding: 0 8px;
  background: #fff;
  cursor: pointer;
  font-family: var(--condensed-font);
  font-size: 7px;
  font-weight: 900;
  letter-spacing: .08em;
}
.article-featured-actions button:hover { background: #111; color: #fff; }

.article-comments-header {
  grid-template-columns: minmax(0,1fr) 22px 25px;
  gap: 5px;
  padding: 7px 7px 7px 11px;
}
.article-comments-collapse {
  width: 25px;
  height: 25px;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 3px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}
.article-comments-collapse:hover { background: #fff; color: #111; }
.article-comments-header > span { min-width: 20px; height: 20px; }

@media (max-width: 1120px) {
  .article-validators-field { grid-template-columns: 1fr; gap: 5px; }
  .article-validators-head { justify-content: flex-start; }
  .article-featured-dropzone.has-image { grid-template-columns: 120px minmax(0,1fr); }
}
@media (max-width: 760px) {
  .article-featured-dropzone.has-image { grid-template-columns: 1fr; }
  .article-featured-dropzone > img { height: 150px; }
  .article-featured-fields { grid-template-columns: 1fr; }
  .article-featured-actions,
  .article-featured-filename { grid-column: 1; }
  .article-featured-empty { grid-template-columns: 30px 1fr; }
  .article-featured-empty small { grid-column: 2; }
}
.article-comments-header { display: grid; align-items: center; }

/* ──────────────────────────────────────────────────────────────
   Planche Oblique 1.1 — édition avancée, comptes et bibliothèque publique,
   édition contextuelle et navigation à la molette
   ────────────────────────────────────────────────────────────── */

/* Les poignées apparaissent comme des affordances discrètes, sans barre de titre. */
.connect-handle {
  position: absolute;
  top: -6px;
  right: -6px;
  z-index: 12;
  width: 13px;
  height: 13px;
  display: block;
  border: 1.5px solid rgba(17,17,17,.72);
  border-radius: 50%;
  padding: 0;
  background: #fff;
  box-shadow: 0 1px 4px rgba(17,17,17,.18);
  cursor: crosshair;
  opacity: 0;
  transform: scale(.82);
  transition: opacity .11s ease, transform .11s ease, background .11s ease;
}
.board-item:hover .connect-handle,
.board-item.selected .connect-handle,
.board-item.connecting .connect-handle { opacity: 1; transform: scale(1); }
.connect-handle:hover,
.board-item.connecting .connect-handle { background: #111; border-color: #111; }

.resize-handle {
  position: absolute;
  right: 1px;
  bottom: 1px;
  z-index: 11;
  width: 19px;
  height: 19px;
  border: 0;
  border-radius: 0 0 max(0px, calc(var(--card-radius, 0px) - 2px)) 0;
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cg fill='none' stroke='%23494b4d' stroke-width='1.15' stroke-linecap='round'%3E%3Cpath d='M14 5 5 14'/%3E%3Cpath d='M14 9 9 14'/%3E%3Cpath d='M14 13 13 14'/%3E%3C/g%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 16px 16px;
  cursor: nwse-resize;
  opacity: .42;
}
.resize-handle::after { display: none !important; }
.board-item:hover .resize-handle,
.board-item.selected .resize-handle { opacity: .92; }

.connection-preview {
  fill: none;
  stroke: rgba(17,17,17,.72);
  stroke-width: 1.8;
  stroke-dasharray: 5 4;
  pointer-events: none;
  marker-end: url(#arrowhead);
}
.board-item.connection-target {
  outline: 2px solid rgba(17,17,17,.75) !important;
  outline-offset: 4px !important;
}
body.connection-dragging,
body.connection-dragging * { cursor: crosshair !important; }

/* Déplacement dans l’arborescence. */
.tree-row.tree-draggable { cursor: grab; }
.tree-row.tree-draggable:active { cursor: grabbing; }
.tree-row.tree-dragging { opacity: .42; }
.tree-row.tree-drop-target {
  background: #111 !important;
  color: #fff !important;
  box-shadow: inset 3px 0 0 var(--accent);
}
.tree-row.tree-drop-target .tree-node-kind,
.tree-row.tree-drop-target .tree-expander { color: rgba(255,255,255,.72); }
.tree-row.tree-drop-target .tree-node-icon { color: #fff; }
.tree-row.tree-drop-target .folder-mark { background: var(--node-color); }

/* Le menu de l’éditeur reste suffisamment compact pour les choix de surlignage. */
.context-menu-item .context-menu-icon { transition: transform .1s ease; }
.context-menu-item:hover .context-menu-icon { transform: scale(1.08); }

/* La molette déplace le tableau; Ctrl + molette zoome. */
.viewport { overscroll-behavior: contain; }

/* ──────────────────────────────────────────────────────────────
   Planche Oblique 1.1 — édition avancée, comptes et bibliothèque
   ────────────────────────────────────────────────────────────── */
:root { --article-pane-width: 50%; }

.topbar {
  grid-template-columns: 24px auto auto minmax(180px, 1fr) auto auto !important;
}
.public-library-button {
  height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-self: center;
  padding: 0 13px;
  border: 1px solid rgba(17,17,17,.2);
  border-radius: 4px;
  background: rgba(255,255,255,.7);
  color: #111;
  font-family: var(--condensed-font);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .13em;
  cursor: pointer;
}
.public-library-button:hover { background: #111; color: #fff; border-color: #111; }
.public-library-button-mark { color: var(--accent); font-size: 15px; line-height: 1; }
.public-library-button:hover .public-library-button-mark { color: #fff; }
.account-button {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(17,17,17,.22);
  border-radius: 50%;
  background: #111;
  color: #fff;
  font-family: var(--condensed-font);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .04em;
  cursor: pointer;
}
.account-button:hover { background: var(--accent); border-color: var(--accent); }

.canvas-shell.article-pane-open {
  grid-template-columns: 68px minmax(280px, 1fr) var(--article-pane-width, 50%) !important;
}
.canvas-shell.article-pane-maximized {
  grid-template-columns: 0 0 minmax(0, 1fr) !important;
}
.canvas-shell.article-pane-maximized > .tool-rail,
.canvas-shell.article-pane-maximized > .viewport { visibility: hidden; overflow: hidden; }
.article-pane { position: relative; }
.article-pane-resizer {
  position: absolute;
  z-index: 15;
  top: 0;
  bottom: 0;
  left: -5px;
  width: 10px;
  cursor: col-resize;
  touch-action: none;
}
.article-pane-resizer::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 4px;
  width: 1px;
  background: rgba(17,17,17,.22);
  transition: width .12s ease, left .12s ease, background .12s ease;
}
.article-pane-resizer:hover::after,
.article-pane-resizing .article-pane-resizer::after { left: 3px; width: 3px; background: var(--accent); }
.article-pane-resizing, .article-pane-resizing * { cursor: col-resize !important; user-select: none !important; }
.article-pane-header {
  grid-template-columns: auto minmax(0,1fr) auto 38px 38px !important;
}
.article-pane-window-button {
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  color: white;
  font-size: 18px;
  cursor: pointer;
}
.article-pane-window-button:hover { background: #2c2c2c; }

.article-settings-top {
  grid-template-columns: minmax(150px,.85fr) minmax(180px,1fr) auto !important;
  align-items: end;
}
.article-author-field,
.article-taxonomy-field label {
  display: grid;
  gap: 5px;
  min-width: 0;
}
.article-author-field > span,
.article-taxonomy-field label > span {
  color: #77726a;
  font-family: var(--condensed-font);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .13em;
}
.article-author-field input,
.article-taxonomy-field input {
  min-width: 0;
  width: 100%;
  height: 32px;
  border: 1px solid rgba(17,17,17,.18);
  border-radius: 4px;
  padding: 0 9px;
  background: white;
  color: #111;
  font-family: var(--ui-font);
  font-size: 11px;
  outline: 0;
}
.article-author-field input:focus,
.article-taxonomy-field input:focus { border-color: #111; box-shadow: 0 0 0 1px #111; }
.article-taxonomy-field {
  display: grid;
  grid-template-columns: minmax(160px,.7fr) minmax(240px,1.3fr);
  gap: 10px;
  padding: 10px 13px;
  border-top: 1px solid rgba(17,17,17,.1);
  background: #f8f7f3;
}
.article-toolbar-select {
  height: 27px;
  max-width: 118px;
  border: 1px solid rgba(17,17,17,.18);
  border-radius: 4px;
  padding: 0 23px 0 7px;
  background: white;
  color: #292724;
  font-family: var(--ui-font);
  font-size: 10px;
  cursor: pointer;
}
.font-size-select { width: 58px; }
.text-align-select { width: 104px; }
.article-toolbar-separator { width: 1px; height: 22px; margin: 0 2px; background: rgba(17,17,17,.15); }
.article-editor { text-align: justify; }
.article-editor figure.oblique-article-image,
.article-editor figure.wp-block-image,
.article-editor blockquote {
  position: relative;
  cursor: grab;
}
.article-editor figure.oblique-article-image:active,
.article-editor figure.wp-block-image:active,
.article-editor blockquote:active { cursor: grabbing; }
.article-editor figure.oblique-article-image img,
.article-editor figure.wp-block-image img { width: 100%; height: auto; display: block; }
.article-editor .article-block-dragging { opacity: .42; }
.article-editor .article-block-drop-before { box-shadow: 0 -3px 0 var(--accent); }
.article-editor .article-block-drop-after { box-shadow: 0 3px 0 var(--accent); }

.public-library {
  position: fixed;
  z-index: 150;
  inset: var(--topbar-height) 0 0;
  display: grid;
  grid-template-rows: auto minmax(0,1fr);
  background: #fbfaf6;
  color: #111;
}
.public-library.hidden { display: none; }
.public-library-header {
  min-height: 92px;
  display: grid;
  grid-template-columns: minmax(240px,1fr) minmax(280px,520px) 42px;
  align-items: center;
  gap: 22px;
  padding: 16px 24px 14px 30px;
  border-bottom: 1px solid rgba(17,17,17,.22);
  background: #fff;
}
.public-library-kicker { color: var(--accent); font-family: var(--condensed-font); font-size: 8px; font-weight: 900; letter-spacing: .18em; }
.public-library-header h1 { margin: 2px 0 0; font-family: var(--condensed-font); font-size: 28px; letter-spacing: .045em; }
.public-library-search {
  height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(17,17,17,.22);
  border-radius: 4px;
  padding: 0 10px;
  background: #fbfaf6;
}
.public-library-search input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; font: 12px var(--ui-font); }
.public-library-close { width: 38px; height: 38px; border: 0; background: transparent; font-size: 25px; cursor: pointer; }
.public-library-close:hover { background: #111; color: white; }
.public-library-layout { min-height: 0; display: grid; grid-template-columns: minmax(0,1fr) 280px; }
.public-library-list {
  min-height: 0;
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px,1fr));
  align-content: start;
  gap: 18px;
  padding: 24px 28px 42px;
}
.public-library-filters {
  min-height: 0;
  overflow: auto;
  padding: 24px 20px;
  border-left: 1px solid rgba(17,17,17,.18);
  background: #f1eee6;
}
.public-library-filters section + section { margin-top: 28px; }
.public-library-filters h2 { margin: 0 0 11px; font-family: var(--condensed-font); font-size: 10px; letter-spacing: .16em; }
.public-filter-list, .public-keyword-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.public-filter-list button, .public-keyword-cloud button {
  border: 1px solid rgba(17,17,17,.18);
  border-radius: 999px;
  padding: 6px 9px;
  background: white;
  color: #393632;
  font: 9px var(--ui-font);
  cursor: pointer;
}
.public-filter-list button.active, .public-keyword-cloud button.active { border-color: #111; background: #111; color: white; }
.public-article-card {
  min-width: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: 178px minmax(0,1fr);
  border: 1px solid rgba(17,17,17,.18);
  border-radius: 9px;
  padding: 0;
  background: white;
  color: #111;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 7px 20px rgba(17,17,17,.055);
  transition: transform .14s ease, box-shadow .14s ease;
}
.public-article-card:hover { transform: translateY(-3px); box-shadow: 0 13px 30px rgba(17,17,17,.1); }
.public-article-card > img { width: 100%; height: 178px; object-fit: cover; }
.public-article-placeholder { display: grid; place-items: center; background: #17243a; color: white; font-family: var(--condensed-font); font-size: 24px; font-weight: 900; letter-spacing: .13em; }
.public-article-card-copy { display: flex; flex-direction: column; gap: 8px; padding: 16px 17px 15px; }
.public-article-card-copy > span { color: var(--accent); font-family: var(--condensed-font); font-size: 8px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.public-article-card-copy h2 { margin: 0; font-family: var(--editorial-font); font-size: 20px; line-height: 1.14; }
.public-article-card-copy p { margin: 0; color: #5a5650; font-family: var(--editorial-font); font-size: 12px; line-height: 1.5; }
.public-article-card-copy footer { margin-top: auto; display: grid; gap: 4px; padding-top: 10px; border-top: 1px solid rgba(17,17,17,.1); }
.public-article-card-copy footer b { font-family: var(--condensed-font); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.public-article-card-copy footer small { color: #878178; font-size: 9px; }
.public-library-empty { grid-column: 1/-1; min-height: 280px; display: grid; place-content: center; gap: 6px; text-align: center; color: #7a756d; }
.public-library-empty strong { color: #111; font-family: var(--condensed-font); letter-spacing: .14em; }

.auth-overlay {
  position: fixed;
  z-index: 500;
  inset: 0;
  display: grid;
  place-items: center;
  background: #111;
}
.auth-overlay.hidden { display: none; }
.auth-card {
  width: min(430px, calc(100vw - 36px));
  display: grid;
  gap: 13px;
  padding: 34px 38px 38px;
  border-top: 4px solid var(--accent);
  background: #fbfaf6;
  box-shadow: 0 28px 80px rgba(0,0,0,.42);
}
.auth-wordmark { font-family: var(--editorial-font); font-size: 38px; font-style: italic; font-weight: 900; letter-spacing: -.07em; }
.auth-slash { width: 34px; height: 5px; transform: rotate(-48deg); background: var(--accent); }
.auth-card p { margin: 5px 0 6px; color: #5e5953; font: 13px/1.5 var(--ui-font); }
.auth-card label { display: grid; gap: 5px; color: #5e5953; font-family: var(--condensed-font); font-size: 8px; font-weight: 900; letter-spacing: .13em; }
.auth-card input { height: 39px; border: 1px solid rgba(17,17,17,.25); border-radius: 3px; padding: 0 10px; background: white; font: 13px var(--ui-font); outline: 0; }
.auth-card input:focus { border-color: #111; box-shadow: 0 0 0 1px #111; }
.auth-card > button { height: 42px; margin-top: 4px; border: 0; background: var(--accent); color: white; font-family: var(--condensed-font); font-size: 10px; font-weight: 900; letter-spacing: .13em; cursor: pointer; }
.auth-card > button:hover { background: #111; }
.auth-error { min-height: 18px; color: #a01818; font: 11px/1.4 var(--ui-font); }

.account-dialog { width: min(760px, calc(100vw - 36px)); }
.current-account-summary { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid rgba(17,17,17,.13); background: #f5f2eb; }
.current-account-summary > div { display: grid; gap: 3px; }
.current-account-summary strong { font: 800 13px var(--ui-font); }
.current-account-summary span:not(.account-avatar) { color: #77716a; font: 10px var(--ui-font); }
.account-avatar { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: #111; color: white; font: 900 11px var(--condensed-font); }
.account-avatar.small { width: 30px; height: 30px; font-size: 8px; }
.account-list { display: grid; gap: 6px; margin: 7px 0 14px; }
.account-list-row { display: grid; grid-template-columns: auto minmax(0,1fr) auto auto; align-items: center; gap: 10px; padding: 8px 9px; border: 1px solid rgba(17,17,17,.12); }
.account-list-row > div { display: grid; gap: 2px; }
.account-list-row strong { font: 700 11px var(--ui-font); }
.account-list-row span { color: #77716a; font: 9px var(--ui-font); }
.account-list-row b { font: 900 8px var(--condensed-font); letter-spacing: .1em; }
.account-list-row > button { width: 27px; height: 27px; border: 0; background: transparent; cursor: pointer; }
.account-list-row > button:hover { background: #a01818; color: white; }
.account-create-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.account-create-grid label { display: grid; gap: 4px; color: #77716a; font: 900 8px var(--condensed-font); letter-spacing: .1em; }
.account-create-grid .dialog-primary { grid-column: 1/-1; justify-self: end; }

.public-reader-dialog { width: min(900px, calc(100vw - 34px)); height: min(900px, calc(100vh - 34px)); max-width: none; max-height: none; padding: 0; border: 0; }
.public-reader-dialog form { height: 100%; display: grid; grid-template-rows: auto auto minmax(0,1fr); }
.public-reader-header { display: grid; grid-template-columns: minmax(0,1fr) 40px; padding: 24px 28px 18px; border-top: 5px solid var(--accent); border-bottom: 1px solid rgba(17,17,17,.15); }
.public-reader-header span { color: var(--accent); font: 900 8px var(--condensed-font); letter-spacing: .14em; }
.public-reader-header h2 { margin: 5px 0; font: 800 34px/1.1 var(--editorial-font); }
.public-reader-header p { margin: 0; color: #68635c; font: 11px var(--ui-font); }
.public-reader-chapo { padding: 19px 8%; background: #f3efe5; font: 17px/1.5 var(--editorial-font); }
.public-reader-chapo:empty { display: none; }
.public-reader-body { overflow: auto; padding: 38px 8% 60px; text-align: justify; font: 17px/1.7 var(--editorial-font); }
.public-reader-body img { max-width: 100%; height: auto; }
.public-reader-body blockquote { margin: 1.4em 0; padding-left: 1.2em; border-left: 4px solid var(--accent); }

body[data-account-role="reader"] .public-library-close { display: none; }
body[data-account-role="reader"] .topbar-tree-toggle,
body[data-account-role="reader"] .brand-path-slash,
body[data-account-role="reader"] .path-navigation,
body[data-account-role="reader"] #undo-button,
body[data-account-role="reader"] #redo-button,
body[data-account-role="reader"] .menu-wrap { display: none !important; }
body[data-account-role="reader"] .topbar { grid-template-columns: auto minmax(0,1fr) auto !important; }
body[data-account-role="reader"] .oblique-wordmark { grid-column: 1; }
body[data-account-role="reader"] .public-library-button { grid-column: 2; }
body[data-account-role="reader"] .top-actions { grid-column: 3; }

@media (max-width: 1050px) {
  .public-library-button span:last-child { display: none; }
  .public-library-button { width: 36px; padding: 0; }
  .article-settings-top { grid-template-columns: 1fr 1fr !important; }
  .article-visibility-field { grid-column: 1/-1; }
  .public-library-layout { grid-template-columns: minmax(0,1fr) 230px; }
}
@media (max-width: 760px) {
  .topbar { grid-template-columns: 24px auto minmax(0,1fr) auto auto !important; }
  .brand-path-slash { display: none; }
  .public-library-layout { grid-template-columns: 1fr; }
  .public-library-filters { display: none; }
  .public-library-header { grid-template-columns: minmax(0,1fr) 40px; }
  .public-library-search { grid-column: 1/-1; grid-row: 2; }
  .article-taxonomy-field, .account-create-grid { grid-template-columns: 1fr; }
}


/* Planche Oblique 1.2 — aperçu éditorial des cartes Article */
.article-item { min-height: 500px; }
.article-card-header { display:flex; align-items:center; gap:12px; }
.article-card-title { min-width:0; flex:1; }
.article-card-section {
  max-width:38%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
  color:#bbb6ae; font-family:var(--condensed-font); font-size:8px; font-weight:900;
  letter-spacing:.13em; text-transform:uppercase;
}
.article-card-body {
  height:calc(100% - 38px); display:grid; grid-template-rows:minmax(0,1fr);
  gap:0; padding:0; overflow:hidden;
}
.article-card-body.has-featured-image { grid-template-rows:auto minmax(0,1fr); }
.article-card-featured { width:100%; aspect-ratio:16/9; overflow:hidden; background:#ece9e2; }
.article-card-featured img { display:block; width:100%; height:100%; object-fit:cover; }
.article-card-copy {
  min-height:0; display:grid; grid-template-rows:minmax(0,1fr) auto auto;
  padding:15px 18px 11px; overflow:hidden;
}
.article-card-excerpt { min-height:0; overflow:hidden; }
.article-card-meta { margin-top:10px; padding-top:9px; border-top:1px solid rgba(17,17,17,.12); }
.article-card-keywords {
  min-width:0; display:flex; align-items:center; gap:6px; overflow:hidden;
  margin-top:7px; padding-top:7px; border-top:1px solid rgba(17,17,17,.08);
  color:#5e5952; font-family:var(--condensed-font); font-size:8px; font-weight:800;
  letter-spacing:.075em; text-transform:uppercase; white-space:nowrap;
}
.article-card-keywords span { flex:0 0 auto; max-width:150px; overflow:hidden; text-overflow:ellipsis; }
.article-card-keywords span::before { content:"#"; color:var(--accent); margin-right:1px; }
.article-pane-section {
  max-width:min(220px,24vw); overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
  color:#bdb8b0; font-family:var(--condensed-font); font-size:8px; font-weight:900;
  letter-spacing:.14em; text-transform:uppercase;
}
.article-pane-header { grid-template-columns:auto minmax(0,1fr) auto auto 38px 38px !important; }
.article-taxonomy-field { border-top:1px solid rgba(17,17,17,.14); border-bottom:1px solid rgba(17,17,17,.08); background:#f5f2eb; }
@media (max-width:980px) {
  .article-pane-section { display:none; }
  .article-pane-header { grid-template-columns:auto minmax(0,1fr) auto 38px 38px !important; }
}

/* Planche Oblique 1.3 — relecture, collaboration et fenêtre éditoriale flottante */
.viewport {
  background-color:#fbfaf6;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Cpath d='M8.5 12h7M12 8.5v7' stroke='%237f7a73' stroke-width='.9' opacity='.58'/%3E%3C/svg%3E");
}
.canvas-shell { position:relative; }
.canvas-shell.article-pane-open { grid-template-columns:68px minmax(0,1fr) !important; }
.article-pane {
  position:absolute !important;
  z-index:52;
  min-width:520px;
  min-height:420px;
  border:1px solid rgba(17,17,17,.22);
  border-radius:17px;
  overflow:hidden;
  box-shadow:0 28px 70px rgba(17,17,17,.22), 0 7px 22px rgba(17,17,17,.12);
  background:#fff;
}
.article-pane-header { cursor:move; user-select:none; }
.article-pane-header input, .article-pane-header button { cursor:auto; }
.article-pane-resizer { left:-5px !important; width:10px !important; }
.canvas-shell.article-pane-maximized .article-pane { inset:8px !important; width:auto !important; height:auto !important; border-radius:12px; }
.canvas-shell.article-pane-maximized > .tool-rail,
.canvas-shell.article-pane-maximized > .viewport { visibility:visible !important; }
.article-pane-moving, .article-pane-moving * { cursor:grabbing !important; user-select:none !important; }

.article-focus-controls {
  display:flex; align-items:center; justify-content:flex-end; gap:5px;
  min-height:31px; padding:4px 10px; border-bottom:1px solid rgba(17,17,17,.1); background:#f4f1ea;
}
.article-focus-controls button {
  border:1px solid rgba(17,17,17,.2); border-radius:999px; background:#fff; color:#6d6861;
  padding:4px 9px; font:800 8px var(--condensed-font); letter-spacing:.1em;
}
.article-focus-controls button.active { background:#111; color:#fff; border-color:#111; }
.article-bar-collapsed { display:none !important; }
.article-author-toolbar-button { display:inline-flex !important; align-items:center; gap:6px; max-width:170px; padding-inline:6px 9px !important; }
.article-author-toolbar-button > span:last-child { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.article-author-avatar, .review-author-dot {
  width:22px; height:22px; border-radius:50%; display:inline-grid; place-items:center; flex:0 0 auto;
  background:#111; color:#fff; font:900 7px var(--ui-font); letter-spacing:.04em;
}
.article-settings-grid { display:grid; grid-template-columns:minmax(0,2fr) minmax(240px,1fr); align-items:start; gap:11px; padding:10px; }
.article-settings-primary { min-width:0; display:grid; gap:9px; }
.article-settings-media { min-width:0; position:sticky; top:0; }
.article-settings-grid .article-settings-top,
.article-settings-grid .article-taxonomy-field,
.article-settings-grid .article-validators-field,
.article-settings-grid .article-chapo-field,
.article-settings-grid .article-review-fields { margin:0; }
.article-settings-grid .article-featured-panel { margin:0; height:100%; }
.article-settings-grid .article-featured-content { padding:8px; }
.article-settings-grid .article-featured-dropzone.has-image { grid-template-columns:1fr; }
.article-settings-grid .article-featured-dropzone > img { height:170px; }
.article-settings-grid .article-featured-fields { grid-template-columns:1fr; }
.article-settings-grid .article-featured-actions,
.article-settings-grid .article-featured-filename { grid-column:1; }
.article-review-permission { display:flex; align-items:flex-start; gap:8px; margin-top:7px; padding-top:7px; border-top:1px solid rgba(17,17,17,.11); cursor:pointer; }
.article-review-permission input { margin-top:2px; }
.article-review-permission span { display:grid; gap:2px; }
.article-review-permission strong { font:900 8px var(--condensed-font); letter-spacing:.09em; }
.article-review-permission small { color:#777169; font:10px/1.25 var(--ui-font); }
.article-author-field select, .article-taxonomy-field select { width:100%; min-height:32px; border:1px solid rgba(17,17,17,.16); border-radius:6px; background:#fff; padding:5px 8px; }
.article-keyword-editor { min-height:38px; display:flex; flex-wrap:wrap; align-items:center; gap:5px; border:1px solid rgba(17,17,17,.16); border-radius:7px; background:#fff; padding:5px; }
.article-keyword-chips { display:flex; flex-wrap:wrap; gap:4px; }
.article-keyword-chip { display:inline-flex; align-items:center; gap:4px; border-radius:999px; background:#111; color:#fff; padding:4px 6px 4px 8px; font:800 9px var(--condensed-font); }
.article-keyword-chip button { border:0; background:transparent; color:#aaa; padding:0; line-height:1; }
.article-keyword-chip button:hover { color:#fff; }
.article-keyword-editor input { flex:1 1 130px; min-width:100px; border:0 !important; outline:0; padding:4px !important; background:transparent !important; }
.workspace-image-drag-source { cursor:grab; }
.workspace-image-drag-source:active { cursor:grabbing; }

.public-reader-dialog { width:min(1180px,calc(100vw - 30px)); height:min(930px,calc(100vh - 30px)); border-radius:16px; overflow:hidden; box-shadow:0 30px 90px rgba(17,17,17,.28); }
.public-review-shell { grid-template-rows:auto auto minmax(0,1fr) auto !important; }
.public-reader-heading { min-width:0; }
.article-author-link { border:0; background:transparent; padding:0; color:#5f5952; font:700 11px var(--ui-font); text-decoration:underline; text-underline-offset:3px; cursor:pointer; }
.public-reader-toolbar { min-height:43px; display:flex; align-items:center; gap:5px; overflow-x:auto; padding:6px 12px; border-bottom:1px solid rgba(17,17,17,.13); background:#f4f1ea; }
.public-review-tool { min-width:31px; height:30px; border:1px solid rgba(17,17,17,.17); border-radius:6px; background:#fff; color:#111; padding:0 8px; font:800 10px var(--ui-font); }
.public-review-tool:hover { border-color:#111; }
.public-review-color { width:24px; min-width:24px; height:24px; padding:0; border-radius:50%; background:var(--review-color); box-shadow:inset 0 0 0 1px rgba(17,17,17,.18); }
.public-review-author-button { display:inline-flex; align-items:center; gap:6px; min-width:max-content; margin-right:5px; }
.public-review-separator { width:1px; height:23px; background:rgba(17,17,17,.16); margin:0 3px; }
.public-review-select { height:30px; border:1px solid rgba(17,17,17,.17); border-radius:6px; background:#fff; padding:0 6px; font:10px var(--ui-font); }
.public-review-mode-badge { margin-left:auto; color:#756f67; font:900 8px var(--condensed-font); letter-spacing:.1em; white-space:nowrap; }
.public-reader-layout { min-height:0; display:grid; grid-template-columns:minmax(0,1fr) minmax(260px,29%); }
.public-reader-main { min-height:0; overflow:auto; }
.public-reader-body { min-height:100%; overflow:visible !important; outline:0; }
.public-reader-body[data-review-mode="restricted"] { cursor:text; }
.public-reader-comments { min-height:0; overflow:auto; border-left:1px solid rgba(17,17,17,.13); background:#f6f3ed; }
.public-reader-comments .article-comments { display:block !important; width:auto; border:0; }
.public-reader-status { min-height:31px; display:flex; align-items:center; gap:12px; padding:5px 14px; border-top:1px solid rgba(17,17,17,.12); color:#6e6860; font:800 8px var(--condensed-font); letter-spacing:.08em; }
.public-reader-status span:first-child { margin-right:auto; color:#111; }

.author-drawer { position:fixed; z-index:110; top:54px; right:0; bottom:0; width:min(350px,92vw); background:#fff; border-left:1px solid rgba(17,17,17,.18); box-shadow:-20px 0 50px rgba(17,17,17,.16); }
.author-drawer header { display:grid; grid-template-columns:minmax(0,1fr) 38px; gap:10px; align-items:start; padding:18px; border-bottom:1px solid rgba(17,17,17,.12); }
.author-drawer header span { color:var(--accent); font:900 8px var(--condensed-font); letter-spacing:.13em; }
.author-drawer header h2 { margin:4px 0 0; font:800 24px/1.08 var(--editorial-font); }
.author-drawer header button { border:0; background:transparent; font-size:24px; }
.author-drawer-list { display:grid; align-content:start; overflow:auto; height:calc(100% - 82px); }
.author-drawer-article { display:grid; gap:4px; text-align:left; border:0; border-bottom:1px solid rgba(17,17,17,.1); background:#fff; padding:14px 18px; }
.author-drawer-article:hover { background:#f5f2eb; }
.author-drawer-article span { color:var(--accent); font:900 8px var(--condensed-font); letter-spacing:.1em; }
.author-drawer-article strong { font:700 15px/1.25 var(--editorial-font); }
.author-drawer-article small { color:#777169; font:8px var(--condensed-font); letter-spacing:.08em; }
.author-drawer-empty { padding:20px; color:#777169; }

.folder-share-dialog { width:min(650px,calc(100vw - 34px)); }
.folder-share-users { display:grid; gap:7px; max-height:50vh; overflow:auto; margin:12px 0; }
.folder-share-row { display:grid; grid-template-columns:22px minmax(0,1fr) 190px; align-items:center; gap:9px; padding:10px; border:1px solid rgba(17,17,17,.13); border-radius:8px; background:#fbfaf6; }
.folder-share-identity { display:grid; gap:2px; }
.folder-share-identity b { font:700 13px var(--ui-font); }
.folder-share-identity small { color:#777169; font:10px var(--ui-font); }
.folder-share-row select { min-height:31px; border:1px solid rgba(17,17,17,.16); border-radius:6px; background:#fff; padding:4px; }
.folder-share-empty { padding:16px; background:#f3efe5; }
.tree-share-badge { max-width:112px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; border-radius:999px; padding:3px 6px; background:#111; color:#fff; font:800 7px var(--condensed-font); letter-spacing:.07em; }

@media (max-width:900px) {
  .article-settings-grid { grid-template-columns:1fr; }
  .article-settings-media { position:static; }
  .public-reader-layout { grid-template-columns:1fr; }
  .public-reader-comments { display:none; }
  .article-pane { min-width:calc(100% - 16px); left:8px !important; width:calc(100% - 16px) !important; }
}
.article-pane:not(.hidden) { resize:both; }
.canvas-shell.article-pane-maximized .article-pane { resize:none; }


/* ──────────────────────────────────────────────────────────────
   PLANChE OBLIQUE 1.4 — éditeur rationalisé, comptes et discussion
   ────────────────────────────────────────────────────────────── */

/* Barre supérieure : chemin, bibliothèque, discussion et actions. */
.topbar {
  grid-template-columns: 28px auto 12px minmax(180px, 1fr) auto auto auto !important;
  gap: 9px !important;
}
.chat-button {
  position: relative;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(17,17,17,.22);
  border-radius: 7px;
  background: #fff;
  padding: 0 10px;
  color: #111;
  font: 900 8px var(--condensed-font, Arial, sans-serif);
  letter-spacing: .1em;
  cursor: pointer;
  white-space: nowrap;
}
.chat-button:hover,
.chat-button[aria-expanded="true"] { border-color: #111; background: #111; color: #fff; }
.chat-button-mark { color: var(--accent); font-size: 12px; }
.chat-unread {
  min-width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  padding: 0 5px;
  font: 900 9px/1 var(--ui-font);
  letter-spacing: 0;
}

/* Éditeur : sections visuelles nettes sans retirer les commandes existantes. */
.article-pane-content > .article-body {
  grid-template-rows: auto auto auto minmax(0,1fr) auto !important;
}
.article-editor-toolbar {
  display: flex !important;
  align-items: stretch;
  gap: 7px;
  min-height: 72px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 7px 10px !important;
  background: #f7f5ef !important;
  border-bottom: 1px solid rgba(17,17,17,.14);
  scrollbar-width: thin;
}
.article-editor-toolbar.article-bar-collapsed {
  min-height: 0 !important;
  max-height: 0 !important;
  padding-block: 0 !important;
  border-bottom: 0 !important;
  overflow: hidden !important;
}
.article-tool-section {
  flex: 0 0 auto;
  min-width: 122px;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 6px;
  padding: 7px 8px 8px;
  border: 1px solid rgba(17,17,17,.12);
  border-radius: 9px;
  background: rgba(255,255,255,.9);
}
.article-tool-section.author-tools { min-width: 150px; }
.article-tool-section.typography-tools { min-width: 290px; }
.article-tool-section.formatting-tools { min-width: 180px; }
.article-tool-section.insertion-tools { min-width: 210px; }
.article-tool-section.review-tools { min-width: 150px; }
.article-tool-section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(17,17,17,.1);
}
.article-tool-section-heading strong {
  color: #111;
  font: 900 8px/1 var(--condensed-font, Arial, sans-serif);
  letter-spacing: .13em;
}
.article-tool-section-heading span {
  color: #918a81;
  font: 9px/1.1 var(--ui-font);
  white-space: nowrap;
}
.article-tool-section-controls {
  display: flex;
  align-items: center;
  align-content: center;
  flex-wrap: wrap;
  gap: 5px;
}
.article-tool-section .article-format-button,
.article-tool-section .article-toolbar-select {
  min-height: 30px;
  border: 1px solid rgba(17,17,17,.16);
  border-radius: 6px;
  background: #fff;
}
.article-tool-section .article-format-button {
  min-width: 31px;
  padding: 0 8px;
  cursor: pointer;
}
.article-tool-section .article-format-button:hover { border-color: #111; background: #111; color: #fff; }
.article-toolbar-select-wrap { display: inline-flex; min-width: 0; }
.article-toolbar-select {
  max-width: 126px;
  padding: 0 24px 0 7px;
  color: #111;
  font: 10px var(--ui-font);
}
.article-toolbar-select-wrap.font-family-select .article-toolbar-select { width: 108px; }
.article-toolbar-select-wrap.font-size-select .article-toolbar-select { width: 74px; }
.article-toolbar-select-wrap.text-align-select .article-toolbar-select { width: 90px; }
.article-author-toolbar-button {
  max-width: 138px;
  display: inline-flex !important;
  align-items: center;
  gap: 7px;
  overflow: hidden;
}
.article-author-toolbar-button > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Métadonnées organisées en quatre sections identifiables. */
.article-settings {
  background: #ece8df !important;
  border-bottom: 1px solid rgba(17,17,17,.16);
}
.article-settings.article-bar-collapsed {
  max-height: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  border-bottom: 0 !important;
  overflow: hidden !important;
}
.article-settings-grid {
  align-items: stretch;
  gap: 9px !important;
  padding: 9px 10px !important;
}
.article-settings-main {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 8px;
  align-content: start;
}
.article-settings-section {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 7px;
  padding: 9px;
  border: 1px solid rgba(17,17,17,.13);
  border-radius: 10px;
  background: rgba(255,255,255,.78);
}
.article-settings-section > header,
.article-settings-section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(17,17,17,.1);
}
.article-settings-section > header strong,
.article-settings-section-title strong {
  font: 900 8px/1 var(--condensed-font, Arial, sans-serif);
  letter-spacing: .14em;
}
.article-settings-section > header span,
.article-settings-section-title span {
  color: #8a847c;
  font: 9px/1.2 var(--ui-font);
}
.article-settings-section-content { display: grid; gap: 8px; min-width: 0; }
.article-settings-section.publication-section .article-settings-section-content,
.article-settings-section.validation-section .article-settings-section-content { grid-template-columns: repeat(2,minmax(0,1fr)); }
.article-settings-section.classification-section,
.article-settings-section.intro-section { grid-column: 1 / -1; }
.article-settings-section.classification-section .article-settings-section-content { grid-template-columns: minmax(150px,.45fr) minmax(260px,1fr); }
.article-settings-section.intro-section .article-settings-section-content { grid-template-columns: 1fr; }
.article-settings-section label > span,
.article-settings-section legend,
.article-field-heading > span {
  color: #4d4944;
  font: 900 7.5px/1 var(--condensed-font, Arial, sans-serif);
  letter-spacing: .11em;
}
.article-settings-section input,
.article-settings-section select,
.article-settings-section textarea {
  border-radius: 7px !important;
}

/* Répertoire collectif des mots-dièses. */
.article-keywords-field { min-width: 0; }
.article-field-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 5px; }
.article-field-heading small { color: #888178; font: 9px/1.2 var(--ui-font); }
.article-keyword-editor {
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.article-keyword-editor.keyword-drop-target {
  border-color: var(--accent) !important;
  background: #fff7f5 !important;
  box-shadow: 0 0 0 2px rgba(254,0,0,.12);
}
.article-keyword-library {
  margin-top: 7px;
  border: 1px solid rgba(17,17,17,.13);
  border-radius: 8px;
  background: #f8f6f1;
  overflow: hidden;
}
.article-keyword-library > summary {
  min-height: 34px;
  display: grid;
  grid-template-columns: auto 22px minmax(0,1fr);
  align-items: center;
  gap: 7px;
  padding: 0 9px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.article-keyword-library > summary::-webkit-details-marker { display: none; }
.article-keyword-library > summary::before {
  content: '›';
  width: 14px;
  font: 16px/1 var(--ui-font);
  transform-origin: center;
  transition: transform .15s ease;
}
.article-keyword-library[open] > summary::before { transform: rotate(90deg); }
.article-keyword-library > summary span {
  grid-column: 2;
  font: 900 7.5px var(--condensed-font, Arial, sans-serif);
  letter-spacing: .11em;
}
.article-keyword-library > summary b {
  grid-column: 3;
  justify-self: start;
  min-width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font: 900 8px var(--ui-font);
}
.article-keyword-library > summary small {
  grid-column: 4;
  justify-self: end;
  color: #898278;
  font: 9px var(--ui-font);
}
.article-keyword-library-list {
  max-height: 176px;
  overflow: auto;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 5px;
  padding: 8px;
  border-top: 1px solid rgba(17,17,17,.1);
  background: #fff;
}
.article-keyword-library-list > p { margin: 4px; color: #827c74; font: 10px var(--ui-font); }
.shared-keyword-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 27px;
  border: 1px solid rgba(17,17,17,.14);
  border-radius: 999px;
  background: #f3efe5;
  padding: 0 7px 0 9px;
  cursor: grab;
}
.shared-keyword-chip:hover { border-color: #111; background: #111; color: #fff; }
.shared-keyword-chip.dragging { opacity: .45; cursor: grabbing; }
.shared-keyword-chip strong { font: 800 9px var(--ui-font); }
.shared-keyword-chip span {
  min-width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(17,17,17,.1);
  font: 800 8px var(--ui-font);
}
.shared-keyword-chip:hover span { background: rgba(255,255,255,.2); }

/* Trois validations nominatives sans doublons. */
.article-validator-selects {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 6px;
}
.article-validator-select-field {
  min-width: 0;
  display: grid;
  gap: 4px;
}
.article-validator-select-field > span {
  color: #756f67;
  font: 900 7px var(--condensed-font, Arial, sans-serif);
  letter-spacing: .1em;
}
.article-validator-select-field select {
  width: 100%;
  min-width: 0;
  min-height: 33px;
  border: 1px solid rgba(17,17,17,.16);
  background: #fff;
  padding: 0 7px;
  font: 10px var(--ui-font);
}
.article-validator-select-field select:focus { outline: 1px solid #111; outline-offset: 1px; }
.article-validator-legacy { grid-column: 1 / -1; color: #827b72; font: 9px/1.35 var(--ui-font); }

/* Authentification en deux écrans horizontaux. */
.auth-overlay {
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(17,17,17,.54) !important;
  backdrop-filter: blur(8px);
}
.auth-card.auth-carousel {
  width: min(470px, calc(100vw - 30px));
  max-width: none;
  display: block;
  overflow: hidden;
  padding: 0 !important;
  border: 0;
  border-radius: 16px;
  background: #fbfaf6;
  box-shadow: 0 30px 90px rgba(0,0,0,.3);
}
.auth-brand-row {
  height: 62px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 24px;
  background: #111;
  color: #fff;
}
.auth-wordmark { font: 900 23px/1 var(--ui-font); letter-spacing: -.07em; }
.auth-slash { color: var(--accent); font: 900 25px/1 var(--ui-font); }
.auth-track {
  width: 200%;
  display: flex;
  transform: translateX(0);
  transition: transform .36s cubic-bezier(.22,.72,.28,1);
}
.auth-card[data-page="register"] .auth-track { transform: translateX(-50%); }
.auth-panel {
  flex: 0 0 50%;
  min-width: 0;
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 25px 25px 20px;
}
.auth-panel-kicker { color: var(--accent); font: 900 8px var(--condensed-font, Arial, sans-serif); letter-spacing: .16em; }
.auth-panel p { min-height: 38px; margin: 0 0 2px; }
.auth-panel > label { display: grid; gap: 5px; }
.auth-panel > label input { width: 100%; }
.auth-panel > button[type="submit"] {
  min-height: 43px;
  border: 0;
  border-radius: 7px;
  background: var(--accent);
  color: #fff;
  font: 900 9px var(--condensed-font, Arial, sans-serif);
  letter-spacing: .12em;
  cursor: pointer;
}
.auth-panel > button[type="submit"]:hover { background: #111; }
.auth-horizontal-next {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 2px;
  border: 0;
  border-top: 1px solid rgba(17,17,17,.13);
  background: transparent;
  padding: 11px 0 0;
  color: #111;
  font: 900 8px var(--condensed-font, Arial, sans-serif);
  letter-spacing: .1em;
  cursor: pointer;
}
.auth-horizontal-next:hover { color: var(--accent); }
.auth-horizontal-next b { font-size: 18px; }
.auth-page-indicator {
  display: flex;
  justify-content: center;
  gap: 7px;
  padding: 0 0 17px;
}
.auth-page-indicator i {
  width: 21px;
  height: 3px;
  border-radius: 999px;
  background: #d6d1c8;
  transition: background .2s ease;
}
.auth-card[data-page="login"] .auth-page-indicator i:first-child,
.auth-card[data-page="register"] .auth-page-indicator i:last-child { background: #111; }
.auth-error { min-height: 16px; color: #a01818; font: 10px/1.35 var(--ui-font); }

/* Discussion rétractable et persistante. */
.chat-drawer {
  position: fixed;
  z-index: 150;
  top: var(--topbar-height, 64px);
  right: 12px;
  bottom: 12px;
  width: min(390px, calc(100vw - 24px));
  display: grid;
  grid-template-rows: auto auto minmax(0,1fr) auto auto;
  overflow: hidden;
  border: 1px solid rgba(17,17,17,.18);
  border-radius: 14px;
  background: #fbfaf6;
  box-shadow: 0 24px 70px rgba(17,17,17,.24);
}
.chat-drawer-header {
  min-height: 65px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  background: #111;
  color: #fff;
}
.chat-drawer-header span { color: var(--accent); font: 900 7px var(--condensed-font, Arial, sans-serif); letter-spacing: .14em; }
.chat-drawer-header h2 { margin: 3px 0 0; font: 800 18px/1 var(--editorial-font); }
.chat-drawer-header button {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 50%;
  background: transparent;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
}
.chat-recipient-row {
  display: grid;
  grid-template-columns: auto minmax(0,1fr);
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border-bottom: 1px solid rgba(17,17,17,.11);
  background: #f1ede4;
}
.chat-recipient-row label { font: 900 7px var(--condensed-font, Arial, sans-serif); letter-spacing: .12em; }
.chat-recipient-row select { min-height: 31px; border: 1px solid rgba(17,17,17,.17); border-radius: 6px; background: #fff; padding: 0 7px; font: 10px var(--ui-font); }
.chat-messages {
  min-height: 0;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 12px;
  background: #f8f6f1;
}
.chat-message {
  width: fit-content;
  max-width: 88%;
  display: grid;
  gap: 4px;
  border-radius: 10px 10px 10px 2px;
  background: #fff;
  padding: 8px 10px;
  box-shadow: 0 1px 0 rgba(17,17,17,.08);
}
.chat-message.own {
  justify-self: end;
  border-radius: 10px 10px 2px 10px;
  background: #111;
  color: #fff;
}
.chat-message-meta { display: flex; align-items: baseline; gap: 7px; color: #837d75; font: 8px var(--ui-font); }
.chat-message.own .chat-message-meta { color: #bfbab2; }
.chat-message-meta strong { color: inherit; font-weight: 800; }
.chat-message p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font: 12px/1.42 var(--ui-font); user-select: text; }
.chat-message-target { color: var(--accent); font-weight: 700; }
.chat-empty { place-self: center; max-width: 230px; color: #8a847c; text-align: center; font: 11px/1.45 var(--ui-font); }
.chat-form {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 7px;
  padding: 9px 10px;
  border-top: 1px solid rgba(17,17,17,.12);
  background: #fff;
}
.chat-form textarea {
  min-height: 48px;
  max-height: 130px;
  resize: vertical;
  border: 1px solid rgba(17,17,17,.18);
  border-radius: 8px;
  padding: 8px;
  outline: 0;
  user-select: text;
}
.chat-form textarea:focus { border-color: #111; }
.chat-form button {
  align-self: stretch;
  border: 0;
  border-radius: 7px;
  background: var(--accent);
  color: #fff;
  padding: 0 12px;
  font: 900 8px var(--condensed-font, Arial, sans-serif);
  letter-spacing: .1em;
  cursor: pointer;
}
.chat-form button:hover { background: #111; }
.chat-drawer > footer {
  padding: 6px 10px 8px;
  color: #89837b;
  text-align: center;
  font: 8px/1.25 var(--ui-font);
  background: #fff;
}

@media (max-width: 1180px) {
  .topbar { grid-template-columns: 28px auto 10px minmax(120px,1fr) auto auto !important; }
  .public-library-button span:last-child,
  .chat-button span:nth-child(2) { display: none; }
  .article-settings-main { grid-template-columns: 1fr; }
  .article-settings-section.classification-section,
  .article-settings-section.intro-section { grid-column: auto; }
}
@media (max-width: 760px) {
  .topbar { grid-template-columns: 28px auto minmax(0,1fr) auto auto !important; }
  .brand-path-slash { display: none; }
  .public-library-button { display: none; }
  .article-tool-section-heading span { display: none; }
  .article-settings-section.publication-section .article-settings-section-content,
  .article-settings-section.validation-section .article-settings-section-content,
  .article-settings-section.classification-section .article-settings-section-content,
  .article-validator-selects { grid-template-columns: 1fr; }
  .chat-drawer { inset: var(--topbar-height,64px) 0 0 0; width: 100%; border-radius: 0; }
}

/* Ajustements structurels 1.4 selon le balisage généré. */
.article-settings-primary {
  min-width: 0;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 8px !important;
  align-content: start;
}
.article-settings-primary > .article-settings-section:nth-child(2),
.article-settings-primary > .article-settings-section:nth-child(4) { grid-column: 1 / -1; }
.article-settings-primary > .article-settings-section:nth-child(1) .article-settings-section-content,
.article-settings-primary > .article-settings-section:nth-child(3) .article-settings-section-content {
  grid-template-columns: 1fr;
}
.article-settings-primary > .article-settings-section:nth-child(2) .article-settings-section-content {
  grid-template-columns: minmax(150px,.42fr) minmax(280px,1fr);
}
.article-settings-primary > .article-settings-section:nth-child(4) .article-settings-section-content {
  grid-template-columns: 1fr;
}
.article-settings-primary .article-settings-top { margin: 0; }
.article-settings-primary .article-taxonomy-field,
.article-settings-primary .article-validators-field,
.article-settings-primary .article-chapo-field,
.article-settings-primary .article-review-fields { margin: 0; }
.article-settings-primary .article-validators-head { margin-bottom: 7px; }
.article-settings-primary .article-validators-head > div { display: grid; gap: 2px; }
.article-settings-primary .article-validators-head strong { font: 900 8px var(--condensed-font,Arial,sans-serif); letter-spacing: .1em; }
.article-settings-primary .article-validators-head small { color: #847e75; font: 9px var(--ui-font); }
.article-settings-primary .article-validators-head > span { font: 900 10px var(--ui-font); }
.article-settings-media { min-width: 0; }

.article-keyword-library > summary { grid-template-columns: 14px auto 22px minmax(0,1fr); }
.article-keyword-library > summary::before { grid-column: 1; }
.article-keyword-library > summary span { grid-column: 2; }
.article-keyword-library > summary b { grid-column: 3; }
.article-keyword-library > summary small { grid-column: 4; }

.chat-day {
  justify-self: center;
  margin: 6px 0 2px;
  color: #928b82;
  font: 900 7px var(--condensed-font,Arial,sans-serif);
  letter-spacing: .1em;
  text-transform: uppercase;
}
.chat-message > header {
  display: flex;
  align-items: baseline;
  gap: 7px;
  color: #837d75;
  font: 8px var(--ui-font);
}
.chat-message > header b { color: #111; font-weight: 800; }
.chat-message > header span { color: inherit; }
.chat-message.own > header,
.chat-message.own > header b { color: #c8c3bb; }
.chat-empty { display: grid; gap: 5px; }
.chat-empty strong { color: #111; font: 900 8px var(--condensed-font,Arial,sans-serif); letter-spacing: .12em; }

@media (max-width: 1180px) {
  .article-settings-primary { grid-template-columns: 1fr; }
  .article-settings-primary > .article-settings-section:nth-child(2),
  .article-settings-primary > .article-settings-section:nth-child(4) { grid-column: auto; }
}
@media (max-width: 760px) {
  .article-settings-primary > .article-settings-section:nth-child(2) .article-settings-section-content { grid-template-columns: 1fr; }
}


/* ──────────────────────────────────────────────────────────────
   PLANCHE OBLIQUE 1.5 — métadonnées compactes, annotations et publication
   ────────────────────────────────────────────────────────────── */

/* En-tête du volet : ordre natif d'une fenêtre, titre modifiable au double-clic. */
.article-pane-header {
  grid-template-columns: auto minmax(0,1fr) auto 38px 38px !important;
  gap: 0 !important;
  padding: 0 !important;
  cursor: move;
}
.article-pane-mark,
.article-pane-title {
  font-family: var(--condensed-font, "IBM Plex Sans", Arial, sans-serif) !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  letter-spacing: .11em !important;
  text-transform: uppercase !important;
}
.article-pane-mark { padding-left: 15px; padding-right: 10px; color: #a7a29b !important; }
.article-pane-title {
  min-height: 42px;
  padding: 0 8px !important;
  color: #fff !important;
  cursor: move;
  text-overflow: ellipsis;
}
.article-pane-title[readonly] { border-bottom-color: transparent !important; user-select: none; }
.article-pane-title:not([readonly]) { cursor: text; background: rgba(255,255,255,.08); }
.article-pane-section { padding: 0 11px; color: #c8c2b9 !important; }
.article-pane-window-button,
.article-pane-close {
  width: 38px !important;
  height: 54px !important;
  margin: 0 !important;
  border-radius: 0 !important;
  border-left: 1px solid rgba(255,255,255,.12) !important;
}
.article-pane-close { justify-self: end; }

/* Barre de commandes supérieure. */
.article-focus-controls {
  justify-content: flex-start !important;
  gap: 6px !important;
  padding: 5px 9px !important;
}
.article-focus-controls .article-publish-button {
  margin-left: 2px;
  background: var(--accent) !important;
  border-color: var(--accent) !important;
  color: #fff !important;
}
.article-focus-controls .article-publish-button:hover { background: #111 !important; border-color: #111 !important; }

/* Sections d'outils plus compactes, repliables et lisibles. */
.article-editor-toolbar {
  min-height: 0 !important;
  align-items: flex-start !important;
  padding: 7px 9px !important;
  gap: 6px !important;
}
.article-tool-section {
  min-width: 150px !important;
  padding: 0 !important;
  gap: 0 !important;
  overflow: hidden;
  border-radius: 8px !important;
}
.article-tool-section.typography-tools { min-width: 285px !important; }
.article-tool-section.insertion-tools { min-width: 220px !important; }
.article-tool-section-heading {
  width: 100%;
  min-height: 31px;
  display: grid !important;
  grid-template-columns: 14px auto minmax(0,1fr);
  align-items: center !important;
  justify-content: stretch !important;
  gap: 6px !important;
  border: 0 !important;
  padding: 0 8px !important;
  background: #f2efe8;
  cursor: pointer;
  text-align: left;
}
.article-tool-section-heading::before {
  content: "⌃";
  font: 12px/1 var(--ui-font);
  color: #6e6861;
}
.article-tool-section.is-collapsed .article-tool-section-heading::before { content: "⌄"; }
.article-tool-section-heading span { overflow: hidden; text-overflow: ellipsis; }
.article-tool-section-controls { padding: 7px 8px 8px !important; }
.article-tool-section.is-collapsed .article-tool-section-controls { display: none !important; }

/* Métadonnées : tableau dense et sans chevauchement. */
.article-settings {
  max-height: min(44vh, 430px);
  overflow: auto !important;
  background: #ece8df !important;
}
.article-settings-grid {
  grid-template-columns: minmax(0, 3fr) minmax(220px, 1fr) !important;
  gap: 8px !important;
  padding: 8px !important;
  align-items: start !important;
}
.article-settings-primary {
  grid-template-columns: repeat(2, minmax(0,1fr)) !important;
  gap: 8px !important;
}
.article-settings-primary > .article-settings-section { grid-column: auto !important; }
.article-settings-primary > .article-settings-section:nth-child(2),
.article-settings-primary > .article-settings-section:nth-child(4) { grid-column: 1 / -1 !important; }
.article-settings-section {
  padding: 0 !important;
  gap: 0 !important;
  overflow: hidden;
  border-radius: 9px !important;
  background: rgba(255,255,255,.9) !important;
}
.article-settings-section-toggle {
  width: 100%;
  min-height: 34px;
  display: grid;
  grid-template-columns: 14px auto minmax(0,1fr);
  align-items: center;
  gap: 7px;
  border: 0;
  border-bottom: 1px solid rgba(17,17,17,.09);
  background: #f8f6f1;
  padding: 0 9px;
  cursor: pointer;
  text-align: left;
}
.article-settings-section-toggle::before {
  content: "⌃";
  color: #5f5952;
  font: 13px/1 var(--ui-font);
}
.article-settings-section.is-collapsed .article-settings-section-toggle::before { content: "⌄"; }
.article-settings-section-toggle strong { font: 900 8px/1 var(--condensed-font); letter-spacing: .13em; }
.article-settings-section-toggle span { justify-self: end; color: #8a847c; font: 9px/1.2 var(--ui-font); }
.article-settings-section-content { padding: 8px !important; gap: 7px !important; }
.article-settings-section.is-collapsed .article-settings-section-content { display: none !important; }
.article-settings-top {
  display: grid !important;
  grid-template-columns: minmax(145px,.75fr) minmax(145px,.75fr) minmax(250px,1.5fr) !important;
  gap: 8px !important;
  align-items: start !important;
}
.article-taxonomy-field {
  display: grid !important;
  grid-template-columns: minmax(150px,.42fr) minmax(260px,1fr) !important;
  gap: 8px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}
.article-validator-selects { grid-template-columns: repeat(3, minmax(135px,1fr)) !important; }
.article-validators-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.article-chapo-editor { min-height: 62px !important; }
.article-settings-media { position: sticky !important; top: 0; }
.article-featured-panel { overflow: hidden; border-radius: 9px !important; }
.article-section-toggle {
  min-height: 34px !important;
  grid-template-columns: 14px auto minmax(0,1fr) !important;
  padding: 0 9px !important;
}
.article-section-chevron { font-size: 0 !important; }
.article-section-chevron::before { content: "⌄"; font: 13px/1 var(--ui-font); }
.article-featured-panel.open .article-section-chevron::before { content: "⌃"; }
.article-featured-dropzone > img { height: 134px !important; }

/* Rail vertical des annotations, présent en privé comme en public. */
.article-layout {
  grid-template-columns: 48px minmax(0,1fr) 0 !important;
}
.article-layout.comments-open {
  grid-template-columns: 48px minmax(0,1fr) minmax(220px,31%) !important;
}
.article-layout.annotation-rail-collapsed {
  grid-template-columns: 27px minmax(0,1fr) 0 !important;
}
.article-layout.annotation-rail-collapsed.comments-open {
  grid-template-columns: 27px minmax(0,1fr) minmax(220px,31%) !important;
}
.article-annotation-rail {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 7px 5px;
  border-right: 1px solid rgba(17,17,17,.12);
  background: #f2efe8;
  overflow: hidden;
}
.article-annotation-rail.is-collapsed .annotation-tool:not(.annotation-rail-toggle) { display: none; }
.annotation-rail-toggle,
.annotation-tool {
  width: 34px;
  min-height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(17,17,17,.15);
  border-radius: 7px;
  background: #fff;
  color: #111;
  cursor: pointer;
  font: 800 11px var(--ui-font);
}
.annotation-rail-toggle { min-height: 25px; border-color: transparent; background: transparent; color: #777169; }
.annotation-tool:hover,
.annotation-tool.active { border-color: #111; background: #111; color: #fff; }
.annotation-color { position: relative; }
.annotation-color::after { content:""; width:15px; height:15px; border-radius:50%; background:var(--annotation-color); box-shadow:inset 0 0 0 1px rgba(17,17,17,.18); }
.annotation-color.active::after { box-shadow:0 0 0 2px #fff,0 0 0 3px #111; }
.annotation-tool input[type="color"] { width: 24px; height: 24px; border:0; padding:0; background:transparent; }
.annotation-tool-separator { width: 24px; height: 1px; background: rgba(17,17,17,.13); }
.article-editor-stage { position: relative; min-height: 100%; background:#fff; }
.article-editor-stage .article-editor { position: relative; z-index: 1; min-height: 100%; }
.article-ink-layer {
  position: absolute;
  z-index: 4;
  inset: 0 auto auto 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.article-ink-layer.drawing-active { pointer-events: auto; cursor: crosshair; touch-action: none; }
.article-ink-layer path { fill:none; stroke-linecap:round; stroke-linejoin:round; pointer-events:stroke; }
.article-ink-layer path:hover { filter: drop-shadow(0 0 2px rgba(17,17,17,.45)); }
.article-authored-highlight { border-radius: 2px; }
.article-comment-anchor[title], .article-authored-highlight[title] { cursor: help; }

/* Lecteur public avec le même rail vertical. */
.public-reader-layout {
  grid-template-columns: 48px minmax(0,1fr) minmax(260px,29%) !important;
}
.public-reader-layout.annotation-rail-collapsed {
  grid-template-columns: 27px minmax(0,1fr) minmax(260px,29%) !important;
}
.public-reader-main { position: relative; }
.public-reader-stage { min-height: calc(100% - 70px); }
.public-reader-body { position: relative; z-index:1; }
.public-reader-toolbar .public-review-color,
.public-reader-toolbar .public-review-comment-command { display:none !important; }

/* Fenêtre Publier : code, téléchargement et aperçu avec le CSS fourni. */
.publish-dialog {
  width: min(1320px, calc(100vw - 28px));
  height: min(920px, calc(100vh - 28px));
  padding: 0;
  border: 0;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 32px 100px rgba(17,17,17,.34);
}
.publish-shell { height:100%; display:grid; grid-template-rows:auto auto minmax(0,1fr) auto; background:#fbfaf6; }
.publish-header { display:flex; align-items:center; justify-content:space-between; gap:16px; min-height:64px; padding:10px 14px 10px 18px; background:#111; color:#fff; }
.publish-header span { color:var(--accent); font:900 8px var(--condensed-font); letter-spacing:.14em; }
.publish-header h2 { margin:4px 0 0; font:800 20px/1 var(--editorial-font); }
.publish-tabs { display:flex; border-bottom:1px solid rgba(17,17,17,.14); background:#eeeae1; }
.publish-tabs button { min-height:39px; border:0; border-right:1px solid rgba(17,17,17,.12); background:transparent; padding:0 16px; font:900 8px var(--condensed-font); letter-spacing:.11em; }
.publish-tabs button.active { background:#fff; color:var(--accent); }
.publish-panel { min-height:0; display:grid; grid-template-rows:auto minmax(0,1fr); gap:8px; padding:12px; }
.publish-panel > p { margin:0; color:#777169; font:10px var(--ui-font); }
#publish-code { width:100%; height:100%; resize:none; border:1px solid rgba(17,17,17,.18); border-radius:8px; background:#fff; padding:13px; font:12px/1.45 ui-monospace,SFMono-Regular,Consolas,monospace; }
#publish-preview-panel { padding:0; grid-template-rows:minmax(0,1fr); }
#publish-preview { width:100%; height:100%; border:0; background:#eef7e9; }
.publish-actions { display:flex; align-items:center; gap:8px; min-height:57px; padding:8px 12px; border-top:1px solid rgba(17,17,17,.13); background:#fff; }

@media (max-width: 980px) {
  .article-settings-grid { grid-template-columns: 1fr !important; }
  .article-settings-media { position: static !important; }
  .article-settings-primary { grid-template-columns: 1fr !important; }
  .article-settings-primary > .article-settings-section:nth-child(2),
  .article-settings-primary > .article-settings-section:nth-child(4) { grid-column:auto !important; }
  .article-settings-top,
  .article-taxonomy-field,
  .article-validator-selects { grid-template-columns: 1fr !important; }
  .public-reader-layout,
  .public-reader-layout.annotation-rail-collapsed { grid-template-columns: 42px minmax(0,1fr) !important; }
  .public-reader-comments { display:none; }
}


/* V1.5 — volet de commentaires commandé depuis la palette d’annotations. */
.public-reader-layout:not(.comments-open) {
  grid-template-columns: 48px minmax(0,1fr) 0 !important;
}
.public-reader-layout.annotation-rail-collapsed:not(.comments-open) {
  grid-template-columns: 27px minmax(0,1fr) 0 !important;
}
.public-reader-layout:not(.comments-open) .public-reader-comments {
  visibility: hidden;
  overflow: hidden;
  padding: 0;
  border: 0;
}
.article-comments-panel-toggle.active { background:#111; color:#fff; }
.annotation-tool:focus-visible,
.annotation-rail-toggle:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }

@media (max-width: 980px) {
  .public-reader-layout,
  .public-reader-layout.comments-open,
  .public-reader-layout.annotation-rail-collapsed,
  .public-reader-layout.annotation-rail-collapsed.comments-open {
    grid-template-columns: 42px minmax(0,1fr) !important;
  }
}


/* V1.5 — rationalisation responsive de la fenêtre éditoriale. */
.article-pane {
  container-type: inline-size;
  container-name: article-editor-window;
}
.article-editor-toolbar {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(138px, 1fr));
  align-items: start !important;
  overflow: visible !important;
}
.article-tool-section,
.article-tool-section.author-tools,
.article-tool-section.typography-tools,
.article-tool-section.formatting-tools,
.article-tool-section.insertion-tools {
  min-width: 0 !important;
  width: 100%;
}
.article-tool-section-heading,
.article-settings-section-toggle {
  transition: background .15s ease, color .15s ease;
}
.article-tool-section-heading:hover,
.article-settings-section-toggle:hover { background: #e8e3da; }
.article-tool-section-heading::before,
.article-settings-section-toggle::before {
  content: "" !important;
  width: 6px;
  height: 6px;
  margin-left: 2px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(225deg) translate(-1px,-1px);
  transform-origin: center;
  color: #5f5952;
}
.article-tool-section.is-collapsed .article-tool-section-heading::before,
.article-settings-section.is-collapsed .article-settings-section-toggle::before {
  transform: rotate(45deg) translate(-1px,-1px);
}
.article-section-chevron::before {
  content: "" !important;
  display: block;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
}
.article-featured-panel.open .article-section-chevron::before { transform: rotate(225deg); }
.article-settings { max-height: min(39vh, 390px) !important; }
.article-settings-grid {
  grid-template-columns: minmax(0, 2fr) minmax(180px, 1fr) !important;
  align-items: start !important;
}
.article-settings-grid .article-featured-panel { height: auto !important; align-self: start; }
.article-settings-media { position: sticky !important; top: 0; align-self: start; }
.article-featured-content { min-height: 0 !important; }
.article-featured-dropzone { min-height: 82px !important; }
.article-settings-primary { align-content: start; }
.article-settings-section-content { min-width: 0; }
.article-settings-section-content > * { min-width: 0; }
.article-settings-section select,
.article-settings-section input,
.article-settings-section textarea { max-width: 100%; }

@container article-editor-window (max-width: 900px) {
  .article-editor-toolbar { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .article-settings-primary { grid-template-columns: 1fr !important; }
  .article-settings-primary > .article-settings-section { grid-column: 1 !important; }
  .article-settings-top { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
  .article-settings-top .article-visibility-field { grid-column: 1 / -1; }
  .article-taxonomy-field { grid-template-columns: 1fr !important; }
  .article-validator-selects { grid-template-columns: repeat(3,minmax(0,1fr)) !important; }
  .article-settings-section-toggle span,
  .article-tool-section-heading span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
@container article-editor-window (max-width: 650px) {
  .article-editor-toolbar { grid-template-columns: 1fr 1fr; }
  .article-settings-grid { grid-template-columns: minmax(0, 1.85fr) minmax(160px, 1fr) !important; }
  .article-settings-top { grid-template-columns: 1fr !important; }
  .article-settings-top .article-visibility-field { grid-column: auto; }
  .article-validator-selects { grid-template-columns: 1fr !important; }
  .article-settings-section-toggle span { display: none; }
  .article-featured-dropzone { padding: 9px !important; }
  .article-featured-dropzone strong { font-size: 7px !important; }
}

/* ──────────────────────────────────────────────────────────────
   PLANCHE OBLIQUE 1.6 — corrections d’interface et flux éditorial
   ────────────────────────────────────────────────────────────── */

/* Barre supérieure : repères précédent/suivant et signature Oblique. */
.topbar {
  grid-template-columns: auto auto auto auto minmax(280px,1fr) auto auto !important;
  gap: 7px !important;
}
.topbar-tree-toggle,
.topbar-history-button {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(17,17,17,.2);
  border-radius: 3px;
  background: #fff;
  cursor: pointer;
}
.topbar-history-button { font: 16px/1 var(--ui-font); }
.topbar-history-button:disabled { opacity: .28; cursor: default; }
.topbar-history-button:not(:disabled):hover,
.topbar-tree-toggle:hover { border-color: #111; background: #111; color: #fff; }
.oblique-leading-slash {
  width: 4px;
  height: 39px;
  margin: 0 4px 0 3px;
  background: var(--accent);
  transform: skewX(-17deg);
}
.oblique-wordmark { display: inline-flex; align-items: center; width: 102px; height: 34px; }
.oblique-wordmark svg { width: 100%; height: 100%; overflow: visible; }
.oblique-wordmark text { font-family: var(--editorial-font); font-size: 27px; font-weight: 900; font-style: italic; fill: #111; }
.brand-path-slash { color: #99928a; }
.public-library-mode #tree-toggle { display: none !important; }

/* Connexion / inscription : deux véritables panneaux de largeur identique. */
.auth-card.auth-carousel {
  width: min(500px, calc(100vw - 32px)) !important;
  max-height: min(720px, calc(100vh - 32px));
  overflow: hidden !important;
}
.auth-brand-row { width: 100% !important; min-width: 100% !important; }
.auth-track {
  width: 100% !important;
  display: grid !important;
  grid-template-columns: 100% 100% !important;
  align-items: start;
  transform: translateX(0) !important;
  transition: transform .36s cubic-bezier(.22,.72,.28,1);
}
.auth-card[data-page="register"] .auth-track { transform: translateX(-100%) !important; }
.auth-panel {
  width: 100% !important;
  min-width: 100% !important;
  max-width: 100% !important;
  padding: 25px 28px 20px !important;
  overflow-y: auto;
}
.auth-panel > label,
.auth-panel > label input,
.auth-panel > button { min-width: 0; max-width: 100%; }
.auth-panel > button[type="submit"] { width: 100%; }

/* Barre de titre : toute la surface déplace, puis déplacement, agrandissement, fermeture. */
.article-pane-header {
  grid-template-columns: auto minmax(0,1fr) auto 40px 40px 40px !important;
  min-height: 54px;
  cursor: grab !important;
}
.article-pane-moving .article-pane-header { cursor: grabbing !important; }
.article-pane-header > * { min-width: 0; }
.article-pane-move,
.article-pane-window-button,
.article-pane-close { color: #fff; }
.article-pane-move svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.article-pane-close { margin-right: 0 !important; }
.article-pane-title[readonly] { cursor: grab !important; }
.article-pane-title:not([readonly]) { cursor: text !important; }

/* Historique propre au traitement de texte. */
.article-history-spacer { flex: 1 1 auto; }
.article-history-button {
  width: 31px;
  height: 29px;
  border: 1px solid rgba(17,17,17,.17);
  border-radius: 6px;
  background: #fff;
  font: 18px/1 var(--ui-font);
  cursor: pointer;
}
.article-history-button:hover:not(:disabled) { background: #111; color: #fff; }
.article-history-button:disabled { opacity: .28; cursor: default; }

/* Métadonnées : grilles stables, cartes compactes et champs lisibles. */
.article-settings {
  max-height: min(42vh, 410px) !important;
  background: #eeeae2 !important;
  overflow: auto !important;
}
.article-settings-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 2.2fr) minmax(250px, .9fr) !important;
  gap: 10px !important;
  padding: 10px !important;
}
.article-settings-primary {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0,1fr)) !important;
  gap: 10px !important;
}
.article-settings-primary > .article-settings-section { grid-column: auto !important; }
.article-settings-primary > .article-settings-section:nth-child(2) { grid-column: 1 / -1 !important; }
.article-settings-section {
  border: 1px solid rgba(17,17,17,.12) !important;
  border-radius: 10px !important;
  background: #fff !important;
  box-shadow: 0 2px 7px rgba(17,17,17,.04);
}
.article-settings-section-toggle {
  min-height: 38px !important;
  grid-template-columns: 14px auto minmax(0,1fr) !important;
  padding: 0 11px !important;
  background: #faf8f3 !important;
}
.article-settings-section-toggle strong { font-size: 8px !important; }
.article-settings-section-toggle span { white-space: normal !important; text-align: right; }
.article-settings-section-content { padding: 11px !important; }
.article-settings-top {
  display: grid !important;
  grid-template-columns: minmax(145px,1fr) minmax(145px,1fr) !important;
  gap: 10px !important;
}
.article-settings-top .article-visibility-field { grid-column: 1 / -1; }
.article-format-field,
.article-author-field { display: grid !important; gap: 6px !important; align-content: start; }
.article-format-field select,
.article-author-field select,
.article-taxonomy-field select,
.article-validator-select-field select {
  width: 100% !important;
  min-height: 38px !important;
  border: 1px solid rgba(17,17,17,.22) !important;
  border-radius: 5px !important;
  padding: 0 10px !important;
  background: #fff !important;
}
.article-visibility-field {
  display: grid !important;
  grid-template-columns: auto minmax(240px,1fr) !important;
  align-items: center !important;
  gap: 10px 14px !important;
  min-width: 0;
  margin: 0 !important;
  padding: 9px 10px !important;
  border: 1px solid rgba(17,17,17,.12) !important;
  border-radius: 6px !important;
}
.article-visibility-field legend { grid-column: 1 / -1; }
.article-segmented-control { min-width: 170px; }
.article-review-permission { min-width: 0; }
.article-review-permission small { display: block; line-height: 1.35; }
.article-taxonomy-field {
  grid-template-columns: minmax(170px,.42fr) minmax(280px,1fr) !important;
  align-items: start;
}
.article-validator-selects { grid-template-columns: repeat(3,minmax(0,1fr)) !important; }
.article-review-fields { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
.article-review-fields input { width: 100% !important; }

/* Image liée : carte blanche + zone de dépôt discontinue toujours présente. */
.article-settings-media { position: sticky !important; top: 0; align-self: start; }
.article-featured-panel {
  min-height: 180px;
  border: 1px solid rgba(17,17,17,.13) !important;
  border-radius: 10px !important;
  background: #fff !important;
  box-shadow: 0 2px 7px rgba(17,17,17,.04);
}
.article-featured-content { padding: 10px !important; }
.article-featured-dropzone {
  min-height: 150px !important;
  height: auto !important;
  display: grid !important;
  place-items: stretch;
  border: 1px dashed #aaa39a !important;
  border-radius: 7px !important;
  background: #fff !important;
  padding: 8px !important;
}
.article-featured-empty {
  width: 100%;
  min-height: 132px !important;
  display: grid !important;
  place-content: center;
  justify-items: center;
  gap: 6px;
  border: 0 !important;
  background: transparent !important;
}
.article-featured-dropzone.has-image { grid-template-columns: 1fr !important; gap: 8px; }
.article-featured-dropzone > img { width: 100% !important; height: 150px !important; object-fit: cover; border-radius: 4px; }

/* Chapô permanent, autonome et rabattable. */
.article-chapo-strip {
  display: grid;
  grid-template-columns: 92px minmax(0,1fr);
  min-height: 74px;
  margin: 0;
  border-top: 1px dashed rgba(17,17,17,.25);
  border-bottom: 1px solid rgba(17,17,17,.12);
  background: #f3efe5;
}
.article-chapo-toggle {
  display: grid;
  grid-template-columns: 13px 1fr;
  align-content: center;
  align-items: center;
  gap: 7px;
  border: 0;
  border-right: 1px dashed rgba(17,17,17,.2);
  background: transparent;
  padding: 12px 10px;
  cursor: pointer;
  text-align: left;
}
.article-chapo-toggle span {
  width: 7px;
  height: 7px;
  border-right: 1.5px solid #111;
  border-bottom: 1.5px solid #111;
  transform: rotate(225deg);
}
.article-chapo-strip.is-collapsed .article-chapo-toggle span { transform: rotate(45deg); }
.article-chapo-toggle strong { font: 900 8px var(--condensed-font); letter-spacing: .13em; }
.article-chapo-field {
  position: relative;
  display: block !important;
  min-width: 0;
  margin: 0 !important;
  padding: 12px 25px 12px 18px !important;
}
.article-chapo-field::after {
  content: "";
  position: absolute;
  top: 12px;
  right: 12px;
  bottom: 12px;
  width: 4px;
  background: var(--accent);
}
.article-chapo-field > span { display: none !important; }
.article-chapo-editor {
  min-height: 48px !important;
  border: 0 !important;
  background: transparent !important;
  padding: 0 14px 0 0 !important;
  font-family: var(--editorial-font) !important;
  font-size: 19px !important;
  line-height: 1.45 !important;
  color: #27231f;
}
.article-chapo-strip.is-collapsed { min-height: 38px; grid-template-columns: 1fr; }
.article-chapo-strip.is-collapsed .article-chapo-toggle { min-height: 38px; border-right: 0; }
.article-chapo-strip.is-collapsed .article-chapo-field { display: none !important; }

/* Sommaire détecté en temps réel. */
.article-toc-panel {
  border-bottom: 1px solid rgba(17,17,17,.13);
  background: #fbfaf6;
}
.article-toc-toggle {
  width: 100%;
  min-height: 37px;
  display: grid;
  grid-template-columns: 13px auto 1fr;
  align-items: center;
  gap: 8px;
  border: 0;
  background: #f7f4ed;
  padding: 0 12px;
  text-align: left;
  cursor: pointer;
}
.article-toc-toggle > span {
  width: 7px;
  height: 7px;
  border-right: 1.5px solid #111;
  border-bottom: 1.5px solid #111;
  transform: rotate(225deg);
}
.article-toc-panel.is-collapsed .article-toc-toggle > span { transform: rotate(45deg); }
.article-toc-toggle strong { font: 900 8px var(--condensed-font); letter-spacing: .13em; }
.article-toc-toggle small { justify-self: end; color: #777169; }
.article-toc-tree { display: grid; gap: 2px; padding: 8px 12px 11px; }
.article-toc-panel.is-collapsed .article-toc-tree { display: none; }
.article-toc-tree > p { margin: 4px 0; color: #777169; font: 11px/1.45 var(--ui-font); }
.article-toc-row {
  min-height: 28px;
  display: grid;
  grid-template-columns: 31px minmax(0,1fr);
  align-items: center;
  gap: 5px;
  border: 0;
  border-left: 1px solid #d2ccc2;
  background: transparent;
  padding: 0 8px;
  text-align: left;
  cursor: pointer;
}
.article-toc-row.level-3 { margin-left: 20px; }
.article-toc-row.level-4 { margin-left: 40px; }
.article-toc-row:hover { border-left-color: var(--accent); background: #fff; }
.article-toc-row span { color: #8a847c; font: 800 8px var(--condensed-font); }
.article-toc-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 11px var(--ui-font); }
.toc-target-flash { animation: toc-target-flash .9s ease; }
@keyframes toc-target-flash { 0%,100% { background: transparent; } 35% { background: #fff1a8; } }

/* Commentaires vocaux. */
.article-voice-comment { font-size: 0 !important; }
.article-voice-comment::before,
.article-reply-voice::before { content: "●"; color: #be1d1d; font-size: 13px; }
.article-voice-comment.recording,
.article-reply-voice.recording { background: #be1d1d !important; color: #fff !important; animation: voice-pulse 1s infinite; }
.article-voice-comment.recording::before,
.article-reply-voice.recording::before { color: #fff; }
@keyframes voice-pulse { 50% { opacity: .58; } }
.article-comment-audio { width: 100%; height: 32px; margin-top: 6px; }
.article-reply-row { grid-template-columns: minmax(0,1fr) 30px 30px !important; }
.article-reply-voice { border: 1px solid rgba(17,17,17,.14); background: #fff; cursor: pointer; }

@container article-editor-window (max-width: 850px) {
  .article-settings-grid { grid-template-columns: 1fr !important; }
  .article-settings-media { position: static !important; }
  .article-settings-primary { grid-template-columns: 1fr !important; }
  .article-settings-primary > .article-settings-section { grid-column: 1 !important; }
  .article-settings-top { grid-template-columns: 1fr !important; }
  .article-visibility-field { grid-template-columns: 1fr !important; }
  .article-taxonomy-field { grid-template-columns: 1fr !important; }
  .article-validator-selects { grid-template-columns: 1fr !important; }
  .article-chapo-strip { grid-template-columns: 74px minmax(0,1fr); }
}

/* Ajustements finaux 1.6 : barre supérieure, fenêtre éditoriale et petits écrans. */
.topbar {
  grid-template-columns: auto auto auto auto auto auto minmax(150px, 1fr) auto auto auto !important;
}
.article-pane-header {
  gap: 0 !important;
  padding: 0 !important;
}
.article-pane-mark { margin-left: 15px; margin-right: 10px; }
.article-pane-title { padding-right: 10px; }
.article-pane-section { margin-right: 7px; }
.article-pane-move,
.article-pane-window-button,
.article-pane-close { justify-self: stretch; }
.article-pane-close { margin-right: 0 !important; }
.article-toolbar-select-wrap.block-style-select { min-width: 116px; }

@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: auto auto auto auto auto auto minmax(90px,1fr) auto auto !important;
  }
  .topbar .chat-button { display: none !important; }
}
@media (max-width: 860px) {
  .topbar {
    grid-template-columns: auto auto auto auto minmax(80px,1fr) auto !important;
  }
  .topbar .oblique-wordmark,
  .topbar .brand-path-slash,
  .topbar .public-library-button { display: none !important; }
}

/* La fenêtre éditoriale reste au-dessus des commandes du canevas et distribue
   toujours l’espace sans superposer métadonnées, chapô et texte. */
.article-pane { z-index: 80 !important; }
.article-pane-content > .article-body {
  display: flex !important;
  flex-direction: column !important;
  min-height: 0;
}
.article-pane-content .article-focus-controls,
.article-pane-content .article-editor-toolbar,
.article-pane-content .article-chapo-strip,
.article-pane-content .article-toc-panel,
.article-pane-content .article-statusbar { flex: 0 0 auto; }
.article-pane-content .article-settings {
  flex: 0 1 min(30vh, 240px);
  min-height: 44px;
  max-height: min(30vh, 240px) !important;
}
.article-pane-content .article-settings.article-bar-collapsed { min-height: 0 !important; }
.article-pane-content .article-layout {
  flex: 1 1 170px;
  min-height: 110px;
  overflow: hidden;
}

/* =========================================================
   1.7 — comptes privés, corbeille, aide, bibliothèque et lignes
========================================================= */
.topbar {
  display: grid !important;
  grid-template-columns: 36px 28px auto 12px minmax(160px, 1fr) auto auto auto minmax(150px, auto) !important;
  align-items: center;
  gap: 8px !important;
  padding: 0 10px 0 7px !important;
}
.topbar > .account-button { grid-column: 1; grid-row: 1; margin: 0; }
.topbar > .topbar-tree-toggle { grid-column: 2; grid-row: 1; }
.topbar > .oblique-wordmark { grid-column: 3; grid-row: 1; }
.topbar > .oblique-leading-slash {
  grid-column: 4; grid-row: 1; display: block !important; width: 3px; height: 35px;
  background: var(--accent); transform: skewX(-17deg); justify-self: center;
}
.topbar > .brand-path-slash { display: none !important; }
.topbar > .path-navigation { grid-column: 5; grid-row: 1; min-width: 0; }
.path-history-actions { grid-column: 6; grid-row: 1; display: inline-flex; gap: 3px; }
.topbar > .public-library-button { grid-column: 7; grid-row: 1; }
.topbar > .chat-button { grid-column: 8; grid-row: 1; }
.topbar > .top-actions { grid-column: 9; grid-row: 1; }
.parent-board-button { display: none !important; }
.account-button { width: 34px !important; height: 34px !important; border-radius: 50% !important; }

.tree-share-badge { background: var(--accent); color: #fff; }
.tree-node.board-root:has(.tree-share-badge) > .tree-row { background: linear-gradient(90deg, rgba(254,0,0,.055), transparent 72%); }

.chat-recipient-row { grid-template-columns: auto minmax(0,1fr) auto !important; }
.chat-sound-toggle { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; font: 900 7px var(--condensed-font, Arial, sans-serif); letter-spacing: .12em; }
.chat-sound-toggle input { accent-color: var(--accent); }

.public-library-layout {
  grid-template-columns: 245px minmax(0, 1fr) 250px !important;
  min-height: 0;
}
.public-library-nav {
  min-height: 0; overflow: auto; padding: 22px 16px 32px; border-right: 1px solid rgba(17,17,17,.16); background: #f8f6f1;
}
.public-library-nav h2, .public-library-filters h2 { margin: 0 0 12px; font: 900 9px var(--condensed-font, Arial, sans-serif); letter-spacing: .16em; }
.public-library-mini-list { display: grid; gap: 3px; }
.public-mini-article { border: 0; border-bottom: 1px solid rgba(17,17,17,.1); background: transparent; padding: 10px 6px; text-align: left; cursor: pointer; display: grid; gap: 3px; }
.public-mini-article:hover { background: #fff; }
.public-mini-article span { color: var(--accent); font: 900 7px var(--condensed-font, Arial, sans-serif); letter-spacing: .12em; }
.public-mini-article strong { font: 600 13px/1.15 var(--editorial-font); }
.public-mini-article small { color: #77736d; font-size: 9px; }
.public-mini-empty { color: #8a847c; font-size: 10px; }
.public-library-nav-separator { height: 1px; margin: 24px 0 18px; background: repeating-linear-gradient(90deg,#111 0 5px,transparent 5px 10px); opacity: .18; }
.public-library-authors { display: flex; flex-wrap: wrap; gap: 7px; }
.public-library-authors button { display: inline-flex; align-items: center; gap: 6px; min-height: 29px; border: 1px solid rgba(17,17,17,.17); border-radius: 999px; background: #fff; padding: 3px 9px 3px 4px; cursor: pointer; }
.public-library-authors button > span { width: 21px; height: 21px; border-radius: 50%; display: grid; place-items: center; background: #111; color: #fff; font: 800 7px Arial; }
.public-library-authors button b { font: 800 8px var(--condensed-font, Arial, sans-serif); letter-spacing: .06em; }
.public-library-authors button.active { border-color: var(--accent); color: var(--accent); }
.public-library-filters { border-left: 1px solid rgba(17,17,17,.16); }

.workspace-utility-dock { position: fixed; right: 15px; bottom: 15px; z-index: 2500; display: flex; align-items: center; gap: 7px; }
.utility-dock-button { position: relative; width: 38px; height: 38px; border: 1px solid rgba(17,17,17,.22); border-radius: 50%; background: #fff; box-shadow: 0 8px 22px rgba(17,17,17,.13); cursor: pointer; font: 900 15px Arial; }
.utility-dock-button:hover, .utility-dock-button.drag-target { background: #111; color: #fff; transform: translateY(-1px); }
.trash-button.drag-target { outline: 3px solid rgba(254,0,0,.22); border-color: var(--accent); background: var(--accent); }
.trash-button b { position: absolute; right: -4px; top: -5px; min-width: 17px; height: 17px; border-radius: 999px; display: grid; place-items: center; background: var(--accent); color: #fff; font: 800 8px Arial; }
body[data-account-role="reader"] .trash-button { display: none; }

.trash-dialog { width: min(640px, calc(100vw - 30px)); border: 0; border-radius: 14px; padding: 0; box-shadow: 0 28px 80px rgba(17,17,17,.28); }
.trash-shell { padding: 20px; }
.trash-list { max-height: min(58vh, 520px); overflow: auto; display: grid; gap: 7px; padding: 8px 0 16px; }
.trash-entry { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 15px; align-items: center; padding: 12px; border: 1px solid rgba(17,17,17,.12); border-radius: 9px; background: #fff; }
.trash-entry > div:first-child { display: grid; gap: 3px; }
.trash-entry span { color: var(--accent); font: 900 7px var(--condensed-font,Arial,sans-serif); letter-spacing:.13em; }
.trash-entry strong { font: 600 14px var(--editorial-font); }
.trash-entry small { color:#817b72; font-size:9px; }
.trash-entry > div:last-child { display:flex; gap:5px; }
.trash-entry button { border:1px solid #111; background:#fff; padding:7px 9px; font:900 7px var(--condensed-font,Arial,sans-serif); letter-spacing:.08em; cursor:pointer; }
.trash-entry button.danger { border-color:var(--accent); color:var(--accent); }
.trash-empty { min-height:220px; display:grid; place-content:center; gap:6px; text-align:center; color:#817b72; }
.trash-empty strong { color:#111; font:900 9px var(--condensed-font,Arial,sans-serif); letter-spacing:.14em; }

.tutorial-dialog { width:min(760px,calc(100vw - 28px)); border:0; border-radius:16px; padding:0; box-shadow:0 30px 90px rgba(17,17,17,.35); }
.tutorial-shell { min-height:520px; display:grid; grid-template-rows:auto minmax(0,1fr) auto; background:#fbfaf6; }
.tutorial-header { display:flex; align-items:center; justify-content:space-between; padding:18px 20px; background:#111; color:#fff; }
.tutorial-header span { color:var(--accent); font:900 7px var(--condensed-font,Arial,sans-serif); letter-spacing:.16em; }
.tutorial-header h2 { margin:3px 0 0; font:700 20px var(--editorial-font); }
.tutorial-pages { position:relative; overflow:hidden; }
.tutorial-page { display:none; min-height:390px; padding:48px 68px; align-content:center; }
.tutorial-page.active { display:grid; }
.tutorial-number { color:var(--accent); font:900 11px var(--condensed-font,Arial,sans-serif); letter-spacing:.18em; }
.tutorial-page h3 { margin:8px 0 20px; font:800 clamp(28px,5vw,46px)/.95 var(--editorial-font); }
.tutorial-page p { max-width:650px; margin:0; font:16px/1.62 var(--editorial-font); }
.tutorial-callout { margin-top:28px; padding:14px 17px; border-left:4px solid var(--accent); background:#f3efe5; font:12px/1.45 var(--ui-font); }
.tutorial-footer { display:grid; grid-template-columns:120px 1fr 120px; align-items:center; padding:14px 18px; border-top:1px solid rgba(17,17,17,.13); }
.tutorial-footer > button { border:0; background:transparent; font:900 8px var(--condensed-font,Arial,sans-serif); letter-spacing:.1em; cursor:pointer; }
.tutorial-footer > button:disabled { opacity:.25; }
.tutorial-dots { display:flex; justify-content:center; gap:6px; }
.tutorial-dots button { width:7px; height:7px; border:0; border-radius:50%; background:#cbc5bb; padding:0; cursor:pointer; }
.tutorial-dots button.active { background:#111; transform:scale(1.25); }
.shortcut-grid.compact { max-width:520px; }
.subtle-danger { background:transparent !important; color:#8b403b !important; border-color:rgba(139,64,59,.35) !important; }

.article-editor-stage.has-line-gutter { padding-left: 43px; }
.article-line-gutter { position:absolute; z-index:5; left:0; top:0; bottom:0; width:39px; border-right:1px solid rgba(17,17,17,.10); background:#faf9f6; overflow:hidden; user-select:none; }
.article-line-gutter button { display:block; width:100%; height:var(--article-line-height,24px); border:0; background:transparent; color:#aaa49b; text-align:right; padding:0 8px 0 2px; font:9px/1 ui-monospace,Consolas,monospace; cursor:pointer; }
.article-line-gutter button:hover, .article-line-gutter button.selected { color:#fff; background:#111; }
.article-editor-stage.has-line-gutter > .article-editor,
.article-editor-stage.has-line-gutter > .public-reader-body { width:100%; }
.article-editor-stage.has-line-gutter .article-ink-layer { left:43px; width:calc(100% - 43px); }
.public-reader-comments[hidden], .article-comments[hidden] { display:none !important; }

@media (max-width: 1050px) {
  .public-library-layout { grid-template-columns: 210px minmax(0,1fr) 215px !important; }
  .topbar { grid-template-columns:36px 28px auto 10px minmax(100px,1fr) auto auto auto !important; }
  .topbar > .public-library-button span:last-child, .topbar > .chat-button span:nth-child(2) { display:none; }
}
@media (max-width: 760px) {
  .public-library-layout { grid-template-columns:1fr !important; }
  .public-library-nav, .public-library-filters { display:none; }
  .tutorial-page { padding:34px 28px; }
}

/* =========================================================
   1.8 — bibliothèque publique, navigation et éditeur rationalisé
   ========================================================= */

/* Bibliothèque publique : catégories puis auteur·ices à gauche. */
.public-library-categories {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 6px;
}
.public-library-categories button {
  min-height: 28px;
  border: 1px solid rgba(17,17,17,.18);
  border-radius: 5px;
  background: #fff;
  padding: 0 9px;
  color: #111;
  cursor: pointer;
  font: 900 7.5px/1 var(--condensed-font, Arial, sans-serif);
  letter-spacing: .09em;
  text-transform: uppercase;
  transition: background .15s ease, color .15s ease, border-color .15s ease, transform .15s ease;
}
.public-library-categories button:hover {
  border-color: #111;
  transform: translateY(-1px);
}
.public-library-categories button.active {
  border-color: #111;
  background: #111;
  color: #fff;
}
.public-library-authors {
  display: flex !important;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 7px !important;
}
.public-library-authors button {
  max-width: 100%;
  min-height: 30px !important;
}
.public-library-authors button b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Barre de la fenêtre Article : uniquement agrandir/rétablir et fermer. */
.article-pane-header {
  grid-template-columns: auto minmax(0,1fr) auto 38px 38px !important;
}
.article-pane-header .article-pane-window-button,
.article-pane-header .article-pane-close {
  width: 38px !important;
  min-width: 38px !important;
  height: 100% !important;
  margin: 0 !important;
}
.article-pane-header .article-pane-close { grid-column: -1; }

/* Outils : grilles souples, sans chevauchement ni contrôles tronqués. */
.article-editor-toolbar {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: flex-start !important;
  gap: 7px !important;
  overflow: visible !important;
}
.article-tool-section {
  flex: 0 1 230px;
  min-width: 180px !important;
  max-width: 100%;
}
.article-tool-section.author-tools { flex-basis: 180px; }
.article-tool-section.typography-tools {
  flex: 1 1 430px;
  min-width: min(430px, 100%) !important;
}
.article-tool-section.formatting-tools { flex-basis: 190px; }
.article-tool-section.insertion-tools { flex: 1 1 260px; }
.article-tool-section-controls {
  min-width: 0;
}
.article-tool-section.typography-tools .article-tool-section-controls {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(125px, 1fr));
  align-items: center;
  gap: 6px !important;
}
.article-toolbar-select-wrap,
.article-tool-section.typography-tools .article-toolbar-select-wrap,
.article-toolbar-select-wrap.font-family-select,
.article-toolbar-select-wrap.font-size-select,
.article-toolbar-select-wrap.text-align-select,
.article-toolbar-select-wrap.block-style-select {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
}
.article-toolbar-select,
.article-toolbar-select-wrap .article-toolbar-select,
.article-toolbar-select-wrap.font-family-select .article-toolbar-select,
.article-toolbar-select-wrap.font-size-select .article-toolbar-select,
.article-toolbar-select-wrap.text-align-select .article-toolbar-select,
.article-toolbar-select-wrap.block-style-select .article-toolbar-select {
  display: block;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  height: 32px;
  padding: 0 28px 0 9px !important;
  text-overflow: ellipsis;
}

/* Métadonnées : composition éditoriale en cartes, image non figée. */
.article-settings {
  max-height: min(52vh, 590px) !important;
  overflow: auto !important;
  background: #e9e5dc !important;
}
.article-settings-grid {
  display: grid !important;
  grid-template-columns: minmax(280px, 1fr) minmax(280px, 1fr) !important;
  gap: 10px !important;
  align-items: start !important;
  padding: 10px !important;
}
.article-settings-primary {
  display: contents !important;
}
.article-settings-section.publication-section { grid-column: 1 / -1 !important; grid-row: 1; }
.article-settings-section.classification-section { grid-column: 1 / -1 !important; grid-row: 2; }
.article-settings-section.validation-section { grid-column: 1 !important; grid-row: 3; }
.article-settings-section.review-section { grid-column: 1 / -1 !important; grid-row: 4; }
.article-settings-media {
  grid-column: 2 !important;
  grid-row: 3;
  position: static !important;
  top: auto !important;
  align-self: start !important;
  min-width: 0;
}
.article-settings-section,
.article-featured-panel.open {
  border: 1px solid rgba(17,17,17,.12) !important;
  border-radius: 10px !important;
  background: rgba(255,255,255,.96) !important;
  box-shadow: 0 3px 12px rgba(17,17,17,.045) !important;
}
.article-settings-section-toggle,
.article-section-toggle {
  min-width: 0;
}
.article-settings-section-toggle span,
.article-section-summary {
  overflow: hidden;
  text-overflow: ellipsis;
}
.article-settings-section-content {
  min-width: 0;
}
.article-settings-top {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(180px, 1fr)) !important;
  gap: 11px !important;
  align-items: start !important;
}
.article-settings-top .article-visibility-field {
  grid-column: 1 / -1 !important;
}
.article-format-field,
.article-author-field {
  min-width: 0;
}
.article-format-field select,
.article-author-field select {
  min-width: 0;
  max-width: 100%;
}
.article-visibility-field {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 9px 18px !important;
  min-width: 0 !important;
  overflow: visible !important;
  padding: 11px 12px !important;
  background: #faf9f6;
}
.article-visibility-field legend {
  grid-column: 1 / -1 !important;
  padding: 0 3px;
}
.article-segmented-control {
  min-width: 0 !important;
  width: max-content;
  max-width: 100%;
}
.article-review-permission {
  display: grid !important;
  grid-template-columns: 17px minmax(0,1fr);
  align-items: start !important;
  gap: 8px !important;
  min-width: 0 !important;
  width: 100%;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: visible !important;
}
.article-review-permission input {
  width: 14px;
  height: 14px;
  margin: 1px 0 0 !important;
}
.article-review-permission span {
  min-width: 0;
}
.article-review-permission strong,
.article-review-permission small {
  display: block;
  max-width: none;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
}
.article-review-permission small {
  margin-top: 3px;
  line-height: 1.35 !important;
}
.article-taxonomy-field {
  display: grid !important;
  grid-template-columns: minmax(180px, .42fr) minmax(280px, 1fr) !important;
  gap: 11px !important;
  min-width: 0;
}
.article-keywords-field,
.article-keyword-editor,
.article-validator-selects,
.article-validators-field {
  min-width: 0;
}
.article-validator-selects {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 7px !important;
}
.article-validator-select-field select {
  min-width: 0;
  text-overflow: ellipsis;
}

/* Image liée : la carte n'occupe de place que lorsqu'elle est ouverte. */
.article-featured-panel {
  min-height: 0 !important;
  height: auto !important;
  overflow: hidden;
}
.article-featured-panel:not(.open) {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.article-featured-panel:not(.open) .article-section-toggle {
  min-height: 38px !important;
  border: 1px solid rgba(17,17,17,.12) !important;
  border-radius: 9px !important;
  background: rgba(255,255,255,.96) !important;
  box-shadow: 0 3px 12px rgba(17,17,17,.04);
}
.article-featured-panel.open .article-section-toggle {
  border-bottom: 1px solid rgba(17,17,17,.09) !important;
}
.article-featured-content {
  background: #fff;
}
.article-featured-dropzone {
  min-height: 148px !important;
  border: 1px dashed rgba(17,17,17,.38) !important;
  border-radius: 7px !important;
  background: #fff !important;
}
.article-featured-dropzone.has-image {
  min-height: 0 !important;
}

@container article-editor-window (max-width: 900px) {
  .article-settings-grid {
    grid-template-columns: 1fr !important;
    grid-template-areas: none !important;
  }
  .article-settings-section.publication-section { grid-column: 1 !important; grid-row: 1; }
  .article-settings-section.classification-section { grid-column: 1 !important; grid-row: 2; }
  .article-settings-media { grid-column: 1 !important; grid-row: 3; }
  .article-settings-section.validation-section { grid-column: 1 !important; grid-row: 4; }
  .article-settings-section.review-section { grid-column: 1 !important; grid-row: 5; }
  .article-settings-top {
    grid-template-columns: repeat(2, minmax(150px,1fr)) !important;
  }
  .article-taxonomy-field { grid-template-columns: 1fr !important; }
  .article-validator-selects { grid-template-columns: 1fr !important; }
}
@container article-editor-window (max-width: 470px) {
  .article-settings-top { grid-template-columns: 1fr !important; }
  .article-settings-top .article-visibility-field { grid-column: auto !important; }
  .article-visibility-field { grid-template-columns: 1fr !important; }
  .article-segmented-control { width: 100%; }
  .article-tool-section.typography-tools .article-tool-section-controls { grid-template-columns: 1fr; }
}


/* =========================================================
   PLANCHE OBLIQUE 2.1 — ergonomie des métadonnées et utilitaires
   ========================================================= */
.tool-rail { overscroll-behavior: contain; }
.tool-rail-spacer { flex: 1 1 18px; min-height: 12px; }
.tool-rail-utility-divider { margin-top: 4px; }
.tool-rail .tool-utility-button { flex: 0 0 auto; }
.tool-rail .tool-utility-button .tool-glyph { position: relative; }
.tool-rail .trash-button b {
  position: absolute; right: -6px; top: -5px; min-width: 15px; height: 15px; padding: 0 4px;
  display: grid; place-items: center; border-radius: 9px; background: #fe0000; color: #fff;
  font: 800 8px/1 var(--ui-font); box-shadow: 0 0 0 2px rgba(240,240,237,.96);
}
.tool-rail .trash-button.drag-target { background: #111; color: #fff; border-color: #111; }
.workspace-utility-dock { display: none !important; }

/* Mode public : aucun chemin Home/dossier ; le bouton devient le retour au privé. */
body.public-library-mode .path-navigation,
body.public-library-mode .brand-path-slash,
body.public-library-mode .path-history-actions,
body.public-library-mode #tree-toggle { display: none !important; }
body.public-library-mode .public-library-button { margin-left: auto; }

/* Métadonnées : le volet parent défile, jamais la section elle-même. */
.article-settings {
  max-height: none !important;
  height: auto !important;
  overflow: visible !important;
  background: #ece8df !important;
  flex: 0 0 auto !important;
}
.article-settings-grid { display: block !important; padding: 10px !important; }
.article-settings-primary {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
  align-items: start !important;
}
.article-settings-primary > .publication-section,
.article-settings-primary > .classification-section,
.article-settings-primary > .review-section { grid-column: 1 / -1 !important; grid-row: auto !important; }
.article-settings-primary > .validation-section,
.article-settings-primary > .featured-section { grid-column: auto !important; grid-row: auto !important; }
.article-settings-section,
.article-featured-panel { min-width: 0; align-self: start; }
.article-settings-media { display: none !important; }
.article-settings-section-toggle,
.article-section-toggle { min-height: 38px !important; }
.article-settings-section.is-collapsed,
.article-featured-panel:not(.open) { min-height: 38px !important; height: 38px !important; overflow: hidden !important; }
.article-featured-panel:not(.open) .article-section-toggle { height: 38px !important; }

/* Publication : auteur verrouillé + collaboration lisible. */
.article-settings-top {
  display: grid !important;
  grid-template-columns: minmax(150px,.65fr) minmax(260px,1.35fr) !important;
  gap: 10px !important;
}
.article-settings-top .article-visibility-field { grid-column: 1 / -1 !important; }
.article-author-field { display: grid; gap: 7px; min-width: 0; }
.article-author-field > span,
.article-collaboration-field legend {
  color: #111; font: 900 8px/1 var(--condensed-font); letter-spacing: .12em;
}
.article-principal-author {
  width: 100%; min-height: 42px; display: grid; grid-template-columns: 28px minmax(0,1fr); grid-template-rows: auto auto;
  gap: 1px 8px; align-items: center; padding: 6px 8px; border: 1px solid rgba(17,17,17,.15); border-radius: 7px;
  background: #fff; color: #111; text-align: left; cursor: pointer;
}
.article-principal-author > b { grid-row: 1 / 3; width: 27px; height: 27px; display:grid; place-items:center; border-radius:50%; background:#111; color:#fff; font:800 9px var(--ui-font); }
.article-principal-author > span { font: 700 11px var(--ui-font); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.article-principal-author > small { color:#817b73; font: 8px var(--ui-font); }
.article-collaboration-field { margin: 0; padding: 8px; border: 1px solid rgba(17,17,17,.12); border-radius: 7px; background: #faf9f6; }
.article-collaboration-field legend { padding: 0 4px; }
.article-collaboration-users { display: flex; flex-wrap: wrap; gap: 5px 8px; }
.article-collaboration-users > label { display: inline-grid; grid-template-columns: 14px auto; gap: 5px; align-items: center; min-width: 120px; cursor: pointer; }
.article-collaboration-users input { width: 13px; height: 13px; margin:0; }
.article-collaboration-users span { display:grid; }
.article-collaboration-users b { font:700 9px var(--ui-font); }
.article-collaboration-users small { color:#888178; font:7px var(--ui-font); }
.article-collaboration-empty { color:#817b73; font:9px var(--ui-font); }

/* Classement : saisie à gauche, répertoire toujours visible à droite. */
.article-taxonomy-field { grid-template-columns: minmax(170px,.38fr) minmax(380px,1fr) !important; align-items:start; }
.article-keywords-field {
  display: grid !important;
  grid-template-columns: minmax(220px, .9fr) minmax(220px, 1.1fr) !important;
  grid-template-areas: "heading heading" "editor library";
  column-gap: 12px; row-gap: 6px; align-items:start;
}
.article-keywords-field .article-field-heading { grid-area: heading; }
.article-keyword-editor { grid-area: editor; min-height: 42px; }
.article-keyword-library-inline { grid-area: library; min-width:0; padding: 2px 0 0; }
.article-keyword-library-label { margin: 0 0 6px; color:#8a837b; font:900 7px/1 var(--condensed-font); letter-spacing:.12em; }
.article-keyword-library-list { display:flex !important; flex-wrap:wrap; gap:5px 10px; max-height:none !important; overflow:visible !important; padding:0 !important; border:0 !important; background:transparent !important; }
.article-keyword-library-list .shared-keyword-chip {
  width:auto !important; min-height:0 !important; padding:2px 0 !important; border:0 !important; border-radius:0 !important;
  background:transparent !important; color:#504b45 !important; box-shadow:none !important; font: 500 10px var(--ui-font); cursor:grab;
}
.article-keyword-library-list .shared-keyword-chip:hover { color:#fe0000 !important; transform:none !important; }
.article-keyword-library-list .shared-keyword-chip strong { font:inherit; }
.article-keyword-library-list .shared-keyword-chip sup { margin-left:2px; color:#a09a92; font:700 7px var(--ui-font); }

/* L'image liée suit le flux naturel et disparaît réellement quand elle est repliée. */
.article-featured-panel.featured-section { position: static !important; top:auto !important; }
.article-featured-panel.featured-section:not(.open) { border: 1px solid rgba(17,17,17,.12) !important; border-radius:10px !important; background:#fff !important; box-shadow:0 3px 12px rgba(17,17,17,.035) !important; }
.article-featured-panel.featured-section:not(.open) .article-section-toggle { border:0 !important; box-shadow:none !important; background:transparent !important; }
.article-featured-dropzone { background:#fff !important; }

@container article-editor-window (max-width: 820px) {
  .article-settings-primary { grid-template-columns: 1fr !important; }
  .article-settings-primary > * { grid-column: 1 !important; }
  .article-settings-top { grid-template-columns: 1fr !important; }
  .article-taxonomy-field { grid-template-columns: 1fr !important; }
  .article-keywords-field { grid-template-columns:1fr !important; grid-template-areas:"heading" "editor" "library"; }
}

/* =========================================================
   PLANCHE OBLIQUE 2.1 — flux vertical réellement naturel
   Les métadonnées forment une pile dans le flux du document.
   Aucune carte ouverte n'est comprimée par la hauteur du volet.
   ========================================================= */
.article-pane-content {
  min-height: 0 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.article-pane-content > .article-body {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  height: auto !important;
  min-height: 100% !important;
  max-height: none !important;
  overflow: visible !important;
}
.article-pane-content .article-focus-controls,
.article-pane-content .article-editor-toolbar,
.article-pane-content .article-settings,
.article-pane-content .article-chapo-strip,
.article-pane-content .article-toc-panel,
.article-pane-content .article-statusbar {
  position: static !important;
  flex: 0 0 auto !important;
}
.article-pane-content .article-settings {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
  contain: none !important;
}
.article-pane-content .article-settings.article-bar-collapsed {
  display: none !important;
}
.article-pane-content .article-settings-grid {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
  padding: 10px !important;
}
.article-pane-content .article-settings-primary {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  gap: 10px !important;
  overflow: visible !important;
}
.article-pane-content .article-settings-primary > .article-settings-section,
.article-pane-content .article-settings-primary > .article-featured-panel {
  position: static !important;
  display: block !important;
  flex: 0 0 auto !important;
  grid-column: auto !important;
  grid-row: auto !important;
  align-self: stretch !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  margin: 0 !important;
}
.article-pane-content .article-settings-section:not(.is-collapsed),
.article-pane-content .article-featured-panel.open {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
}
.article-pane-content .article-settings-section:not(.is-collapsed) > .article-settings-section-content,
.article-pane-content .article-featured-panel.open > .article-featured-content {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
}
.article-pane-content .article-settings-section.is-collapsed,
.article-pane-content .article-featured-panel:not(.open) {
  height: 38px !important;
  min-height: 38px !important;
  max-height: 38px !important;
  overflow: hidden !important;
}
.article-pane-content .article-settings-section.is-collapsed > .article-settings-section-content,
.article-pane-content .article-featured-panel:not(.open) > .article-featured-content {
  display: none !important;
}
.article-pane-content .article-settings-section-toggle,
.article-pane-content .article-section-toggle {
  position: relative !important;
  width: 100% !important;
  min-height: 38px !important;
  flex: 0 0 38px !important;
}
.article-pane-content .article-layout {
  position: relative !important;
  flex: 1 0 440px !important;
  width: 100% !important;
  min-height: 440px !important;
  overflow: hidden !important;
}
@container article-editor-window (max-width: 820px) {
  .article-pane-content .article-settings-primary {
    display: flex !important;
  }
}



/* =====================================================================
   PLANCHE OBLIQUE 2.1 — relecture éditoriale, validation et interactions
   ===================================================================== */

/* Suppression des commandes flottantes Dupliquer / Supprimer. */
#duplicate-item, #delete-item { display:none !important; }
.selection-toolbar:has(#selection-count:empty),
.selection-toolbar:not(:has(#selection-count:not(.hidden))) { display:none !important; }

/* Infobulle Oblique instantanée, sans latence native. */
.oblique-live-tooltip {
  position: fixed; z-index: 1000000; pointer-events: none; opacity: 0;
  max-width: 290px; padding: 8px 10px 8px 13px;
  background: #111; color: #fff; border-radius: 2px;
  box-shadow: 0 8px 24px rgba(17,17,17,.22);
  font: 600 11px/1.3 var(--ui-font,Arial,sans-serif);
  transform: translate(9px,9px); transition: opacity .035s linear;
}
.oblique-live-tooltip::before {
  content:""; position:absolute; left:0; top:0; bottom:0; width:3px; background:#fe0000;
}
.oblique-live-tooltip.visible { opacity:1; }
[data-annotation-author], [data-tooltip-author] { cursor: help; }

/* Lecteur public agrandissable à tout l’espace de travail. */
.public-reader-header { grid-template-columns: minmax(0,1fr) 40px 40px !important; }
.public-reader-maximize {
  width:40px; height:100%; border:0; border-left:1px solid rgba(255,255,255,.14);
  background:#111; color:#fff; cursor:pointer; font:18px/1 var(--ui-font);
}
.public-reader-maximize:hover { background:#282828; }
.public-reader-dialog.public-reader-maximized {
  width:100vw !important; height:100vh !important; max-width:none !important; max-height:none !important;
  margin:0 !important; inset:0 !important; border-radius:0 !important;
}
.public-reader-dialog.public-reader-maximized::backdrop { background:transparent; }

/* Validation visible dans les deux éditeurs. */
.article-validation-public,
.article-validation-complete {
  display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px;
  padding:10px 12px; border-top:1px solid rgba(17,17,17,.13); background:#f7f4ed;
  font-family:var(--ui-font,Arial,sans-serif);
}
.article-validation-public strong,
.article-validation-complete strong { font-size:10px; letter-spacing:.1em; text-transform:uppercase; }
.article-validation-names { display:flex; flex-wrap:wrap; gap:5px; }
.article-validation-names span {
  padding:4px 8px; border-radius:999px; background:#111; color:#fff;
  font:700 10px/1.2 var(--ui-font,Arial,sans-serif);
}
.article-validation-action,
.article-ready-button {
  margin-left:auto; min-height:30px; padding:0 11px; border:1px solid #111; border-radius:999px;
  background:#fff; color:#111; cursor:pointer; font:800 9px var(--condensed-font,Arial,sans-serif); letter-spacing:.08em;
}
.article-validation-action:hover,
.article-ready-button:hover,
.article-ready-button.active { background:#111; color:#fff; }
.article-ready-button.active::before { content:"✓ "; }
.article-validator-selects.is-complete { display:none !important; }

/* Auteurs et préparateur distincts. */
.article-author-field-v21 { display:grid; gap:10px; min-width:0; }
.article-author-fields-grid { display:grid; grid-template-columns:minmax(0,1.2fr) minmax(0,.8fr); gap:9px; }
.article-byline-field, .article-referent-field { display:grid; gap:5px; min-width:0; }
.article-byline-field > span, .article-referent-field > span {
  font:900 8px var(--condensed-font,Arial,sans-serif); letter-spacing:.12em;
}
.article-byline-field input {
  width:100%; min-height:38px; border:1px solid rgba(17,17,17,.22); border-radius:6px;
  padding:0 10px; background:#fff; font:13px var(--ui-font,Arial,sans-serif);
}
.article-referent-card {
  min-height:38px; display:flex; align-items:center; gap:8px; padding:5px 9px;
  border:1px solid rgba(17,17,17,.15); border-radius:6px; background:#f6f3ed;
}
.article-referent-card b { width:24px; height:24px; display:grid; place-items:center; border-radius:50%; background:#111; color:#fff; font-size:8px; }
.article-referent-card span { font:700 11px var(--ui-font); }
.article-referent-card small { display:block; color:#817b72; font-size:9px; }
@container article-editor-window (max-width:700px) { .article-author-fields-grid { grid-template-columns:1fr; } }

/* Mot-dièses : cartouches noirs immédiatement visibles. */
.shared-keyword-library { background:transparent !important; border:0 !important; padding:0 !important; }
.shared-keyword-library-list { display:flex !important; flex-wrap:wrap; align-items:center; gap:5px !important; }
.shared-keyword-library-list::before {
  content:"GLISSER-DÉPOSER DANS LE CHAMP :"; margin-right:3px; color:#716b63;
  font:800 7px var(--condensed-font,Arial,sans-serif); letter-spacing:.1em;
}
.shared-keyword-chip {
  border:0 !important; border-radius:999px !important; background:#111 !important; color:#fff !important;
  min-height:24px !important; padding:4px 8px !important; box-shadow:none !important;
}
.shared-keyword-chip:hover { background:#fe0000 !important; }
.shared-keyword-chip sup { color:#cfcac2; margin-left:4px; }

/* Chapô : filet rouge à gauche. */
.article-chapo-field { padding-left:25px !important; padding-right:18px !important; }
.article-chapo-field::after { left:12px !important; right:auto !important; }
.article-chapo-editor { padding-left:4px !important; padding-right:0 !important; }

/* Publication intégrée à la fenêtre d’article. */
.article-inline-publish {
  display:grid; grid-template-rows:auto minmax(260px,1fr) auto; min-height:420px;
  border-bottom:1px solid rgba(17,17,17,.14); background:#f7f4ed;
}
.article-inline-publish.hidden { display:none !important; }
.article-inline-publish-tabs { display:flex; border-bottom:1px solid #111; background:#fff; }
.article-inline-publish-tabs button {
  flex:0 0 auto; min-height:38px; padding:0 15px; border:0; border-right:1px solid rgba(17,17,17,.16);
  background:#fff; cursor:pointer; font:900 9px var(--condensed-font); letter-spacing:.1em;
}
.article-inline-publish-tabs button.active { background:#111; color:#fff; }
.article-inline-publish-panel { min-height:0; padding:12px; }
.article-inline-publish-panel textarea { width:100%; height:100%; min-height:300px; resize:none; border:1px solid #bbb4aa; padding:12px; font:12px/1.45 monospace; }
.article-inline-publish-panel iframe { width:100%; height:100%; min-height:420px; border:1px solid #bbb4aa; background:#fff; }
.article-inline-publish-actions { display:flex; gap:8px; align-items:center; justify-content:flex-end; padding:9px 12px; border-top:1px solid rgba(17,17,17,.14); background:#fff; }
.article-inline-publish-actions button { min-height:32px; padding:0 12px; border:1px solid #111; border-radius:999px; background:#fff; font:800 9px var(--condensed-font); letter-spacing:.08em; cursor:pointer; }
.article-inline-publish-actions button:last-child { background:#111; color:#fff; }

/* Boutons Chat dans les articles. */
.article-chat-button, .public-article-chat-button {
  min-height:29px; padding:0 10px; border:1px solid rgba(17,17,17,.22); border-radius:999px;
  background:#fff; color:#111; cursor:pointer; font:800 8px var(--condensed-font); letter-spacing:.09em;
}
.article-chat-button:hover, .public-article-chat-button:hover { background:#111; color:#fff; }
.public-article-card { position:relative; }
.public-article-chat-button { position:absolute; right:10px; top:10px; z-index:3; }
.chat-article-context {
  display:flex; align-items:center; gap:8px; padding:8px 10px; border-bottom:1px solid rgba(17,17,17,.15); background:#f3efe5;
}
.chat-article-context strong { font:900 9px var(--condensed-font); letter-spacing:.08em; }
.chat-article-context span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font:11px var(--ui-font); }
.chat-article-context button { margin-left:auto; border:0; background:transparent; cursor:pointer; }
.chat-article-ref {
  width:100%; margin-top:7px; padding:7px 8px; border:1px solid rgba(17,17,17,.18); border-radius:6px;
  background:#f7f4ed; text-align:left; cursor:pointer;
}
.chat-article-ref strong { display:block; font:800 10px var(--ui-font); }
.chat-article-ref span { display:block; color:#77716a; font:8px var(--condensed-font); letter-spacing:.09em; }
.chat-access-note { padding:7px 10px; color:#7c332f; background:#fff0ed; font:10px/1.35 var(--ui-font); }

/* Aide : dimensions fixes, panneaux arrondis, bouton public. */
.tutorial-dialog { width:min(860px,calc(100vw - 32px)) !important; height:min(650px,calc(100vh - 32px)) !important; }
.tutorial-shell { height:100%; grid-template-rows:auto minmax(0,1fr) auto !important; border-radius:18px; overflow:hidden; }
.tutorial-pages { min-height:0; overflow:hidden; }
.tutorial-page { height:100%; overflow:auto; padding:34px 42px !important; border-radius:14px; }
.tutorial-page p { max-width:72ch; font-size:14px; line-height:1.62; }
.tutorial-callout { border-radius:12px !important; padding:13px 15px !important; }
.public-help-button {
  position:absolute; left:16px; bottom:16px; z-index:20; width:42px; height:42px; display:grid; place-items:center;
  border:1px solid #111; border-radius:10px; background:#fff; cursor:pointer; box-shadow:0 5px 15px rgba(17,17,17,.12);
}
.public-help-button svg { width:22px; height:22px; fill:none; stroke:#111; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; }
.public-help-button:hover { background:#111; }
.public-help-button:hover svg { stroke:#fff; }
.public-library { position:absolute; }
.public-library-authors > button:first-child { font:inherit !important; letter-spacing:inherit !important; text-transform:none !important; }

/* Poignée basse de redimensionnement. */
.article-pane-bottom-resizer {
  position:absolute; left:12px; right:12px; bottom:-5px; height:10px; z-index:90; cursor:ns-resize;
}
.article-pane-bottom-resizer::after { content:""; position:absolute; left:0; right:0; top:4px; height:1px; background:transparent; }
.article-pane-bottom-resizer:hover::after, .article-pane-bottom-resizing .article-pane-bottom-resizer::after { background:#fe0000; }

/* Glisser une image du canevas jusque dans l’éditeur. */
.workspace-image-dragging .board-item { pointer-events:none; }
.workspace-image-dragging .article-pane, .workspace-image-dragging .article-pane * { pointer-events:auto; }
.workspace-image-drag-proxy {
  position:fixed; z-index:1000001; width:180px; max-height:130px; object-fit:cover; pointer-events:none;
  opacity:.68; border:2px dashed #111; border-radius:9px; box-shadow:0 12px 35px rgba(17,17,17,.24);
  transform:translate(12px,12px); background:#fff;
}
.workspace-image-drag-origin { opacity:.48 !important; outline:2px dashed #111; outline-offset:3px; }
.article-editor.workspace-image-drop-target,
.article-featured-dropzone.workspace-image-drop-target { outline:2px dashed #fe0000 !important; outline-offset:-4px; background:#fff7f4 !important; }

/* Listes à cocher : poignée, réordonnancement et suppression après validation. */
.list-row { grid-template-columns:15px 18px minmax(0,1fr) 24px !important; align-items:start; }
.list-row-grip { width:15px; height:24px; border:0; background:transparent; cursor:grab; opacity:.28; position:relative; }
.list-row-grip::before { content:""; position:absolute; inset:6px 4px; background:radial-gradient(circle,#111 1px,transparent 1.4px) 0 0/5px 5px; }
.list-row:hover .list-row-grip { opacity:.7; }
.list-row.dragging { opacity:.45; }
.list-row.list-drop-before { box-shadow:0 -2px 0 #fe0000; }
.list-row.list-drop-after { box-shadow:0 2px 0 #fe0000; }
.list-row.done .row-delete { opacity:.65 !important; }
.list-row.done .row-delete::after { content:" Supprimer"; position:absolute; left:100%; margin-left:4px; white-space:nowrap; opacity:0; pointer-events:none; }

/* Défilement de la fenêtre : contenu et métadonnées dans un flux unique. */
.article-pane-content { overscroll-behavior:contain; }
.article-pane-content > .article-body { overflow:auto !important; max-height:100% !important; }
.article-settings { overflow:visible !important; max-height:none !important; }
.article-settings-grid, .article-settings-primary { overflow:visible !important; }

@media (max-width:720px) {
  .article-validation-action, .article-ready-button { margin-left:0; }
  .tutorial-page { padding:25px 24px !important; }
}

/* Ajustement 2.1 : le filtre global des auteur·ices reprend exactement l’échelle des noms. */
.public-library-authors > button:first-child {
  font: 800 8px var(--condensed-font, Arial, sans-serif) !important;
  letter-spacing: .06em !important; text-transform: none !important; padding-left: 9px !important;
}


/* =========================================================
   22. PDF — cartes, lecteur et annotations
========================================================= */
.pdf-item {
  background: #fff !important;
  border-radius: 13px !important;
  overflow: visible;
}
.pdf-card-body {
  position: relative;
  width: 100%; height: 100%;
  display: grid;
  grid-template-rows: minmax(0, 1fr) 72px;
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
}
.pdf-card-preview {
  position: relative;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #e7e3dc;
  border-bottom: 1px solid rgba(17,17,17,.16);
}
.pdf-card-preview img { width: 100%; height: 100%; object-fit: contain; display: block; background: #d8d4cc; }
.pdf-card-placeholder { display:grid; gap:8px; place-items:center; text-align:center; font-family:"IBM Plex Sans",Arial,sans-serif; }
.pdf-card-placeholder strong { color:#fe0000; font-size:2.8rem; line-height:1; letter-spacing:-.08em; }
.pdf-card-placeholder span { font-size:.62rem; font-weight:700; letter-spacing:.12em; }
.pdf-card-info { min-width:0; padding:9px 12px 8px; display:grid; gap:3px; align-content:center; background:#fff; }
.pdf-card-title { width:100%; min-width:0; padding:0 !important; border:0 !important; background:transparent !important; font:700 .82rem/1.2 "IBM Plex Sans",Arial,sans-serif !important; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.pdf-card-meta { color:#6f6a63; font:500 .64rem/1.2 "IBM Plex Sans",Arial,sans-serif; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.pdf-card-hint { color:#111; font:700 .55rem/1 "IBM Plex Sans",Arial,sans-serif; letter-spacing:.1em; }

body.pdf-reader-open { overflow:hidden; }
.pdf-reader-overlay {
  position:fixed; inset:0; z-index:250000;
  display:grid; place-items:center;
  padding:18px;
  background:rgba(17,17,17,.64);
  backdrop-filter:blur(3px);
}
.pdf-reader-overlay.hidden { display:none !important; }
.pdf-reader-window {
  position:relative;
  width:min(1540px, calc(100vw - 36px));
  height:calc(100vh - 36px);
  min-width:760px; min-height:520px;
  display:grid; grid-template-rows:58px minmax(0,1fr);
  overflow:hidden;
  border:1px solid #111;
  border-radius:16px;
  background:#f5f2ec;
  box-shadow:0 36px 90px rgba(0,0,0,.34),0 4px 18px rgba(0,0,0,.18);
}
.pdf-reader-header {
  min-width:0;
  display:grid;
  grid-template-columns:minmax(180px,1fr) auto auto auto;
  align-items:stretch;
  gap:0;
  color:#fff; background:#111;
  font-family:"IBM Plex Sans",Arial,sans-serif;
}
.pdf-reader-heading { min-width:0; padding:8px 16px; display:flex; align-items:baseline; gap:12px; overflow:hidden; }
.pdf-reader-heading span { color:#fe0000; font-size:.63rem; font-weight:800; letter-spacing:.12em; white-space:nowrap; }
.pdf-reader-heading strong { min-width:0; font-size:.78rem; letter-spacing:.06em; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.pdf-reader-navigation,.pdf-reader-tools,.pdf-reader-window-actions { display:flex; align-items:center; border-left:1px solid rgba(255,255,255,.18); }
.pdf-reader-header button { height:100%; min-width:42px; padding:0 10px; border:0; border-radius:0; color:#fff; background:transparent; font:700 .61rem/1 "IBM Plex Sans",Arial,sans-serif; letter-spacing:.07em; cursor:pointer; }
.pdf-reader-header button:hover,.pdf-reader-header button.active { background:#fff; color:#111; }
.pdf-reader-header button:disabled { opacity:.25; pointer-events:none; }
.pdf-reader-navigation label { height:100%; display:flex; align-items:center; gap:5px; padding:0 9px; font-size:.72rem; }
.pdf-reader-navigation input { width:48px; padding:5px; border:1px solid rgba(255,255,255,.36); border-radius:5px; color:#fff; background:#111; text-align:center; font:700 .72rem "IBM Plex Sans",Arial,sans-serif; }
.pdf-reader-colors { height:100%; display:flex; align-items:center; gap:5px; padding:0 9px; border-left:1px solid rgba(255,255,255,.18); }
.pdf-reader-colors button { min-width:18px; width:18px; height:18px; padding:0; border:1px solid rgba(255,255,255,.55); border-radius:50%; background:var(--pdf-color); }
.pdf-reader-colors button.active { outline:2px solid #fff; outline-offset:2px; }
.pdf-reader-window-actions .pdf-reader-close { min-width:52px; font-size:1.25rem; }
.pdf-reader-window-actions .pdf-reader-close:hover { color:#fff; background:#fe0000; }
.pdf-reader-body { min-height:0; display:grid; grid-template-columns:minmax(0,1fr) 310px; overflow:hidden; }
.pdf-reader-workspace { position:relative; min-width:0; min-height:0; overflow:auto; display:grid; place-items:start center; padding:34px; background:#d9d6d0; background-image:radial-gradient(circle at center,rgba(17,17,17,.13) .7px,transparent .8px); background-size:12px 12px; }
.pdf-reader-page-stage { position:relative; margin:auto; box-shadow:0 12px 34px rgba(17,17,17,.2); background:#fff; }
.pdf-reader-page-stage.hidden { display:none; }
.pdf-reader-page-stage canvas { display:block; background:#fff; }
.pdf-reader-annotations { position:absolute; inset:0 auto auto 0; touch-action:none; }
.pdf-reader-annotations[data-tool="highlight"],.pdf-reader-annotations[data-tool="comment"] { cursor:crosshair; }
.pdf-reader-annotations[data-tool="select"] { cursor:default; }
.pdf-annotation,.pdf-annotation-draft { position:absolute; box-sizing:border-box; margin:0; padding:0; }
.pdf-annotation { z-index:3; border:0; cursor:pointer; }
.pdf-annotation-highlight { background:color-mix(in srgb,var(--annotation-color) 40%,transparent); mix-blend-mode:multiply; box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--annotation-color) 78%,#111); }
.pdf-annotation-comment { display:flex; align-items:flex-start; justify-content:flex-end; background:color-mix(in srgb,var(--annotation-color) 18%,transparent); border:1px dashed #fe0000; }
.pdf-annotation-comment span { width:15px; height:15px; margin:-8px -8px 0 0; display:grid; place-items:center; border-radius:50%; color:#fff; background:#fe0000; font-size:8px; box-shadow:0 2px 5px rgba(0,0,0,.2); }
.pdf-annotation[data-tooltip]::after { content:attr(data-tooltip); position:absolute; left:50%; bottom:calc(100% + 7px); z-index:20; width:max-content; max-width:260px; padding:7px 9px; border-left:3px solid #fe0000; border-radius:3px; color:#fff; background:#111; font:600 .66rem/1.35 "IBM Plex Sans",Arial,sans-serif; white-space:pre-line; opacity:0; transform:translate(-50%,3px); pointer-events:none; transition:none; }
.pdf-annotation[data-tooltip]:hover::after { opacity:1; transform:translate(-50%,0); }
.pdf-annotation.flash { animation:pdfAnnotationFlash .9s ease; }
@keyframes pdfAnnotationFlash { 0%,100%{filter:none} 35%{filter:drop-shadow(0 0 8px #fe0000);outline:3px solid #fe0000} }
.pdf-annotation-draft { z-index:6; border:1px dashed #111; background:color-mix(in srgb,var(--annotation-color) 35%,transparent); }
.pdf-annotation-draft-comment { border-color:#fe0000; }
.pdf-reader-loading { position:absolute; inset:0; z-index:10; display:grid; place-items:center; color:#111; background:rgba(245,242,236,.86); font:800 .72rem "IBM Plex Sans",Arial,sans-serif; letter-spacing:.12em; }
.pdf-reader-loading.hidden { display:none; }
.pdf-reader-sidebar { min-height:0; display:grid; grid-template-rows:54px minmax(0,1fr); border-left:1px solid #111; background:#fbfaf6; }
.pdf-reader-sidebar>header { padding:8px 12px; display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid #d4d0c8; }
.pdf-reader-sidebar>header div { display:grid; }
.pdf-reader-sidebar>header span { color:#fe0000; font:800 .55rem "IBM Plex Sans",Arial,sans-serif; letter-spacing:.12em; }
.pdf-reader-sidebar>header strong { font:800 .72rem "IBM Plex Sans",Arial,sans-serif; letter-spacing:.08em; }
.pdf-reader-sidebar>header b { min-width:25px; height:25px; display:grid; place-items:center; border-radius:50%; color:#fff; background:#111; font:700 .68rem "IBM Plex Sans",Arial,sans-serif; }
.pdf-reader-annotation-list { min-height:0; overflow:auto; padding:10px; }
.pdf-reader-empty { padding:28px 14px; text-align:center; color:#6e6962; }
.pdf-reader-empty strong { color:#111; font:800 .65rem "IBM Plex Sans",Arial,sans-serif; letter-spacing:.1em; }
.pdf-reader-empty p { font:.78rem/1.45 "Newsreader",Georgia,serif; }
.pdf-annotation-card { padding:10px 10px 9px; margin-bottom:8px; border:1px solid #d4d0c8; border-radius:8px; background:#fff; cursor:pointer; }
.pdf-annotation-card:hover { border-color:#111; }
.pdf-annotation-card header { display:flex; justify-content:space-between; align-items:center; margin-bottom:6px; }
.pdf-annotation-card header span { color:#6e6962; font:700 .54rem "IBM Plex Sans",Arial,sans-serif; letter-spacing:.08em; }
.pdf-annotation-card header button { width:20px; height:20px; border:0; border-radius:50%; background:#f0ede7; cursor:pointer; }
.pdf-annotation-card>strong { display:block; font:700 .7rem "IBM Plex Sans",Arial,sans-serif; }
.pdf-annotation-card p { margin:6px 0; font:.82rem/1.38 "Newsreader",Georgia,serif; }
.pdf-annotation-card time { color:#827d75; font:500 .58rem "IBM Plex Sans",Arial,sans-serif; }
.pdf-annotation-card-highlight { border-left:5px solid #ffe45c; }
.pdf-annotation-card-comment { border-left:5px solid #fe0000; }
.pdf-comment-composer { position:absolute; right:326px; bottom:18px; z-index:30; width:min(390px,calc(100% - 370px)); padding:13px; border:1px solid #111; border-radius:10px; background:#fff; box-shadow:0 15px 40px rgba(0,0,0,.23); }
.pdf-comment-composer.hidden { display:none; }
.pdf-comment-composer label { display:block; margin-bottom:7px; font:800 .62rem "IBM Plex Sans",Arial,sans-serif; letter-spacing:.1em; }
.pdf-comment-composer textarea { width:100%; min-height:100px; resize:vertical; padding:10px; border:1px solid #aaa59d; border-radius:7px; font:.9rem/1.45 "Newsreader",Georgia,serif; }
.pdf-comment-composer footer { display:flex; justify-content:flex-end; gap:7px; margin-top:8px; }
.pdf-comment-composer button { padding:8px 11px; border:1px solid #111; border-radius:6px; background:#fff; font:700 .6rem "IBM Plex Sans",Arial,sans-serif; letter-spacing:.08em; cursor:pointer; }
.pdf-comment-composer button[type="submit"] { color:#fff; background:#111; }
.pdf-reader-native-fallback { width:100%; min-height:100%; display:grid; grid-template-rows:auto minmax(500px,1fr); gap:12px; }
.pdf-reader-native-fallback.hidden { display:none; }
.pdf-reader-native-fallback iframe { width:min(100%,1000px); height:calc(100vh - 180px); margin:auto; border:1px solid #111; background:#fff; }
.pdf-reader-fallback-message { width:min(780px,100%); margin:auto; padding:12px 15px; border-left:4px solid #fe0000; background:#fff; }
.pdf-reader-fallback-message strong { font:800 .68rem "IBM Plex Sans",Arial,sans-serif; letter-spacing:.1em; }
.pdf-reader-fallback-message p { margin:5px 0 0; font:.78rem/1.4 "Newsreader",Georgia,serif; }
@media (max-width:1050px) {
  .pdf-reader-header { grid-template-columns:minmax(140px,1fr) auto auto; }
  .pdf-reader-tools { position:absolute; left:16px; top:68px; z-index:40; height:42px; border:1px solid #111; border-radius:8px; overflow:hidden; background:#111; box-shadow:0 5px 16px rgba(0,0,0,.2); }
  .pdf-reader-workspace { padding-top:84px; }
  .pdf-reader-body { grid-template-columns:minmax(0,1fr) 260px; }
}
@media (max-width:780px) {
  .pdf-reader-overlay { padding:0; }
  .pdf-reader-window { width:100vw; height:100vh; min-width:0; min-height:0; border:0; border-radius:0; }
  .pdf-reader-body { grid-template-columns:1fr; }
  .pdf-reader-sidebar { position:absolute; right:0; top:58px; bottom:0; width:min(300px,86vw); z-index:35; box-shadow:-10px 0 25px rgba(0,0,0,.18); }
  .pdf-reader-heading span { display:none; }
  .pdf-reader-navigation input { width:40px; }
  .pdf-reader-header { grid-template-columns:minmax(80px,1fr) auto auto; }
  .pdf-reader-window-actions [data-pdf-action="download"] { display:none; }
}

/* =====================================================================
   PLANCHE OBLIQUE 2.3 — corrections de mise en page et d’interaction
   ===================================================================== */

/* Publier occupe toute la hauteur utile du volet Article. */
.article-body.article-publish-mode { height:100% !important; min-height:0 !important; overflow:hidden !important; }
.article-body.article-publish-mode > :not(.article-focus-controls):not(.article-inline-publish) { display:none !important; }
.article-body.article-publish-mode .article-focus-controls { flex:0 0 auto !important; }
.article-inline-publish-full { flex:1 1 auto !important; min-height:0 !important; height:auto !important; grid-template-rows:auto minmax(0,1fr) auto !important; overflow:hidden; }
.article-inline-publish-full .article-inline-publish-panel { min-height:0 !important; height:100% !important; overflow:hidden; }
.article-inline-publish-full .article-inline-publish-panel textarea,
.article-inline-publish-full .article-inline-publish-panel iframe { width:100%; height:100% !important; min-height:0 !important; }

/* Chat : contexte et canal en tête, messages seuls extensibles. */
.chat-drawer.chat-layout-v23 { display:flex !important; flex-direction:column !important; }
.chat-layout-v23 > .chat-drawer-header,
.chat-layout-v23 > .chat-article-context,
.chat-layout-v23 > .chat-recipient-row,
.chat-layout-v23 > .chat-access-note,
.chat-layout-v23 > .chat-form,
.chat-layout-v23 > footer { flex:0 0 auto !important; }
.chat-layout-v23 > .chat-messages { flex:1 1 auto !important; min-height:0 !important; }

/* Notes et état éditorial dans la relecture publique. */
.public-reader-footnotes { position:relative; z-index:2; margin:0 42px 34px 58px; padding:18px 0 0; border-top:1px solid #111; background:#fff; user-select:text; }
.public-reader-footnotes h3 { margin:0 0 12px; font:900 8px var(--condensed-font,Arial,sans-serif); letter-spacing:.15em; }
.public-reader-footnotes ol { display:grid; gap:9px; margin:0; padding:0; list-style:none; }
.public-reader-footnotes li { display:grid; grid-template-columns:26px minmax(0,1fr); gap:8px; align-items:start; font:13px/1.48 var(--editorial-font); }
.public-footnote-number { width:23px; height:23px; border:0; border-radius:50%; background:#111; color:#fff; cursor:pointer; font:800 9px var(--ui-font); }
.public-footnote-link { color:var(--accent) !important; cursor:pointer !important; }
.public-ready-for-publication { padding:8px 14px; border-top:1px solid rgba(17,17,17,.12); border-bottom:1px solid rgba(17,17,17,.12); background:#111; color:#fff; text-align:center; font:900 8px var(--condensed-font,Arial,sans-serif); letter-spacing:.14em; }
.public-card-ready { position:absolute; left:10px; top:10px; z-index:4; padding:5px 8px; border-radius:999px; background:#111; color:#fff; font:900 7px var(--condensed-font,Arial,sans-serif); letter-spacing:.09em; }

/* Même aspect pour les mots-dièses existants et ceux de l’article. */
.article-keyword-library-list { display:flex !important; flex-wrap:wrap !important; align-items:center !important; gap:5px !important; }
.article-keyword-library-list .shared-keyword-chip { display:inline-flex !important; align-items:center !important; min-height:25px !important; padding:4px 9px !important; border:0 !important; border-radius:999px !important; background:#111 !important; color:#fff !important; box-shadow:none !important; cursor:grab; }
.article-keyword-library-list .shared-keyword-chip strong { color:#fff !important; font:800 10px var(--ui-font) !important; }
.article-keyword-library-list .shared-keyword-chip sup { margin-left:5px; color:#cfcac2 !important; font:700 7px var(--ui-font) !important; }
.article-keyword-library-list .shared-keyword-chip:hover { background:var(--accent) !important; }

/* Commande d’arborescence : fin trait noir vertical, centrée sur le bord. */
.topbar > .topbar-tree-toggle {
  position:fixed !important; z-index:220 !important; top:50% !important; left:calc(var(--tree-width) - 7px) !important;
  width:14px !important; height:28px !important; min-width:14px !important; padding:0 !important;
  border:0 !important; border-radius:0 4px 4px 0 !important; background:#111 !important; color:#fff !important;
  transform:translateY(-50%) !important; box-shadow:none !important;
}
#app.tree-collapsed .topbar > .topbar-tree-toggle { left:0 !important; }
.topbar-tree-toggle svg { width:9px !important; height:13px !important; stroke:#fff !important; stroke-width:2 !important; }
.public-library-mode #tree-toggle { display:none !important; }

/* Barre haute : logo plus présent et compte tout à droite. */
.topbar { display:flex !important; align-items:center !important; gap:8px !important; padding:0 10px 0 14px !important; }
.topbar > * { grid-column:auto !important; grid-row:auto !important; }
.topbar > .oblique-wordmark { order:1; display:flex !important; align-items:center; height:100%; flex:0 0 auto; }
.topbar > .oblique-wordmark svg { width:136px !important; height:52px !important; overflow:visible; }
.topbar > .oblique-wordmark text { font-size:31px !important; font-weight:800; }
.topbar > .oblique-leading-slash { order:2; display:block !important; width:4px !important; height:43px !important; flex:0 0 4px; background:var(--accent); transform:skewX(-17deg); }
.topbar > .brand-path-slash { display:none !important; }
.topbar > .path-navigation { order:3; flex:1 1 auto; min-width:0; }
.topbar > .path-history-actions { order:4; flex:0 0 auto; }
.topbar > .public-library-button { order:5; flex:0 0 auto; }
.topbar > .chat-button { order:6; flex:0 0 auto; }
.topbar > .top-actions { order:7; flex:0 0 auto; }
.topbar > .account-button { order:8; flex:0 0 36px; margin-left:10px !important; }
.topbar > .parent-board-button { display:none !important; }

/* Images déplacées : signal visuel toujours au premier plan. */
.workspace-image-drag-proxy { z-index:2147483000 !important; opacity:.62 !important; border:2px dashed #111 !important; }
.workspace-image-drag-origin { opacity:.42 !important; outline:2px dashed #111 !important; outline-offset:3px !important; }
.workspace-image-dragging .article-pane { z-index:1000000 !important; }
.workspace-image-dragging .article-pane-content { overflow:visible !important; }

/* Listes à cocher. */
.board-item[data-type="list"] { background:#fff !important; }
.board-item[data-type="list"] .item-body,
.list-body { background:#fff !important; }
.list-row { grid-template-columns:18px minmax(0,1fr) 18px 24px !important; align-items:start !important; }
.list-row-grip { grid-column:3; width:18px !important; height:25px !important; opacity:.26; }
.list-row:hover .list-row-grip { opacity:.72; }
.row-delete { grid-column:4; position:relative; width:24px; height:25px; display:grid; place-items:center; opacity:0 !important; pointer-events:none; }
.list-row.done .row-delete { opacity:.72 !important; pointer-events:auto; }
.row-delete svg { width:15px; height:15px; fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; }
.row-delete:hover { color:var(--accent); opacity:1 !important; }
.add-row { width:auto !important; min-height:23px !important; margin:7px 0 0 24px !important; padding:0 !important; border:0 !important; background:transparent !important; color:#111 !important; font:700 9px var(--ui-font) !important; opacity:.58; }
.add-row:hover { opacity:1; }

/* Les numéros de ligne noirs ne persistent pas hors sélection. */
.article-line-gutter button:not(.selected):not(:hover) { color:#aaa49b !important; background:transparent !important; }

@media (max-width:900px) {
  .topbar > .oblique-wordmark svg { width:112px !important; }
  .topbar > .public-library-button span:last-child,
  .topbar > .chat-button span:nth-child(2) { display:none; }
}


/* =====================================================================
   PLANCHE OBLIQUE 2.4 — navigation, chat et transfert d’images
   ===================================================================== */

/* La classe hidden doit rester prioritaire sur la mise en page flex du chat. */
.chat-drawer.chat-layout-v23.hidden { display: none !important; }

/* Signature Oblique : aucun chevauchement entre le mot-symbole, le trait et le chemin. */
.topbar > .oblique-wordmark {
  position: relative !important;
  width: 146px !important;
  min-width: 146px !important;
  flex: 0 0 146px !important;
  overflow: visible !important;
}
.topbar > .oblique-wordmark svg { width: 142px !important; max-width: 142px !important; }
.topbar > .oblique-leading-slash {
  position: relative !important;
  inset: auto !important;
  margin: 0 18px 0 16px !important;
  flex: 0 0 4px !important;
  transform: skewX(-17deg) !important;
}

/* La commande d’arborescence flanque le bord droit de la palette, sous la barre haute. */
:root { --planche-tool-rail-width: 68px; }
.topbar > .topbar-tree-toggle {
  position: fixed !important;
  z-index: 220 !important;
  top: var(--topbar-height) !important;
  bottom: 0 !important;
  left: calc(var(--tree-width) + var(--planche-tool-rail-width) - 5px) !important;
  width: 10px !important;
  min-width: 10px !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #111 !important;
  color: #fff !important;
  transform: none !important;
  box-shadow: none !important;
  display: grid !important;
  place-items: center !important;
}
#app.tree-collapsed .topbar > .topbar-tree-toggle {
  left: calc(var(--planche-tool-rail-width) - 5px) !important;
}
.topbar > .topbar-tree-toggle svg {
  width: 8px !important;
  height: 18px !important;
  stroke: #fff !important;
  stroke-width: 2.2 !important;
}
body.public-library-mode .topbar > .topbar-tree-toggle { display: none !important; }

/* Clone flottant indépendant : il traverse réellement le volet Article. */
.workspace-image-transfer-active,
.workspace-image-transfer-active * { cursor: grabbing !important; }
.workspace-image-transfer-source {
  opacity: .34 !important;
  outline: 2px dashed #111 !important;
  outline-offset: 4px !important;
  filter: saturate(.72) !important;
}
.workspace-image-transfer-ghost {
  position: fixed;
  z-index: 2147483646;
  left: 0;
  top: 0;
  width: min(220px, 24vw);
  max-height: 190px;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
  pointer-events: none;
  transform: translate(-50%, -50%) rotate(-1deg);
  border: 2px dashed #111;
  border-radius: 9px;
  background: rgba(255,255,255,.88);
  opacity: .68;
  box-shadow: 0 16px 38px rgba(17,17,17,.26);
  backdrop-filter: blur(2px);
}
.workspace-image-transfer-ghost img {
  display: block;
  width: 100%;
  height: 145px;
  object-fit: cover;
}
.workspace-image-transfer-ghost span {
  padding: 7px 9px;
  background: #111;
  color: #fff;
  text-align: center;
  font: 900 8px var(--condensed-font, Arial, sans-serif);
  letter-spacing: .11em;
}
.workspace-image-transfer-ghost.over-target {
  border-color: var(--accent);
  opacity: .82;
  transform: translate(-50%, -50%) rotate(0deg) scale(1.02);
}
.workspace-image-transfer-ghost.over-target span { background: var(--accent); }
.article-pane.workspace-image-transfer-receiving { z-index: 1000001 !important; }
.article-pane.workspace-image-transfer-receiving .article-editor,
.article-pane.workspace-image-transfer-receiving .article-featured-dropzone {
  transition: outline-color .1s ease, background-color .1s ease;
}
.article-pane.workspace-image-transfer-receiving .article-editor {
  outline: 1px dashed rgba(17,17,17,.3);
  outline-offset: -7px;
}
.article-pane.workspace-image-transfer-receiving .article-featured-dropzone {
  outline: 1px dashed rgba(17,17,17,.42);
  outline-offset: -4px;
}
.article-pane .workspace-image-drop-target {
  outline: 3px dashed var(--accent) !important;
  outline-offset: -6px !important;
  background-color: #fff5f2 !important;
}

@media (max-width:1180px) {
  :root { --planche-tool-rail-width: 60px; }
  .topbar > .oblique-wordmark { width: 122px !important; min-width: 122px !important; flex-basis: 122px !important; }
  .topbar > .oblique-wordmark svg { width: 120px !important; }
  .topbar > .oblique-leading-slash { margin-left: 12px !important; margin-right: 13px !important; }
}


/* =====================================================================
   PLANCHE OBLIQUE 2.5 — rail réel, transfert natif, statuts publics
   ===================================================================== */

/* L’ancien bouton de la barre supérieure est retiré au profit du rail autonome. */
#tree-toggle.v25-retired-tree-toggle,
.topbar > #tree-toggle { display: none !important; }

.v25-tree-rail {
  position: fixed;
  z-index: 2147480000;
  width: 20px;
  min-width: 20px;
  margin: 0;
  padding: 0;
  border: 0;
  border-left: 1px solid rgba(255,255,255,.13);
  border-right: 1px solid rgba(0,0,0,.3);
  border-radius: 0;
  background: #111;
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 3px 0 9px rgba(17,17,17,.16);
  transition: left .18s ease, width .14s ease, background .14s ease;
}
.v25-tree-rail:hover { width: 24px; background: #fe0000; }
.v25-tree-rail.hidden,
body.public-library-mode .v25-tree-rail { display: none !important; }
.v25-tree-rail svg { width: 12px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* Fantôme natif utilisé par setDragImage : hors écran, mais rendu par Chromium au premier plan. */
.v25-native-drag-preview {
  position: fixed;
  z-index: 2147483647;
  width: 210px;
  height: 150px;
  display: grid;
  grid-template-rows: minmax(0,1fr) auto;
  overflow: hidden;
  border: 2px dashed #111;
  border-radius: 8px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 16px 42px rgba(17,17,17,.3);
}
.v25-native-drag-preview img { width: 100%; height: 116px; object-fit: cover; display: block; }
.v25-native-drag-preview span { padding: 7px 9px; color: #fff; background: #111; text-align: center; font: 900 8px var(--condensed-font); letter-spacing: .1em; }
.workspace-image-native-source { cursor: grab !important; }
.board-item.workspace-image-native-source {
  opacity: .32 !important;
  outline: 2px dashed #111 !important;
  outline-offset: 4px !important;
}
.workspace-image-native-active,
.workspace-image-native-active * { cursor: grabbing !important; }
.article-pane.workspace-image-native-receiving { z-index: 1000001 !important; }
.article-pane.workspace-image-native-receiving .article-editor,
.article-pane.workspace-image-native-receiving .article-featured-dropzone {
  outline: 2px dashed rgba(17,17,17,.35);
  outline-offset: -6px;
}
.article-pane .workspace-image-drop-target {
  outline: 3px dashed #fe0000 !important;
  outline-offset: -6px !important;
  background: #fff3ef !important;
}

/* Pipeline éditorial : languettes compactes dans l’en-tête. */
.public-library-heading {
  flex: 0 0 auto;
  min-width: max-content;
}
.public-library-status-tabs {
  position: relative;
  z-index: 2;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  white-space: nowrap;
}
.public-library-status-tabs button {
  flex: 0 0 auto;
  min-height: 30px;
  height: 30px;
  padding: 0 8px 0 11px;
  border: 1px solid rgba(17,17,17,.22);
  border-radius: 999px;
  background: #fbfaf6;
  color: #111;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  text-align: center;
  font: 900 8px/1 var(--condensed-font);
  letter-spacing: .075em;
  cursor: pointer;
}
.public-library-status-tabs button b {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #e9e5dc;
  color: #111;
  font-size: 8px;
  line-height: 1;
}
.public-library-status-tabs button:hover,
.public-library-status-tabs button.active {
  border-color: #111;
  background: #111;
  color: #fff;
}
.public-library-status-tabs button.active b { background: #fe0000; color: #fff; }

.public-article-card { position: relative; }
.public-card-editorial-status {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  padding: 5px 8px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font: 900 8px var(--condensed-font);
  letter-spacing: .08em;
}
.public-article-card[data-editorial-status="ready"] .public-card-editorial-status { background: #fe0000; }
.public-article-card[data-editorial-status="published"] .public-card-editorial-status { background: #205d38; }

.article-published-author-select {
  width: 100%;
  min-height: 38px;
  margin-top: 7px;
  padding: 0 34px 0 11px;
  border: 1px solid #c8c3ba;
  border-radius: 7px;
  background: #fff;
  color: #111;
  font: 800 9px var(--condensed-font);
  letter-spacing: .055em;
}
.article-published-toggle {
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid #111;
  border-radius: 999px;
  background: #fff;
  color: #111;
  font: 900 8px var(--condensed-font);
  letter-spacing: .08em;
}
.article-published-toggle.active { background: #205d38; border-color: #205d38; color: #fff; }



/* 2.6 — les états éditoriaux restent sur la ligne du titre, sous forme de languettes. */
.public-library-header {
  min-height: 82px;
  grid-template-columns: auto minmax(0, 1fr) minmax(260px, 420px) 38px !important;
  grid-template-rows: auto !important;
  align-items: center;
  gap: 18px;
  padding: 13px 20px 12px 28px;
}
.public-library-heading { grid-column: 1; grid-row: 1; }
.public-library-status-tabs { grid-column: 2; grid-row: 1; }
.public-library-search { grid-column: 3; grid-row: 1; }
.public-library-close { grid-column: 4; grid-row: 1; }

@media (max-width: 1320px) {
  .public-library-header {
    grid-template-columns: auto minmax(0, 1fr) 38px !important;
    grid-template-rows: auto auto !important;
    gap: 9px 16px;
  }
  .public-library-heading { grid-column: 1; grid-row: 1; }
  .public-library-status-tabs { grid-column: 2; grid-row: 1; }
  .public-library-close { grid-column: 3; grid-row: 1; }
  .public-library-search { grid-column: 1 / 4; grid-row: 2; width: 100%; }
}

@media (max-width: 760px) {
  .public-library-header {
    grid-template-columns: minmax(0, 1fr) 38px !important;
    grid-template-rows: auto auto auto !important;
    padding-inline: 16px 10px;
  }
  .public-library-heading { grid-column: 1; grid-row: 1; }
  .public-library-close { grid-column: 2; grid-row: 1; }
  .public-library-status-tabs { grid-column: 1 / 3; grid-row: 2; }
  .public-library-search { grid-column: 1 / 3; grid-row: 3; }
}

/* =====================================================================
   PLANCHE OBLIQUE 2.7 — rail, chat bas et transfert d’images direct
   ===================================================================== */

/* Le rail est physiquement pris entre l’arborescence et la palette. */
.app-body {
  grid-template-columns: var(--tree-width) 18px minmax(0, 1fr) !important;
  transition: none !important;
}
#app.tree-collapsed .app-body {
  grid-template-columns: 0 18px minmax(0, 1fr) !important;
}
.tree-panel {
  min-width: 0 !important;
  transition: none !important;
}
#app.tree-collapsed .tree-panel {
  transition: none !important;
}
.v25-tree-rail.v27-tree-rail {
  position: relative !important;
  inset: auto !important;
  z-index: 85 !important;
  align-self: stretch !important;
  width: 18px !important;
  min-width: 18px !important;
  height: 100% !important;
  min-height: 0 !important;
  border: 0 !important;
  border-left: 1px solid rgba(255,255,255,.12) !important;
  border-right: 1px solid rgba(0,0,0,.3) !important;
  background: #111 !important;
  box-shadow: none !important;
  transition: none !important;
}
.v25-tree-rail.v27-tree-rail:hover {
  width: 18px !important;
  background: #fe0000 !important;
}
.workspace { min-width: 0; }

/* La rubrique « Détails de la recension » est retirée du flux. */
.article-settings-section.review-section { display: none !important; }

/* Chat de l’article : ligne basse noire, après auteur et mots-dièses. */
.article-focus-controls > .article-chat-button { display: none !important; }
.article-meta-chat-row {
  grid-column: 1 / -1;
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-top: 2px;
  padding-top: 9px;
  border-top: 1px solid rgba(17,17,17,.12);
}
.article-meta-chat-author {
  min-width: 0;
  color: #111;
  font: 800 9px/1.2 var(--condensed-font, Arial, sans-serif);
  letter-spacing: .09em;
  text-transform: uppercase;
  white-space: nowrap;
}
.article-meta-chat-keywords {
  min-width: 0;
  overflow: hidden;
  color: #777169;
  font: 700 9px/1.3 var(--ui-font, Arial, sans-serif);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.article-chat-button.article-chat-button-bottom {
  min-height: 30px !important;
  padding: 0 13px !important;
  border: 1px solid #111 !important;
  border-radius: 4px !important;
  background: #111 !important;
  color: #fff !important;
  box-shadow: none !important;
}
.article-chat-button.article-chat-button-bottom:hover {
  background: #fe0000 !important;
  border-color: #fe0000 !important;
}

/* Même positionnement dans les cartes de la bibliothèque publique. */
.public-article-card-copy footer {
  grid-template-columns: auto minmax(0, 1fr) auto !important;
  grid-template-areas: "author keywords chat" !important;
  align-items: center !important;
  column-gap: 8px !important;
}
.public-article-card-copy footer > b { grid-area: author; min-width: 0; }
.public-article-card-copy footer > small {
  grid-area: keywords;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.public-article-chat-button {
  position: static !important;
  grid-area: chat;
  justify-self: end;
  min-height: 28px !important;
  padding: 0 10px !important;
  border: 1px solid #111 !important;
  border-radius: 4px !important;
  background: #111 !important;
  color: #fff !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.public-article-chat-button:hover { background: #fe0000 !important; border-color: #fe0000 !important; }

/* Transfert d’image Pointer Events : source atténuée, clone translucide et bord discontinu. */
.workspace-image-pointer-source { cursor: grab !important; user-select: none; -webkit-user-drag: none; }
.workspace-image-pointer-active,
.workspace-image-pointer-active * { cursor: grabbing !important; }
.board-item.workspace-image-pointer-origin {
  opacity: .38 !important;
  outline: 2px dashed #111 !important;
  outline-offset: 4px !important;
  filter: saturate(.72) !important;
}
.workspace-image-pointer-ghost {
  position: fixed;
  z-index: 2147483647;
  width: 220px;
  height: 164px;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
  pointer-events: none;
  opacity: .58;
  border: 2px dashed #111;
  border-radius: 7px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 16px 42px rgba(17,17,17,.28);
  transform: translateZ(0);
}
.workspace-image-pointer-ghost img {
  width: 100%;
  height: 128px;
  display: block;
  object-fit: cover;
}
.workspace-image-pointer-ghost span {
  min-height: 34px;
  display: grid;
  place-items: center;
  padding: 6px 8px;
  background: #111;
  color: #fff;
  text-align: center;
  font: 900 8px/1.2 var(--condensed-font, Arial, sans-serif);
  letter-spacing: .09em;
}
.workspace-image-pointer-ghost.over-target {
  opacity: .72;
  border-color: #fe0000;
}
.workspace-image-pointer-ghost.over-target span { background: #fe0000; }

/* Les deux destinations deviennent visibles pendant le déplacement. */
.article-pane.workspace-image-pointer-receiving {
  z-index: 1000001 !important;
}
.article-pane.workspace-image-pointer-receiving .article-featured-dropzone,
.article-pane.workspace-image-pointer-receiving .article-editor,
.article-pane.workspace-image-pointer-receiving .article-image-button {
  position: relative;
  outline: 2px dashed rgba(17,17,17,.42) !important;
  outline-offset: -5px !important;
}
.article-pane.workspace-image-pointer-receiving .article-featured-dropzone::after,
.article-pane.workspace-image-pointer-receiving .article-editor::after {
  position: absolute;
  z-index: 5;
  left: 12px;
  right: 12px;
  top: 12px;
  min-height: 30px;
  display: grid;
  place-items: center;
  padding: 5px 8px;
  pointer-events: none;
  border: 1px dashed #111;
  background: rgba(251,250,246,.9);
  color: #111;
  font: 900 8px/1.2 var(--condensed-font, Arial, sans-serif);
  letter-spacing: .1em;
}
.article-pane.workspace-image-pointer-receiving .article-featured-dropzone::after {
  content: "IMAGE PRINCIPALE — DÉPOSER ICI";
}
.article-pane.workspace-image-pointer-receiving .article-editor::after {
  content: "IMAGE DANS LE CORPS DU TEXTE — DÉPOSER À L’ENDROIT VOULU";
}
.article-pane.workspace-image-pointer-receiving .article-image-button::after {
  content: "IMAGE · CORPS DU TEXTE";
  position: absolute;
  left: 50%;
  bottom: calc(100% + 6px);
  transform: translateX(-50%);
  width: max-content;
  max-width: 180px;
  padding: 5px 7px;
  border: 1px dashed #111;
  background: #fff;
  color: #111;
  pointer-events: none;
  font: 900 7px/1 var(--condensed-font, Arial, sans-serif);
  letter-spacing: .08em;
}
.article-pane .workspace-image-drop-target {
  outline: 3px dashed #fe0000 !important;
  outline-offset: -6px !important;
  background-color: #fff3ef !important;
}
.article-pane .article-image-button.workspace-image-drop-target {
  background: #fe0000 !important;
  color: #fff !important;
}

@container article-editor-window (max-width: 620px) {
  .article-meta-chat-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .article-meta-chat-author { grid-column: 1; }
  .article-meta-chat-keywords { grid-column: 1; }
  .article-chat-button.article-chat-button-bottom { grid-column: 2; grid-row: 1 / 3; }
}

/* =========================================================
   Planche Oblique 2.8 — correctif définitif du transfert d’images
   La règle historique .image-body img { pointer-events:none } empêchait
   l’image de recevoir dragstart. Elle est neutralisée ici.
========================================================= */
.image-body img.workspace-image-native-source,
.image-body img.workspace-image-drag-source,
.board-item[data-type="image"] .image-body img {
  pointer-events: auto !important;
  -webkit-user-drag: element !important;
  user-select: none !important;
  cursor: grab !important;
}
.board-item[data-type="image"] .image-body img:active { cursor: grabbing !important; }
.workspace-image-native-active .board-item.workspace-image-native-source {
  opacity: .42 !important;
  outline: 2px dashed #111 !important;
  outline-offset: 3px !important;
}
.workspace-image-native-active .article-featured-dropzone,
.workspace-image-native-active .article-editor {
  transition: none !important;
}
.workspace-image-drop-target {
  outline: 3px dashed #fe0000 !important;
  outline-offset: -4px !important;
  background: #fff4ef !important;
}
/* Élément de recension retiré de l’interface générique. */
.article-settings-section[data-section="review"],
.article-settings-section.review-details,
[data-review-details],
.review-details-section { display:none !important; }
/* Numéro de version visible. */
.oblique-version-badge {
  position:fixed; right:10px; bottom:8px; z-index:2147483600;
  padding:4px 7px; border-radius:10px; color:#fff; background:#111;
  font:800 8px Arial,sans-serif; letter-spacing:.08em; opacity:.65;
  pointer-events:none;
}
