/* Twinrun — écran de l'outil de comparaison. Téléphone d'abord. */

.tool-main { padding-top: 8px; padding-bottom: 56px; }
.status { min-height: 1.5em; }
.status.error { color: #ff9a8a; }

/* Étape 1 */
.start { max-width: 520px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; padding-top: 16px; }
.start h1 { font-family: var(--display); font-weight: 700; font-size: clamp(38px, 10vw, 56px); line-height: 1; letter-spacing: -0.035em; }
.how { margin: 0; padding: 0; list-style: none; counter-reset: n; display: flex; flex-direction: column; gap: 16px; }
.how li { counter-increment: n; position: relative; padding: 16px 0 0 38px; color: var(--muted); border-top: 1px solid var(--line); }
.how li::before { content: "0" counter(n); position: absolute; left: 0; top: 18px; font-family: var(--display); font-size: 14px; color: var(--accent); }
.how b { color: var(--text); font-weight: 600; display: block; }
body.dragging .start { outline: 2px dashed var(--accent); outline-offset: 12px; border-radius: 12px; }

/* Étape 2 */
.app { display: flex; flex-direction: column; gap: 28px; align-items: center; }
.player { width: 100%; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.stage {
  --ar: 0.5625;
  position: relative;
  width: min(100%, calc(64vh * var(--ar)));
  aspect-ratio: 9 / 16;
  background: #000;
  border-radius: 20px;
  overflow: hidden;
}
.stage video, .stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.badge { position: absolute; top: 12px; left: 12px; background: var(--accent); color: #0a0a0a; font-weight: 700; font-size: 12px; letter-spacing: .08em; padding: 4px 10px; border-radius: 999px; }
.busy { position: absolute; left: 10px; right: 10px; bottom: 10px; background: rgba(10, 10, 10, .9); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px 14px; font-size: 14px; }
.busy-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.bar { display: block; height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; }
.bar > * { display: block; height: 100%; width: 0; background: var(--accent); }

.controls, .scrub, .toggles { width: 100%; max-width: 520px; display: flex; gap: 10px; align-items: center; }
.controls .btn { flex: 1; padding: 0 12px; }
.controls .btn[aria-pressed=true] { background: var(--text); border-color: var(--text); color: #0a0a0a; }
.scrub input { flex: 1; min-width: 0; height: 44px; accent-color: var(--accent); }
.scrub span { white-space: nowrap; font-variant-numeric: tabular-nums; }
.chip {
  flex: 1; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--text);
  font: inherit; font-size: 14px; font-weight: 500; cursor: pointer;
}
.chip i { width: 10px; height: 10px; border-radius: 50%; }
.chip i.me { background: var(--me); }
.chip i.twin { background: var(--twin); }
.chip[aria-pressed=false] { color: var(--faint); text-decoration: line-through; }
.chip[aria-pressed=false] i { background: var(--line); }
.chip:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }

.result { width: 100%; max-width: 520px; display: flex; flex-direction: column; gap: 24px; }
.advice { border: 1px solid #5a4200; background: #1c1500; color: #ffd27a; border-radius: 14px; padding: 14px 16px; font-size: 15px; }
.metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.metric { border: 1px solid var(--line); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.metric .label { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.metric .value { font-family: var(--display); font-weight: 700; font-size: 40px; line-height: 1.1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.metric .value small { font-family: Inter, sans-serif; font-size: 13px; font-weight: 500; color: var(--faint); letter-spacing: 0; margin-left: 6px; }
.read { display: flex; flex-direction: column; gap: 14px; }
.read h2, .result .price-card h2 { font-family: var(--display); font-size: 24px; letter-spacing: -0.02em; }
.result .price-card { padding: 24px; gap: 16px; }
a[aria-disabled=true] { opacity: .5; pointer-events: none; }

@media (min-width: 900px) {
  .app { flex-direction: row; align-items: flex-start; justify-content: center; gap: 48px; }
  .player { width: auto; flex: 0 1 auto; }
  .stage { width: calc(72vh * var(--ar)); max-width: 46vw; }
  .result { flex: 0 1 440px; }
}
