/* Popup "Catalogue Gratuit" — remplace le widget Elfsight c8a4c7b6.
   Valeurs reprises telles quelles de la configuration Elfsight d'origine. */

.atlas-popup-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(17, 17, 17, .7);
  opacity: 0;
  visibility: hidden;
  /* pointer-events : en fermeture, la transition de visibility ne bascule
     qu'a la FIN des 300ms. Pendant ce fondu, ce fixed inset:0 z-index:10000
     encore « visible » avalait le premier clic apres fermeture -- constate en
     test reel par le terminal ERP (le clic sur « Envoyer » qui suivait la
     fermeture etait muet, le second passait). Hors is-open, le voile ne
     recoit plus aucun evenement, fondu compris. */
  pointer-events: none;
  transition: opacity .3s ease, visibility .3s ease;
}

.atlas-popup-backdrop.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Verrou de l'arriere-plan pendant le dialogue.
   La disparition de la barre de defilement decalerait la page vers la droite :
   --atlas-sbw, mesure par le script a l'ouverture, rend cette largeur en
   remplissage. Elle vaut 0 la ou la barre est en surimpression (mobile, macOS).
   Le remplissage vise aussi la barre de navigation, seul element fixe du site :
   collee a droite, elle sauterait sans lui. */
html.atlas-popup-lock {
  overflow: hidden;
}

html.atlas-popup-lock body,
html.atlas-popup-lock .f-navigation {
  padding-right: var(--atlas-sbw, 0px);
}

.atlas-popup {
  position: relative;
  display: flex;
  width: 100%;
  max-width: 437px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 33px;
  border-radius: 8px;
  background: #fffdea;
  color: rgb(17, 17, 17);
  text-align: center;
  transform: translateY(24px);
  transition: transform .3s ease;
}

.atlas-popup-backdrop.is-open .atlas-popup {
  transform: none;
}

.atlas-popup-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: rgba(17, 17, 17, .5);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.atlas-popup-close:hover {
  color: rgb(17, 17, 17);
}

.atlas-popup-image {
  width: 100%;
  height: 300px;
  border-radius: 0;
  object-fit: cover;
}

.atlas-popup-heading {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
}

.atlas-popup-text {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
}

.atlas-popup-text strong {
  font-weight: 700;
}

.atlas-popup-button {
  display: block;
  width: 100%;
  padding: 9px 20px;
  border-radius: 0;
  background: var(--carlo-blue, #20a5a2);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

.atlas-popup-button:hover {
  color: #fff;
  filter: brightness(1.12);
}

/* Bouton de reouverture, colonne droite, decalage 20/11 comme chez Elfsight */
.atlas-popup-reopen {
  position: fixed;
  right: 11px;
  bottom: 20px;
  z-index: 9990;
  padding: 10px 18px;
  border: 0;
  border-radius: 0;
  background: var(--carlo-blue, #20a5a2);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.atlas-popup-reopen[hidden] {
  display: none;
}

@media (max-width: 767px) {
  .atlas-popup {
    padding: 24px;
    gap: 40px;
  }

  .atlas-popup-heading {
    font-size: 20px;
  }

  .atlas-popup-button {
    font-size: 13px;
  }
}
