/* Formulaire avancé Zagros – CSS de base.
   La plupart des valeurs sont contrôlées par les variables CSS
   définies dynamiquement par le plugin dans le <head>. */

:root {
  --zagros-primary: #199cd8;
  --zagros-primary-dark: #1579a6;
  --zagros-bg: #ffffff;
  --zagros-border: #d0d7de;
  --zagros-label-color: #222222;
  --zagros-text-color: #111111;
  --zagros-button-text-color: #ffffff;
  --zagros-border-radius: 10px;
  --zagros-font-size: 15px;
  --zagros-wrapper-margin-top: 20px;
  --zagros-wrapper-margin-bottom: 20px;
  --zagros-input-padding-y: 10px;
  --zagros-input-padding-x: 14px;
  --zagros-font-family: system-ui;
  --zagros-form-max-width: var(--zagros-form-max-width);
  --zagros-field-height: 44px;
}

/* Wrapper global */
.zagros-contact-wrapper {
  max-width: var(--zagros-form-max-width);
  margin: var(--zagros-wrapper-margin-top) auto var(--zagros-wrapper-margin-bottom) auto;
  padding: 15px;
}

/* Formulaire */
.zagros-contact-form {
  background: var(--zagros-bg);
  border-radius: var(--zagros-border-radius);
  border: 1px solid var(--zagros-border);
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  font-size: var(--zagros-font-size);
  color: var(--zagros-text-color);
  font-family: var(--zagros-font-family), system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Titre */
.zagros-form-title {
  margin: 0 0 15px 0;
  font-size: calc(var(--zagros-font-size) + 3px);
  font-weight: 700;
  color: var(--zagros-primary);
}

/* Alignement LTR / RTL */
.zagros-contact-wrapper[dir="ltr"] .zagros-contact-form {
  text-align: left;
}

.zagros-contact-wrapper[dir="rtl"] .zagros-contact-form {
  direction: rtl;
  text-align: right;
}

/* Rangées */
.zagros-row {
  margin-bottom: 15px;
}

/* Labels */
.zagros-row label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: var(--zagros-label-color);
}

/* Champs */
.zagros-contact-form input[type="text"],
.zagros-contact-form input[type="email"],
.zagros-contact-form textarea {
  width: 100%;
  border-radius: var(--zagros-border-radius);
  border: 1px solid var(--zagros-border);
  padding: var(--zagros-input-padding-y) var(--zagros-input-padding-x);
  font-size: var(--zagros-font-size);
  box-sizing: border-box;
  min-height: var(--zagros-field-height);
}

.zagros-contact-form textarea {
  resize: vertical;
}

/* Consentement */
.zagros-consent-row .zagros-consent-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.9em;
  line-height: 1.4;
}

.zagros-contact-wrapper[dir="rtl"] .zagros-consent-row .zagros-consent-label {
  flex-direction: row-reverse;
}

.zagros-consent-row input[type="checkbox"] {
  margin-top: 3px;
}

/* Bouton envoyer */
.zagros-submit-row {
  text-align: right;
}

.zagros-contact-wrapper[dir="rtl"] .zagros-submit-row {
  text-align: left;
}

.zagros-submit-btn {
  background: var(--zagros-primary);
  border: none;
  border-radius: var(--zagros-border-radius);
  padding: 10px 24px;
  font-size: var(--zagros-font-size);
  color: var(--zagros-button-text-color);
  cursor: pointer;
  font-weight: 600;
}

.zagros-submit-btn:hover {
  background: var(--zagros-primary-dark);
}

/* Messages */
.zagros-form-message {
  margin-bottom: 15px;
  padding: 10px 14px;
  border-radius: var(--zagros-border-radius);
  font-size: 0.95em;
}

.zagros-form-message.zagros-success {
  background: rgba(46, 204, 113, 0.08);
  border: 1px solid #1e8449;
  color: #1e8449;
}

.zagros-form-message.zagros-error {
  background: rgba(231, 76, 60, 0.08);
  border: 1px solid #c0392b;
  color: #c0392b;
}

/* reCAPTCHA bloc */
.zagros-recaptcha-row {
  margin-top: 10px;
}

/* Responsive */
@media (max-width: 768px) {
  .zagros-contact-form {
    padding: 15px;
  }

  .zagros-form-title {
    font-size: calc(var(--zagros-font-size) + 1px);
  }

  .zagros-submit-row {
    text-align: center;
  }
}

/* Correction header mobile pour certains thèmes (optionnel) */
@media (max-width: 768px) {

  #theme-header,
  #theme-header .container,
  #theme-header [class*="logo"] {
    position: relative;
  }

  #theme-header h1,
  #theme-header h1 a,
  #logo,
  #logo a,
  .logo-text,
  .site-title {
    display: block;
    padding-left: 60px !important;
    font-size: 22px !important;
    line-height: 1.3 !important;
    text-align: left !important;
    white-space: normal !important;
  }

  #theme-header .site-description,
  #theme-header .tagline {
    padding-left: 60px !important;
    font-size: 12px !important;
    line-height: 1.3 !important;
  }

  #theme-header .fa-bars,
  #theme-header .mobile-menu-icon,
  #theme-header .menu-icon,
  #theme-header a[href*="javascript:void(0)"] i.fa-bars {
    position: absolute !important;
    left: 15px !important;
    top: 50% !important;
    transform: translateY(-50%);
    z-index: 9999;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  #theme-header h1,
  #theme-header h1 a,
  #logo,
  #logo a,
  .logo-text,
  .site-title {
    font-size: 26px !important;
  }
}
