/* Ecolodève — Contact Form 7 and specific forms */
/* ============================================================
   ECOLODEVE — FORMATION ENDUITS TERRE
   CONTACT FORM 7 — RESPONSIVE
   Ajout à la fin du CSS existant
   Aucun impact hors .eco-form
   ============================================================ */

.eco-form,
.eco-form *,
.eco-form *::before,
.eco-form *::after{
  box-sizing:border-box !important;
}

.eco-form{
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
  overflow:hidden !important;
}

.eco-form .wpcf7,
.eco-form .wpcf7-form{
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
}

/* ---------- Structure du formulaire ---------- */

.eco-form .wpcf7-form p{
  width:100% !important;
  max-width:100% !important;
  margin-left:0 !important;
  margin-right:0 !important;
}

.eco-form .wpcf7-form label,
.eco-form .wpcf7-form-control-wrap{
  display:block !important;
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
}

/* ---------- Champs ---------- */

.eco-form input[type="text"],
.eco-form input[type="email"],
.eco-form input[type="tel"],
.eco-form input[type="url"],
.eco-form input[type="number"],
.eco-form input[type="date"],
.eco-form input[type="time"],
.eco-form select,
.eco-form textarea{
  display:block !important;
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
  box-sizing:border-box !important;
}

.eco-form textarea{
  resize:vertical !important;
}

.eco-form .wpcf7-form-control{
  max-width:100% !important;
}

/* ---------- Cases à cocher / boutons radio ---------- */

.eco-form .wpcf7-checkbox,
.eco-form .wpcf7-radio{
  display:flex !important;
  flex-direction:column !important;
  align-items:flex-start !important;
  gap:8px !important;
  width:100% !important;
  max-width:100% !important;
}

.eco-form .wpcf7-list-item{
  display:block !important;
  width:100% !important;
  max-width:100% !important;
  margin:0 !important;
}

.eco-form .wpcf7-list-item label{
  display:flex !important;
  flex-direction:row !important;
  align-items:flex-start !important;
  gap:8px !important;
  width:100% !important;
}

.eco-form input[type="checkbox"],
.eco-form input[type="radio"]{
  flex:0 0 auto !important;
  width:auto !important;
  max-width:none !important;
  margin-top:4px !important;
}

/* ---------- Bouton d'envoi ---------- */

.eco-form input[type="submit"],
.eco-form button[type="submit"]{
  max-width:100% !important;
  box-sizing:border-box !important;
}

/* ---------- Messages Contact Form 7 ---------- */

.eco-form .wpcf7-response-output,
.eco-form .wpcf7-not-valid-tip{
  max-width:100% !important;
  overflow-wrap:break-word !important;
}

.eco-form .wpcf7-response-output{
  width:100% !important;
  margin-left:0 !important;
  margin-right:0 !important;
  box-sizing:border-box !important;
}

/* ============================================================
   MOBILE — FORMULAIRE FORMATION
   ============================================================ */

@media (max-width:768px){

  body:has(.eco-form){
    overflow-x:hidden !important;
  }

  .entry-content:has(.eco-form),
  .wp-block-post-content:has(.eco-form),
  .site-content:has(.eco-form),
  .content-area:has(.eco-form),
  main:has(.eco-form){
    max-width:100% !important;
    overflow-x:hidden !important;
  }

  .eco-form{
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    padding:16px !important;
    overflow-x:hidden !important;
  }

  .eco-form .wpcf7,
  .eco-form .wpcf7-form,
  .eco-form .wpcf7-form > p,
  .eco-form .wpcf7-form-control-wrap{
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
  }

  .eco-form input[type="text"],
  .eco-form input[type="email"],
  .eco-form input[type="tel"],
  .eco-form input[type="url"],
  .eco-form input[type="number"],
  .eco-form input[type="date"],
  .eco-form input[type="time"],
  .eco-form select,
  .eco-form textarea{
    display:block !important;
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    font-size:16px !important;
  }

  .eco-form textarea{
    min-height:130px !important;
  }

  .eco-form input[type="submit"],
  .eco-form button[type="submit"]{
    display:block !important;
    width:100% !important;
    max-width:100% !important;
    margin-left:0 !important;
    margin-right:0 !important;
    text-align:center !important;
  }

  .eco-form .wpcf7-checkbox,
  .eco-form .wpcf7-radio{
    width:100% !important;
    max-width:100% !important;
  }

  .eco-form .wpcf7-list-item{
    white-space:normal !important;
  }

  .eco-form .wpcf7-list-item-label{
    white-space:normal !important;
    overflow-wrap:break-word !important;
    word-break:normal !important;
  }
}

