:root {
  --tb-bg: #060821;
  --tb-panel: #0b0f2c;
  --tb-panel-2: #11163b;
  --tb-line: #202653;
  --tb-text: #eef0f6;
  --tb-muted: #8990b1;
  --tb-blue: #6574ed;
  --tb-blue-2: #4b5bd0;
  --tb-red: #ef6674;
  --tb-green: #51c995;
  --tb-orange: #f0a35e;
  --tb-accent: #6574ed;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body.tb-body {
  display: flex; flex-direction: column; min-height: 100vh; background: radial-gradient(1200px 600px at 80% -10%, rgba(101, 116, 237, .12), transparent), var(--tb-bg);
  color: var(--tb-text); font: 400 14px/1.45 'DM Sans', system-ui, sans-serif;
}
body.tb-modal-open { overflow: hidden; }
h1, h2, h3 { font-family: 'Space Grotesk', 'DM Sans', sans-serif; margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--tb-blue); outline-offset: 2px; }
.tb-muted { color: var(--tb-muted); }
.tb-link { color: #9fb2ff; }
.tb-link:hover { text-decoration: underline; }
.tb-kicker { margin: 0 0 4px; color: #9fb2ff; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.tb-sep { width: 100%; border: 0; border-top: 1px solid var(--tb-line); margin: 6px 0; }
.tb-stack { display: grid; gap: 10px; }

/* ----- Barre du haut ----- */
.tb-topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 22px; padding: 10px 20px; border-bottom: 1px solid var(--tb-line); background: rgba(6, 8, 33, .92); backdrop-filter: blur(8px); }
.tb-brand { display: flex; align-items: center; gap: 8px; font: 700 17px 'Space Grotesk', sans-serif; }
.tb-brand-mark { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--tb-blue); color: #fff; font-size: 15px; }
.tb-nav { display: flex; gap: 4px; }
.tb-nav-link { padding: 7px 12px; border-radius: 7px; color: var(--tb-muted); font-weight: 600; }
.tb-nav-link:hover { color: var(--tb-text); background: var(--tb-panel-2); }
.tb-nav-link.is-active { color: #fff; background: var(--tb-panel-2); }
.tb-topbar-right { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.tb-topbar-right form { margin: 0; }
.tb-user { display: flex; align-items: center; gap: 8px; color: #cbd2e7; font-weight: 600; }
.tb-avatar { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--tb-blue-2); border: 2px solid var(--tb-bg); color: #fff; font-size: 12px; font-weight: 700; flex: 0 0 auto; }
.tb-avatar-sm { width: 22px; height: 22px; font-size: 10px; border-width: 1px; }
.tb-avatar-more { background: var(--tb-panel-2); color: var(--tb-muted); }

/* ----- Boutons et champs ----- */
.tb-btn { padding: 8px 13px; border: 1px solid var(--tb-line); border-radius: 7px; background: #0c1428; color: #c3cee3; font-weight: 600; font-size: 13px; }
.tb-btn:hover { background: #121c3a; border-color: #34417a; }
.tb-btn-primary { border-color: var(--tb-blue); background: var(--tb-blue); color: #fff; }
.tb-btn-primary:hover { background: var(--tb-blue-2); border-color: var(--tb-blue-2); }
.tb-btn-ghost { background: transparent; }
.tb-btn-danger { border-color: rgba(239, 102, 116, .5); color: #ff9aa2; background: rgba(239, 102, 116, .08); }
.tb-btn-danger:hover { background: rgba(239, 102, 116, .18); border-color: var(--tb-red); }
.tb-btn.is-on { background: rgba(101, 116, 237, .25); border-color: var(--tb-blue); color: #fff; }
.tb-btn:disabled { opacity: .5; cursor: not-allowed; }
.tb-icon-btn { display: inline-grid; place-items: center; min-width: 28px; height: 28px; padding: 0 6px; border: 0; border-radius: 6px; background: transparent; color: var(--tb-muted); }
.tb-icon-btn:hover { background: rgba(255, 255, 255, .08); color: var(--tb-text); }
.tb-icon-btn.is-on { color: var(--tb-orange); }
.tb-input, .tb-select, .tb-date, .tb-search, .tb-textarea, .tb-form-stack input, .tb-add-list-form input, .tb-composer-input,
.tb-list-title-input, .tb-board-title-input, .tb-card-title-input {
  width: 100%; padding: 9px 11px; border: 1px solid var(--tb-line); border-radius: 7px; background: #080d24; color: var(--tb-text);
}
.tb-select, .tb-date { width: auto; padding: 7px 9px; font-size: 13px; }
.tb-search { width: 240px; }
.tb-search-sm { width: 170px; padding: 7px 10px; font-size: 13px; }
.tb-textarea, .tb-composer-input { resize: vertical; min-height: 54px; }
input:focus, select:focus, textarea:focus { border-color: var(--tb-blue); outline: none; }
input[type='color'] { width: 34px; height: 34px; padding: 2px; flex: 0 0 auto; cursor: pointer; }
.tb-form-stack { display: grid; gap: 14px; }
.tb-form-stack label { display: grid; gap: 6px; color: #aab3d4; font-size: 12px; font-weight: 600; }
.tb-alert { margin: 14px 0; padding: 10px 12px; border: 1px solid rgba(239, 102, 116, .45); border-radius: 7px; background: rgba(239, 102, 116, .12); color: #ff9aa2; }

/* ----- Pages ----- */
.tb-page { width: 100%; max-width: 1100px; margin: 0 auto; padding: 32px 22px 60px; }
.tb-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.tb-page-head h1 { font-size: 28px; }
.tb-page-actions { display: flex; align-items: center; gap: 10px; }
.tb-empty { text-align: center; padding: 70px 0; display: grid; gap: 12px; justify-items: center; }
.tb-auth-body { align-items: center; justify-content: center; padding: 20px; }
.tb-auth { width: 100%; max-width: 380px; padding: 30px; border: 1px solid var(--tb-line); border-radius: 14px; background: var(--tb-panel); box-shadow: 0 24px 60px rgba(0, 0, 0, .45); }
.tb-auth h1 { font-size: 26px; margin-bottom: 4px; }
.tb-auth .tb-form-stack { margin-top: 18px; }
.tb-auth-alt { margin: 16px 0 0; text-align: center; }

/* ----- Liste des tableaux ----- */
.tb-board-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.tb-board-tile { display: flex; flex-direction: column; justify-content: space-between; gap: 8px; min-height: 120px; padding: 16px; border: 1px solid var(--tb-line); border-top: 4px solid var(--tile, var(--tb-blue)); border-radius: 10px; background: var(--tb-panel); text-align: left; transition: transform .15s, border-color .15s; }
.tb-board-tile:hover { transform: translateY(-2px); border-color: var(--tile, var(--tb-blue)); }
.tb-board-tile strong { font: 600 17px 'Space Grotesk', sans-serif; }
.tb-board-tile .tb-muted { font-size: 12px; }
.tb-board-new { align-items: center; justify-content: center; border-style: dashed; border-top: 1px dashed var(--tb-line); background: transparent; color: var(--tb-muted); font-weight: 600; flex-direction: row; gap: 8px; }
.tb-board-new span { font-size: 20px; }
.tb-progress { display: block; height: 5px; border-radius: 999px; background: #1a2250; overflow: hidden; width: 100%; }
.tb-progress > span { display: block; height: 100%; background: var(--tb-green); border-radius: 999px; transition: width .2s; }
.tb-swatches { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.tb-swatch { width: 30px; height: 30px; border: 2px solid transparent; border-radius: 8px; padding: 0; }
.tb-swatch-sm { width: 18px; height: 18px; border-radius: 5px; border-color: rgba(255, 255, 255, .15); }
.tb-swatch.is-active { border-color: #fff; box-shadow: 0 0 0 2px rgba(255, 255, 255, .15); }

/* ----- Tableau (kanban) ----- */
body.tb-board-body { height: 100vh; overflow: hidden; background: linear-gradient(180deg, color-mix(in srgb, var(--tb-accent) 22%, var(--tb-bg)) 0%, var(--tb-bg) 55%); }
.tb-board-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 12px 20px; }
.tb-bar-left, .tb-bar-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tb-bar-left { gap: 16px; }
.tb-board-title { margin: 0; padding: 4px 8px; border: 0; border-radius: 6px; background: transparent; font: 700 22px 'Space Grotesk', sans-serif; color: var(--tb-text); }
.tb-board-title.is-editable:hover { background: rgba(255, 255, 255, .08); }
.tb-board-title-input { width: 320px; font: 700 20px 'Space Grotesk', sans-serif; }
.tb-members { display: flex; padding: 0; border: 0; background: transparent; }
.tb-members .tb-avatar { margin-left: -6px; }
.tb-members .tb-avatar:first-child { margin-left: 0; }
.tb-board { flex: 1; min-height: 0; display: flex; align-items: flex-start; gap: 12px; padding: 4px 20px 20px; overflow-x: auto; overflow-y: hidden; }
.tb-list, .tb-add-list, .tb-add-list-form { flex: 0 0 292px; width: 292px; }
.tb-list { display: flex; flex-direction: column; max-height: 100%; border: 1px solid var(--tb-line); border-radius: 11px; background: rgba(11, 15, 44, .94); }
.tb-list.dragging { opacity: .45; }
.tb-list-head { display: flex; align-items: center; gap: 6px; padding: 10px 8px 6px 6px; }
.tb-list-handle { cursor: grab; color: #5a6595; padding: 0 3px; user-select: none; }
.tb-list-title { flex: 1; min-width: 0; padding: 4px 6px; border: 0; border-radius: 6px; background: transparent; text-align: left; font: 600 14px 'Space Grotesk', sans-serif; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-list-title:hover { background: rgba(255, 255, 255, .06); }
.tb-list-title-input { flex: 1; padding: 5px 7px; font: 600 14px 'Space Grotesk', sans-serif; }
.tb-count { min-width: 22px; padding: 1px 7px; border-radius: 999px; background: #1a2250; color: var(--tb-muted); font-size: 11px; font-weight: 700; text-align: center; }
.tb-cards { flex: 1; min-height: 12px; display: flex; flex-direction: column; gap: 8px; padding: 4px 8px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #2a3470 transparent; }
.tb-card { padding: 9px 10px; border: 1px solid #26345f; border-radius: 8px; background: #141b45; cursor: pointer; box-shadow: 0 1px 0 rgba(0, 0, 0, .3); }
.tb-card:hover { border-color: #4b5bd0; }
.tb-card.dragging { opacity: .35; }
.tb-card.is-filtered { display: none; }
.tb-card.is-done .tb-card-title { color: var(--tb-muted); text-decoration: line-through; }
.tb-card-labels { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 7px; }
.tb-label-chip { min-width: 34px; max-width: 100%; height: 8px; padding: 0 7px; border-radius: 999px; font-size: 10px; font-weight: 700; line-height: 8px; color: transparent; overflow: hidden; white-space: nowrap; }
.tb-card-main { display: flex; align-items: flex-start; gap: 8px; }
.tb-card-title { flex: 1; min-width: 0; overflow-wrap: anywhere; font-weight: 500; }
.tb-check { display: grid; place-items: center; flex: 0 0 auto; width: 18px; height: 18px; margin-top: 1px; border: 2px solid #4a5690; border-radius: 50%; background: transparent; color: #04122a; font-size: 11px; font-weight: 800; padding: 0; }
.tb-check:hover { border-color: var(--tb-green); }
.tb-check.is-on { border-color: var(--tb-green); background: var(--tb-green); }
.tb-card-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.tb-badges { display: flex; flex-wrap: wrap; gap: 5px; }
.tb-badge { padding: 2px 6px; border-radius: 5px; color: #aab3d4; font-size: 11px; font-weight: 600; }
.tb-due { background: rgba(255, 255, 255, .06); }
.tb-due.soon { background: rgba(240, 163, 94, .2); color: var(--tb-orange); }
.tb-due.today { background: var(--tb-orange); color: #2a1604; }
.tb-due.late { background: rgba(239, 102, 116, .25); color: #ff9aa2; }
.tb-due.done { background: rgba(81, 201, 149, .2); color: var(--tb-green); }
.tb-complete { background: rgba(81, 201, 149, .2); color: var(--tb-green); }
.tb-card-members { display: flex; }
.tb-card-members .tb-avatar { margin-left: -5px; }
.tb-drop-indicator.tb-drop-h { flex: 0 0 auto; height: 40px; border: 2px dashed var(--tb-blue); border-radius: 8px; background: rgba(101, 116, 237, .12); }
.tb-drop-indicator.tb-drop-v { flex: 0 0 292px; align-self: stretch; border: 2px dashed var(--tb-blue); border-radius: 11px; background: rgba(101, 116, 237, .1); }
.tb-add-card { margin: 6px 8px 8px; padding: 8px 10px; border: 0; border-radius: 7px; background: transparent; color: var(--tb-muted); text-align: left; font-weight: 600; }
.tb-add-card:hover { background: rgba(255, 255, 255, .06); color: var(--tb-text); }
.tb-composer { display: grid; gap: 8px; padding: 6px 8px 10px; }
.tb-composer-actions { display: flex; gap: 8px; }
.tb-add-list { padding: 12px 14px; border: 1px dashed #34417a; border-radius: 11px; background: rgba(255, 255, 255, .04); color: #cbd2e7; text-align: left; font-weight: 600; }
.tb-add-list:hover { background: rgba(255, 255, 255, .09); }
.tb-add-list-form { display: grid; gap: 8px; padding: 10px; border: 1px solid var(--tb-line); border-radius: 11px; background: var(--tb-panel); }
.tb-board.has-filter::before { content: ''; }

/* ----- Fenêtres modales ----- */
.tb-modal-overlay { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px 16px; overflow-y: auto; background: rgba(2, 4, 18, .72); }
.tb-modal { width: 100%; max-width: 460px; border: 1px solid var(--tb-line); border-radius: 13px; background: var(--tb-panel); box-shadow: 0 28px 80px rgba(0, 0, 0, .6); }
.tb-modal-wide { max-width: 720px; }
.tb-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px 0; }
.tb-modal-head h2 { font-size: 18px; }
.tb-modal-close { margin-left: auto; width: 30px; height: 30px; border: 0; border-radius: 7px; background: transparent; color: var(--tb-muted); font-size: 22px; line-height: 1; }
.tb-modal-close:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.tb-modal-body { padding: 14px 18px 20px; }

/* ----- Fiche carte ----- */
.tb-card-detail { display: grid; gap: 18px; }
.tb-card-title-input { font: 700 20px 'Space Grotesk', sans-serif; border-color: transparent; background: transparent; padding-inline: 6px; }
.tb-card-title-input:hover { background: #080d24; }
.tb-card-row { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; }
.tb-inline-label { display: flex; align-items: center; gap: 8px; color: var(--tb-muted); font-size: 12px; font-weight: 600; }
.tb-inline-check { display: flex; align-items: center; gap: 7px; font-weight: 600; cursor: pointer; }
.tb-inline-check input { width: 17px; height: 17px; accent-color: var(--tb-green); }
.tb-card-section h3 { margin-bottom: 8px; color: #aab3d4; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.tb-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.tb-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border: 1px solid color-mix(in srgb, var(--chip, #4b5bd0) 55%, transparent); border-radius: 999px; background: transparent; color: #cbd2e7; font-size: 12px; font-weight: 600; }
.tb-chip:hover { background: color-mix(in srgb, var(--chip, #4b5bd0) 18%, transparent); }
.tb-chip.is-on { background: var(--chip, var(--tb-blue)); color: #fff; border-color: transparent; }
.tb-chip-member { --chip: #4b5bd0; padding-left: 5px; }
.tb-checklist-progress { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; color: var(--tb-muted); font-size: 12px; }
.tb-checklist { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 4px; }
.tb-checklist li { display: flex; align-items: center; gap: 9px; padding: 5px 6px; border-radius: 6px; }
.tb-checklist li:hover { background: rgba(255, 255, 255, .04); }
.tb-checklist input { width: 16px; height: 16px; accent-color: var(--tb-green); flex: 0 0 auto; }
.tb-checklist-text { flex: 1; overflow-wrap: anywhere; }
.tb-checklist li.is-done .tb-checklist-text { color: var(--tb-muted); text-decoration: line-through; }
.tb-inline-form { display: flex; gap: 8px; align-items: flex-start; }
.tb-inline-form .tb-input, .tb-inline-form .tb-textarea { flex: 1; }
.tb-comment-form { margin-bottom: 12px; }
.tb-comments { display: grid; gap: 10px; }
.tb-comment { padding: 10px 12px; border: 1px solid var(--tb-line); border-radius: 8px; background: #0a1030; }
.tb-comment-head { display: flex; align-items: center; gap: 8px; }
.tb-comment-head small { color: var(--tb-muted); }
.tb-comment-head .tb-icon-btn { margin-left: auto; }
.tb-comment-body { margin: 6px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.tb-card-actions { display: flex; gap: 10px; padding-top: 4px; border-top: 1px solid var(--tb-line); padding-top: 14px; }
.tb-note-status { color: var(--tb-muted); font-size: 11px; margin-left: 8px; }

/* ----- Étiquettes, membres, archives ----- */
.tb-label-row { display: flex; align-items: center; gap: 8px; }
.tb-label-row .tb-input { flex: 1; }
.tb-member-list, .tb-archive-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tb-member-list li, .tb-archive-list li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--tb-line); border-radius: 8px; background: #0a1030; }
.tb-member-name { flex: 1; }
.tb-member-name small { color: var(--tb-muted); }
.tb-archive-list li { justify-content: space-between; }
.tb-modal-body h3 { font-size: 13px; color: #aab3d4; }

/* ----- Notes ----- */
.tb-notes { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; align-items: start; }
.tb-note { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid rgba(255, 255, 255, .1); border-radius: 11px; }
.tb-note.is-pinned { border-color: var(--tb-orange); }
.tb-note-head { display: flex; align-items: center; gap: 4px; }
.tb-note-title { flex: 1; min-width: 0; padding: 4px 6px; border: 0; background: transparent; font: 700 15px 'Space Grotesk', sans-serif; color: var(--tb-text); }
.tb-note-title:focus, .tb-note-body:focus { outline: none; background: rgba(0, 0, 0, .2); }
.tb-note-body { width: 100%; min-height: 150px; padding: 6px; border: 0; border-radius: 6px; background: transparent; color: #dfe3f2; resize: vertical; }
.tb-note-foot { display: flex; align-items: center; justify-content: space-between; }
.tb-note-colors { display: flex; gap: 6px; }

/* ----- Toasts ----- */
.tb-toasts { position: fixed; right: 18px; bottom: 18px; z-index: 200; display: grid; gap: 8px; }
.tb-toast { max-width: 340px; padding: 11px 14px; border: 1px solid rgba(239, 102, 116, .5); border-radius: 9px; background: #2a1020; color: #ffd5d9; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); transition: opacity .25s, transform .25s; }
.tb-toast.is-leaving { opacity: 0; transform: translateY(6px); }

@media (max-width: 720px) {
  .tb-topbar { gap: 10px; padding: 8px 12px; flex-wrap: wrap; }
  .tb-user { display: none; }
  .tb-page { padding: 22px 14px 40px; }
  .tb-search, .tb-search-sm { width: 100%; }
  .tb-list, .tb-add-list, .tb-add-list-form { flex-basis: 84vw; width: 84vw; }
  .tb-board { scroll-snap-type: x proximity; }
  .tb-list { scroll-snap-align: start; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* =====================================================================
   Animations et composants partagés (modales, toasts, boutons, champs)
   ===================================================================== */
@keyframes tb-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes tb-fade-out { to { opacity: 0; } }
@keyframes tb-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes tb-pop { from { opacity: 0; transform: translateY(8px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes tb-pop-out { to { opacity: 0; transform: translateY(6px) scale(.97); } }
@keyframes tb-shimmer { to { background-position: -200% 0; } }
@keyframes tb-sheen { to { transform: translateX(100%); } }
@keyframes tb-pulse { 0% { box-shadow: 0 0 0 0 rgba(81, 201, 149, .55); } 70%, 100% { box-shadow: 0 0 0 7px rgba(81, 201, 149, 0); } }
@keyframes tb-float { 50% { transform: translateY(-5px); } }
@keyframes tb-flash { 0% { box-shadow: 0 0 0 0 rgba(81, 201, 149, 0); } 25% { box-shadow: 0 0 0 3px rgba(81, 201, 149, .45); } 100% { box-shadow: 0 0 0 0 rgba(81, 201, 149, 0); } }
@keyframes tb-leave { to { opacity: 0; transform: translateX(16px); } }
@keyframes tb-toast-in { from { opacity: 0; transform: translateX(26px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes tb-countdown { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@keyframes tb-bulk-in { from { opacity: 0; transform: translate(-50%, 26px) scale(.96); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes tb-check-pop { 0% { transform: scale(0) rotate(-12deg); } 70% { transform: scale(1.25) rotate(0); } 100% { transform: scale(1); } }

.tb-modal-overlay { backdrop-filter: blur(3px); animation: tb-fade .18s ease; }
.tb-modal { animation: tb-pop .26s cubic-bezier(.2, .9, .3, 1.1); }
.tb-modal-overlay.is-closing { animation: tb-fade-out .16s ease forwards; pointer-events: none; }
.tb-modal-overlay.is-closing .tb-modal { animation: tb-pop-out .16s ease forwards; }
.tb-toast { position: relative; overflow: hidden; animation: tb-toast-in .3s cubic-bezier(.2, .9, .3, 1.1); }
.tb-toast::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: currentColor; opacity: .45; transform-origin: left; animation: tb-countdown 3.5s linear forwards; }
.tb-toast-ok { border-color: rgba(81, 201, 149, .5); background: #0b2a22; color: #c9f5e2; }

.tb-btn { transition: background .15s, border-color .15s, color .15s, transform .12s, box-shadow .15s; }
.tb-btn:not(:disabled):hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0, 0, 0, .3); }
.tb-btn:not(:disabled):active { transform: scale(.97); box-shadow: none; }
.tb-btn-primary:not(:disabled):hover { box-shadow: 0 8px 22px rgba(101, 116, 237, .4); }
.tb-btn-sm, .tb-btn-ic { display: inline-flex; align-items: center; gap: 7px; }
.tb-btn-sm { padding: 5px 10px; font-size: 12px; }
.tb-btn-ic .tb-ic { width: 15px; height: 15px; }
input, select, textarea { transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { box-shadow: 0 0 0 3px rgba(101, 116, 237, .2); }
.tb-icon-btn { transition: background .15s, color .15s, transform .12s; }
.tb-icon-btn:active { transform: scale(.9); }
.tb-icon-btn.is-danger:hover { background: rgba(239, 102, 116, .18); color: #ff9aa2; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* =====================================================================
   Administration
   ===================================================================== */
.tb-page-wide { max-width: 1240px; }
.tb-head-hint { margin: 0; font-size: 12px; }
kbd { padding: 1px 6px; border: 1px solid var(--tb-line); border-bottom-width: 2px; border-radius: 5px; background: var(--tb-panel-2); font: 600 11px ui-monospace, Menlo, monospace; color: #cbd2e7; }
.tb-ic { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.tb-in { animation: tb-rise .45s cubic-bezier(.2, .8, .2, 1) backwards; animation-delay: calc(var(--i, 0) * 45ms); }
.tb-view { animation: tb-fade .3s ease; }

/* Onglets avec indicateur qui glisse */
.tb-admin-tabs { position: relative; display: flex; gap: 2px; width: fit-content; max-width: 100%; margin-bottom: 22px; padding: 4px; overflow-x: auto; border: 1px solid var(--tb-line); border-radius: 12px; background: rgba(11, 15, 44, .8); scrollbar-width: none; }
.tb-admin-tabs::-webkit-scrollbar { display: none; }
.tb-tab { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 0; border-radius: 9px; background: transparent; color: var(--tb-muted); font-weight: 600; white-space: nowrap; transition: color .2s; }
.tb-tab:hover { color: var(--tb-text); }
.tb-tab.is-on { color: #fff; }
.tb-tab-ind { position: absolute; top: 4px; bottom: 4px; left: 0; width: 0; border-radius: 9px; background: linear-gradient(135deg, #6574ed, #4b5bd0); box-shadow: 0 6px 18px rgba(101, 116, 237, .35); }
.tb-admin-tabs.is-ready .tb-tab-ind { transition: transform .38s cubic-bezier(.3, .9, .3, 1), width .38s cubic-bezier(.3, .9, .3, 1); }

/* Tuiles de l'aperçu */
.tb-grid-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 14px; }
.tb-stat { position: relative; overflow: hidden; display: grid; gap: 2px; padding: 16px; border: 1px solid var(--tb-line); border-radius: 12px; background: linear-gradient(160deg, color-mix(in srgb, var(--c) 14%, var(--tb-panel)), var(--tb-panel) 62%); transition: transform .2s, border-color .2s, box-shadow .2s; }
.tb-stat:hover { transform: translateY(-3px); border-color: var(--c); box-shadow: 0 12px 28px rgba(0, 0, 0, .35); }
.tb-stat::after { content: ''; position: absolute; right: -30px; top: -30px; width: 100px; height: 100px; border-radius: 50%; background: var(--c); opacity: .12; filter: blur(10px); transition: opacity .3s, transform .4s; }
.tb-stat:hover::after { opacity: .24; transform: scale(1.35); }
.tb-stat-ic { display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 8px; border-radius: 10px; background: color-mix(in srgb, var(--c) 22%, transparent); color: var(--c); }
.tb-stat-l { color: var(--tb-muted); font-size: 12px; font-weight: 600; }
.tb-stat-n { font: 700 34px/1.1 'Space Grotesk', sans-serif; font-variant-numeric: tabular-nums; }
.tb-stat-s { color: var(--tb-muted); font-size: 12px; }

/* Panneaux, barres de progression, activité récente */
.tb-panel { padding: 18px; border: 1px solid var(--tb-line); border-radius: 12px; background: var(--tb-panel); }
.tb-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.tb-panel h3 { font-size: 15px; color: var(--tb-text); }
.tb-panel p { margin: 8px 0 0; }
.tb-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.tb-cols > div { display: grid; gap: 14px; }
.tb-bar { height: 10px; overflow: hidden; border-radius: 999px; background: #151c45; }
.tb-bar > span { position: relative; display: block; height: 100%; overflow: hidden; border-radius: 999px; background: linear-gradient(90deg, #3fb685, #51c995); transition: width 1.1s cubic-bezier(.2, .8, .2, 1); }
.tb-bar > span::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .35), transparent); transform: translateX(-100%); animation: tb-sheen 2.4s 1.2s infinite; }
.tb-bar-sm { width: 90px; height: 6px; display: inline-block; vertical-align: middle; margin-right: 8px; }
.tb-pct { font: 700 22px 'Space Grotesk', sans-serif; }
.tb-quick { display: flex; gap: 8px; flex-wrap: wrap; }
.tb-activity { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.tb-activity li { display: flex; align-items: center; gap: 12px; padding: 9px 6px; border-radius: 8px; transition: background .15s, transform .15s; }
.tb-activity li:hover { background: rgba(255, 255, 255, .04); transform: translateX(2px); }
.tb-activity .tb-grow { flex: 1; min-width: 0; }
.tb-activity small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-dotc { flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%; background: var(--cc, var(--tb-blue)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--cc, var(--tb-blue)) 18%, transparent); }
[data-cat='user'] { --cc: #6574ed; } [data-cat='board'] { --cc: #a77bf3; } [data-cat='comment'] { --cc: #ef7fb0; }
[data-cat='auth'] { --cc: #f0a35e; } [data-cat='settings'] { --cc: #8ea0d6; } [data-cat='maintenance'] { --cc: #ef6674; } [data-cat='session'] { --cc: #4fc3d9; }
.tb-cat { display: inline-block; padding: 2px 9px; border-radius: 999px; background: color-mix(in srgb, var(--cc, var(--tb-blue)) 16%, transparent); color: color-mix(in srgb, var(--cc, var(--tb-blue)) 70%, #fff); font-size: 11px; font-weight: 700; }

/* Barre d'outils, recherche, filtres */
.tb-admin-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.tb-searchbox { position: relative; display: inline-flex; align-items: center; flex: 1 1 260px; max-width: 360px; }
.tb-searchbox .tb-ic { position: absolute; left: 12px; color: var(--tb-muted); pointer-events: none; transition: color .15s; }
.tb-searchbox:focus-within .tb-ic { color: var(--tb-blue); }
.tb-searchbox .tb-search { width: 100%; padding: 9px 12px 9px 36px; }
#admin-root .tb-chips { display: flex; gap: 6px; flex-wrap: wrap; }
#admin-root .tb-chip { padding: 6px 12px; border: 1px solid var(--tb-line); border-radius: 999px; background: transparent; color: var(--tb-muted); font-size: 12px; font-weight: 600; transition: all .18s; }
#admin-root .tb-chip:hover { border-color: #34417a; color: var(--tb-text); }
#admin-root .tb-chip.is-on { border-color: var(--tb-blue); background: rgba(101, 116, 237, .22); color: #fff; }
#admin-root .tb-chip b { margin-left: 6px; opacity: .7; font-variant-numeric: tabular-nums; }
.tb-more { display: flex; justify-content: center; margin-top: 14px; }

/* Tableaux de données */
.tb-table-wrap { overflow-x: auto; border: 1px solid var(--tb-line); border-radius: 12px; background: var(--tb-panel); }
.tb-table { width: 100%; border-collapse: collapse; }
.tb-table th, .tb-table td { padding: 11px 14px; border-bottom: 1px solid var(--tb-line); text-align: left; vertical-align: middle; white-space: nowrap; }
.tb-table th { background: rgba(255, 255, 255, .02); color: var(--tb-muted); font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.tb-table tbody tr { transition: background .15s; }
.tb-table tbody tr:hover { background: rgba(101, 116, 237, .08); }
.tb-table tr:last-child td { border-bottom: 0; }
.tb-table tr.is-off td:not(.tb-actions-cell) { opacity: .55; }
.tb-table tr.is-leaving, .tb-feed .tb-comment.is-leaving { animation: tb-leave .26s ease forwards; }
.tb-actions { display: flex; align-items: center; gap: 6px; justify-content: flex-end; }
.tb-quote { max-width: 420px; color: #cbd2e7; white-space: normal; }
.tb-av { display: inline-grid; flex: 0 0 auto; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: hsl(var(--h, 230), 52%, 38%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); color: #fff; font: 700 13px 'Space Grotesk', sans-serif; }
.tb-av-sm { width: 26px; height: 26px; font-size: 11px; }
.tb-who { display: flex; align-items: center; gap: 10px; }
.tb-who small { display: block; }
.tb-dot { display: inline-block; width: 10px; height: 10px; margin-right: 9px; border-radius: 50%; background: var(--dot, var(--tb-blue)); box-shadow: 0 0 10px var(--dot, var(--tb-blue)); }
.tb-tag { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 999px; background: rgba(101, 116, 237, .2); color: #b9c4ff; font-size: 11px; font-weight: 700; vertical-align: 1px; }
.tb-tag-admin { background: rgba(167, 123, 243, .2); color: #d3b8ff; }
.tb-tag-ok { background: rgba(81, 201, 149, .16); color: #8fe0bc; }
.tb-tag-off { background: rgba(239, 102, 116, .18); color: #ff9aa2; }
.tb-tag-warn { background: rgba(240, 163, 94, .18); color: #ffc58f; }
.tb-tag-mute { background: rgba(137, 144, 177, .18); color: #aab3d4; }
.tb-status { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; }
.tb-status::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--sc); }
.tb-status.is-ok { --sc: var(--tb-green); } .tb-status.is-off { --sc: var(--tb-red); } .tb-status.is-warn { --sc: var(--tb-orange); }
.tb-live { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.tb-live i { width: 8px; height: 8px; border-radius: 50%; background: var(--tb-green); animation: tb-pulse 1.8s infinite; }

/* Cases à cocher et interrupteurs */
input.tb-cb { appearance: none; -webkit-appearance: none; position: relative; display: inline-block; width: 18px; height: 18px; margin: 0; padding: 0; border: 2px solid #4a5690; border-radius: 5px; background: transparent; cursor: pointer; vertical-align: middle; transition: background .15s, border-color .15s; }
input.tb-cb:hover { border-color: var(--tb-blue); }
input.tb-cb:checked { border-color: var(--tb-blue); background: var(--tb-blue); }
input.tb-cb:checked::after { content: ''; position: absolute; left: 4px; top: 0; width: 4px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); animation: tb-check-pop .22s ease; }
.tb-switch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; user-select: none; }
.tb-form-stack label.tb-switch { display: flex; }
.tb-switch input, .tb-form-stack .tb-switch input { position: absolute; width: 0; height: 0; margin: 0; padding: 0; border: 0; opacity: 0; }
.tb-track { position: relative; flex: 0 0 auto; width: 40px; height: 23px; border: 1px solid var(--tb-line); border-radius: 999px; background: #1a2150; transition: background .2s, border-color .2s, box-shadow .2s; }
.tb-track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 17px; height: 17px; border-radius: 50%; background: #aab3d4; box-shadow: 0 1px 3px rgba(0, 0, 0, .4); transition: transform .26s cubic-bezier(.3, 1.5, .5, 1), background .2s; }
.tb-switch input:checked + .tb-track { border-color: var(--tb-blue); background: var(--tb-blue); box-shadow: 0 0 14px rgba(101, 116, 237, .45); }
.tb-switch input:checked + .tb-track::after { background: #fff; transform: translateX(17px); }
.tb-switch input:focus-visible + .tb-track { outline: 2px solid var(--tb-blue); outline-offset: 2px; }
.tb-switch.is-disabled { cursor: not-allowed; opacity: .5; }
.tb-switch-text { color: var(--tb-text); font-size: 13.5px; font-weight: 500; }
.tb-switch-text small { display: block; margin-top: 1px; color: var(--tb-muted); font-size: 12px; font-weight: 400; }
.tb-stepper { display: inline-flex; align-items: center; overflow: hidden; border: 1px solid var(--tb-line); border-radius: 10px; background: #080d24; transition: border-color .15s, box-shadow .15s; }
.tb-stepper:focus-within { border-color: var(--tb-blue); box-shadow: 0 0 0 3px rgba(101, 116, 237, .2); }
.tb-stepper input { width: 58px; padding: 8px 0; border: 0; background: transparent; text-align: center; font-weight: 700; appearance: textfield; -moz-appearance: textfield; }
.tb-stepper input:focus { box-shadow: none; }
.tb-stepper input::-webkit-outer-spin-button, .tb-stepper input::-webkit-inner-spin-button { margin: 0; -webkit-appearance: none; }
.tb-step { display: grid; place-items: center; width: 36px; height: 36px; border: 0; background: transparent; color: var(--tb-muted); transition: background .15s, color .15s, transform .1s; }
.tb-step:hover { background: rgba(101, 116, 237, .2); color: #fff; }
.tb-step:active { transform: scale(.85); }

/* Menu d'actions */
.tb-menu { position: fixed; z-index: 120; min-width: 210px; padding: 6px; border: 1px solid var(--tb-line); border-radius: 11px; background: #0d1233; box-shadow: 0 18px 50px rgba(0, 0, 0, .6); transform-origin: top right; animation: tb-pop .16s cubic-bezier(.2, .9, .3, 1.2); }
.tb-menu.is-up { transform-origin: bottom right; }
.tb-menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 7px; background: transparent; color: #cbd2e7; font-weight: 600; text-align: left; transition: background .12s, color .12s, transform .12s; }
.tb-menu-item:hover, .tb-menu-item:focus-visible { outline: none; background: rgba(101, 116, 237, .18); color: #fff; transform: translateX(2px); }
.tb-menu-item.is-danger { color: #ff9aa2; }
.tb-menu-item.is-danger:hover, .tb-menu-item.is-danger:focus-visible { background: rgba(239, 102, 116, .18); color: #ffd5d9; }
.tb-menu-sep { margin: 5px 2px; border: 0; border-top: 1px solid var(--tb-line); }

/* Actions en lot (barre flottante) */
.tb-bulk { position: fixed; left: 50%; bottom: 22px; z-index: 80; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; max-width: 94vw; padding: 10px 12px 10px 16px; border: 1px solid var(--tb-blue); border-radius: 14px; background: rgba(13, 18, 51, .96); backdrop-filter: blur(10px); box-shadow: 0 18px 50px rgba(0, 0, 0, .6), 0 0 0 4px rgba(101, 116, 237, .12); transform: translateX(-50%); animation: tb-bulk-in .32s cubic-bezier(.2, .9, .3, 1.15); }

/* États vides et chargement */
.tb-empty { display: grid; justify-items: center; gap: 6px; padding: 46px 20px; color: var(--tb-muted); text-align: center; }
.tb-empty > .tb-ic { width: 36px; height: 36px; stroke-width: 1.5; color: #4a5690; animation: tb-float 3.2s ease-in-out infinite; }
.tb-empty strong { color: var(--tb-text); }
.tb-skel-delay { animation: tb-fade .25s .18s backwards; }
.tb-skel { border-radius: 10px; background: linear-gradient(90deg, #0e1438 25%, #19214f 50%, #0e1438 75%); background-size: 200% 100%; animation: tb-shimmer 1.3s linear infinite; }
.tb-skel-tile { height: 132px; border-radius: 12px; }
.tb-skel-bar { width: 300px; max-width: 100%; height: 38px; margin-bottom: 14px; }
.tb-skel-row { height: 52px; margin-bottom: 8px; }

/* Commentaires */
.tb-feed { display: grid; gap: 10px; }
.tb-feed .tb-comment { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; padding: 14px; border: 1px solid var(--tb-line); border-radius: 12px; background: var(--tb-panel); transition: border-color .18s, transform .18s; }
.tb-feed .tb-comment:hover { border-color: #34417a; transform: translateX(2px); }
.tb-comment-meta { color: var(--tb-muted); font-size: 12px; }
.tb-comment-meta strong { color: var(--tb-text); font-size: 13px; }
.tb-feed .tb-comment p { margin: 8px 0 0; padding: 10px 12px; border-radius: 4px 12px 12px 12px; background: #0a0f2b; color: #cbd2e7; overflow-wrap: anywhere; white-space: pre-wrap; }

/* Paramètres */
.tb-settings { display: grid; gap: 14px; max-width: 800px; }
.tb-setting { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 14px 6px; border-bottom: 1px solid var(--tb-line); border-radius: 10px; }
.tb-setting:last-child { border-bottom: 0; }
.tb-setting.is-saved { animation: tb-flash .9s ease; }
.tb-setting-t strong { font-size: 14px; }
.tb-setting-t p { max-width: 480px; margin: 3px 0 0; font-size: 12.5px; }
.tb-panel-danger { border-color: rgba(239, 102, 116, .35); background: linear-gradient(160deg, rgba(239, 102, 116, .09), var(--tb-panel) 55%); }
.tb-purge-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.tb-purge-res { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; margin-top: 14px; padding: 14px 16px; border: 1px dashed rgba(239, 102, 116, .5); border-radius: 10px; }
.tb-purge-res .tb-big { display: block; font: 700 28px/1.1 'Space Grotesk', sans-serif; }

/* Modales d'admin et page « Mon compte » */
.tb-row { display: flex; align-items: center; gap: 8px; }
.tb-row > input, .tb-row > select { flex: 1; }
.tb-member { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--tb-line); }
.tb-field-inline { display: flex; align-items: center; gap: 8px; }
.tb-account { max-width: 560px; }
.tb-qr { width: 200px; height: 200px; padding: 10px; border-radius: 10px; background: #fff; animation: tb-pop .4s cubic-bezier(.2, .9, .3, 1.2); }
.tb-code { font: 600 14px ui-monospace, Menlo, monospace; letter-spacing: .04em; word-break: break-all; }
.tb-codes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 12px; border: 1px dashed var(--tb-line); border-radius: 8px; }
.tb-codes .tb-code { animation: tb-rise .4s backwards; animation-delay: calc(var(--i, 0) * 60ms); }
.tb-notice { padding: 10px 12px; border: 1px solid rgba(240, 163, 94, .5); border-radius: 7px; background: rgba(240, 163, 94, .1); color: #ffd9ae; }

/* Bandeaux (usurpation, lecture seule) */
.tb-pill { position: fixed; left: 50%; bottom: 16px; z-index: 90; display: flex; align-items: center; gap: 12px; max-width: 94vw; padding: 9px 14px; border: 1px solid var(--tb-line); border-radius: 999px; background: var(--tb-panel-2); box-shadow: 0 10px 30px rgba(0, 0, 0, .5); font-size: 13px; font-weight: 600; transform: translateX(-50%); animation: tb-bulk-in .4s cubic-bezier(.2, .9, .3, 1.15); }
.tb-pill form { margin: 0; }
.tb-pill-warn { border-color: var(--tb-orange); background: #2a1d0c; color: #ffd9ae; }
body.tb-readonly .tb-add-card, body.tb-readonly .tb-add-list, body.tb-readonly .tb-add-list-form { display: none; }

/* =====================================================================
   Tableaux, kanban et notes : mêmes finitions que l'administration
   ===================================================================== */
[hidden] { display: none !important; }
@keyframes tb-grow { from { transform: scaleX(0); } }
@keyframes tb-late { 50% { box-shadow: 0 0 0 3px rgba(239, 102, 116, .2); } }
@keyframes tb-dash-pulse { 50% { background: rgba(101, 116, 237, .24); } }
@keyframes tb-blink { 50% { opacity: .45; } }
.tb-title-grad { background: linear-gradient(120deg, #fff 35%, #aab6ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tb-confirm-text { margin: 0; }
.tb-avatar { background: hsl(var(--h, 230), 52%, 40%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); }
.tb-avatar-more { background: var(--tb-panel-2); }
.tb-members .tb-avatar { transition: margin .2s, transform .2s; }
.tb-members:hover .tb-avatar { margin-left: 2px; transform: translateY(-1px); }
.tb-members:hover .tb-avatar:first-child { margin-left: 0; }
.tb-nav-link { transition: color .15s, background .15s; }

/* ----- Liste des tableaux ----- */
.tb-board-tile { position: relative; overflow: hidden; gap: 6px; min-height: 150px; background: linear-gradient(160deg, color-mix(in srgb, var(--tile, var(--tb-blue)) 14%, var(--tb-panel)), var(--tb-panel) 62%); transition: transform .2s, border-color .2s, box-shadow .25s; }
.tb-board-tile::after { content: ''; position: absolute; right: -34px; bottom: -34px; width: 110px; height: 110px; border-radius: 50%; background: var(--tile, var(--tb-blue)); opacity: .1; filter: blur(12px); pointer-events: none; transition: opacity .3s, transform .4s; }
.tb-board-tile:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(0, 0, 0, .4); }
.tb-board-tile:hover::after { opacity: .24; transform: scale(1.4); }
.tb-board-tile:active { transform: translateY(-1px) scale(.99); }
.tb-tile-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tb-tile-ic { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: color-mix(in srgb, var(--tile, var(--tb-blue)) 22%, transparent); color: var(--tile, var(--tb-blue)); transition: transform .28s cubic-bezier(.3, 1.5, .5, 1); }
.tb-board-tile:hover .tb-tile-ic { transform: rotate(-8deg) scale(1.12); }
.tb-board-tile .tb-tag { margin-left: 0; }
.tb-tile-meta { font-size: 12px; }
.tb-tile-foot { display: flex; align-items: center; gap: 10px; }
.tb-tile-foot .tb-progress { flex: 1; }
.tb-tile-pct { min-width: 36px; text-align: right; color: #cbd2e7; font: 700 12px 'Space Grotesk', sans-serif; font-variant-numeric: tabular-nums; }
.tb-progress > span { position: relative; overflow: hidden; background: linear-gradient(90deg, #3fb685, #51c995); }
.tb-progress > span::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .35), transparent); transform: translateX(-100%); animation: tb-sheen 2.6s 1.2s infinite; }
.tb-progress.is-full > span { box-shadow: 0 0 10px rgba(81, 201, 149, .6); }
.tb-board-tile .tb-progress > span { transform-origin: left; animation: tb-grow 1s cubic-bezier(.2, .8, .2, 1) backwards; animation-delay: calc(var(--i, 0) * 45ms + 200ms); }
.tb-board-tile .tb-progress > span::after { animation-delay: calc(var(--i, 0) * 45ms + 1.2s); }
.tb-board-tile.tb-board-new { background: transparent; }
.tb-board-tile.tb-board-new::after { display: none; }
.tb-board-new:hover { border-color: var(--tb-blue); background: rgba(101, 116, 237, .08); color: #fff; box-shadow: none; }
.tb-plus { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: rgba(101, 116, 237, .18); color: #9fb2ff; transition: transform .3s cubic-bezier(.3, 1.5, .5, 1), background .2s, color .2s; }
.tb-board-new:hover .tb-plus { transform: rotate(90deg) scale(1.1); background: var(--tb-blue); color: #fff; }
.tb-swatch { transition: transform .15s, border-color .15s, box-shadow .15s; }
.tb-swatch:hover { transform: scale(1.12); }
.tb-swatch.is-active { transform: scale(1.08); }

/* ----- Barre du tableau ----- */
.tb-board-bar { position: relative; z-index: 5; border-bottom: 1px solid rgba(255, 255, 255, .05); background: rgba(6, 8, 33, .35); backdrop-filter: blur(6px); }
.tb-back { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px 6px 8px; border-radius: 8px; color: #9fb2ff; font-weight: 600; transition: background .15s, color .15s, transform .15s; }
.tb-back:hover { background: rgba(255, 255, 255, .07); color: #fff; transform: translateX(-2px); }
.tb-board-title { transition: background .15s; }
.tb-board-prog { display: inline-flex; align-items: center; gap: 8px; padding: 5px 11px; border-radius: 999px; background: rgba(255, 255, 255, .05); }
.tb-board-prog .tb-bar-sm { width: 70px; margin: 0; }
.tb-board-prog-n { color: #cbd2e7; font: 700 12px 'Space Grotesk', sans-serif; font-variant-numeric: tabular-nums; }
.tb-searchbox.tb-searchbox-sm { flex: 0 1 200px; }
.tb-searchbox-sm .tb-search { padding: 7px 10px 7px 34px; font-size: 13px; }
.tb-searchbox-sm .tb-ic { left: 11px; width: 15px; height: 15px; }
.tb-board-bar .tb-skel-bar { margin: 4px 0; }
.tb-reset { animation: tb-pop .22s cubic-bezier(.2, .9, .3, 1.2); }
.tb-select { transition: border-color .15s, box-shadow .15s; }

/* ----- Listes et cartes ----- */
.tb-list { backdrop-filter: blur(4px); transition: border-color .2s, box-shadow .25s, opacity .15s, transform .15s; }
.tb-list:hover { border-color: #2f3a78; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.tb-list.tb-enter { animation: tb-pop .35s cubic-bezier(.2, .9, .3, 1.1); }
.tb-list.dragging { opacity: .4; transform: rotate(1.2deg) scale(.98); }
.tb-list-handle { display: grid; place-items: center; opacity: .35; transition: opacity .15s, color .15s; }
.tb-list-handle .tb-ic { width: 14px; height: 14px; stroke-width: 2.4; }
.tb-list-head:hover .tb-list-handle { opacity: 1; color: #9fb2ff; }
.tb-list-title { transition: background .15s; }
.tb-count { transition: background .2s, color .2s; }
.tb-list:hover .tb-count { background: #232c66; color: #cbd2e7; }
.tb-list-empty { margin: 0; padding: 18px 8px; border: 1px dashed #26345f; border-radius: 8px; color: var(--tb-muted); font-size: 12px; text-align: center; }
.tb-card { transition: transform .15s, border-color .15s, box-shadow .2s, background .15s, opacity .2s; }
.tb-card:hover { transform: translateY(-2px); border-color: #5565dc; background: #182058; box-shadow: 0 10px 22px rgba(0, 0, 0, .4); }
.tb-card:active { transform: scale(.985); }
.tb-card.dragging { opacity: .4; transform: rotate(2.5deg) scale(.97); }
.tb-card.is-new { animation: tb-pop .32s cubic-bezier(.2, .9, .3, 1.15); }
.tb-card.just-done { animation: tb-flash .9s ease; }
.tb-card.just-done .tb-check { animation: tb-check-pop .34s ease; }
.tb-card.is-done { opacity: .78; }
.tb-card.is-done:hover { opacity: 1; }
.tb-label-chip { transition: height .18s, line-height .18s, color .15s; }
.tb-card:hover .tb-label-chip, .tb-card:focus-visible .tb-label-chip { height: 17px; line-height: 17px; color: #fff; text-shadow: 0 1px 1px rgba(0, 0, 0, .35); }
.tb-check { transition: border-color .15s, background .15s, transform .12s; }
.tb-check:hover { transform: scale(1.14); }
.tb-check:active { transform: scale(.9); }
.tb-check .tb-ic { width: 12px; height: 12px; stroke-width: 3.2; }
.tb-badge { display: inline-flex; align-items: center; gap: 4px; }
.tb-badge .tb-ic { width: 12px; height: 12px; }
.tb-due.late { animation: tb-late 2.6s ease-in-out infinite; }
.tb-card-members .tb-avatar { transition: transform .15s; }
.tb-card:hover .tb-card-members .tb-avatar { transform: translateY(-1px); }
.tb-drop-indicator { animation: tb-pop .18s ease, tb-dash-pulse 1.2s ease-in-out infinite; }
.tb-add-card, .tb-add-list { display: flex; align-items: center; gap: 8px; transition: background .15s, color .15s, transform .12s; }
.tb-add-card .tb-ic, .tb-add-list .tb-ic { width: 15px; height: 15px; transition: transform .25s cubic-bezier(.3, 1.5, .5, 1); }
.tb-add-card:hover .tb-ic, .tb-add-list:hover .tb-ic { transform: rotate(90deg); }
.tb-add-card:active, .tb-add-list:active { transform: scale(.98); }
.tb-composer { animation: tb-rise .22s ease; }
.tb-add-list-form { animation: tb-pop .22s cubic-bezier(.2, .9, .3, 1.15); }
.tb-skel-list { flex: 0 0 292px; height: 300px; border-radius: 11px; }
.tb-skel-list-2 { height: 210px; }
.tb-skel-list-3 { height: 260px; }
.tb-skel-line { height: 30px; }
.tb-skel-short { width: 60%; }
.tb-skel-block { height: 120px; }

/* ----- Fiche carte ----- */
.tb-card-detail.is-enter .tb-card-section { animation: tb-rise .4s cubic-bezier(.2, .8, .2, 1) backwards; animation-delay: calc(var(--i, 0) * 50ms); }
.tb-chip { transition: background .18s, border-color .18s, color .18s, transform .12s, box-shadow .18s; }
.tb-chip:active { transform: scale(.95); }
.tb-chip.is-on { box-shadow: 0 4px 14px color-mix(in srgb, var(--chip, #6574ed) 40%, transparent); }
.tb-chip-member { display: inline-flex; align-items: center; }
.tb-pct-sm { min-width: 34px; color: #cbd2e7; font: 700 12px 'Space Grotesk', sans-serif; font-variant-numeric: tabular-nums; }
.tb-checklist li { transition: background .15s; }
.tb-checklist-text { transition: color .2s; }
.tb-checklist .tb-icon-btn { opacity: 0; transition: opacity .15s, background .15s, color .15s, transform .12s; }
.tb-checklist li:hover .tb-icon-btn, .tb-checklist li:focus-within .tb-icon-btn { opacity: 1; }
.tb-checklist .tb-icon-btn:hover { background: rgba(239, 102, 116, .18); color: #ff9aa2; }
@media (hover: none) { .tb-checklist .tb-icon-btn { opacity: 1; } }
.tb-icon-btn .tb-ic { width: 16px; height: 16px; }
.tb-inline-check .tb-cb { flex: 0 0 auto; }
.tb-comment { transition: border-color .18s; }
.tb-comment:hover { border-color: #34417a; }
.tb-comment-head .tb-icon-btn:hover { background: rgba(239, 102, 116, .18); color: #ff9aa2; }
.tb-comments-empty { margin: 0; padding: 14px; border: 1px dashed var(--tb-line); border-radius: 10px; text-align: center; }
.tb-archive-list li, .tb-member-list li { transition: border-color .15s, background .15s; }
.tb-archive-list li:hover, .tb-member-list li:hover { border-color: #34417a; background: #0d1338; }
.tb-arch-title { display: inline-flex; align-items: center; gap: 8px; }
.tb-arch-title .tb-ic { color: var(--tb-muted); }
.tb-label-row .tb-icon-btn:hover { background: rgba(239, 102, 116, .18); color: #ff9aa2; }

/* ----- Notes ----- */
.tb-notes { gap: 16px; }
.tb-notes > .tb-empty { grid-column: 1 / -1; }
.tb-notes-count { min-height: 18px; margin: -8px 0 16px; font-size: 12px; }
.tb-page-actions .tb-searchbox { flex: 0 1 260px; }
.tb-note { position: relative; transition: transform .2s, box-shadow .25s, border-color .2s; }
.tb-note:hover, .tb-note:focus-within { transform: translateY(-3px); border-color: rgba(255, 255, 255, .22); box-shadow: 0 14px 30px rgba(0, 0, 0, .4); }
.tb-note.is-pinned { box-shadow: 0 0 0 1px rgba(240, 163, 94, .3), 0 10px 28px rgba(240, 163, 94, .12); }
.tb-note.is-pinned::before { content: ''; position: absolute; top: -1px; left: 18px; width: 34px; height: 3px; border-radius: 0 0 4px 4px; background: var(--tb-orange); }
.tb-note-new { animation: tb-pop .36s cubic-bezier(.2, .9, .3, 1.15); }
.tb-note.is-leaving { animation: tb-leave .26s ease forwards; }
.tb-note-title, .tb-note-body { border-radius: 6px; transition: background .15s; }
.tb-note-body { line-height: 1.5; }
.tb-pin .tb-ic { transition: transform .28s cubic-bezier(.3, 1.5, .5, 1); }
.tb-pin:hover .tb-ic { transform: rotate(-15deg) scale(1.1); }
.tb-pin.is-on .tb-ic { fill: currentColor; transform: rotate(-20deg); }
.tb-icon-btn.is-danger:hover .tb-ic { transform: scale(1.1); }
.tb-swatch-sm:hover { transform: scale(1.22); }
.tb-note-status { opacity: 0; transition: opacity .2s, color .2s; }
.tb-note-status:not(:empty) { opacity: 1; }
.tb-note-status.is-busy { animation: tb-blink 1s ease-in-out infinite; }
.tb-note-status.is-ok { color: var(--tb-green); }
.tb-note-status.is-err { color: var(--tb-red); }
.tb-skel-note { height: 210px; border-radius: 11px; }

/* ----- Correctifs de taille ----- */
.tb-btn { white-space: nowrap; }
.tb-btn-ic, .tb-page-actions .tb-btn { flex: 0 0 auto; }
.tb-empty .tb-btn { margin-top: 10px; }
.tb-empty .tb-btn .tb-ic { width: 15px; height: 15px; stroke-width: 2; color: inherit; animation: none; }
.tb-page-actions { flex-wrap: wrap; justify-content: flex-end; }
.tb-bar-left { flex: 0 0 auto; }
.tb-bar-right { flex: 1 1 auto; min-width: 0; justify-content: flex-end; flex-wrap: nowrap; }
.tb-bar-right > * { flex: 0 0 auto; }
.tb-bar-right > .tb-searchbox { flex: 0 1 200px; min-width: 130px; }
@media (max-width: 1500px) { .tb-btn-collapse .tb-btn-label { display: none; } .tb-btn-collapse { padding-inline: 10px; } }
@media (max-width: 1000px) { .tb-bar-right { flex-wrap: wrap; } }

/* =====================================================================
   Barre de navigation
   ===================================================================== */
.tb-topbar { gap: 26px; padding: 9px 22px; transition: box-shadow .25s, background .25s; }
.tb-topbar::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: linear-gradient(90deg, transparent, var(--tb-accent), transparent); opacity: .5; pointer-events: none; transition: opacity .3s; }
.tb-topbar.is-scrolled { background: rgba(6, 8, 33, .97); box-shadow: 0 10px 30px rgba(0, 0, 0, .45); }
.tb-topbar.is-scrolled::after { opacity: .9; }

.tb-brand { gap: 10px; letter-spacing: -.01em; transition: opacity .15s; }
.tb-brand-mark { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, #7d8bff, #4b5bd0); box-shadow: 0 4px 14px rgba(101, 116, 237, .45), inset 0 1px 0 rgba(255, 255, 255, .25); transition: transform .3s cubic-bezier(.3, 1.5, .5, 1), box-shadow .25s; }
.tb-brand-mark .tb-ic { width: 17px; height: 17px; stroke-width: 2.2; }
.tb-brand:hover .tb-brand-mark { transform: rotate(-8deg) scale(1.08); box-shadow: 0 6px 20px rgba(101, 116, 237, .65), inset 0 1px 0 rgba(255, 255, 255, .25); }
.tb-brand:active .tb-brand-mark { transform: scale(.94); }

.tb-nav { position: relative; display: flex; gap: 2px; padding: 3px; border: 1px solid var(--tb-line); border-radius: 11px; background: rgba(11, 15, 44, .7); }
.tb-nav-ind { position: absolute; top: 3px; bottom: 3px; left: 0; width: 0; border-radius: 8px; background: linear-gradient(135deg, rgba(101, 116, 237, .32), rgba(75, 91, 208, .22)); box-shadow: inset 0 0 0 1px rgba(125, 139, 255, .4), 0 4px 14px rgba(101, 116, 237, .18); opacity: 0; pointer-events: none; transition: opacity .2s; }
.tb-nav-ind.is-ready { transition: opacity .2s, transform .34s cubic-bezier(.3, .9, .3, 1), width .34s cubic-bezier(.3, .9, .3, 1); }
.tb-nav-link { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px; border-radius: 8px; background: transparent; color: var(--tb-muted); transition: color .2s; }
.tb-nav-link:hover, .tb-nav-link:focus-visible { color: var(--tb-text); background: transparent; }
.tb-nav-link.is-active { color: #fff; background: transparent; }
.tb-nav-link .tb-ic { width: 16px; height: 16px; transition: transform .25s cubic-bezier(.3, 1.5, .5, 1); }
.tb-nav-link:hover .tb-ic { transform: translateY(-1px) scale(1.12); }
.tb-nav-link:focus-visible { outline-offset: -2px; }

.tb-topbar-right { gap: 10px; }
.tb-me-wrap { position: relative; }
.tb-me { display: inline-flex; align-items: center; gap: 9px; padding: 4px 10px 4px 5px; border: 1px solid var(--tb-line); border-radius: 999px; background: rgba(11, 15, 44, .7); color: #cbd2e7; font-weight: 600; transition: border-color .15s, background .15s, box-shadow .15s, transform .12s; }
.tb-me:hover, .tb-me[aria-expanded='true'] { border-color: #34417a; background: #0f1538; color: #fff; }
.tb-me:active { transform: scale(.97); }
.tb-me.is-current { border-color: var(--tb-blue); }
.tb-me-av { width: 28px; height: 28px; border: 0; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16), 0 0 0 2px rgba(6, 8, 33, .9); }
.tb-me-av-lg { width: 38px; height: 38px; font-size: 15px; }
.tb-me-name { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-me-chev { display: inline-grid; color: var(--tb-muted); transition: transform .22s cubic-bezier(.3, 1.4, .5, 1); }
.tb-me-chev .tb-ic { width: 14px; height: 14px; }
.tb-me[aria-expanded='true'] .tb-me-chev { transform: rotate(180deg); }

.tb-usermenu { position: absolute; top: calc(100% + 10px); right: 0; z-index: 130; min-width: 240px; padding: 6px; border: 1px solid var(--tb-line); border-radius: 12px; background: #0d1233; box-shadow: 0 18px 50px rgba(0, 0, 0, .6); transform-origin: top right; animation: tb-pop .18s cubic-bezier(.2, .9, .3, 1.2); }
.tb-usermenu form { margin: 0; }
.tb-usermenu-head { display: flex; align-items: center; gap: 11px; padding: 8px 8px 6px; }
.tb-usermenu-id { display: grid; min-width: 0; flex: 1; line-height: 1.25; }
.tb-usermenu-id strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-usermenu-id small { color: var(--tb-muted); }
.tb-usermenu .tb-tag { margin-left: 0; }
.tb-usermenu .tb-menu-item { text-decoration: none; }
.tb-usermenu .tb-menu-item .tb-ic { width: 16px; height: 16px; }

@media (max-width: 860px) {
  .tb-nav-label { display: none; }
  .tb-nav-link { padding: 8px 12px; }
  .tb-me-name, .tb-me-chev { display: none; }
  .tb-me { padding: 3px; }
}
@media (max-width: 720px) {
  .tb-topbar { gap: 12px; padding: 8px 12px; flex-wrap: nowrap; }
  .tb-brand-name { display: none; }
}
