/* ═══════════════════════════════════════════════
   Win Loto — style.css (v5 — white + green buttons)
   ═══════════════════════════════════════════════ */

:root {
  --green-dark:    #0D3B2E;
  --green-mid:     #1A6B4A;
  --green-base:    #22A060;
  --green-light:   #34C978;
  --green-pale:    #F0FAF5;
  --green-border:  #C8E6D8;
  --green-glow:    rgba(34,160,96,0.15);

  --success:       #22A060;
  --success-light: #F0FAF5;
  --danger:        #E74C3C;

  --bg:      #F5F7FA;
  --surface: #FFFFFF;
  --border:  #E4E9F0;
  --muted:   #9CA3AF;
  --text:    #111827;
  --text-sm: #4B5563;

  --shadow-xs: 0 1px 4px rgba(0,0,0,0.06);
  --shadow-sm: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-md: 0 6px 24px rgba(0,0,0,0.10);
  --shadow-lg: 0 14px 42px rgba(0,0,0,0.13);

  --r:    14px;
  --r-sm: 9px;
  --pill: 999px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── HEADER ── */
header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
  height: 60px;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-xs);
}
.header-inner {
  max-width: 480px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header-logo { height: 36px; width: auto; object-fit: contain; }
.header-secure {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--green-base);
  font-weight: 600;
  background: var(--green-pale);
  border: 1px solid var(--green-border);
  padding: 5px 12px;
  border-radius: var(--pill);
}
.header-secure i { font-size: 12px; }

/* ── MAIN ── */
main { flex: 1; padding: 30px 16px 44px; }
.container { max-width: 480px; margin: 0 auto; }

/* ── STEP INDICATOR ── */
.step-indicator {
  display: flex;
  align-items: center;
  margin-bottom: 28px;
  padding: 10px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--pill);
  box-shadow: var(--shadow-xs);
}
.step-dot {
  width: 30px; height: 30px;
  border-radius: var(--pill);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  border: 2px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  flex-shrink: 0;
  transition: all 0.3s ease;
}
.step-dot.active {
  border-color: var(--green-base);
  background: var(--green-base);
  color: #fff;
  box-shadow: 0 0 0 3px var(--green-glow);
}
.step-dot.done {
  border-color: var(--green-light);
  background: var(--green-light);
  color: #fff;
}
.step-dot.done::after {
  font-family: 'remixicon';
  content: "\eb7b";
  font-size: 13px;
}
.step-line { flex: 1; height: 2px; background: var(--border); transition: background 0.3s; }
.step-line.done { background: var(--green-light); }

/* ── PAGES ── */
.page { display: none; }
.page.active { display: block; }

.page-header { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.page-icon {
  width: 50px; height: 50px;
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 21px; flex-shrink: 0;
  background: var(--bg);
  color: var(--text-sm);
  border: 1px solid var(--border);
}
.page-icon.blue  { background: var(--bg); color: var(--text-sm); }
.page-icon.green { background: var(--green-pale); color: var(--green-base); }

.page-heading { flex: 1; }
.page-title {
  font-family: 'Sora', sans-serif;
  font-size: 19px; font-weight: 700;
  color: var(--text); margin-bottom: 3px;
}
.page-subtitle { font-size: 13px; color: var(--muted); line-height: 1.55; }

/* ── CARD ── */
.card {
  background: var(--surface);
  border-radius: var(--r);
  border: 1px solid var(--border);
  padding: 22px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}
.card-description { font-size: 13.5px; color: var(--text-sm); line-height: 1.65; margin-bottom: 18px; }

/* ── FORM ── */
.form-group { margin-bottom: 14px; }
label {
  display: block;
  font-size: 12px; font-weight: 700;
  color: var(--text-sm);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.input-wrapper { position: relative; }
.input-icon {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  font-size: 15px; color: var(--muted);
  pointer-events: none; z-index: 1;
}
input, select {
  width: 100%;
  padding: 12px 14px 12px 38px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 14px;
  font-family: 'Outfit', sans-serif;
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
}
input:focus, select:focus {
  border-color: var(--green-base);
  box-shadow: 0 0 0 3px var(--green-glow);
}
input::placeholder { color: #C4CAD4; }
input.error { border-color: var(--danger); background: #FFF5F5; }
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239CA3AF' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.error-msg {
  display: none;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  color: var(--danger);
  margin-top: 7px;
  font-weight: 500;
}

/* ── BUTTONS ── */
.btn {
  width: 100%;
  padding: 13px 16px;
  border-radius: var(--r-sm);
  font-size: 14px; font-weight: 700;
  font-family: 'Outfit', sans-serif;
  cursor: pointer; border: none;
  transition: all 0.2s ease;
  display: flex; align-items: center;
  justify-content: center; gap: 8px;
  letter-spacing: 0.3px;
}
.btn i { font-size: 16px; }

/* ✅ Bouton principal — vert */
.btn-primary {
  background: linear-gradient(135deg, var(--green-base) 0%, var(--green-mid) 100%);
  color: #fff;
  box-shadow: 0 3px 14px rgba(34,160,96,0.3);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--green-light) 0%, var(--green-base) 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(34,160,96,0.38);
}
.btn-primary:active { transform: translateY(0); }

/* Bouton secondaire — blanc */
.btn-secondary {
  background: var(--surface);
  color: var(--text-sm);
  border: 1.5px solid var(--border);
  margin-top: 10px;
}
.btn-secondary:hover { background: var(--bg); }

/* ── GAIN BOX ── */
.gain-box {
  background: #fff;
  border-radius: var(--r);
  border: 1px solid var(--green-border);
  padding: 28px 24px;
  text-align: center;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.gain-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 2px; font-weight: 600;
  margin-bottom: 12px;
}
.gain-amount {
  font-family: 'Sora', sans-serif;
  font-size: 40px; font-weight: 700;
  color: var(--text);
  animation: pulse 2.5s ease-in-out infinite;
}
.gain-amount span { color: var(--green-base); }
.gain-currency { font-size: 13px; color: var(--muted); margin-top: 8px; }
.gain-badge {
  display: inline-flex;
  align-items: center; gap: 5px;
  margin-top: 14px;
  background: var(--green-pale);
  border: 1px solid var(--green-border);
  border-radius: var(--pill);
  padding: 5px 14px;
  font-size: 11.5px; color: var(--green-base);
  font-weight: 600;
}

.gain-amount a, .gain-amount a:link, .gain-amount a:visited {
  color: inherit !important;
  text-decoration: none !important;
  pointer-events: none;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

/* ── SECURITY ROW ── */
.security-row {
  display: flex; flex-wrap: wrap;
  gap: 10px; margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.security-item { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); }
.security-icon { font-size: 13px; color: var(--green-base); }

/* ── ALERT ── */
.alert {
  border-radius: var(--r-sm);
  padding: 11px 14px;
  font-size: 13px;
  display: flex; align-items: flex-start;
  gap: 9px; margin-bottom: 16px; line-height: 1.5;
}
.alert-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.alert-warning { background: #FFFDE7; border: 1px solid #FFD740; color: #7B5E00; }
.alert-warning .alert-icon { color: #F9A825; }

/* ── CARD PREVIEW ── */
.card-preview {
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green-mid) 60%, var(--green-base) 100%);
  border-radius: 14px;
  padding: 22px;
  margin-bottom: 20px;
  position: relative; overflow: hidden;
  box-shadow: 0 8px 24px rgba(13,59,46,0.25);
}
.card-preview::before {
  content: '';
  position: absolute; top: -30px; right: -30px;
  width: 120px; height: 120px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}
.card-preview-chip {
  width: 32px; height: 24px;
  background: linear-gradient(135deg, #FFD740, #F9A825);
  border-radius: 4px; margin-bottom: 18px;
  position: relative; z-index: 1;
}
.card-preview-num {
  font-family: 'Outfit', monospace;
  font-size: 17px; font-weight: 600;
  color: #fff; letter-spacing: 3px;
  margin-bottom: 16px;
  position: relative; z-index: 1; min-height: 24px;
}
.card-preview-bot {
  display: flex; justify-content: space-between;
  align-items: flex-end; position: relative; z-index: 1;
}
.card-preview-label {
  font-size: 9px; color: rgba(255,255,255,0.45);
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: 3px;
}
.card-preview-value {
  font-size: 14px; color: #fff;
  font-weight: 600; font-family: 'Outfit', monospace; min-height: 20px;
}
.card-preview-cvv .card-preview-value { color: var(--green-light); }

/* ── THANK YOU ── */
.thank-you-card {
  background: var(--surface);
  border-radius: var(--r);
  border: 1px solid var(--border);
  padding: 44px 28px 36px;
  text-align: center;
  box-shadow: var(--shadow-md);
}
.checkmark-circle {
  width: 74px; height: 74px;
  background: var(--green-pale);
  border-radius: var(--pill);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
  color: var(--green-base); font-size: 36px;
}
.thank-title { font-family: 'Sora', sans-serif; font-size: 24px; font-weight: 700; margin-bottom: 12px; }
.thank-text { font-size: 14px; color: var(--text-sm); line-height: 1.75; margin-bottom: 24px; }
.thank-ref {
  background: var(--bg);
  border: 1px dashed var(--border);
  border-radius: var(--r-sm); padding: 14px 18px;
}
.thank-ref-label {
  display: flex; align-items: center; justify-content: center;
  gap: 5px; font-size: 11px; color: var(--muted);
  margin-bottom: 5px; text-transform: uppercase; letter-spacing: 0.5px;
}
.thank-ref strong {
  display: block; font-size: 17px;
  color: var(--green-mid); font-weight: 700;
  letter-spacing: 2px; font-family: 'Sora', monospace;
}
.thank-note {
  display: flex; align-items: center; justify-content: center;
  gap: 6px; font-size: 12px; color: var(--muted); margin-top: 18px;
}

/* ── LOADING ── */
#loadingOverlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
  z-index: 999; align-items: center; justify-content: center;
}
#loadingOverlay.show { display: flex; }
.loading-card {
  background: var(--surface);
  border-radius: var(--r); padding: 32px 28px;
  text-align: center; width: 230px; box-shadow: var(--shadow-lg);
}
.spinner {
  width: 42px; height: 42px;
  border: 3px solid var(--border);
  border-top-color: var(--green-base);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { font-size: 14px; font-weight: 600; color: var(--text); }
.loading-sub  { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ── CONFETTI ── */
.confetti-piece {
  position: fixed; width: 8px; height: 8px;
  border-radius: 2px;
  animation: confetti-fall linear forwards;
  pointer-events: none; z-index: 9999; top: -10px;
}
@keyframes confetti-fall {
  0%   { transform: translateY(0) rotate(0deg);     opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* ── FOOTER ── */
footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  color: var(--muted);
  padding: 24px 20px;
  margin-top: auto;
}
.footer-inner { max-width: 480px; margin: 0 auto; }
.footer-links {
  display: flex; gap: 22px;
  justify-content: center; margin-bottom: 14px; flex-wrap: wrap;
}
.footer-links a {
  font-size: 12px; color: var(--muted);
  text-decoration: none;
  display: flex; align-items: center; gap: 5px;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--green-base); }
.footer-badges {
  display: flex; gap: 10px;
  justify-content: center; margin-bottom: 14px;
}
.footer-badge {
  display: flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 600;
  padding: 5px 13px; border-radius: var(--pill);
}
.footer-badge.green { background: var(--green-pale); color: var(--green-base); border: 1px solid var(--green-border); }
.footer-badge.blue  { background: var(--bg); color: var(--text-sm); border: 1px solid var(--border); }
.footer-copyright {
  text-align: center; font-size: 11px; color: #C4CAD4;
  border-top: 1px solid var(--border); padding-top: 14px;
}