/* ============================================
   Modern Popup — Styles frontend
   ============================================ */

.modern-popup-root {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.modern-popup-root.is-visible {
  opacity: 1;
  visibility: visible;
}

.modern-popup-root.is-closing {
  opacity: 0;
  visibility: hidden;
}

.modern-popup-overlay {
  position: absolute;
  inset: 0;
  background: #000;
  opacity: var(--mp-overlay-opacity, 0.6);
  cursor: pointer;
}

.modern-popup-box {
  position: relative;
  min-width: 280px;
  max-width: 640px;
  width: min(max-content, min(90vw, 640px));
  max-height: 90vh;
  overflow: auto;
  border-radius: 1.25rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  transform: scale(0.9) translateY(10px);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  background: #fff;
}

.modern-popup-root.is-visible .modern-popup-box {
  transform: scale(1) translateY(0);
}

.modern-popup-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  line-height: 1;
  color: inherit;
  background: transparent;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s, background 0.2s;
}

.modern-popup-close:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.08);
}

.modern-popup-inner {
  padding: 2rem 1.75rem;
  color: var(--mp-text, #1e293b);
}

.modern-popup-title {
  margin: 0 0 1rem;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--mp-text, #1e293b);
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.modern-popup-message {
  margin-bottom: 1.5rem;
  font-size: 1rem;
  line-height: 1.6;
  opacity: 0.9;
  color: var(--mp-text, #1e293b);
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.modern-popup-message p:last-child {
  margin-bottom: 0;
}

.modern-popup-image {
  margin-bottom: 1.25rem;
  text-align: center;
}

.modern-popup-image img {
  display: inline-block;
  max-width: 100%;
  max-height: 200px;
  width: auto;
  height: auto;
  border-radius: 0.75rem;
  object-fit: cover;
}

.modern-popup-message .modern-popup-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.modern-popup-message .modern-popup-table td,
.modern-popup-message .modern-popup-table th {
  border: 1px solid rgba(148, 163, 184, 0.6);
  padding: 0.5rem 0.75rem;
  font-size: 0.95rem;
}

.modern-popup-message .modern-popup-table th {
  font-weight: 600;
  background: rgba(148, 163, 184, 0.15);
}

.modern-popup-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  color: #fff;
  background: var(--mp-primary, #6366f1);
  border: none;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
}

.modern-popup-cta:hover {
  opacity: 0.95;
  transform: translateY(-1px);
  box-shadow: 0 10px 20px -10px var(--mp-primary, #6366f1);
}

/* ---- Design: Glass — doux, léger, ombre floue ---- */
.modern-popup-design-glass .modern-popup-box {
  background: #fff;
  border: none;
  border-radius: 1.5rem;
  box-shadow: 0 32px 64px -16px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.04);
}

.modern-popup-design-glass .modern-popup-close:hover {
  background: rgba(0, 0, 0, 0.06);
}

/* ---- Design: Minimal — cadre net, bordure colorée ---- */
.modern-popup-design-minimal .modern-popup-box {
  background: #fff;
  border-radius: 0.5rem;
  border: 3px solid var(--mp-text, #1e293b);
  box-shadow: 8px 8px 0 var(--mp-primary, #6366f1);
}

.modern-popup-design-minimal .modern-popup-cta {
  background: transparent;
  color: var(--mp-primary, #6366f1);
  border: 2px solid var(--mp-primary, #6366f1);
}

.modern-popup-design-minimal .modern-popup-cta:hover {
  background: var(--mp-primary, #6366f1);
  color: #fff;
}

/* ---- Design: Gradient — bandeau dégradé en haut, fond blanc ---- */
.modern-popup-design-gradient .modern-popup-box {
  background: #fff;
  border: none;
  border-radius: 1.25rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.modern-popup-design-gradient .modern-popup-box::before {
  content: '';
  display: block;
  height: 6px;
  background: linear-gradient(90deg, var(--mp-primary, #6366f1), #8b5cf6, #a855f7);
  margin: -2rem -1.75rem 1.5rem -1.75rem;
  padding: 0 1.75rem;
}

.modern-popup-design-gradient .modern-popup-inner {
  color: var(--mp-text, #1e293b);
}

.modern-popup-design-gradient .modern-popup-title,
.modern-popup-design-gradient .modern-popup-message {
  color: var(--mp-text, #1e293b);
}

.modern-popup-design-gradient .modern-popup-cta {
  background: linear-gradient(135deg, var(--mp-primary, #6366f1), #8b5cf6);
  color: #fff;
}

.modern-popup-design-gradient .modern-popup-cta:hover {
  opacity: 0.95;
  box-shadow: 0 10px 20px -10px var(--mp-primary, #6366f1);
}

.modern-popup-design-gradient .modern-popup-close:hover {
  background: rgba(0, 0, 0, 0.06);
}

/* ---- Design: Dark — fond sombre, texte clair ---- */
.modern-popup-design-dark .modern-popup-box {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modern-popup-design-dark .modern-popup-inner {
  color: #e2e8f0;
}

.modern-popup-design-dark .modern-popup-title {
  color: #f8fafc;
}

.modern-popup-design-dark .modern-popup-message {
  color: #cbd5e1;
  opacity: 0.95;
}

.modern-popup-design-dark .modern-popup-cta {
  background: var(--mp-primary, #6366f1);
  color: #fff;
}

.modern-popup-design-dark .modern-popup-cta:hover {
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
}

.modern-popup-design-dark .modern-popup-close {
  color: #94a3b8;
}

.modern-popup-design-dark .modern-popup-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* ---- Design: Neon — fond blanc, bordure et lueur colorées ---- */
.modern-popup-design-neon .modern-popup-box {
  background: #fff;
  border: 2px solid var(--mp-primary, #6366f1);
  border-radius: 1rem;
  box-shadow: 0 0 0 1px var(--mp-primary, #6366f1), 0 0 40px -8px var(--mp-primary, #6366f1), 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

.modern-popup-design-neon .modern-popup-inner {
  color: var(--mp-text, #1e293b);
}

.modern-popup-design-neon .modern-popup-title {
  color: var(--mp-text, #1e293b);
}

.modern-popup-design-neon .modern-popup-cta {
  background: transparent;
  color: var(--mp-primary, #6366f1);
  border: 2px solid var(--mp-primary, #6366f1);
  box-shadow: 0 0 16px -4px var(--mp-primary, #6366f1);
}

.modern-popup-design-neon .modern-popup-cta:hover {
  background: rgba(99, 102, 241, 0.08);
  box-shadow: 0 0 24px -4px var(--mp-primary, #6366f1);
}

.modern-popup-design-neon .modern-popup-close {
  color: var(--mp-primary, #6366f1);
}

.modern-popup-design-neon .modern-popup-close:hover {
  background: rgba(99, 102, 241, 0.15);
}
