:root {
  --bg: #f4f5f8;
  --bg-elev: #ffffff;
  --bg-sunken: #eceef3;
  --bg-hover: #e4e7ee;
  --text: #1d2130;
  --text-muted: #646b7f;
  --text-faint: #9198aa;
  --border: #dfe2ea;
  --border-strong: #c9cdd8;
  --accent: #6366f1;
  --accent-text: #ffffff;
  --accent-soft: #eef0ff;
  --danger: #dc2626;
  --danger-soft: #fdecec;
  --success: #16a34a;
  --success-soft: #e7f6ec;
  --warn: #b45309;
  --warn-soft: #fdf3e2;
  --shadow-sm: 0 1px 2px rgba(20, 24, 40, .06), 0 1px 1px rgba(20, 24, 40, .04);
  --shadow: 0 4px 14px rgba(20, 24, 40, .08), 0 1px 3px rgba(20, 24, 40, .06);
  --shadow-lg: 0 24px 60px rgba(20, 24, 40, .22);
  --radius: 10px;
  --radius-sm: 7px;
  --list-bg: #ebedf2;
  --board-tint: var(--accent);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12141b;
    --bg-elev: #1c1f29;
    --bg-sunken: #161820;
    --bg-hover: #262a36;
    --text: #e8eaf1;
    --text-muted: #a0a6b8;
    --text-faint: #6d7386;
    --border: #2b2f3c;
    --border-strong: #3a3f4f;
    --accent-soft: #252848;
    --danger-soft: #3a1d20;
    --success-soft: #16301f;
    --warn: #f0b04c;
    --warn-soft: #3a2c15;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35);
    --shadow: 0 6px 18px rgba(0, 0, 0, .35);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, .55);
    --list-bg: #181b24;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #12141b;
  --bg-elev: #1c1f29;
  --bg-sunken: #161820;
  --bg-hover: #262a36;
  --text: #e8eaf1;
  --text-muted: #a0a6b8;
  --text-faint: #6d7386;
  --border: #2b2f3c;
  --border-strong: #3a3f4f;
  --accent-soft: #252848;
  --danger-soft: #3a1d20;
  --success-soft: #16301f;
  --warn: #f0b04c;
  --warn-soft: #3a2c15;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35);
  --shadow: 0 6px 18px rgba(0, 0, 0, .35);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, .55);
  --list-bg: #181b24;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
.splash { display: grid; place-items: center; height: 100vh; color: var(--text-muted); }
.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); }
.hidden { display: none !important; }

/* ---------- Boutons & champs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--bg-elev); cursor: pointer;
  font-weight: 500; white-space: nowrap; transition: background .12s, border-color .12s, transform .06s;
}
.btn:hover { background: var(--bg-hover); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.danger { color: var(--danger); }
.btn.danger:hover { background: var(--danger-soft); border-color: var(--danger); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--bg-hover); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 13px; }
.btn.block { width: 100%; justify-content: flex-start; }
.icon-btn {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: var(--radius-sm);
  border: 0; background: transparent; cursor: pointer; color: var(--text-muted);
}
.icon-btn:hover { background: var(--bg-hover); color: var(--text); }
.icon { width: 16px; height: 16px; flex: none; }

.input, .textarea, .select {
  width: 100%; border: 1px solid var(--border); background: var(--bg-elev); border-radius: var(--radius-sm);
  padding: 7px 10px; outline: none; transition: border-color .12s, box-shadow .12s;
}
.input:focus, .textarea:focus, .select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.textarea { resize: vertical; min-height: 80px; }
.field { display: grid; gap: 5px; margin-bottom: 14px; }
.field > span { font-size: 13px; font-weight: 500; color: var(--text-muted); }
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.input:focus-visible, .textarea:focus-visible, .select:focus-visible { outline: none; }

/* ---------- Auth ---------- */
.auth {
  min-height: 100vh; display: grid; place-items: center; padding: 24px 16px;
  background:
    radial-gradient(1200px 500px at 10% -10%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 60%),
    radial-gradient(900px 500px at 110% 110%, color-mix(in srgb, #0ea5e9 14%, transparent), transparent 60%),
    var(--bg);
}
.auth-card { width: 100%; max-width: 380px; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 16px; padding: 28px; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 20px; margin: 18px 0 4px; }
.auth-card p { margin: 0 0 20px; }
.auth-card .btn.primary { width: 100%; height: 38px; margin-top: 4px; }
.auth-switch { margin-top: 16px; text-align: center; font-size: 13px; }
.form-error { color: var(--danger); font-size: 13px; margin: -4px 0 12px; min-height: 0; }
.logo { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; font-size: 16px; text-decoration: none; letter-spacing: -.01em; }
.logo-mark { width: 26px; height: 26px; border-radius: 7px; background: var(--accent); display: grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 6px 5px; }
.logo-mark i { background: #fff; border-radius: 2px; }
.logo-mark i:last-child { height: 62%; opacity: .75; }

/* ---------- Barre du haut ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20; height: 54px; display: flex; align-items: center; gap: 6px;
  padding: 0 16px; background: var(--bg-elev); border-bottom: 1px solid var(--border);
}
.nav { display: flex; gap: 2px; margin-left: 18px; }
.nav a { padding: 7px 11px; border-radius: var(--radius-sm); text-decoration: none; color: var(--text-muted); font-weight: 500; }
.nav a:hover { background: var(--bg-hover); color: var(--text); }
.nav a.active { background: var(--accent-soft); color: var(--accent); }
:root[data-theme="dark"] .nav a.active { color: #a5b4fc; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .nav a.active { color: #a5b4fc; } }
.me-btn { border: 0; background: transparent; cursor: pointer; padding: 3px; border-radius: 50%; }

/* ---------- Avatars ---------- */
.avatar {
  --size: 28px; width: var(--size); height: var(--size); border-radius: 50%; flex: none;
  display: inline-grid; place-items: center; color: #fff; font-weight: 600; font-size: calc(var(--size) * .4);
  letter-spacing: .02em; position: relative; user-select: none;
}
.avatar.sm { --size: 24px; }
.avatar.xs { --size: 20px; }
.avatar.lg { --size: 36px; }
.avatar.online::after { content: ""; position: absolute; right: -1px; bottom: -1px; width: 9px; height: 9px; border-radius: 50%; background: #22c55e; border: 2px solid var(--bg-elev); }
.avatars { display: flex; }
.avatars .avatar { margin-left: -6px; box-shadow: 0 0 0 2px var(--bg-elev); }
.avatars .avatar:first-child { margin-left: 0; }

/* ---------- Menus ---------- */
.menu {
  position: fixed; z-index: 60; min-width: 200px; background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 6px; animation: pop .12s ease-out;
}
.menu-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.menu-item { display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 10px; border: 0; background: none; border-radius: 6px; cursor: pointer; text-align: left; }
.menu-item:hover { background: var(--bg-hover); }
.menu-item.danger { color: var(--danger); }
.menu-sep { height: 1px; background: var(--border); margin: 6px 0; }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }

/* ---------- Pages ---------- */
.page { max-width: 1100px; margin: 0 auto; padding: 28px 20px 60px; }
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 22px; letter-spacing: -.01em; }
.board-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.board-tile {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; min-height: 112px; padding: 14px 16px;
  border-radius: 12px; text-decoration: none; color: #fff; background: var(--c);
  box-shadow: var(--shadow-sm); transition: transform .12s, box-shadow .12s; overflow: hidden;
}
.board-tile::before { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(255,255,255,.18), transparent 55%); pointer-events: none; }
.board-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.board-tile h3 { font-size: 16px; position: relative; word-break: break-word; }
.board-tile .meta { display: flex; gap: 12px; font-size: 12px; opacity: .92; position: relative; }
.board-tile .progress { position: relative; height: 4px; border-radius: 4px; background: rgba(255,255,255,.3); margin-top: 10px; overflow: hidden; }
.board-tile .progress i { display: block; height: 100%; background: #fff; border-radius: 4px; }
.board-tile.new { background: var(--bg-elev); color: var(--text-muted); border: 1.5px dashed var(--border-strong); box-shadow: none; align-items: center; justify-content: center; cursor: pointer; font-weight: 500; gap: 6px; flex-direction: row; }
.board-tile.new::before { display: none; }
.board-tile.new:hover { color: var(--accent); border-color: var(--accent); }
/* Accueil : tableaux empilés, récapitulatif à droite */
.board-rows { display: flex; flex-direction: column; gap: 12px; }
.board-row {
  position: relative; display: grid; grid-template-columns: minmax(220px, 1fr) minmax(0, 1.6fr); gap: 24px; align-items: center;
  padding: 16px 20px 16px 24px; border-radius: 12px; text-decoration: none; color: var(--text);
  background: var(--bg-elev); border: 1px solid var(--border); box-shadow: var(--shadow-sm); overflow: hidden;
  transition: border-color .12s, box-shadow .12s, transform .12s;
}
.board-row::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--c); }
.board-row:hover { border-color: var(--border-strong); box-shadow: var(--shadow); transform: translateY(-1px); }
.board-row h3 { font-size: 16px; word-break: break-word; margin-bottom: 6px; }
.brow-meta { display: flex; align-items: center; gap: 12px; font-size: 12.5px; color: var(--text-muted); flex-wrap: wrap; }
.brow-meta .avatars:empty { display: none; }
.brow-progress { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: 12px; color: var(--text-muted); }
.brow-progress .progress { flex: 1; max-width: 220px; height: 5px; border-radius: 5px; background: var(--border); overflow: hidden; }
.brow-progress .progress i { display: block; height: 100%; background: var(--c); border-radius: 5px; }
.brow-recap { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.brow-bar { display: flex; gap: 2px; height: 8px; border-radius: 8px; overflow: hidden; background: var(--border); }
.brow-bar i { display: block; min-width: 4px; }
.brow-lists { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.brow-list { display: flex; align-items: center; gap: 7px; font-size: 13px; min-width: 0; }
.brow-list .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.brow-list .name { color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
.brow-list strong { font-variant-numeric: tabular-nums; }
.brow-list.zero { opacity: .55; }
.brow-alerts { display: flex; flex-wrap: wrap; gap: 6px; }
.brow-alert { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 500; padding: 2px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.brow-alert svg { width: 13px; height: 13px; }
.brow-alert.late { background: var(--danger-soft); color: var(--danger); }
.brow-alert.soon { background: var(--warn-soft); color: var(--warn); }
.board-row.new { display: flex; justify-content: center; gap: 6px; padding: 18px; color: var(--text-muted); border: 1.5px dashed var(--border-strong); box-shadow: none; cursor: pointer; font: inherit; font-weight: 500; }
.board-row.new::before { display: none; }
.board-row.new:hover { color: var(--accent); border-color: var(--accent); transform: none; }
@media (max-width: 760px) {
  .board-row { grid-template-columns: 1fr; gap: 14px; padding: 14px 16px 14px 20px; }
}
.empty { text-align: center; padding: 48px 20px; color: var(--text-muted); background: var(--bg-elev); border: 1px dashed var(--border-strong); border-radius: 12px; }
.empty h3 { color: var(--text); margin-bottom: 6px; font-size: 16px; }

.panel { background: var(--bg-elev); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; margin-bottom: 20px; }
.panel-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.panel-head h2 { font-size: 15px; }
.panel-body { padding: 16px; }
.table { width: 100%; border-collapse: collapse; }
.table td, .table th { padding: 10px 16px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.table th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-faint); font-weight: 600; }
.table tr:last-child td { border-bottom: 0; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 99px; font-size: 12px; font-weight: 500; background: var(--bg-sunken); color: var(--text-muted); }
.badge.accent { background: var(--accent-soft); color: var(--accent); }
.invite-link { display: flex; gap: 8px; margin-top: 12px; }
.invite-link .input { font-family: ui-monospace, Consolas, monospace; font-size: 12px; }

.task-group { margin-bottom: 22px; }
.task-group h3 { display: flex; align-items: center; gap: 8px; font-size: 14px; margin-bottom: 8px; }
.dot { width: 10px; height: 10px; border-radius: 3px; background: var(--c); flex: none; }
.task-row { display: flex; align-items: center; gap: 12px; padding: 11px 14px; background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 6px; text-decoration: none; transition: border-color .12s; }
.task-row:hover { border-color: var(--border-strong); }
.task-row .title { flex: 1; min-width: 0; font-weight: 500; }

/* ---------- Tableau ---------- */
.board-view { display: flex; flex-direction: column; height: calc(100vh - 54px); height: calc(100dvh - 54px); }
.board-bar {
  display: flex; align-items: center; gap: 10px; padding: 10px 16px; flex-wrap: wrap;
  background: color-mix(in srgb, var(--board-tint) 9%, var(--bg-elev)); border-bottom: 1px solid var(--border);
}
.board-title { font-size: 17px; font-weight: 700; padding: 4px 8px; border-radius: 6px; cursor: text; border: 1px solid transparent; letter-spacing: -.01em; }
.board-title:hover { background: var(--bg-hover); }
input.board-title { background: var(--bg-elev); border-color: var(--accent); outline: none; width: min(320px, 60vw); }
.board-swatch { width: 12px; height: 12px; border-radius: 4px; background: var(--board-tint); flex: none; }
.filters { display: flex; gap: 6px; align-items: center; }
.filters .input { width: 190px; height: 32px; }
.filters .select { width: auto; height: 32px; padding: 0 8px; }
.lists {
  flex: 1; display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px 18px; overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x proximity;
}
.list {
  flex: 0 0 280px; max-height: 100%; display: flex; flex-direction: column; background: var(--list-bg);
  border-radius: 12px; border: 1px solid var(--border); scroll-snap-align: start;
}
.list-head { display: flex; align-items: center; gap: 6px; padding: 9px 8px 6px 12px; cursor: grab; }
.list-head:active { cursor: grabbing; }
.list-name { flex: 1; font-weight: 600; font-size: 14px; padding: 3px 4px; border-radius: 5px; border: 1px solid transparent; min-width: 0; overflow-wrap: anywhere; cursor: text; }
input.list-name { background: var(--bg-elev); border-color: var(--accent); outline: none; }
.count { font-size: 12px; color: var(--text-faint); font-weight: 500; }
.cards { flex: 1; overflow-y: auto; padding: 2px 8px 4px; min-height: 8px; display: flex; flex-direction: column; gap: 7px; }
.card {
  position: relative; background: var(--bg-elev); border-radius: 9px; padding: 9px 11px; cursor: pointer;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border); transition: border-color .12s, box-shadow .12s;
}
.card:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.card-labels { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.chip { display: inline-block; height: 7px; width: 34px; border-radius: 4px; background: var(--c); }
.chip.named { width: auto; height: auto; padding: 1px 7px; font-size: 11px; font-weight: 600; color: #fff; line-height: 16px; }
.card-title { overflow-wrap: anywhere; padding-right: 18px; }
.card.done .card-title { color: var(--text-muted); text-decoration: line-through; text-decoration-color: var(--text-faint); }
.card-foot { display: flex; align-items: center; gap: 8px; margin-top: 7px; flex-wrap: wrap; }
.card-foot:empty { display: none; }
.meta-item { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; color: var(--text-muted); }
.meta-item .icon { width: 13px; height: 13px; }
.due { padding: 1px 6px; border-radius: 5px; }
.due.soon { background: var(--warn-soft); color: var(--warn); }
.due.late { background: var(--danger-soft); color: var(--danger); }
.due.ok { background: var(--success-soft); color: var(--success); }
.check-done { color: var(--success); }
.card-foot .avatars { margin-left: auto; }
.card-check {
  position: absolute; top: 8px; right: 8px; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--border-strong);
  background: var(--bg-elev); display: grid; place-items: center; opacity: 0; cursor: pointer; padding: 0; transition: opacity .12s;
}
.card:hover .card-check, .card.done .card-check { opacity: 1; }
.card.done .card-check { background: var(--success); border-color: var(--success); color: #fff; }
.card-check .icon { width: 11px; height: 11px; }
@media (hover: none) { .card-check { opacity: 1; } }
.card.ghost { opacity: .35; }
.card.chosen { box-shadow: var(--shadow-lg); transform: rotate(1.5deg); }
.list.ghost { opacity: .4; }
.composer { padding: 4px 8px 8px; }
.composer .textarea { min-height: 60px; resize: none; margin-bottom: 6px; box-shadow: var(--shadow-sm); }
.add-card { width: 100%; justify-content: flex-start; color: var(--text-muted); }
.add-list { flex: 0 0 280px; }
.add-list .btn { width: 100%; height: 42px; justify-content: flex-start; background: color-mix(in srgb, var(--list-bg) 70%, transparent); border-style: dashed; color: var(--text-muted); }
.add-list form { background: var(--list-bg); border: 1px solid var(--border); padding: 8px; border-radius: 12px; }
.add-list .input { margin-bottom: 6px; }
.filtered-out { display: none !important; }

/* ---------- Modale ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 50; background: rgba(12, 14, 22, .5); display: flex; align-items: flex-start; justify-content: center;
  padding: 6vh 16px 24px; overflow-y: auto; animation: fade .15s ease-out;
}
@keyframes fade { from { opacity: 0; } }
.modal { position: relative; width: 100%; max-width: 480px; background: var(--bg-elev); border-radius: 14px; box-shadow: var(--shadow-lg); border: 1px solid var(--border); animation: rise .18s ease-out; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.modal.wide { max-width: 820px; }
.modal-head { display: flex; align-items: flex-start; gap: 10px; padding: 18px 20px 6px; }
.modal-head h2 { font-size: 17px; flex: 1; }
.modal-body { padding: 10px 20px 20px; }
.modal-close { position: absolute; top: 12px; right: 12px; }

.card-modal-title { width: 100%; font-size: 19px; font-weight: 700; border: 1px solid transparent; background: transparent; resize: none; padding: 4px 6px; margin-left: -7px; border-radius: 6px; line-height: 1.3; overflow: hidden; outline: none; }
.card-modal-title:hover { background: var(--bg-hover); }
.card-modal-title:focus { background: var(--bg-elev); border-color: var(--accent); }
.card-layout { display: grid; grid-template-columns: 1fr 210px; gap: 24px; }
.section { margin-bottom: 22px; }
.section-title { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); margin-bottom: 9px; }
.section-title .icon { color: var(--text-faint); }
.side .section { margin-bottom: 16px; }
.side h4 { margin: 0 0 7px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--text-faint); }
.pick-list { display: flex; flex-direction: column; gap: 3px; }
.pick { display: flex; align-items: center; gap: 8px; padding: 5px 7px; border-radius: 6px; cursor: pointer; border: 1px solid transparent; background: none; width: 100%; text-align: left; }
.pick:hover { background: var(--bg-hover); }
.pick.on { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.pick .tick { margin-left: auto; color: var(--accent); visibility: hidden; }
.pick.on .tick { visibility: visible; }
.pick .label-swatch { width: 22px; height: 14px; border-radius: 4px; background: var(--c); flex: none; }
.desc-view { white-space: pre-wrap; overflow-wrap: anywhere; padding: 9px 11px; border-radius: 8px; background: var(--bg-sunken); cursor: text; min-height: 44px; }
.desc-view.empty-desc { color: var(--text-faint); }
.desc-view a { color: var(--accent); }
.progress-bar { height: 6px; border-radius: 6px; background: var(--bg-sunken); overflow: hidden; margin-bottom: 8px; }
.progress-bar i { display: block; height: 100%; background: var(--accent); transition: width .2s; }
.progress-bar.full i { background: var(--success); }
.check-item { display: flex; align-items: flex-start; gap: 9px; padding: 5px 6px; border-radius: 6px; }
.check-item:hover { background: var(--bg-hover); }
.check-item input[type=checkbox] { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--accent); flex: none; }
.check-item span { flex: 1; overflow-wrap: anywhere; }
.check-item.done span { text-decoration: line-through; color: var(--text-muted); }
.check-item .icon-btn { width: 24px; height: 24px; opacity: 0; }
.check-item:hover .icon-btn { opacity: 1; }
@media (hover: none) { .check-item .icon-btn { opacity: 1; } }
.feed-item { display: flex; gap: 10px; margin-bottom: 14px; }
.feed-item .body { flex: 1; min-width: 0; }
.feed-item .who { font-weight: 600; }
.feed-item .when { font-size: 12px; color: var(--text-faint); margin-left: 6px; }
.comment-body { margin-top: 4px; padding: 8px 11px; background: var(--bg-sunken); border-radius: 8px; white-space: pre-wrap; overflow-wrap: anywhere; }
.feed-item.activity { font-size: 13px; color: var(--text-muted); align-items: center; }
.feed-item.activity .who { color: var(--text); }
.link-btn { border: 0; background: none; padding: 0; color: var(--text-faint); cursor: pointer; font-size: 12px; text-decoration: underline; margin-left: 8px; }
.color-row { display: flex; gap: 6px; flex-wrap: wrap; }
.swatch { width: 28px; height: 28px; border-radius: 8px; background: var(--c); border: 2px solid transparent; cursor: pointer; padding: 0; }
.swatch.on { box-shadow: 0 0 0 2px var(--bg-elev), 0 0 0 4px var(--c); }
.label-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.label-row .select { width: 120px; }
.member-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.member-row:last-child { border-bottom: 0; }
.member-row .name { flex: 1; min-width: 0; }
.member-row .name small { display: block; color: var(--text-faint); overflow: hidden; text-overflow: ellipsis; }

/* ---------- Pièces jointes ---------- */
.card-cover { margin: -9px -11px 8px; border-radius: 8px 8px 0 0; overflow: hidden; background: var(--bg-sunken); }
.card-cover img { display: block; width: 100%; max-height: 170px; object-fit: cover; pointer-events: none; }
.card.drop-active { outline: 2px dashed var(--accent); outline-offset: 2px; background: var(--accent-soft); }
.modal.drop-active { outline: 3px dashed var(--accent); outline-offset: -10px; }
.modal.drop-active::after {
  content: 'Déposez les fichiers pour les joindre à la carte'; position: absolute; inset: 0; display: grid; place-items: center;
  background: color-mix(in srgb, var(--bg-elev) 82%, transparent); border-radius: inherit; font-weight: 600; color: var(--accent); pointer-events: none; z-index: 5;
}
.dropzone {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px; border: 1.5px dashed var(--border-strong); border-radius: 10px;
  background: none; color: var(--text-muted); cursor: pointer; text-align: left; font-size: 13px; line-height: 1.45;
}
.dropzone:hover { border-color: var(--accent); background: var(--accent-soft); }
.dropzone > .icon { width: 22px; height: 22px; flex: none; color: var(--text-faint); }
.dropzone strong { color: var(--text); }
.att-list { display: flex; flex-direction: column; gap: 10px; }
.att { display: flex; gap: 12px; align-items: flex-start; }
.att-thumb {
  flex: none; width: 96px; height: 68px; border-radius: 8px; overflow: hidden; background: var(--bg-sunken); border: 1px solid var(--border);
  display: grid; place-items: center; padding: 0; cursor: pointer; color: var(--text-muted); font-size: 12px; font-weight: 700; text-decoration: none; letter-spacing: .03em;
}
.att-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.att-thumb:hover { border-color: var(--border-strong); }
.att-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.att-name { font-weight: 600; color: var(--text); text-decoration: none; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-name:hover { text-decoration: underline; }
.att-info small { font-size: 12px; }
.att-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 2px; }
.att-actions .link-btn { margin-left: 0; }
.att-cover { margin-top: 4px; font-size: 11px; }
.att-cover .icon { width: 12px; height: 12px; }
.uploads:not(:empty) { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.upload-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted); }
.upload-row .icon { width: 14px; height: 14px; flex: none; }
.upload-row .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-row .progress-bar { width: 120px; margin: 0; flex: none; }
.lightbox { max-width: min(1100px, 100%); }
.lightbox .modal-body { padding: 44px 16px 16px; }
.lightbox img { display: block; max-width: 100%; max-height: 76vh; margin: 0 auto; border-radius: 8px; }

/* ---------- Toasts ---------- */
#toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: #1d2130; color: #fff; padding: 10px 16px; border-radius: 9px; box-shadow: var(--shadow); font-size: 13px; animation: rise .2s ease-out; max-width: 90vw; }
.toast.error { background: var(--danger); }
.toast.notif { pointer-events: auto; padding: 0; }
.toast-link { display: flex; align-items: center; gap: 9px; padding: 11px 16px; background: none; border: 0; color: inherit; font: inherit; cursor: pointer; text-align: left; }
.toast-link .icon { width: 16px; height: 16px; color: #a5b4fc; flex: none; }

/* ---------- Notifications ---------- */
.bell-btn { position: relative; margin-right: 6px; }
.bell-badge {
  position: absolute; top: 1px; right: 0; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--danger); color: #fff;
  font-size: 10.5px; font-weight: 700; line-height: 17px; text-align: center; box-shadow: 0 0 0 2px var(--bg-elev); pointer-events: none;
}
.bell-badge[hidden] { display: none; }
.notif-panel { width: min(380px, calc(100vw - 16px)); padding: 0; max-height: min(520px, 80vh); display: flex; flex-direction: column; }
.notif-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.notif-head .link-btn { margin-left: 0; }
.notif-list { overflow-y: auto; padding: 4px; }
.notif-item { display: flex; gap: 10px; align-items: flex-start; padding: 9px 10px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: 13.5px; line-height: 1.4; }
.notif-item:hover, .notif-item:focus-visible { background: var(--bg-hover); outline: none; }
.notif-item.unread { background: var(--accent-soft); }
.notif-item.unread:hover { background: color-mix(in srgb, var(--accent-soft) 70%, var(--bg-hover)); }
.notif-body { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.notif-body small { display: flex; align-items: center; gap: 5px; margin-top: 3px; font-size: 12px; }
.notif-body .dot { width: 8px; height: 8px; }
.notif-excerpt {
  margin-top: 4px; padding: 5px 8px; border-left: 2px solid var(--border-strong); border-radius: 0 6px 6px 0; background: var(--bg-sunken);
  color: var(--text-muted); font-size: 12.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.mention { color: var(--accent); font-weight: 600; background: var(--accent-soft); border-radius: 4px; padding: 0 3px; }
.mention.me { background: color-mix(in srgb, var(--warn) 22%, transparent); color: var(--text); }
.mention-wrap { position: relative; }
.mention-pop {
  position: absolute; left: 0; top: calc(100% + 4px); z-index: 70; min-width: 220px; max-width: 100%; padding: 4px;
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg);
}
.mention-pop[hidden] { display: none; }
.mention-opt { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 8px; border: 0; border-radius: 6px; background: none; color: var(--text); font: inherit; font-size: 13.5px; cursor: pointer; text-align: left; }
.mention-opt.on, .mention-opt:hover { background: var(--accent-soft); }
.unread-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; margin-top: 6px; }
.notif-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 28px 20px; text-align: center; font-size: 13px; }
.notif-empty .icon { width: 26px; height: 26px; margin-bottom: 4px; }
.notif-foot { border: 0; border-top: 1px solid var(--border); background: none; padding: 11px 14px; font: inherit; font-size: 12.5px; color: var(--accent); cursor: pointer; text-align: left; }
.notif-foot:hover { background: var(--bg-hover); }

/* ---------- Mobile ---------- */
@media (max-width: 760px) {
  .nav { margin-left: 6px; }
  .nav a { padding: 7px 8px; font-size: 13px; }
  .logo-text { display: none; }
  .card-layout { grid-template-columns: 1fr; }
  .side { order: -1; display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
  .filters { width: 100%; }
  .filters .input { flex: 1; width: auto; }
  .list, .add-list { flex-basis: 84vw; }
  .overlay { padding: 0; }
  .modal { border-radius: 0; min-height: 100%; border: 0; }
  .table td:nth-child(2), .table th:nth-child(2) { display: none; }
  .page { padding: 20px 16px 48px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* =========================================================================
   Vues du tableau : sélecteur, affichage, calendrier, liste
   ========================================================================= */
[hidden] { display: none !important; }
.seg { display: inline-flex; padding: 2px; gap: 2px; background: var(--bg-sunken); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.seg-btn { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border: 0; border-radius: 5px; background: none; color: var(--text-muted); cursor: pointer; font-size: 13px; font-weight: 500; }
.seg-btn:hover { color: var(--text); }
.seg-btn.on { background: var(--bg-elev); color: var(--text); box-shadow: var(--shadow-sm); }
.seg-btn .icon { width: 14px; height: 14px; }
.btn.active { color: var(--accent); background: var(--accent-soft); }
.menu-check { width: 16px; height: 16px; display: inline-grid; place-items: center; color: var(--accent); flex: none; }
.menu-check .icon { width: 14px; height: 14px; }

/* Affichage compact / sans couvertures */
.compact .cards { gap: 5px; }
.compact .card { padding: 6px 9px; }
.compact .card-cover { display: none; }
.compact .card-labels { margin-bottom: 4px; }
.compact .chip.named { font-size: 0; padding: 0; width: 26px; height: 6px; }
.compact .card-foot { margin-top: 4px; }
.compact .card-foot .meta-item:not(.due) { display: none; }
.no-covers .card-cover { display: none; }

.board-alt { flex: 1; overflow: auto; padding: 14px 16px 24px; }

/* Calendrier */
.cal { display: grid; grid-template-columns: 1fr 230px; gap: 16px; align-items: start; }
.cal-head { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.cal-head h2 { font-size: 17px; margin: 0 8px 0 4px; min-width: 150px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--border); gap: 1px; }
.cal-dow { background: var(--bg-sunken); padding: 6px 8px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--text-faint); }
.cal-day { background: var(--bg-elev); min-height: 108px; padding: 4px 5px 6px; display: flex; flex-direction: column; min-width: 0; }
.cal-day.weekend { background: color-mix(in srgb, var(--bg-sunken) 55%, var(--bg-elev)); }
.cal-day.out { background: var(--bg-sunken); }
.cal-day.out .cal-num { color: var(--text-faint); }
.cal-day-head { display: flex; align-items: center; justify-content: space-between; min-height: 24px; }
.cal-num { font-size: 12px; font-weight: 600; color: var(--text-muted); padding: 2px 6px; border-radius: 99px; }
.cal-day.today .cal-num { background: var(--accent); color: var(--accent-text); }
.cal-add { opacity: 0; width: 22px; height: 22px; display: grid; place-items: center; border: 0; border-radius: 5px; background: none; color: var(--text-muted); cursor: pointer; padding: 0; }
.cal-add .icon { width: 14px; height: 14px; }
.cal-day:hover .cal-add, .cal-add:focus-visible { opacity: 1; }
.cal-add:hover { background: var(--bg-hover); color: var(--text); }
@media (hover: none) { .cal-add { opacity: 1; } }
.cal-cards { display: flex; flex-direction: column; gap: 3px; flex: 1; min-height: 20px; }
.cal-card {
  display: flex; align-items: center; gap: 4px; width: 100%; padding: 3px 6px; border: 0; border-left: 3px solid var(--c); border-radius: 4px;
  background: color-mix(in srgb, var(--c) 13%, var(--bg-elev)); color: var(--text); font-size: 12px; text-align: left; cursor: pointer; min-width: 0;
}
.cal-card span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-card:hover { background: color-mix(in srgb, var(--c) 22%, var(--bg-elev)); }
.cal-card.done { opacity: .6; }
.cal-card.done span { text-decoration: line-through; }
.cal-card .icon { width: 12px; height: 12px; color: var(--success); }
.cal-card.late { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--danger) 55%, transparent); }
.cal-card.ghost { opacity: .4; }
.cal-side { position: sticky; top: 0; background: var(--list-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; }
.cal-side h4 { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font-size: 13px; }
.cal-side .cal-cards.undated { min-height: 60px; gap: 5px; }
.cal-side .cal-card { padding: 6px 8px; font-size: 13px; }
.cal-agenda { display: none; }
.cal-agenda-day { margin-bottom: 14px; }
.cal-agenda-day h4 { margin: 0 0 6px; font-size: 13px; color: var(--text-muted); }
.cal-agenda-day h4::first-letter { text-transform: uppercase; }
.cal-agenda-day.today h4 { color: var(--accent); }
.cal-agenda-day .cal-card { padding: 8px 10px; font-size: 14px; margin-bottom: 4px; }

/* Vue liste */
.table-wrap { max-width: 1200px; }
.table-wrap .panel { overflow-x: auto; }
.card-table { min-width: 720px; }
.card-table th { padding: 0; }
.th-sort { display: flex; align-items: center; gap: 4px; width: 100%; padding: 10px 16px; border: 0; background: none; font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; cursor: pointer; }
.th-sort:hover, .th-sort.on { color: var(--text); }
.th-sort .arrow { color: var(--accent); }
.card-table tbody tr { cursor: pointer; }
.card-table tbody tr:hover { background: var(--bg-hover); }
.card-table td { font-size: 13.5px; }
.card-table tr.done .ct-title > span:first-of-type { text-decoration: line-through; color: var(--text-muted); }
.ct-title { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; font-weight: 500; }
.ct-labels { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.card-check.inline { position: static; opacity: 1; flex: none; }
.card-check.inline.on { background: var(--success); border-color: var(--success); color: #fff; }

@media (max-width: 860px) {
  .cal { grid-template-columns: 1fr; }
  .cal-side { position: static; }
}
@media (max-width: 760px) {
  .filters { flex-wrap: wrap; }
  .filters .input { flex: 1 1 100%; }
  .filters .select { flex: 1 1 140px; min-width: 0; }
  [data-style="hdc"] .nav a { letter-spacing: .08em; padding: 7px 6px; font-size: 11px; }
}
@media (max-width: 640px) {
  .cal-grid { display: none; }
  .cal-agenda { display: block; }
  .seg-btn span, .hide-sm { display: none; }
}

/* =========================================================================
   Style « Huile de code » (design system huiledecode)
   Nuit (sombre) et papier (clair), alignés token par token.
   ========================================================================= */
:root[data-style="hdc"] {
  /* Papier */
  --bg: #f4efe7;
  --bg-elev: #ffffff;
  --bg-sunken: #ebe4d9;
  --bg-hover: #ebe4d9;
  --text: #1f1913;
  --text-muted: rgba(31, 25, 19, .7);
  --text-faint: rgba(31, 25, 19, .56);
  --border: rgba(159, 70, 0, .2);
  --border-strong: rgba(159, 70, 0, .38);
  --accent: #9f4600;
  --accent-hi: #7e4000;
  --accent-text: #f4efe7;
  --accent-soft: rgba(159, 70, 0, .09);
  --bronze: #9c753d;
  --danger: #b42318;
  --danger-soft: rgba(180, 35, 24, .09);
  --success: #00794a;
  --success-soft: rgba(0, 121, 74, .1);
  --warn: #7e4000;
  --warn-soft: rgba(207, 94, 0, .12);
  --shadow-sm: none;
  --shadow: none;
  --shadow-lg: 0 0 0 1px var(--border-strong), 0 24px 60px rgba(31, 25, 19, .16);
  --glow: none;
  --radius: 0px;
  --radius-sm: 0px;
  --list-bg: #ebe4d9;
  --chamfer: 10px;
  --font-display: "Oxanium", ui-sans-serif, sans-serif;
  --font-sans: "Sora", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root[data-style="hdc"]:not([data-theme="light"]) {
    --bg: #050403; --bg-elev: #0e0c0a; --bg-sunken: #0a0807; --bg-hover: #16120f;
    --text: #ece2d2; --text-muted: rgba(236, 226, 210, .62); --text-faint: rgba(236, 226, 210, .46);
    --border: rgba(240, 160, 75, .16); --border-strong: rgba(240, 160, 75, .32);
    --accent: #f0a04b; --accent-hi: #ffc477; --accent-text: #050403; --accent-soft: rgba(240, 160, 75, .1); --bronze: #a68558;
    --danger: #ff8a80; --danger-soft: rgba(255, 138, 128, .1); --success: #56d4a6; --success-soft: rgba(86, 212, 166, .1);
    --warn: #ffc477; --warn-soft: rgba(194, 101, 26, .18);
    --shadow-lg: 0 0 0 1px var(--border-strong), 0 30px 80px rgba(0, 0, 0, .6);
    --glow: 0 0 28px rgba(240, 160, 75, .35);
    --list-bg: #0a0807;
    color-scheme: dark;
  }
}
:root[data-style="hdc"][data-theme="dark"] {
  --bg: #050403; --bg-elev: #0e0c0a; --bg-sunken: #0a0807; --bg-hover: #16120f;
  --text: #ece2d2; --text-muted: rgba(236, 226, 210, .62); --text-faint: rgba(236, 226, 210, .46);
  --border: rgba(240, 160, 75, .16); --border-strong: rgba(240, 160, 75, .32);
  --accent: #f0a04b; --accent-hi: #ffc477; --accent-text: #050403; --accent-soft: rgba(240, 160, 75, .1); --bronze: #a68558;
  --danger: #ff8a80; --danger-soft: rgba(255, 138, 128, .1); --success: #56d4a6; --success-soft: rgba(86, 212, 166, .1);
  --warn: #ffc477; --warn-soft: rgba(194, 101, 26, .18);
  --shadow-lg: 0 0 0 1px var(--border-strong), 0 30px 80px rgba(0, 0, 0, .6);
  --glow: 0 0 28px rgba(240, 160, 75, .35);
  --list-bg: #0a0807;
  color-scheme: dark;
}

/* Typographie : Oxanium (titres, boutons), Sora (texte), JetBrains Mono (repères) */
[data-style="hdc"] body { font-family: var(--font-sans); font-weight: 300; font-size: 14px; }
[data-style="hdc"] :is(strong, b) { font-weight: 500; }
[data-style="hdc"] ::selection { background: var(--accent); color: var(--accent-text); }
[data-style="hdc"] :is(h1, h2, h3, .board-title, .card-modal-title, .list-name, .auth-card h1, .page-head h1, .panel-head h2, .board-tile h3) {
  font-family: var(--font-display); font-weight: 500; letter-spacing: -.01em;
}
[data-style="hdc"] .page-head h1 { font-size: 30px; line-height: 1; }
[data-style="hdc"] :is(.card-title, .ct-title, .task-row .title) { font-weight: 400; }
[data-style="hdc"] :is(.section-title, .side h4, .table th, .cal-dow, .cal-side h4, .field > span, .task-group h3, .badge, .count, .cal-num, .meta-item, .feed-item .when, .member-row .name small, .menu-head strong, .notif-head strong) {
  font-family: var(--font-mono); font-weight: 500; letter-spacing: .08em;
}
[data-style="hdc"] :is(.section-title, .side h4, .table th, .cal-dow, .field > span, .badge, .menu-head strong, .notif-head strong) { text-transform: uppercase; font-size: 10.5px; letter-spacing: .18em; }
[data-style="hdc"] :is(.count, .meta-item, .cal-num) { font-size: 11px; }
[data-style="hdc"] :is(.section-title, .side h4) { color: var(--accent); }
[data-style="hdc"] .section-title .icon { color: var(--accent); opacity: .7; }

/* Angles droits partout ; pan coupé sur les boutons */
[data-style="hdc"] :is(*, *::before, *::after) { border-radius: 0 !important; }
[data-style="hdc"] :is(.btn, .seg) {
  border: 0; box-shadow: inset 0 0 0 1px var(--border);
  clip-path: polygon(var(--chamfer) 0, 100% 0, 100% calc(100% - var(--chamfer)), calc(100% - var(--chamfer)) 100%, 0 100%, 0 var(--chamfer));
}
[data-style="hdc"] .btn {
  font-family: var(--font-display); font-weight: 500; text-transform: uppercase; letter-spacing: .14em; font-size: 11.5px;
  transition: background .25s ease, color .25s ease, box-shadow .25s ease;
}
[data-style="hdc"] .btn.sm { --chamfer: 7px; font-size: 10.5px; letter-spacing: .12em; }
[data-style="hdc"] .btn.ghost { box-shadow: none; }
[data-style="hdc"] .btn:hover { background: var(--accent-soft); color: var(--accent-hi); }
[data-style="hdc"] .btn.primary { background: var(--accent); color: var(--accent-text); box-shadow: none; }
[data-style="hdc"] .btn.primary:hover { background: var(--accent-hi); color: var(--accent-text); filter: none; }
[data-style="hdc"] .btn.danger { color: var(--danger); }
[data-style="hdc"] .btn.danger:hover { background: var(--danger-soft); }
[data-style="hdc"] .btn:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--accent); }
[data-style="hdc"] .btn:active { transform: none; }
[data-style="hdc"] .seg { --chamfer: 7px; border: 0; }
[data-style="hdc"] .seg-btn { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .12em; font-size: 10.5px; }
[data-style="hdc"] .seg-btn.on { background: var(--accent-soft); color: var(--accent); box-shadow: none; }

/* Champs : filet, focus ambre */
[data-style="hdc"] :is(.input, .textarea, .select) { background: transparent; font-weight: 300; }
[data-style="hdc"] :is(.input, .textarea, .select):focus { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
[data-style="hdc"] .select option { background: var(--bg-elev); }

/* Logo : la goutte + HUILEDECODE */
.logo.hdc { gap: 10px; color: var(--accent); }
.logo.hdc .goutte { height: 26px; width: auto; flex: none; }
.logo.hdc .wm { font-family: var(--font-display); font-weight: 600; letter-spacing: .14em; font-size: 14px; color: var(--bronze); }
.logo.hdc .wm span { color: var(--accent); font-weight: 400; }
.logo.hdc .logo-app { font-family: var(--font-mono); font-weight: 500; font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--text-muted); padding-left: 10px; border-left: 1px solid var(--border); }
@media (max-width: 760px) { .logo.hdc .wm, .logo.hdc .logo-app { display: none; } }

/* Barre du haut et navigation */
[data-style="hdc"] .topbar { background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); }
[data-style="hdc"] .nav a { font-weight: 400; font-size: 11.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--text-muted); position: relative; }
[data-style="hdc"] .nav a:hover { background: none; color: var(--accent-hi); }
:root[data-style="hdc"] .nav a.active { background: none; color: var(--accent-hi); }
[data-style="hdc"] .nav a.active::after { content: ""; position: absolute; left: 11px; right: 11px; bottom: 2px; height: 1px; background: var(--accent); box-shadow: var(--glow); }

/* Surfaces : filets, pas d'ombres */
[data-style="hdc"] .auth { background: radial-gradient(800px 420px at 50% 0%, rgba(194, 101, 26, .22), transparent 70%), var(--bg); }
[data-style="hdc"] .auth-card { box-shadow: none; }
[data-style="hdc"] .board-bar { background: var(--bg); }
[data-style="hdc"] .board-swatch { width: 3px; height: 22px; }
[data-style="hdc"] .board-tile { background: var(--bg-elev); color: var(--text); border: 1px solid var(--border); border-top: 2px solid var(--c); box-shadow: none; }
[data-style="hdc"] .board-tile::before { background: radial-gradient(400px 160px at 0 0, color-mix(in srgb, var(--c) 16%, transparent), transparent 70%); }
[data-style="hdc"] .board-tile:hover { transform: none; border-color: var(--border-strong); border-top-color: var(--c); }
[data-style="hdc"] .board-tile .meta { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); opacity: 1; }
[data-style="hdc"] .board-tile .progress { background: var(--border); height: 2px; }
[data-style="hdc"] .board-tile .progress i { background: var(--c); }
[data-style="hdc"] .board-tile.new { border: 1px dashed var(--border-strong); }
[data-style="hdc"] .card { box-shadow: none; transition: border-color .25s ease; }
[data-style="hdc"] .card:hover { border-color: var(--border-strong); box-shadow: none; }
[data-style="hdc"] .card.chosen { transform: none; box-shadow: 0 0 0 1px var(--accent); }
[data-style="hdc"] .chip.named { font-family: var(--font-mono); font-weight: 500; letter-spacing: .06em; font-size: 10px; }
[data-style="hdc"] .overlay { background: rgba(5, 4, 3, .72); }
[data-style="hdc"] .toast { background: var(--bg-elev); color: var(--text); box-shadow: 0 0 0 1px var(--border-strong); }
[data-style="hdc"] .toast.error { background: var(--danger); color: #fff; }
[data-style="hdc"] .toast-link .icon { color: var(--accent); }
[data-style="hdc"] .progress-bar { height: 3px; }
[data-style="hdc"] .cal-day.today .cal-num { box-shadow: var(--glow); }
[data-style="hdc"] .cal-card { border-left-width: 2px; }
[data-style="hdc"] .mention { background: none; color: var(--accent); text-shadow: var(--glow); }
[data-style="hdc"] .mention.me { background: var(--accent-soft); color: var(--accent-hi); }
[data-style="hdc"] .bell-badge { background: var(--accent); color: var(--accent-text); font-family: var(--font-mono); }
[data-style="hdc"] .unread-dot { background: var(--accent); box-shadow: var(--glow); }
[data-style="hdc"] .avatar { font-family: var(--font-display); font-weight: 600; }
[data-style="hdc"] .avatar.online::after { background: #56d4a6; }
[data-style="hdc"] :focus-visible { outline-color: var(--accent); }

/* Huile de code : accueil en lignes */
[data-style="hdc"] .board-row { border-radius: 0; box-shadow: none; }
[data-style="hdc"] .board-row::before { width: 3px; }
[data-style="hdc"] .board-row:hover { transform: none; border-color: var(--border-strong); }
[data-style="hdc"] .brow-meta, [data-style="hdc"] .brow-progress { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; }
[data-style="hdc"] .brow-progress .progress, [data-style="hdc"] .brow-progress .progress i, [data-style="hdc"] .brow-bar { border-radius: 0; }
[data-style="hdc"] .brow-progress .progress { height: 2px; }
[data-style="hdc"] .brow-list .dot { border-radius: 0; }
[data-style="hdc"] .brow-list strong { font-family: var(--font-mono); }
[data-style="hdc"] .brow-alert { border-radius: 0; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; }
[data-style="hdc"] .board-row.new { border: 1px dashed var(--border-strong); }

/* ---------- Cartes privées ---------- */
.meta-item.private { color: var(--warn); }
.badge.private { background: var(--warn-soft); color: var(--warn); }
.vis-picker { display: flex; flex-direction: column; gap: 6px; margin-bottom: 6px; }
.vis-toggle { align-self: flex-start; display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-elev); color: var(--text-muted); font: inherit; font-size: 12px; font-weight: 500; cursor: pointer; }
.vis-toggle .icon { width: 13px; height: 13px; }
.vis-toggle:hover { color: var(--text); border-color: var(--border-strong); }
.vis-toggle.on { background: var(--warn-soft); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.vis-people { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 12px; }
.vis-person { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 8px 0 3px; border-radius: 999px; border: 1px solid var(--border); background: none; color: var(--text-muted); font: inherit; font-size: 12px; cursor: pointer; opacity: .75; }
.vis-person:hover { opacity: 1; color: var(--text); }
.vis-person.on { opacity: 1; color: var(--text); background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.vis-seg { display: flex; width: 100%; }
.vis-seg .seg-btn { flex: 1; justify-content: center; padding: 0 6px; }
.vis-seg .seg-btn span { display: inline; }
.vis-hint { font-size: 12px; margin: 7px 0 5px; }
.vis-info { display: flex; gap: 6px; align-items: flex-start; font-size: 13px; color: var(--text-muted); margin: 0; }
.vis-info .icon { width: 14px; height: 14px; flex: none; margin-top: 2px; }
.cal-card .icon, .ct-title .private .icon, .modal .name strong .icon { width: 12px; height: 12px; }
.ct-title .private { display: inline-flex; color: var(--warn); margin-right: 4px; vertical-align: -1px; }
[data-style="hdc"] :is(.vis-toggle, .vis-person) { border-radius: 0; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; }

/* ---------- Sous-tâches ---------- */
.sub-list { display: flex; flex-direction: column; }
.sub-item { align-items: center; gap: 7px; padding: 3px 4px; }
.sub-item input[type=checkbox] { margin-top: 0; }
.sub-grip { display: inline-flex; color: var(--text-faint); cursor: grab; opacity: 0; }
.sub-item > :is(.sub-grip, .sub-tools) { flex: none; }
.sub-grip .icon { width: 14px; height: 14px; }
.sub-item:hover .sub-grip { opacity: 1; }
.sub-text { flex: 1; min-width: 0; overflow-wrap: anywhere; cursor: text; padding: 2px 0; border-radius: 4px; }
.sub-item.done .sub-text { text-decoration: line-through; color: var(--text-muted); }
.sub-edit { flex: 1; height: 28px; }
.sub-tools { display: inline-flex; align-items: center; gap: 4px; flex: none; }
.sub-due, .sub-who { display: inline-flex; align-items: center; gap: 4px; height: 24px; min-width: 24px; justify-content: center; padding: 0 5px; border-radius: 999px; border: 1px solid transparent; background: none; color: var(--text-faint); font: inherit; font-size: 12px; cursor: pointer; }
.sub-due .icon, .sub-who .icon { width: 13px; height: 13px; }
.sub-due:hover, .sub-who:hover { color: var(--text); border-color: var(--border); }
.sub-due:not(.set), .sub-who:not(.set), .sub-item .sub-more { opacity: 0; }
.sub-item:hover :is(.sub-due, .sub-who, .sub-more), .sub-item :is(.sub-due, .sub-who, .sub-more):focus-visible { opacity: 1; }
.sub-due.set { color: var(--text-muted); background: var(--bg-sunken); padding: 0 8px; }
.sub-due.set.late { color: var(--danger); background: var(--danger-soft); }
.sub-due.set.soon { color: var(--warn); background: var(--warn-soft); }
.sub-due.set.ok { color: var(--success); background: var(--success-soft); }
.sub-who.set { padding: 0; }
.sub-date { height: 26px; width: 140px; padding: 0 6px; font-size: 12px; }
.sub-item.sortable-chosen { background: var(--bg-hover); }
.sub-item.sortable-ghost { opacity: .4; }
@media (hover: none) { .sub-grip, .sub-due:not(.set), .sub-who:not(.set), .sub-item .sub-more { opacity: 1; } }
.task-row .sub-tag { display: inline-flex; align-items: center; gap: 3px; margin-right: 8px; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 500; background: var(--accent-soft); color: var(--accent); vertical-align: 1px; }
.task-row .sub-tag .icon { width: 11px; height: 11px; }
[data-style="hdc"] :is(.sub-due, .sub-who, .task-row .sub-tag) { border-radius: 0; }
[data-style="hdc"] .task-row .sub-tag { font-family: var(--font-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }

/* ---------- Accueil : tri, filtre et glisser-déposer des tableaux ---------- */
.board-sort { width: auto; height: 34px; }
.board-filter { width: 180px; height: 34px; }
.board-rows .board-row:not(.new) { cursor: grab; }
.board-row.board-chosen { cursor: grabbing; }
.board-row.board-ghost { opacity: .35; border-style: dashed; box-shadow: none; }
.board-row.board-drag { box-shadow: var(--shadow); transform: rotate(.6deg); }
.board-hint { font-size: 12px; margin: 10px 2px 0; }
@media (max-width: 760px) {
  .page-head .board-filter { order: 10; flex: 1 1 100%; width: auto; }
  .page-head .board-sort { flex: 1; }
}
.brow-grip { position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; color: var(--text-faint); opacity: 0; cursor: grab; touch-action: none; -webkit-touch-callout: none; user-select: none; transition: opacity .12s, background .12s; }
.brow-grip .icon { width: 18px; height: 18px; }
.board-row:hover .brow-grip { opacity: 1; }
.brow-grip:hover { background: var(--bg-hover); color: var(--text); }
.board-rows .board-row { -webkit-touch-callout: none; }
@media (pointer: coarse) {
  .brow-grip { opacity: 1; width: 44px; height: 44px; top: 4px; right: 4px; }
  .board-row:not(.new) { padding-right: 48px; }
}
[data-style="hdc"] .brow-grip { border-radius: 0; }
