/* Démo « Aperçu » Snorklee AI sur la home — porté du dashboard (mêmes tokens
   via tokens.css). Inclut mini-graphes + texte vivant (chiffres surlignés). */

/* Texte vivant (rich-text) */
.ai-demo-a .rich-p { margin: 0 0 6px; line-height: 1.55; color: var(--tx); }
.ai-demo-a .rich-p:last-child { margin-bottom: 0; }
.rich-num { font-weight: 650; color: var(--ac); }
.rich-dur { font-weight: 600; color: var(--tx); }
.rich-path {
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 0.92em;
  color: var(--tx2);
  background: color-mix(in srgb, var(--ac) 8%, transparent);
  padding: 0.02em 0.32em;
  border-radius: 5px;
}
.rich-delta { font-weight: 700; }
.rich-up { color: #15803d; }
.rich-down { color: #b42318; }

/* Figure de graphe */
.ai-chart {
  margin: 0.9rem 0 0.2rem;
  padding: 0.9rem 1rem 1rem;
  background: color-mix(in srgb, var(--ac) 4%, var(--card, #fff));
  border: 1px solid var(--bd2);
  border-radius: 16px;
}
.ai-chart-title {
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--tx3);
  margin-bottom: 0.6rem;
}
.mc-svg { display: block; width: 100%; height: auto; max-width: 100%; }
.mc-line { height: 200px; }
.mc-peak-label { font-size: 12px; font-weight: 700; fill: var(--ac); }
.mc-axis-label { font-size: 11px; fill: var(--tx3); }

/* Barres horizontales */
.mc-bars { display: flex; flex-direction: column; gap: 0.5rem; }
.mc-bar-row {
  display: grid;
  grid-template-columns: minmax(64px, 30%) 1fr auto;
  align-items: center;
  gap: 0.6rem;
}
.mc-bar-label {
  font-size: 0.86rem;
  color: var(--tx2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mc-bar-track {
  position: relative;
  height: 10px;
  background: var(--bd);
  border-radius: 999px;
  overflow: hidden;
}
.mc-bar-fill { display: block; height: 100%; border-radius: 999px; }
.mc-bar-value {
  font-size: 0.86rem;
  font-weight: 650;
  color: var(--tx);
  font-variant-numeric: tabular-nums;
}

/* Donut + légende */
.mc-donut-wrap { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; }
.mc-donut { width: 150px; height: 150px; flex: 0 0 auto; }
.mc-legend {
  list-style: none; margin: 0; padding: 0;
  flex: 1 1 180px; max-width: 280px;
  display: flex; flex-direction: column; gap: 0.35rem;
}
.mc-legend li { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0.5rem; }
.mc-legend-dot { width: 10px; height: 10px; border-radius: 3px; }
.mc-legend-name { font-size: 0.86rem; color: var(--tx2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-legend-val { font-size: 0.86rem; font-weight: 650; color: var(--tx); font-variant-numeric: tabular-nums; }

/* Comparaison */
.mc-compare { display: flex; flex-direction: column; gap: 0.5rem; }
.mc-compare-delta { align-self: flex-end; font-size: 0.92rem; font-weight: 700; }

/* Carte démo */
.ai-demo {
  margin: 0;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--ac) 24%, var(--bd));
  border-radius: var(--radius-lg, 16px);
  background: linear-gradient(160deg, color-mix(in srgb, var(--ac) 9%, var(--bg2)), var(--bg2) 62%);
  box-shadow: var(--shadow-1, 0 1px 2px rgba(0, 0, 0, 0.05));
  overflow-x: hidden;
}
.ai-demo-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.ai-demo-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 750;
  font-size: var(--text-sm);
  color: var(--ac);
}
.ai-demo-mascot { display: inline-flex; width: 26px; height: 26px; flex: 0 0 auto; }
.ai-demo-mascot svg { width: 100%; height: 100%; }
.ai-demo-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--ac2);
  color: var(--ac);
  font-size: 0.72rem;
  font-weight: 650;
  white-space: nowrap;
}
.ai-demo-stage {
  min-height: 188px;
  padding: 14px;
  border-radius: var(--radius-md, 12px);
  background: var(--bg2);
  border: 1px solid var(--bd);
}
.ai-demo-q {
  margin: 0 0 8px;
  font-size: clamp(1.02rem, 1.6vw, 1.18rem);
  font-weight: 700;
  color: var(--tx);
  line-height: 1.35;
}
.ai-demo-q::before { content: "“"; color: var(--ac); font-weight: 800; margin-right: 2px; }
.ai-demo-q::after { content: "”"; color: var(--ac); font-weight: 800; margin-left: 2px; }
.ai-demo-a { margin: 0 0 10px; color: var(--tx); line-height: 1.55; }
.ai-demo-chart { margin: 6px 0 4px; }
.ai-demo-try {
  display: inline-block;
  margin-top: 8px;
  color: var(--ac);
  font-weight: 650;
  font-size: var(--text-sm);
  text-decoration: none;
}
.ai-demo-try:hover { text-decoration: underline; }
.ai-demo-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ai-demo-chip {
  border: 1px solid var(--bd);
  border-radius: 999px;
  min-height: 34px;
  padding: 6px 13px;
  background: var(--bg2);
  color: var(--tx);
  font: inherit;
  font-size: var(--text-sm);
  cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
}
.ai-demo-chip:hover { border-color: var(--ac); background: var(--ac2); }
.ai-demo-chip.is-active { color: #fff; border-color: var(--ac); background: var(--ac); font-weight: 650; }
