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

:root {
  --navy: #050D5C;
  --navy-mid: #0D1E8A;
  --blue: #3B5BDB;
  --gold: #C9A84C;
  --gold-light: #E8C97A;
  --cream: #FAF8F4;
  --white: #ffffff;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Montserrat', sans-serif;
  background: var(--navy);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── BACKGROUND ── */
.bg-scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.bg-gradient {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% -10%, #1A2EA8 0%, #050D5C 55%, #020820 100%);
}

.bg-stars {
  position: absolute;
  inset: 0;
}

.star {
  position: absolute;
  background: white;
  border-radius: 50%;
  animation: twinkle var(--dur, 3s) ease-in-out infinite var(--delay, 0s);
  opacity: 0;
}

@keyframes twinkle {
  0%, 100% { opacity: 0; transform: scale(0.5); }
  50%       { opacity: var(--max-op, 0.7); transform: scale(1); }
}

.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  animation: float 8s ease-in-out infinite;
}

.orb-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(59,91,219,0.18) 0%, transparent 70%);
  top: -200px; left: -200px;
  animation-delay: 0s;
}
.orb-2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(201,168,76,0.12) 0%, transparent 70%);
  bottom: -100px; right: -100px;
  animation-delay: -4s;
}
.orb-3 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(59,91,219,0.15) 0%, transparent 70%);
  top: 50%; left: 60%;
  animation-delay: -2s;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) scale(1); }
  50%       { transform: translateY(-30px) scale(1.05); }
}

/* ── PARTICLES ── */
.particle {
  position: fixed;
  pointer-events: none;
  z-index: 0;
  animation: particle-rise var(--rise, 6s) ease-in infinite var(--delay, 0s);
  opacity: 0;
}

.particle::before {
  content: var(--char, '✦');
  font-size: var(--size, 14px);
  color: var(--gold-light);
  opacity: 0.6;
}

@keyframes particle-rise {
  0%   { opacity: 0; transform: translateY(0) rotate(0deg); }
  10%  { opacity: 0.8; }
  90%  { opacity: 0.4; }
  100% { opacity: 0; transform: translateY(-100vh) rotate(360deg); }
}

/* ── WRAPPER ── */
.page-wrapper {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 20px 80px;
  padding-top: 100px; /* Espace pour le header sticky */
}

/* ── LOGO ── */
.site-logo {
  margin-bottom: 48px;
  opacity: 0;
  animation: fade-down 0.8s ease forwards 0.2s;
}

.site-logo a {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 300;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
}

.site-logo span {
  color: var(--gold-light);
}

/* ── SUCCESS CIRCLE ── */
.success-ring-wrap {
  position: relative;
  margin: 0 auto 48px auto;
  opacity: 0;
  animation: fade-scale 1s cubic-bezier(0.34,1.56,0.64,1) forwards 0.5s;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 130px;
}

.success-ring {
  width: 130px;
  height: 130px;
  position: relative;
}

.ring-svg {
  width: 130px;
  height: 130px;
  transform: rotate(-90deg);
}

.ring-track {
  fill: none;
  stroke: rgba(255,255,255,0.08);
  stroke-width: 2;
}

.ring-progress {
  fill: none;
  stroke: url(#ringGradient);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 345;
  stroke-dashoffset: 345;
  animation: ring-draw 1.5s cubic-bezier(0.4,0,0.2,1) forwards 1s;
}

@keyframes ring-draw {
  to { stroke-dashoffset: 0; }
}

.ring-inner {
  position: absolute;
  inset: 12px;
  background: linear-gradient(135deg, rgba(59,91,219,0.3), rgba(5,13,92,0.6));
  border-radius: 50%;
  border: 1px solid rgba(201,168,76,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
}

.check-icon {
  width: 44px;
  height: 44px;
  opacity: 0;
  animation: pop-in 0.5s cubic-bezier(0.34,1.56,0.64,1) forwards 1.8s;
}

.check-path {
  stroke: var(--gold-light);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  stroke-dasharray: 60;
  stroke-dashoffset: 60;
  animation: draw-check 0.5s ease forwards 2s;
}

@keyframes draw-check {
  to { stroke-dashoffset: 0; }
}

@keyframes pop-in {
  from { opacity: 0; transform: scale(0.5); }
  to   { opacity: 1; transform: scale(1); }
}

.pulse-ring {
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  border: 1px solid rgba(201,168,76,0.3);
  animation: pulse-out 2.5s ease-out infinite;
  opacity: 0;
}
.pulse-ring:nth-child(2) { animation-delay: 0.8s; }
.pulse-ring:nth-child(3) { animation-delay: 1.6s; }

@keyframes pulse-out {
  0%   { transform: scale(0.9); opacity: 0.6; }
  100% { transform: scale(1.5); opacity: 0; }
}

/* ── MAIN CARD ── */
.card {
  width: 100%;
  max-width: 680px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 28px;
  backdrop-filter: blur(20px);
  overflow: hidden;
  opacity: 0;
  animation: fade-up 0.8s ease forwards 0.8s;
}

.card-header {
  padding: 48px 48px 36px;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  position: relative;
}

.card-header::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), var(--gold-light), var(--gold), transparent);
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { opacity: 0.5; }
  50%       { opacity: 1; }
}

.eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 16px;
  opacity: 0.8;
}

.card-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(30px, 5vw, 46px);
  font-weight: 300;
  color: var(--white);
  line-height: 1.2;
  letter-spacing: 0.5px;
  margin-bottom: 20px;
}

.card-title em {
  font-style: italic;
  color: var(--gold-light);
}

.card-subtitle {
  font-size: 14px;
  color: rgba(255,255,255,0.55);
  line-height: 1.7;
  max-width: 440px;
  margin: 0 auto;
}

/* ── EMAIL NOTICE ── */
.email-notice {
  margin: 28px 48px;
  background: linear-gradient(135deg, rgba(201,168,76,0.12), rgba(59,91,219,0.1));
  border: 1px solid rgba(201,168,76,0.25);
  border-radius: 16px;
  padding: 22px 28px;
  display: flex;
  align-items: flex-start;
  gap: 18px;
}

.email-icon-wrap {
  width: 46px;
  height: 46px;
  min-width: 46px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  animation: icon-bounce 1s ease-in-out infinite 3s;
}

@keyframes icon-bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-4px); }
}

.email-text strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 6px;
}

.email-text p {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  line-height: 1.6;
}

.email-text p span {
  color: var(--gold-light);
  font-weight: 600;
}

/* ── STEPS ── */
.steps-section {
  padding: 0 48px 40px;
}

.steps-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  margin-bottom: 24px;
}

.steps { display: flex; flex-direction: column; gap: 0; }

.step {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  position: relative;
  opacity: 0;
  animation: fade-left 0.6s ease forwards;
}

.step:nth-child(1) { animation-delay: 1.4s; }
.step:nth-child(2) { animation-delay: 1.6s; }
.step:nth-child(3) { animation-delay: 1.8s; }

.step-left {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  background: rgba(59,91,219,0.2);
  border: 1px solid rgba(59,91,219,0.4);
  color: var(--blue);
  flex-shrink: 0;
}

.step.done .step-num {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  border-color: transparent;
  color: var(--navy);
}

.step-line {
  width: 1px;
  flex: 1;
  min-height: 30px;
  background: linear-gradient(to bottom, rgba(59,91,219,0.3), transparent);
  margin: 4px 0;
}

.step:last-child .step-line { display: none; }

.step-content { padding-bottom: 28px; }

.step-content strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 5px;
}

.step-content p {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  line-height: 1.6;
}

/* ── CTA ── */
.card-footer {
  padding: 32px 48px 40px;
  border-top: 1px solid rgba(255,255,255,0.07);
  text-align: center;
  background: rgba(5,13,92,0.3);
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 36px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 50%, var(--gold) 100%);
  background-size: 200% auto;
  color: var(--navy);
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: background-position 0.4s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 6px 30px rgba(201,168,76,0.3);
  opacity: 0;
  animation: fade-up 0.6s ease forwards 2.2s;
}

.cta-btn:hover {
  background-position: right center;
  transform: translateY(-2px);
  box-shadow: 0 10px 40px rgba(201,168,76,0.45);
}

.cta-btn svg { width: 16px; height: 16px; transition: transform 0.2s; }
.cta-btn:hover svg { transform: translateX(3px); }

.footer-note {
  margin-top: 20px;
  font-size: 12px;
  color: rgba(255,255,255,0.3);
  opacity: 0;
  animation: fade-up 0.6s ease forwards 2.4s;
}

.footer-note a {
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.2);
  transition: color 0.2s;
}
.footer-note a:hover { color: var(--gold-light); }

/* ── BOTTOM LINKS ── */
.bottom-nav {
  margin-top: 40px;
  display: flex;
  gap: 32px;
  opacity: 0;
  animation: fade-up 0.6s ease forwards 2.6s;
}

.bottom-nav a {
  font-size: 12px;
  color: rgba(255,255,255,0.3);
  text-decoration: none;
  letter-spacing: 1px;
  transition: color 0.2s;
}

.bottom-nav a:hover { color: var(--gold-light); }

/* ── KEYFRAMES ── */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fade-down {
  from { opacity: 0; transform: translateY(-16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fade-scale {
  from { opacity: 0; transform: scale(0.7); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes fade-left {
  from { opacity: 0; transform: translateX(-20px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── CONFETTI ── */
.confetti-piece {
  position: fixed;
  top: -10px;
  pointer-events: none;
  z-index: 10;
  opacity: 0;
  animation: confetti-fall var(--fall, 4s) ease-in var(--delay, 0s) 1 forwards;
}

@keyframes confetti-fall {
  0%   { opacity: 1; transform: translateY(0) rotate(0deg) translateX(0); }
  100% { opacity: 0; transform: translateY(110vh) rotate(720deg) translateX(var(--drift, 40px)); }
}

/* ── TIMER ── */
.timer-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(59,91,219,0.15);
  border: 1px solid rgba(59,91,219,0.3);
  border-radius: 50px;
  padding: 6px 14px 6px 8px;
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  margin-bottom: 20px;
}

.timer-dot {
  width: 8px; height: 8px;
  background: #4ade80;
  border-radius: 50%;
  animation: dot-pulse 1.5s ease-in-out infinite;
}

@keyframes dot-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.7); }
}

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  .page-wrapper { padding-top: 90px; }
  .card-header, .steps-section, .card-footer { padding-left: 24px; padding-right: 24px; }
  .email-notice { margin-left: 24px; margin-right: 24px; }
  .bottom-nav { flex-direction: column; align-items: center; gap: 16px; }
  .card-title { font-size: 28px; }
}
