/* ==========================================================
   MLD – UI Enhancements
   1. Questionnaire pied de page (style exit-intent pop)
   2. Masquage bandeau mobile homepage
   ========================================================== */

/* ----------------------------------------------------------
   VARIABLES MAISON LE DUC
   ---------------------------------------------------------- */
:root {
  --mld-gold:        #B8965A;
  --mld-gold-light:  #d4af7a;
  --mld-grey-bg:     #2c2c2c;
  --mld-grey-card:   #383838;
  --mld-grey-deep:   #242424;
  --mld-border:      rgba(184,150,90,0.28);
  --mld-text:        #f0ede8;
  --mld-text-muted:  rgba(240,237,232,0.55);
  --mld-radius:      4px;
  --mld-transition:  0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ----------------------------------------------------------
   1. WRAPPER QUESTIONNAIRE PIED DE PAGE
      Ciblage générique : on cherche la section footer
      contenant un formulaire WordPress ou Oxygen form.
      Le plugin injecte la refonte visuelle via classe JS.
   ---------------------------------------------------------- */

/* Conteneur global redesigné */
.mld-form-popup-style {
  position: relative;
  background: #383838 !important;
  background: var(--mld-grey-card) !important;
  border: 1px solid rgba(184,150,90,0.28) !important;
  border: 1px solid var(--mld-border) !important;
  border-radius: 8px;
  padding: 48px 56px;
  max-width: 700px;
  margin: 0 auto;
  box-shadow:
    0 0 0 1px rgba(184,150,90,0.08),
    0 20px 60px rgba(0,0,0,0.4),
    inset 0 1px 0 rgba(184,150,90,0.12);
  overflow: hidden;
}

/* Trait doré décoratif en haut */
.mld-form-popup-style::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 60px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--mld-gold), transparent);
}

/* Coins décoratifs */
.mld-form-popup-style::after {
  content: '';
  position: absolute;
  top: 16px; right: 16px;
  width: 18px; height: 18px;
  border-top: 1px solid var(--mld-border);
  border-right: 1px solid var(--mld-border);
  pointer-events: none;
}

/* Titres à l'intérieur du form */
.mld-form-popup-style h1,
.mld-form-popup-style h2,
.mld-form-popup-style h3,
.mld-form-popup-style h4,
.mld-form-popup-style h5,
.mld-form-popup-style p.mld-subtitle {
  text-align: center;
  color: var(--mld-text) !important;
}

.mld-form-popup-style h2,
.mld-form-popup-style h3 {
  font-size: clamp(1.3rem, 2.5vw, 1.75rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.mld-form-popup-style .mld-subtitle {
  color: var(--mld-text-muted) !important;
  font-size: 0.88rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 36px;
}

/* Séparateur doré */
.mld-form-popup-style .mld-divider {
  width: 40px;
  height: 1px;
  background: var(--mld-gold);
  margin: 16px auto 32px;
  opacity: 0.7;
}

/* ----------------------------------------------------------
   CHAMPS DU FORMULAIRE
   ---------------------------------------------------------- */

/* Inputs, textarea, select */
.mld-form-popup-style input[type="text"],
.mld-form-popup-style input[type="email"],
.mld-form-popup-style input[type="tel"],
.mld-form-popup-style input[type="number"],
.mld-form-popup-style select,
.mld-form-popup-style textarea,
.mld-form-popup-style .wpcf7-text,
.mld-form-popup-style .wpcf7-email,
.mld-form-popup-style .wpcf7-textarea,
.mld-form-popup-style .oxy-cf7-form input,
.mld-form-popup-style .oxy-cf7-form textarea,
.mld-form-popup-style .oxy-cf7-form select {
  width: 100%;
  background: rgba(255,255,255,0.06) !important;
  border: 1px solid var(--mld-border) !important;
  border-radius: var(--mld-radius) !important;
  color: var(--mld-text) !important;
  font-size: 0.9rem !important;
  padding: 14px 18px !important;
  margin-bottom: 16px !important;
  transition: border-color var(--mld-transition), box-shadow var(--mld-transition) !important;
  outline: none !important;
  box-shadow: none !important;
  -webkit-appearance: none;
  appearance: none;
}

.mld-form-popup-style input::placeholder,
.mld-form-popup-style textarea::placeholder {
  color: var(--mld-text-muted) !important;
}

.mld-form-popup-style input:focus,
.mld-form-popup-style textarea:focus,
.mld-form-popup-style select:focus {
  border-color: var(--mld-gold) !important;
  box-shadow: 0 0 0 3px rgba(184,150,90,0.12) !important;
  background: rgba(255,255,255,0.06) !important;
}

/* Labels */
.mld-form-popup-style label {
  color: var(--mld-text-muted) !important;
  font-size: 0.75rem !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
  margin-bottom: 6px !important;
  display: block !important;
}

/* Textarea plus haute */
.mld-form-popup-style textarea,
.mld-form-popup-style .wpcf7-textarea {
  min-height: 120px !important;
  resize: vertical !important;
}

/* ----------------------------------------------------------
   BOUTON SUBMIT
   ---------------------------------------------------------- */
.mld-form-popup-style input[type="submit"],
.mld-form-popup-style button[type="submit"],
.mld-form-popup-style .wpcf7-submit,
.mld-form-popup-style .oxy-cf7-form input[type="submit"] {
  display: block !important;
  width: 100% !important;
  background: transparent !important;
  border: 1px solid var(--mld-gold) !important;
  color: var(--mld-gold) !important;
  font-size: 0.78rem !important;
  font-weight: 400 !important;
  letter-spacing: 0.2em !important;
  text-transform: uppercase !important;
  padding: 16px 32px !important;
  border-radius: var(--mld-radius) !important;
  cursor: pointer !important;
  transition: background var(--mld-transition), color var(--mld-transition), box-shadow var(--mld-transition) !important;
  margin-top: 8px !important;
  position: relative !important;
  overflow: hidden !important;
}

.mld-form-popup-style input[type="submit"]:hover,
.mld-form-popup-style button[type="submit"]:hover,
.mld-form-popup-style .wpcf7-submit:hover {
  background: var(--mld-gold) !important;
  color: var(--mld-grey-deep) !important;
  box-shadow: 0 4px 20px rgba(184,150,90,0.3) !important;
}

/* Message de confirmation CF7 */
.mld-form-popup-style .wpcf7-response-output {
  border: 1px solid var(--mld-gold) !important;
  color: var(--mld-gold) !important;
  background: rgba(184,150,90,0.06) !important;
  border-radius: var(--mld-radius) !important;
  padding: 12px 16px !important;
  margin-top: 16px !important;
  font-size: 0.85rem !important;
  text-align: center !important;
}

/* Error states */
.mld-form-popup-style .wpcf7-not-valid {
  border-color: #c0392b !important;
}
.mld-form-popup-style .wpcf7-not-valid-tip {
  color: #e74c3c !important;
  font-size: 0.78rem !important;
}

/* ----------------------------------------------------------
   FOND DE SECTION (enveloppe la carte)
   ---------------------------------------------------------- */
.mld-section-form-wrap {
  background: #2c2c2c !important;
  background: var(--mld-grey-bg) !important;
  padding: 80px 24px;
  position: relative;
}

.mld-section-form-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(184,150,90,0.05) 0%, transparent 70%);
  pointer-events: none;
}

/* ----------------------------------------------------------
   MOBILE : layout responsive
   ---------------------------------------------------------- */
@media (max-width: 768px) {
  .mld-form-popup-style {
    padding: 36px 24px 40px;
    border-radius: 6px;
  }
  .mld-form-popup-style h2,
  .mld-form-popup-style h3 {
    font-size: 1.15rem;
  }
  .mld-section-form-wrap {
    padding: 48px 16px;
  }
}

/* ----------------------------------------------------------
   2. MASQUAGE BANDEAU MOBILE — HOMEPAGE
      Ciblage uniquement via la classe JS injectée .mld-logos-banner
      ou via la classe manuelle .mld-hide-mobile-banner à ajouter
      dans Oxygen Builder sur le bandeau cible.
      AUCUN sélecteur nth-of-type pour éviter tout effet de bord.
   ---------------------------------------------------------- */
@media (max-width: 768px) {
  body.home .mld-logos-banner,
  body.home .mld-hide-mobile-banner {
    display: none !important;
    visibility: hidden !important;
  }
}
