/* =========================================================
   Le Réseau Réno — Page inscription (/inscription)
   Mobile-first, thème clair fixe, assistant multi-étapes
   ========================================================= */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/Inter-Regular.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/static/fonts/Inter-SemiBold.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/static/fonts/Inter-Bold.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/static/fonts/Inter-ExtraBold.woff2") format("woff2");
}

:root {
  --bg: #f4f7fa;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #4a5f73;
  --line: rgba(33, 61, 88, 0.18);
  --brand-navy: #213d58;
  --brand-navy-ink: #0b1a28;
  --brand-amber: #f5a524;
  --brand-amber-deep: #d97706;
  --danger: #b91c1c;
  --success: #15803d;
  --shadow: rgba(33, 61, 88, 0.12);
  --font: Inter, "Segoe UI", Arial, sans-serif;
  --step-duration: 220ms;
  --step-ease: cubic-bezier(0.32, 0.72, 0, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  min-height: 100dvh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--brand-navy);
  font-weight: 600;
}

.hidden {
  display: none !important;
}

.muted {
  color: var(--muted);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 14px;
  font-family: inherit;
  font-weight: 700;
  font-size: 1.05rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.12s ease, border-color 0.15s ease;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.btn:active {
  transform: scale(0.98);
}

.btn--amber {
  background: var(--brand-amber);
  color: var(--brand-navy-ink);
}

.btn--amber:hover,
.btn--amber:focus-visible {
  background: var(--brand-amber-deep);
  color: #fff;
}

.btn--ghost {
  background: transparent;
  color: var(--brand-navy);
  border-color: var(--line);
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  border-color: var(--brand-navy);
}

.btn--lg {
  min-height: 56px;
  font-size: 1.1rem;
}

.btn--xl {
  width: 100%;
  min-height: 60px;
  font-size: 1.2rem;
  border-radius: 16px;
}

/* Landing */
.topbar {
  padding: 16px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.topbar-brand img {
  height: 36px;
  width: auto;
}

.hero {
  padding: 32px 20px 40px;
  background:
    radial-gradient(ellipse 120% 80% at 50% -20%, rgba(245, 165, 36, 0.18), transparent 55%),
    var(--bg);
}

.hero-inner {
  max-width: 520px;
  margin: 0 auto;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand-navy);
  margin-bottom: 20px;
  animation: fadeUp 0.5s var(--step-ease) both;
}

.hero-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-amber);
  animation: pulseDot 1.8s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.hero-title {
  margin: 0 0 16px;
  font-size: clamp(2rem, 7vw, 2.75rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  animation: fadeUp 0.55s var(--step-ease) 0.05s both;
}

.hero-title .accent {
  color: var(--brand-navy);
  position: relative;
}

.hero-lede {
  margin: 0 0 28px;
  font-size: 1.15rem;
  color: var(--muted);
  line-height: 1.55;
  animation: fadeUp 0.55s var(--step-ease) 0.1s both;
}

.hero-lede strong {
  color: var(--brand-navy);
}

#start-wizard-btn {
  animation: fadeUp 0.55s var(--step-ease) 0.15s both, ctaGlow 2.5s ease-in-out 0.8s infinite;
}

@keyframes ctaGlow {
  0%, 100% { box-shadow: 0 4px 20px rgba(245, 165, 36, 0.25); }
  50% { box-shadow: 0 6px 28px rgba(245, 165, 36, 0.45); }
}

.hero-trust {
  margin: 16px 0 0;
  font-size: 0.9rem;
  color: var(--muted);
  animation: fadeUp 0.55s var(--step-ease) 0.2s both;
}

/* Sell sections */
.sell {
  padding: 40px 20px;
  max-width: 560px;
  margin: 0 auto;
}

.sell-title {
  margin: 0 0 24px;
  font-size: clamp(1.6rem, 5vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-align: center;
}

.benefit-list,
.steps-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.benefit-card,
.step-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 2px 12px var(--shadow);
}

.benefit-icon,
.step-num {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: color-mix(in oklab, var(--brand-amber) 22%, white);
  color: var(--brand-navy);
  font-weight: 800;
  font-size: 1.1rem;
}

.benefit-card h3,
.step-card h3 {
  margin: 0 0 4px;
  font-size: 1.1rem;
  font-weight: 700;
}

.benefit-card p,
.step-card p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.45;
}

.reassurance {
  padding-bottom: 48px;
}

.reassurance-box {
  padding: 28px 22px;
  border-radius: 20px;
  background: var(--brand-navy);
  color: #fff;
  text-align: center;
}

.reassurance-box h2 {
  margin: 0 0 12px;
  font-size: 1.5rem;
  font-weight: 800;
}

.reassurance-box p {
  margin: 0 0 24px;
  opacity: 0.9;
  line-height: 1.5;
}

.landing-footer {
  padding: 24px 20px 40px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
}

.landing-footer p {
  margin: 0 0 8px;
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.45s var(--step-ease), transform 0.45s var(--step-ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Wizard overlay */
.wizard {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.wizard-header {
  flex-shrink: 0;
  padding: 12px 16px 8px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.wizard-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 8px;
  border: none;
  border-radius: 12px;
  background: transparent;
  font-size: 1.25rem;
  color: var(--muted);
  cursor: pointer;
}

.wizard-close:hover,
.wizard-close:focus-visible {
  background: var(--bg);
  color: var(--text);
}

.wizard-progress-wrap {
  height: 6px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}

.wizard-progress-bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand-amber), var(--brand-navy));
  transition: width var(--step-duration) var(--step-ease);
}

.wizard-progress-label {
  margin: 8px 0 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
}

.wizard-viewport {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.wizard-form {
  height: 100%;
  position: relative;
}

.wizard-step {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px 20px 16px;
  max-width: 520px;
  margin: 0 auto;
  width: 100%;
  left: 0;
  right: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateX(24px);
  transition:
    opacity var(--step-duration) var(--step-ease),
    transform var(--step-duration) var(--step-ease);
}

.wizard-step--tall {
  justify-content: flex-start;
  overflow-y: auto;
  padding-top: 20px;
  padding-bottom: 24px;
}

.wizard-step--success {
  text-align: center;
  align-items: center;
}

.wizard-step.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
  z-index: 2;
}

.wizard-step.is-exit-left {
  opacity: 0;
  transform: translateX(-24px);
  z-index: 1;
}

.wizard-step.is-exit-right {
  opacity: 0;
  transform: translateX(24px);
  z-index: 1;
}

.wizard-step.is-enter-left {
  transform: translateX(-24px);
}

.wizard-question {
  margin: 0 0 12px;
  font-size: clamp(1.65rem, 5.5vw, 2.1rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.wizard-hint {
  margin: 0 0 20px;
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.45;
}

.wizard-input {
  width: 100%;
  min-height: 60px;
  padding: 16px 18px;
  margin-bottom: 12px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  font-family: inherit;
  font-size: 1.2rem;
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.wizard-input:focus {
  outline: none;
  border-color: var(--brand-navy);
  box-shadow: 0 0 0 4px rgba(33, 61, 88, 0.12);
}

.wizard-input--code {
  text-align: center;
  letter-spacing: 0.35em;
  font-size: 1.6rem;
  font-weight: 700;
}

.wizard-error {
  margin: 4px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: color-mix(in oklab, var(--danger) 12%, white);
  color: var(--danger);
  font-size: 1rem;
  font-weight: 600;
}

.wizard-attempts {
  margin: 8px 0 0;
  font-size: 0.95rem;
  color: var(--muted);
}

.wizard-legal {
  margin: 16px 0;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.45;
}

.service-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 8px;
}

.service-option {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 56px;
  padding: 14px 16px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease;
}

.service-option:has(input:checked) {
  border-color: var(--brand-navy);
  background: color-mix(in oklab, var(--brand-navy) 6%, white);
}

.service-option input {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  accent-color: var(--brand-navy);
}

.service-option span {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.3;
}

.recap-list {
  margin: 0 0 12px;
  padding: 0;
}

.recap-list dt {
  margin: 12px 0 4px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.recap-list dd {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.turnstile-slot {
  margin: 12px 0;
  min-height: 0;
}

.turnstile-slot:not(.hidden) {
  min-height: 65px;
}

.success-icon {
  width: 72px;
  height: 72px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: color-mix(in oklab, var(--success) 18%, white);
  color: var(--success);
  font-size: 2rem;
  font-weight: 800;
  animation: popIn 0.4s var(--step-ease) both;
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(0.6);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.wizard-footer {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 10px;
  padding: 16px 20px calc(16px + env(safe-area-inset-bottom, 0px));
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.wizard-footer.is-single {
  grid-template-columns: 1fr;
}

.wizard-footer.is-hidden {
  display: none;
}

.wizard-footer .btn {
  width: 100%;
}

.wizard-footer #wizard-skip {
  grid-column: 1 / -1;
}

.wizard-status {
  margin: 12px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: color-mix(in oklab, var(--brand-navy) 8%, white);
  color: var(--brand-navy);
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
}

.btn--loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
  cursor: wait;
}

.btn--loading::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1.35rem;
  height: 1.35rem;
  margin: -0.675rem 0 0 -0.675rem;
  border: 2.5px solid color-mix(in oklab, var(--brand-navy-ink) 25%, transparent);
  border-top-color: var(--brand-navy-ink);
  border-radius: 50%;
  animation: insc-spin 0.75s linear infinite;
}

@keyframes insc-spin {
  to { transform: rotate(360deg); }
}

.loading-dots {
  animation: statusPulse 1.4s ease-in-out infinite;
}

@keyframes statusPulse {
  0%, 100% { opacity: 0.65; }
  50% { opacity: 1; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  :root {
    --step-duration: 1ms;
  }

  .reveal,
  .hero-badge,
  .hero-title,
  .hero-lede,
  #start-wizard-btn,
  .hero-trust {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .reveal {
    transition: none;
  }

  #start-wizard-btn {
    animation: none;
  }

  .wizard-step {
    transition: opacity 80ms ease;
    transform: none !important;
  }

  .success-icon {
    animation: none;
  }

  .hero-badge-dot {
    animation: none;
  }

  .btn--loading::after {
    animation: insc-pulse 1.2s ease-in-out infinite;
    border: none;
    background: var(--brand-navy-ink);
    opacity: 0.5;
  }

  .loading-dots {
    animation: none;
    opacity: 1;
  }
}

@keyframes insc-pulse {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 0.9; }
}
