/* EGA — Pages Paiement, Succès, Échec */

.ega-payment-wrap,
.ega-result-wrap {
  max-width: 900px;
  margin: 40px auto;
  padding: 0 20px 60px;
  font-family: 'Poppins', -apple-system, sans-serif;
}

/* ── Barre de progression ── */
.ega-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 40px;
}
.ega-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #9ca3af;
  font-weight: 500;
}
.ega-step.active { color: #4f46e5; }
.ega-step.done   { color: #16a34a; }
.ega-step-dot {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: #e5e7eb;
  color: #9ca3af;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
}
.ega-step.active .ega-step-dot { background: #4f46e5; color: #fff; }
.ega-step.done   .ega-step-dot { background: #16a34a; color: #fff; }
.ega-step-line {
  width: 80px; height: 2px;
  background: #e5e7eb;
  margin: 0 4px;
  position: relative;
  top: -10px;
}
.ega-step-line.done { background: #16a34a; }

/* ── Grille paiement ── */
.ega-payment-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 680px) {
  .ega-payment-grid { grid-template-columns: 1fr; }
}

/* ── Résumé candidature ── */
.ega-summary {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 28px;
}
.ega-summary-title {
  font-size: 15px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 20px;
}
.ega-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  font-size: 13px;
  color: #374151;
  border-bottom: 1px solid #e5e7eb;
}
.ega-summary-row:last-of-type { border-bottom: none; }
.ega-summary-row span { color: #6b7280; }
.ega-summary-row strong { text-align: right; font-weight: 600; }
.ega-summary-divider { border-top: 2px solid #e5e7eb; margin: 12px 0; }
.ega-summary-row.total { font-size: 15px; }
.ega-amount { color: #4f46e5; font-size: 18px; font-weight: 700; }
.ega-badge-secure {
  margin-top: 16px;
  text-align: center;
  font-size: 12px;
  color: #16a34a;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 6px;
  padding: 8px;
}

/* ── Formulaire paiement ── */
.ega-payment-form-wrap {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 28px;
  box-shadow: 0 4px 24px rgba(0,0,0,.06);
}
.ega-sim-notice {
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 12px;
  color: #92400e;
  margin-bottom: 20px;
}
.ega-form-title {
  font-size: 15px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 20px;
}
.ega-field { margin-bottom: 16px; }
.ega-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 6px;
}
.ega-field input {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 11px 14px;
  font-size: 14px;
  color: #111827;
  outline: none;
  transition: border-color .2s;
  box-sizing: border-box;
}
.ega-field input:focus { border-color: #4f46e5; box-shadow: 0 0 0 3px rgba(79,70,229,.1); }

.ega-field-row { display: flex; gap: 12px; }
.ega-field-row .ega-field { flex: 1; }

.ega-sim-card {
  background: linear-gradient(135deg, #1a3c6e, #4f46e5);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  color: #fff;
}
.ega-sim-card-inner { font-family: monospace; }

.ega-pay-btn {
  display: block;
  width: 100%;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff !important;
  border: none;
  border-radius: 10px;
  padding: 16px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  text-decoration: none !important;
  transition: opacity .2s, transform .1s;
  margin-top: 20px;
}
.ega-pay-btn:hover { opacity: .9; transform: translateY(-1px); }
.ega-pay-btn:active { transform: translateY(0); }

.ega-disclaimer {
  font-size: 11px;
  color: #9ca3af;
  text-align: center;
  margin-top: 12px;
  line-height: 1.5;
}
.ega-disclaimer a { color: #4f46e5; }

/* ══════════════════════════════════════════════════
   PAGE DE CONFIRMATION — Design premium
   ══════════════════════════════════════════════════ */

.ega-confirm-page {
  max-width: 620px;
  margin: 0 auto;
  padding: 20px 20px 60px;
  font-family: 'Poppins', -apple-system, sans-serif;
  position: relative;
}

/* Confettis */
.ega-confetti-container {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 200px;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}

/* Barre de progression — confirmée */
.ega-steps-confirm { margin-bottom: 32px; }
.ega-steps-confirm .ega-step-dot {
  background: #16a34a !important;
  color: #fff !important;
}
.ega-steps-confirm .ega-step { color: #16a34a !important; }
.ega-steps-confirm .ega-step-line { background: #16a34a !important; }
.ega-steps-confirm .ega-step.active .ega-step-dot {
  box-shadow: 0 0 0 4px rgba(22,163,74,.2);
}

/* Hero */
.ega-success-hero {
  text-align: center;
  padding: 40px 20px 36px;
  animation: ega-slide-up .5s ease both;
}

/* Cercle animé */
.ega-check-wrap {
  position: relative;
  width: 100px;
  height: 100px;
  margin: 0 auto 28px;
  animation: ega-pop-in .6s cubic-bezier(.34,1.56,.64,1) both;
}
.ega-pulse-ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 3px solid rgba(22,163,74,.4);
  animation: ega-pulse-ring 1.2s .6s ease-out infinite;
}
.ega-check-circle {
  width: 100px; height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, #16a34a, #22c55e);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 40px rgba(22,163,74,.4), 0 4px 12px rgba(22,163,74,.3);
}
.ega-check-circle svg {
  width: 52px; height: 52px;
}

.ega-success-title {
  font-size: 32px !important;
  font-weight: 800 !important;
  color: #111827 !important;
  margin: 0 0 12px !important;
  line-height: 1.2 !important;
  letter-spacing: -.02em;
}
.ega-success-subtitle {
  font-size: 16px;
  color: #6b7280;
  line-height: 1.6;
  margin: 0;
}
.ega-success-subtitle strong { color: #111827; font-weight: 700; }

/* Carte principale */
.ega-confirm-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 48px rgba(0,0,0,.10), 0 2px 8px rgba(0,0,0,.06);
  animation: ega-slide-up .5s .15s ease both;
  margin-bottom: 24px;
}

/* Référence en vedette */
.ega-ref-block {
  background: linear-gradient(135deg, #1a3c6e 0%, #4f46e5 100%);
  padding: 28px 32px;
  text-align: center;
  color: #fff;
}
.ega-ref-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  opacity: .75;
  margin-bottom: 10px;
}
.ega-ref-code {
  font-size: 22px;
  font-weight: 800;
  font-family: 'Courier New', monospace;
  letter-spacing: .08em;
  background: rgba(255,255,255,.15);
  display: inline-block;
  padding: 8px 20px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.2);
  margin-bottom: 8px;
}
.ega-ref-date {
  font-size: 12px;
  opacity: .7;
  margin-top: 4px;
}

/* Détails */
.ega-confirm-details {
  padding: 8px 0;
}
.ega-confirm-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 28px;
  border-bottom: 1px solid #f3f4f6;
  transition: background .15s;
}
.ega-confirm-row:last-child { border-bottom: none; }
.ega-confirm-row:hover { background: #fafafa; }
.ega-confirm-icon { font-size: 20px; width: 28px; text-align: center; flex-shrink: 0; }
.ega-confirm-info { flex: 1; min-width: 0; }
.ega-confirm-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #9ca3af;
  margin-bottom: 2px;
}
.ega-confirm-value {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ega-confirm-amount {
  font-size: 18px !important;
  color: #4f46e5 !important;
  font-weight: 800 !important;
}
.ega-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Séparateur */
.ega-confirm-sep {
  height: 1px;
  background: linear-gradient(90deg, transparent, #e5e7eb 20%, #e5e7eb 80%, transparent);
  margin: 4px 28px;
}

/* Timeline des prochaines étapes */
.ega-steps-section { padding: 20px 28px 28px; }
.ega-steps-title {
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #374151 !important;
  margin: 0 0 20px !important;
}
.ega-timeline { display: flex; flex-direction: column; gap: 0; }
.ega-timeline-item {
  display: flex;
  gap: 16px;
  padding-bottom: 20px;
  position: relative;
}
.ega-timeline-item:last-child { padding-bottom: 0; }
.ega-timeline-item:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 32px;
  bottom: 0;
  width: 2px;
  background: #e5e7eb;
}
.ega-timeline-dot {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.ega-tl-done   { background: #16a34a; color: #fff; box-shadow: 0 0 0 3px rgba(22,163,74,.15); }
.ega-tl-active { background: #4f46e5; color: #fff; box-shadow: 0 0 0 3px rgba(79,70,229,.15); }
.ega-tl-pending { background: #f3f4f6; color: #9ca3af; border: 2px solid #e5e7eb; }
.ega-timeline-body { padding-top: 5px; }
.ega-tl-title { font-size: 14px; font-weight: 600; color: #111827; margin-bottom: 3px; }
.ega-tl-sub   { font-size: 12px; color: #9ca3af; line-height: 1.5; }

/* Boutons d'action */
.ega-confirm-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  animation: ega-slide-up .5s .3s ease both;
}
.ega-btn-confirm-home {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #1a3c6e, #4f46e5);
  color: #fff !important;
  padding: 14px 28px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none !important;
  box-shadow: 0 4px 16px rgba(79,70,229,.35);
  transition: transform .2s, box-shadow .2s;
}
.ega-btn-confirm-home:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(79,70,229,.45);
}
.ega-btn-confirm-contact {
  display: inline-flex;
  align-items: center;
  padding: 14px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: #374151 !important;
  background: #fff;
  border: 1px solid #e5e7eb;
  text-decoration: none !important;
  transition: all .2s;
}
.ega-btn-confirm-contact:hover {
  background: #f9fafb;
  border-color: #d1d5db;
  transform: translateY(-1px);
}

/* ── Page Échec ── */
.ega-result-wrap.ega-failed {
  max-width: 560px;
  margin: 40px auto;
  padding: 0 20px 60px;
  text-align: center;
  font-family: 'Poppins', -apple-system, sans-serif;
}
.ega-result-wrap.ega-failed .ega-result-icon { font-size: 64px; margin-bottom: 20px; }
.ega-result-wrap.ega-failed h2 { font-size: 28px; font-weight: 700; color: #111827; margin: 0 0 12px; }
.ega-result-subtitle { font-size: 16px; color: #6b7280; margin-bottom: 32px; }
.ega-next-steps {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 12px;
  padding: 20px 28px;
  margin-bottom: 28px;
  text-align: left;
}
.ega-next-steps h4 { font-size: 14px; font-weight: 700; color: #dc2626; margin: 0 0 12px; }
.ega-next-steps ol { margin: 0; padding-left: 20px; font-size: 14px; color: #374151; line-height: 1.8; }
.ega-btn-home,
.ega-btn-secondary {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  margin: 4px;
  transition: opacity .2s;
}
.ega-btn-home { background: #4f46e5; color: #fff !important; }
.ega-btn-secondary { background: #f3f4f6; color: #374151 !important; border: 1px solid #e5e7eb; }
.ega-btn-home:hover,
.ega-btn-secondary:hover { opacity: .85; }

/* ══════════════════════════════════════════════════
   RESPONSIVE MOBILE — Pages Paiement & Confirmation
   ══════════════════════════════════════════════════ */

@media (max-width: 767px) {

  /* Wrap général */
  .ega-payment-wrap,
  .ega-result-wrap {
    margin: 16px auto !important;
    padding: 0 14px 40px !important;
  }

  /* Barre de progression */
  .ega-steps {
    margin-bottom: 24px !important;
    gap: 0 !important;
  }

  .ega-step {
    font-size: 10px !important;
    gap: 4px !important;
  }

  .ega-step-dot {
    width: 26px !important;
    height: 26px !important;
    font-size: 11px !important;
  }

  .ega-step-line {
    width: 40px !important;
  }

  /* Grille paiement → une colonne */
  .ega-payment-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  /* Résumé */
  .ega-summary {
    padding: 18px 16px !important;
    border-radius: 10px !important;
  }

  .ega-summary-title {
    font-size: 14px !important;
    margin-bottom: 14px !important;
  }

  .ega-summary-row {
    font-size: 12px !important;
    padding: 8px 0 !important;
  }

  /* Formulaire paiement */
  .ega-payment-form-wrap {
    padding: 18px 16px !important;
    border-radius: 10px !important;
  }

  .ega-field-row {
    flex-direction: column !important;
    gap: 0 !important;
  }

  .ega-field input {
    font-size: 16px !important; /* évite zoom iOS */
    padding: 12px 14px !important;
    min-height: 48px !important;
  }

  .ega-pay-btn {
    padding: 16px !important;
    font-size: 16px !important;
    min-height: 54px !important;
    border-radius: 12px !important;
  }

  /* Page confirmation */
  .ega-confirm-page {
    padding: 12px 14px 40px !important;
  }

  .ega-success-hero {
    padding: 28px 14px 24px !important;
  }

  .ega-check-wrap {
    width: 80px !important;
    height: 80px !important;
    margin-bottom: 20px !important;
  }

  .ega-check-circle {
    width: 80px !important;
    height: 80px !important;
  }

  .ega-check-circle svg {
    width: 42px !important;
    height: 42px !important;
  }

  .ega-success-title {
    font-size: 22px !important;
    margin-bottom: 8px !important;
  }

  .ega-success-subtitle {
    font-size: 14px !important;
  }

  .ega-confirm-card {
    border-radius: 14px !important;
    margin-bottom: 16px !important;
  }

  .ega-ref-block {
    padding: 20px 16px !important;
  }

  .ega-ref-code {
    font-size: 16px !important;
    padding: 6px 14px !important;
    letter-spacing: .05em !important;
  }

  .ega-confirm-row {
    padding: 12px 16px !important;
    gap: 10px !important;
  }

  .ega-confirm-value {
    font-size: 13px !important;
  }

  .ega-steps-section {
    padding: 14px 16px 20px !important;
  }

  .ega-confirm-actions {
    flex-direction: column !important;
    gap: 10px !important;
  }

  .ega-btn-confirm-home,
  .ega-btn-confirm-contact {
    width: 100% !important;
    justify-content: center !important;
    padding: 14px 20px !important;
    font-size: 14px !important;
  }

  /* Page échec */
  .ega-result-wrap.ega-failed {
    margin: 16px auto !important;
    padding: 0 14px 40px !important;
  }

  .ega-result-wrap.ega-failed .ega-result-icon {
    font-size: 48px !important;
  }

  .ega-result-wrap.ega-failed h2 {
    font-size: 22px !important;
  }

  .ega-result-subtitle {
    font-size: 14px !important;
  }

  .ega-next-steps {
    padding: 16px !important;
  }

  .ega-btn-home,
  .ega-btn-secondary {
    display: block !important;
    text-align: center !important;
    padding: 14px 20px !important;
    margin: 6px 0 !important;
    width: 100% !important;
  }
}

@media (max-width: 360px) {
  .ega-step-line { width: 24px !important; }
  .ega-step { font-size: 9px !important; }
  .ega-success-title { font-size: 18px !important; }
}
