/* ═══════════════════════════════════════════════════════════
   DÉMO EN DIRECT — section #demo + bouton du hero.
   N'utilise que les tokens de styles.css (couleurs, polices, rayon).
   ═══════════════════════════════════════════════════════════ */

[hidden] { display: none !important; }

/* ═══════════ BOUTON DU HERO ═══════════ */
.hero-actions {
  position: absolute; left: 50%; top: 64%;
  transform: translateX(-50%);
  z-index: 3; pointer-events: auto;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 12px;
  width: max-content; max-width: calc(100vw - 2 * var(--gutter));
}
.hero-cta, .hero-demo {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 16px;
  border-radius: var(--radius);
  white-space: nowrap;
  transition: background .3s var(--ease-out), color .3s var(--ease-out), filter .3s, box-shadow .3s;
}
.hero-cta { background: var(--lime); color: var(--lime-ink); }
.hero-cta:hover { filter: brightness(1.08); }
.hero-demo { border: 1px solid var(--ink); color: var(--ink); }
.hero-demo:hover { background: var(--ink); color: var(--bone); }
body.static .hero-actions { position: static; transform: none; margin-top: 28px; }

/* lueur d'accent sur les boutons principaux : touche « néon » discrète */
.hero-cta, .dock-cta, .demo-btn { box-shadow: 0 0 22px -4px var(--lime); }

/* ═══════════ SECTION ═══════════ */
/* même fond que le panneau « solution » juste au-dessus : pas de couture.
   Le bas est généreux, car la bande d'accent remonte de 20vh dessus. */
.demo {
  position: relative; z-index: 2;
  background: var(--white);
  padding: 2vh var(--gutter) calc(14vh + 20vh);
}
.demo-head { text-align: center; margin-bottom: 7vh; }
.demo-title { font-size: var(--t-heading); letter-spacing: -0.02em; margin: 16px 0 10px; }
.demo-sub { color: var(--ash); max-width: 34em; margin: 0 auto; }
.demo-wrap { max-width: 760px; margin: 0 auto; }

/* ═══════════ FORMULAIRE ═══════════ */
.demo-form { display: grid; gap: 22px; }
.demo-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.demo-field { display: grid; gap: 8px; min-width: 0; }
.demo-field label { display: block; }

.demo-field input,
.demo-field select,
.demo-field textarea {
  width: 100%;
  font: inherit; font-size: 17px; letter-spacing: inherit;
  color: var(--ink);
  background: var(--bone);
  border: 1px solid var(--ink-faint);
  border-radius: var(--radius);
  padding: 14px 16px;
  transition: border-color .25s var(--ease-out);
}
.demo-field textarea { resize: vertical; min-height: 120px; line-height: 1.4; }
.demo-field input::placeholder,
.demo-field textarea::placeholder { color: var(--ash); opacity: .8; }
.demo-field input:focus,
.demo-field select:focus,
.demo-field textarea:focus { outline: 2px solid var(--lime); outline-offset: 1px; border-color: var(--ink); }
.demo-field select {
  appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 44px;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 22px) 55%, calc(100% - 16px) 55%;
  background-size: 6px 6px; background-repeat: no-repeat;
}
.demo-field select option { background: var(--bone); color: var(--ink); }

.demo-meta { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; min-height: 18px; }
.demo-err { color: var(--ink); font-size: 15px; line-height: 1.35; }
.demo-err:not(:empty)::before { content: '— '; color: var(--ash); }
.demo-count { margin-left: auto; white-space: nowrap; }

.demo-examples { display: grid; gap: 10px; }
.demo-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.demo-chip {
  font: inherit; font-size: 15px; line-height: 1.3; letter-spacing: inherit;
  text-align: left; cursor: pointer;
  color: var(--ink); background: transparent;
  border: 1px solid var(--ink-faint);
  border-radius: var(--radius);
  padding: 9px 12px;
  transition: border-color .25s var(--ease-out), background .25s var(--ease-out);
}
.demo-chip:hover { border-color: var(--ink); }
.demo-chip:focus-visible { outline: 2px solid var(--lime); outline-offset: 1px; }

/* champ piège : hors écran, jamais display:none (certains robots l'ignorent) */
.demo-hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.demo-btn {
  display: inline-block; justify-self: start;
  background: var(--lime); color: var(--lime-ink);
  border: 0; border-radius: var(--radius);
  padding: 16px 24px; cursor: pointer;
  font-size: 13px;
  transition: filter .3s, opacity .3s;
}
.demo-btn:hover { filter: brightness(0.96); }
.demo-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.demo-btn:disabled { opacity: .5; cursor: not-allowed; filter: none; }
.demo-note { color: var(--ash); font-size: 14px; line-height: 1.45; max-width: 36em; }

.demo-limit {
  display: grid; gap: 20px; justify-items: start;
  padding: 28px;
  border: 1px solid var(--ink-faint);
  border-radius: var(--radius);
  background: var(--bone);
}

/* ═══════════ CONVERSATION ═══════════ */
.demo-result { max-width: 760px; margin: 44px auto 0; }
.demo-thread { display: grid; gap: 14px; }
.demo-msg {
  max-width: min(560px, 88%);
  padding: 14px 18px;
  border-radius: var(--radius);
  font-size: 17px; line-height: 1.45;
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.demo-msg--client { justify-self: end; background: var(--lime); color: var(--lime-ink); }
.demo-msg--bot { justify-self: start; background: var(--bone); border: 1px solid var(--ink-faint); max-width: min(640px, 94%); }
.demo-badge {
  justify-self: start; margin-bottom: -6px;
  color: var(--ash);
}
.demo-badge b { color: var(--ink); font-weight: 500; }

/* texte + calque d'écriture dans la même case : la bulle a sa hauteur finale
   dès le début, la page ne saute pas pendant que le texte s'écrit */
.demo-text { display: grid; }
.demo-text > * { grid-area: 1 / 1; white-space: pre-wrap; overflow-wrap: anywhere; }
.demo-sizer { visibility: hidden; }
.demo-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.demo-wait { display: flex; align-items: center; gap: 12px; color: var(--ash); }
.demo-dots { display: inline-flex; gap: 5px; }
.demo-dots i {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ink); opacity: .25;
  animation: demo-dot 1.1s infinite ease-in-out;
}
.demo-dots i:nth-child(2) { animation-delay: .18s; }
.demo-dots i:nth-child(3) { animation-delay: .36s; }
@keyframes demo-dot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

.demo-fallback a { text-decoration: underline; text-underline-offset: 3px; }
.demo-after { margin-top: 26px; }

@media (max-width: 640px) {
  .demo-row { grid-template-columns: 1fr; }
  .demo-btn { justify-self: stretch; text-align: center; }
  .demo-msg, .demo-msg--bot { max-width: 100%; }
  .demo-limit { padding: 20px; }
  .demo-head { margin-bottom: 5vh; }
}

/* le libellé du bouton du haut est long : la barre ne doit jamais passer sur deux lignes */
.dock, .dock-cta, .dock-wordmark { white-space: nowrap; }

/* « Veuillez choisir » : grisé tant qu'aucun métier n'est sélectionné */
.demo-field select:required:invalid { color: var(--ash); }

/* page 404 */
.nf { min-height: 100vh; display: grid; place-content: center; justify-items: start; gap: 22px; padding: var(--gutter); }
.nf-title { font-size: var(--t-heading); letter-spacing: -0.02em; }

/* ═══════════ 4 CARTES SUR TÉLÉPHONE ═══════════
   Sous 480 px la grille n'a qu'une colonne : les cartes « large » qui
   demandaient 2 colonnes en créaient une 2e (cartes superposées et coupées).
   Une carte par ligne, chacune avec le ratio de son dessin. */
@media (max-width: 480px) {
  .bento-grid { grid-template-columns: minmax(0, 1fr); grid-auto-rows: auto; }
  .bento-grid .b-big, .bento-grid .b-tall { grid-column: auto; grid-row: auto; }
  .bento-grid .card-img { flex: none; width: 100%; min-height: 0; }
  .bento-grid .b-big .card-img { aspect-ratio: 4 / 3; }
  .bento-grid .b-tall .card-img { aspect-ratio: 4 / 5; }
}

/* ═══════════ RÉACTIVITÉ TACTILE ═══════════ */
html { overscroll-behavior-y: none; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
a, button, select, label { touch-action: manipulation; }
body { -webkit-tap-highlight-color: transparent; }

/* ═══════════ RÉSERVATION D'UN APPEL (#reserver) ═══════════ */
.book { position: relative; z-index: 2; background: var(--bone); padding: 14vh var(--gutter) 6vh; }
.book .demo-field input, .book .demo-field select, .book .demo-field textarea { background: var(--white); }
.demo-field label span { text-transform: none; letter-spacing: 0; opacity: .8; }
.book-consent { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.4; color: var(--ash); cursor: pointer; }
.book-consent input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--lime); cursor: pointer; }
.book .demo-err { min-height: 0; }
.book-done { display: grid; gap: 8px; padding: 28px; border: 1px solid var(--ink-faint); border-radius: var(--radius); background: var(--white); }
.book-done:focus { outline: none; }
.book-done-title { font-size: 22px; letter-spacing: -0.01em; }
