/* public/css/base.css — variables, Header, Main, cartes projets, formulaire et liste des intentions, panneaux de détails, grille d'environnements, compteurs, sortie des runs (tranche contiguë de l'ancien style.css ; ordre de chargement dans index.html, cf. CLAUDE.md) */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0d0f1a;
  --bg2: #131624;
  --card: #181b2e;
  --card-hover: #1e2138;
  --border: #252840;
  --border-light: #2e3252;
  --accent: #4f7ef8;
  --accent-dim: rgba(79, 126, 248, 0.15);
  --green: #22c55e;
  --green-dim: rgba(34, 197, 94, 0.15);
  --red: #ef4444;
  --red-dim: rgba(239, 68, 68, 0.12);
  --yellow: #f59e0b;
  --yellow-dim: rgba(245, 158, 11, 0.15);
  --purple: #a78bfa;
  --text: #e2e8f0;
  --text-muted: #64748b;
  --text-dim: #94a3b8;
  --radius: 10px;
  --radius-sm: 6px;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

.layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Header ── */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo {
  font-size: 28px;
  color: var(--accent);
  line-height: 1;
}

.header h1 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.3px;
  color: var(--text);
}

.subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 1px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.clock {
  font-size: 13px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.btn-refresh {
  background: none;
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  width: 32px;
  height: 32px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.btn-refresh:hover { border-color: var(--accent); color: var(--accent); }

.refresh-icon {
  font-size: 16px;
  display: inline-block;
  transition: transform 0.5s;
}

.refreshing .refresh-icon { animation: spin 0.6s linear; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Main ── */
.main {
  flex: 1;
  padding: 28px;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.section-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
}

/* ── Project Cards ── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 14px;
}

.project-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s, background 0.15s;
}

.project-card:hover { border-color: var(--border-light); background: var(--card-hover); }

/* Projet sélectionné dans #intention-project (ou via le sélecteur de la vue Rendu) : même
   modèle que les liserés des blocs surlignés (border-left 3px coloré), contour vert en plus.
   Vaut pour la carte repliée comme dépliée ; résiste au :hover. */
.project-card.project-card--selected,
.project-card.project-card--selected:hover {
  border-color: rgba(34, 197, 94, 0.55);
  border-left: 3px solid var(--green);
}

.project-card.skeleton {
  height: 180px;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
}

.card-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.card-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
}

.card-stack {
  font-size: 11px;
  color: var(--accent);
  margin-top: 4px;
  opacity: 0.8;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 5px;
}

.status-dot.up { background: var(--green); box-shadow: 0 0 6px var(--green); }
.status-dot.down { background: var(--text-muted); }
.status-dot.partial { background: var(--yellow); box-shadow: 0 0 6px var(--yellow); }

.services {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.service-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--bg2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.service-name {
  font-size: 12px;
  color: var(--text-dim);
}

.service-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  letter-spacing: 0.3px;
}

.service-badge.up {
  background: var(--green-dim);
  color: var(--green);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.service-badge.down {
  background: rgba(100, 116, 139, 0.1);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.no-services {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
  padding: 4px 0 12px;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.git-info {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.git-branch {
  color: var(--purple);
  font-weight: 500;
}

.git-commit {
  font-family: 'Cascadia Code', 'Consolas', monospace;
  font-size: 10px;
  opacity: 0.7;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.last-modified {
  font-size: 11px;
  color: var(--text-muted);
  text-align: right;
}

/* ── Intention Form ── */
.intention-form {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
  transition: border-color 0.15s;
}

.intention-form:focus-within {
  border-color: var(--accent);
}

.intention-input {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  line-height: 1.6;
  resize: none;
  outline: none;
  margin-bottom: 12px;
}

.intention-input::placeholder { color: var(--text-muted); }

.form-footer {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.select-project,
.select-model {
  background: var(--bg2);
  border: 1px solid var(--border-light);
  color: var(--text-dim);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  outline: none;
  height: 30px;
  box-sizing: border-box;
}

.select-project:focus,
.select-model:focus { border-color: var(--accent); }

/* Sélecteurs de projet (bloc Intention + vue Rendu) : même liseré que la carte projet
   sélectionnée (.project-card--selected), par cohérence — ils portent toujours un projet.
   Au focus, le contour passe à l'accent mais le liseré gauche vert reste. */
.select-project {
  border-color: rgba(34, 197, 94, 0.55);
  border-left: 3px solid var(--green);
}
.select-project:focus { border-left-color: var(--green); }

.btn-submit {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 7px 18px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
  font-family: inherit;
  height: 30px;
  box-sizing: border-box;
}

.btn-submit:hover { opacity: 0.88; }
.btn-submit:active { transform: scale(0.97); }
.btn-submit:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── Intentions List ── */
.intentions-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.empty-state {
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  padding: 32px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

.intention-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.15s;
}

.intention-item:hover { border-color: var(--border-light); }

.intention-item.done { opacity: 0.5; }
.intention-item.done .intention-text { text-decoration: line-through; }

.intention-item.in-progress {
  border-color: var(--yellow);
  animation: border-pulse 2s ease-in-out infinite;
}

.intention-item.error { border-color: rgba(239, 68, 68, 0.5); }
.intention-item.verify-failed { border-color: rgba(239, 68, 68, 0.5); }
.intention-item.blocked { border-left: 3px solid var(--yellow); }

.intentions-list.collapsed .intention-item { display: none; }
.intentions-list.collapsed .intention-item.in-progress { display: flex; }

@keyframes border-pulse {
  0%, 100% { border-color: var(--yellow); }
  50%       { border-color: rgba(245, 158, 11, 0.3); }
}

.intention-status-btn {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--border-light);
  background: none;
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 2px;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}

.intention-status-btn:hover { border-color: var(--green); }
.intention-status-btn.in-progress { border-color: var(--yellow); background: var(--yellow-dim); color: var(--yellow); }
.intention-status-btn.done  { border-color: var(--green); background: var(--green-dim); color: var(--green); }
.intention-status-btn.error { border-color: var(--red); background: var(--red-dim); color: var(--red); }
.intention-status-btn.verify-failed { border-color: var(--red); background: var(--red-dim); color: var(--red); }
.intention-status-btn.rate-limited { border-color: var(--yellow); background: var(--yellow-dim); color: var(--yellow); }
.intention-status-btn.blocked { border-color: var(--yellow); background: var(--yellow-dim); color: var(--yellow); }

.intention-body {
  flex: 1;
  min-width: 0;
}

.intention-text {
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
  word-break: break-word;
}

.intention-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.intention-project-tag {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 20px;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(79, 126, 248, 0.25);
}

.intention-time {
  font-size: 11px;
  color: var(--text-muted);
}

.intention-status-label {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 20px;
}

.intention-status-label.pending {
  background: rgba(100, 116, 139, 0.12);
  color: var(--text-muted);
}

.intention-status-label.in-progress {
  background: var(--yellow-dim);
  color: var(--yellow);
}

.intention-status-label.done {
  background: var(--green-dim);
  color: var(--green);
}

.intention-status-label.error {
  background: var(--red-dim);
  color: var(--red);
}

/* Tests du projet en échec après le run (vérification par le hub, cf. verify.js) : couleurs de error. */
.intention-status-label.verify-failed {
  background: var(--red-dim);
  color: var(--red);
}

.intention-status-label.rate-limited {
  background: var(--yellow-dim);
  color: var(--yellow);
}

.intention-status-label.blocked {
  background: var(--yellow-dim);
  color: var(--yellow);
}

.intention-resume-at {
  font-size: 11px;
  color: var(--yellow);
  white-space: nowrap;
}

.btn-retry, .btn-relaunch-now, .btn-cancel-retry, .btn-reverify {
  background: none;
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: var(--yellow);
  border-radius: var(--radius-sm);
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.btn-retry:hover, .btn-relaunch-now:hover, .btn-cancel-retry:hover, .btn-reverify:hover { background: var(--yellow-dim); border-color: var(--yellow); }

.btn-delete {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  padding: 0 4px;
  opacity: 0;
  transition: opacity 0.15s, color 0.15s;
  flex-shrink: 0;
}

.intention-item:hover .btn-delete { opacity: 1; }
.btn-delete:hover { color: var(--red); }

/* ── Project details panels ── */
.project-details {
  margin-top: 12px;
  border-top: 1px solid var(--border);
  padding-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-section {
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.detail-section[open] { background: rgba(0,0,0,0.15); }

.detail-summary {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 5px 8px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
  border-radius: var(--radius-sm);
  transition: color 0.12s, background 0.12s;
}

.detail-summary::-webkit-details-marker { display: none; }
.detail-summary::before { content: '▸'; font-size: 9px; transition: transform 0.15s; }
details[open] .detail-summary::before { transform: rotate(90deg); }
.detail-summary:hover { color: var(--text-dim); background: rgba(255,255,255,0.03); }

.detail-body {
  padding: 6px 8px 8px;
  font-size: 11.5px;
}

.detail-empty { color: var(--text-muted); font-style: italic; font-size: 11px; }
.detail-loading { color: var(--text-muted); font-size: 11px; }

/* ── Inline env grid in card ── */
.card-env-inline {
  margin: 8px 0 12px;
}

.card-env-inline:empty { margin: 0; }

.btn-card-favorite {
  flex-shrink: 0;
  background: none;
  border: none;
  padding: 0 4px 0 0;
  font-size: 13px;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
  transition: color 0.12s;
}
.btn-card-favorite:hover { color: var(--yellow); }
.btn-card-favorite.is-favorite { color: var(--yellow); }

.projects-favorites-empty { padding: 24px; text-align: center; width: 100%; }

.env-grid {
  border-collapse: collapse;
  width: 100%;
}

.env-grid th {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
  padding: 0 8px 5px;
  border-bottom: 1px solid var(--border);
}

.env-grid th:first-child { text-align: left; padding-left: 0; }

.env-grid td { padding: 5px 8px; text-align: center; }
.env-grid td:first-child { padding-left: 0; }

.env-grid-svc {
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 500;
  text-align: left;
}

.env-grid-cell {
  font-size: 15px;
  font-weight: 700;
  cursor: default;
  line-height: 1;
}

.env-grid-cell.env-up   { color: var(--green); }
.env-grid-cell.env-slow { color: var(--yellow); }
.env-grid-cell.env-down { color: var(--red); }
.env-grid-cell.env-na   { color: var(--border); font-size: 11px; font-weight: 400; }

.card-version-badge {
  font-size: 11px;
  font-weight: 500;
  color: var(--purple);
  font-family: 'Cascadia Code', 'Consolas', monospace;
  margin-left: 7px;
  opacity: 0.85;
}

/* Env status */
.detail-env { display: flex; flex-wrap: wrap; gap: 6px; }

.env-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  border: 1px solid transparent;
}

.env-pill::before { content: '●'; font-size: 8px; }

.env-up   { background: var(--green-dim); color: var(--green);    border-color: rgba(34,197,94,0.25); }
.env-slow { background: var(--yellow-dim); color: var(--yellow);  border-color: rgba(245,158,11,0.25); }
.env-down { background: var(--red-dim);   color: var(--red);      border-color: rgba(239,68,68,0.25); }
.env-down::before { content: '○'; }

.env-pill.env-link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: filter 0.12s;
}
.env-pill.env-link:hover { filter: brightness(1.2); }

/* ── Compteurs Bugs / Backlog sur la ligne d'environnements ── */
.env-counter-badge {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  font-family: 'Cascadia Code', 'Consolas', monospace;
  padding: 2px 7px;
  border-radius: 10px;
  border: 1px solid transparent;
  line-height: 1;
}
.env-counter-bug {
  background: var(--red-dim);
  color: var(--red);
  border-color: rgba(239,68,68,0.25);
}
.env-counter-backlog {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: rgba(79,126,248,0.25);
}
.env-counter-feature {
  background: rgba(167,139,250,0.15);
  color: var(--purple);
  border-color: rgba(167,139,250,0.25);
}
.env-counter-question {
  background: var(--yellow-dim);
  color: var(--yellow);
  border-color: rgba(245,158,11,0.25);
}

/* Pipeline */
.detail-pipeline { display: flex; flex-direction: column; gap: 5px; }

.pipeline-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pipeline-title {
  flex: 1;
  min-width: 100px;
  color: var(--text-dim);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pipeline-title-clickable {
  cursor: pointer;
}
.pipeline-title-clickable:hover {
  color: var(--accent);
  text-decoration: underline;
}

.pipeline-stage-label {
  font-size: 10px;
  color: var(--accent);
  font-weight: 600;
  min-width: 40px;
  text-align: right;
}

.pipeline-dots { display: flex; gap: 3px; align-items: center; }

.stage-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.stage-dot.done    { background: var(--green); }
.stage-dot.current { background: var(--accent); box-shadow: 0 0 5px var(--accent); }
.stage-dot.pending { background: var(--border-light); }

/* Versioning */
.detail-version { display: flex; flex-direction: column; gap: 6px; }

.version-envs { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 2px; }

.version-env-pill {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--bg2);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  font-weight: 500;
}
.version-env-pill strong { color: var(--purple); font-family: 'Cascadia Code', 'Consolas', monospace; font-weight: 600; }
.version-env-pill.version-unknown strong { color: var(--text-muted); }

.version-tag {
  font-family: 'Cascadia Code', 'Consolas', monospace;
  font-size: 13px;
  color: var(--purple);
  font-weight: 600;
}

.version-buttons { display: flex; gap: 5px; flex-wrap: wrap; }

.btn-version {
  background: var(--bg2);
  border: 1px solid var(--border-light);
  color: var(--text-dim);
  border-radius: var(--radius-sm);
  padding: 3px 8px;
  font-size: 11px;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.12s, color 0.12s, background 0.12s;
  white-space: nowrap;
}

.btn-version:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }
.btn-version:active { transform: scale(0.97); }

/* Metrics */
.metrics-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.metric {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 20px;
  background: rgba(100,116,139,0.1);
  color: var(--text-dim);
  border: 1px solid var(--border);
}

.coverage-ok   { background: var(--green-dim); color: var(--green);  border-color: rgba(34,197,94,0.25); }
.coverage-warn { background: var(--yellow-dim); color: var(--yellow); border-color: rgba(245,158,11,0.25); }
.coverage-low  { background: var(--red-dim);   color: var(--red);    border-color: rgba(239,68,68,0.25); }
.metric-bugs   { background: var(--red-dim);   color: var(--red);    border-color: rgba(239,68,68,0.25); }
.metric-na     { color: var(--text-muted); }

/* ── Run output panel ── */
.run-output {
  margin-top: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #0a0c14;
}

.run-output-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  font-size: 11px;
}

.run-label {
  color: var(--accent);
  font-weight: 600;
}

.run-cwd {
  color: var(--text-muted);
  font-family: 'Cascadia Code', 'Consolas', monospace;
  flex: 1;
}

.exit-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 20px;
}

.exit-badge.ok   { background: var(--green-dim); color: var(--green); border: 1px solid rgba(34, 197, 94, 0.3); }
.exit-badge.fail { background: var(--red-dim);   color: var(--red);   border: 1px solid rgba(239, 68, 68, 0.3); }

.btn-toggle-output {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 11px;
  padding: 0 2px;
  line-height: 1;
  transition: color 0.15s;
  flex-shrink: 0;
}

.btn-toggle-output:hover { color: var(--text); }

.btn-copy-run {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 11px;
  padding: 0 2px;
  line-height: 1;
  transition: color 0.15s;
  flex-shrink: 0;
}

.btn-copy-run:hover { color: var(--text); }
.btn-copy-run.copied { color: var(--green); }

.btn-stop-run {
  font-size: 9px; font-weight: 700; padding: 1px 6px;
  border: 1px solid rgba(239,68,68,0.4); background: rgba(239,68,68,0.08);
  color: var(--red); border-radius: 4px; cursor: pointer;
  font-family: inherit; transition: background 0.12s; white-space: nowrap;
  flex-shrink: 0;
}
.btn-stop-run:hover { background: rgba(239,68,68,0.18); }
.btn-stop-run:disabled { opacity: 0.4; cursor: not-allowed; }

.run-output-body {
  font-family: 'Cascadia Code', 'Consolas', 'Courier New', monospace;
  font-size: 11.5px;
  line-height: 1.55;
  color: #c8d3e6;
  padding: 10px 12px;
  max-height: 360px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
  scrollbar-width: thin;
  scrollbar-color: var(--border-light) transparent;
}

.run-output.collapsed .run-output-body { display: none; }

/* Worktree d'une intention isolée (cf. isolation.js) : branche, statut, actions. */
.intention-worktree { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.wt-branch { font-family: 'Cascadia Code', 'Consolas', monospace; font-size: 11px; color: var(--text-muted, #94a3b8); }
.wt-status { font-size: 11px; padding: 1px 6px; border-radius: 8px; border: 1px solid var(--border); }
.wt-status.wt-pending-merge, .wt-status.wt-orphaned { color: var(--yellow); border-color: var(--yellow); }
.wt-status.wt-merged { color: var(--green); border-color: var(--green); }
.wt-status.wt-conflict { color: var(--red); border-color: var(--red); }
.btn-wt-merge, .btn-wt-diff, .btn-wt-discard {
  font-size: 11px; padding: 2px 8px; border-radius: 6px; cursor: pointer;
  background: transparent; border: 1px solid var(--border); color: inherit;
}
.btn-wt-merge:hover { border-color: var(--green); background: var(--green-dim); }
.btn-wt-diff:hover { border-color: var(--border-light, var(--border)); }
.btn-wt-discard:hover { border-color: var(--red); background: var(--red-dim); }
/* Profil de permission du run et origine du contenu (cf. permissions.js / origins.js). */
.perm-badge {
  font-size: 11px; padding: 1px 6px; border-radius: 8px; border: 1px solid var(--border);
  color: var(--text-muted, #94a3b8); white-space: nowrap;
}
.perm-badge.perm-remote-docs, .perm-badge.perm-awaiting-approval { color: var(--yellow); border-color: var(--yellow); }
.perm-badge.perm-unrestricted { color: var(--red); border-color: var(--red); }
.origin-badge {
  font-size: 11px; padding: 1px 6px; border-radius: 8px; border: 1px solid var(--border); white-space: nowrap;
}
.origin-badge.remote { color: var(--yellow); border-color: var(--yellow); background: rgba(234, 179, 8, 0.08); }
.origin-badge.approved { color: var(--green); border-color: var(--green); }
.btn-approve-origin, .btn-approve-spec {
  font-size: 11px; padding: 2px 8px; border-radius: 6px; cursor: pointer;
  background: transparent; border: 1px solid var(--yellow); color: inherit;
}
.btn-approve-origin:hover, .btn-approve-spec:hover { border-color: var(--green); background: var(--green-dim); }
.intention-status-label.awaiting-approval, .intention-status-btn.awaiting-approval { color: var(--yellow); }
.isolation-pill {
  font-size: 10px; padding: 1px 6px; border-radius: 8px; vertical-align: middle;
  border: 1px solid var(--border); color: var(--text-muted, #94a3b8);
}

/* Bloc « Vérification » (fin de la sortie de la verifyCommand), replié par défaut. */
.intention-verify { border-top: 1px solid var(--border); padding: 6px 12px; font-size: 11.5px; }
.intention-verify > summary { cursor: pointer; }
.intention-verify.passed > summary { color: var(--green); }
.intention-verify.failed > summary { color: var(--red); }
.intention-verify > pre {
  font-family: 'Cascadia Code', 'Consolas', 'Courier New', monospace;
  color: #c8d3e6; margin: 6px 0 0; max-height: 280px; overflow-y: auto;
  white-space: pre-wrap; word-break: break-all;
}
.run-output.collapsed .intention-verify { display: none; }
.run-output.collapsed .run-output-header { border-bottom: none; }

