/* Layout: sticky command bar (vues + filtres), puis une vue pleine largeur : kanban à défilement horizontal, grille de projets, ou liste. */
:root {
  --bg: #f5f3f0; --surface: #ffffff; --surface-2: #ece8e3; --line: #dcd5cd;
  --fg: #1f1b17; --muted: #6c635a; --accent: #d9530f; --accent-fg: #ffffff; --accent-soft: #fbe5d6;
  --late: #c0352b; --late-soft: #fbe2df; --soon: #a86a0b; --soon-soft: #fbefd6; --ok: #2b8a3e; --ok-soft: #dff2e3;
  --p-orange: #e0661b; --p-bleu: #2f6fd0; --p-vert: #2f9a4d; --p-rouge: #cf3a3a; --p-violet: #7b4fd0; --p-jaune: #c89a0a; --p-gris: #7a7570;
  --r-S: #c0352b; --r-A: #d9530f; --r-B: #2f6fd0; --r-C: #7a7570; --r-D: #a8a29b;
  --shadow: 0 1px 2px rgba(40,25,10,.08), 0 2px 8px rgba(40,25,10,.05);
  --f-display: "Chakra Petch", "Segoe UI", system-ui, sans-serif;
  --f-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #181614; --surface: #221f1c; --surface-2: #2b2723; --line: #3a3530;
  --fg: #f0ebe5; --muted: #a59b91; --accent: #ff7b33; --accent-fg: #1a0f08; --accent-soft: #3c2416;
  --late: #ff6b5e; --late-soft: #3f1d1a; --soon: #f2b544; --soon-soft: #3a2c12; --ok: #5ccf74; --ok-soft: #173321;
  --p-orange: #ff8a45; --p-bleu: #6a9cf0; --p-vert: #5ccf74; --p-rouge: #ff6b6b; --p-violet: #a888f0; --p-jaune: #f2c844; --p-gris: #a59f98;
  --r-S: #ff6b5e; --r-A: #ff7b33; --r-B: #6a9cf0; --r-C: #a59f98; --r-D: #6d6760;
  --shadow: 0 1px 2px rgba(0,0,0,.4); color-scheme: dark;
} }
:root[data-theme="dark"] {
  --bg: #181614; --surface: #221f1c; --surface-2: #2b2723; --line: #3a3530;
  --fg: #f0ebe5; --muted: #a59b91; --accent: #ff7b33; --accent-fg: #1a0f08; --accent-soft: #3c2416;
  --late: #ff6b5e; --late-soft: #3f1d1a; --soon: #f2b544; --soon-soft: #3a2c12; --ok: #5ccf74; --ok-soft: #173321;
  --p-orange: #ff8a45; --p-bleu: #6a9cf0; --p-vert: #5ccf74; --p-rouge: #ff6b6b; --p-violet: #a888f0; --p-jaune: #f2c844; --p-gris: #a59f98;
  --r-S: #ff6b5e; --r-A: #ff7b33; --r-B: #6a9cf0; --r-C: #a59f98; --r-D: #6d6760;
  --shadow: 0 1px 2px rgba(0,0,0,.4); color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
img { max-width: 100%; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--fg); font-family: var(--f-body); font-size: 14px; line-height: 1.45; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--surface); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wrap { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

/* En-tête */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--surface); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap; padding-block: 12px 10px; }
.brand { display: flex; align-items: baseline; gap: 10px; margin-right: auto; }
.brand h1 { font-family: var(--f-display); font-weight: 700; font-size: 22px; letter-spacing: .02em; margin: 0; }
.brand h1 b { color: var(--accent); }
.brand span { color: var(--muted); font-size: 12px; }
.tabs { display: flex; gap: 2px; background: var(--surface-2); padding: 3px; border-radius: 8px; }
.tabs button { border: 0; background: transparent; padding: 6px 14px; border-radius: 6px; font-family: var(--f-display); font-weight: 600; font-size: 14px; color: var(--muted); }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--fg); box-shadow: var(--shadow); }
.me { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.me img, .me .avatar { width: 26px; height: 26px; border-radius: 50%; }
.me button { border: 0; background: none; color: var(--muted); font-size: 12px; padding: 4px 6px; border-radius: 5px; }
.me button:hover { color: var(--fg); background: var(--surface-2); }
.lang { display: flex; gap: 2px; background: var(--surface-2); padding: 2px; border-radius: 6px; }
.lang button { border: 0; background: transparent; padding: 3px 8px; border-radius: 4px; font-family: var(--f-mono); font-size: 12px; color: var(--muted); }
.lang button[aria-pressed="true"] { background: var(--surface); color: var(--fg); box-shadow: var(--shadow); }
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding-block: 0 12px; }
.tools input[type="search"] { flex: 1 1 180px; min-width: 0; }
.field { padding: 7px 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); min-width: 0; }
.tools select { max-width: 180px; }
.chip-toggle { padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); font-size: 13px; }
.chip-toggle[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--fg); }
.btn { padding: 8px 14px; border-radius: 7px; border: 1px solid var(--line); background: var(--surface); font-weight: 500; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); font-weight: 600; }
.btn.primary:hover { filter: brightness(1.06); }
.btn.danger { color: var(--late); }
.btn.danger.armed { background: var(--late); border-color: var(--late); color: var(--surface); }
.btn.small { padding: 5px 10px; font-size: 13px; }
.ml-auto { margin-left: auto; }

/* Résumé */
.summary { display: flex; gap: 8px 22px; flex-wrap: wrap; padding-block: 14px 4px; font-size: 13px; color: var(--muted); }
.summary b { font-family: var(--f-mono); font-weight: 500; color: var(--fg); font-variant-numeric: tabular-nums; }
.summary .late b { color: var(--late); }
.summary .soon b { color: var(--soon); }
.banner { margin-block: 12px 0; padding: 10px 14px; border-radius: 8px; background: var(--soon-soft); color: var(--fg); font-size: 13px; }

/* Kanban */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(232px, 1fr); gap: 12px; overflow-x: auto; padding-block: 12px 24px; scroll-snap-type: x proximity; align-items: start; }
.col { background: var(--surface-2); border-radius: 10px; display: flex; flex-direction: column; min-height: 140px; scroll-snap-align: start; }
.col-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px 6px; }
.col-head h2 { font-family: var(--f-display); font-size: 15px; font-weight: 600; margin: 0; letter-spacing: .02em; }
.col-head .count { font-family: var(--f-mono); font-size: 12px; color: var(--muted); }
.col-head button { margin-left: auto; border: 0; background: transparent; color: var(--muted); font-size: 18px; line-height: 1; padding: 2px 6px; border-radius: 5px; }
.col-head button:hover { background: var(--surface); color: var(--fg); }
.cards { display: flex; flex-direction: column; gap: 8px; padding: 4px 8px 10px; flex: 1; min-height: 60px; }
.col.drop .cards { outline: 2px dashed var(--accent); outline-offset: -4px; border-radius: 8px; }
.drop-line { height: 3px; background: var(--accent); border-radius: 2px; margin: -5px 2px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 11px; box-shadow: var(--shadow); cursor: pointer; display: flex; flex-direction: column; gap: 7px; text-align: left; width: 100%; }
.card:hover { border-color: var(--muted); }
.card.dragging { opacity: .4; }
.card-top { display: flex; gap: 8px; align-items: flex-start; }
.card-title { font-weight: 500; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.card-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); }
.proj-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--p-gris); }
.rank { font-family: var(--f-display); font-weight: 700; font-size: 12px; width: 22px; height: 22px; border-radius: 5px; display: inline-grid; place-items: center; flex: none; color: var(--surface); }
.rank-S { background: var(--r-S); } .rank-A { background: var(--r-A); } .rank-B { background: var(--r-B); } .rank-C { background: var(--r-C); } .rank-D { background: var(--r-D); }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); font-size: 12px; font-variant-numeric: tabular-nums; }
.pill.late { background: var(--late-soft); color: var(--late); font-weight: 500; }
.pill.soon { background: var(--soon-soft); color: var(--soon); font-weight: 500; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.who { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; color: var(--fg); }
.avatar { width: 20px; height: 20px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 10px; font-weight: 600; background: var(--accent-soft); color: var(--accent); flex: none; }
.tag { font-size: 11px; padding: 0 6px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); }
.empty-col { color: var(--muted); font-size: 12px; text-align: center; padding: 14px 6px; }

/* Projets */
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; padding-block: 12px 24px; }
.proj { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.proj-head { display: flex; align-items: center; gap: 10px; }
.proj-head .dot { width: 12px; height: 12px; }
.proj-head h3 { font-family: var(--f-display); font-size: 18px; font-weight: 600; margin: 0; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.proj p { margin: 0; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.bar { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; display: flex; }
.bar i { display: block; height: 100%; }
.bar-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--muted); }
.bar-legend b { font-family: var(--f-mono); font-weight: 500; color: var(--fg); }
.proj-foot { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: auto; }
.st-idee { background: var(--surface-2); color: var(--fg); }
.st-actif { background: var(--ok-soft); color: var(--ok); }
.st-pause { background: var(--soon-soft); color: var(--soon); }
.st-fini { background: var(--surface-2); color: var(--muted); }

/* Liste */
.table-wrap { overflow-x: auto; padding-block: 12px 24px; }
table { border-collapse: collapse; width: 100%; min-width: 720px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; background: var(--surface-2); }
th button { border: 0; background: none; padding: 0; font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; }
tbody tr { cursor: pointer; }
tbody tr:hover { background: var(--surface-2); }
td.num { font-family: var(--f-mono); font-variant-numeric: tabular-nums; font-size: 13px; }

/* État vide */
.empty { max-width: 560px; margin: 40px auto; text-align: center; color: var(--muted); display: flex; flex-direction: column; gap: 12px; align-items: center; }
.empty h2 { font-family: var(--f-display); color: var(--fg); margin: 0; font-size: 20px; text-wrap: balance; }

/* Fenêtre */
.overlay { position: fixed; inset: 0; z-index: 20; background: rgba(15,10,5,.45); display: flex; align-items: flex-start; justify-content: center; overflow-y: auto; padding: max(24px, env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) max(24px, env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px)); }
.modal { background: var(--surface); border-radius: 12px; width: 100%; max-width: 640px; box-shadow: 0 10px 40px rgba(0,0,0,.25); display: flex; flex-direction: column; }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px 6px; }
.modal-head h2 { font-family: var(--f-display); font-size: 18px; margin: 0; flex: 1; }
.x { border: 0; background: transparent; font-size: 22px; line-height: 1; padding: 4px 8px; border-radius: 6px; color: var(--muted); }
.x:hover { background: var(--surface-2); color: var(--fg); }
.modal-body { padding: 8px 18px 16px; display: flex; flex-direction: column; gap: 14px; }
.modal-foot { display: flex; gap: 8px; flex-wrap: wrap; padding: 12px 18px 16px; border-top: 1px solid var(--line); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
label.lbl { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .02em; min-width: 0; }
label.lbl .field, label.lbl textarea { font-weight: 400; color: var(--fg); font-size: 14px; }
textarea.field { resize: vertical; min-height: 80px; }
input.title-input { font-size: 17px; font-weight: 600; }
.seg { display: flex; flex-wrap: wrap; gap: 4px; }
.seg button { padding: 5px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); font-size: 13px; }
.seg button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.rank-pick button { display: inline-flex; gap: 6px; align-items: center; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatches button { width: 28px; height: 28px; border-radius: 50%; border: 2px solid transparent; padding: 0; }
.swatches button[aria-pressed="true"] { border-color: var(--fg); box-shadow: inset 0 0 0 3px var(--surface); }
.section-title { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .02em; display: flex; align-items: center; gap: 8px; }
.check-list { display: flex; flex-direction: column; gap: 4px; }
.check-item { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
.check-item span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.check-item.done span { text-decoration: line-through; color: var(--muted); }
.check-item button { border: 0; background: none; color: var(--muted); padding: 2px 6px; border-radius: 4px; }
.check-item button:hover { color: var(--late); }
.add-row { display: flex; gap: 6px; }
.add-row .field { flex: 1; }
.comments { display: flex; flex-direction: column; gap: 10px; }
.comment { display: flex; gap: 10px; }
.comment-body { flex: 1; min-width: 0; background: var(--bg); border-radius: 8px; padding: 8px 10px; }
.comment-body header { font-size: 12px; color: var(--muted); display: flex; gap: 8px; }
.comment-body header b { color: var(--fg); font-weight: 600; }
.comment-body p { margin: 3px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.stamp { font-size: 12px; color: var(--muted); }

.toast { position: fixed; z-index: 30; left: 50%; transform: translateX(-50%); bottom: calc(20px + env(safe-area-inset-bottom, 0px)); background: var(--fg); color: var(--bg); padding: 10px 16px; border-radius: 8px; font-size: 13px; max-width: calc(100% - 32px); box-shadow: var(--shadow); }

@media (max-width: 560px) {
  .board { grid-auto-columns: 85%; }
  .tools select { max-width: none; flex: 1 1 40%; }
}
@media (prefers-reduced-motion: no-preference) {
  .card, .btn, .tabs button { transition: border-color .12s, background .12s, filter .12s; }
}

/* Connexion */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login-box { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 32px 28px; max-width: 400px; width: 100%; display: flex; flex-direction: column; gap: 16px; text-align: center; box-shadow: var(--shadow); }
.login-box h1 { font-family: var(--f-display); font-size: 30px; margin: 0; letter-spacing: .02em; }
.login-box h1 b { color: var(--accent); }
.login-box p { margin: 0; color: var(--muted); }
.login-box .err { color: var(--late); background: var(--late-soft); padding: 8px 12px; border-radius: 8px; font-size: 13px; }
.btn.discord { background: #5865f2; border-color: #5865f2; color: #fff; font-weight: 600; padding: 11px 16px; text-decoration: none; display: inline-flex; justify-content: center; gap: 8px; }
.login-box .lang { align-self: center; }

/* Groupes, responsables multiples, panneau Admin */
.groupe-tag { display: inline-flex; align-items: center; font-size: 11px; padding: 0 6px; border-radius: 4px; color: var(--c); border: 1px solid var(--c); white-space: nowrap; }
.td-groupe { margin-left: 6px; }
.stack { display: inline-flex; }
.stack .avatar + .avatar { margin-left: -6px; box-shadow: 0 0 0 2px var(--surface); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.lbl > .chips:not(:empty) { margin-block: 2px 4px; }
.add-row .field[list] { flex: 1; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 4px 2px 3px; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; background: var(--bg); }
.chip button { border: 0; background: none; color: var(--muted); font-size: 11px; padding: 0 4px; border-radius: 50%; }
.chip button:hover { color: var(--late); }
.muted { color: var(--muted); font-size: 12px; }
.admin { padding-block: 8px 32px; }
.admin-intro { color: var(--muted); font-size: 13px; max-width: 760px; margin: 12px 0 0; }
.admin-head { display: flex; align-items: center; gap: 12px; margin-top: 22px; }
.admin-head h2 { font-family: var(--f-display); font-size: 18px; margin: 0; }
.admin .proj-grid { padding-block: 12px 0; }
.admin .empty { margin: 16px auto; }
.admin-add { margin-top: 12px; max-width: 620px; }
.admin-add .field { flex: 1; }
.pick-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 4px; max-height: 260px; overflow-y: auto; border: 1px solid var(--line); border-radius: 7px; padding: 6px; }
.pick { display: flex; align-items: center; gap: 6px; padding: 4px 6px; border-radius: 5px; font-size: 13px; cursor: pointer; }
.pick:hover { background: var(--surface-2); }
.admin-add { flex-wrap: wrap; }
.admin-add .field { flex: 1 1 260px; }
.chip.pickable { cursor: pointer; padding-right: 10px; color: var(--muted); }
.chip.pickable:hover { border-color: var(--muted); color: var(--fg); }
.chip.pickable[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--fg); font-weight: 500; }
.hint { color: var(--muted); font-weight: 400; font-size: 12px; }
.assign { border: 1px dashed var(--line); background: none; color: var(--muted); font-size: 11px; padding: 1px 6px; border-radius: 999px; line-height: 1.4; }
.assign:hover { border-color: var(--accent); color: var(--accent); }
.card-meta > .assign { margin-left: auto; }
.card-meta > .who + .assign { margin-left: 0; }
.card-meta .who { min-width: 0; }
.who-noms { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

/* Workflow : couleur d'étape, colonnes interdites pendant un glisser, actions */
.col { border-top: 3px solid var(--col, transparent); }
.col.interdit { opacity: .45; }
.seg button:disabled { opacity: .4; cursor: not-allowed; }
.etape-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; white-space: nowrap; }
.etape-tag::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--c); }
.actions-row { display: flex; flex-wrap: wrap; gap: 6px; }
.btn.action { border-color: var(--accent); color: var(--fg); }
.btn.action:hover { background: var(--accent-soft); }
.btn.action .fleche { color: var(--muted); font-weight: 400; }

/* Tableau de bord */
.dash { padding-block: 14px 32px; display: flex; flex-direction: column; gap: 16px; }
.dash-bonjour { margin: 0; font-family: var(--f-display); font-size: 18px; font-weight: 600; }
.tuiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.tuile { text-align: left; display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.tuile:hover { border-color: var(--muted); }
.tuile b { font-family: var(--f-display); font-size: 30px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tuile span { color: var(--muted); font-size: 13px; }
.tuile.late b { color: var(--late); } .tuile.soon b { color: var(--soon); } .tuile.ok b { color: var(--ok); }
.dash-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 14px; }
.dash-carte { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; min-width: 0; }
.dash-carte h3 { font-family: var(--f-display); font-size: 15px; font-weight: 600; margin: 0 0 10px; }
.dash-carte > .muted { margin: 0; }
.dash-liste, .dash-activite { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.dash-tache { display: flex; align-items: center; gap: 8px; padding: 6px 4px; border-top: 1px solid var(--line); cursor: pointer; font-size: 13px; min-width: 0; }
.dash-tache:first-child { border-top: 0; }
.dash-tache:hover { background: var(--surface-2); }
.dash-titre { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank.vide { background: var(--surface-2); color: var(--muted); }
.hbars { display: flex; flex-direction: column; gap: 8px; }
.hbar { display: grid; grid-template-columns: minmax(90px, 38%) 1fr 32px; align-items: center; gap: 10px; font-size: 13px; }
.hbar[role="button"] { cursor: pointer; }
.hbar-nom { display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-piste { height: 10px; border-radius: 0 4px 4px 0; background: var(--surface-2); overflow: hidden; }
.hbar-piste i { display: block; height: 100%; border-radius: 0 4px 4px 0; min-width: 2px; }
.hbar-n { font-family: var(--f-mono); font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }
.dash-projs { display: flex; flex-direction: column; gap: 10px; }
.dash-proj { display: grid; grid-template-columns: 8px minmax(90px, 38%) 1fr 44px; align-items: center; gap: 10px; font-size: 13px; cursor: pointer; }
.dash-proj-nom { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-proj b { font-family: var(--f-mono); font-weight: 500; text-align: right; }
.bar.mini { height: 8px; }
.dash-activite li { display: flex; gap: 10px; padding: 5px 4px; font-size: 13px; border-top: 1px solid var(--line); cursor: pointer; }
.dash-activite li:first-child { border-top: 0; }
.dash-activite li:hover { background: var(--surface-2); }
.quand { color: var(--muted); font-family: var(--f-mono); font-size: 11px; white-space: nowrap; padding-top: 2px; min-width: 92px; }

/* Éditeur du workflow */
.wf { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.wf h3 { font-family: var(--f-display); font-size: 15px; margin: 0 0 8px; }
.wf-boutons { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.wf-libre { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.wf-apercu { display: flex; flex-wrap: wrap; gap: 8px; }
.wf-boite { display: flex; flex-direction: column; gap: 2px; min-width: 150px; padding: 8px 10px; border: 1px solid var(--line); border-left: 4px solid var(--c); border-radius: 7px; background: var(--surface); font-size: 12px; }
.wf-boite b { font-size: 13px; }
.wf-fleche { color: var(--fg); }
.wf-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 16px; align-items: start; }
.wf-ligne { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.wf-ligne input { flex: 1; min-width: 80px; }
.wf-ligne select { width: auto; }
.wf-ordre { display: flex; flex-direction: column; }
.x { border: 0; background: none; color: var(--muted); font-size: 11px; padding: 1px 4px; border-radius: 4px; }
.x:hover:not(:disabled) { color: var(--fg); background: var(--surface-2); }
.x:disabled { opacity: .3; }
.wf-tr { border: 1px solid var(--line); border-radius: 8px; padding: 8px; margin-bottom: 8px; background: var(--surface); display: flex; flex-direction: column; gap: 6px; }
.wf-tr-haut { display: flex; align-items: center; gap: 6px; }
.wf-tr-haut input { flex: 1; min-width: 80px; }
.wf-de, .wf-auto { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12px; }
.wf-auto label { display: inline-flex; align-items: center; gap: 4px; }
.chip.pickable:disabled { opacity: .4; cursor: default; }
.api-box .admin-intro { margin-bottom: 10px; }
.api-box .check { display: flex; align-items: center; gap: 6px; font-size: 13px; white-space: nowrap; }
.field.mono { font-family: var(--f-mono); font-size: 12px; }
.jeton-neuf { background: var(--accent-soft); border: 1px solid var(--accent); border-radius: 8px; padding: 10px 12px; margin: 10px 0; max-width: 760px; }
.jeton-neuf p { margin: 0 0 8px; font-size: 13px; }
.api-box a { color: var(--accent); font-weight: 500; }
.pieces { display: flex; flex-direction: column; gap: 6px; }
.piece { display: flex; align-items: center; gap: 10px; padding: 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.piece-lien { flex: none; width: 64px; height: 48px; border-radius: 6px; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; text-decoration: none; }
.piece-lien img { width: 100%; height: 100%; object-fit: cover; }
.piece-icone { font-family: var(--f-mono); font-size: 12px; font-weight: 600; color: var(--muted); }
.piece-info { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 12px; }
.piece-nom { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zone-pieces.drop { outline: 2px dashed var(--accent); outline-offset: 4px; border-radius: 8px; }
.zone-pieces .hint { font-size: 12px; color: var(--muted); }
.historique summary { cursor: pointer; }
.historique ol { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; max-height: 260px; overflow: auto; }
.historique li .muted { font-size: 12px; }
.check.rappels { display: flex; align-items: center; gap: 8px; font-size: 14px; margin-top: 10px; }
.zone-pieces .add-row .btn { white-space: nowrap; }
.lien-discret { font-size: 12px; color: var(--muted); align-self: center; }
.lien { color: var(--accent); }
.com-suppr { margin-left: auto; border: 0; background: none; color: var(--muted); padding: 0 4px; border-radius: 4px; font-size: 12px; }
.com-suppr:hover, .com-suppr.armed { color: var(--late); }
.comment-body header { display: flex; align-items: center; gap: 8px; }
.actions-membre { white-space: nowrap; }
.actions-membre .btn + .btn { margin-left: 6px; }
.donnees { flex-wrap: wrap; }
.donnees a.btn { color: var(--fg); text-decoration: none; display: inline-flex; align-items: center; }

/* ---------- 2.0 : épopées, liens, abonnés, mentions, sprints, rapports ---------- */
.card.epopee { border-left: 3px solid var(--p-violet); }
.type-ic { font-size: 13px; }
.epopee-tag { font-size: 11.5px; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); color: var(--fg); border: 1px solid var(--p-violet); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill.pts { font-family: var(--f-mono); }
.suivi { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: -4px; }
.suivi .hint { flex-basis: 100%; }
.cand-box { border: 1px solid var(--line, #3333); border-radius: 10px; padding: 10px 12px; }
.cand-boutons { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.cand-boutons .hint { flex-basis: 100%; }
.cand-oui { background: var(--p-vert, #2e9e5b); border-color: transparent; color: #fff; }
.cand-non { background: var(--p-rouge, #d64545); border-color: transparent; color: #fff; }
.cand-etat { margin-top: 6px; font-weight: 600; }
.cand-etat.ok { color: var(--p-vert, #2e9e5b); }
.cand-etat.non { color: var(--p-rouge, #d64545); }
.liens { display: flex; flex-direction: column; gap: 6px; margin-bottom: 6px; }
.lien-ligne { display: flex; align-items: center; gap: 8px; font-size: 13px; flex-wrap: wrap; }
.lien-ligne .x { margin-left: auto; }
.lien-tache { border: 0; background: none; color: var(--fg); text-align: left; padding: 2px 0; font: inherit; display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.lien-tache:hover { text-decoration: underline; }
.com-row { position: relative; }
.com-saisie { position: relative; flex: 1; display: flex; flex-direction: column; min-width: 0; }
.mention-list { position: absolute; left: 0; right: 0; top: 100%; margin-top: 4px; z-index: 3; display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); }
.mention-list[hidden] { display: none; }
.mention { color: var(--accent); font-weight: 600; }
.num-court { width: 72px; }
.field.petit { padding: 4px 6px; font-size: 12px; max-width: 150px; }
.sprints .sprint { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; }
.sprints .sprint.actif { border-color: var(--accent); }
.sprint-tete { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; margin-bottom: 8px; }
.sprint-tete h3 { margin: 0; font-size: 16px; }
.sprint-objectif { margin: 0 0 8px; color: var(--muted); font-size: 13px; }
.sp-tache { flex-wrap: wrap; }
.sprints-finis { margin-top: 18px; }
.sprints-finis summary { cursor: pointer; }
.carte-tete { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: space-between; margin-bottom: 8px; }
.carte-tete h3 { margin: 0; }
.dash-carte.large { margin-bottom: 16px; }
.burndown { width: 100%; height: auto; display: block; max-height: 320px; }
.bd-grille { stroke: var(--line); stroke-width: 1; }
.bd-txt { fill: var(--muted); font-size: 11px; font-family: var(--f-mono); }
.bd-ideal { stroke: var(--muted); stroke-width: 2; stroke-dasharray: 6 5; }
.bd-reste { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.bd-rond { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.bd-cible { fill: transparent; }
.bd-point:hover .bd-rond { r: 6.5; }
.legende { display: flex; gap: 16px; font-size: 12.5px; color: var(--muted); margin: 6px 0 4px; flex-wrap: wrap; }
.legende span { display: inline-flex; align-items: center; gap: 6px; }
.legende i { display: inline-block; width: 18px; height: 0; border-top: 2px solid var(--accent); }
.legende i.leg-ideal { border-top: 2px dashed var(--muted); }
.dash-sprint { cursor: pointer; display: flex; flex-direction: column; gap: 6px; }
.dash-sprint p { margin: 0; font-size: 13px; }
.tabs { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.tabs button { white-space: nowrap; flex: none; }
@media (max-width: 560px) { .tabs button { padding: 6px 10px; font-size: 13px; } }

/* ---------- 2.1 : recherche, cloche, calendrier, chronologie, masse, WIP, SLA ---------- */
.icone-btn { position: relative; border: 1px solid var(--line); background: var(--bg); border-radius: 7px; padding: 4px 8px; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; color: var(--fg) !important; }
.icone-btn:hover { border-color: var(--muted); }
.icone-btn kbd { font-family: var(--f-mono); font-size: 10.5px; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; background: var(--surface); }
@media (max-width: 560px) { .icone-btn kbd { display: none; } }
.cloche-zone { position: relative; }
.cloche-n { position: absolute; top: -6px; right: -6px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--late); color: #fff; font-size: 10.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.cloche-n[hidden] { display: none; }
.cloche-panneau { position: fixed; width: min(360px, calc(100vw - 32px)); max-height: 70vh; overflow-y: auto; z-index: 20; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.18); padding: 8px; }
.cloche-panneau[hidden] { display: none; }
.cloche-tete { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 8px; }
.cloche-panneau ul { list-style: none; margin: 0; padding: 0; }
.cloche-panneau li { display: flex; flex-direction: column; gap: 2px; padding: 8px; border-radius: 7px; cursor: pointer; font-size: 13px; }
.cloche-panneau li:hover { background: var(--surface-2); }
.cloche-panneau li.non-lu { background: var(--accent-soft); }
.cloche-panneau .quand { font-size: 11px; color: var(--muted); font-family: var(--f-mono); }
.lien-btn { border: 0; background: none; color: var(--accent); font-size: 12px; padding: 2px 4px; }
.modal.recherche { max-width: 680px; padding: 12px; gap: 8px; align-self: flex-start; margin-top: 8vh; }
.recherche-res { list-style: none; margin: 0; padding: 0; max-height: 60vh; overflow-y: auto; }
.recherche-res li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.recherche-res li[aria-selected="true"] { background: var(--accent-soft); }
.recherche-res li.vide { cursor: default; }
.res-icone { width: 22px; text-align: center; flex: none; }
.res-txt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.res-txt b, .res-txt .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res-txt .muted { font-size: 12px; }
.parent-tag { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar.avance { height: 4px; }
.avance-ligne { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.avance-ligne .bar { flex: 1; }
.col-head .count.wip-trop { color: var(--late); font-weight: 700; }
.col.wip-trop { box-shadow: inset 0 3px 0 var(--late); }
.wip-champ { width: 64px; }
.sla-ligne { flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.sla-rang { display: inline-flex; align-items: center; gap: 6px; }
.sla-rang .field { width: 70px; }
th.case, td.case { width: 34px; text-align: center; }
tr.choisie { background: var(--accent-soft); }
.barre-masse { position: sticky; top: 64px; z-index: 4; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 12px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--accent); border-radius: 10px; box-shadow: var(--shadow); }
.barre-masse .field { max-width: 190px; }
.cal-tete { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; padding-block: 14px 10px; }
.cal-tete h2 { margin: 0 4px; font-size: 18px; text-transform: capitalize; min-width: 150px; text-align: center; }
@media (max-width: 560px) { .cal-tete h2 { min-width: 0; font-size: 16px; } }
.cal-grille { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; padding-bottom: 24px; }
.cal-jour { font-size: 12px; color: var(--muted); text-align: center; padding: 4px 0; }
.cal-case { min-height: 104px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 4px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-case.hors { opacity: .5; }
.cal-case.auj { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.cal-case.en-sprint { background: linear-gradient(var(--accent-soft), var(--accent-soft)) top / 100% 3px no-repeat, var(--surface); }
.cal-num { font-size: 12px; font-family: var(--f-mono); color: var(--muted); display: flex; gap: 4px; align-items: center; min-width: 0; }
.cal-sprint { font-family: var(--f-body, inherit); font-size: 10.5px; color: var(--accent); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-tache { border: 0; border-left: 3px solid var(--c); background: var(--surface-2); border-radius: 4px; padding: 2px 5px; font-size: 11.5px; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fg); }
.cal-tache.fini { text-decoration: line-through; color: var(--muted); }
.cal-tache.retard { background: var(--late-soft); }
.cal-plus { border: 0; background: none; color: var(--muted); font-size: 11px; text-align: left; padding: 0 5px; }
@media (max-width: 700px) { .cal-case { min-height: 64px; } .cal-tache { font-size: 0; padding: 0; height: 6px; } .cal-sprint { display: none; } }
.chrono { display: flex; flex-direction: column; gap: 6px; padding-bottom: 24px; }
.chrono-ligne { display: grid; grid-template-columns: minmax(120px, 220px) 1fr; gap: 10px; align-items: center; }
.chrono-nom { border: 0; background: none; text-align: left; font: inherit; font-size: 13px; color: var(--fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0; }
.chrono-piste { position: relative; height: 26px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; }
.chrono-axe .chrono-piste { background: none; border: 0; height: 18px; }
.chrono-mois { position: absolute; top: 0; font-size: 11px; color: var(--muted); font-family: var(--f-mono); transform: translateX(-50%); }
.chrono-auj { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--accent); }
.chrono-barre { position: absolute; top: 3px; bottom: 3px; border: 0; border-radius: 4px; background: color-mix(in srgb, var(--c) 35%, var(--surface)); overflow: hidden; padding: 0 6px; display: flex; align-items: center; font-size: 11px; color: var(--fg); }
.chrono-barre i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--c); opacity: .55; }
.chrono-barre span { position: relative; white-space: nowrap; }
@media (max-width: 560px) { .chrono-ligne { grid-template-columns: 1fr; gap: 2px; } }

/* ---------- 2.2 : menus déroulants (vues, responsables) ---------- */
.deroul { position: relative; }
.fleche { color: var(--muted); font-size: 11px; margin-left: 2px; }
.vues-btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--surface-2); padding: 7px 12px; border-radius: 8px; font-family: var(--f-display); font-weight: 600; font-size: 14px; color: var(--fg); min-width: 170px; }
.vues-btn .fleche { margin-left: auto; }
.vues-btn:hover, .vues-btn[aria-expanded="true"] { border-color: var(--muted); }
.vue-ic { width: 20px; text-align: center; }
.vues-panneau { position: absolute; top: calc(100% + 6px); left: 0; z-index: 20; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.18); padding: 6px; }
.vues-panneau[hidden], .resp-panneau[hidden] { display: none; }
.vues-panneau { min-width: 220px; display: flex; flex-direction: column; }
.vues-panneau button { display: flex; align-items: center; gap: 8px; border: 0; background: none; text-align: left; padding: 8px 10px; border-radius: 7px; font-family: var(--f-display); font-weight: 600; font-size: 14px; color: var(--muted); }
.vues-panneau button:hover, .vues-panneau button:focus-visible { background: var(--surface-2); color: var(--fg); }
.vues-panneau button[aria-checked="true"] { background: var(--accent-soft); color: var(--fg); }
.resp-choix { display: flex; flex-direction: column; gap: 6px; }
.resp-choix > .chips:empty { display: none; }
.resp-btn { display: flex; align-items: center; justify-content: space-between; text-align: left; cursor: pointer; width: 100%; max-width: 320px; }
.resp-panneau { max-width: 320px; margin-top: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 6px; }
.resp-panneau > .field { width: 100%; margin-bottom: 6px; }
.resp-panneau .pick-list { border: 0; padding: 0; max-height: 260px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.resp-panneau .pick { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 7px; cursor: pointer; font-size: 13px; }
.resp-panneau .pick:hover { background: var(--surface-2); }
.resp-panneau .pick:has(input:checked) { background: var(--accent-soft); }
.resp-panneau .pick:has(input:disabled) { opacity: .5; cursor: default; }

/* ---------- 2.4 : Board projets (deuxième tableau de tâches) ---------- */
.zone-transfert { display: none; position: fixed; z-index: 30; left: 50%; bottom: 20px; transform: translateX(-50%); width: min(520px, calc(100vw - 32px)); box-shadow: 0 10px 30px rgba(0,0,0,.18); padding: 18px; border: 2px dashed var(--accent); border-radius: 10px; text-align: center; font-weight: 600; color: var(--accent); background: var(--accent-soft); }
body.glisse .zone-transfert { display: block; }
.zone-transfert.drop { background: var(--accent); color: #fff; }
.aide-tableau { margin: 12px 0 0; font-size: 13px; }
.menu-carte { position: fixed; z-index: 40; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.18); padding: 6px; display: flex; flex-direction: column; min-width: 200px; }
.menu-carte button { border: 0; background: none; text-align: left; padding: 8px 10px; border-radius: 7px; font-size: 13.5px; color: var(--fg); }
.menu-carte button:hover, .menu-carte button:focus-visible { background: var(--surface-2); }
.tag-tableau { margin-left: 8px; }
