/* Styles spécifiques pour le popup Accès Limité */

/* --- VARIABLES CSS MODIFIABLES --- */
:root {
  --popup-limited-access-title-color: #ff5555; /* Couleur du titre */
  --popup-limited-access-button-bg-alert: #ff5555; /* Couleur de fond des boutons d'alerte */
  --popup-limited-access-button-hover-alert: #cc0000; /* Couleur de fond des boutons d'alerte au survol */
  --popup-limited-access-button-bg-return: #00aaff; /* Couleur de fond du bouton "Revenir à l'Accueil" */
  --popup-limited-access-button-hover-return: #0088cc; /* Couleur de fond du bouton "Revenir à l'Accueil" au survol */
  --popup-limited-access-close-button-bg: #ff5555; /* Couleur de fond du bouton Fermer */
  --popup-limited-access-close-button-hover: #cc0000; /* Couleur de fond du bouton Fermer au survol */
  --popup-background-image-url: url("https://aavyuxeirkpgtbarjdce.supabase.co/storage/v1/object/public/julienscript/Sample/images/background_popup.png"); /* URL de l'image de fond */
  --popup-general-bg: rgba(
    10,
    25,
    47,
    1
  ); /* Couleur de fond générale du popup */
  --popup-general-mobile-bg: rgba(
    8,
    20,
    40,
    0.95
  ); /* Couleur de fond générale mobile du popup */
}
/* --- FIN VARIABLES CSS MODIFIABLES --- */

/* Applique les styles généraux de .popup-style ET les styles spécifiques */
.popup-style.popup-limited-access {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--popup-general-bg); /* Utilise la variable */
  width: 450px;
  max-width: 95%;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  text-align: center;
  z-index: 9999;
  padding: 25px;
  color: white;

  transition: none;
  animation: none;
}

.popup-style.popup-limited-access::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--popup-background-image-url); /* Utilise la variable */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.2;
  border-radius: 12px;
  z-index: -1;
}

.popup-limited-access .popup-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
}

.popup-limited-access .popup-title {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 15px;
  color: var(--popup-limited-access-title-color); /* Utilise la variable */
  animation: pulseTitle 3s ease-in-out infinite alternate;
}

@keyframes pulseTitle {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.8;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.popup-limited-access .popup-description {
  font-size: 17px;
  color: #cccccc;
  margin-bottom: 20px;
  padding: 0 15px;
  line-height: 1.4;
}

.popup-limited-access .popup-content-centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
}

.popup-limited-access .popup-image {
  max-width: 150px;
  margin: 15px auto;
  border-radius: 8px;
  height: auto;
  display: block;
}

.popup-limited-access .popup-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  gap: 10px;
}

.popup-limited-access .action-btn {
  background: var(
    --popup-limited-access-button-bg-alert
  ); /* Utilise la variable */
  color: white;
  padding: 12px 25px;
  font-size: 16px;
  font-weight: bold;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s ease-in-out;
  width: 100%;
  max-width: 280px;
  text-decoration: none;
  text-align: center;
}

.popup-limited-access .action-btn:hover {
  background: var(
    --popup-limited-access-button-hover-alert
  ); /* Utilise la variable */
  transform: scale(1.03);
}

.popup-limited-access .return-accueil-btn {
  background: var(
    --popup-limited-access-button-bg-return
  ); /* Utilise la variable */
}

.popup-limited-access .return-accueil-btn:hover {
  background: var(
    --popup-limited-access-button-hover-return
  ); /* Utilise la variable */
}

.popup-limited-access .close-btn {
  position: absolute;
  top: -10px;
  right: -10px;
  background: var(
    --popup-limited-access-close-button-bg
  ); /* Utilise la variable */
  border: none;
  width: 30px;
  height: 30px;
  font-size: 18px;
  color: white;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 30px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  transition: background 0.2s ease;
}

.popup-limited-access .close-btn:hover {
  background: var(
    --popup-limited-access-close-button-hover
  ); /* Utilise la variable */
}

/* Styles pour les appareils mobiles */
@media (max-width: 767px) {
  body.mobile-device .popup-style.popup-limited-access {
    width: 95%;
    max-width: 300px;
    padding: 15px;
    background: var(--popup-general-mobile-bg); /* Utilise la variable mobile */
    top: 10%;
    transform: translate(-50%, 0);

    transition: none;
    animation: none;
  }

  body.mobile-device .popup-style.popup-limited-access::before {
    opacity: 0.1;
  }

  body.mobile-device .popup-limited-access,
  body.mobile-device .popup-limited-access * {
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  body.mobile-device .popup-limited-access::-webkit-scrollbar,
  body.mobile-device .popup-limited-access *::-webkit-scrollbar {
    display: none;
  }

  body.mobile-device .popup-limited-access .popup-title {
    font-size: 20px;
    margin-bottom: 10px;
  }

  body.mobile-device .popup-limited-access .popup-description {
    font-size: 15px;
    margin-bottom: 15px;
  }

  body.mobile-device .popup-limited-access .popup-image {
    max-width: 100px;
    margin: 10px auto;
  }

  body.mobile-device .popup-limited-access .action-btn {
    padding: 10px 20px;
    font-size: 15px;
    max-width: 250px;
  }

  body.mobile-device .popup-limited-access .close-btn {
    top: -5px;
    right: -5px;
    width: 25px;
    height: 25px;
    font-size: 16px;
    line-height: 25px;
    background: var(
      --popup-limited-access-close-button-bg
    ); /* Utilise la variable mobile aussi */
  }
  body.mobile-device .popup-limited-access .close-btn:hover {
    background: var(
      --popup-limited-access-close-button-hover
    ); /* Utilise la variable mobile aussi */
  }
}
