/* Toisé — panneau de démonstration (hero + scène « Comment ça marche »)
   Composants partagés : onde vocale, puces détectées, lignes de devis, totaux. */

.demo {
  position: relative; overflow: hidden; background: #fff;
  border: 1px solid var(--frost); border-radius: var(--r);
  font-size: 14px;
}
.demo__bar { display: flex; align-items: stretch; height: 44px; background: var(--mist); border-bottom: 1px solid var(--frost); }
.demo__tabs { position: relative; display: flex; align-items: stretch; height: 100%; overflow-x: auto; scrollbar-width: none; }
.demo__tabs::-webkit-scrollbar { display: none; }
.demo__tab {
  padding: 0 16px; font: 400 13px/1 var(--font); color: var(--slate); white-space: nowrap;
  transition: color .25s, background-color .25s;
}
.demo__tab:hover { color: var(--ink); background: var(--frost); }
.demo__tab[aria-selected='true'] { color: var(--indigo); }
.demo__tabline {
  position: absolute; left: 0; bottom: 0; height: 2px; width: var(--w, 0); background: var(--indigo);
  transform: translateX(var(--x, 0)); transition: transform .5s var(--ease-out), width .5s var(--ease-out);
}
.demo__progress { height: 2px; background: var(--frost); }
.demo__progress i { display: block; height: 100%; background: var(--indigo); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }

.demo__body { display: grid; gap: 14px; padding: 16px; transition: opacity .3s, transform .3s var(--ease-out); }
.demo__body.is-swap { opacity: 0; transform: translateY(6px); }

.demo__label {
  display: flex; align-items: center; gap: 8px;
  font: 400 12px/1 var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--slate);
}
.demo__label .ico { width: 14px; height: 14px; color: var(--indigo); }
.demo__meta { margin-left: auto; letter-spacing: 0; text-transform: none; font-variant-numeric: tabular-nums; }

/* onde vocale : barres de 3 px pilotées par le JS (44 px dans la scène, 32 px dans le hero) */
.wave { display: flex; align-items: center; justify-content: space-between; height: 44px; margin: 12px 0 10px; }
.demo .wave { height: 32px; margin: 10px 0 8px; }
.wave i { flex: none; width: 3px; height: 6px; border-radius: 2px; background: var(--lilac); transition: background-color .2s; }
.wave i.on { background: var(--indigo); }
.demo__transcript { min-height: 44px; font-size: 14px; line-height: 1.5; letter-spacing: -.01em; color: var(--ink); }
.caret {
  display: inline-block; width: 1.5px; height: 1.05em; margin-left: 2px; vertical-align: -.16em;
  background: var(--indigo); animation: blink 1s steps(2, jump-none) infinite;
}
@keyframes blink { 0% { opacity: 1; } 100% { opacity: 0; } }

/* puces « postes détectés » */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; min-height: 28px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px 6px 8px;
  border: 1px solid var(--lilac); border-radius: 9999px; background: var(--mist);
  font: 400 12px/1 var(--font); color: var(--ink);
  opacity: var(--r, 0); transform: translateY(calc((1 - var(--r, 0)) * 6px)) scale(calc(.94 + .06 * var(--r, 0)));
}
.chip .ico { width: 12px; height: 12px; color: var(--indigo); }

/* devis : lignes qui remplacent leur squelette */
.quote { border: 1px solid var(--frost); border-radius: var(--r); overflow: hidden; background: #fff; }
.quote__head {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 14px;
  border-bottom: 1px solid var(--frost);
  font: 400 12px/1 var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--slate);
}
.quote__head span:last-child { letter-spacing: 0; text-transform: none; font-variant-numeric: tabular-nums; }
.qrow { position: relative; min-height: 46px; border-bottom: 1px solid var(--frost); }
.qrow__c {
  display: grid; grid-template-columns: minmax(0, 1fr) auto 14px; align-items: center; gap: 12px; padding: 7px 14px;
  opacity: var(--r, 0); transform: translateY(calc((1 - var(--r, 0)) * 10px));
}
.qrow__t { display: block; font: 400 13px/1.25 var(--font); color: var(--ink); }
.qrow__m { display: block; margin-top: 2px; font: 300 12px/1.3 var(--font); color: var(--slate); font-variant-numeric: tabular-nums; }
.qrow__s { font: 400 14px/1 var(--font); font-variant-numeric: tabular-nums; white-space: nowrap; }
.qrow .tick { width: 14px; height: 14px; color: var(--indigo); stroke-dasharray: 22; stroke-dashoffset: calc(22px * (1 - var(--r, 0))); }
.qrow__sk {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-between; padding: 0 14px;
  opacity: calc(1 - var(--r, 0)); pointer-events: none;
}
.qrow__sk i {
  display: block; height: 8px; border-radius: 2px;
  background: linear-gradient(90deg, var(--frost) 0%, var(--mist) 50%, var(--frost) 100%); background-size: 200% 100%;
  animation: shimmer 1.6s linear infinite;
}
.qrow__sk i:first-child { width: 58%; }
.qrow__sk i:last-child { width: 14%; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

.totals { display: grid; gap: 4px; padding: 10px 14px; background: var(--mist); font-size: 12.5px; }
.totals div { display: flex; justify-content: space-between; gap: 12px; color: var(--slate); }
.totals b { font-weight: 400; font-variant-numeric: tabular-nums; }
.totals .ttc { margin-top: 4px; padding-top: 8px; border-top: 1px solid var(--frost); color: var(--ink); font-size: 15px; }

/* pied : statut + envoi */
.demo__foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px; border-top: 1px solid var(--frost);
}
.status { display: flex; align-items: center; gap: 8px; min-width: 0; font: 400 13px/1.2 var(--font); color: var(--slate); }
.status i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--lilac); transition: background-color .3s; }
.status span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status.is-busy i { background: var(--indigo); animation: pulse 1.1s ease-in-out infinite; }
.status.is-done i { background: var(--indigo); }
.status.is-done { color: var(--ink); }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }

.demo__foot .btn { flex: none; }
.btn.is-ready { outline: 1px solid var(--indigo); animation: ring 1.8s var(--ease-out) infinite; }
@keyframes ring {
  0% { outline-color: rgba(83, 58, 253, .55); outline-offset: 0; }
  100% { outline-color: rgba(83, 58, 253, 0); outline-offset: 9px; }
}
.btn.is-press { transform: scale(.95); transition: transform .12s; }
.btn.is-sent { background: var(--wash); color: var(--indigo); outline: 0; animation: none; }

.demo__note { margin-top: 14px; font-size: 12px; line-height: 1.4; color: var(--slate); }

@media (max-width: 520px) {
  .demo__body { padding: 14px; gap: 14px; }
  .demo__transcript { min-height: 64px; }
  .demo__foot { padding: 10px 12px; }
  .status span { white-space: normal; overflow: visible; }
}
