/* public/css/modals.css — modales, boutons feature/bug, badges device/version, bandeau git, aperçu staging, aide (tranche contiguë de l'ancien style.css ; ordre de chargement dans index.html, cf. CLAUDE.md) */
/* ── Modal ── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  backdrop-filter: blur(3px);
}

.modal-card {
  background: var(--bg2);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0,0,0,0.6);
}

.modal-card-sm { max-width: 360px; }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
}

.modal-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  padding: 0 4px;
  transition: color 0.12s;
}
.modal-close:hover { color: var(--text); }

.modal-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
}

.modal-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  padding: 10px 14px;
  margin-bottom: -1px;
  transition: color 0.12s, border-color 0.12s;
}
.modal-tab:hover { color: var(--text-dim); }
.modal-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

.modal-panel { display: none; padding: 20px; }
.modal-panel.active { display: block; }

.modal-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.5;
}
.modal-hint code { background: var(--bg); padding: 1px 5px; border-radius: 3px; font-size: 11px; }

.modal-field {
  margin-bottom: 14px;
}

.modal-field label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.modal-input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border-light);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.12s;
}
.modal-input:focus { border-color: var(--accent); }
.modal-input-flex { flex: 1; }
.modal-input-error { border-color: var(--red); }

.modal-select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border-light);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  cursor: pointer;
}
.modal-select:focus { border-color: var(--accent); }

.modal-path-row {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color 0.12s;
}
.modal-path-row:focus-within { border-color: var(--accent); }
.modal-path-row .modal-input { border: none; background: transparent; border-radius: 0; }
.modal-path-row .modal-input:focus { border-color: transparent; }

.path-prefix {
  font-size: 12px;
  color: var(--text-muted);
  padding: 8px 6px 8px 10px;
  white-space: nowrap;
  font-family: 'Cascadia Code','Consolas',monospace;
  flex-shrink: 0;
}

.local-path-row {
  display: flex;
  gap: 8px;
}
.local-path-row .modal-input { flex: 1; }

.btn-browse {
  background: var(--bg2);
  border: 1px solid var(--border-light);
  color: var(--text-dim);
  border-radius: var(--radius-sm);
  padding: 0 10px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
}
.btn-browse:hover { border-color: var(--accent); }

.fs-browser {
  margin-top: 8px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--bg2);
  padding: 8px;
}

.fs-breadcrumb {
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 6px;
  word-break: break-all;
}
.fs-breadcrumb-segment { cursor: pointer; }
.fs-breadcrumb-segment:hover { color: var(--accent); text-decoration: underline; }
.fs-breadcrumb-sep { color: var(--text-muted); margin: 0 2px; }

.fs-list {
  max-height: 200px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.fs-list-item {
  padding: 4px 8px;
  font-size: 12px;
  color: var(--text);
  cursor: pointer;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 6px;
}
.fs-list-item:hover { background: var(--bg); }
.fs-list-item-claude { color: var(--text-dim); }
.fs-list-item-parent {
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 4px;
  padding-bottom: 6px;
}
.fs-list-empty {
  font-size: 11px;
  color: var(--text-muted);
  padding: 8px;
  font-style: italic;
}

.fs-browser-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}

.fs-browser-error {
  color: var(--red);
  font-size: 11px;
  margin-top: 4px;
}

.modal-actions {
  margin-top: 20px;
}

.btn-modal-submit {
  width: 100%;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.15s;
}
.btn-modal-submit:hover { opacity: 0.88; }
.btn-modal-submit:disabled { opacity: 0.4; cursor: not-allowed; }

.modal-status {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-muted);
  min-height: 18px;
  line-height: 1.4;
}
.modal-status-ok   { color: var(--green); }
.modal-status-error { color: var(--red); }

/* Diff d'un worktree dans la modale de détail (openWorktreeDiffModal). */
.modal-card.modal-card-wide { max-width: min(1100px, 95vw); width: 95vw; }
.item-modal-text-display.item-modal-diff {
  font-family: 'Cascadia Code', 'Consolas', 'Courier New', monospace; font-size: 11.5px;
  white-space: pre; overflow: auto; max-height: 65vh;
}
.worktree-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.worktree-row-title { flex: 1; min-width: 160px; }
.worktree-row-commit { font-size: 11px; opacity: 0.8; }
.modal-status-warn  { color: var(--yellow); }

.btn-modal-cancel {
  background: var(--bg);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.12s, color 0.12s;
}
.btn-modal-cancel:hover { border-color: var(--accent); color: var(--text); }
.btn-modal-cancel:disabled { opacity: 0.4; cursor: not-allowed; }

/* Modale « Livrer » (chat Idéation, cf. openDeliverModal dans main.js) */
.deliver-body { padding: 16px 20px; }
.deliver-ideas { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; max-height: 45vh; overflow-y: auto; }
.deliver-idea {
  display: flex; align-items: flex-start; gap: 8px; padding: 8px 10px; cursor: pointer;
  border: 1px solid var(--border-light); border-radius: var(--radius-sm); font-size: 13px; line-height: 1.4;
}
.deliver-idea:hover { border-color: var(--accent); }
.deliver-idea input { margin-top: 3px; flex-shrink: 0; }
.deliver-idea-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.deliver-idea-summary { font-size: 12px; color: var(--text-muted); }
.deliver-error {
  margin-top: 10px; padding: 8px 10px; font-size: 12px; line-height: 1.4;
  background: var(--red-dim); color: var(--red); border: 1px solid rgba(239,68,68,0.35); border-radius: var(--radius-sm);
}
.deliver-error[hidden] { display: none; }
.deliver-error-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.deliver-option { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 13px; cursor: pointer; }
.deliver-info {
  margin-top: 10px; padding: 8px 10px; font-size: 12px; line-height: 1.45; color: var(--text-muted);
  background: rgba(245,158,11,0.08); border: 1px solid rgba(245,158,11,0.35); border-radius: var(--radius-sm);
}
.deliver-actions { display: flex; gap: 8px; margin-top: 16px; }
.deliver-actions .btn-modal-submit { flex: 1; width: auto; }

.item-modal-textarea {
  resize: vertical;
  min-height: 100px;
  max-height: 260px;
  line-height: 1.5;
  overflow-y: auto;
  box-sizing: border-box;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
}

.item-modal-text-display {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 12px;
  color: var(--text);
  line-height: 1.6;
  max-height: 260px;
  overflow-y: auto;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  margin: 0;
}

/* ── Code feature button ── */
.btn-code-feature {
  font-size: 9px;
  font-weight: 700;
  padding: 1px 6px;
  border: 1px solid rgba(79,126,248,0.35);
  background: var(--accent-dim);
  color: var(--accent);
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.12s;
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-code-feature:hover { background: rgba(79,126,248,0.25); }

/* ── Bug declare ── */
.bug-declare-wrap {
  display: flex;
  align-items: stretch;
  height: 30px;
  box-sizing: border-box;
  gap: 0;
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

/* Même piège de spécificité que .chat-messages/.chat-pending-indicator : `display: flex`
   (règle auteur) prime sur `[hidden] { display: none }` du user-agent stylesheet à
   spécificité égale — sans cette surcharge, applyIntentionMode() pose bien l'attribut
   `hidden` en mode Idéation mais le bouton "Bug" reste visible (seulement grisé). */
.bug-declare-wrap[hidden] {
  display: none;
}

.btn-bug {
  background: var(--red-dim);
  color: var(--red);
  border: none;
  padding: 0 10px;
  box-sizing: border-box;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.12s;
  white-space: nowrap;
}
.btn-bug:hover { background: rgba(239,68,68,0.2); }
.btn-bug:disabled { opacity: 0.4; cursor: not-allowed; }

.bug-severity-select {
  background: var(--bg2);
  border: none;
  border-left: 1px solid rgba(239,68,68,0.2);
  color: var(--text-muted);
  padding: 0 6px;
  box-sizing: border-box;
  font-size: 11px;
  font-family: inherit;
  cursor: pointer;
  outline: none;
}

/* ── Bug actions ── */
.bug-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  margin-left: auto;
}

.btn-fix-bug {
  font-size: 9px;
  font-weight: 700;
  padding: 1px 6px;
  border: 1px solid rgba(79,126,248,0.35);
  background: var(--accent-dim);
  color: var(--accent);
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.12s;
  white-space: nowrap;
}
.btn-fix-bug:hover { background: rgba(79,126,248,0.25); }
.btn-fix-bug.running {
  background: var(--yellow-dim); color: var(--yellow);
  border-color: rgba(245,158,11,0.45);
  animation: feat-step-blink 0.9s ease-in-out infinite;
  cursor: not-allowed; opacity: 1;
}

.btn-stage-bug {
  font-size: 9px;
  font-weight: 700;
  padding: 1px 6px;
  border: 1px solid rgba(34,197,94,0.4);
  background: rgba(34,197,94,0.08);
  color: var(--green);
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.12s;
  white-space: nowrap;
}
.btn-stage-bug:hover { background: rgba(34,197,94,0.2); }

/* Even when combined with .btn-stage-bug (defined later, same specificity), keep the
   no-env warning look — same gray/dashed treatment as the feature pipeline's ▶ Staging ⚠. */
.btn-stage-bug.btn-feat-noenv {
  border-style: dashed;
  color: var(--text-dim);
  background: rgba(100,116,139,0.08);
  border-color: rgba(100,116,139,0.4);
}
.btn-stage-bug.btn-feat-noenv:hover { background: rgba(100,116,139,0.18); }

.bug-row.bug-fixed .bug-title { color: var(--green); }
.bug-row.bug-fixed .bug-dot { box-shadow: 0 0 0 2px rgba(34,197,94,0.3); }

.bug-row.bug-staging .bug-title { color: var(--accent); }
.bug-row.bug-staging .bug-dot { box-shadow: 0 0 0 2px rgba(79,126,248,0.35); }

.btn-prod-bug {
  font-size: 9px;
  font-weight: 700;
  padding: 1px 6px;
  border: 1px solid rgba(251,191,36,0.45);
  background: rgba(251,191,36,0.08);
  color: var(--yellow);
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.12s;
  white-space: nowrap;
}
.btn-prod-bug:hover { background: rgba(251,191,36,0.2); }

.btn-toggle-bug {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border: 1px solid var(--border-light);
  background: none;
  color: var(--text-muted);
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.12s;
}
.btn-toggle-bug:hover { border-color: var(--green); color: var(--green); }

/* Questions section */
.detail-questions { display: flex; flex-direction: column; gap: 4px; }

.decision-row { display: flex; align-items: center; gap: 7px; padding: 3px 0; }

.decision-title { flex: 1; font-size: 11px; color: var(--text-dim); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.decision-title:hover { color: var(--purple); }
.decision-summary { font-size: 10px; color: var(--text-muted); flex-shrink: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 40%; }

.btn-decision-confirm {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border: 1px solid var(--border-light);
  background: none;
  color: var(--text-muted);
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.12s;
  flex-shrink: 0;
  white-space: nowrap;
}
.btn-decision-confirm:hover { border-color: var(--green); color: var(--green); }

/* env-startable on pill (overrides table cell version) */
.env-pill.env-startable {
  cursor: pointer;
  transition: filter 0.15s, transform 0.1s;
}
.env-pill.env-startable:hover {
  filter: brightness(1.3);
  transform: scale(1.05);
}

/* ── Device badge (Local pill for projectType 'app') ── */
.env-pill.device-ready         { background: var(--green-dim);  color: var(--green);  border-color: rgba(34,197,94,0.25); }
.env-pill.device-unauthorized,
.env-pill.device-offline       { background: var(--yellow-dim); color: var(--yellow);  border-color: rgba(245,158,11,0.25); }
.env-pill.device-not-connected { background: var(--red-dim);    color: var(--red);     border-color: rgba(239,68,68,0.25); }
.env-pill.device-tool-missing  { background: rgba(148,163,184,0.12); color: var(--text-muted); border-color: rgba(148,163,184,0.25); }
.env-pill.device-clickable {
  cursor: pointer;
  transition: filter 0.15s, transform 0.1s;
}
.env-pill.device-clickable:hover {
  filter: brightness(1.3);
  transform: scale(1.05);
}

/* ── Bug version tag ── */
.bug-version-tag {
  font-size: 9px;
  font-family: 'Cascadia Code', 'Consolas', monospace;
  color: var(--purple);
  background: rgba(167,139,250,0.12);
  border: 1px solid rgba(167,139,250,0.2);
  border-radius: 8px;
  padding: 1px 5px;
  flex-shrink: 0;
}

/* ── Feature done button ── */
.btn-feature-done {
  font-size: 9px;
  font-weight: 700;
  padding: 1px 6px;
  border: 1px solid rgba(34,197,94,0.4);
  background: var(--green-dim);
  color: var(--green);
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.12s;
  white-space: nowrap;
  margin-left: 3px;
}
.btn-feature-done:hover { background: rgba(34,197,94,0.25); }
.btn-feature-done:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── Versioning simplified ── */
.version-note {
  font-size: 10px;
  color: var(--text-muted);
  font-style: italic;
  margin: 4px 0;
}

.btn-version-major {
  background: linear-gradient(135deg, var(--accent), var(--purple));
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.15s, transform 0.1s;
  white-space: nowrap;
}
.btn-version-major:hover { opacity: 0.88; }
.btn-version-major:active { transform: scale(0.97); }

.version-drift strong { color: var(--yellow) !important; }

/* ── Git pending banner ── */
.git-pending-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  margin: 6px 0;
  background: rgba(245,158,11,0.08);
  border: 1px solid rgba(245,158,11,0.25);
  border-radius: var(--radius-sm);
  font-size: 11px;
}

.git-pending-icon { font-size: 13px; flex-shrink: 0; }

.git-pending-text {
  color: var(--yellow);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-push-staging {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 10px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.12s;
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-push-staging:hover { opacity: 0.85; }

/* ── Staging files preview ── */
.staging-files-preview {
  font-family: 'Cascadia Code', 'Consolas', monospace;
  font-size: 10px;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  max-height: 120px;
  overflow-y: auto;
  white-space: pre;
  margin: 0;
}

/* ── Help button ── */
.btn-help {
  background: none;
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 600;
  transition: all 0.15s;
  font-family: inherit;
}
.btn-help:hover { border-color: var(--accent); color: var(--accent); }

/* ── Help Modal ── */
.modal-card-help {
  max-width: 760px;
  width: 95vw;
}

.help-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-height: 80vh;
  overflow-y: auto;
}

.spec-modal-body {
  padding: 24px;
  max-height: 80vh;
  overflow-y: auto;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-dim);
}
.spec-modal-body h3, .spec-modal-body h4, .spec-modal-body h5 {
  color: var(--text);
  margin: 16px 0 8px;
}
.spec-modal-body h3:first-child, .spec-modal-body h4:first-child, .spec-modal-body h5:first-child {
  margin-top: 0;
}
.spec-modal-body p {
  margin: 0 0 12px;
}
.spec-modal-body ul {
  margin: 0 0 12px;
  padding-left: 20px;
}
.spec-modal-body li {
  margin: 2px 0;
}
.spec-modal-body pre {
  background: var(--bg2);
  border-radius: 6px;
  padding: 10px 12px;
  overflow-x: auto;
  margin: 0 0 12px;
}
.spec-modal-body code {
  font-family: 'SFMono-Regular', Consolas, Menlo, monospace;
  font-size: 12px;
}
.spec-modal-error {
  color: var(--red);
}

/* Features list modal */
.features-list-modal-body {
  padding: 16px 24px;
  max-height: 65vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.features-list-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border-light);
}
.features-list-row:last-child {
  border-bottom: none;
}
.features-list-title {
  flex: 1;
  min-width: 100px;
  color: var(--text-dim);
  font-size: 12px;
  cursor: pointer;
}
.features-list-title:hover {
  color: var(--accent);
  text-decoration: underline;
}
.questions-list-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border-light);
}
.questions-list-row:last-child {
  border-bottom: none;
}
.questions-list-title {
  flex: 1;
  min-width: 100px;
  color: var(--text-dim);
  font-size: 12px;
  cursor: pointer;
}
.questions-list-title:hover {
  color: var(--purple);
  text-decoration: underline;
}
.bugs-list-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border-light);
}
.bugs-list-row:last-child {
  border-bottom: none;
}
.bugs-list-title {
  flex: 1;
  min-width: 100px;
  color: var(--text-dim);
  font-size: 12px;
  cursor: pointer;
}
.bugs-list-title:hover {
  color: var(--red);
  text-decoration: underline;
}
.list-row-date {
  font-size: 10px;
  color: var(--text-muted);
  flex-shrink: 0;
  white-space: nowrap;
  font-family: 'Cascadia Code', 'Consolas', monospace;
}
.features-list-modal-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 12px 24px;
  border-top: 1px solid var(--border-light);
}
.features-list-page-indicator {
  font-size: 12px;
  color: var(--text-muted);
  font-family: 'Cascadia Code', 'Consolas', monospace;
}
.features-list-nav-btn {
  background: var(--bg2);
  border: 1px solid var(--border-light);
  color: var(--text-dim);
  border-radius: var(--radius-sm);
  padding: 6px 14px;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.12s, color 0.12s;
}
.features-list-nav-btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}
.features-list-nav-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

/* Pipeline banner */
.help-pipeline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  flex-wrap: wrap;
}

.help-pipe-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 18px;
  border-radius: var(--radius);
  min-width: 100px;
  border: 1px solid transparent;
}

.help-pipe-icon { font-size: 20px; }
.help-pipe-label { font-size: 11px; font-weight: 700; letter-spacing: 0.5px; }
.help-pipe-sub { font-size: 10px; color: var(--text-muted); }

.help-pipe-spec    { background: rgba(167,139,250,0.1); border-color: rgba(167,139,250,0.25); color: var(--purple); }
.help-pipe-dev     { background: rgba(79,126,248,0.1);  border-color: rgba(79,126,248,0.25);  color: var(--accent); }
.help-pipe-staging { background: rgba(245,158,11,0.1);  border-color: rgba(245,158,11,0.25);  color: var(--yellow); }
.help-pipe-prod    { background: rgba(34,197,94,0.1);   border-color: rgba(34,197,94,0.25);   color: var(--green); }

.help-pipe-arrow { color: var(--text-muted); font-size: 18px; margin: 0 4px; }

/* Sections */
.help-sections { display: flex; flex-direction: column; gap: 24px; }

.help-section {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  background: var(--bg);
}

.help-section-release { background: rgba(34,197,94,0.04); border-color: rgba(34,197,94,0.2); }

.help-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.help-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 2px 7px;
  border-radius: 4px;
}
.help-badge-feature { background: rgba(79,126,248,0.15); color: var(--accent); }
.help-badge-bug     { background: rgba(239,68,68,0.15);  color: var(--red); }
.help-badge-release { background: rgba(34,197,94,0.15);  color: var(--green); }

/* Steps */
.help-steps { display: flex; flex-direction: column; gap: 12px; }

.help-step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.help-step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg2);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.help-step-body { flex: 1; }

.help-step-title {
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
  margin-bottom: 3px;
}

.help-step-body p {
  font-size: 12px;
  color: var(--text-dim);
  margin: 2px 0;
}

.help-step-result {
  color: var(--text-muted) !important;
  font-size: 11px !important;
  margin-top: 4px !important;
}

.help-step-body code {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 5px;
  font-size: 10px;
  font-family: 'Cascadia Code', 'Consolas', monospace;
  color: var(--text-dim);
}

/* Help modal — reference list of feature badges (Local/Staging/Prod/Terminé/Annulé) */
.help-badges-ref { display: flex; flex-direction: column; gap: 10px; }
.help-badge-row { display: flex; gap: 12px; align-items: flex-start; }
.help-badge-row .feat-env-tag { flex-shrink: 0; margin-top: 2px; font-size: 10px; padding: 2px 7px; }
.help-badge-row p { font-size: 12px; color: var(--text-dim); margin: 0; }
.help-badge-row code {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 3px;
  padding: 1px 5px; font-size: 10px; font-family: 'Cascadia Code', 'Consolas', monospace;
  color: var(--text-dim);
}
.help-noenv-warn { color: var(--text-dim); font-weight: 700; }

/* Help modal — ASCII architecture diagrams (section ARCHITECTURE). Scroll horizontally
   rather than wrap: a wrapped box-drawing line breaks the whole diagram on phones. */
.help-diagram {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 6px;
  padding: 10px 12px; margin: 8px 0; overflow-x: auto; white-space: pre;
  font-family: 'Cascadia Code', 'Consolas', monospace; font-size: 11px; line-height: 1.35;
  color: var(--text-dim);
}
.help-soon {
  font-size: 9px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase;
  padding: 1px 6px; border-radius: 3px; margin-left: 6px; vertical-align: middle;
  background: rgba(245,158,11,0.15); color: var(--yellow);
}

/* Inline status badges */
.badge-inline {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  letter-spacing: 0.3px;
}
.badge-inline.spec    { background: rgba(167,139,250,0.15); color: var(--purple); }
.badge-inline.dev     { background: rgba(79,126,248,0.15);  color: var(--accent); }
.badge-inline.staging { background: rgba(245,158,11,0.15);  color: var(--yellow); }
.badge-inline.done    { background: rgba(34,197,94,0.15);   color: var(--green); }
.decision-status-open     { background: rgba(167,139,250,0.15); color: var(--purple); }
.decision-status-answered { background: rgba(79,126,248,0.15);  color: var(--accent); }
.decision-status-closed   { background: rgba(34,197,94,0.15);   color: var(--green); cursor: pointer; }
.decision-status-closed:hover { filter: brightness(1.2); }

/* Decision detail modal */
.decision-modal-field { margin-bottom: 10px; }
.decision-modal-field strong { display: block; font-size: 11px; color: var(--text-muted); margin-bottom: 2px; }
.decision-modal-field p { font-size: 13px; color: var(--text); margin: 0; white-space: pre-wrap; word-break: break-word; }
.decision-modal-spec-link { display: inline-block; margin-bottom: 10px; font-size: 12px; color: var(--purple); text-decoration: none; cursor: pointer; }
.decision-modal-spec-link:hover { text-decoration: underline; }

