.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: 45px;
  color: #071D31;
  background-color: #F3F0EC;
  border-radius: 20px;
  width: 500px;
  max-width: 100%;
  box-sizing: border-box;
  position: relative;
}

.popup-redirection .popup-contenant .popup-entete {
  font-family: "Figtree", sans-serif;
  font-size: 32px;
  font-weight: 700;
  line-height: 38.73px;
  padding-bottom: 20px;
  border-bottom: 2px solid #1C5688;
  margin-bottom: 20px;
}

.popup-redirection .popup-contenant .popup-corps {
  font-size: 2rem;
  line-height: 24.2px;
  margin-bottom: 35px;
}

.popup-redirection .popup-contenant .popup-corps p {
  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: 10px;
}

.popup-redirection .popup-contenant .popup-pied .popup-bouton {
  padding: 16px 40px;
  border-radius: 100px;
  font-size: 1.5rem;
  font-weight: 700;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  color: #071D31;
  transition: all 0.3s ease;
  border: 2px solid;
  box-sizing: border-box;
  text-align: center;
  min-width: 120px;
}

/* Bouton Annuler */
.popup-redirection .popup-contenant .popup-pied .popup-bouton#btn-annuler {
  flex-basis: 50%;
  border-color: #F08800;
  background-color: transparent;

  &:hover,
  &:focus {
    color: #ffffff;
    border-color: #17344F;
    background-color: #17344F;
  }
}

/* Bouton Continuer */
.popup-redirection .popup-contenant .popup-pied .popup-bouton#btn-continuer {
  flex-basis: 50%;
  border-color: #F08800;
  background-color: #F08800;

  &:hover,
  &:focus {
    color: #ffffff;
    border-color: #17344F;
    background-color: #17344F;
  }
}

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

.lien-externe-auto::after {
  content: "";
  position: relative;
  display: inline-block;
  width: 9px;
  height: 9px;
  mask: url(../img/icons/fleche.svg) no-repeat 0 0 / contain;
  background-color: #17344F;
  transform: rotate(-25deg);
  margin-left: 4px;
  transition: all 0.2s ease-in-out;
}

/* 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;
  }
}
