/* ────────────────────────────────────────────────────────────────────────────
   landing-pricing.css — Pop-up Tarifs ZIC (déclenchée par le footer TARIFS
   du profil public). 3 cartes (Free / Créateur / Pro).
   Theme **clair** aligné sur `landing-multipost-overlay.css` :
     - backdrop sombre (slate 0.55 + blur)
     - carte blanche, shadow violet doux
     - cartes plan grises claires, bord violet pour featured
     - gradient brand (violet → magenta → rose) réservé au titre, ribbon,
       chiffre du prix et CTA principal.
   Préfixe DOM : `.zp-*` (zic pricing).
   ──────────────────────────────────────────────────────────────────────────── */

.zp-overlay {
  /* Couleurs brand (réutilisées comme accents seulement). */
  --zp-purple: #8b5cf6;
  --zp-purple-dark: #7c3aed;
  --zp-pink: #d946ef;
  --zp-rose: #ec4899;
  --zp-brand-grad: linear-gradient(135deg, #8b5cf6 0%, #d946ef 50%, #ec4899 100%);

  /* Surface claire — alignée sur MultiPost. */
  --zp-bg-card: #ffffff;
  --zp-bg-plan: #f8fafc;
  --zp-bg-plan-featured: linear-gradient(160deg, #faf5ff 0%, #fdf2f8 100%);
  --zp-border: #e5e7eb;
  --zp-border-strong: #d1d5db;
  --zp-border-featured: #c4b5fd;
  --zp-border-current: #6ee7b7;

  --zp-text: #1f2937;
  --zp-text-soft: #374151;
  --zp-text-mute: #6b7280;
  --zp-text-dim: #9ca3af;
  --zp-text-on-brand: #ffffff;

  --zp-green: #047857;
  --zp-green-bg: #ecfdf5;
  --zp-red: #b91c1c;
  --zp-red-bg: #fef2f2;
  --zp-info: #4338ca;
  --zp-info-bg: #eef2ff;

  --zp-shadow: 0 30px 80px rgba(15, 23, 42, 0.32),
               0 12px 32px rgba(139, 92, 246, 0.12);
}

/* ─── Overlay & backdrop ─────────────────────────────────────────────────── */
.zp-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: "Space Grotesk", "DM Sans", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

.zp-overlay[hidden] {
  display: none !important;
}

.zp-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.zp-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* ─── Carte container (blanche) ──────────────────────────────────────────── */
.zp-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1080px;
  max-height: 92vh;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 36px 36px 24px;
  border-radius: 22px;
  background: var(--zp-bg-card);
  border: 1px solid var(--zp-border);
  box-shadow: var(--zp-shadow);
  color: var(--zp-text);
  transform: translateY(12px) scale(0.985);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  scrollbar-width: thin;
  scrollbar-color: #c4b5fd transparent;
}
.zp-overlay.is-open .zp-card {
  transform: translateY(0) scale(1);
}
.zp-card::-webkit-scrollbar {
  width: 6px;
}
.zp-card::-webkit-scrollbar-thumb {
  background: #c4b5fd;
  border-radius: 3px;
}
.zp-card:focus {
  outline: none;
}

/* ─── Close ──────────────────────────────────────────────────────────────── */
.zp-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--zp-border);
  border-radius: 50%;
  background: #ffffff;
  color: var(--zp-text);
  cursor: pointer;
  transition: background 0.16s, transform 0.16s;
  z-index: 2;
}
.zp-close:hover,
.zp-close:focus-visible {
  background: #f3f4f6;
  transform: scale(1.05);
  outline: none;
}
.zp-close svg {
  width: 18px;
  height: 18px;
}

/* ─── Header ─────────────────────────────────────────────────────────────── */
.zp-header {
  text-align: center;
  padding-bottom: 18px;
}
.zp-logo {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f5f3ff 0%, #fdf2f8 100%);
  border: 1px solid #e9d5ff;
  box-shadow: 0 8px 20px -8px rgba(139, 92, 246, 0.45);
}
.zp-title {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
  background: var(--zp-brand-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.zp-tagline {
  margin: 8px auto 0;
  max-width: 560px;
  font-family: "DM Sans", sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.55;
  color: var(--zp-text-mute);
}

/* ─── Banners (success / cancel / info) ──────────────────────────────────── */
.zp-banner[hidden] {
  display: none !important;
}
.zp-current-badge[hidden],
.zp-cta-spinner[hidden] {
  display: none !important;
}

.zp-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  margin: 0 0 16px;
  border: 1px solid transparent;
  font-family: "DM Sans", sans-serif;
}
.zp-banner .zp-banner-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}
.zp-banner .zp-banner-text strong {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: 14px;
}
.zp-banner .zp-banner-text span {
  font-size: 13px;
  color: var(--zp-text-soft);
}
.zp-banner--success {
  background: var(--zp-green-bg);
  border-color: #a7f3d0;
  color: var(--zp-green);
}
.zp-banner--cancel {
  background: var(--zp-red-bg);
  border-color: #fecaca;
  color: var(--zp-red);
}
.zp-banner--info {
  background: var(--zp-info-bg);
  border-color: #c7d2fe;
  color: var(--zp-info);
}

/* ─── Grille 3 cartes ────────────────────────────────────────────────────── */
.zp-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

/* ─── Carte plan ─────────────────────────────────────────────────────────── */
.zp-plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 24px 20px 22px;
  border-radius: 18px;
  background: var(--zp-bg-plan);
  border: 1px solid var(--zp-border);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}
.zp-plan-card:hover {
  transform: translateY(-2px);
  border-color: var(--zp-border-strong);
  box-shadow: 0 8px 20px -10px rgba(15, 23, 42, 0.18);
}
.zp-plan-card[data-zp-featured="true"] {
  background: var(--zp-bg-plan-featured);
  border-color: var(--zp-border-featured);
  box-shadow: 0 18px 40px -14px rgba(139, 92, 246, 0.35),
              inset 0 0 0 1px rgba(196, 181, 253, 0.4);
}
.zp-plan-card[data-zp-current="true"] {
  border-color: var(--zp-border-current);
}

/* Ribbon "Le plus populaire" */
.zp-popular-ribbon {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  font-family: "Space Grotesk", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--zp-brand-grad);
  color: var(--zp-text-on-brand);
  white-space: nowrap;
  box-shadow: 0 6px 16px -6px rgba(139, 92, 246, 0.55);
}

/* Badge "Plan actuel" */
.zp-current-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 8px;
  background: var(--zp-green-bg);
  border: 1px solid #a7f3d0;
  color: var(--zp-green);
}

.zp-plan-head {
  text-align: left;
  margin-bottom: 16px;
}
.zp-plan-tag {
  display: inline-block;
  font-family: "DM Sans", sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--zp-text-mute);
  margin-bottom: 6px;
}
.zp-plan-name {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 800;
  color: var(--zp-text);
  letter-spacing: -0.01em;
}
.zp-plan-price {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 10px;
}
.zp-price-line,
.zp-price-free {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: var(--zp-brand-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
}
.zp-price-suffix {
  font-family: "DM Sans", sans-serif;
  font-size: 12px;
  color: var(--zp-text-mute);
}
.zp-plan-pitch {
  margin: 0;
  font-family: "DM Sans", sans-serif;
  font-size: 13px;
  line-height: 1.5;
  color: var(--zp-text-soft);
  min-height: 38px;
}

/* Features */
.zp-features {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.zp-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-family: "DM Sans", sans-serif;
  font-size: 13px;
  line-height: 1.45;
  color: var(--zp-text-soft);
}
.zp-feature-check {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin-top: 1px;
  background: #f5f3ff;
  color: var(--zp-purple-dark);
}
.zp-plan-card[data-zp-featured="true"] .zp-feature-check {
  background: #fce7f3;
  color: #be185d;
}

/* CTA */
.zp-cta {
  appearance: none;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  font-family: "Space Grotesk", sans-serif;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  padding: 13px 18px;
  border-radius: 12px;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease,
              color 0.16s ease, border-color 0.16s ease, opacity 0.16s ease;
}
.zp-cta:focus-visible {
  outline: 2px solid var(--zp-purple);
  outline-offset: 2px;
}
.zp-cta--primary {
  background: var(--zp-brand-grad);
  color: var(--zp-text-on-brand);
  box-shadow: 0 10px 20px -8px rgba(139, 92, 246, 0.45);
}
.zp-cta--primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 14px 26px -8px rgba(139, 92, 246, 0.6);
}
.zp-cta--secondary {
  background: #f5f3ff;
  color: var(--zp-purple-dark);
  border: 1px solid #ddd6fe;
}
.zp-cta--secondary:hover:not(:disabled) {
  background: #ede9fe;
  border-color: #c4b5fd;
}
.zp-cta--ghost {
  background: #ffffff;
  color: var(--zp-text-soft);
  border: 1px solid var(--zp-border);
}
.zp-cta--ghost:hover:not(:disabled) {
  background: #f9fafb;
  border-color: var(--zp-border-strong);
}
.zp-cta:disabled,
.zp-cta[aria-disabled="true"] {
  opacity: 0.55;
  cursor: default;
  transform: none !important;
  box-shadow: none !important;
}

.zp-cta-spinner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.zp-cta[data-zp-busy="1"] .zp-cta-spinner {
  animation: zp-spin 0.85s linear infinite;
}
@keyframes zp-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ─── Footer (Skip + détails + sécurité Stripe) ──────────────────────────── */
.zp-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--zp-border);
}
.zp-stripe-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: "DM Sans", sans-serif;
  font-size: 12px;
  color: var(--zp-text-mute);
}
.zp-see-details {
  font-family: "DM Sans", sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--zp-purple-dark);
  text-decoration: none;
  transition: color 0.16s;
}
.zp-see-details:hover {
  color: var(--zp-purple);
  text-decoration: underline;
}
.zp-skip {
  appearance: none;
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: "DM Sans", sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--zp-text-mute);
  padding: 6px 12px;
  border-radius: 8px;
  transition: color 0.16s, background 0.16s;
}
.zp-skip:hover,
.zp-skip:focus-visible {
  color: var(--zp-text);
  background: #f3f4f6;
  outline: none;
}

/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 999px) {
  .zp-card {
    max-width: 720px;
    padding: 30px 24px 22px;
  }
  .zp-grid {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }
  /* Carte featured (id="1") prend toute la largeur dans le layout 2 colonnes */
  .zp-plan-card[data-zp-featured="true"] {
    grid-column: 1 / -1;
  }
  .zp-title {
    font-size: 24px;
  }
}

@media (max-width: 719px) {
  .zp-overlay {
    padding: 12px 12px;
  }
  .zp-card {
    padding: 24px 18px 20px;
    border-radius: 18px;
    max-height: 94vh;
  }
  .zp-close {
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
  }
  .zp-header {
    padding-bottom: 14px;
  }
  .zp-title {
    font-size: 22px;
  }
  .zp-tagline {
    font-size: 13px;
  }
  .zp-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  /* Sur mobile, on remet la carte featured en premier */
  .zp-plan-card[data-zp-featured="true"] {
    order: -1;
    grid-column: auto;
  }
  .zp-plan-card {
    padding: 22px 18px 20px;
  }
  .zp-price-line,
  .zp-price-free {
    font-size: 26px;
  }
  .zp-footer {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
}

@media (max-width: 399px) {
  .zp-card {
    padding: 22px 14px 18px;
  }
  .zp-title {
    font-size: 20px;
  }
  .zp-plan-name {
    font-size: 20px;
  }
  .zp-cta {
    padding: 12px 14px;
    font-size: 14px;
  }
}

@media (max-height: 720px) {
  .zp-overlay {
    padding-top: 10px;
    padding-bottom: 10px;
  }
  .zp-card {
    padding-top: 22px;
    padding-bottom: 16px;
  }
  .zp-header {
    padding-bottom: 10px;
  }
  .zp-plan-pitch {
    min-height: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .zp-overlay,
  .zp-card,
  .zp-plan-card,
  .zp-cta {
    transition: none !important;
  }
}
