/* ── Reset & root ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --blue:    #1a56db;
  --blue-lt: #e8f0fe;
  --accent:  #f97316;
  --text:    #1e2a3b;
  --muted:   #64748b;
  --border:  #dde4f0;
  --white:   #ffffff;
  --bg:      #f4f7fc;
  --red:     #dc2626;
}

.rplf-wrapper {
  font-family: 'Inter', sans-serif;
  color: var(--text);
  max-width: 640px;
  margin: 0 auto;
  padding-bottom: 40px;
}

.test-banner a { color: var(--blue); text-decoration: underline; cursor: pointer; }

/* ── Score debug panel ── */

/* Header */
.rplf-header { text-align: center; margin-bottom: 28px; }
.rplf-badge {
  display: inline-block;
  background: var(--blue-lt); color: var(--blue);
  font-family: 'Sora', sans-serif; font-size: 12px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
  padding: 6px 14px; border-radius: 100px; margin-bottom: 14px;
}
.rplf-title { font-family: 'Sora', sans-serif; font-size: 24px; font-weight: 700; line-height: 1.3; margin: 0 0 10px; }
.rplf-intro { font-size: 14px; color: var(--muted); line-height: 1.7; margin: 0; }

/* Progress */
.rplf-progress-wrap { margin-bottom: 28px; }
.rplf-progress-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.rplf-progress-label { font-size: 13px; color: var(--muted); }
.rplf-progress-pct { font-family: 'Sora', sans-serif; font-size: 13px; font-weight: 700; color: var(--blue); }
.rplf-progress-bg { height: 6px; background: var(--border); border-radius: 100px; overflow: hidden; }
.rplf-progress-fill { height: 100%; background: linear-gradient(90deg, var(--blue), #4f8ef7); border-radius: 100px; transition: width .5s cubic-bezier(.4,0,.2,1); }

/* Card */
.rplf-card {
  background: var(--white); border-radius: 20px; padding: 36px 40px;
  box-shadow: 0 4px 24px rgba(26,86,219,.08), 0 1px 4px rgba(0,0,0,.04);
  border: 1px solid rgba(26,86,219,.06);
  position: relative; overflow: hidden;
}
.rplf-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--blue), #4f8ef7, var(--accent));
}

/* Steps */
.rplf-step { display: none; animation: fadeUp .4s ease both; }
.rplf-step.rplf-active { display: block; }
@keyframes fadeUp { from { opacity:0; transform:translateY(18px); } to { opacity:1; transform:translateY(0); } }

.rplf-step-q { font-family: 'Sora', sans-serif; font-size: 19px; font-weight: 700; line-height: 1.4; margin-bottom: 24px; }

/* Back */
.rplf-back {
  display: flex; align-items: center; gap: 6px;
  background: none; border: none; color: var(--muted);
  font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 500;
  cursor: pointer; padding: 0; margin-bottom: 20px; transition: color .15s;
}
.rplf-back:hover { color: var(--blue); }

/* Options */
.rplf-options { display: flex; flex-direction: column; gap: 10px; }
.rplf-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.rplf-opt {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg); border: 2px solid var(--border); border-radius: 12px;
  padding: 14px 18px; cursor: pointer;
  font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 500;
  color: var(--text); text-align: left;
  transition: border-color .15s, box-shadow .15s;
  width: 100%; position: relative;
}
.rplf-opt:hover { border-color: #a0b4d6; box-shadow: 0 2px 8px rgba(26,86,219,.08); }
.rplf-opt.rplf-selected { border-color: var(--blue); }
.rplf-opt.rplf-selected::after { content:'✓'; position:absolute; right:16px; font-size:14px; font-weight:700; color:var(--blue); }
.rplf-opt span:first-child { font-size: 18px; flex-shrink: 0; }

/* Multi banner */
.rplf-multi-banner {
  display: flex; align-items: center; gap: 10px;
  background: #fffbeb; border: 1.5px solid #fbbf24;
  border-radius: 10px; padding: 11px 16px; margin-bottom: 18px;
  font-size: 13px; font-weight: 600; color: #92400e;
}

/* Buttons */
.rplf-btn {
  margin-top: 20px; width: 100%; padding: 15px;
  background: linear-gradient(135deg, var(--blue), #4f8ef7);
  color: #fff; border: none; border-radius: 12px;
  font-family: 'Sora', sans-serif; font-size: 15px; font-weight: 700;
  cursor: pointer; transition: all .2s ease;
  box-shadow: 0 4px 16px rgba(26,86,219,.3);
  display: none;
}
.rplf-btn.visible, .rplf-btn.always { display: block; }
.rplf-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(26,86,219,.35); }

/* Fields */
.rplf-fields { display: flex; flex-direction: column; gap: 14px; }
.rplf-field { display: flex; flex-direction: column; gap: 5px; }
.rplf-field label { font-size: 13px; font-weight: 600; }
.rplf-field input, .rplf-extra input {
  padding: 13px 16px; border: 2px solid var(--border); border-radius: 10px;
  font-family: 'Inter', sans-serif; font-size: 14px; color: var(--text);
  background: var(--bg); outline: none; width: 100%;
  transition: border-color .2s, box-shadow .2s;
}
.rplf-field input:focus, .rplf-extra input:focus {
  border-color: var(--blue); background: #fff; box-shadow: 0 0 0 3px rgba(26,86,219,.1);
}
.rplf-field input::placeholder, .rplf-extra input::placeholder { color: #a0aec0; }
.rplf-field input.err { border-color: var(--red); }
.rplf-err { font-size: 12px; color: var(--red); display: none; }
.rplf-err.show { display: block; }

/* Anti-spam */
.rplf-antispam {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: #f0f7ff; border: 1.5px solid #c3d9f8;
  border-radius: 10px; padding: 12px 16px;
  font-size: 13px; font-weight: 600;
}
.rplf-antispam input { width: 80px !important; padding: 9px 12px !important; text-align: center; font-weight: 700 !important; }
.rplf-spam-hint { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* Extra input */
.rplf-extra { display: none; margin-top: 10px; }

/* ── Thank you — Standard ── */
.rplf-thankyou { text-align: center; padding: 20px 0; }
.rplf-check {
  width: 72px; height: 72px;
  background: linear-gradient(135deg, #dcfce7, #bbf7d0);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  margin: 0 auto 24px; font-size: 34px;
}
.rplf-thankyou h2 { font-family: 'Sora', sans-serif; font-size: 22px; font-weight: 700; margin-bottom: 12px; }
.rplf-thankyou p { font-size: 15px; color: var(--muted); line-height: 1.7; max-width: 420px; margin: 0 auto; }
.rplf-thankyou strong { color: var(--blue); }

/* ── Thank you — Qualifié ── */
.rplf-thankyou-oui { padding: 10px 0 0; }
.rplf-check-star { font-size: 52px; display: block; text-align: center; margin-bottom: 16px; animation: pop .5s ease; }
@keyframes pop { 0%{transform:scale(0);opacity:0} 70%{transform:scale(1.15)} 100%{transform:scale(1);opacity:1} }

.rplf-msg-perso {
  background: linear-gradient(135deg, #f0f7ff, #e8f0fe);
  border: 1.5px solid #c3d9f8; border-radius: 14px;
  padding: 20px 24px; margin: 0 0 24px;
  font-size: 15px; line-height: 1.75; text-align: left;
}
.rplf-msg-perso strong { color: var(--blue); }
.rplf-gain {
  display: inline-block;
  background: linear-gradient(135deg, var(--blue), #4f8ef7);
  color: #fff; font-family: 'Sora', sans-serif; font-weight: 700; font-size: 16px;
  padding: 4px 12px; border-radius: 8px; margin: 8px 0 4px;
}

.rplf-audit-box {
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  border: 2px solid #fbbf24; border-radius: 16px; padding: 22px 24px; text-align: center;
}
.rplf-audit-title { font-family: 'Sora', sans-serif; font-size: 17px; font-weight: 700; color: #92400e; margin: 0 0 8px; }
.rplf-audit-sub { font-size: 14px; color: #78350f; line-height: 1.6; margin: 0 0 18px; }
.rplf-prefill-card {
  background: #fff;
  border: 1.5px solid #c3d9f8;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
  text-align: left;
}
.rplf-prefill-card p {
  font-size: 13px; font-weight: 600; color: #1e2a3b;
  margin: 0 0 10px;
}
.rplf-prefill-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 7px 0;
  border-bottom: 1px solid #f0f4fb;
}
.rplf-prefill-row:last-child { border-bottom: none; }
.rplf-prefill-label { font-size: 12px; color: #64748b; font-weight: 500; min-width: 80px; }
.rplf-prefill-value { font-size: 13px; font-weight: 600; color: #1e2a3b; flex: 1; }
.rplf-copy-btn {
  background: #e8f0fe; border: none; border-radius: 6px;
  padding: 5px 10px; font-size: 12px; font-weight: 600; color: #1a56db;
  cursor: pointer; transition: background .15s; white-space: nowrap;
  flex-shrink: 0;
}
.rplf-copy-btn:hover { background: #c3d9f8; }
.rplf-prefix-badge {
  display: inline-block;
  background: #e8f0fe;
  color: #1a56db;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 5px;
}
.rplf-copy-btn.copied { background: #dcfce7; color: #15803d; }
.rplf-iframe-wrap { width: 100%; border-radius: 12px; overflow: hidden; background: #fff; box-shadow: 0 2px 12px rgba(0,0,0,.08); }
.rplf-iframe-wrap iframe { width: 100%; height: 900px; border: none; display: block; }


@media (max-width: 540px) {
  .rplf-card { padding: 28px 22px; }
  .rplf-title { font-size: 20px; }
  .rplf-step-q { font-size: 17px; }
  .rplf-grid2 { grid-template-columns: 1fr; }
  .rplf-msg-perso { padding: 16px 18px; }
  .rplf-audit-box { padding: 16px; }
  .rplf-iframe-wrap iframe { height: 820px; }
}