/* ═══════════════════════════════════════════════════════════════════════
   Recrutement : compléments au design system de XYZ Panel.
   app.css est une copie conforme de celui de XYZ Panel : ne pas le modifier,
   tout ce qui est propre à ce panel vit ici, avec les mêmes tokens.
   ═══════════════════════════════════════════════════════════════════════ */

[hidden] { display: none !important; }

/* Compteur dans le menu (« À valider ») */
.nav-count {
  margin-left: auto;
  min-width: 20px;
  height: 18px;
  padding: 0 6px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #0b0b0d;
  background: var(--color-accent);
  box-shadow: 0 0 10px -2px rgba(var(--accent-rgb), 0.6);
}
@media (max-width: 900px) {
  .nav-link { position: relative; }
  .nav-count { position: absolute; top: 4px; right: 6px; min-width: 8px; width: 8px; height: 8px; padding: 0; font-size: 0; }
}

/* Topbar */
.topbar .live-toggle { text-decoration: none; }
.stat-link { display: block; color: inherit; transition: border-color 0.15s, transform 0.15s; }
.stat-link:hover { border-color: var(--color-line-strong); }
.title-count { font-size: 15px; font-weight: 500; color: var(--color-ink-4); }

/* Mise en route */
.setup-steps { margin-bottom: 0; }
.setup-step { color: inherit; transition: border-color 0.12s, background 0.12s; }
.setup-step:hover { border-color: var(--color-line-strong); background: #1a1a1f; }
.setup-step.is-done { opacity: 0.6; }
.setup-step.is-done .step-name { text-decoration: line-through; text-decoration-color: rgba(255, 255, 255, 0.3); }
.app-tile .num { position: relative; z-index: 1; font-size: 13px; font-weight: 700; }
.step-help code, .help code, .kbd-code, .howto code {
  font-family: var(--mono);
  font-size: 0.92em;
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--color-subtle);
  border: 1px solid var(--color-line);
  color: var(--color-ink);
}

/* Entonnoir */
.funnel { display: flex; flex-direction: column; gap: 14px; }
.funnel-top { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 6px; font-size: 13px; color: var(--color-ink-2); }
.funnel-top b { color: var(--color-ink); font-weight: 600; }
.funnel .bar { flex: none; height: 6px; }

/* Répartition des réponses */
.dist { display: flex; flex-direction: column; gap: 12px; }
.dist-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px 12px; align-items: center; }
.dist-label { min-width: 0; font-size: 13px; color: var(--color-ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dist-label .badge { margin-left: 4px; }
.dist-num { font-size: 12.5px; color: var(--color-ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.dist-num b { color: var(--color-ink); font-weight: 600; }
.dist .bar { grid-column: 1 / -1; flex: none; height: 6px; }
.bar-fill.bad { background: var(--color-bad); box-shadow: 0 0 10px rgba(248, 113, 113, 0.4); }
.bar-fill.muted-fill { background: var(--color-ink-4); box-shadow: none; }
.section-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; margin: 4px 0 12px; }
.q-grid .panel { margin-top: 0; }

/* Graphique des contacts : passent (vert) · éliminés (rouge) · pas finis (gris) */
.chart-stack .s-bad { background: var(--color-bad); }
.chart-stack .s-idle { background: var(--series-other); }
.chart-tip .o { color: var(--color-bad); }

.answers .kv > :last-child { max-width: 62%; }
.answer-reject { color: #fca5a5; }

/* Questions d'une campagne */
.tabs-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; overflow-x: auto; }
.tabs-bar .segmented svg { width: 14px; height: 14px; }
.q-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px 12px 12px 16px; border-bottom: 1px solid rgba(39, 39, 44, 0.65); }
.q-row:last-child { border-bottom: 0; }
.q-row.is-off { opacity: 0.5; }
.q-num {
  width: 24px;
  height: 24px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: var(--color-subtle);
  font-size: 12px;
  font-weight: 600;
  color: var(--color-ink-3);
  font-variant-numeric: tabular-nums;
}
.q-main { flex: 1; min-width: 0; }
.q-title { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 13.5px; font-weight: 600; }
.q-prompt { margin-top: 3px; font-size: 13px; color: var(--color-ink-3); overflow-wrap: anywhere; }
.q-opts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.q-opts .badge svg { width: 10px; height: 10px; }
.q-actions { display: flex; align-items: center; gap: 2px; flex: none; }
.q-actions form { display: inline-flex; }
.icon-btn:disabled { opacity: 0.3; cursor: default; }
.icon-btn:disabled:hover { background: transparent; color: var(--color-ink-3); }
.check-row { display: flex; flex-wrap: wrap; gap: 10px 20px; }
.opt-checks { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.opt-check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 9px;
  border-radius: 8px;
  border: 1px solid var(--color-line);
  background: var(--chrome);
  font-size: 13px;
  color: var(--color-ink-2);
  cursor: pointer;
}
.opt-check:has(input:checked) { border-color: rgba(248, 113, 113, 0.45); background: rgba(248, 113, 113, 0.06); color: #fca5a5; }
.opt-check input { accent-color: var(--color-bad); }
.option-card .app-tile { flex: none; }
.table tr.is-off td { opacity: 0.55; }

/* Liens à copier */
.copy-field { display: flex; align-items: center; gap: 6px; min-width: 0; }
.copy-field .input { flex: 1; min-width: 0; font-family: var(--mono); font-size: 12.5px; }
.input.mono { font-family: var(--mono); font-size: 13px; }

/* Réglages */
.admin-code { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 10px 0; padding: 10px 12px; border-radius: 10px; background: var(--chrome); border: 1px solid var(--color-line); }
.admin-code form { display: inline-flex; }
.big-code { margin-right: auto; font-family: var(--mono); font-size: 17px; font-weight: 600; letter-spacing: 0.04em; color: var(--color-accent); }
.howto { padding-left: 18px; font-size: 13px; line-height: 1.6; color: var(--color-ink-2); }
.howto a { color: var(--color-accent); }
.panel-title .app-tile { margin-right: 2px; }
.danger-zone { border-color: rgba(248, 113, 113, 0.22); }
.page-grid > .panel { margin-top: 0; }

/* Divers */
.cell-trunc { display: inline-block; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
.ident-sub.cell-trunc { display: block; }
.grow-field { flex: 1 1 220px; }
.grow-field .input { width: 100%; }
.select-auto { width: auto; max-width: 260px; }
.feed-msg a:hover { color: var(--color-accent); }
.panel + .panel { margin-top: 16px; }
.grid-2 > div > .panel + .panel { margin-top: 16px; }

@media (max-width: 640px) {
  .profile-actions { width: 100%; }
  .q-row { flex-wrap: wrap; }
  .q-actions { width: 100%; justify-content: flex-end; }
  .cell-trunc { max-width: 120px; }
}
