/* Elena Celeste · reading funnel wiring (07/10/2026).
   Real checkout in the offer modal (Stripe Payment Element), full-reading player, and the /my-reading
   states rendered by templates/reading_states.php (account, full, link, processing, failed, unavailable).
   Loaded after the redesign sheets: ec_unlock_styles() (offer pages) and ec_reading_state_open(). */

/* ── Checkout modal: email, Payment Element, errors, preview ─────────────── */
.rf-body .rf-pay { gap:12px; }
.rf-body .rf-pay__hint { margin:-4px 0 2px; font-size:12px; line-height:1.45; color:#7a6479; }
.rf-body .rf-pay__element { min-height:0; }
.rf-body .rf-pay__loading { display:flex; align-items:center; justify-content:center; gap:10px; min-height:132px; margin:0; border:1px dashed #e2cfe0; border-radius:6px; background:#fdf9fc; font-size:13px; color:#7a6479; }
.rf-body .rf-pay__loading[hidden] { display:none; }
.rf-body .rf-pay__spinner { width:18px; height:18px; border:2px solid #ead9ea; border-top-color:#a3609b; border-radius:50%; animation:rf-spin .8s linear infinite; }
.rf-body .rf-pay__error { margin:0; padding:10px 12px; border:1px solid #f1c4cf; border-radius:6px; background:#fff3f5; font-size:13.5px; line-height:1.45; color:#a1123a; }
.rf-body .rf-pay__error[hidden] { display:none; }
/* Card refused: pay in US dollars or euros instead (funnel-unlock.js offerCurrencies), under the card error or the
   wallet error of the end-of-preview paywall. */
.rf-body .rf-currency-switch { margin:8px 0 0; padding:10px 12px; border:1px solid #e2cfe0; border-radius:8px; background:#fdf9fc; font-size:13px; line-height:1.45; color:#2f124c; text-align:left; }
.rf-body .rf-currency-switch[hidden] { display:none; }
.rf-body .rf-currency-switch p { margin:0 0 8px; }
.rf-body .rf-currency-switch__btns { display:flex; flex-wrap:wrap; gap:8px; }
.rf-body .rf-currency-switch__btn { flex:1 1 130px; min-height:44px; padding:10px 12px; border:1.5px solid #5b146f; border-radius:8px; background:#fff; color:#5b146f; font:inherit; font-size:14px; font-weight:600; cursor:pointer; }
.rf-body .rf-currency-switch__btn:hover, .rf-body .rf-currency-switch__btn:focus-visible { background:#5b146f; color:#fff; }
.rf-body .rf-pay [data-rf-pay] { gap:6px; }
.rf-body .rf-pay [data-rf-pay][disabled] { cursor:not-allowed; opacity:.55; box-shadow:none; transform:none; }
.rf-body .rf-pay [data-rf-pay][aria-busy="true"] { opacity:.8; cursor:progress; }
.rf-body .rf-pay [data-rf-pay] [hidden] { display:none; }
.rf-body .rf-pay__preview { margin:0; padding:8px 10px; border-radius:6px; background:#fff6e3; text-align:center; font:700 12px/1.4 var(--rf-sans); letter-spacing:.02em; color:#8a5a12; }
.rf-body .rf-pay__legal { margin:0; text-align:center; font-size:11.5px; line-height:1.5; color:#8b7a8a; }
.rf-body .rf-pay__legal a { color:inherit; text-underline-offset:2px; }
.rf-body .rf-pay .rf-field input[readonly] { background:#f7f3f7; color:#6c576b; }

/* ── Full reading player ─────────────────────────────────────────────────── */
.rf-player--full .rf-progress__open { border-radius:3px; }
.rf-player--full.is-ended .rf-play { opacity:1; pointer-events:auto; background:rgba(28,10,48,.35); }
.rf-player__error { position:absolute; inset:auto 12px 64px; z-index:6; padding:12px 14px; border-radius:6px; background:#fffdf9; box-shadow:0 12px 30px -14px rgba(20,6,36,.6); text-align:center; }
.rf-player__error[hidden] { display:none; }
.rf-player__error p { margin:0; font-size:13px; line-height:1.45; color:#5b146f; }
.rf-player__end { margin-top:16px; }
.rf-player__end[hidden] { display:none; }
.rf-end { padding:20px 18px 14px; border:1px solid #e3cfe4; border-top:4px solid var(--ec-cta, #d10c79); border-radius:6px; background:#fffdf9; box-shadow:0 18px 40px -26px rgba(83,50,104,.6); text-align:center; animation:rf-flow-rise .45s ease both; }
.rf-end__kicker { display:flex; align-items:center; justify-content:center; gap:7px; margin:0; font:600 12px/1.4 var(--ec-sans, var(--rf-sans)); letter-spacing:.04em; color:#8a7098; }
.rf-end__kicker .rf-ico { width:16px; height:16px; color:#a1855d; }
.rf-end__title { margin:8px 0 14px; font:500 22px/1.2 var(--ec-serif, var(--rf-serif)); color:#382343; text-wrap:balance; }
.rf-end .rf-btn { width:100%; padding-inline:16px; font-size:16px; }
.rf-end .rf-btn .rf-ico { width:18px; height:18px; }
.rf-end__note { margin:10px 0 0; font-size:12.5px; line-height:1.5; color:#705777; text-wrap:balance; }
.rf-end .rf-link { margin-top:8px; font-size:12.5px; }
@keyframes rf-flow-rise { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:none; } }

/* ── /my-reading states: shared hero and card ───────────────────────────── */
.rf-body .rf-flow-hero { min-height:calc(100svh - 150px); }
.rf-body .rf-flow-hero--message, .rf-body .rf-page-account .rf-flow-hero { display:grid; align-items:start; }
.rf-flow-card { position:relative; width:min(100%, 460px); margin:6px auto 0; padding:30px 22px 22px; border:1px solid #dcd0e3; border-top:4px solid #5b146f; border-radius:8px; background:#fffdfcf5; box-shadow:0 24px 60px -34px rgba(83,50,104,.7); text-align:center; animation:rf-flow-rise .45s ease both; }
.rf-flow-card--account { border-top-color:var(--ec-cta, #d10c79); }
.rf-flow-card__seal { display:grid; place-items:center; width:54px; height:54px; margin:0 auto 14px; border-radius:50%; background:#5b146f; color:#fff; outline:1px solid #d9b5dd; outline-offset:5px; }
.rf-flow-card__seal .rf-ico { width:24px; height:24px; }
.rf-flow-card__seal--ok { background:var(--ec-sage, #18815c); outline-color:#b9dccb; }
.rf-flow-card--failed .rf-flow-card__seal { background:#a1123a; outline-color:#f1c4cf; }
.rf-flow-card__kicker { display:flex; align-items:center; justify-content:center; gap:6px; margin:0; font:600 12px/1.4 var(--ec-sans, var(--rf-sans)); letter-spacing:.06em; text-transform:uppercase; color:#8a7098; }
.rf-flow-card__kicker .rf-ico { width:15px; height:15px; color:var(--ec-sage, #18815c); }
.rf-flow-card__title { margin:10px 0 10px; font:500 clamp(27px, 6.6vw, 36px)/1.12 var(--ec-serif, var(--rf-serif)); letter-spacing:-.025em; color:#382343; text-wrap:balance; overflow-wrap:anywhere; }
.rf-flow-card__text { margin:0 auto 18px; max-width:38ch; font-size:14.5px; line-height:1.6; color:#705777; text-wrap:pretty; }
.rf-flow-card__actions { display:grid; justify-items:center; gap:10px; }
.rf-flow-card__actions:empty { display:none; }
.rf-flow-card__actions .rf-btn { width:100%; }
.rf-flow-card__alt { margin:0; font-size:13px; color:#705777; }
.rf-flow-card__note { display:flex; align-items:center; justify-content:center; gap:6px; margin:16px 0 0; font-size:11.5px; color:#74617d; }
.rf-flow-card__note .rf-ico { color:var(--ec-sage, #18815c); }
.rf-flow-card__contact { margin:16px 0 0; padding-top:14px; border-top:1px dashed #e3d6e6; font-size:12.5px; line-height:1.5; color:#74617d; }
.rf-flow-card__contact a { color:#5b146f; font-weight:600; text-underline-offset:3px; overflow-wrap:anywhere; }

.rf-flow-form { display:grid; gap:12px; text-align:left; }
.rf-flow-form .rf-field span { font:600 12.5px var(--ec-sans, var(--rf-sans)); color:#6c576b; }
.rf-flow-form .rf-field input { min-height:50px; border:1px solid #d8c6d6; border-radius:4px; background:#fff; font-size:16px; }
.rf-flow-form .rf-field input[readonly] { background:#f7f3f7; color:#6c576b; }
.rf-flow-form .rf-field input:focus { outline:2px solid #79518e; outline-offset:0; border-color:transparent; }
.rf-flow-form .rf-btn { width:100%; margin-top:4px; }
.rf-flow-form__link { justify-self:end; margin-top:-4px; font-size:12.5px; color:#5b146f; text-underline-offset:3px; }
.rf-flow-or { display:flex; align-items:center; gap:10px; margin:16px 0 12px; font-size:12px; text-transform:uppercase; letter-spacing:.08em; color:#8b7a8a; }
.rf-flow-or::before, .rf-flow-or::after { content:""; flex:1; height:1px; background:#e3d6e6; }
.rf-flow-secondary { display:inline-flex; align-items:center; justify-content:center; gap:8px; width:100%; min-height:48px; padding:12px 16px; border:1px solid #cdb7cf; border-radius:4px; background:#fff; color:#51365f; font:600 15px/1.3 var(--ec-sans, var(--rf-sans)); text-decoration:none; cursor:pointer; transition:background .2s ease, border-color .2s ease; }
.rf-flow-secondary:hover { background:#f8f1f8; border-color:#9a6f9c; }
.rf-flow-secondary:focus-visible { outline:2px solid #79518e; outline-offset:2px; }
.rf-flow-secondary .rf-ico { width:16px; height:16px; }

.rf-flow-alert { margin:0 0 14px; padding:10px 12px; border-radius:6px; font-size:13.5px; line-height:1.45; text-align:left; }
.rf-flow-alert[hidden] { display:none; }
.rf-flow-alert--error { border:1px solid #f1c4cf; background:#fff3f5; color:#a1123a; }
.rf-flow-alert--notice { border:1px solid #bfe0cf; background:#effaf4; color:#145e43; }

/* Message flash (retour de paiement, second paiement remboursé) : haut du hero des pages d'offre et de la lecture complète. */
.rf-flash { position:relative; z-index:2; width:min(100%, 560px); margin:0 auto 14px; }
.rf-flash .rf-flow-alert { margin:0; text-align:center; box-shadow:0 10px 26px -18px rgba(83,50,104,.55); }
.rf-page-unlock .rf-flash { margin-top:14px; }

.rf-flow-wait { display:block; width:38px; height:38px; margin:2px auto 4px; border:3px solid #ead9ea; border-top-color:var(--ec-cta, #d10c79); border-radius:50%; animation:rf-spin .9s linear infinite; }

/* ── Full reading: hero + player (+ side cards on desktop) ───────────────── */
.rf-flow-stage { display:grid; grid-template-columns:minmax(0, 1fr); gap:18px; max-width:430px; margin:16px auto 0; }
.rf-flow-stage__main { min-width:0; }
.rf-body .rf-hero--celestial .rf-flow-stage__main .rf-player { width:min(100%, 360px); margin:0 auto; }
.rf-body .rf-hero--celestial .rf-flow-stage__main .rf-player__frame { border:4px solid #fffdfb; border-radius:12px; box-shadow:0 20px 50px -24px #53326880, 0 3px 12px #492b5712; }
.rf-flow-stage__side { display:grid; gap:14px; align-content:start; min-width:0; }
.rf-flow-stage__side--right .rf-pcard--elena { display:none; }
.rf-flow-questions { display:grid; gap:10px; }
.rf-flow-questions__text { margin:0; font-size:13px; line-height:1.55; color:#675471; }
.rf-body .rf-hero--celestial .rf-flow-questions .rf-pcard__kicker { color:#5b146f; }
.rf-page-full .rf-hero__head .rf-pill .rf-ico { color:var(--ec-sage, #18815c); }

@media (max-width:1023px) {
  .rf-body .rf-flow-hero { min-height:0; }
  .rf-body .rf-hero--celestial.rf-flow-hero--full .rf-hero__sub { display:block; margin-top:8px; font-size:13px; }
}
@media (max-width:639px) {
  .rf-flow-card { padding:26px 18px 18px; }
  .rf-body .rf-hero--celestial.rf-flow-hero--message > .rf-wrap, .rf-body .rf-page-account .rf-hero--celestial > .rf-wrap { padding-inline:16px; }
}
@media (min-width:1024px) {
  .rf-flow-card { margin-top:22px; padding:38px 38px 26px; }
  .rf-flow-stage { grid-template-columns:minmax(0, 1fr) clamp(320px, calc((100svh - 295px) * 9 / 16), 380px) minmax(0, 1fr); gap:clamp(24px, 3vw, 42px); max-width:1120px; margin-top:30px; align-items:start; }
  .rf-flow-stage__main { grid-column:2; grid-row:1; }
  .rf-flow-stage__side--left { grid-column:1; grid-row:1; }
  .rf-flow-stage__side--right { grid-column:3; grid-row:1; }
  .rf-flow-stage__side--right .rf-pcard--elena { display:flex; }
  .rf-body .rf-hero--celestial .rf-flow-stage__main .rf-player { width:100%; }
  .rf-body .rf-hero--celestial .rf-flow-stage__main .rf-player__frame { border-width:5px; border-radius:15px; }
  .rf-body .rf-hero--celestial.rf-flow-hero { padding-bottom:64px; }
}
@media (prefers-reduced-motion:reduce) {
  .rf-end, .rf-flow-card { animation:none; }
  .rf-flow-wait, .rf-body .rf-pay__spinner { animation-duration:2.4s; }
}
