/* public/css/project-cards.css — mise en page des cartes projets, boutons d'ajout de projet et de création de repo (tranche contiguë de l'ancien style.css ; ordre de chargement dans index.html, cf. CLAUDE.md) */
/* ── New project card layout ── */
.card-info { flex: 1; min-width: 0; }

.card-header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.card-git-links { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }

.git-link {
  font-size: 10px;
  color: var(--accent);
  text-decoration: none;
  padding: 1px 6px;
  border-radius: 10px;
  border: 1px solid rgba(79,126,248,0.25);
  background: var(--accent-dim);
  transition: background 0.12s;
  white-space: nowrap;
}
.git-link:hover { background: rgba(79,126,248,0.25); }

.card-git-footer { display: flex; flex-direction: column; gap: 2px; }

/* Env grid enhancements */
.cell-dot { font-size: 14px; font-weight: 700; display: block; line-height: 1.2; }
.cell-version { display: block; font-size: 9px; font-family: 'Cascadia Code','Consolas',monospace; color: var(--purple); opacity: 0.85; line-height: 1.1; margin-top: 1px; }
.cell-latency { display: block; font-size: 9px; color: var(--text-muted); line-height: 1; }
.env-grid td { vertical-align: top; }

/* Startable env cell: click the red dot to launch the service */
.env-grid-cell.env-startable {
  cursor: pointer;
  transition: background 0.15s;
  border-radius: 4px;
}
.env-grid-cell.env-startable:hover {
  background: rgba(34, 197, 94, 0.1);
}
.env-grid-cell.env-startable:hover .cell-dot {
  color: var(--green);
}
.env-grid-cell.env-starting {
  opacity: 0.5;
  cursor: wait;
}

/* Feature env tags */
.feat-env-tag { font-size: 9px; font-weight: 700; padding: 1px 5px; border-radius: 8px; margin-left: 4px; flex-shrink: 0; }
.feat-prod    { background: rgba(34,197,94,0.15); color: var(--green); border: 1px solid rgba(34,197,94,0.25); }
.feat-staging { background: rgba(245,158,11,0.15); color: var(--yellow); border: 1px solid rgba(245,158,11,0.25); }
.feat-local   { background: rgba(100,116,139,0.15); color: var(--text-dim); border: 1px solid rgba(100,116,139,0.25); }
.feat-cancelled { background: rgba(100,116,139,0.15); color: var(--text-dim); border: 1px solid rgba(100,116,139,0.25); }
/* "Terminé" (status: done/archived) — distinct du vert "Prod" : marqué fini à la main,
   pas de vrai push/déploiement prod derrière (sinon ce serait status: prod → badge .feat-prod). */
.feat-done    { background: rgba(167,139,250,0.15); color: var(--purple); border: 1px solid rgba(167,139,250,0.25); }

/* Feature actions container */
.feat-actions { display: flex; gap: 3px; align-items: center; flex-shrink: 0; }

/* Feature step badges (Arch / Dev / QA) — state-based */
.feat-step-badge {
  display: inline-flex; align-items: center;
  font-size: 9px; font-weight: 700; padding: 1px 6px;
  border-radius: 4px; white-space: nowrap; font-family: inherit;
  border: 1px solid transparent;
}
.feat-step-locked {
  background: rgba(100,116,139,0.1); color: var(--text-muted);
  border-color: rgba(100,116,139,0.2); cursor: not-allowed; opacity: 0.5;
}
.feat-step-pending {
  background: var(--accent-dim); color: var(--accent);
  border-color: rgba(79,126,248,0.35); cursor: pointer;
  transition: background 0.12s;
}
.feat-step-pending:hover { background: rgba(79,126,248,0.25); }
.feat-step-running {
  background: rgba(251,146,60,0.15); color: #fb923c;
  border-color: rgba(251,146,60,0.4);
  animation: feat-step-blink 0.9s ease-in-out infinite;
}
.feat-step-done {
  background: var(--green-dim); color: var(--green);
  border-color: rgba(34,197,94,0.3);
}
@keyframes feat-step-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.35; }
}

/* Feature agent buttons (Arch / Dev / QA) — legacy fallback */
.btn-feat-agent {
  font-size: 9px; font-weight: 700; padding: 1px 5px;
  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-feat-agent:hover { background: rgba(79,126,248,0.25); }
.btn-feat-agent:disabled { opacity: 0.4; cursor: not-allowed; }

/* Feature staging button */
.btn-feat-stage {
  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-feat-stage:hover { background: rgba(34,197,94,0.18); }
.btn-feat-stage:disabled { opacity: 0.35; cursor: not-allowed; background: transparent; color: var(--text-muted); border-color: rgba(100,116,139,0.25); }
.btn-feat-stage:disabled:hover { background: transparent; }

/* Feature fast-track button */
.btn-feat-fast {
  font-size: 9px; font-weight: 700; padding: 1px 6px;
  border: 1px solid rgba(245,158,11,0.4); background: rgba(245,158,11,0.08);
  color: var(--yellow); border-radius: 4px; cursor: pointer;
  font-family: inherit; transition: background 0.12s; white-space: nowrap;
}
.btn-feat-fast:hover { background: rgba(245,158,11,0.18); }

/* Feature prod button */
.btn-feat-prod {
  font-size: 9px; font-weight: 700; padding: 1px 6px;
  border: 1px solid rgba(245,158,11,0.5); background: rgba(245,158,11,0.1);
  color: var(--yellow); border-radius: 4px; cursor: pointer;
  font-family: inherit; transition: background 0.12s; white-space: nowrap;
}
.btn-feat-prod:hover { background: rgba(245,158,11,0.22); }

/* Staging/Prod push button when the project has no such environment declared in projects.json —
   le push git fonctionne quand même, mais rien n'est réellement déployé derrière. */
.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-feat-noenv:hover { background: rgba(100,116,139,0.18); }

/* Feature archive/confirm button — confirms a prod feature is OK and removes it from the list */
.btn-feat-archive {
  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-feat-archive:hover { background: rgba(34,197,94,0.18); }
.btn-feat-archive:disabled { opacity: 0.5; cursor: not-allowed; background: transparent; color: var(--text-muted); border-color: rgba(100,116,139,0.25); }

/* Feature close button — dismiss a feature from local/staging list */
.btn-feat-close {
  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-feat-close:hover { border-color: var(--green); color: var(--green); }
.btn-feat-close:disabled { opacity: 0.4; cursor: not-allowed; }

/* Feature cancel button — abandon a feature before delivery */
.btn-feat-cancel {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border: 1px solid rgba(248,113,113,0.3);
  background: none;
  color: var(--red);
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.12s;
}
.btn-feat-cancel:hover { background: rgba(248,113,113,0.12); border-color: rgba(248,113,113,0.5); }
.btn-feat-cancel:disabled { opacity: 0.4; cursor: not-allowed; }

/* Feature rollback button (disabled, phase 2) */
.btn-feat-rollback {
  font-size: 9px; font-weight: 700; padding: 1px 6px;
  border: 1px solid rgba(100,116,139,0.3); background: transparent;
  color: var(--text-muted); border-radius: 4px; cursor: not-allowed;
  font-family: inherit; opacity: 0.5; white-space: nowrap;
}

/* Push in progress — blinking state shared by feature/bug Staging|Fast|Prod buttons */
.btn-feat-stage.running, .btn-feat-fast.running, .btn-feat-prod.running,
.btn-stage-bug.running, .btn-prod-bug.running {
  background: rgba(251,146,60,0.15); color: #fb923c;
  border-color: rgba(251,146,60,0.4);
  animation: feat-step-blink 0.9s ease-in-out infinite;
  cursor: not-allowed; opacity: 1;
}

/* Bugs section */
.detail-bugs { display: flex; flex-direction: column; gap: 4px; }

.bug-row { display: flex; align-items: center; gap: 7px; padding: 3px 0; }

.bug-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; background: var(--text-muted); }
.bug-high   { background: var(--red); }
.bug-medium { background: var(--yellow); }
.bug-low    { background: var(--text-muted); }

.bug-title { flex: 1; font-size: 11px; color: var(--text-dim); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.bug-title:hover { color: var(--text); }
.bug-sev { font-size: 9px; font-weight: 700; padding: 1px 5px; border-radius: 8px; flex-shrink: 0; text-transform: capitalize; background: rgba(100,116,139,0.1); color: var(--text-muted); }
.bug-high.bug-sev   { background: var(--red-dim); color: var(--red); }
.bug-medium.bug-sev { background: var(--yellow-dim); color: var(--yellow); }
.bug-status { font-size: 10px; color: var(--text-muted); flex-shrink: 0; }

.bugs-open-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 16px; height: 16px; border-radius: 8px; font-size: 9px; font-weight: 700; background: var(--red-dim); color: var(--red); border: 1px solid rgba(239,68,68,0.3); padding: 0 4px; margin-left: 5px; }
.backlog-open-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 16px; height: 16px; border-radius: 8px; font-size: 9px; font-weight: 700; background: var(--accent-dim); color: var(--accent); border: 1px solid rgba(79,126,248,0.3); padding: 0 4px; margin-left: 5px; }
.features-open-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 16px; height: 16px; border-radius: 8px; font-size: 9px; font-weight: 700; background: rgba(167,139,250,0.15); color: var(--purple); border: 1px solid rgba(167,139,250,0.3); padding: 0 4px; margin-left: 5px; }
.questions-open-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 16px; height: 16px; border-radius: 8px; font-size: 9px; font-weight: 700; background: var(--yellow-dim); color: var(--yellow); border: 1px solid rgba(245,158,11,0.3); padding: 0 4px; margin-left: 5px; }

/* Chat Idéation multi-projets — badge de carte signalant un échange en cours ou une réponse pas
   encore vue sur un projet que l'utilisateur ne regarde pas actuellement (cf. getChatBadgeState
   dans app.js : jamais affiché en même temps que l'indicateur inline #chat-pending-indicator). */
.chat-pending-badge { display: inline-flex; align-items: center; font-size: 9px; font-weight: 700; background: var(--yellow-dim); color: var(--yellow); border: 1px solid rgba(245,158,11,0.3); border-radius: 8px; padding: 0 5px; margin-left: 5px; animation: blink 1s ease-in-out infinite; }
.chat-unseen-badge { display: inline-flex; align-items: center; font-size: 9px; font-weight: 700; background: var(--green-dim); color: var(--green); border: 1px solid rgba(34,197,94,0.3); border-radius: 8px; padding: 0 5px; margin-left: 5px; }
/* Limite de forfait atteinte, reprise auto programmée (cf. syncChatRetries dans app.js) — même
   famille visuelle que .chat-pending-badge (jaune, "en attente") mais icône/tooltip distincts. */
.chat-scheduled-badge { display: inline-flex; align-items: center; font-size: 9px; font-weight: 700; background: var(--yellow-dim); color: var(--yellow); border: 1px solid rgba(245,158,11,0.3); border-radius: 8px; padding: 0 5px; margin-left: 5px; }

.btn-features-list { background: var(--bg2); border: 1px solid var(--border-light); color: var(--text-dim); border-radius: var(--radius-sm); padding: 1px 7px; font-size: 10px; font-weight: 500; cursor: pointer; font-family: inherit; margin-left: 5px; transition: border-color 0.12s, color 0.12s; }
.btn-features-list:hover { border-color: var(--yellow); color: var(--yellow); }

.btn-questions-list { background: var(--bg2); border: 1px solid var(--border-light); color: var(--text-dim); border-radius: var(--radius-sm); padding: 1px 7px; font-size: 10px; font-weight: 500; cursor: pointer; font-family: inherit; margin-left: 5px; transition: border-color 0.12s, color 0.12s; }
.btn-questions-list:hover { border-color: var(--purple); color: var(--purple); }

.btn-bugs-list { background: var(--bg2); border: 1px solid var(--border-light); color: var(--text-dim); border-radius: var(--radius-sm); padding: 1px 7px; font-size: 10px; font-weight: 500; cursor: pointer; font-family: inherit; margin-left: 5px; transition: border-color 0.12s, color 0.12s; }
.btn-bugs-list:hover { border-color: var(--red); color: var(--red); }

/* Watchdog & form actions */
.watchdog-bar { display: flex; align-items: center; gap: 10px; }
.watchdog-idle { font-size: 11px; color: var(--text-muted); }
.watchdog-running { font-size: 11px; color: var(--yellow); font-weight: 600; animation: blink 2s ease-in-out infinite; }

/* flex-wrap : les contrôles (projet, modèle, Backlog, Spec, Bug, Lancer) passent à la ligne
   sous le prompt au lieu de déborder de la colonne quand elle est étroite (écran partagé Rendu). */
.form-actions { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; width: 100%; min-width: 0; }
.form-actions-group { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-width: 0; }
.form-actions .select-project,
.form-actions .select-model { max-width: 100%; min-width: 0; }
.form-footer { min-width: 0; max-width: 100%; }
.intention-form { min-width: 0; max-width: 100%; box-sizing: border-box; }
.form-actions-left:empty { display: none; }

/* En tête du formulaire, au-dessus du fil de chat et du prompt */
.intention-mode-toggle { display: flex; gap: 4px; margin-bottom: 10px; }
.intention-mode-btn {
  background: var(--bg2);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.12s, color 0.12s, background 0.12s;
  white-space: nowrap;
}
.intention-mode-btn:hover { border-color: var(--accent); color: var(--accent); }
.intention-mode-btn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }

.btn-queue { background: var(--bg2); border: 1px solid var(--border-light); color: var(--text-dim); border-radius: var(--radius-sm); padding: 0 12px; height: 30px; box-sizing: border-box; font-size: 12px; font-weight: 500; cursor: pointer; font-family: inherit; transition: border-color 0.12s, color 0.12s; white-space: nowrap; }
.btn-queue:hover { border-color: var(--accent); color: var(--accent); }
.btn-queue:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-spec { background: var(--bg2); border: 1px solid var(--border-light); color: var(--text-muted); border-radius: var(--radius-sm); padding: 0 12px; height: 30px; box-sizing: border-box; font-size: 12px; cursor: pointer; font-family: inherit; transition: border-color 0.12s, color 0.12s; white-space: nowrap; }
.btn-spec:hover { border-color: var(--purple); color: var(--purple); }
.btn-spec:disabled { opacity: 0.4; cursor: not-allowed; }

/* Fast Track section selection (Backlog + Features rows) */
.fast-track-check {
  flex-shrink: 0;
  cursor: pointer;
  margin: 0;
  width: 14px;
  height: 14px;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--border-light);
  border-radius: 3px;
  background: var(--bg);
  transition: background 0.12s, border-color 0.12s, border-width 0.12s;
}
.fast-track-check:checked {
  background: #fff;
  border: 4px solid var(--bg);
}
.fast-track-check:hover { border-color: var(--accent); }
.fast-track-check-placeholder { display: inline-block; flex-shrink: 0; width: 14px; }

/* Section-level Fast Track button (Backlog/Features <summary>) */
.btn-section-fast-track {
  font-size: 9px; font-weight: 700; padding: 1px 6px;
  border: 1px solid rgba(245,158,11,0.4); background: rgba(245,158,11,0.08);
  color: var(--yellow); border-radius: 4px; cursor: pointer;
  font-family: inherit; transition: background 0.12s; white-space: nowrap;
  text-transform: none; letter-spacing: normal; margin-left: auto;
}
.btn-section-fast-track:hover { background: rgba(245,158,11,0.18); }
.btn-section-fast-track:disabled { opacity: 0.4; cursor: not-allowed; background: transparent; color: var(--text-muted); border-color: rgba(100,116,139,0.25); }
.btn-section-fast-track.running {
  background: rgba(251,146,60,0.15); color: #fb923c;
  border-color: rgba(251,146,60,0.4);
  animation: feat-step-blink 0.9s ease-in-out infinite;
  cursor: not-allowed; opacity: 1;
}

/* Fast Track banner — server-orchestrated chain status (cf. fast-track.js, app.js renderFastTrackBanner) */
.fast-track-banner {
  display: flex; align-items: center; gap: 8px; justify-content: space-between;
  font-size: 11px; padding: 5px 10px; border-radius: var(--radius-sm);
  margin-bottom: 6px; border: 1px solid; line-height: 1.4;
}
.fast-track-banner.running {
  background: rgba(251,146,60,0.1); color: #fb923c; border-color: rgba(251,146,60,0.35);
}
.fast-track-banner.interrupted {
  background: rgba(245,158,11,0.08); color: var(--yellow); border-color: rgba(245,158,11,0.35);
}
.fast-track-banner.error {
  background: var(--red-dim); color: var(--red); border-color: rgba(239,68,68,0.35);
}
.fast-track-banner.rate-limited {
  background: rgba(245,158,11,0.08); color: var(--yellow); border-color: rgba(245,158,11,0.35);
}
.fast-track-banner span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.btn-fast-track-stop, .btn-fast-track-resume, .btn-fast-track-cancel-retry {
  font-size: 9px; font-weight: 700; padding: 1px 6px; flex-shrink: 0;
  border-radius: 4px; cursor: pointer; font-family: inherit;
  transition: background 0.12s; white-space: nowrap; background: transparent;
}
.btn-fast-track-stop {
  border: 1px solid rgba(239,68,68,0.4); color: var(--red);
}
.btn-fast-track-stop:hover { background: rgba(239,68,68,0.12); }
.btn-fast-track-resume {
  border: 1px solid rgba(34,197,94,0.4); color: var(--green);
}
.btn-fast-track-resume:hover { background: rgba(34,197,94,0.12); }
.btn-fast-track-cancel-retry {
  border: 1px solid rgba(245,158,11,0.4); color: var(--yellow);
}
.btn-fast-track-cancel-retry:hover { background: rgba(245,158,11,0.12); }

/* Bandeau « Chaîne Livrer » — état du script détaché (cf. delivery-chain.js, renderDeliveryChainBanner) */
.delivery-chain-slot:empty { display: none; }
.delivery-chain-banner {
  display: flex; align-items: center; gap: 8px; justify-content: space-between; flex-wrap: wrap;
  font-size: 11px; padding: 5px 10px; border-radius: var(--radius-sm);
  margin-bottom: 6px; border: 1px solid; line-height: 1.4;
}
.delivery-chain-banner span { flex: 1; min-width: 0; }
.delivery-chain-banner.running {
  background: rgba(251,146,60,0.1); color: #fb923c; border-color: rgba(251,146,60,0.35);
}
.delivery-chain-banner.waiting {
  background: rgba(245,158,11,0.08); color: var(--yellow); border-color: rgba(245,158,11,0.35);
}
.delivery-chain-banner.error {
  background: var(--red-dim); color: var(--red); border-color: rgba(239,68,68,0.35);
}
.delivery-chain-banner.success {
  background: rgba(34,197,94,0.08); color: var(--green); border-color: rgba(34,197,94,0.35);
}
.btn-delivery-chain-resume, .btn-delivery-chain-dismiss {
  font-size: 9px; font-weight: 700; padding: 1px 6px; flex-shrink: 0;
  border-radius: 4px; cursor: pointer; font-family: inherit;
  transition: background 0.12s; white-space: nowrap; background: transparent;
}
.btn-delivery-chain-resume { border: 1px solid rgba(34,197,94,0.4); color: var(--green); }
.btn-delivery-chain-resume:hover { background: rgba(34,197,94,0.12); }
.btn-delivery-chain-dismiss { border: 1px solid var(--border-light); color: var(--text-muted); }
.btn-delivery-chain-dismiss:hover { border-color: var(--accent); color: var(--text); }

/* Backlog (per-project, inside .project-details) */
.backlog-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--card); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--radius-sm); margin-bottom: 5px; }
.backlog-item:last-child { margin-bottom: 0; }
.backlog-item-body { flex: 1; display: flex; align-items: center; gap: 7px; min-width: 0; }
.backlog-item-text { font-size: 12px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.backlog-item-text:hover { color: var(--accent); }

.btn-backlog-spec { display: inline-flex; align-items: center; gap: 4px; background: rgba(167,139,250,0.12); border: 1px solid rgba(167,139,250,0.3); color: var(--purple); border-radius: var(--radius-sm); padding: 3px 10px; font-size: 11px; font-weight: 600; cursor: pointer; flex-shrink: 0; font-family: inherit; transition: background 0.12s; white-space: nowrap; }
.btn-backlog-spec:hover { background: rgba(167,139,250,0.25); }
.btn-backlog-spec:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-backlog-cancel { background: none; border: 1px solid rgba(248,113,113,0.3); color: var(--red); border-radius: var(--radius-sm); padding: 3px 8px; font-size: 11px; cursor: pointer; flex-shrink: 0; font-family: inherit; transition: background 0.12s, border-color 0.12s; line-height: 1; }
.btn-backlog-cancel:hover { background: rgba(248,113,113,0.12); border-color: rgba(248,113,113,0.5); }

.intention-status-label.queued { background: var(--accent-dim); color: var(--accent); }
.intention-status-label.spec { background: rgba(167,139,250,0.12); color: var(--purple); }
.intention-item.queued { border-left: 3px solid var(--accent); }
.intention-item.spec   { border-left: 3px solid var(--purple); opacity: 0.8; }

/* Audit */
.detail-audit { display: flex; flex-direction: column; gap: 4px; }
.audit-row { display: flex; align-items: center; gap: 10px; padding: 4px 0; font-size: 11px; }
.audit-label { color: var(--text-muted); min-width: 90px; }
.audit-value { font-weight: 600; font-family: 'Cascadia Code','Consolas',monospace; }
.audit-ok   { color: var(--green); }
.audit-warn { color: var(--yellow); }
.audit-bad  { color: var(--red); }
.audit-meta { font-size: 10px; color: var(--text-muted); margin-left: auto; }
.btn-audit { font-size: 10px; font-weight: 600; padding: 3px 9px; background: var(--bg2); border: 1px solid var(--border-light); color: var(--text-muted); border-radius: var(--radius-sm); cursor: pointer; font-family: inherit; transition: all 0.12s; white-space: nowrap; }
.btn-audit:hover { border-color: var(--accent); color: var(--accent); }
.btn-audit:disabled { opacity: 0.5; cursor: not-allowed; }
.audit-running { animation: pulse 1.5s ease-in-out infinite; color: var(--yellow); }

/* AI audit button — launches a Claude agent reviewing code quality & security */
.btn-audit-ai {
  font-size: 10px; font-weight: 600; padding: 3px 9px;
  background: rgba(167,139,250,0.08); border: 1px solid rgba(167,139,250,0.3);
  color: var(--purple); border-radius: var(--radius-sm); cursor: pointer;
  font-family: inherit; transition: all 0.12s; white-space: nowrap;
}
.btn-audit-ai:hover { background: rgba(167,139,250,0.18); }
.btn-audit-ai.running {
  cursor: not-allowed; opacity: 1;
  animation: feat-step-blink 0.9s ease-in-out infinite;
}

/* horodatage de creation d'un item (backlog/feature/bug/question) affiche dans les popups de detail */
.item-modal-date {
  font-size: 11px; color: var(--text-muted); margin-bottom: 8px;
}
.item-modal-date-padded {
  padding: 10px 20px 0;
}
.item-modal-date-tag {
  font-size: 10px; color: var(--text-muted); flex-shrink: 0; align-self: center;
}

/* "audit" tag — marks bugs/backlog items proposed by the AI audit agent */
.tag-audit {
  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; text-transform: uppercase; letter-spacing: 0.3px; white-space: nowrap;
}

/* ── Add project button ── */
.btn-add-project {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 12px;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(79,126,248,0.3);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  transition: background 0.12s;
}
.btn-add-project:hover { background: rgba(79,126,248,0.25); }

.btn-projects-toggle-all {
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  padding: 4px 10px;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(79,126,248,0.3);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  transition: background 0.12s;
}
.btn-projects-toggle-all:hover { background: rgba(79,126,248,0.25); }

.btn-projects-favorites-filter {
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  padding: 4px 10px;
  background: var(--accent-dim);
  color: var(--text-muted);
  border: 1px solid rgba(79,126,248,0.3);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  transition: background 0.12s, color 0.12s;
}
.btn-projects-favorites-filter:hover { background: rgba(79,126,248,0.25); }
.btn-projects-favorites-filter[aria-pressed="true"] { color: var(--yellow); }

/* ── Create repo button ── */
.btn-create-repo {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  background: none;
  color: var(--text-muted);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.12s;
  white-space: nowrap;
}
.btn-create-repo:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }


/* ── Sommeil d'un projet (bouton 🌙, cf. project-sleep.js) ── */
/* Bouton : mêmes déclarations que .btn-card-preview (preview.css), visible carte repliée. */
.btn-card-sleep {
  background: none;
  border: 1px solid transparent;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  font-size: 14px;
  line-height: 1;
  padding: 4px 6px;
  cursor: pointer;
  flex-shrink: 0;
  align-self: flex-start;
  opacity: 0.55;
}
.btn-card-sleep:hover { border-color: var(--accent); color: var(--accent); opacity: 1; }
.btn-card-sleep.is-asleep { border-color: var(--accent); background: var(--accent-dim); opacity: 1; }
.project-card.collapsed .btn-card-sleep { align-self: center; }

/* Carte endormie : contour en pointillés, contenu désaturé. Le filtre n'est PAS posé sur la carte
   entière : les pastilles Local et Prod (.card-env-inline) gardent leurs couleurs. */
.project-card.is-asleep,
.project-card.is-asleep:hover,
.project-card.is-asleep.project-card--selected,
.project-card.is-asleep.project-card--selected:hover { border-style: dashed; }
.project-card.is-asleep .card-header,
.project-card.is-asleep .project-details,
.project-card.is-asleep .card-footer { filter: saturate(.35); opacity: .72; }

.sleep-pill {
  font-size: 10px; padding: 1px 6px; border-radius: 8px; vertical-align: middle;
  border: 1px dashed var(--border); color: var(--text-muted, #94a3b8); white-space: nowrap;
}

/* Pastille Staging d'un projet en sommeil : gris neutre, jamais rouge. */
.env-asleep { background: transparent; color: var(--text-muted); border-color: var(--border); }
.env-pill.env-asleep.env-link { color: var(--text-muted); }
