/* KICKOFF · ecran Parrainage (css/referral.css)
   S'appuie sur tokens.css (.card, .btn, .pill) et app.css (.stack, .card-head).
   Palette bleue : var(--red)/--red-glow/--red-deep contiennent du BLEU. Accent or. */

.rf-sec { display: flex; flex-direction: column; }
.rf-sec + .rf-sec { margin-top: 4px; }

/* ---------- heros : le code en grand ---------- */
.rf-hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 22px 18px 20px;
  background: linear-gradient(160deg, rgba(37, 99, 235, .16), var(--ink-3) 62%);
  border-color: rgba(37, 99, 235, .38);
}
.rf-hero-glow {
  position: absolute;
  top: -60%;
  left: 50%;
  width: 320px;
  height: 320px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(59, 130, 246, .34), transparent 70%);
  pointer-events: none;
}
/* :not(.rf-hero-glow) sinon cette regle ecrase le position:absolute du halo
   (meme specificite, declaree plus bas) et le halo prend la place dans le flux. */
.rf-hero > *:not(.rf-hero-glow) { position: relative; }
.rf-hero .kicker { display: block; }

.rf-code {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 12px auto 4px;
  padding: 14px 18px 14px 22px;
  border-radius: 14px;
  cursor: pointer;
  background: rgba(13, 13, 13, .55);
  border: 1px dashed rgba(59, 130, 246, .55);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .03);
  -webkit-tap-highlight-color: transparent;
  transition: transform .12s ease, border-color .2s ease, box-shadow .2s ease;
}
.rf-code:active { transform: scale(.98); }
.rf-code:hover { border-color: rgba(59, 130, 246, .85); box-shadow: var(--glow-red); }
.rf-code-slash {
  font-family: var(--disp);
  font-style: italic;
  font-weight: 800;
  font-size: 30px;
  color: var(--red);
  text-shadow: 0 0 14px rgba(37, 99, 235, .8);
  line-height: 1;
}
.rf-code-val {
  font-size: 40px;
  letter-spacing: .16em;
  color: var(--txt);
  line-height: 1;
  padding-left: 4px;
}
.rf-code-copy {
  font-family: var(--disp);
  font-style: italic;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: 10px;
  color: var(--red-glow);
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(37, 99, 235, .14);
  border: 1px solid rgba(37, 99, 235, .4);
}
.rf-hero-lead {
  font-size: 13.5px;
  color: var(--muted);
  max-width: 320px;
  margin: 8px auto 16px;
}
.rf-actions {
  display: flex;
  gap: 10px;
}
.rf-actions .btn { flex: 1; }

/* ---------- progression X / 3 ---------- */
.rf-prog { padding: 18px 16px 16px; }
.rf-pips {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 14px;
}
.rf-pip {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ink-2);
  border: 1px solid var(--line);
  transition: border-color .25s ease, background .25s ease, transform .25s ease;
}
.rf-pip-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--line-2);
  transition: background .25s ease, box-shadow .25s ease;
}
.rf-pip.on {
  border-color: rgba(59, 130, 246, .7);
  background: linear-gradient(135deg, rgba(37, 99, 235, .28), rgba(30, 58, 138, .18));
}
.rf-pip.on .rf-pip-dot {
  background: var(--red-glow);
  box-shadow: 0 0 12px rgba(59, 130, 246, .9);
}
.rf-bar {
  height: 8px;
  border-radius: 999px;
  background: var(--ink-2);
  border: 1px solid var(--line);
  overflow: hidden;
}
.rf-bar > i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--red-deep), var(--red-glow));
  box-shadow: 0 0 14px rgba(59, 130, 246, .6);
  transition: width .5s cubic-bezier(.2, .7, .2, 1);
}
.rf-prog-msg {
  font-size: 13px;
  color: var(--muted);
  margin-top: 12px;
  text-align: center;
}
.rf-prog-msg b { color: var(--gold); }

/* ---------- comment ca marche ---------- */
.rf-steps { display: flex; flex-direction: column; gap: 8px; }
.rf-step {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px 14px;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--ink-3), var(--ink-2));
  border: 1px solid var(--line);
}
.rf-step-n {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  color: var(--red-glow);
  background: rgba(37, 99, 235, .12);
  border: 1px solid rgba(37, 99, 235, .34);
}
.rf-step-txt { display: flex; flex-direction: column; gap: 1px; }
.rf-step-txt b { font-size: 14px; }
.rf-step-txt span { font-size: 12.5px; }
.rf-step-gold {
  background: linear-gradient(135deg, rgba(244, 195, 59, .12), var(--ink-3));
  border-color: rgba(244, 195, 59, .36);
}
.rf-step-gold .rf-step-n {
  color: var(--gold);
  background: rgba(244, 195, 59, .12);
  border-color: rgba(244, 195, 59, .4);
}

/* ---------- liste des filleuls ---------- */
.rf-list { display: flex; flex-direction: column; gap: 8px; }
.rf-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--ink-3), var(--ink-2));
  border: 1px solid var(--line);
}
.rf-av {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ink-2);
}
.rf-av svg, .rf-av img { width: 100%; height: 100%; object-fit: cover; }
.rf-row-txt { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.rf-row-txt b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rf-row-txt span { font-size: 12px; }
.rf-hint { font-size: 12.5px; margin-top: 10px; text-align: center; }

.rf-empty {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}
.rf-empty-slash {
  position: absolute;
  right: -14px;
  bottom: -34px;
  font-family: var(--disp);
  font-style: italic;
  font-weight: 900;
  font-size: 150px;
  line-height: 1;
  color: rgba(37, 99, 235, .07);
  pointer-events: none;
}
.rf-empty p { position: relative; }
.rf-empty .muted { font-size: 13px; max-width: 260px; }

/* ---------- banniere de parrainage sur l'ecran auth ---------- */
.auth-ref {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 13px;
  border-radius: 11px;
  background: linear-gradient(135deg, rgba(37, 99, 235, .16), rgba(30, 58, 138, .1));
  border: 1px solid rgba(59, 130, 246, .42);
  font-size: 13px;
  color: var(--txt);
}
.auth-ref-slash {
  font-family: var(--disp);
  font-style: italic;
  font-weight: 800;
  font-size: 20px;
  color: var(--red);
  text-shadow: 0 0 12px rgba(37, 99, 235, .8);
  line-height: 1;
}
.auth-ref b { color: var(--gold); letter-spacing: .06em; }

/* ---------- CTA parrainage sur le profil ---------- */
.pf-refer {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  text-align: left;
  cursor: pointer;
  margin-top: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(37, 99, 235, .18), var(--ink-3) 70%);
  border: 1px solid rgba(59, 130, 246, .4);
  color: var(--txt);
  -webkit-tap-highlight-color: transparent;
  transition: transform .12s ease, border-color .2s ease;
}
.pf-refer:active { transform: scale(.99); }
.pf-refer-ico {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--disp);
  font-style: italic;
  font-weight: 800;
  font-size: 22px;
  color: var(--red-glow);
  background: rgba(37, 99, 235, .14);
  border: 1px solid rgba(37, 99, 235, .36);
}
.pf-refer-txt { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.pf-refer-txt b {
  font-family: var(--disp);
  font-style: italic;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .02em;
  font-size: 15px;
}
.pf-refer-txt span { font-size: 12.5px; color: var(--muted); }
.pf-refer-arrow { flex: none; color: var(--red-glow); font-size: 20px; }
