/* ========= MODAL CTA (CoconSEM) ========= */

/* Empêcher la page de scroller quand la modale est ouverte */
html.cs-modal-open,
body.cs-modal-open {
  overflow: hidden;
}

/* Ajuste un peu les marges des titres dans la modale */
.cs-soft-modal h3 {
  margin-top: 20px;
}

.cs-soft-modal h4 {
  margin-top: 0;
}

/* ============== MODALE GÉNÉRIQUE ================= */

.cs-soft-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
}

.cs-soft-modal.is-open {
  display: block;
}

.cs-soft-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

/* Contenant de la modale */
.cs-soft-modal__dialog {
  position: relative;
  max-width: 720px;
  margin: 40px auto;
  padding: 24px 24px 20px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.20);

  /* hauteur max + scroll interne */
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Croix de fermeture en haut à droite */
.cs-soft-modal__close {
  position: sticky;       /* reste visible quand le contenu scroll */
  top: 0;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: #444;
  z-index: 2;
}

.cs-soft-modal__close:hover {
  background: rgba(0, 0, 0, 0.12);
}

/* Layout interne */
.cs-soft-modal__inner {
  display: flex;
  gap: 20px;
  align-items: stretch;
}

.cs-soft-modal__col {
  flex: 1;
  font-size: 14px;
  color: #444;
}

/* Colonne texte / téléphone */
.cs-soft-modal__col--text h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 18px;
}

.cs-soft-modal__call {
  display: inline-block;
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid #ddd;
  text-decoration: none;
  font-weight: 600;
  color: #333;
}

/* Colonne formulaire */
.cs-soft-modal__col--form h4 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 15px;
}

.cs-soft-modal__form label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
}

.cs-soft-modal__form input,
.cs-soft-modal__form textarea {
  width: 100%;
  padding: 7px 9px;
  border-radius: 6px;
  border: 1px solid #ddd;
  font-size: 13px;
  font-family: inherit;
  box-sizing: border-box;
}

.cs-soft-modal__form textarea {
  resize: vertical;
  min-height: 72px;
}

.cs-soft-modal__submit {
  margin-top: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: none;
  background: #efe9e1;
  color: #8f3a32;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.cs-soft-modal__hint {
  margin-top: 6px;
  font-size: 11px;
  color: #777;
}

/* ======= MOBILE ======= */
@media (max-width: 640px) {
  .cs-soft-modal__dialog {
    margin: 10px;
    padding: 18px 16px 16px;
    max-height: calc(100vh - 20px); /* un peu moins de marge */
  }

  .cs-soft-modal__inner {
    flex-direction: column;
  }
}
