/* Modale exit-intent — V-Zone Cloud (épurée, responsive) */
:root {
  --vz-exit-teal: #0d8694;
  --vz-exit-teal-light: #14b8a6;
  --vz-exit-text: #1e293b;
  --vz-exit-muted: #64748b;
  --vz-exit-border: rgba(15, 23, 42, 0.08);
  --vz-exit-radius: 20px;
  --vz-exit-shadow: 0 20px 50px rgba(15, 23, 42, 0.18);
}

body.vz-exit-modal-open {
  overflow: hidden;
}

.vz-exit-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right))
    max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.vz-exit-modal.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.vz-exit-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(6px);
}

.vz-exit-modal__dialog {
  position: relative;
  width: min(720px, 100%);
  max-height: min(90vh, 520px);
  background: #fff;
  border-radius: var(--vz-exit-radius);
  box-shadow: var(--vz-exit-shadow);
  overflow: hidden;
  transform: translateY(16px) scale(0.98);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.vz-exit-modal.is-visible .vz-exit-modal__dialog {
  transform: translateY(0) scale(1);
}

.vz-exit-modal__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 5;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: #475569;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  transition: color 0.2s, background 0.2s, transform 0.2s;
}

.vz-exit-modal__close:hover {
  color: var(--vz-exit-teal);
  transform: scale(1.06);
}

.vz-exit-modal__layout {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  min-height: 0;
  max-height: min(90vh, 520px);
}

.vz-exit-modal__visual {
  position: relative;
  min-height: 200px;
  background: #0f172a;
  overflow: hidden;
}

.vz-exit-modal__visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(13, 134, 148, 0.25) 0%,
    rgba(15, 23, 42, 0.05) 55%,
    rgba(255, 255, 255, 0.15) 100%
  );
  pointer-events: none;
}

.vz-exit-modal__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.vz-exit-modal__content {
  padding: clamp(1.35rem, 3vw, 2rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.vz-exit-modal__title {
  margin: 0 0 0.65rem;
  font-size: clamp(1.35rem, 2.8vw, 1.75rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--vz-exit-text);
  letter-spacing: -0.02em;
}

.vz-exit-modal__title-accent {
  color: var(--vz-exit-teal);
}

.vz-exit-modal__lead {
  margin: 0 0 1.1rem;
  font-size: clamp(0.875rem, 2vw, 0.9375rem);
  line-height: 1.55;
  color: var(--vz-exit-muted);
}

.vz-exit-modal__perks {
  list-style: none;
  margin: 0 0 1.35rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.65rem;
}

.vz-exit-modal__perks li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #334155;
  background: #f1f5f9;
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  white-space: nowrap;
}

.vz-exit-modal__perks i {
  color: var(--vz-exit-teal);
  font-size: 0.65rem;
}

.vz-exit-modal__actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.65rem;
}

.vz-exit-modal__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.25rem;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--vz-exit-teal) 0%, var(--vz-exit-teal-light) 100%);
  color: #fff !important;
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(13, 134, 148, 0.28);
  transition: transform 0.2s, box-shadow 0.2s;
}

.vz-exit-modal__cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(13, 134, 148, 0.35);
  color: #fff !important;
}

.vz-exit-modal__dismiss {
  padding: 0.35rem;
  border: none;
  background: none;
  color: #94a3b8;
  font-size: 0.8125rem;
  cursor: pointer;
  text-align: center;
  transition: color 0.2s;
}

.vz-exit-modal__dismiss:hover {
  color: var(--vz-exit-teal);
}

/* Tablette */
@media (max-width: 640px) {
  .vz-exit-modal {
    align-items: flex-end;
    padding: 0;
  }

  .vz-exit-modal__dialog {
    width: 100%;
    max-height: 92vh;
    border-radius: var(--vz-exit-radius) var(--vz-exit-radius) 0 0;
  }

  .vz-exit-modal__layout {
    grid-template-columns: 1fr;
    max-height: 92vh;
  }

  .vz-exit-modal__visual {
    min-height: 140px;
    max-height: 160px;
  }

  .vz-exit-modal__content {
    padding: 1.25rem 1.15rem 1.5rem;
  }

  .vz-exit-modal__perks {
    gap: 0.4rem;
  }

  .vz-exit-modal__perks li {
    font-size: 0.78rem;
    padding: 0.3rem 0.65rem;
  }

  .vz-exit-modal__close {
    top: 0.65rem;
    right: 0.65rem;
    background: rgba(255, 255, 255, 0.9);
  }
}

/* Très petit écran */
@media (max-width: 380px) {
  .vz-exit-modal__title {
    font-size: 1.2rem;
  }

  .vz-exit-modal__perks li {
    white-space: normal;
    border-radius: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .vz-exit-modal,
  .vz-exit-modal__dialog,
  .vz-exit-modal__cta,
  .vz-exit-modal__close {
    transition: none;
  }
}
