/* ═══════════════════════════════════════════════
   WinVerify — style.css  (v2)
   ═══════════════════════════════════════════════ */

/* ── VARIABLES ── */
:root {
  --primary:        #0F4C81;
  --primary-mid:    #1565C0;
  --primary-light:  #EEF4FF;
  --accent:         #00BFA5;
  --accent-light:   #E0F7F5;
  --success:        #00BFA5;
  --success-light:  #E0F7F5;
  --danger:         #E53935;
  --warn-bg:        #FFFDE7;
  --warn-border:    #FFD740;
  --warn-text:      #7B5E00;

  --bg:       #F0F4F8;
  --surface:  #FFFFFF;
  --border:   #DDE4EE;
  --muted:    #8895A7;
  --text:     #1A2332;
  --text-sm:  #4A5568;

  --shadow-xs: 0 1px 3px rgba(15,76,129,0.07);
  --shadow-sm: 0 2px 10px rgba(15,76,129,0.09);
  --shadow-md: 0 6px 24px rgba(15,76,129,0.12);
  --shadow-lg: 0 12px 40px rgba(15,76,129,0.15);

  --r:    12px;
  --r-sm: 8px;
  --r-xs: 6px;
  --pill: 999px;
}

/* ── RESET ── */
*, *::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;
  line-height: 1.5;
}

/* ══════════════════════════════════════════════
   HEADER
══════════════════════════════════════════════ */
header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
  height: 62px;
  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: 38px; width: auto; object-fit: contain; }

.header-secure {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--accent);
  font-weight: 600;
  background: var(--accent-light);
  padding: 5px 13px;
  border-radius: var(--pill);
  letter-spacing: 0.2px;
}
.header-secure i { font-size: 13px; }

/* ══════════════════════════════════════════════
   MAIN
══════════════════════════════════════════════ */
main { flex: 1; padding: 32px 16px 40px; }
.container { max-width: 480px; margin: 0 auto; }

/* ══════════════════════════════════════════════
   STEP INDICATOR
══════════════════════════════════════════════ */
.step-indicator {
  display: flex;
  align-items: center;
  margin-bottom: 30px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--pill);
  padding: 10px 20px;
  box-shadow: var(--shadow-xs);
}

.step-dot {
  width: 28px; height: 28px;
  border-radius: var(--pill);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  border: 2px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.step-dot.active {
  border-color: var(--primary-mid);
  background: var(--primary-mid);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(21,101,192,0.15);
}

.step-dot.done {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.step-dot.done::after {
  font-family: 'remixicon';
  content: "\eb7b";
  font-size: 12px;
}

.step-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  transition: background 0.3s;
}
.step-line.done { background: var(--accent); }

/* ══════════════════════════════════════════════
   PAGE LAYOUT
══════════════════════════════════════════════ */
.page { display: none; }
.page.active { display: block; }

.page-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.page-icon {
  width: 52px; height: 52px;
  border-radius: var(--r);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.page-icon.blue  { background: var(--primary-light); color: var(--primary-mid); }
.page-icon.green { background: var(--accent-light);  color: var(--accent); }

.page-heading { flex: 1; }

.page-title {
  font-family: 'Sora', sans-serif;
  font-size: 20px;
  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: 24px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}

.card-description {
  font-size: 13.5px;
  color: var(--text-sm);
  line-height: 1.65;
  margin-bottom: 20px;
}

/* ══════════════════════════════════════════════
   FORM
══════════════════════════════════════════════ */
.form-group { margin-bottom: 15px; }

label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-sm);
  margin-bottom: 6px;
  letter-spacing: 0.2px;
}

.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: 11px 14px 11px 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, background 0.2s;
  -webkit-appearance: none;
}

input:focus, select:focus {
  border-color: var(--primary-mid);
  background: #FAFCFF;
  box-shadow: 0 0 0 3px rgba(21,101,192,0.1);
}

input::placeholder { color: #B0BAC9; }

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='%238895A7' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
  cursor: pointer;
  color: var(--text);
}

select option[value=""] { color: #B0BAC9; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ── Error ── */
.error-msg {
  display: none;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  color: var(--danger);
  margin-top: 7px;
  font-weight: 500;
}
.error-msg i { font-size: 14px; }

/* ══════════════════════════════════════════════
   DIVIDER
══════════════════════════════════════════════ */
.form-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0;
}
.form-divider::before, .form-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.form-divider span {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

/* ══════════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════════ */
.btn {
  width: 100%;
  padding: 13px 16px;
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 600;
  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.2px;
}
.btn i { font-size: 16px; }

.btn-primary {
  background: linear-gradient(135deg, var(--primary-mid) 0%, var(--primary) 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(15,76,129,0.25);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 16px rgba(15,76,129,0.32);
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: var(--bg);
  color: var(--text-sm);
  border: 1.5px solid var(--border);
  margin-top: 10px;
}
.btn-secondary:hover { background: #E8EDF4; }

/* ══════════════════════════════════════════════
   GAIN BOX
══════════════════════════════════════════════ */
.gain-box {
  background: var(--primary);
  border-radius: var(--r);
  padding: 28px 24px;
  text-align: center;
  color: #fff;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}

/* Cercles décoratifs */
.gain-box::before {
  content: '';
  position: absolute;
  top: -50px; right: -50px;
  width: 160px; height: 160px;
  border: 2px solid rgba(255,255,255,0.06);
  border-radius: 50%;
}
.gain-box::after {
  content: '';
  position: absolute;
  bottom: -60px; left: -40px;
  width: 180px; height: 180px;
  border: 2px solid rgba(255,255,255,0.06);
  border-radius: 50%;
}

.gain-label {
  font-size: 11px;
  opacity: 0.6;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 600;
  margin-bottom: 12px;
}

.gain-amount {
  font-family: 'Sora', sans-serif;
  font-size: 38px;
  font-weight: 700;
  color: #fff;
  position: relative;
  z-index: 1;
  animation: pulse 2.5s ease-in-out infinite;
}

.gain-amount span {
  color: var(--accent);
}

.gain-currency {
  font-size: 13px;
  opacity: 0.55;
  margin-top: 8px;
  position: relative;
  z-index: 1;
}

.gain-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 14px;
  background: rgba(0,191,165,0.18);
  border: 1px solid rgba(0,191,165,0.3);
  border-radius: var(--pill);
  padding: 4px 14px;
  font-size: 11.5px;
  color: #4DFFD4;
  font-weight: 600;
  position: relative;
  z-index: 1;
}

@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: 18px;
  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(--accent); }

/* ══════════════════════════════════════════════
   ALERT
══════════════════════════════════════════════ */
.alert {
  border-radius: var(--r-xs);
  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: var(--warn-bg);
  border: 1px solid var(--warn-border);
  color: var(--warn-text);
}
.alert-warning .alert-icon { color: #F9A825; }

/* ══════════════════════════════════════════════
   CARTE PREVIEW (page 4)
══════════════════════════════════════════════ */
.card-preview {
  background: linear-gradient(135deg, #0F4C81 0%, #1565C0 50%, #1976D2 100%);
  border-radius: 14px;
  padding: 20px 22px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(15,76,129,0.3);
}
.card-preview::before {
  content: '';
  position: absolute;
  top: -30px; right: -30px;
  width: 110px; height: 110px;
  background: rgba(255,255,255,0.06);
  border-radius: 50%;
}
.card-preview-chip {
  width: 30px; height: 22px;
  background: linear-gradient(135deg, #FFD740, #F9A825);
  border-radius: 4px;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}
.card-preview-num {
  font-family: 'Outfit', monospace;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  letter-spacing: 3px;
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
  min-height: 22px;
}
.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.5);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 2px;
}
.card-preview-value {
  font-size: 13px;
  color: #fff;
  font-weight: 600;
  font-family: 'Outfit', monospace;
  min-height: 18px;
}
.card-preview-cvv { text-align: right; }

/* ══════════════════════════════════════════════
   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: 72px; height: 72px;
  background: var(--accent-light);
  border-radius: var(--pill);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
  color: var(--accent);
  font-size: 34px;
}

.thank-title {
  font-family: 'Sora', sans-serif;
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}

.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: 11.5px;
  color: var(--muted);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.thank-ref strong {
  display: block;
  font-size: 17px;
  color: var(--primary-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 OVERLAY
══════════════════════════════════════════════ */
#loadingOverlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10,20,40,0.5);
  backdrop-filter: blur(3px);
  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(--primary-mid);
  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: #0A1628;
  color: rgba(255,255,255,0.45);
  padding: 28px 20px;
  margin-top: auto;
}
.footer-inner { max-width: 480px; margin: 0 auto; }

.footer-links {
  display: flex;
  gap: 22px;
  justify-content: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.footer-links a {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: color 0.2s;
}
.footer-links a:hover { color: rgba(255,255,255,0.85); }

.footer-badges {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 16px;
}
.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: rgba(0,191,165,0.1); color: #00BFA5; }
.footer-badge.blue  { background: rgba(21,101,192,0.15); color: #64B5F6; }

.footer-copyright {
  text-align: center;
  font-size: 11px;
  color: rgba(255,255,255,0.2);
  border-top: 1px solid rgba(255,255,255,0.07);
  padding-top: 16px;
}