/* ==========================================================================
   Page RP — scènes immersives façon keynote (js/rp-immersive.js) :
   chaque scène est épinglée plein écran, le défilement en pilote la progression (--p, 0 → 1).
   1. Le lien s'écrit en grand puis part dans un message.
   2. L'iPhone pivote en 3D pendant que les réservations tombent en notifications.
   3. Compteur géant du montant réservé.
   Verre neutre (aucune lueur ni ombre dorée) : l'or ne sert qu'au texte et aux accents.
   ========================================================================== */

.rpx { position: relative; --p: 0; }
/* !important : style.css impose « .organizers-page section { height: auto !important } » */
.organizers-page section.rpx-link { height: 300vh !important; }
.organizers-page section.rpx-live { height: 340vh !important; }
.organizers-page section.rpx-count { height: 230vh !important; }
.rpx-pin {
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
  display: grid; place-items: center; padding: 88px 24px 40px; box-sizing: border-box;
}
.rpx-kicker {
  margin: 0 0 18px; font-size: 12px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: var(--rpl-gold);
}
.rpx .rpx-h {
  margin: 0; padding: 0; border: 0; background: none;
  font-family: 'Montserrat', system-ui, sans-serif !important; font-weight: 800; text-transform: none;
  font-size: clamp(2.2rem, 6vw, 5.4rem); line-height: 0.98; letter-spacing: -0.045em; color: var(--rpl-text); text-wrap: balance;
}
.rpx-sub { margin: 22px auto 0; max-width: 560px; font-size: clamp(15px, 1.3vw, 18px); line-height: 1.6; color: var(--rpl-muted); text-wrap: pretty; }
.rpx-serif { font-family: 'Instrument Serif', Georgia, serif; font-style: italic; font-weight: 400; letter-spacing: -0.02em; }

/* --- 1. Le lien --- */
.rpx-link-inner { width: min(1180px, 100%); text-align: center; }
.rpx-link-head { opacity: calc(1 - var(--out, 0)); transform: translateY(calc(var(--out, 0) * -70px)) scale(calc(1 - var(--out, 0) * 0.06)); filter: blur(calc(var(--out, 0) * 8px)); }
.rpx-url {
  position: relative; display: inline-flex; align-items: baseline; justify-content: center; max-width: 100%;
  margin: clamp(28px, 6vh, 64px) 0 0; white-space: nowrap;
  font: 600 clamp(1.5rem, 5.6vw, 5.2rem) / 1.1 ui-monospace, 'SF Mono', Menlo, monospace; letter-spacing: -0.04em;
  transform: translateY(calc(var(--lift, 0) * -22vh)) scale(calc(1 - var(--lift, 0) * 0.3));
  transform-origin: 50% 50%;
}
.rpx-url-base { color: rgba(245, 244, 241, 0.42); }
.rpx-url-name {
  background: linear-gradient(100deg, #fff4dc 0%, var(--rpl-gold-hi) 40%, var(--rpl-gold) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.rpx-caret { display: inline-block; width: 0.08em; height: 0.92em; margin-left: 0.04em; align-self: center; border-radius: 2px; background: var(--rpl-gold); animation: rpxBlink 1s steps(1) infinite; }
@keyframes rpxBlink { 50% { opacity: 0; } }
.rpx-link.is-typed .rpx-caret { opacity: 0; animation: none; }

.rpx-msg {
  position: relative; width: min(420px, 100%); margin: 0 auto; text-align: left;
  opacity: var(--msg, 0); transform: translateY(calc((1 - var(--msg, 0)) * 60px)) scale(calc(0.94 + var(--msg, 0) * 0.06));
}
.rpx-link-sheet { position: absolute; left: 0; right: 0; bottom: clamp(40px, 10vh, 110px); padding: 0 24px; }
.rpx-bubble {
  display: block; padding: 14px 16px 12px; border-radius: 22px 22px 6px 22px; margin-left: auto; max-width: 340px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.05)), rgba(30, 28, 25, 0.7);
  -webkit-backdrop-filter: blur(30px) saturate(170%); backdrop-filter: blur(30px) saturate(170%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 24px 60px -24px rgba(0, 0, 0, 0.9);
  color: var(--rpl-text); font-size: 15px; line-height: 1.45;
}
.rpx-bubble-card { display: flex; gap: 10px; align-items: center; margin-top: 10px; padding: 9px; border-radius: 14px; background: rgba(0, 0, 0, 0.35); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06); }
.rpx-bubble-card img { width: 40px; height: 40px; border-radius: 10px; flex: none; }
.rpx-bubble-card b { display: block; font-size: 13px; color: var(--rpl-text); }
.rpx-bubble-card small { display: block; font: 500 12px ui-monospace, Menlo, monospace; color: var(--rpl-gold-hi); }
.rpx-bubble-meta { display: block; margin-top: 6px; text-align: right; font-size: 11px; color: var(--rpl-faint); }
.rpx-chip {
  position: absolute; left: 0; top: -54px; display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px 9px 10px; border-radius: 999px;
  background: rgba(95, 211, 141, 0.14); box-shadow: inset 0 0 0 1px rgba(95, 211, 141, 0.35); color: #c9f2d8; font-size: 13.5px; font-weight: 700;
  opacity: var(--chip, 0); transform: translateY(calc((1 - var(--chip, 0)) * 14px));
}
.rpx-chip i { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #5fd38d; color: #06140b; font-style: normal; font-size: 12px; }

/* --- 2. En direct --- */
.rpx-live-inner {
  width: min(1180px, 100%); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 80px); align-items: center;
}
.rpx-live-copy { opacity: var(--in, 0); transform: translateY(calc((1 - var(--in, 0)) * 30px)); }
.rpx-live-copy .rpx-h { font-size: clamp(2.2rem, 4.6vw, 4.4rem); }
.rpx-live-stage { position: relative; height: min(76vh, 720px); perspective: 1600px; }
.rpx-live-phone {
  position: absolute; left: 50%; top: 50%; width: min(330px, calc(76vh * 0.47)); margin: 0;
  transform: translate(-50%, -50%) rotateY(calc((1 - var(--turn, 0)) * -34deg)) rotateX(calc((1 - var(--turn, 0)) * 10deg)) scale(calc(0.82 + var(--turn, 0) * 0.18));
  transform-style: preserve-3d; will-change: transform;
}
.rpx-notifs { text-align: left; position: absolute; left: 50%; top: 9%; width: min(380px, 96%); margin: 0; padding: 0; list-style: none; transform: translateX(-50%); z-index: 2; }
.rpx-notif {
  position: absolute; left: 0; right: 0; top: 0; display: grid; grid-template-columns: 38px 1fr auto; gap: 11px; align-items: center;
  padding: 11px 14px 11px 11px; border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1)), rgba(62, 58, 54, 0.72);
  -webkit-backdrop-filter: blur(34px) saturate(180%); backdrop-filter: blur(34px) saturate(180%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 26px 60px -22px rgba(0, 0, 0, 0.9);
  opacity: 0; transform: translateY(-30px) scale(0.96);
  transition: opacity 0.5s var(--rpl-ease), transform 0.7s var(--rpl-ease);
}
.rpx-notif img { width: 38px; height: 38px; border-radius: 10px; }
.rpx-notif b { display: block; font-size: 13.5px; font-weight: 650; color: #fff; }
.rpx-notif > span { min-width: 0; }
.rpx-notif span span { display: block; font-size: 12.5px; color: rgba(255, 255, 255, 0.72); }
.rpx-notif em { align-self: start; font-style: normal; font-size: 11px; color: rgba(255, 255, 255, 0.5); }
.rpx-notif strong { color: var(--rpl-gold-hi); font-weight: 700; }
/* Pile façon iOS : la plus récente devant, les précédentes glissent dessous */
.rpx-notif.is-on { opacity: 1; transform: translateY(calc(var(--d, 0) * 74px)) scale(1); }

/* --- 3. Compteur --- */
.rpx-count-inner { text-align: center; }
.rpx-big {
  display: inline-flex; align-items: baseline; gap: 0.12em; margin: 0;
  font: 800 clamp(4.4rem, 17vw, 16rem) / 0.9 'Montserrat', system-ui, sans-serif; letter-spacing: -0.06em; font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #ffffff 0%, #d9d6cf 55%, #8d8a84 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  transform: scale(calc(0.86 + var(--grow, 0) * 0.14)); opacity: calc(0.2 + var(--grow, 0) * 0.8);
}
.rpx-big .rpx-cur { font-size: 0.5em; background: linear-gradient(100deg, #fff4dc, var(--rpl-gold-hi) 45%, var(--rpl-gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.rpx-count-line { margin: 18px 0 0; font-size: clamp(1.3rem, 2.6vw, 2.2rem); font-weight: 700; letter-spacing: -0.03em; color: var(--rpl-text); }
.rpx-stats { display: flex; justify-content: center; gap: clamp(12px, 2vw, 22px); margin: clamp(28px, 6vh, 56px) 0 0; padding: 0; list-style: none; flex-wrap: wrap; }
.rpx-stats li {
  min-width: 150px; padding: 16px 22px 15px; border-radius: 22px; text-align: left;
  background: var(--nsg-card, rgba(20, 18, 16, 0.42)); -webkit-backdrop-filter: blur(30px) saturate(170%); backdrop-filter: blur(30px) saturate(170%);
  box-shadow: var(--nsg-card-shadow, inset 0 1px 0 rgba(255, 255, 255, 0.2), inset 0 0 0 1px rgba(255, 255, 255, 0.08));
  opacity: var(--s, 0); transform: translateY(calc((1 - var(--s, 0)) * 26px));
}
.rpx-stats b { display: block; font-size: 34px; font-weight: 800; letter-spacing: -0.04em; color: var(--rpl-text); font-variant-numeric: tabular-nums; }
.rpx-stats b.is-ok { color: #8fe2ae; }
.rpx-stats span { display: block; margin-top: 2px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--rpl-faint); }
.rpx-note { margin: 26px 0 0; font-size: 12px; color: var(--rpl-faint); }

/* --- Mobile --- */
@media (max-width: 900px) {
  .organizers-page section.rpx-link { height: 260vh !important; }
  .organizers-page section.rpx-live { height: 300vh !important; }
  .organizers-page section.rpx-count { height: 200vh !important; }
  .rpx-pin { padding: 76px 18px 28px; }
  .rpx-url { font-size: clamp(1.15rem, 6.4vw, 2.4rem); }
  .rpx-live-inner { grid-template-columns: 1fr; gap: 10px; text-align: center; align-content: center; height: 100%; }
  .rpx-live-copy .rpx-h { font-size: clamp(1.9rem, 8vw, 2.6rem); }
  .rpx-live-copy .rpx-sub { display: none; }
  .rpx-live-stage { height: 62svh; }
  .rpx-live-phone { width: min(250px, calc(62svh * 0.47)); }
  .rpx-notifs { width: min(320px, 96%); }
  .rpx-notif.is-on { transform: translateY(calc(var(--d, 0) * 66px)) scale(1); }
  .rpx-stats li { min-width: 0; flex: 1 1 28%; padding: 12px 12px 11px; }
  .rpx-stats b { font-size: 24px; }
  .rpx-stats span { font-size: 9.5px; letter-spacing: 0.1em; }
}

/* Sans mouvement : état final, scènes non épinglées */
@media (prefers-reduced-motion: reduce) {
  .organizers-page section.rpx-link, .organizers-page section.rpx-live, .organizers-page section.rpx-count { height: auto !important; }
  .rpx-pin { position: relative; height: auto; min-height: 100svh; }
  .rpx { --p: 1; --msg: 1; --chip: 1; --in: 1; --turn: 1; --grow: 1; --s: 1; --lift: 0; }
  .rpx-link-sheet { position: relative; bottom: auto; margin-top: 70px; }
  .rpx-notif { transition: none; }
}

/* Sous-titre du lien : laisse la place au message */
.rpx-link-subline { position: absolute; left: 0; right: 0; bottom: clamp(48px, 13vh, 130px); margin: 0 auto; padding: 0 24px; text-align: center; opacity: calc(1 - var(--msg, 0)); }
