/* Formulaire de contact (page contact-2) */

.contact-form-p .cf-field {
  margin-bottom: 22px;
}

.contact-form-p .cf-field > label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 15px;
  color: var(--color-heading-1);
}

.contact-form-p .cf-required {
  color: #d93025;
}

.contact-form-p .cf-optional {
  font-weight: 400;
  color: var(--color-body);
  font-size: 13px;
}

/* Les styles du thème imposent 30px de marge sous chaque input : on la réduit ici. */
.contact-form-p .cf-field input[type="text"],
.contact-form-p .cf-field input[type="tel"],
.contact-form-p .cf-field input[type="email"],
.contact-form-p .cf-field textarea {
  width: 100%;
  margin-bottom: 0;
}

.contact-form-p .cf-field textarea {
  height: 130px;
  resize: vertical;
}

.contact-form-p .cf-field input.cf-invalid,
.contact-form-p .cf-field textarea.cf-invalid {
  border-color: #d93025;
}

.contact-form-p .cf-error {
  display: block;
  min-height: 0;
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.4;
  color: #d93025;
}

.contact-form-p .cf-error:empty {
  display: none;
}

/* Champ piège anti-robot : hors écran, invisible pour les visiteurs */
.contact-form-p .cf-hp {
  position: absolute !important;
  left: -9999px !important;
  top: auto !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-form-p .cf-consent label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-body);
  cursor: pointer;
}

.contact-form-p .cf-consent input[type="checkbox"] {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  padding: 0;
  border: 1px solid rgba(32, 40, 45, 0.4);
  accent-color: var(--color-primary);
}

.contact-form-p .g-recaptcha {
  max-width: 100%;
  overflow-x: auto;
}

.contact-form-p button[type="submit"][disabled] {
  opacity: 0.65;
  cursor: not-allowed;
}

/* intl-tel-input : le champ téléphone occupe toute la largeur */
.contact-form-p .iti {
  display: block;
  width: 100%;
}

@media only screen and (max-width: 575px) {
  .contact-form-p .cf-field > label {
    font-size: 14px;
  }
}

/* Téléphone et e-mail sur la même ligne dès que la carte est assez large pour le sélecteur d'indicatif */
.contact-form-p .cf-row {
  display: block;
}

@media only screen and (min-width: 576px) {
  .contact-form-p .cf-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 16px;
    align-items: start;
  }
}

.contact-form-p .cf-consent a {
  color: var(--color-primary);
  text-decoration: underline;
}

.contact-form-p .cf-hint {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-body);
}

.contact-form-p .cf-hint[hidden] {
  display: none;
}

/* Cartes de même hauteur : le formulaire donne la hauteur, la carte d'informations s'y adapte */
.rts-contact-area-in-page .row > [class*="col-"] > .contact-info-area-wrapper-p,
.rts-contact-area-in-page .row > [class*="col-"] > .contact-form-p {
  height: 100%;
}

/* Carte d'informations (gauche) : en-tête, trois lignes séparées par de fines barres, pied */
.contact-info-area-wrapper-p.cf-info-card {
  display: flex;
  flex-direction: column;
  padding: 44px 36px;
}

.cf-info-card .cf-info-head {
  padding-bottom: 28px;
}

.cf-info-card .cf-info-title {
  margin: 0 0 12px;
  font-size: 28px;
  line-height: 1.25;
  color: #fff;
}

.cf-info-card .cf-info-intro {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: #B3B7C1;
}

/* La liste occupe la hauteur disponible : chaque ligne reçoit la même part d'espace en plus. */
.cf-info-card .cf-info-list {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.cf-info-card .single-contact-info {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: 51px minmax(0, 1fr);
  column-gap: 20px;
  align-items: start;
  align-content: center;
  margin-bottom: 0;
  padding: 26px 0;
}

.cf-info-card .single-contact-info + .single-contact-info {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.cf-info-card .single-contact-info .info-wrapper span {
  margin-bottom: 8px;
}

.cf-info-card .single-contact-info .info-wrapper a {
  display: block;
  font-size: 18px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.cf-info-card .single-contact-info .info-wrapper a:hover {
  text-decoration: underline;
}

.cf-info-card .cf-info-foot {
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.cf-info-card .cf-info-foot .rts-btn {
  display: inline-flex;
}

/* Cartes empilées sur tablette et mobile : espace entre elles */
@media only screen and (max-width: 991px) {
  .rts-contact-area-in-page .row > [class*="col-"] > .contact-info-area-wrapper-p {
    height: auto;
    margin-bottom: 25px;
  }
}

@media only screen and (max-width: 575px) {
  .contact-info-area-wrapper-p.cf-info-card {
    padding: 32px 24px;
  }

  .cf-info-card .cf-info-title {
    font-size: 24px;
  }

  .cf-info-card .single-contact-info {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 14px;
    padding: 22px 0;
  }
}
