/* Page « Bugs et idées » (classes tk-). Variables NeonWave avec valeurs de repli. */
.tk-wrap { min-width: 0; max-width: 100%; }
.tk-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.tk-head h1 { margin-bottom: 2px; }
.tk-head-a { display: flex; gap: 8px; align-items: center; }
.tk-addcol[hidden] { display: none; }
.tk-addcol { padding: 10px; border: 1px dashed var(--nw-border-strong, rgba(255,255,255,.28)); border-radius: var(--nw-r-sm, 14px); }
.tk-sp { flex: 1; }
.tk-faint { color: var(--nw-text-4, rgba(255,255,255,.48)); font-size: 12px; }
.tk-hide { display: none !important; }

/* Barre d'outils */
.tk-toolbar { display: flex; flex-direction: column; gap: 10px; margin: 14px 0; }
.tk-search { display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--nw-border, rgba(255,255,255,.09)); border-radius: var(--nw-r-xs, 10px); background: var(--nw-solid-2, #18181f); max-width: 460px; }
.tk-search span { color: var(--nw-text-3, rgba(255,255,255,.58)); }
.tk-search .tk-in { border: 0; background: transparent; box-shadow: none; padding: 9px 0; width: 100%; outline: none; }
.tk-chips-row { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.tk-grp { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tk-grp-l { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--nw-text-4, rgba(255,255,255,.48)); margin-right: 2px; }
.tk-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tk-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: var(--nw-r-pill, 999px); border: 1px solid var(--nw-border, rgba(255,255,255,.09)); background: var(--nw-glass-1, rgba(255,255,255,.04)); color: var(--nw-text-2, rgba(255,255,255,.72)); font-size: 12.5px; cursor: pointer; transition: background var(--nw-fast, 140ms), border-color var(--nw-fast, 140ms); }
.tk-chip:hover { background: var(--nw-glass-2, rgba(255,255,255,.07)); }
.tk-chip.on { background: var(--nw-accent-soft, rgba(91,134,220,.14)); border-color: var(--nw-accent, #5b86dc); color: var(--nw-text-1, rgba(255,255,255,.95)); }
.tk-chip i { font-style: normal; font-size: 11px; opacity: .65; }

/* Tableau : défile horizontalement dans son conteneur, jamais la page */
.tk-board { display: flex; gap: 14px; overflow-x: auto; overflow-y: hidden; padding-bottom: 10px; width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; align-items: flex-start; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.tk-board.tk-is-dragging { scroll-snap-type: none; }
.tk-col { flex: 0 0 290px; width: 290px; box-sizing: border-box; background: var(--nw-solid-1, #15181c); border: 1px solid var(--nw-border, rgba(255,255,255,.09)); border-radius: var(--nw-r-sm, 14px); padding: 10px; min-width: 0; scroll-snap-align: start; transition: border-color var(--nw-fast, 140ms), background var(--nw-fast, 140ms), box-shadow var(--nw-fast, 140ms); }
.tk-col-h { cursor: grab; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.tk-col-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-col-edit { padding: 4px 8px; font-size: 13px; font-weight: 600; min-width: 0; flex: 1; }
.tk-addcol { flex: 0 0 290px; width: 290px; box-sizing: border-box; scroll-snap-align: start; display: flex; flex-direction: column; gap: 8px; }
.tk-addcol-b { width: 100%; padding: 12px; border-radius: var(--nw-r-sm, 14px); border: 1px dashed var(--nw-border-strong, rgba(255,255,255,.28)); background: transparent; color: var(--nw-text-2, rgba(255,255,255,.72)); font-size: 13px; cursor: pointer; }
.tk-addcol-b:hover { background: var(--nw-glass-2, rgba(255,255,255,.07)); color: var(--nw-text-1, rgba(255,255,255,.95)); }
.tk-addcol-act { display: flex; gap: 8px; }
.tk-col.tk-over { border-color: var(--nw-accent, #5b86dc); background: var(--nw-accent-soft, rgba(91,134,220,.14)); box-shadow: 0 0 0 2px var(--nw-accent-soft, rgba(91,134,220,.14)); }
.tk-col-h { display: flex; align-items: center; gap: 8px; padding: 2px 4px 10px; }
.tk-col-h b { font-size: 13px; color: var(--nw-text-1, rgba(255,255,255,.95)); }
.tk-count { font-size: 11px; padding: 1px 8px; border-radius: 999px; background: var(--nw-glass-2, rgba(255,255,255,.07)); color: var(--nw-text-2, rgba(255,255,255,.72)); }
.tk-add { margin-left: auto; width: 26px; height: 26px; padding: 0; line-height: 1; border-radius: 8px; font-size: 16px; flex: none; }
.tk-col-h .tk-more { width: 26px; height: 26px; }
.tk-cards { display: flex; flex-direction: column; gap: 10px; min-height: 70px; max-height: 72vh; overflow-y: auto; padding: 2px; overscroll-behavior: contain; }
.tk-empty { margin: 8px 4px; font-size: 12px; color: var(--nw-text-4, rgba(255,255,255,.48)); text-align: center; border: 1px dashed var(--nw-border, rgba(255,255,255,.09)); border-radius: var(--nw-r-xs, 10px); padding: 18px 8px; }
/* Emplacement fantôme (carte ou colonne) et copie flottante pendant le glisser */
.tk-ph { min-height: 40px; box-sizing: border-box; border-radius: var(--nw-r-xs, 10px); border: 2px dashed var(--nw-accent, #5b86dc); background: var(--nw-accent-soft, rgba(91,134,220,.14)); flex: none; }
.tk-col-ph { flex: 0 0 290px; box-sizing: border-box; border-radius: var(--nw-r-sm, 14px); border: 2px dashed var(--nw-accent, #5b86dc); background: var(--nw-accent-soft, rgba(91,134,220,.14)); scroll-snap-align: start; }
.tk-lifted { display: none !important; }
.tk-ghost { position: fixed; left: 0; top: 0; z-index: 600; margin: 0; pointer-events: none; opacity: .96; cursor: grabbing; box-shadow: 0 18px 40px rgba(0,0,0,.5), 0 0 0 1px var(--nw-accent, #5b86dc); transform-origin: 50% 40%; will-change: transform; transition: none; max-height: 80vh; overflow: hidden; }
.tk-ghost .tk-cards { max-height: 60vh; }
body.tk-body-drag { user-select: none; -webkit-user-select: none; cursor: grabbing; }

/* Cartes */
.tk-card { position: relative; background: var(--nw-solid-2, #18181f); border: 1px solid var(--nw-border, rgba(255,255,255,.09)); border-left: 3px solid var(--nw-border-strong, rgba(255,255,255,.28)); border-radius: var(--nw-r-xs, 10px); padding: 10px 11px; cursor: grab; box-shadow: var(--nw-shadow-1, 0 4px 16px rgba(0,0,0,.28)); transition: transform var(--nw-fast, 140ms), border-color var(--nw-fast, 140ms), opacity var(--nw-fast, 140ms); outline: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; touch-action: pan-x pan-y; }
.tk-card:hover, .tk-card:focus-visible { border-color: var(--nw-border-strong, rgba(255,255,255,.28)); transform: translateY(-1px); }
.tk-card:focus-visible { box-shadow: 0 0 0 2px var(--nw-accent, #5b86dc); }
.tk-card:active { cursor: grabbing; }
.tk-card.tk-dragging { opacity: .35; }
.tk-card.tk-rejected { opacity: .6; }
.tk-sev-crit { border-left-color: var(--nw-danger, #f87171); }
.tk-sev-high { border-left-color: #fb923c; }
.tk-sev-mid { border-left-color: var(--nw-warn, #eab308); }
.tk-sev-low { border-left-color: var(--nw-accent, #5b86dc); }
.tk-card-top { display: flex; gap: 6px; align-items: flex-start; }
.tk-card-title { flex: 1; font-size: 13.5px; line-height: 1.35; color: var(--nw-text-1, rgba(255,255,255,.95)); font-weight: 500; }
.tk-more { flex: none; width: 28px; height: 28px; padding: 0; border-radius: 8px; line-height: 1; font-size: 16px; border: 1px solid transparent; background: transparent; color: var(--nw-text-3, rgba(255,255,255,.58)); cursor: pointer; }
.tk-more:hover { background: var(--nw-glass-2, rgba(255,255,255,.07)); color: var(--nw-text-1, rgba(255,255,255,.95)); }
.tk-tags { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0 6px; align-items: center; }
.tk-card-foot { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--nw-text-3, rgba(255,255,255,.58)); flex-wrap: wrap; }
.tk-age { color: var(--nw-text-4, rgba(255,255,255,.48)); }

/* Pastilles */
.tk-b { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 500; line-height: 18px; white-space: nowrap; background: var(--nw-glass-2, rgba(255,255,255,.07)); color: var(--nw-text-2, rgba(255,255,255,.72)); }
.tk-b-bug { background: rgba(248,113,113,.16); color: var(--nw-danger, #f87171); }
.tk-b-idea { background: var(--nw-accent-soft, rgba(91,134,220,.14)); color: var(--nw-accent, #5b86dc); }
.tk-b-src { background: var(--nw-glass-2, rgba(255,255,255,.07)); }
.tk-b-sev-crit { background: rgba(248,113,113,.2); color: var(--nw-danger, #f87171); }
.tk-b-sev-high { background: rgba(251,146,60,.18); color: #fb923c; }
.tk-b-sev-mid { background: rgba(234,179,8,.16); color: var(--nw-warn, #eab308); }
.tk-b-sev-low { background: var(--nw-glass-2, rgba(255,255,255,.07)); color: var(--nw-text-2, rgba(255,255,255,.72)); }
.tk-b-pr { background: rgba(169,158,245,.18); color: #a99ef5; }
.tk-b-rel-eval { background: var(--nw-locked, rgba(234,179,8,.18)); color: var(--nw-warn, #eab308); }
.tk-b-rel-ok { background: rgba(34,197,94,.16); color: var(--nw-ok, #22c55e); }
.tk-b-rel-no { background: rgba(248,113,113,.16); color: var(--nw-danger, #f87171); }

.tk-note { margin: 10px 2px 0; font-size: 12px; color: var(--nw-text-4, rgba(255,255,255,.48)); }

/* Menu maison de colonne (⋯) */
.tk-menu { position: fixed; z-index: 400; min-width: 180px; padding: 6px; background: var(--nw-solid-3, #1f1f2a); border: 1px solid var(--nw-border-strong, rgba(255,255,255,.28)); border-radius: var(--nw-r-xs, 10px); box-shadow: var(--nw-shadow-3, 0 16px 48px rgba(0,0,0,.45)); display: flex; flex-direction: column; gap: 2px; }
.tk-menu-h { padding: 4px 10px 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--nw-text-4, rgba(255,255,255,.48)); }
.tk-menu button { text-align: left; border: 0; background: transparent; padding: 9px 10px; border-radius: 8px; color: var(--nw-text-1, rgba(255,255,255,.95)); font-size: 13px; cursor: pointer; }
.tk-menu button:hover { background: var(--nw-glass-3, rgba(255,255,255,.1)); }
.tk-menu button.on { color: var(--nw-accent, #5b86dc); }
.tk-menu button.tk-danger { color: var(--nw-danger, #f87171); }
.tk-menu button.tk-off { opacity: .45; cursor: not-allowed; }

/* Fiche détaillée (dans la modale existante) */
.mbox.tk-modal { width: min(920px, 96vw); max-width: 96vw; max-height: 92vh; overflow-y: auto; padding: 0; box-sizing: border-box; }
.mbox.tk-modal.tk-mid { width: min(620px, 96vw); }
.mbox.tk-modal.tk-small { width: min(460px, 96vw); padding: 20px; }
.tk-dh { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 22px 8px; position: sticky; top: 0; z-index: 2; background: var(--nw-solid-2, #18181f); }
.tk-dh-main { min-width: 0; }
.tk-dh .tk-tags { margin-top: 0; }
.tk-dtitle { margin: 6px 0 0; font-size: 19px; line-height: 1.3; color: var(--nw-text-1, rgba(255,255,255,.95)); }
.tk-dbody { padding: 6px 22px 16px; display: flex; flex-direction: column; gap: 14px; }
.tk-sec { border: 1px solid var(--nw-border, rgba(255,255,255,.09)); background: var(--nw-solid-1, #15181c); border-radius: var(--nw-r-sm, 14px); padding: 14px 16px; min-width: 0; }
.tk-sec h3 { margin: 0 0 10px; font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--nw-text-3, rgba(255,255,255,.58)); }
.tk-sub { margin: 12px 0 4px; font-size: 12px; color: var(--nw-text-3, rgba(255,255,255,.58)); font-weight: 600; }
.tk-p { margin: 0 0 8px; line-height: 1.55; color: var(--nw-text-2, rgba(255,255,255,.72)); font-size: 13.5px; }
.tk-kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 8px 0 0; font-size: 13px; }
.tk-kv dt { color: var(--nw-text-4, rgba(255,255,255,.48)); }
.tk-kv dd { margin: 0; color: var(--nw-text-1, rgba(255,255,255,.95)); overflow-wrap: anywhere; }
.tk-ol, .tk-ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 5px; font-size: 13.5px; color: var(--nw-text-2, rgba(255,255,255,.72)); line-height: 1.5; }
.tk-pre { margin: 0; padding: 12px; background: var(--nw-bg-deep, #0b0d10); border: 1px solid var(--nw-border, rgba(255,255,255,.09)); border-radius: var(--nw-r-xs, 10px); font: 12px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: #fca5a5; overflow-x: auto; white-space: pre; max-width: 100%; }

/* Parcours utilisateur */
.tk-tl { list-style: none; margin: 0; padding: 0 0 0 6px; position: relative; display: flex; flex-direction: column; gap: 0; }
.tk-tl::before { content: ""; position: absolute; left: 11px; top: 8px; bottom: 8px; width: 2px; background: var(--nw-border, rgba(255,255,255,.09)); }
.tk-tl li { position: relative; display: grid; grid-template-columns: 22px 66px 66px 1fr; gap: 6px; align-items: baseline; padding: 6px 0; font-size: 13px; }
.tk-tl i { width: 11px; height: 11px; border-radius: 50%; background: var(--nw-text-4, rgba(255,255,255,.48)); border: 2px solid var(--nw-solid-1, #15181c); justify-self: center; align-self: center; position: relative; z-index: 1; }
.tk-tl time { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; color: var(--nw-text-4, rgba(255,255,255,.48)); }
.tk-tl-k { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--nw-text-3, rgba(255,255,255,.58)); }
.tk-tl-t { color: var(--nw-text-1, rgba(255,255,255,.95)); overflow-wrap: anywhere; }
.tk-tl-click i { background: var(--nw-accent, #5b86dc); }
.tk-tl-api i { background: #a99ef5; }
.tk-tl-resp i { background: var(--nw-ok, #22c55e); }
.tk-tl-error i { background: var(--nw-danger, #f87171); box-shadow: 0 0 0 3px rgba(248,113,113,.25); }
.tk-tl-error .tk-tl-t, .tk-tl-error .tk-tl-k { color: var(--nw-danger, #f87171); }

/* Conversation, pertinence, commentaires */
.tk-chat-meta { font-size: 12px; color: var(--nw-text-4, rgba(255,255,255,.48)); margin-bottom: 8px; font-family: ui-monospace, Menlo, Consolas, monospace; }
.tk-chat { display: flex; flex-direction: column; gap: 8px; }
.tk-msg { max-width: 82%; padding: 8px 12px; border-radius: 14px; font-size: 13px; line-height: 1.45; }
.tk-msg b { display: block; font-size: 11px; margin-bottom: 2px; opacity: .7; }
.tk-msg p { margin: 0; }
.tk-msg-u { align-self: flex-start; background: var(--nw-glass-2, rgba(255,255,255,.07)); border-top-left-radius: 4px; }
.tk-msg-b { align-self: flex-end; background: var(--nw-accent-soft, rgba(91,134,220,.14)); border-top-right-radius: 4px; }
.tk-rel { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tk-com { padding: 8px 0; border-bottom: 1px solid var(--nw-border, rgba(255,255,255,.09)); }
.tk-com b { margin-right: 8px; font-size: 13px; }
.tk-com p { margin: 4px 0 0; font-size: 13.5px; color: var(--nw-text-2, rgba(255,255,255,.72)); }
.tk-addcom { display: flex; gap: 8px; margin-top: 12px; }
.tk-addcom .tk-in { flex: 1; min-width: 0; }

/* Formulaires et barre d'actions */
.tk-in { box-sizing: border-box; width: 100%; padding: 9px 11px; border-radius: var(--nw-r-xs, 10px); border: 1px solid var(--nw-border, rgba(255,255,255,.09)); background: var(--nw-solid-2, #18181f); color: var(--nw-text-1, rgba(255,255,255,.95)); font: inherit; font-size: 13.5px; }
.tk-in:focus { outline: none; border-color: var(--nw-accent, #5b86dc); box-shadow: 0 0 0 3px var(--nw-accent-soft, rgba(91,134,220,.14)); }
textarea.tk-in { resize: vertical; min-height: 70px; }
.tk-lab { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--nw-text-3, rgba(255,255,255,.58)); }
.tk-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 22px 38px; margin-bottom: -20px; position: sticky; bottom: -20px; /* couvre le padding bas de .mbody */ background: var(--nw-solid-2, #18181f); border-top: 1px solid var(--nw-border, rgba(255,255,255,.09)); }
.mbox.tk-small .tk-actions { padding: 14px 0 0; position: static; border: 0; }

@media (max-width: 760px) {
  .tk-board { scroll-snap-type: x mandatory; scroll-padding-left: 2px; }
  .tk-board.tk-is-dragging { scroll-snap-type: none; }
  .tk-col, .tk-addcol, .tk-col-ph { flex: 0 0 82vw; width: 82vw; max-width: 82vw; scroll-snap-align: start; }
  .tk-col-ph { width: 82vw; }
  .tk-cards { max-height: 62vh; }
  .tk-grp { width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; }
  .tk-chip { flex: none; }
  .tk-head-a { width: 100%; }
  .tk-new, .tk-newcol { flex: 1; }
  .tk-dh, .tk-dbody, .tk-actions { padding-left: 14px; padding-right: 14px; }
  .tk-tl li { grid-template-columns: 18px 58px 1fr; }
  .tk-tl-k { display: none; }
  .tk-kv { grid-template-columns: 1fr; gap: 0; }
  .tk-kv dt { margin-top: 6px; font-size: 11.5px; }
  .tk-msg { max-width: 94%; }
  .tk-actions button { flex: 1 1 auto; }
  .tk-actions .tk-sp { display: none; }
}

/* Statistiques en tête de page */
.tk-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.tk-stat { display: grid; gap: 2px; padding: 12px 14px; border-radius: 12px; background: var(--cx-card); border: 1px solid var(--cx-border); min-width: 0; }
.tk-stat[title] { cursor: help; }
.tk-stat span { font-size: 12px; color: var(--cx-muted); text-transform: uppercase; letter-spacing: .03em; }
.tk-stat b { font-size: 22px; font-weight: 700; color: var(--cx-fg); line-height: 1.25; }
.tk-stat small { font-size: 12px; color: var(--cx-faint); }
.tk-stat em { font-style: normal; color: #f0707a; font-weight: 600; }
.tk-stat-bad { border-color: rgba(240, 112, 122, .45); }
.tk-stat-ok b { color: #4ade80; }
@media (max-width: 1100px) { .tk-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .tk-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tk-stat b { font-size: 19px; } }
