/* Empêcher le scroll de la page quand la popup est ouverte */
.cfnp-no-scroll {
  overflow: hidden;
}

/* Overlay plein écran */
.cfnp-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7); /* Un peu plus sombre pour mieux masquer ce qui est derrière */
  
  /* MODIFICATION: Z-index très élevé pour passer devant tout */
  z-index: 99999999; 
  
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

/* Etat ouvert */
.cfnp-overlay.cfnp-is-open {
  opacity: 1;
  pointer-events: auto;
}

/* Popup */
.cfnp-popup {
  background: #ffffff;
  border-radius: 8px;
  padding: 30px; /* Un peu plus d'espace */
  width: 90%;
  max-height: 90vh; /* Garder un espace haut/bas */
  box-sizing: border-box;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.cfnp-hook {
  margin-bottom: 20px;
  font-size: 1rem;
  line-height: 1.5;
}

/* Sur petits écrans */
@media (max-width: 600px) {
  .cfnp-popup {
    width: 94%;
    padding: 20px;
  }
}

/* Bouton de fermeture */
.cfnp-close {
  position: absolute;
  top: 10px;
  right: 10px;
  border: none;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: #333;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.cfnp-close:hover {
  color: #000;
}

/* Titre */
.cfnp-title {
  margin: 0 0 15px;
  font-size: 1.6rem;
  line-height: 1.2;
}

.cfnp-content {
  font-size: 1rem;
}

/* --- Reset couleurs dans la popup --- */

/* Forcer la couleur du texte à noir/gris foncé pour être lisible */
.cfnp-popup, .cfnp-popup p, .cfnp-popup label, 
.cfnp-popup h1, .cfnp-popup h2, .cfnp-popup h3, .cfnp-popup h4 {
  color: #222 !important;
}

/* Champs de formulaire */
.cfnp-popup input[type="text"],
.cfnp-popup input[type="email"],
.cfnp-popup input[type="tel"],
.cfnp-popup textarea {
  background-color: #f9f9f9 !important;
  color: #222 !important;
  border: 1px solid #ccc !important;
  box-shadow: none !important;
  width: 100%;
  padding: 10px;
  margin-bottom: 10px;
}

/* 
   Note: La couleur du bouton est désormais gérée dynamiquement 
   par le PHP (style inline), mais on garde un style de base 
   pour la forme (border, text color).
*/
.cfnp-popup input[type="submit"],
.cfnp-popup button[type="submit"],
.cfnp-popup .button {
  color: #ffffff !important;
  border: none !important;
  padding: 12px 20px;
  cursor: pointer;
  font-weight: bold;
  transition: opacity 0.3s;
  width: auto;
}

.cfnp-popup input[type="submit"]:hover,
.cfnp-popup button[type="submit"]:hover {
  opacity: 0.9;