/* popup.css
 * Styles minimalistes pour la popup : overlay, fenêtre centrée, responsive
 */

.site-popup-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  transition: opacity 240ms ease, visibility 240ms ease;
  opacity: 1;
}
.site-popup-hidden { opacity: 0; visibility: hidden; }

.site-popup {
  background: #fff;
  border-radius: 8px;
  max-width: 940px;
  width: calc(100% - 40px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.25);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: stretch;
  /* Limit height so the popup is not full-height */
  max-height: 80vh;
}

.site-popup-close {
  position: absolute;
  top: 8px;
  right: 10px;
  border: none;
  background: transparent;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.site-popup-content { display: flex; flex-wrap: wrap; width: 100%; background-color: #83b7e6;}
.site-popup-image { flex: 1 1 40%; min-width: 220px; display:flex; flex-direction:column; }
.site-popup-image img { width: 100%; height: auto; display: block; object-fit: contain; max-height: 55vh; margin-top: 20px; }
.site-popup-body { flex: 1 1 60%; padding: 24px; display:flex; flex-direction:column; justify-content:center; }
.site-popup-text { margin-bottom: 16px; color:#222; font-size:16px; }
.site-popup-cta { display:inline-block; padding:10px 16px; background:#2751af; color:#fff; text-decoration:none; border-radius:4px; font-size: large; font-weight: 900; }

/* actions container placed under the image */
.site-popup-image-actions { padding: 12px 16px 24px; text-align: center; }
.site-popup-image-actions .site-popup-cta { margin-top: 8px; }

.site-popup-content { overflow:auto; }

/* small screens */
@media (max-width: 720px) {
  .site-popup { width: calc(100% - 20px); }
  .site-popup-content { flex-direction: column; }
  .site-popup-image { order:0; }
  .site-popup-body { order:1; }
}

/* CSS vars pour la couleur de fond (overlay) - définissez-les dans votre style ou via :root */
:root {
  --popup-bg-color: #000000;
  --popup-bg-opacity: 0.7;
}
/* ================================
   Overlay
================================ */
.popup-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  background-color: rgba(0, 0, 0, 0.6); /* configuré via JS si besoin */
}

/* ================================
   Popup container
================================ */
.popup {
  position: relative;
  background-color: #ffffff;
  max-width: 500px;
  width: 90%;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  animation: popupFadeIn 0.3s ease-out;
}

/* ================================
   Content
================================ */
.popup__image img {
  display: block;
  width: 100%;
  height: auto;
}

.popup__content {
  padding: 20px;
  text-align: center;
}

.popup__content p {
  margin: 0 0 16px;
  line-height: 1.5;
}

.popup__content a {
  display: inline-block;
  color: #ffffff;
  background-color: #2751af;
  font-size: 30px;
  padding: 10px 18px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
}

/* ================================
   Close button
================================ */
.popup__close {
  position: absolute;
  top: 12px;
  right: 14px;
  font-size: 30px;
  background: none;
  border: none;
  cursor: pointer;
}

/* ================================
   Animations
================================ */
@keyframes popupFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
