.popup-redirection {
  opacity: 0;
  visibility: hidden;
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  background-color: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
  z-index: 1000000;
  padding: 32px;
  box-sizing: border-box;
}

.popup-redirection.active {
  opacity: 1;
  visibility: visible;
  display: flex;
}

.popup-redirection .popup-contenant {
  padding: 64px 48px 44px 48px;
  background-color: #0155cf;
  border-radius: 16px;
  width: 500px;
  max-width: 100%;
  box-sizing: border-box;
  position: relative;
}

.popup-redirection .popup-contenant .popup-entete {
  font-family: "Inter", sans-serif;
  font-size: 32px;
  font-weight: 400;
  line-height: 38.73px;
  color: #fffbf7;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(223, 230, 242, 0.2);
  margin-bottom: 32px;
}

.popup-redirection .popup-contenant .popup-corps {
  font-family: "Inter", sans-serif;
  font-size: 20px;
  font-weight: 400;
  line-height: 24.2px;
  margin-bottom: 64px;
  color: #fffbf7;
}

.popup-redirection .popup-contenant .popup-corps p {
  color: #fffbf7;
  margin-bottom: 16px;
}

.popup-redirection .popup-contenant .popup-corps p:last-child {
  margin-bottom: 0;
}

.popup-redirection .popup-contenant .popup-pied {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.popup-redirection .popup-contenant .popup-pied .popup-bouton {
  padding: 16px 40px;
  border-radius: 100px;
  font-family: "Inter", sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 21.78px;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.3s ease;
  border: 1px solid;
  box-sizing: border-box;
  text-align: center;
  min-width: 120px;
}

.popup-redirection .popup-contenant .popup-pied .popup-bouton:hover,
.popup-redirection .popup-contenant .popup-pied .popup-bouton:focus {
  opacity: 0.7;
  outline: none;
}

/* Bouton Annuler */
.popup-redirection .popup-contenant .popup-pied .popup-bouton#btn-annuler {
  color: #fffbf7;
  border-color: #fffbf7;
  background-color: transparent;
}

/* Bouton Continuer */
.popup-redirection .popup-contenant .popup-pied .popup-bouton#btn-continuer {
  color: #141414;
  border-color: #9ecf00;
  background-color: #9ecf00;
}

/* Styles pour les liens externes automatiquement détectés */
.lien-externe-auto {
  position: relative;
}

.lien-externe-auto::after {
  content: "↗";
  font-size: 0.8em;
  margin-left: 4px;
  opacity: 0.7;
}

/* Alternative : utiliser une icône SVG pour les liens externes */
.lien-externe-auto.with-icon::after {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-left: 4px;
  background-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHZpZXdCb3g9IjAgMCAxMiAxMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTkgM0gxMU0xMSAzVjVNMTEgM0w2IDhNOSA2VjlDOSA5LjI2NTIyIDguODk0NjQgOS41MTk1NyA4LjcwNzExIDkuNzA3MTFDOC41MTk1NyA5Ljg5NDY0IDguMjY1MjIgMTAgOCAxMEgzQzIuNzM0NzggMTAgMi40ODA0MyA5Ljg5NDY0IDIuMjkyODkgOS43MDcxMUMyLjEwNTM2IDkuNTE5NTcgMiA5LjI2NTIyIDIgOVY0QzIgMy43MzQ3OCAyLjEwNTM2IDMuNDgwNDMgMi4yOTI4OSAzLjI5Mjg5QzIuNDgwNDMgMy4xMDUzNiAyLjczNDc4IDMgMyAzSDYiIHN0cm9rZT0iY3VycmVudENvbG9yIiBzdHJva2Utd2lkdGg9IjEiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8L3N2Zz4K");
  background-repeat: no-repeat;
  background-position: center;
  vertical-align: baseline;
}

/* Responsive Design */
@media (max-width: 767px) {
  .popup-redirection {
    padding: 16px;
  }

  .popup-redirection .popup-contenant {
    padding: 30px;
    width: 100%;
  }

  .popup-redirection .popup-contenant .popup-entete {
    font-size: 24px;
    line-height: 30px;
    padding-bottom: 16px;
    margin-bottom: 24px;
  }

  .popup-redirection .popup-contenant .popup-corps {
    font-size: 18px;
    line-height: 21.78px;
    margin-bottom: 40px;
  }

  .popup-redirection .popup-contenant .popup-pied {
    flex-direction: column;
    gap: 12px;
  }

  .popup-redirection .popup-contenant .popup-pied .popup-bouton {
    padding: 16px 20px;
    width: 100%;
  }
}

.popup-redirection {
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.popup-redirection .popup-contenant {
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.popup-redirection.active .popup-contenant {
  transform: scale(1);
}

.popup-redirection:focus {
  outline: none;
}

.popup-redirection .popup-contenant .popup-pied .popup-bouton:focus {
  outline: 2px solid #fffbf7;
  outline-offset: 2px;
}

@media (max-width: 480px) {
  .popup-redirection {
    padding: 8px;
  }

  .popup-redirection .popup-contenant {
    padding: 20px;
  }

  .popup-redirection .popup-contenant .popup-entete {
    font-size: 20px;
    line-height: 24px;
  }

  .popup-redirection .popup-contenant .popup-corps {
    font-size: 16px;
    line-height: 20px;
  }
}
