/* ============================================================================
   ZIC Landing — écran « Finalise ton achat » sans compte (lot 4,
   static/js/zic-checkout.js).
   - z-index 9600 : au-dessus du RDV / des billets (3000), du panier et de la
     popup de paiement (9500), sous l'auth-modal (9999) ;
   - surfaces / textes via les tokens --pp-* du thème du profil (clair ou
     sombre), avec la palette claire en repli (Marketplace) ;
   - verrou de défilement par CLASSE body.zco-lock (jamais de style inline) ;
   - plein écran sous 640 px, carte centrée au-dessus.
   ============================================================================ */

body.zco-lock {
  overflow: hidden;
}

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

.zco-sheet {
  width: 100%;
  max-width: 480px;
  max-height: 92vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--pp-card, #fff);
  color: var(--pp-text, #1a0a3d);
  border-radius: 16px;
  box-shadow: 0 24px 60px var(--pp-shadow, rgba(31, 19, 64, 0.3));
  font-family: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

.zco-sheet:focus { outline: none; }

.zco-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: var(--pp-card, #fff);
  border-bottom: 1px solid var(--pp-border, #e2d9fa);
}

.zco-title {
  flex: 1;
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.3;
  color: var(--pp-text, #1a0a3d);
}

.zco-icon {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--pp-border, #e2d9fa);
  background: transparent;
  color: var(--pp-text, #1a0a3d);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.zco-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 16px 18px 22px;
}

.zco-sec { display: flex; flex-direction: column; gap: 12px; }
.zco-sec[hidden] { display: none; }

.zco-h {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--pp-text, #1a0a3d);
}

.zco-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.zco-phone { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 10px; align-items: start; }

.zco-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }

.zco-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--pp-text, #1a0a3d);
}

.zco-input {
  width: 100%;
  min-height: 46px;
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--pp-border-strong, #c9bdf0);
  background: var(--pp-input, #fff);
  color: var(--pp-text, #1a0a3d);
  font: inherit;
  font-size: 16px; /* pas de zoom iOS */
}

.zco-input:focus-visible {
  outline: 3px solid rgba(124, 58, 237, 0.35);
  outline-offset: 1px;
  border-color: #7c3aed;
}

.zco-input[aria-invalid="true"] { border-color: #b42318; }

.zco-hint {
  font-size: 12.5px;
  color: var(--pp-text-muted, #5b4a8a);
}

.zco-ferr {
  font-size: 13px;
  color: #b42318;
}

.zco-ferr:empty { display: none; }

.zco-lines { list-style: none; margin: 0; padding: 0; }

.zco-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  font-size: 14.5px;
}

.zco-total {
  border-top: 1px solid var(--pp-border, #e2d9fa);
  padding-top: 10px;
  font-weight: 800;
}

.zco-rails { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.zco-rails[hidden] { display: none; }

.zco-rail {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--pp-border-strong, #c9bdf0);
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
}

.zco-rail:has(input:checked) { border-color: #7c3aed; box-shadow: inset 0 0 0 1px #7c3aed; }

.zco-momo { display: flex; flex-direction: column; gap: 8px; }
.zco-momo[hidden] { display: none; }

.zco-quote {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--pp-text, #1a0a3d);
}

.zco-quote:empty { display: none; }

.zco-error {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fef3f2;
  color: #912018;
  font-size: 14px;
}

.zco-error[hidden] { display: none; }

.zco-pay {
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 12px;
  background: #7c3aed;
  color: #fff;
  font: inherit;
  font-size: 16.5px;
  font-weight: 800;
  cursor: pointer;
}

.zco-pay:focus-visible { outline: 3px solid rgba(124, 58, 237, 0.45); outline-offset: 2px; }
.zco-pay[aria-disabled="true"] { opacity: 0.6; cursor: not-allowed; }

.zco-secure {
  margin: -8px 0 0;
  text-align: center;
  font-size: 12.5px;
  color: var(--pp-text-muted, #5b4a8a);
}

.zco-legal {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--pp-text-muted, #5b4a8a);
}

.zco-legal a { color: inherit; text-decoration: underline; }

@media (max-width: 640px) {
  .zco-overlay { padding: 0; align-items: stretch; }
  .zco-sheet { max-width: none; max-height: none; height: 100%; border-radius: 0; }
}

@media (max-width: 380px) {
  .zco-row, .zco-phone { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: no-preference) {
  .zco-overlay { animation: zcoFade 0.16s ease-out; }
  @keyframes zcoFade { from { opacity: 0; } to { opacity: 1; } }
}
