/* ============================================================
   08 — DEMO « Même prompt. Deux résultats. »
   Figma : OOjXOqpdlvsMfWGqmVWN6c / node 7206:7893 (1440×1149, y=6604) — v2
   ============================================================ */

.demo {
  background: var(--color-white);
  padding-inline: clamp(20px, 8.33vw, 120px);
}

.demo__container {
  max-width: 1136px; /* hors tokens: mesuré Figma (cards 553+30+553) */
  margin-inline: auto;
}

/* ---------- Header ---------- */

.demo__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Pilule eyebrow : anneau blanc + remplissage dégradé + texte dégradé */
.demo__eyebrow {
  margin: 0;
  display: inline-flex;
  padding: 2px; /* 34px ext. − 28px int. − 2×1px bordure */
  background: var(--color-white);
  border: 1px solid rgba(229, 231, 233, 0.5); /* --color-border à 50% */
  border-radius: 70px; /* hors tokens: mesuré Figma (proche --radius-pill) */
  box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.05);
}

.demo__eyebrow-fill {
  display: inline-flex;
  align-items: center;
  padding-inline: 14px;
  height: 28px;
  border-radius: 70px;
  background: linear-gradient(90deg, #fff1ed 0%, #f0efff 100%); /* hors tokens: mesuré Figma */
}

.demo__eyebrow-text {
  font-family: var(--font-sans);
  font-size: var(--text-eyebrow);
  line-height: var(--text-eyebrow--line-height);
  letter-spacing: var(--text-eyebrow--letter-spacing);
  font-weight: var(--text-eyebrow--font-weight);
  text-transform: uppercase;
  background: linear-gradient(90deg, var(--color-accent-coral) 0%, var(--color-primary-vivid) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.demo__title {
  margin: 19px 0 0;
  max-width: 1135px;
  font-family: var(--font-sans);
  font-size: clamp(32px, 4.5vw, var(--text-h2));
  line-height: 1.04; /* 56/54 */
  letter-spacing: var(--text-h2--letter-spacing);
  font-weight: var(--text-h2--font-weight);
  color: #2d2d2d; /* hors tokens: mesuré Figma */
}

.demo__subtitle {
  margin: 25px 0 0;
  max-width: 736px;
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: 22px; /* hors tokens: mesuré Figma (16/22) */
  font-weight: 400;
  color: var(--color-black);
}

/* ---------- Grille de cards ---------- */


/* ---------- Étoiles de fond (Figma 7206:8042 / 7206:8043) ----------
   Posées sur la grille, AVANT les cards dans le DOM : elles passent donc
   derrière la card blanche et ne dépassent que sur les bords. Repères
   maquette : 95×93 @ (1227, 7458) et 100×98 @ (1305, 7327), grille à
   x=152 / y=6826. */
.demo__bg-star {
  position: absolute;
  pointer-events: none;
  opacity: 0.55;
  filter: blur(1.5px);
}

.demo__bg-star--lg { top: 632px; left: calc(100% - 61px); width: 95px;  height: 93px; }
.demo__bg-star--sm { top: 501px; left: calc(100% + 17px); width: 100px; height: 98px; filter: blur(6px); opacity: 0.4; }

.demo__grid {
  position: relative; /* ancre les étoiles de fond */
  margin-top: 66px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 30px;
  row-gap: 25px;
}

.demo__card {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 28px 31px;
  overflow: hidden;
}

.demo__card--plain {
  background: rgba(244, 246, 247, 0.5); /* --color-surface à 50% */
  border: 1px solid var(--color-border);
}

.demo__card--elevated {
  background: var(--color-white);
  box-shadow: 0 10px 40px 0 rgba(0, 0, 0, 0.1);
}

.demo__card--input {
  display: flex;
  flex-direction: column;
  min-height: 519px;
}

.demo__card--verdict {
  min-height: 215px;
}

.demo__card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.demo__card-title {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-h5);
  line-height: var(--text-h5--line-height);
  letter-spacing: var(--text-h5--letter-spacing);
  font-weight: var(--text-h5--font-weight);
  color: var(--color-ink);
}

.demo__gradient-text {
  background: linear-gradient(90deg, var(--color-accent-coral) 0%, #705ff5 100%); /* #705ff5 hors tokens: mesuré Figma */
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Tag MCP : anneau blanc + pilule violette */
.demo__tag-mcp {
  display: inline-flex;
  padding: 2px;
  background: var(--color-white);
  border: 1px solid rgba(229, 231, 233, 0.5);
  border-radius: 70px;
  box-shadow: 0 4px 20px 0 rgba(117, 96, 240, 0.25);
}

.demo__tag-mcp-fill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  min-width: 67px;
  border-radius: 70px;
  background: #7560f0; /* hors tokens: mesuré Figma (proche --color-primary) */
  font-family: var(--font-sans);
  font-size: var(--text-eyebrow);
  line-height: var(--text-eyebrow--line-height);
  letter-spacing: var(--text-eyebrow--letter-spacing);
  font-weight: var(--text-eyebrow--font-weight);
  text-transform: uppercase;
  color: var(--color-white);
}

/* ---------- Barre de saisie Claude ---------- */

.demo__prompt {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px 24px 16px;
  background: var(--color-white);
  border: 1px solid #e6e6e6; /* hors tokens: mesuré Figma */
  border-radius: var(--radius-lg);
}

.demo__prompt-text {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: normal;
  font-weight: 400;
  color: #9a9a9a; /* hors tokens: mesuré Figma */
}

.demo__prompt-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.demo__prompt-tools {
  display: flex;
  align-items: center;
  gap: 16px;
}

.demo__prompt-model {
  display: flex;
  align-items: center;
  gap: 6px;
}

.demo__prompt-model-name {
  font-family: var(--font-sans);
  font-size: var(--text-body-sm);
  font-weight: 600;
  color: #1b1815; /* hors tokens: mesuré Figma */
}

.demo__prompt-model-effort {
  font-family: var(--font-sans);
  font-size: var(--text-body-sm);
  font-weight: 500;
  color: #9a9a9a; /* hors tokens: mesuré Figma */
}

/* ---------- Zone résultat (aperçu maquette) ---------- */

.demo__screen {
  position: relative;
  margin: 24px 0 0;
  flex: 1;
  min-height: 368px;
  background: var(--color-white);
  border: 0.698px solid rgba(229, 231, 233, 0.3); /* --color-border à 30% */
  border-radius: 10.226px; /* hors tokens: mesuré Figma */
  overflow: hidden;
}

.demo__screen--elevated {
  box-shadow:
    0 10.471px 20.941px -10.471px rgba(203, 209, 213, 0.16),
    0 13.961px 34.902px -17.451px rgba(203, 209, 213, 0.2),
    0 15.357px 30.714px 0 rgba(203, 209, 213, 0.4);
}

.demo__screen-img {
  position: absolute; /* décor : recadrage identique à la maquette */
  left: -77.53px;
  top: -450.41px;
  width: 542.397px;
  height: 542.397px;
  max-width: none;
}

/* ---------- Cards verdict ---------- */

.demo__verdict-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.demo__verdict-list {
  margin: 6px 0 0; /* v2 : liste remontée sous le titre (mesuré Figma : ul 66px, titre 28+32) */
  padding-left: 24px;
  max-width: 409px;
  font-family: var(--font-display);
  font-size: var(--text-body);
  line-height: var(--text-body--line-height);
  font-weight: 400;
  color: var(--color-ink);
  opacity: 0.7;
}

.demo__star {
  position: absolute;
  right: 64px; /* v2 : 553 − 441 − 48 */
  top: 52px;
}


/* ---------- Icônes Lucide (retours 13/08) ----------
   Les icônes exportées de Figma (cube générique, plus/mic/waveform) sont
   remplacées par des Lucide inline, choisies selon le contenu :
   triangle-alert / sparkles pour les verdicts, plus / chevron-down / mic /
   audio-lines pour la barre de saisie. Elles héritent de currentColor. */
.demo .lucide {
  display: block;
  flex: none;
  stroke: currentColor;
  fill: none;
}

.demo__verdict-head .lucide { width: 24px; height: 24px; }

.demo__card--verdict.demo__card--plain    .demo__verdict-head .lucide { color: var(--color-accent-coral); }
.demo__card--verdict.demo__card--elevated .demo__verdict-head .lucide { color: var(--color-primary-vivid); }

.demo__prompt-icon.lucide { width: 20px; height: 20px; color: rgba(38, 41, 46, 0.55); }
.demo__prompt-model .lucide { width: 14px; height: 14px; color: rgba(38, 41, 46, 0.55); }

/* ---------- Conclusion (ligne + pilule) ---------- */

.demo__conclusion {
  position: relative;
  margin-top: 54px;
  padding-bottom: 80px; /* v2 : +80px — la ligne passe sous la pilule, en bas de section (1149 vs 1069) */
  display: flex;
  justify-content: center;
  /* full-bleed : annule le padding latéral de la section */
  margin-inline: calc(-1 * clamp(20px, 8.33vw, 120px));
}

.demo__conclusion-line {
  position: absolute;
  bottom: 0; /* v2 : la ligne n'est plus centrée sur la pilule, elle clôt la section */
  left: 0;
  width: 100%;
  height: 1px;
}

.demo__conclusion-pill {
  position: relative;
  margin: 0;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 24px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 70px;
  box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.05);
  font-family: var(--font-sans);
  font-size: var(--text-body-sm);
  line-height: var(--text-body-sm--line-height);
  font-weight: 400;
  color: rgba(38, 41, 46, 0.7); /* --color-ink à 70% */
}

.demo__conclusion-pill strong {
  font-weight: 500;
}

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
  .demo__bg-star { display: none; } /* plus de marge à droite une fois la grille resserrée */

  .demo__grid {
    column-gap: 20px;
  }

  .demo__card--input {
    min-height: 0;
  }

  .demo__screen {
    min-height: 280px;
  }
}

@media (max-width: 768px) {
  .demo__grid {
    grid-template-columns: 1fr;
    row-gap: 20px;
  }

  .demo__card {
    padding: 24px 20px;
  }

  .demo__card--verdict {
    min-height: 0;
  }

  .demo__star {
    right: 24px;
    top: 24px;
  }
}


/* --- retours 13/08 : une SEULE étoile dans la card « Résultat premium ».
   La seconde (.demo__verdict-star, posée à top:-18px) était de toute façon
   rognée par l'overflow:hidden de la card — .demo__star reprend la position
   exacte de la maquette (Figma 7206:8041). --------------------------------- */
.demo__card--verdict.demo__card--elevated { position: relative; }
