/* =============================================================================
   Naturabox — formulaires (composant .nb-form) : fenêtres des pages professionnelles (devis, catalogue, livre blanc),
   demande de partenariat (page 43), formulaire de contact. Chargé par les overrides CmsController et ContactController.
   ============================================================================= */
/* ---------- fenêtres (cms/_partials/form_*.tpl) ---------- */
.nb-form-modal .modal-dialog.nb-form-modal__dialog {
  max-width: 560px;
}

.nb-form-modal .modal-dialog.nb-form-modal__dialog--wide {
  max-width: 880px;
}

.nb-form-modal .modal-content {
  overflow: hidden;
  border: 0;
  border-radius: 24px;
  box-shadow: 0 40px 90px -30px rgba(20, 35, 25, .45);
}

.nb-form-modal__head {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.5rem 1.5rem 1.25rem;
  background: linear-gradient(120deg, #eef5f0 0%, #f6f4ee 80%);
}

.nb-form-modal__icon {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  color: var(--nb-green-dark);
  background: linear-gradient(135deg, #fbe7a8, var(--nb-yellow));
}

.nb-form-modal__heading {
  flex: 1;
  min-width: 0;
}

.nb-form-modal .nb-form-modal__title {
  margin: .15rem 0 .3rem;
  font-family: var(--nb-font-title);
  font-size: clamp(1.3rem, 1.1rem + .8vw, 1.7rem);
  font-weight: 800;
  line-height: 1.2;
  color: var(--nb-title);
}

.nb-form-modal__intro {
  margin: 0;
  font-size: .95rem;
  color: var(--nb-muted);
}

.nb-form-modal__close {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--nb-ink);
  background: rgba(255, 255, 255, .85);
  cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}

.nb-form-modal__close:hover {
  background: #fff;
  transform: rotate(90deg);
}

.nb-form-modal .modal-body {
  padding: 1.5rem;
}

/* champs */
.nb-form__group {
  margin: 0 0 1.5rem;
  padding: 0;
  border: 0;
}

.nb-form__group legend {
  float: none;
  width: auto;
  margin: 0 0 .9rem;
  padding: 0;
  font-family: var(--nb-font-title);
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--nb-primary);
}

.nb-form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .9rem 1rem;
}

.nb-form__field--full {
  grid-column: 1 / -1;
}

.nb-form__field label {
  display: block;
  margin-bottom: .35rem;
  font-size: .875rem;
  font-weight: 600;
  color: var(--nb-ink);
}

.nb-form__req {
  color: #c0392b;
}

.nb-form .form-control,
.nb-form .form-select {
  min-height: 48px;
  padding: .65rem .9rem;
  border: 1px solid #d5ddd8;
  border-radius: 12px;
  font-size: 1rem;
  background-color: #fff;
  box-shadow: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.nb-form textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

.nb-form .form-control:focus,
.nb-form .form-select:focus {
  border-color: var(--nb-primary);
  box-shadow: 0 0 0 4px rgba(73, 156, 111, .16);
}

.nb-form .form-control::placeholder {
  color: #9aa49e;
}

/* pied : reCAPTCHA + envoi */
.nb-form__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--nb-line);
}

.nb-form__submit {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .5rem;
}

.nb-form__foot .btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .8rem 1.6rem;
  border-radius: 999px;
  font-weight: 700;
}

.nb-form__foot .btn .material-icons {
  font-size: 20px;
}

.nb-form__legal {
  margin: 0;
  font-size: .8rem;
  color: var(--nb-muted);
}

.nb-form__foot--stack {
  flex-direction: column;
  align-items: stretch;
  text-align: center;
}

.nb-form__foot--stack .g-recaptcha {
  display: flex;
  justify-content: center;
}

.nb-form__foot--stack .btn {
  justify-content: center;
}

/* erreurs de la demande précédente */
.nb-form__errors {
  display: flex;
  gap: .6rem;
  margin-bottom: 1.25rem;
  padding: .85rem 1rem;
  border-radius: 12px;
  color: #8a1f14;
  background: #fdecea;
}

.nb-form__errors ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* catalogue : couverture à côté du formulaire */
.nb-form-split {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  align-items: center;
  gap: 1.75rem;
}

.nb-form-split__media {
  margin: 0;
}

.nb-form-split__media img {
  display: block;
  width: 100%;
  border-radius: 16px;
  box-shadow: 0 24px 50px -28px rgba(20, 35, 25, .55);
}

@media (max-width: 767.98px) {
  .nb-form__grid,
  .nb-form-split {
    grid-template-columns: minmax(0, 1fr);
  }

  .nb-form-split__media {
    max-width: 260px;
    margin: 0 auto;
  }

  .nb-form__foot {
    flex-direction: column;
    align-items: stretch;
  }

  .nb-form__submit {
    align-items: stretch;
    text-align: center;
  }

  .nb-form__foot .btn {
    justify-content: center;
  }

  .nb-form-modal__head,
  .nb-form-modal .modal-body {
    padding: 1.1rem;
  }
}

@media (max-width: 575.98px) {
  .nb-form-modal .modal-content {
    border-radius: 0;
  }
}

.nb-form .g-recaptcha {
  margin: 0;
}

/* devis : coordonnées et demande côte à côte sur grand écran */
.nb-form__cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0 2rem;
}

@media (min-width: 992px) {
  .nb-form__cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nb-form__cols > .nb-form__group:first-child {
    padding-right: 2rem;
    border-right: 1px solid var(--nb-line);
  }

  .nb-form__cols textarea.form-control {
    min-height: 196px;
  }
}

.nb-form .form-select {
  padding-right: 2.75rem;
  text-overflow: ellipsis;
}

/* bouton jaune des formulaires (fenêtres hors du contenu .nb-cms) */
.nb-form .btn-secondary {
  --bs-btn-color: var(--nb-green-dark);
  --bs-btn-bg: var(--nb-yellow);
  --bs-btn-border-color: var(--nb-yellow);
  --bs-btn-hover-color: var(--nb-green-dark);
  --bs-btn-hover-bg: #e8b93d;
  --bs-btn-hover-border-color: #e8b93d;
  --bs-btn-active-color: var(--nb-green-dark);
  --bs-btn-active-bg: #e8b93d;
  --bs-btn-active-border-color: #e8b93d;
}


/* demande envoyée */
.nb-form__success {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  min-height: 260px;
  text-align: center;
}

.nb-form__success-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  color: #fff;
  background: var(--nb-primary);
}

.nb-form__success-icon .material-icons {
  font-size: 34px;
}

.nb-form__success p {
  margin: 0;
  font-family: var(--nb-font-title);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--nb-title);
}

