/* style.css — « La Boîte » : habillage original (famille bleu profond → vert, thème #22577a) */

:root {
  --brand: #22577a;
  --brand-dark: #16324f;
  --accent: #38a3a5;
  --ok: #2e7d54;
  --warn: #b5731f;
  --bad: #c2382e;
  --ink: #1e2b36;
  --ink-soft: #51606d;
  --panel: rgba(255, 255, 255, 0.86);
  --panel-strong: #f4f6f8;
  --card-bg: #ffffff;
  --card-fg: var(--ink);
  --hairline: rgba(20, 35, 48, 0.12);
  --shadow: 0 1px 2px rgba(10, 22, 33, 0.18), 0 4px 14px rgba(10, 22, 33, 0.10);
  --radius: 8px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e8edf2;
    --ink-soft: #a7b4bf;
    --panel: rgba(23, 37, 48, 0.86);
    --panel-strong: rgba(15, 24, 32, 0.92);
    --card-bg: #22303b;
    --card-fg: #e8edf2;
    --hairline: rgba(230, 240, 250, 0.16);
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  color: var(--ink);
  background: #16324f;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

button { font: inherit; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }

/* ------------------------------ Barre haute ------------------------------ */

.topbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 14px;
  background: #16324fd9;
  color: #f0f4f7;
  backdrop-filter: blur(6px);
  z-index: 40;
}

.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 17px; letter-spacing: .2px; }

.brand-box {
  width: 26px; height: 26px;
  border-radius: 7px;
  background: linear-gradient(140deg, #5aa97b, #38a3a5);
  display: inline-flex;
  align-items: flex-end;
  justify-content: center;
  padding-top: 6px;
}

.brand-slot { width: 14px; height: 9px; background: #16324f; border-radius: 3px 3px 0 0; display: inline-block; }

.user-pick select {
  background: #ffffff1f;
  color: inherit;
  border: 1px solid #ffffff2e;
  border-radius: 7px;
  padding: 4px 8px;
}

.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.search-wrap input {
  width: min(340px, 36vw);
  padding: 7px 12px;
  border-radius: 7px;
  border: 1px solid transparent;
  background: #ffffff1f;
  color: inherit;
}
.search-wrap input::placeholder { color: #d6e2ea9c; }
.search-wrap input:focus { outline: none; border-color: #b7d3e2; background: #ffffff2e; }

.btn {
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 7px 12px;
  background: var(--panel-strong);
  color: var(--ink);
}
.btn-ghost { background: #ffffff22; color: #f0f4f7; border-color: #ffffff33; }
.btn-ghost:hover { background: #ffffff36; }
.btn-light:hover { filter: brightness(.96); }
.btn-glass { background: #ffffff26; color: #f0f4f7; border-color: #ffffff30; }
.btn-glass:hover { background: #ffffff3d; }
.btn-danger { background: var(--bad); color: #fff; }
.btn-ghost-dark { background: transparent; color: var(--ink-soft); }

.dark .btn-glass, .dark .btn-ghost { color: #f0f4f7; }

/* ----------------------------- Header board ------------------------------ */

.board-header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 16px;
  background: rgba(12, 26, 37, 0.42);
  backdrop-filter: blur(4px);
  color: #f4f8fb;
  z-index: 30;
}

.board-title-wrap { display: flex; align-items: center; gap: 10px; min-width: 0; }

.board-title {
  background: transparent;
  border: none;
  color: inherit;
  font-size: 19px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 7px;
  white-space: nowrap;
}
.board-title:hover { background: #ffffff24; }

.board-chip {
  background: #ffffff2b;
  border: 1px solid #ffffff3a;
  border-radius: 6px;
  font-size: 12px;
  padding: 2px 8px;
}

.board-wip { font-size: 12px; opacity: .85; }

.board-actions { display: flex; gap: 8px; }

/* ------------------------------- Canvas ---------------------------------- */

.board-canvas {
  position: relative;
  flex: 1 1 auto;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 16px;
  scrollbar-color: rgba(0,0,0,.28) transparent;
}

.board-scroller { display: flex; align-items: flex-start; gap: 12px; height: 100%; }

.list-wrapper {
  flex: 0 0 264px;
  width: 264px;
  max-height: calc(100% - 8px);
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  background: var(--panel);
  backdrop-filter: blur(3px);
  box-shadow: var(--shadow);
  color: var(--ink);
}

.list-wrapper.is-collapsed {
  flex-basis: 44px;
  width: 44px;
  cursor: pointer;
}
.list-wrapper.is-collapsed .list-header-row,
.list-wrapper.is-collapsed .list-cards,
.list-wrapper.is-collapsed .list-composer { display: none; }
.list-collapsed-spine { display: none; }

.is-collapsed .list-collapsed-spine {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 100%;
  padding: 10px 4px;
  writing-mode: vertical-rl;
  font-weight: 600;
  color: var(--ink-soft);
}
.is-collapsed .list-collapsed-spine .spine-count { writing-mode: horizontal-tb; }

.list-header-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  cursor: grab;
  user-select: none;
}

.list-name {
  background: transparent;
  border: none;
  font-weight: 650;
  flex: 1 1 auto;
  min-width: 0;
  padding: 2px 6px;
  border-radius: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
  display: inline-block;
  max-width: 150px;
}
.list-name:hover { background: rgba(127, 145, 158, 0.16); }

.list-count {
  font-size: 12px;
  padding: 1px 7px;
  border-radius: 9px;
  background: rgba(127, 145, 158, 0.2);
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}
.list-count.wip-ok      { background: #2e7d5426; color: var(--ok); }
.list-count.wip-full    { background: #b5731f2b; color: var(--warn); }
.list-count.wip-over    { background: #c2382e33; color: var(--bad); }

.collapse-btn {
  border: none;
  background: transparent;
  border-radius: 6px;
  padding: 3px 7px;
  color: var(--ink-soft);
}
.collapse-btn:hover { background: rgba(127, 145, 158, 0.2); }

.list-cards {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 2px 8px 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  scrollbar-width: thin;
}
.list-cards.drag-over { outline: 2px dashed #38a3a5; outline-offset: -2px; border-radius: 6px; }

/* -------------------------------- Carte ---------------------------------- */

.list-card {
  position: relative;
  background: var(--card-bg);
  color: var(--card-fg);
  border-radius: var(--radius);
  box-shadow: 0 1px 1px rgba(12, 24, 33, 0.14), 0 1px 6px rgba(12, 24, 33, 0.08);
  padding: 8px 10px 9px;
  cursor: pointer;
  user-select: none;
}
.list-card:hover { filter: brightness(.985); }
.list-card.dragging { opacity: .45; }
.list-card.hidden { display: none; }

.card-cover {
  margin: -8px -10px 8px;
  height: 30px;
  border-radius: var(--radius) var(--radius) 0 0;
}

.list-card-title { display: block; font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; }

.card-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.badge-desc, .badge-due, .badge-check, .badge-comments, .badge-attach, .badge-votes {
  font-size: 11.5px;
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 4px;
  border-radius: 5px;
}

.badge-due { font-variant-numeric: tabular-nums; }
.badge-due.due-past { background: #c2382e24; color: var(--bad); font-weight: 600; }
.badge-due.due-complete { background: #2e7d5426; color: var(--ok); font-weight: 600; }
.badge-check { font-variant-numeric: tabular-nums; }
.badge-votes.is-mine { background: rgba(56, 163, 165, .18); color: var(--accent); font-weight: 600; }
.badge-check.check-complete { background: #2e7d5426; color: var(--ok); font-weight: 600; }

.label-chip {
  height: 16px;
  min-width: 24px;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  padding: 0 5px;
}
.label-chip::after {
  content: attr(title);
  color: #fff;
  font-size: 10px;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
  display: inline-block;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-width .12s ease, opacity .1s ease;
}
.label-chip:hover { min-width: unset; }
.label-chip:hover::after { max-width: 120px; opacity: 1; }

.member-avatar {
  width: 23px; height: 23px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10.5px;
  font-weight: 700;
  color: #fff;
  border: 2px solid var(--card-bg);
  margin-right: -5px;
}

/* ------------------------------ Composer --------------------------------- */

.list-composer { padding: 4px 8px 10px; }

.add-card-btn {
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  border-radius: 7px;
  padding: 8px 10px;
  color: var(--ink-soft);
}
.add-card-btn:hover { background: rgba(127, 145, 158, 0.18); color: var(--ink); }

.composer {
  background: var(--panel-strong);
  border-radius: 7px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.composer textarea {
  resize: none;
  border: none;
  background: transparent;
  min-height: 40px;
}
.composer textarea:focus { outline: none; }
.composer-row { display: flex; gap: 6px; align-items: center; }
.composer-row .btn-primary {
  background: var(--brand);
  color: #fff;
  border-color: transparent;
}
.composer-row .btn-primary:hover { filter: brightness(1.08); }
.composer-toggle { border: 1px solid var(--hairline); background: transparent; border-radius: 7px; padding: 7px 9px; color: var(--ink-soft); }

.add-list-ghost {
  flex: 0 0 264px;
  min-height: 44px;
  border: none;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.32);
  color: #f7fafc;
  text-align: left;
  padding: 10px 12px;
  backdrop-filter: blur(3px);
}
.add-list-ghost:hover { background: rgba(255, 255, 255, 0.45); }
.add-list-ghost[hidden] { display: none; }

.new-list-composer {
  flex: 0 0 264px;
  width: 264px;
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.new-list-composer input { border: 1px solid var(--hairline); border-radius: 7px; padding: 7px 9px; background: var(--card-bg); color: var(--card-fg); }
.new-list-composer input:focus { outline: none; border-color: var(--accent); }

/* ------------------------------ Popovers --------------------------------- */

.popover {
  position: absolute;
  top: 92px;
  width: 270px;
  background: var(--panel-strong);
  color: var(--ink);
  border-radius: var(--radius);
  box-shadow: 0 6px 26px rgba(9, 20, 30, 0.3);
  padding: 12px 14px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14px;
}
.popovers .popover[hidden] { display: none; }

#popover-filter { right: 60px; }
#popover-menu { right: 14px; max-height: 70vh; overflow: auto; }
.popover-notif { right: 14px; top: 52px; width: 320px; max-height: 70vh; overflow: auto; }
.popover-title-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

.notif-btn { position: relative; padding-inline: 9px; }
.notif-count {
  position: absolute; top: -5px; right: -5px;
  min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 9px; background: var(--bad); color: #fff;
  font-size: 10.5px; font-weight: 700; line-height: 17px; text-align: center;
}
.notif-count[hidden] { display: none; }
.notif-list, .feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.notif-item { display: flex; gap: 8px; align-items: flex-start; border-radius: 7px; padding: 4px; }
.notif-item.is-unread { background: rgba(56, 163, 165, .14); }
.notif-body {
  flex: 1; border: none; background: transparent; color: inherit; text-align: left;
  font: inherit; font-size: 13px; display: flex; flex-direction: column; gap: 2px; padding: 0; cursor: pointer;
}
.notif-item .member-avatar, .feed-item .member-avatar { flex: none; margin-right: 0; }
.feed-empty { font-size: 13px; color: var(--ink-soft); font-style: italic; }
.feed-item { display: flex; gap: 9px; align-items: flex-start; font-size: 13.5px; }
.feed-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; overflow-wrap: anywhere; }
.feed-when { font-size: 11.5px; color: var(--ink-soft); }
.feed-activity { color: var(--ink-soft); }
.feed-activity strong { color: var(--ink); }
.feed-compact { gap: 6px; }
.feed-compact .feed-item { font-size: 12.5px; }
.feed-card-link { border: none; background: transparent; padding: 0; color: var(--accent); font: inherit; text-decoration: underline; cursor: pointer; }
.comment-bubble {
  background: var(--card-bg); color: var(--card-fg);
  border: 1px solid var(--hairline); border-radius: 8px; padding: 7px 10px; white-space: pre-wrap;
}
.comment-actions { display: flex; gap: 10px; }
.comment-actions button { border: none; background: transparent; padding: 0; font-size: 12px; color: var(--ink-soft); text-decoration: underline; cursor: pointer; }
.comment-actions button:hover { color: var(--ink); }
.comment-edit, #modal-comment-input {
  width: 100%; box-sizing: border-box; resize: vertical;
  border: 1px solid var(--hairline); border-radius: 8px; padding: 7px 10px;
  background: var(--panel-strong); color: inherit; font: inherit; font-size: 13.5px;
}
.comment-edit:focus, #modal-comment-input:focus { outline: none; border-color: var(--accent); }
.comment-composer { display: flex; gap: 9px; align-items: flex-start; margin-bottom: 12px; }
.comment-avatar { flex: none; margin-right: 0; }
.comment-box { flex: 1; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }

.bg-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.bg-swatch { height: 34px; border-radius: 6px; border: 2px solid transparent; cursor: pointer; }
.bg-swatch.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--card-bg) inset; }

.popover-title { font-weight: 700; font-size: 13px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .4px; }
.filter-heading { font-weight: 650; font-size: 12.5px; color: var(--ink-soft); }
.filter-label, .filter-mem {
  display: flex; align-items: center; gap: 8px; padding: 3px 0; font-size: 13.5px;
}
.filter-items { display: flex; flex-direction: column; }
.filter-dot { width: 13px; height: 13px; border-radius: 4px; display: inline-block; }
.menu-stats { font-size: 13px; color: var(--ink-soft); }
.menu-trash { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.trash-row { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.trash-row button { border: 1px solid var(--hairline); background: transparent; border-radius: 6px; padding: 2px 8px; color: var(--ink-soft); font-size: 12px; }
.trash-row button:hover { color: var(--ink); border-color: var(--accent); }
.menu-foot { font-size: 11.5px; color: var(--ink-soft); opacity: .8; }

/* ------------------------------- Modale ---------------------------------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 18, 27, 0.62);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 6vh 16px 16px;
  z-index: 100;
  overflow-y: auto;
}
.modal-overlay[hidden] { display: none; }

.card-modal {
  width: min(620px, 100%);
  background: var(--card-bg);
  color: var(--card-fg);
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(5, 14, 22, 0.45);
  padding: 0 0 18px;
}

.modal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
}

.list-chip {
  background: var(--panel-strong);
  border: 1px solid var(--hairline);
  color: var(--ink-soft);
  border-radius: 6px;
  font-size: 12.5px;
  padding: 3px 9px;
}

.modal-close { border: none; background: transparent; border-radius: 6px; padding: 4px 8px; color: var(--ink-soft); font-size: 15px; }
.modal-close:hover { background: rgba(127,145,158,.16); color: var(--ink); }

.modal-body { padding: 0 22px; display: flex; flex-direction: column; gap: 16px; }
.modal-block h2 { margin: 0; }
.modal-heading { font-size: 12.5px; font-weight: 700; color: var(--ink-soft); margin-bottom: 6px; }

#modal-title {
  width: 100%;
  font-size: 19px;
  font-weight: 700;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 4px 8px;
  background: transparent;
  color: inherit;
}
#modal-title:focus { outline: none; border-color: var(--accent); background: var(--panel-strong); }

#modal-desc {
  width: 100%;
  border: 1px solid var(--hairline);
  border-radius: 7px;
  background: var(--panel-strong);
  color: inherit;
  padding: 9px 11px;
  resize: vertical;
  min-height: 74px;
}
#modal-desc:focus { outline: none; border-color: var(--accent); }

.save-hint { font-size: 11.5px; color: var(--ink-soft); min-height: 14px; margin-top: 3px; }

.due-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
#modal-due { border: 1px solid var(--hairline); border-radius: 7px; padding: 6px 9px; background: var(--panel-strong); color: inherit; }
#modal-due:focus { outline: none; border-color: var(--accent); }
#modal-due-complete.is-on { background: var(--ok); color: #fff; border-color: transparent; }

.label-row, .mem-row { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.label-pick {
  border: 1px solid transparent;
  border-radius: 5px;
  padding: 4px 10px;
  color: #fff;
  font-size: 12.5px;
  opacity: .48;
}
.label-pick.on { opacity: 1; box-shadow: 0 0 0 2px var(--card-bg) inset, 0 0 0 3px rgba(30,43,54,.35) inset; }
.mem-pick {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 2px solid transparent;
  color: #fff;
  font-weight: 700;
  font-size: 11.5px;
  opacity: .45;
}
.mem-pick.on { opacity: 1; border-color: var(--accent); }

.cover-row { display: flex; gap: 8px; flex-wrap: wrap; }
.cover-swatch { width: 52px; height: 30px; border-radius: 6px; border: 2px solid transparent; }
.cover-swatch.on { border-color: var(--accent); }
.cover-swatch.cover-none { background: repeating-linear-gradient(45deg, rgba(127,145,158,.25) 0 6px, transparent 6px 12px); }

.modal-foot { display: flex; gap: 8px; border-top: 1px solid var(--hairline); padding-top: 12px; }
.modal-foot [hidden] { display: none; }
.modal-heading-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.modal-heading-row .modal-heading { margin-bottom: 0; }
.btn-sm { padding: 3px 9px; font-size: 12.5px; }
.btn-primary { background: var(--brand); color: #fff; border-color: transparent; }
.btn-primary:disabled { opacity: .5; cursor: default; }

.checklists { display: flex; flex-direction: column; gap: 14px; }
.checklist { display: flex; flex-direction: column; gap: 6px; }
.checklist-head { display: flex; align-items: center; gap: 8px; }
.checklist-name {
  flex: 1; font-weight: 650; font-size: 14px; border: 1px solid transparent; border-radius: 6px;
  padding: 3px 6px; background: transparent; color: inherit;
}
.checklist-name:focus { outline: none; border-color: var(--accent); background: var(--panel-strong); }
.checklist-progress { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--ink-soft); }
.checklist-pct { width: 36px; font-variant-numeric: tabular-nums; }
.checklist-bar { flex: 1; height: 7px; border-radius: 4px; background: rgba(127, 145, 158, .25); overflow: hidden; }
.checklist-bar > span { display: block; height: 100%; background: var(--accent); transition: width .2s ease; }
.checklist-progress.is-complete .checklist-bar > span { background: var(--ok); }
.check-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.check-item { display: flex; align-items: center; gap: 8px; padding: 3px 4px; border-radius: 6px; font-size: 13.5px; }
.check-item:hover { background: rgba(127, 145, 158, .12); }
.check-item input { width: 16px; height: 16px; accent-color: var(--ok); }
.check-item-name { flex: 1; overflow-wrap: anywhere; }
.check-item.is-checked .check-item-name { text-decoration: line-through; color: var(--ink-soft); }
.check-item-del { border: none; background: transparent; color: var(--ink-soft); opacity: 0; padding: 0 4px; cursor: pointer; }
.check-item:hover .check-item-del, .check-item-del:focus { opacity: 1; }
.check-add { display: flex; gap: 6px; }
.check-add input {
  flex: 1; border: 1px solid var(--hairline); border-radius: 7px; padding: 5px 8px;
  background: var(--panel-strong); color: inherit; font: inherit; font-size: 13px;
}
.check-add input:focus { outline: none; border-color: var(--accent); }

.copy-panel {
  display: flex; flex-direction: column; gap: 8px; padding: 12px;
  border: 1px solid var(--hairline); border-radius: var(--radius); background: var(--panel-strong);
}
.copy-panel[hidden] { display: none; }
.copy-field { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--ink-soft); }
.copy-field input, .copy-field select {
  border: 1px solid var(--hairline); border-radius: 7px; padding: 6px 8px;
  background: var(--card-bg); color: var(--card-fg); font: inherit; font-size: 13.5px;
}
.copy-keep { border: none; margin: 0; padding: 0; display: flex; gap: 12px; flex-wrap: wrap; font-size: 13px; }
.copy-keep legend { font-size: 12.5px; color: var(--ink-soft); padding: 0; margin-bottom: 4px; }

/* -------------------------------- Toast ---------------------------------- */

.toast {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--brand-dark);
  color: #eef4f8;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13.5px;
  box-shadow: var(--shadow);
  z-index: 200;
}

[draggable].drag-ghost { opacity: .6; }
.drop-slot { height: 2px; background: var(--accent); border-radius: 2px; margin: -5px 0; }
/* ------------------------------ Écran étroit ------------------------------ */

@media (max-width: 640px) {
  .topbar { flex-wrap: wrap; gap: 8px 10px; padding: 8px 12px; }
  .topbar-actions { width: 100%; margin-left: 0; gap: 8px; }
  .search-wrap { flex: 1; min-width: 0; }
  .search-wrap input { width: 100%; }
  .popover { top: 150px; left: 12px; right: 12px !important; width: auto; }
  .popover-notif { top: 96px; }
}

/* ------------------------- Pièces jointes, votes, tableaux ------------------------- */

.attachments { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.attachment { display: flex; align-items: center; gap: 10px; }
.attachment-thumb {
  flex: none; width: 64px; height: 44px; border-radius: 6px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: rgba(127, 145, 158, .2); color: var(--ink-soft);
  font-size: 12px; font-weight: 700; text-decoration: none;
}
.attachment-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.attachment-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.attachment-name { color: var(--ink); font-weight: 600; font-size: 13.5px; overflow-wrap: anywhere; }
.attachment .attachment-del { opacity: .6; }
.attachment:hover .attachment-del { opacity: 1; }
.file-pick { cursor: pointer; }
.card-modal.file-over { outline: 3px dashed var(--accent); outline-offset: -6px; }

.vote-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
#modal-vote.is-on { background: var(--accent); color: #fff; border-color: transparent; }
.voters .member-avatar { margin-right: -4px; }

.board-template-chip { background: #e3c73f; color: #3a2f05; }
.board-template-chip[hidden] { display: none; }
.menu-boards { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.menu-board {
  display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 6px;
  color: inherit; text-decoration: none; font-size: 13.5px;
}
.menu-board:hover { background: rgba(127, 145, 158, .16); }
.menu-board.is-current { font-weight: 700; background: rgba(56, 163, 165, .14); }
.menu-board-swatch { width: 22px; height: 16px; border-radius: 4px; flex: none; }
.menu-board-tag { margin-left: auto; font-size: 11px; padding: 0 6px; border-radius: 4px; background: #e3c73f; color: #3a2f05; }
.menu-inline-form { display: flex; gap: 6px; }
.menu-inline-form[hidden] { display: none; }
.menu-inline-form input {
  flex: 1; min-width: 0; border: 1px solid var(--hairline); border-radius: 7px; padding: 5px 8px;
  background: var(--card-bg); color: var(--card-fg); font: inherit; font-size: 13px;
}
.menu-toggle { display: flex; align-items: center; gap: 8px; font-size: 13px; }
