/* ── Modale d'achat de crédits on-page (/questions) — tokens app.css ──────────
   Prefix .qpay- (isolé). Design nuit/or cohérent avec l'app. */

.qpay {
  position: fixed; inset: 0; z-index: 120;
  display: none; align-items: flex-end; justify-content: center;
}
.qpay.open { display: flex; }
@media (min-width: 640px) { .qpay { align-items: center; } }

.qpay__backdrop {
  position: absolute; inset: 0;
  background: rgba(4, 6, 12, .72); backdrop-filter: blur(6px);
}

.qpay__dialog {
  position: relative; width: 100%; max-width: 480px;
  max-height: 92vh; overflow-y: auto;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  box-shadow: var(--shadow-card);
  padding: clamp(20px, 4vw, 30px);
  animation: qpay-in .28s var(--ease, ease) both;
}
@media (min-width: 640px) { .qpay__dialog { border-radius: var(--r-lg); } }
@keyframes qpay-in { from { transform: translateY(18px); opacity: 0; } to { transform: none; opacity: 1; } }

.qpay__close {
  position: absolute; top: 12px; right: 12px;
  width: 34px; height: 34px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 50%;
  background: transparent; color: var(--text-dim); cursor: pointer;
  transition: color .2s, border-color .2s;
}
.qpay__close:hover { color: var(--cream); border-color: var(--gold); }

.qpay__title {
  font-family: var(--serif); font-size: 1.35rem; color: var(--cream);
  margin: 0 6px 6px 0; padding-right: 30px;
}
.qpay__lead { color: var(--text-dim); font-size: .92rem; margin: 0 0 18px; line-height: 1.55; }

/* Sélecteur de packs */
.qpay__packs { display: grid; gap: 10px; margin: 0 0 18px; }
.qpay-pack {
  display: flex; align-items: center; gap: 14px; text-align: left;
  padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--r);
  background: var(--glass, rgba(255,255,255,.02)); color: var(--text);
  cursor: pointer; transition: border-color .18s, background .18s, transform .1s;
}
.qpay-pack:hover { border-color: var(--gold); }
.qpay-pack.is-sel { border-color: var(--gold-bright); background: rgba(205, 162, 95, .09); box-shadow: var(--glow); }
.qpay-pack__qty {
  flex: 0 0 auto; width: 40px; height: 40px; display: grid; place-items: center;
  font-family: var(--serif); font-size: 1.3rem; color: var(--gold-bright);
  border: 1px solid var(--line); border-radius: 50%;
}
.qpay-pack__body { flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; }
.qpay-pack__label { color: var(--cream); font-weight: 600; }
.qpay-pack__per { color: var(--text-mute); font-size: .78rem; }
.qpay-pack__price { flex: 0 0 auto; font-weight: 700; color: var(--cream); }

/* Champ email */
.qpay__field { margin: 0 0 16px; }
.qpay__field label { display: block; font-size: .82rem; color: var(--text-dim); margin: 0 0 6px; }
.qpay__field-note { color: var(--text-mute); font-weight: 400; }
.qpay__field input {
  width: 100%; padding: 12px 14px; font-size: 1rem;
  background: var(--ink-deep, #080b18); color: var(--cream);
  border: 1.5px solid var(--line); border-radius: var(--r);
}
.qpay__field input:focus { outline: none; border-color: var(--gold-bright); }
.qpay__field input[readonly] { opacity: .72; }

#qpayElement { margin: 0 0 14px; min-height: 44px; }

.qpay__error { color: var(--err, #e0567a); font-size: .86rem; margin: 0 0 12px; min-height: 1px; }
.qpay__secure {
  display: flex; align-items: center; gap: 7px; justify-content: center;
  color: var(--text-mute); font-size: .76rem; margin: 12px 0 0;
}

/* Spinner de la vue « paiement confirmé, question en cours » */
.qpay-spin {
  display: inline-block; width: 42px; height: 42px;
  border: 3px solid var(--line); border-top-color: var(--gold-bright);
  border-radius: 50%; animation: qpay-spin 0.9s linear infinite;
}
@keyframes qpay-spin { to { transform: rotate(360deg); } }

/* ── Question offerte (lien ?gift=1 de fin de vidéo) ─────────────────────── */
.qgift {
  display: flex; align-items: center; gap: 16px; margin: 0 0 22px;
  padding: clamp(16px, 3vw, 22px) clamp(18px, 3.4vw, 28px);
  border: 1px solid var(--line-3); border-radius: var(--r-lg);
  background: linear-gradient(135deg, rgba(205,162,95,.16), rgba(205,162,95,.04));
  box-shadow: var(--glow);
}
.qgift__ic {
  width: 48px; height: 48px; flex: 0 0 auto; display: grid; place-items: center;
  border-radius: 50%; background: rgba(205,162,95,.16); color: var(--gold-bright);
}
.qgift__ic svg {
  width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round;
}
.qgift__body { flex: 1; min-width: 0; }
.qgift__badge {
  display: inline-block; margin: 0 0 6px; padding: 2px 10px; border-radius: var(--r-pill);
  font-size: .66rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink, #0b0f1c); background: var(--gold-bright);
}
.qgift__title {
  margin: 0; font-family: var(--serif); color: var(--cream);
  font-size: clamp(1.1rem, 1rem + .7vw, 1.4rem); line-height: 1.3;
}
.qgift__lead { margin: .3rem 0 0; font-size: .88rem; line-height: 1.55; color: var(--text-dim); }
@media (max-width: 520px) { .qgift { flex-direction: column; text-align: center; gap: 10px; } }

.qgift__email { margin: 0 0 18px; }
