/* Art direction V2 — engraved frames, mineral teal and pinned parchment. */
:root {
  --bg: #071417;
  --panel: #102125;
  --line: #bc9a5266;
  --gold: #d9b76e;
  --text: #eee6d5;
  --muted: #a8b7b6;
}
body {
  background: #071417 url("/grain.svg");
  font-size: 14px;
}
#app {
  padding: 9px;
  gap: 12px;
  background-image:
    radial-gradient(ellipse at 55% 0, #35504f22, transparent 65%),
    url("/grain.svg");
}
.sidebar {
  position: relative;
  width: 210px;
  padding: 0 14px 16px;
  border: 1px solid #af90544d;
  background:
    linear-gradient(180deg, #0b1e22bb, #07141666),
    url("/ruins.svg") center bottom 100px/100% auto no-repeat,
    url("/grain.svg");
  border-radius: 2px;
}
.sidebar:before,
.inspector:before {
  content: "";
  position: absolute;
  inset: 5px;
  pointer-events: none;
  z-index: 0;
  background:
    linear-gradient(var(--gold), var(--gold)) left top/23px 1px no-repeat,
    linear-gradient(var(--gold), var(--gold)) left top/1px 23px no-repeat,
    linear-gradient(var(--gold), var(--gold)) right top/23px 1px no-repeat,
    linear-gradient(var(--gold), var(--gold)) right top/1px 23px no-repeat,
    linear-gradient(var(--gold), var(--gold)) left bottom/23px 1px no-repeat,
    linear-gradient(var(--gold), var(--gold)) left bottom/1px 23px no-repeat,
    linear-gradient(var(--gold), var(--gold)) right bottom/23px 1px no-repeat,
    linear-gradient(var(--gold), var(--gold)) right bottom/1px 23px no-repeat;
  opacity: 0.65;
}
.sidebar > * {
  position: relative;
  z-index: 1;
}
.brand {
  font-size: 23px;
  letter-spacing: 0.13em;
  padding: 20px 0 26px;
  margin-bottom: 25px;
  color: #e4ce9a;
  text-shadow: 0 2px 12px #e2b75a22;
}
.brand span {
  width: 108px;
  height: 94px;
  margin: 0 auto 10px;
  font-size: 0;
  background: url("/crest.svg") center/contain no-repeat;
}
.brand small {
  font:
    11px Georgia,
    serif;
  letter-spacing: 0.25em;
  color: #ccb17b;
}
.sidebar > .eyebrow {
  display: none;
}
.sidebar nav {
  gap: 9px;
}
.sidebar nav button {
  font:
    16px Georgia,
    serif;
  padding: 13px 10px;
  border-radius: 2px;
  color: #e6e3d6;
}
.sidebar nav button.active {
  border: 1px solid #bda167;
  background: linear-gradient(120deg, #b69a5533, #b69a5510);
  box-shadow:
    inset 0 0 14px #cfad5820,
    0 0 8px #c9a76110;
  color: #f1ddb0;
}
.sidebar-bottom {
  border-top: 1px solid var(--line);
  padding-top: 17px;
  gap: 8px;
  background: linear-gradient(transparent, #071417bb);
}
.sidebar-bottom button,
.sidebar-bottom .import {
  background: #0a191bbb;
  border-color: #8d805038;
}
.sidebar-bottom .privacy {
  font:
    15px Georgia,
    serif;
  letter-spacing: 0.04em;
}
.main {
  background: none;
}
.top {
  padding: 16px 14px 20px;
  gap: 20px;
}
.top .eyebrow {
  font-size: 9px;
  color: #ad9a70;
  letter-spacing: 0.21em;
  margin-bottom: 8px;
}
.top h1 {
  font-size: clamp(36px, 3.8vw, 58px);
  letter-spacing: 0.015em;
  color: #f0dfba;
  text-shadow: 0 3px 14px #0006;
  margin: 0 0 6px;
}
.top .subtitle {
  font:
    italic 17px Georgia,
    serif;
  color: #b7c6c2;
}
.top .primary {
  font:
    20px Georgia,
    serif;
  padding: 14px 22px;
  border-radius: 3px;
}
.primary {
  background: linear-gradient(135deg, #f2e3ad, #c6a469 45%, #a27b42);
  border-color: #f1d79b;
  box-shadow:
    inset 0 0 0 1px #8f7138,
    0 0 14px #ceac5720;
  text-shadow: 0 1px #fff3;
}
.toolbar {
  padding: 0 14px 14px;
  gap: 12px;
}
.views {
  border-color: #9c895149;
  background: #06131744;
}
.views button {
  font:
    13px Georgia,
    serif;
  padding: 9px 14px;
}
.views button.active {
  background: linear-gradient(135deg, #ba9c4a30, #ba9c4a0c);
  box-shadow: inset 0 -2px #c3a05b;
  color: #ead5a3;
}
#search {
  background: #07171aaa;
  border-color: #7c969144;
}
#sync {
  font-size: 10px;
  color: #b5c1a9;
}
.notice {
  margin: 0 14px;
  padding: 10px 13px;
  color: #e4d6b4;
  background: linear-gradient(100deg, #88703412, transparent);
  border: 1px solid #bda36a66;
  border-radius: 2px;
  position: relative;
  font-family: Georgia, serif;
  font-size: 13px;
}
.notice:before {
  content: "◇";
  position: absolute;
  left: -6px;
  top: 50%;
  transform: translateY(-50%);
  background: #0a191d;
  color: var(--gold);
  font-size: 14px;
}
.notice #count {
  font:
    10px system-ui,
    sans-serif;
  color: #9aacaa;
  align-self: center;
}
#workspace {
  padding: 18px 14px 16px;
}
.board {
  grid-template-columns: repeat(5, minmax(190px, 1fr));
  gap: 12px;
  align-items: start;
}
.column {
  padding: 0 8px 10px;
  background: linear-gradient(135deg, #40534b17, #14242633);
  border: 1px solid #87958788;
  border-radius: 4px;
  min-height: calc(100% - 1px);
  overflow: visible;
}
.column h2 {
  font:
    18px Georgia,
    serif;
  margin: 0 -8px 16px;
  padding: 14px 12px 13px;
  border-bottom: 1px solid #9b916555;
  background: linear-gradient(150deg, #24403b25, transparent);
  white-space: nowrap;
  color: #ece5d2;
}
.column h2 small {
  font:
    11px system-ui,
    sans-serif;
  border: 1px solid #9b91654d;
  border-radius: 50%;
  padding: 2px 5px;
  background: #83918520;
  color: #c3cbc4;
}
.column .empty-column {
  border-color: #82927f22;
  color: #a0aca366;
  font:
    italic 12px Georgia,
    serif;
  padding: 19px 6px;
}
.note {
  isolation: isolate;
  background: transparent;
  border: 0;
  border-radius: 2px;
  padding: 19px 13px 13px;
  margin-bottom: 16px;
  filter: drop-shadow(0 3px 4px #0006);
  box-shadow: none;
  color: #2e281e;
  --note: #ad91ac;
}
.note:before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(var(--note), var(--note)) top/100% 7px no-repeat,
    url("/grain.svg"),
    radial-gradient(ellipse at 20% 10%, #fff9e5ab, transparent 75%),
    linear-gradient(130deg, #e0d3b9, #c8b695 65%, #dccbae);
  clip-path: polygon(
    0 1%,
    8% 0,
    17% 1%,
    28% 0,
    39% 1%,
    51% 0,
    63% 1%,
    76% 0,
    88% 1%,
    100% 0,
    100% 99%,
    92% 100%,
    81% 99%,
    70% 100%,
    58% 99%,
    44% 100%,
    32% 99%,
    20% 100%,
    9% 99%,
    0 100%
  );
  border-radius: 3px;
  box-shadow:
    inset 0 0 20px #664e1733,
    inset 0 0 1px 1px #fff2;
}
.note:after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  left: calc(50% - 6px);
  top: -4px;
  background: radial-gradient(
    circle at 35% 25%,
    #fff3bd 0,
    #ddba5e 24%,
    #957226 55%,
    #4a351b 90%
  );
  border: 1px solid #6c5124;
  border-radius: 50%;
  box-shadow:
    1px 3px 3px #281d1466,
    inset 1px 1px 1px #ffecc9;
}
.note.sage {
  --note: #93ad89;
}
.note.rose {
  --note: #b48b84;
}
.note.blue {
  --note: #8ca5b6;
}
.note h3 {
  font:
    bold 18px/1.25 Georgia,
    serif;
  letter-spacing: -0.02em;
  margin-bottom: 9px;
  color: #241f18;
}
.note p {
  font:
    14px/1.43 Georgia,
    serif;
  margin: 10px 0 13px;
}
.note .note-meta {
  font:
    10px Georgia,
    serif;
  border-color: #70634544;
  padding-top: 10px;
  gap: 6px;
  color: #554b38;
}
.note-tag {
  font:
    11px Georgia,
    serif;
  padding: 2px 7px;
  color: #3d3b2e;
  background: #7c7b5d26;
  border-color: #7e79653d;
}
.note.active {
  outline: 1px solid #f1d398;
  outline-offset: 3px;
  filter: drop-shadow(0 0 4px #e8bb5577);
  box-shadow: 0 0 0 1px #b88a3f;
  border-radius: 4px;
}
.note:hover {
  box-shadow: none;
  filter: drop-shadow(0 5px 7px #0007);
}
.note.active:hover {
  filter: drop-shadow(0 0 5px #e8bb5577);
}
.note img {
  border: 1px solid #75674d66;
  box-shadow: 0 1px 5px #5b452422;
}
.workspace-footer {
  border: 1px solid #a58c5766;
  padding: 14px 18px;
  margin: 0 14px 5px;
  background: linear-gradient(90deg, #40513e15, #111f1a33);
  color: #cbbf9d;
  font:
    12px Georgia,
    serif;
  letter-spacing: 0.02em;
}
.workspace-footer span:first-child:before {
  content: "✎";
  font-size: 21px;
  color: var(--gold);
  vertical-align: middle;
  margin-right: 16px;
}
.inspector {
  position: relative;
  width: 390px;
  flex-shrink: 0;
  border: 1px solid #c0a06599;
  border-radius: 4px;
  margin: 8px 3px 5px 0;
  padding: 24px 20px 30px;
  background:
    radial-gradient(ellipse at 0 0, #3a50422e, transparent 70%),
    url("/grain.svg"), linear-gradient(150deg, #102126, #081619);
  box-shadow:
    inset 0 0 0 4px #091619,
    0 5px 25px #0002;
}
.inspector > * {
  position: relative;
}
.inspector .panel-top {
  align-items: start;
  flex-direction: row;
}
.inspector .close {
  border: 0;
  background: none;
  color: #e1c991;
  font:
    28px Georgia,
    serif;
  padding: 0 4px;
  line-height: 1;
}
.inspector .status {
  font:
    10px Georgia,
    serif;
  letter-spacing: 0.08em;
  border: 1px solid #a8925966;
  color: #ecd7a1;
  padding: 7px 9px;
  line-height: 1.4;
  background: linear-gradient(110deg, #baa25820, transparent);
  align-self: center;
}
.inspector > h2 {
  font:
    bold 29px/1.2 Georgia,
    serif;
  color: #f0dfbc;
  margin: 20px 0 18px;
  overflow-wrap: anywhere;
}
.idea-reading {
  border-block: 1px solid #ae945255;
  padding: 16px 0 20px;
  margin-bottom: 16px;
  position: relative;
}
.idea-reading:after {
  content: "✧";
  position: absolute;
  bottom: -10px;
  left: calc(50% - 12px);
  background: #102124;
  color: #d6bb7e;
  padding: 0 7px;
  font-size: 15px;
}
.idea-reading p {
  font:
    18px/1.5 Georgia,
    serif;
  white-space: pre-wrap;
  color: #e7e4d5;
  margin: 0;
  overflow-wrap: anywhere;
}
.idea-editor,
.idea-resources {
  border-bottom: 1px solid #9e8a4e33;
  padding: 0 0 12px;
  margin: 10px 0 14px;
}
.idea-editor summary,
.idea-resources summary {
  font:
    13px Georgia,
    serif;
  color: #cbbf9d;
  cursor: pointer;
  padding: 10px 0;
}
.idea-resources summary span {
  float: right;
  color: #8da6a1;
  font:
    10px system-ui,
    sans-serif;
  line-height: 18px;
}
.inspector .review-heading {
  font:
    25px Georgia,
    serif;
  color: #ebd9b1;
  padding-top: 12px;
  margin-top: 20px;
  border: 0;
}
.review-heading:before {
  content: "♧";
  margin-right: 9px;
  color: var(--gold);
}
.comment {
  background: linear-gradient(135deg, #71817c1b, #4f69651a);
  border-color: #8b9a8c66;
  border-radius: 6px;
  padding: 14px;
  margin: 12px 0 16px;
}
.comment strong {
  font:
    16px Georgia,
    serif;
  color: #e8e6d8;
}
.comment time {
  display: inline;
  font:
    9px system-ui,
    sans-serif;
  float: right;
  line-height: 20px;
}
.comment p {
  background: linear-gradient(140deg, #aeb7a926, #9baea820);
  border: 1px solid #9caa9d55;
  border-radius: 5px;
  padding: 12px;
  font-size: 12px;
  line-height: 1.6;
  margin-top: 12px;
  color: #e7e7da;
}
.comment-label {
  font-size: 0 !important;
  margin-top: 16px;
}
.comment-label textarea {
  font:
    italic 13px/1.6 system-ui,
    sans-serif;
  min-height: 100px;
  border-color: #a7b09d88;
  background: #8c9f8c12;
}
.inspector .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  border-top: 1px solid #9a834b44;
  padding-top: 20px;
}
.inspector .actions button {
  font:
    15px Georgia,
    serif;
  padding: 12px 13px;
  flex: 1;
  white-space: nowrap;
}
.inspector .actions .primary {
  order: 1;
}
.inspector .actions > button:not(.primary) {
  order: 0;
  background: #594b2a1a;
  border-color: #c7b17c99;
}
.inspector .actions .hint {
  order: 2;
  text-align: center;
  width: 100%;
  font-size: 10px;
  margin: 8px 0 0;
}
.inspector .actions .hint:before {
  content: "♧ ";
  color: #c5ab70;
}
.inspector input,
.inspector textarea,
.inspector select {
  border-color: #8d9c8855;
  background: #0c1e2266;
}
.inspector details[open] > summary {
  color: #e7d4a4;
}
.inspector .history {
  font-size: 10px;
}
.canvas-shell {
  background-color: #081619;
  background-image:
    radial-gradient(#9bb4a72c 1px, transparent 1px), url("/grain.svg");
}
.canvas-tools button {
  border-color: #a6925766;
  font-family: Georgia, serif;
}
.login-card {
  background:
    radial-gradient(ellipse at 20% 10%, #47604a22, transparent 75%),
    url("/grain.svg"), #0c1c20;
  border-color: #ad925c88;
  box-shadow:
    inset 0 0 0 5px #0a191c,
    0 20px 70px #0005;
}
.login-card .sigil {
  font-size: 0;
  width: 110px;
  height: 100px;
  margin: 0 auto 20px;
  background: url("/crest.svg") center/contain no-repeat;
}
.login-card h1 {
  color: #ebd7ab;
}
@media (min-width: 1500px) {
  .board {
    grid-template-columns: repeat(5, minmax(190px, 1fr));
  }
  .main:has(+ .inspector:not([hidden])) .board {
    grid-template-columns: repeat(5, 205px);
  }
}
@media (max-width: 1499px) {
  .board {
    grid-template-columns: repeat(5, 220px);
  }
  .inspector {
    width: 370px;
  }
  .sidebar {
    width: 190px;
  }
  .top h1 {
    font-size: 42px;
  }
  .top .primary {
    font-size: 17px;
    padding: 13px 16px;
  }
}
@media (max-width: 1100px) {
  .sidebar {
    width: 165px;
  }
  .brand {
    font-size: 19px;
  }
  .sidebar nav button {
    font-size: 14px;
  }
  .inspector {
    width: 340px;
    padding: 20px 17px;
  }
  .top .subtitle {
    font-size: 14px;
  }
  .top h1 {
    font-size: 36px;
  }
}
@media (max-width: 900px) {
  #app {
    padding: 6px;
    gap: 5px;
  }
  .sidebar {
    width: 66px;
    padding: 5px;
  }
  .brand {
    font-size: 0;
    padding: 12px 0 18px;
  }
  .brand span {
    width: 45px;
    height: 48px;
    margin: 0;
  }
  .brand small {
    display: none;
  }
  .sidebar nav button {
    font-size: 0;
  }
  .sidebar-bottom .privacy {
    display: none;
  }
  .inspector {
    position: fixed;
    inset: 6px 6px 6px auto;
    width: min(390px, calc(100vw - 22px));
    margin: 0;
    z-index: 10;
    box-shadow: -20px 0 70px #0009;
  }
  .top {
    padding: 16px 10px;
  }
  .top .primary {
    font-size: 15px;
    padding: 12px 14px;
  }
  .top h1 {
    font-size: 36px;
  }
  .toolbar {
    padding-inline: 10px;
  }
  .notice {
    margin-inline: 10px;
    font-size: 12px;
  }
  .workspace-footer {
    margin-inline: 10px;
    font-size: 10px;
    padding: 11px 13px;
  }
  .workspace-footer span:first-child:before {
    font-size: 16px;
    margin-right: 6px;
  }
}
@media (max-width: 500px) {
  #app {
    padding: 4px;
    gap: 0;
  }
  .top {
    padding: 15px 10px;
    gap: 8px;
  }
  .top h1 {
    font-size: 28px;
  }
  .top .primary {
    font-size: 12px;
    padding: 11px 12px;
  }
  .top .eyebrow {
    font-size: 7px;
  }
  .top .subtitle {
    font-size: 12px;
    max-width: 160px;
  }
  .notice {
    font-size: 10px;
    padding: 9px 10px;
  }
  .toolbar {
    gap: 9px;
  }
  .views button {
    padding: 10px 12px;
    font-size: 12px;
  }
  #workspace {
    padding: 16px 10px;
  }
  .board {
    grid-template-columns: repeat(5, 230px);
  }
  .workspace-footer {
    font-size: 10px;
    gap: 5px;
  }
  .inspector {
    padding: 21px 18px;
  }
  .inspector > h2 {
    font-size: 29px;
  }
  .idea-reading p {
    font-size: 17px;
  }
  .sidebar-open .sidebar {
    width: 210px;
    padding: 12px;
    background:
      linear-gradient(#0b1e22e6, #071416bb),
      url("/ruins.svg") center bottom/100% auto no-repeat,
      url("/grain.svg");
  }
  .sidebar-open .brand {
    font-size: 23px;
  }
  .sidebar-open .brand span {
    width: 95px;
    height: 90px;
    margin: 0 auto 10px;
  }
  .sidebar-open .brand small {
    display: block;
  }
  .sidebar-open .sidebar nav button {
    font:
      16px Georgia,
      serif;
  }
  .sidebar-open .sidebar-bottom .privacy {
    display: block;
  }
}

.top-user {
  margin-left: auto;
  display: flex;
  gap: 10px;
  align-items: center;
  font:
    17px Georgia,
    serif;
  white-space: nowrap;
  color: #e4dfcf;
}
.top-user:before {
  content: attr(data-initial);
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid #c5a768;
  border-radius: 50%;
  font:
    22px Georgia,
    serif;
  color: #e5c995;
  background: radial-gradient(circle at 40% 30%, #405454, #15292e 70%);
  box-shadow:
    inset 0 0 0 3px #102026,
    0 0 0 2px #1c332f;
}
.comment strong:before {
  content: "✧";
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-right: 8px;
  border: 1px solid #b7a16c;
  border-radius: 50%;
  color: #ddc58e;
  background: radial-gradient(ellipse, #36534c, #0e2528);
  vertical-align: middle;
}
.top > div {
  flex: 1;
}
@media (max-width: 1250px) {
  .top-user {
    display: none;
  }
}

/* ---- Lisibilité : cartes compactes, ajout rapide, toile (A/B/C) ---- */
.board {
  height: 100%;
  grid-template-rows: minmax(0, 1fr);
  align-items: stretch;
}
.column {
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
  max-height: 100%;
  scrollbar-width: thin;
}
.column h2 {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #0e1d20f5;
  margin-bottom: 10px;
  font-size: 16px;
  padding: 11px 12px;
}
.quick {
  margin: 0 0 10px;
}
.quick input {
  font-size: 13px;
  padding: 8px 10px;
  background: #07171acc;
  border-style: dashed;
}
.quick input:focus {
  border-style: solid;
}
.quick.bar {
  max-width: 700px;
  margin-bottom: 16px;
}
.quick.sub {
  margin: 4px 0 8px;
}
.note.c {
  padding: 14px 12px 9px;
  margin-bottom: 9px;
  filter: none;
  box-shadow: 0 2px 5px #0007;
}
.note.c:hover {
  filter: none;
  box-shadow: 0 3px 9px #000a;
}
.note.c.active {
  filter: none;
  outline: 1px solid #f1d398;
  box-shadow:
    0 0 0 1px #b88a3f,
    0 0 9px #e8bb5588;
}
.note.c h3 {
  font-size: 16px;
  margin: 0 0 4px;
}
.note.c p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 13px;
  margin: 2px 0 4px;
}
.note.c .thumb {
  float: right;
  width: 52px;
  height: 52px;
  object-fit: cover;
  margin: 0 0 4px 8px;
}
.note.c.mini {
  padding: 9px 10px 6px;
  margin-bottom: 6px;
}
.note.c.mini h3 {
  font-size: 14px;
}
.note.c.mini:after {
  display: none;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 5px;
  clear: both;
}
.chip {
  font: 11px/1.5 Georgia, serif;
  padding: 0 7px;
  border-radius: 20px;
  background: #7c7b5d26;
  border: 1px solid #7e79653d;
  color: #3d3b2e;
  white-space: nowrap;
}
.chip.ok {
  background: #4f7a3d33;
}
.chip.q {
  background: none;
  border-color: transparent;
  padding: 0 3px;
}
button.chip.toggle {
  cursor: pointer;
  background: #fff7;
  color: #241f18;
  padding: 0 8px;
  border-radius: 20px;
}
button.chip.toggle:hover {
  border-color: #8a6d2c;
  background: #fff;
}
.subs {
  margin: -2px 0 12px 12px;
  padding-left: 10px;
  border-left: 2px solid #b9a16a55;
}
.canvas-tools .sep {
  width: 1px;
  height: 22px;
  padding: 0;
  background: var(--line);
  box-shadow: none;
}
.canvas-tools .dot {
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid #0008;
}
.canvas-tools .dot.gold {
  background: var(--gold);
}
.canvas-tools .dot.sage {
  background: var(--sage);
}
.canvas-tools .dot.rose {
  background: var(--rose);
}
.canvas-tools .dot.blue {
  background: var(--blue);
}
.canvas-tools .dot.active {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
.density button {
  font-size: 12px;
}

/* ---- Toile d'abord : barre fine, cartes modifiables sur place ---- */
#app {
  padding: 0;
  gap: 0;
}
.bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
  background: #0a191dd9;
  position: relative;
  z-index: 20;
  flex-wrap: wrap;
}
.bar .mark {
  display: flex;
  align-items: center;
  gap: 9px;
  font: 18px Georgia, serif;
  letter-spacing: 0.05em;
  color: #e8d4a2;
  text-decoration: none;
  white-space: nowrap;
}
.bar .mark:before {
  content: "";
  width: 28px;
  height: 28px;
  background: url("/crest.svg") center/contain no-repeat;
}
.bar #search {
  width: 210px;
  margin-left: auto;
}
.bar #sync {
  margin-left: 0;
}
.menu {
  position: relative;
}
.menu summary {
  list-style: none;
  cursor: pointer;
  padding: 5px 12px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 18px;
  line-height: 1;
  user-select: none;
}
.menu summary::-webkit-details-marker {
  display: none;
}
.menu[open] summary {
  border-color: var(--gold);
}
.menu-body {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 250px;
  display: grid;
  gap: 8px;
  padding: 12px;
  background: #0d1c20;
  border: 1px solid #b99a5266;
  border-radius: 6px;
  box-shadow: 0 12px 34px #000b;
  z-index: 30;
}
.menu-body p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}
.menu-body button,
.menu-body .import {
  font-size: 12px;
  padding: 9px;
  text-align: center;
}
#workspace {
  padding: 14px;
}

/* Carte modifiable */
.note.card {
  position: absolute;
  padding: 18px 12px 8px;
  margin: 0;
  filter: none;
  box-shadow: 0 3px 8px #0007;
  user-select: none;
}
.note.card.active {
  filter: none;
  outline: 1px solid #f1d398;
  box-shadow:
    0 0 0 1px #b88a3f,
    0 0 12px #e8bb5577;
}
.note.card:hover {
  filter: none;
}
.card .grip {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 16px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 5px;
  padding-right: 8px;
  cursor: grab;
}
.card .sw {
  width: 11px;
  height: 11px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid #0006;
  opacity: 0;
}
.card:hover .sw,
.card.active .sw {
  opacity: 1;
}
.card .sw.gold {
  background: #ad91ac;
  background: #d9b76e;
}
.card .sw.sage {
  background: #93ad89;
}
.card .sw.rose {
  background: #b48b84;
}
.card .sw.blue {
  background: #8ca5b6;
}
.card textarea {
  display: block;
  width: 100%;
  min-height: 0;
  height: auto;
  margin: 0;
  padding: 2px 3px;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: #241f18;
  resize: none;
  overflow: hidden;
  user-select: text;
  outline: none;
}
.card textarea:focus {
  background: #fff6;
  box-shadow: inset 0 -1px #8a6d2c;
}
.card textarea::placeholder {
  color: #85795f;
  font-style: italic;
}
.card .c-title {
  font: bold 17px/1.25 Georgia, serif;
}
.card .c-body {
  font: 14px/1.45 Georgia, serif;
  margin-top: 3px;
}
.card .card-img {
  position: relative;
  margin: 0 0 6px;
}
.card .card-img img {
  display: block;
  width: 100%;
  max-height: 340px;
  object-fit: contain;
  background: #0001;
  border: 1px solid #75674d66;
  border-radius: 3px;
  pointer-events: none;
}
.card .card-img .x {
  position: absolute;
  right: 4px;
  top: 4px;
  padding: 1px 6px;
  font-size: 11px;
  background: #000a;
  color: #fff;
  border-radius: 10px;
  opacity: 0;
}
.card .card-img:hover .x {
  opacity: 1;
}
.card .doc {
  display: block;
  font: 12px Georgia, serif;
  color: #5a4515;
  margin-top: 4px;
  overflow-wrap: anywhere;
}
.card-foot {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  min-height: 22px;
}
.card-foot .acts {
  margin-left: auto;
  display: flex;
  gap: 3px;
  opacity: 0;
}
.card:hover .acts,
.card.active .acts {
  opacity: 1;
}
.card-foot button {
  font: 11px Georgia, serif;
  padding: 2px 8px;
  background: #fff7;
  color: #241f18;
  border: 1px solid #7e7965;
  border-radius: 12px;
}
.card-foot button:hover {
  background: #fff;
  border-color: #8a6d2c;
}
.card .connect {
  position: absolute;
  right: -9px;
  top: calc(50% - 8px);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #d9b76e;
  border: 2px solid #0009;
  cursor: crosshair;
  opacity: 0;
  z-index: 2;
}
.card:hover .connect,
.card.active .connect {
  opacity: 1;
}
.card .resize {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 14px;
  height: 14px;
  cursor: nwse-resize;
  opacity: 0.55;
  background: linear-gradient(135deg, transparent 52%, #7a6a45 52%, #7a6a45 62%, transparent 62%, transparent 74%, #7a6a45 74%, #7a6a45 84%, transparent 84%);
}
.canvas-shell.drawing {
  cursor: crosshair;
}
.canvas-shell.drawing .note {
  pointer-events: none;
}
.canvas-world .hit {
  fill: none;
  stroke: transparent;
  stroke-width: 16px;
  pointer-events: stroke;
  cursor: pointer;
}
.canvas-world .wire.sel {
  stroke: var(--gold);
  stroke-width: 3px;
}
.canvas-world .tmp {
  stroke: var(--gold);
  stroke-width: 2px;
  stroke-dasharray: 6 5;
}
.edge-ui {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  gap: 4px;
  z-index: 5;
}
.edge-ui input {
  width: 160px;
  padding: 5px 8px;
  font-size: 12px;
  background: #0b1a1ef0;
}
.edge-ui button {
  padding: 3px 8px;
  font-size: 12px;
}
.canvas-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  color: var(--muted);
  pointer-events: none;
  padding: 20px;
}
.canvas-empty h2 {
  color: var(--text);
}
.canvas-empty p {
  max-width: 420px;
  margin: 0 auto;
}
.canvas-tools .primary {
  font: 14px Georgia, serif;
  padding: 8px 12px;
}
.canvas-tools button.primary {
  background: linear-gradient(135deg, #f2e3ad, #c6a469 45%, #a27b42);
  color: #1a160d;
  border-color: #f1d79b;
}
.canvas-tools button.primary:hover {
  background: #f3dfa6;
}

/* ---- Zones (rectangles) et textes libres ---- */
.shape {
  position: absolute;
}
.shape.zone {
  pointer-events: none;
  border: 2px dashed #d9b76e99;
  border-radius: 12px;
  background: #d9b76e12;
}
.shape.zone.sage {
  border-color: #93ad89aa;
  background: #93ad8914;
}
.shape.zone.rose {
  border-color: #b48b84aa;
  background: #b48b8414;
}
.shape.zone.blue {
  border-color: #8ca5b6aa;
  background: #8ca5b614;
}
.shape.zone.gray {
  border-color: #b8c0bd88;
  background: #ffffff0a;
}
.zone-bar {
  pointer-events: auto;
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px 0 10px;
  cursor: grab;
}
.z-title {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  padding: 4px 6px;
  font: bold 19px Georgia, serif;
  color: #efe3c4;
  outline: none;
}
.z-title:focus {
  background: #0007;
}
.z-title::placeholder {
  color: #9da79f;
  font-style: italic;
  font-weight: normal;
}
.shape .sacts {
  display: flex;
  align-items: center;
  gap: 4px;
  opacity: 0;
}
.shape:hover .sacts,
.shape:focus-within .sacts {
  opacity: 1;
}
.shape .sw {
  width: 13px;
  height: 13px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid #0008;
}
.shape .sw.gold {
  background: #d9b76e;
}
.shape .sw.sage {
  background: #93ad89;
}
.shape .sw.rose {
  background: #b48b84;
}
.shape .sw.blue {
  background: #8ca5b6;
}
.shape .sw.gray {
  background: #d8d4c6;
}
.shape .sacts button:not(.sw) {
  font: 11px Georgia, serif;
  padding: 2px 7px;
  background: #14272a;
  border-radius: 10px;
}
.shape.text {
  min-width: 80px;
}
.text-bar {
  pointer-events: auto;
  position: absolute;
  left: 0;
  right: 0;
  top: -24px;
  height: 24px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  cursor: grab;
}
.t-body {
  display: block;
  width: 100%;
  min-height: 0;
  padding: 2px 4px;
  margin: 0;
  border: 0;
  background: transparent;
  resize: none;
  overflow: hidden;
  outline: none;
  user-select: text;
  font-family: Georgia, serif;
  font-weight: bold;
  line-height: 1.2;
  color: #ede5d4;
}
.shape.text:hover,
.shape.text:focus-within {
  outline: 1px dashed #d9b76e66;
  outline-offset: 2px;
}
.shape.text.gold .t-body {
  color: #e8c985;
}
.shape.text.sage .t-body {
  color: #b4d1ad;
}
.shape.text.rose .t-body {
  color: #e2b4ac;
}
.shape.text.blue .t-body {
  color: #b6d0e2;
}
.shape.text.s1 .t-body {
  font-size: 15px;
  font-weight: normal;
}
.shape.text.s2 .t-body {
  font-size: 22px;
}
.shape.text.s3 .t-body {
  font-size: 34px;
}
.shape.text.s4 .t-body {
  font-size: 52px;
}
.t-body::placeholder {
  color: #7f8a85;
  font-style: italic;
  font-weight: normal;
}
.shape .resize {
  pointer-events: auto;
  position: absolute;
  right: 3px;
  bottom: 3px;
  width: 14px;
  height: 14px;
  cursor: nwse-resize;
  opacity: 0.55;
  background: linear-gradient(135deg, transparent 52%, #c9b27a 52%, #c9b27a 62%, transparent 62%, transparent 74%, #c9b27a 74%, #c9b27a 84%, transparent 84%);
}
.zone-preview {
  position: absolute;
  border: 2px dashed var(--gold);
  background: #d9b76e18;
  border-radius: 12px;
  pointer-events: none;
}
.canvas-shell.drawing .shape,
.canvas-shell.drawing .shape * {
  pointer-events: none !important;
}
