/*
 * Pradimmo - design des formulaires Bit Form (forms 2 a 7)
 * 2026-11-17 : reprise de l'ancien design (Bit Form v1 : classes .fld-N / .btcd-*, regles du CSS personnalise Oxygen
 * "universal.css" + styles v1 de form-styles-v1/bitform-N.css) vers les classes de Bit Form v2/3.x (.bf-*, ._frm-bN).
 * Apres la migration v1 -> v2, les anciennes regles ne s'appliquaient plus et le style par defaut de Bit Form s'affichait.
 * Annuler : retirer l'enqueue "ydu-bitform-design" dans public/public_functions.php.
 */

/* ---------- Carte du formulaire ---------- */
._frm-bg-b2, ._frm-bg-b3, ._frm-bg-b4, ._frm-bg-b5, ._frm-bg-b6, ._frm-bg-b7 {
  background-color: #fff;
}
._frm-bg-b5, ._frm-bg-b6, ._frm-bg-b7 { border-radius: 10px; }
._frm-bg-b2, ._frm-bg-b3, ._frm-bg-b4 { border-radius: 0; }

._frm-b2.bf-form, ._frm-b3.bf-form, ._frm-b4.bf-form { padding: 30px !important; }
._frm-b5.bf-form, ._frm-b7.bf-form { padding: 60px !important; }
._frm-b6.bf-form { padding: 0 !important; }
@media only screen and (max-width: 600px) {
  ._frm-b5.bf-form, ._frm-b7.bf-form { padding: 30px 20px !important; }
}
._frm-b6.bf-form { column-gap: 30px; }
.tabs-contents-4426-tab .bf-form { column-gap: 120px; row-gap: 40px; }

/* ---------- Champs ---------- */
.bf-form .bf-fld-wrp { color: #231f20; }
._frm-b2 .bf-fld-wrp, ._frm-b3 .bf-fld-wrp, ._frm-b4 .bf-fld-wrp, ._frm-b6 .bf-fld-wrp, ._frm-b7 .bf-fld-wrp { padding: 0 !important; }
.bf-form .bf-button-field.bf-fld-wrp { padding: 0 !important; }

/* Libelles masques (le placeholder fait office de libelle) */
._frm-b2 .bf-lbl-wrp, ._frm-b3 .bf-lbl-wrp, ._frm-b4 .bf-lbl-wrp, ._frm-b6 .bf-lbl-wrp,
.bf7-8-lbl-wrp { display: none !important; }

/* Champs texte / email / textarea : soulignes, sans fond */
.bf-form input.bf-fld, .bf-form textarea.bf-fld {
  background-color: transparent !important;
  border-color: #939598 !important;
  border-radius: 0 !important;
  border-style: solid !important;
  border-width: 0 0 1px 0 !important;
  box-shadow: none !important;
  font-family: 'Work Sans', sans-serif;
  font-size: 15px !important;
  color: rgba(0, 0, 0, 1) !important;
  padding: 10px 10px 10px 0 !important;
  width: 100%;
  max-width: 100%;
  outline: none;
}
.bf-form input.bf-fld { height: 40px; }
.bf-form textarea.bf-fld { min-height: 100px; }
._frm-b7 textarea.bf-fld { height: 140px; }
.bf-form input.bf-fld::placeholder, .bf-form textarea.bf-fld::placeholder {
  color: rgba(64, 64, 64, 1) !important;
  font-family: 'Work Sans', sans-serif;
}
.bf-form input.bf-fld:hover, .bf-form textarea.bf-fld:hover,
.bf-form input.bf-fld:focus, .bf-form textarea.bf-fld:focus {
  border-color: #939598 !important;
  box-shadow: none !important;
}

/* Liste deroulante (ex. champ "Objet") : ferme = souligne ; ouvert = panneau blanc par-dessus le contenu.
 * (.bf-dpd-fld-wrp est aussi le panneau deroulant : il doit garder un fond opaque.) */
.bf-form .bf-dpd-fld-wrp {
  background-color: #fff !important;
  border-color: #939598 !important;
  border-radius: 0 !important;
  border-style: solid !important;
  border-width: 0 0 1px 0 !important;
  box-shadow: none !important;
}
.bf-form .bf-dpd-fld-wrp:has(.bf-dpd-wrp[aria-expanded="true"]) {
  border-width: 1px !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .15) !important;
}
/* Pas de champ de recherche dans les listes deroulantes (3 options seulement) */
.bf-form .bf-dpd-fld-wrp .bf-option-search-wrp { display: none !important; }
.bf-form .bf-dpd-fld-wrp .bf-option-list li {
  font-family: 'Work Sans', sans-serif;
  font-size: 14px !important;
  color: #231f20 !important;
  cursor: pointer;
}
.bf-form .bf-dpd-fld-wrp .bf-option-list li:hover {
  background-color: #f2f2f2 !important;
}
.bf-form .bf-dpd-wrp {
  background-color: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  font-family: 'Work Sans', sans-serif;
  font-size: 15px;
  color: rgba(64, 64, 64, 1);
  padding: 10px 10px 10px 0 !important;
  min-height: 40px;
}

/* ---------- Cases a cocher ---------- */
.bf-form .bf-cc { margin: 20px 0 0 0; }
.bf-form .bf-bx { border: 1.5px solid #939598 !important; }
.bf-form .bf-ci:checked ~ [data-cl] [data-bx] {
  background: #9E1F23 !important;
  border-color: transparent !important;
}
._frm-b5 .bf-ct, ._frm-b5 .bf-ct * { color: #939598 !important; }
._frm-b6 .bf-ct, ._frm-b6 .bf-ct * { color: #939598 !important; font-size: 10px !important; }

/* ---------- Bouton "Envoyer" ---------- */
.bf-form button.bf-btn {
  font-family: 'Lora', serif;
  color: #231f20 !important;
  font-size: 0.9em !important;
  font-weight: 600 !important;
  font-style: italic;
  position: relative;
  padding: 20px 0 10px 10px !important;
  overflow: hidden;
  background: left center / 0% 100% linear-gradient(#0000 calc(100% - 2px), #9E1F23 calc(100% - 2px)) no-repeat !important;
  transition: all .4s ease;
  display: inline-block;
  width: auto;
  line-height: 1;
  margin: 0;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  cursor: pointer;
}
.bf-form button.bf-btn:hover {
  background-size: 100% 100% !important;
  background-color: transparent !important;
}
.bf-form button.bf-btn::before {
  content: "";
  display: inline-block;
  background-image: url(/wp-content/uploads/2022/02/btn-deco.svg);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: 0% 50%;
  height: 30px;
  width: 30px;
  position: relative;
  top: 8px;
  left: -10px;
  transform: rotate(0deg);
  transition: all .4s ease;
}
.bf-form button.bf-btn:hover::before { transform: rotate(60deg); }

/* ---------- Messages de confirmation / d'erreur (notification en bas a droite, config v1 d'origine) ----------
 * Le JS de Bit Form bascule la classe .deactive <-> .active sur .msg-container-N ; sans CSS, le bloc restait visible
 * sous le formulaire (petit carre parasite). */
.bf-form-wrapper [class*="msg-container-"].deactive { display: none; }
.bf-form-wrapper [class*="msg-container-"].active {
  display: block;
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 2147483000;
  max-width: min(380px, calc(100vw - 40px));
  animation: ydu-bf-msg-in .3s ease;
}
@keyframes ydu-bf-msg-in { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }
.bf-form-wrapper .bf-msg-content {
  position: relative;
  background: #fff;
  color: #231f20;
  font-family: 'Work Sans', sans-serif;
  font-size: 15px;
  line-height: 1.4;
  padding: 16px 44px 16px 20px;
  border-left: 4px solid #9E1F23;
  border-radius: 6px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .18);
}
.bf-form-wrapper .bf-msg-content p { margin: 0; }
.bf-form-wrapper .bf-msg-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  padding: 0;
  background: none;
  border: 0;
  color: #231f20;
  cursor: pointer;
}
.bf-form-wrapper .bf-msg-close svg { width: 14px; height: 14px; }
