/* POPUP LE SELVE */

#site-popup {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.4s ease,
    visibility 0.4s ease;
  box-sizing: border-box;
}

#site-popup.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

#site-popup .popup-content {
  position: relative;
  width: fit-content;
  max-width: min(900px, 100%);
  max-height: 90vh;
  max-height: 90dvh;
  transform: translateY(20px) scale(0.97);
  opacity: 0;
  transition:
    transform 0.45s ease,
    opacity 0.45s ease;
}

#site-popup.active .popup-content {
  transform: translateY(0) scale(1);
  opacity: 1;
}

#site-popup .popup-content img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 90vh;
  max-height: 90dvh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 65px rgba(0, 0, 0, 0.45);
}

#site-popup .popup-close {
  position: absolute;
  top: -16px;
  right: -16px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #ffffff;
  color: #222222;
  font-family: Arial, sans-serif;
  font-size: 26px;
  font-weight: normal;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.3);
  z-index: 2;
}

#site-popup .popup-close:hover {
  background: #eeeeee;
}

@media (max-width: 767px) {
  #site-popup {
    padding: 18px;
  }

  #site-popup .popup-content {
    max-width: 100%;
  }

  #site-popup .popup-close {
    top: -14px;
    right: -10px;
    width: 34px;
    height: 34px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #site-popup,
  #site-popup .popup-content {
    transition: none;
  }
}
