/**
 * Contact Form Section Component
 *
 * @package Annecy_Unik_Lodges
 */

/* ==========================================
   SECTION
   ========================================== */

.section-contact-form {
  padding-top: var(--section-pt, 6rem);
  padding-bottom: var(--section-pb, 6rem);
  background-color: #f3f1ee;
}

.contact-form__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 48px;
}

/* En-tête optionnel */
.contact-form__header {
  text-align: center;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-form__subtitle {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: var(--color-secondary, #b8a882);
  margin: 0;
}

.contact-form__title {
  color: var(--color-dark, #1b1f0d);
}

.contact-form__title h2,
.contact-form__title h3,
.contact-form__title p {
  font-family: var(--font-heading);
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.5px;
  color: inherit;
  margin: 0;
}

.contact-form__title em,
.contact-form__title i {
  font-style: italic;
  color: var(--color-secondary, #b8a882);
}

.contact-form__description p {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.8;
  color: rgba(27, 31, 13, 0.65);
  margin: 0;
}

/* Wrapper formulaire */
.contact-form__form-wrapper {
  width: 100%;
  max-width: 620px;
}

/* ==========================================
   OVERRIDE GRAVITY FORMS ORBITAL THEME
   On cible les classes réelles du HTML GF
   ========================================== */

/* Override des variables GF — même spécificité que l'inline style injecté */
.contact-form__form-wrapper .gform_wrapper.gform-theme {
  --gf-color-primary: var(--color-primary, #365e58) !important;
  --gf-color-primary-rgb: 54, 94, 88 !important;
  --gf-color-in-ctrl: transparent !important;
  --gf-color-in-ctrl-darker: transparent !important;
  --gf-ctrl-border-color: rgba(27, 31, 13, 0.2) !important;
  --gf-radius: 0px !important;
  --gf-ctrl-label-color-primary: #1b1f0d !important;
  --gf-ctrl-label-color-secondary: #1b1f0d !important;
  background: transparent;
  padding: 0;
  margin: 0;
  max-width: 100%;
  font-family: var(--font-body);
}

/* Reset wrapper */
.contact-form__form-wrapper .gform_wrapper {
  background: transparent;
  max-width: 100%;
}

/* En-tête du form */
.contact-form__form-wrapper .gform_heading {
  margin-bottom: 36px;
  text-align: center;
}

.contact-form__form-wrapper .gform_title {
  font-family: var(--font-heading) !important;
  font-size: 22px !important;
  font-weight: 400 !important;
  color: var(--color-dark, #1b1f0d) !important;
  letter-spacing: -0.3px !important;
  margin: 0 0 8px !important;
}

.contact-form__form-wrapper .gform_description {
  font-family: var(--font-body) !important;
  font-size: 14px !important;
  color: rgba(27, 31, 13, 0.6) !important;
}

/* Reset fieldset / legend */
.contact-form__form-wrapper .gform_wrapper fieldset {
  border: none;
  padding: 0;
  margin: 0;
}

/* Champs : espacement */
.contact-form__form-wrapper .gform_fields {
  gap: 32px !important;
  padding: 0 !important;
  list-style: none;
  margin: 0;
}

.contact-form__form-wrapper .gfield {
  margin: 0 !important;
  padding: 0 !important;
}

/* Labels principaux (legend) */
.contact-form__form-wrapper .gfield_label,
.contact-form__form-wrapper .gform-field-label {
  font-family: var(--font-body) !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  letter-spacing: 2px !important;
  text-transform: uppercase !important;
  color: #1b1f0d !important;
  margin-bottom: 12px !important;
}

/* Sous-labels (Prénom, Nom, Email, Confirm email…) */
.contact-form__form-wrapper .gform-field-label--type-sub {
  font-family: var(--font-body) !important;
  font-size: 9px !important;
  font-weight: 500 !important;
  letter-spacing: 1.5px !important;
  text-transform: uppercase !important;
  color: rgba(27, 31, 13, 0.5) !important;
  margin-bottom: 6px !important;
}

/* Grille GF (champ nom split / email split) */
.contact-form__form-wrapper .gform-grid-row {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 20px !important;
  align-items: end;
}

.contact-form__form-wrapper .gform-grid-col {
  float: none !important;
  width: auto !important;
  padding: 0 !important;
}

/* Inputs text / email / tel */
.contact-form__form-wrapper input[type="text"],
.contact-form__form-wrapper input[type="email"],
.contact-form__form-wrapper input[type="tel"],
.contact-form__form-wrapper input[type="url"],
.contact-form__form-wrapper input[type="number"],
.contact-form__form-wrapper input[type="password"] {
  width: 100% !important;
  background: transparent !important;
  border: none !important;
  border-bottom: 1px solid rgba(27, 31, 13, 0.2) !important;
  border-radius: 0 !important;
  padding: 10px 0 !important;
  font-family: var(--font-body) !important;
  font-size: 15px !important;
  color: #1b1f0d !important;
  outline: none !important;
  box-shadow: none !important;
  transition: border-color 0.25s ease !important;
  -webkit-appearance: none;
  height: auto !important;
}

.contact-form__form-wrapper input[type="text"]:focus,
.contact-form__form-wrapper input[type="email"]:focus,
.contact-form__form-wrapper input[type="tel"]:focus {
  border-bottom-color: var(--color-primary, #365e58) !important;
  box-shadow: none !important;
  outline: none !important;
}

/* Textarea */
.contact-form__form-wrapper textarea {
  width: 100% !important;
  background: transparent !important;
  border: none !important;
  border-bottom: 1px solid rgba(27, 31, 13, 0.2) !important;
  border-radius: 0 !important;
  padding: 10px 0 !important;
  font-family: var(--font-body) !important;
  font-size: 15px !important;
  color: #1b1f0d !important;
  outline: none !important;
  resize: vertical !important;
  min-height: 100px !important;
  box-shadow: none !important;
  transition: border-color 0.25s ease !important;
}

.contact-form__form-wrapper textarea:focus {
  border-bottom-color: var(--color-primary, #365e58) !important;
  box-shadow: none !important;
  outline: none !important;
}

/* Compteur caractères */
.contact-form__form-wrapper .charleft,
.contact-form__form-wrapper .ginput_counter {
  font-family: var(--font-body) !important;
  font-size: 11px !important;
  color: rgba(27, 31, 13, 0.4) !important;
  text-align: right;
  margin-top: 6px;
  border: none !important;
  background: none !important;
}

/* Select */
.contact-form__form-wrapper select {
  width: 100% !important;
  background: transparent !important;
  border: none !important;
  border-bottom: 1px solid rgba(27, 31, 13, 0.2) !important;
  border-radius: 0 !important;
  padding: 10px 0 !important;
  font-family: var(--font-body) !important;
  font-size: 15px !important;
  color: #1b1f0d !important;
  outline: none !important;
  -webkit-appearance: none;
  cursor: pointer;
}

/* Placeholder */
.contact-form__form-wrapper input::placeholder,
.contact-form__form-wrapper textarea::placeholder {
  color: rgba(27, 31, 13, 0.3) !important;
  font-style: italic;
}

/* Description champ */
.contact-form__form-wrapper .gfield_description {
  font-family: var(--font-body) !important;
  font-size: 12px !important;
  color: rgba(27, 31, 13, 0.45) !important;
  margin-top: 6px !important;
  line-height: 1.5 !important;
  border: none !important;
  background: none !important;
  padding: 0 !important;
}

/* Required */
.contact-form__form-wrapper .gfield_required,
.contact-form__form-wrapper .gfield_required_text {
  color: var(--color-primary, #365e58) !important;
}

/* Bouton submit */
.contact-form__form-wrapper .gform-footer,
.contact-form__form-wrapper .gform_footer {
  padding: 0 !important;
  margin-top: 40px !important;
  border: none !important;
  background: none !important;
}

.contact-form__form-wrapper .gform_button,
.contact-form__form-wrapper .gform-button,
.contact-form__form-wrapper button[type="submit"],
.contact-form__form-wrapper input[type="submit"] {
  display: block !important;
  width: 100% !important;
  padding: 18px 32px !important;
  background-color: #1b1f0d !important;
  color: #fff !important;
  border: none !important;
  border-radius: 0 !important;
  font-family: var(--font-body) !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  letter-spacing: 2.4px !important;
  text-transform: uppercase !important;
  cursor: pointer !important;
  transition: background-color 0.25s ease !important;
  -webkit-appearance: none;
  height: auto !important;
  line-height: normal !important;
}

.contact-form__form-wrapper .gform_button:hover,
.contact-form__form-wrapper .gform-button:hover,
.contact-form__form-wrapper button[type="submit"]:hover,
.contact-form__form-wrapper input[type="submit"]:hover {
  background-color: var(--color-primary, #365e58) !important;
}

/* Erreurs */
.contact-form__form-wrapper .gfield_error input,
.contact-form__form-wrapper .gfield_error textarea {
  border-bottom-color: #c0392b !important;
}

.contact-form__form-wrapper .validation_message,
.contact-form__form-wrapper .gfield_validation_message {
  font-family: var(--font-body) !important;
  font-size: 11px !important;
  color: #c0392b !important;
  margin-top: 5px !important;
  padding: 0 !important;
  background: none !important;
  border: none !important;
}

.contact-form__form-wrapper .gform_validation_errors,
.contact-form__form-wrapper .gform-validation-errors {
  background: none !important;
  border: none !important;
  border-left: 2px solid #c0392b !important;
  padding: 0 0 0 12px !important;
  margin-bottom: 24px !important;
  box-shadow: none !important;
}

.contact-form__form-wrapper .gform_validation_errors > h2,
.contact-form__form-wrapper .gform-validation-errors > h2 {
  font-family: var(--font-body) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  color: #c0392b !important;
  margin: 0 !important;
}

/* Confirmation */
.contact-form__form-wrapper .gform_confirmation_wrapper,
.contact-form__form-wrapper .gform_confirmation_message {
  font-family: var(--font-body);
  font-size: 15px;
  color: #1b1f0d;
  text-align: center;
  padding: 40px 20px;
  border: 1px solid rgba(27, 31, 13, 0.15);
  line-height: 1.7;
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 540px) {
  .contact-form__form-wrapper .gform-grid-row {
    grid-template-columns: 1fr !important;
  }

  .contact-form__form-wrapper {
    max-width: 100%;
  }
}
