/* ============================================================================
   ZIC Landing — Popup de choix du moyen de paiement (Carte / Mobile Money)
   Portage de zic_admin/static/css/admin-pay-modal.css. Divergences landing :
   - z-index 9500 : AU-DESSUS de la popup Tarifs du profil public (.zp-overlay
     9000) qui peut être l'hôte, SOUS l'auth-modal (9999) ;
   - surfaces/bordures/textes via les tokens --pp-* (public-profile-theme) avec
     fallback dur = palette admin → rendu identique sur la home, dark mode
     automatique sur un profil public ;
   - scroll lock par CLASSE body.zap-lock (jamais body.style.overflow inline :
     la popup Tarifs hôte pose zh-scroll-locked, un reset inline la casserait).
   ============================================================================ */

body.zap-lock {
  overflow: hidden;
}

.zap-overlay {
  position: fixed;
  inset: 0;
  background: var(--pp-scrim, rgba(31, 19, 64, 0.5));
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  z-index: 9500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: zapFadeIn 0.18s ease-out;
}

.zap-modal {
  background: var(--pp-card, #fff);
  border-radius: 16px;
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 60px var(--pp-shadow, rgba(31, 19, 64, 0.3));
  animation: zapScaleIn 0.2s ease-out;
}

@keyframes zapFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes zapScaleIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

/* --- En-tête --- */

.zap-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--pp-border, #e2d9fa);
}

.zap-head-main { min-width: 0; }

.zap-title {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 800;
  font-size: 16px;
  color: var(--pp-text, #1a0a3d);
}

.zap-sub {
  margin-top: 2px;
  font-family: "DM Sans", sans-serif;
  font-size: 11.5px;
  color: var(--pp-text-muted, #6b54a8);
}

.zap-step-ind {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  color: var(--pp-text-muted, #6b54a8);
  white-space: nowrap;
  padding-top: 2px;
}

.zap-close {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--pp-border, #e2d9fa);
  background: transparent;
  color: var(--pp-text-muted, #6b54a8);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.zap-close svg { width: 16px; height: 16px; }

.zap-close:hover { background: #f3e8ff; color: #6d28d9; }

/* --- Corps --- */

.zap-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
}

.zap-step[hidden] { display: none; }

.zap-step {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* --- Étape 1 : choix de la méthode --- */

.zap-choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.zap-choice {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
  padding: 14px;
  border-radius: 12px;
  background: var(--pp-bg, #fafafb);
  border: 1px solid var(--pp-border, #e2d9fa);
  cursor: pointer;
  font-family: "DM Sans", sans-serif;
  transition: border-color 0.12s ease, background 0.12s ease;
}

.zap-choice:hover { border-color: #cbb8f5; }

.zap-choice:focus-visible {
  outline: 2px solid #6d28d9;
  outline-offset: 2px;
}

.zap-choice-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #f3e8ff;
  color: #6d28d9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.zap-choice-icon svg { width: 20px; height: 20px; }

.zap-choice-name {
  font-weight: 800;
  font-size: 14px;
  color: var(--pp-text, #1a0a3d);
}

.zap-choice-desc {
  font-size: 11.5px;
  color: var(--pp-text-muted, #6b54a8);
  line-height: 1.4;
}

.zap-choice-brands {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--pp-text-muted, #6b54a8);
  letter-spacing: 0.3px;
}

.zap-secure-note,
.zap-redirect-note {
  margin: 0;
  font-size: 11px;
  color: var(--pp-text-muted, #6b54a8);
  text-align: center;
}

/* --- Étape 2 : pays + devis --- */

.zap-field-label {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--pp-text-muted, #6b54a8);
}

.zap-country-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.zap-country {
  padding: 10px 6px;
  border-radius: 10px;
  background: var(--pp-bg, #fafafb);
  border: 1px solid var(--pp-border, #e2d9fa);
  text-align: center;
  cursor: pointer;
  font-family: "DM Sans", sans-serif;
  transition: border-color 0.12s ease, background 0.12s ease;
}

.zap-country:hover { border-color: #cbb8f5; }

.zap-country:focus-visible {
  outline: 2px solid #6d28d9;
  outline-offset: 2px;
}

.zap-country.is-selected {
  border: 2px solid #6d28d9;
  padding: 9px 5px; /* compense la bordure 2px */
  background: rgba(109, 40, 217, 0.08);
}

.zap-country-flag {
  display: block;
  font-size: 24px;
  line-height: 1;
}

.zap-country-name {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--pp-text, #1a0a3d);
}

.zap-quote {
  min-height: 104px;
  border-radius: 12px;
  border: 1px dashed var(--pp-border, #e2d9fa);
  background: var(--pp-bg, #faf8fe);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 16px;
  text-align: center;
}

.zap-quote[data-state="ready"] { border-style: solid; }

.zap-quote-amount {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 800;
  font-size: 28px;
  letter-spacing: -0.5px;
  color: var(--pp-text, #1a0a3d);
}

.zap-quote-eur {
  font-size: 12.5px;
  color: var(--pp-text-muted, #6b54a8);
}

.zap-quote-notes {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.zap-quote-note {
  padding: 3px 9px;
  border-radius: 999px;
  background: #f3e8ff;
  color: #6d28d9;
  font-size: 10.5px;
  font-weight: 700;
}

.zap-quote-hint {
  margin: 0;
  font-size: 12.5px;
  color: var(--pp-text-muted, #6b54a8);
}

.zap-quote-error {
  padding: 10px 12px;
  border-radius: 8px;
  background: #fee2e2;
  color: #991b1b;
  font-size: 12px;
}

.zap-spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(109, 40, 217, 0.25);
  border-top-color: #6d28d9;
  animation: zapSpin 0.7s linear infinite;
}

.zap-btn--primary .zap-spinner {
  border-color: rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  display: inline-block;
  vertical-align: -3px;
  margin-right: 8px;
}

@keyframes zapSpin {
  to { transform: rotate(360deg); }
}

/* --- Pied --- */

.zap-foot {
  display: flex;
  gap: 10px;
  padding: 14px 22px;
  border-top: 1px solid var(--pp-border, #e2d9fa);
  background: var(--pp-bg, #fafafb);
}

.zap-foot[hidden] { display: none; }

.zap-btn {
  padding: 11px 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-family: "DM Sans", sans-serif;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}

.zap-btn--ghost {
  background: transparent;
  color: var(--pp-text-muted, #6b54a8);
  border-color: var(--pp-border, #e2d9fa);
}

.zap-btn--ghost:hover { background: #f3e8ff; color: #6d28d9; }

.zap-btn--primary {
  flex: 1;
  background: #6d28d9;
  color: #fff;
}

.zap-btn--primary:hover:not([disabled]) { background: #5b21b6; }

.zap-btn--primary[disabled] {
  background: #a78bda;
  cursor: not-allowed;
}

/* --- Responsive (miroir des overlays modules landing) --- */

@media (max-width: 700px) {
  .zap-overlay { padding: 0; align-items: stretch; }
  .zap-modal {
    max-width: none;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    border-radius: 0;
  }
  .zap-choice-grid { grid-template-columns: 1fr; }
  .zap-country-grid { grid-template-columns: repeat(2, 1fr); }
  .zap-foot { position: sticky; bottom: 0; }
}

@media (min-width: 701px) and (max-width: 1099px) {
  .zap-modal { max-width: 560px; }
  .zap-country-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .zap-overlay,
  .zap-modal,
  .zap-spinner {
    animation: none;
  }
}
