/* FEF Annuaire v0.3. Isoler tous les correctifs à la page d'accueil de l'annuaire.
 * Ne pas changer les styles des cartes, des résultats ou des autres facettes.
 */
.bsald-page section.hero .home-form {
  color: #242424 !important;
}
.bsald-page section.hero .home-form .wpgb-facet,
.bsald-page section.hero .home-form .wpgb-facet > fieldset {
  opacity: 1 !important;
  visibility: visible !important;
}
.bsald-page section.hero .home-form .wpgb-facet-title,
.bsald-page section.hero .home-form .wpgb-checkbox-label,
.bsald-page section.hero .home-form .wpgb-facet legend {
  color: #242424 !important;
}
.bsald-page section.hero .home-form .wpgb-facet input[type="search"],
.bsald-page section.hero .home-form .wpgb-facet select.wpgb-select {
  background: #fff !important;
  color: #272727 !important;
  border: 1px solid #aaa !important;
  border-radius: 30px !important;
  box-shadow: none !important;
  font: 500 15px/1.4 'Raleway', sans-serif !important;
  width: 100%;
  max-width: 100%;
  min-height: 50px;
}
.bsald-page section.hero .home-form .wpgb-facet input[type="search"]::placeholder {
  color: #666 !important;
  opacity: 1;
}
/* Les petites images de recherche sont rendues comme des disques noirs lorsque
 * leurs règles SVG héritées du thème ne sont plus compatibles. */
.bsald-page section.hero .home-form .wpgb-input-icon,
.bsald-page section.hero .home-form .wpgb-geolocation-input > label > svg,
.bsald-page section.hero .home-form .wpgb-locate-button svg,
.bsald-page section.hero .home-form button.wpgb-reset svg {
  display: none !important;
}
/* Boutons « Effacer » et « Localisez-moi » : leur texte accessible reste
 * disponible aux lecteurs d'écran; un libellé visuel est injecté par JS. */
.bsald-page section.hero .home-form button.wpgb-reset,
.bsald-page section.hero .home-form button.wpgb-locate-button {
  box-sizing: border-box !important;
  background: #e87473 !important;
  border: 2px solid #e87473 !important;
  border-radius: 28px !important;
  color: #fff !important;
  cursor: pointer;
  height: 46px !important;
  min-height: 46px !important;
  min-width: 112px;
  padding: 0 20px !important;
  font-size: 0 !important;
  line-height: normal !important;
  text-indent: 0 !important;
  transform: none !important;
  box-shadow: none !important;
}
.bsald-page section.hero .home-form button.wpgb-reset:hover,
.bsald-page section.hero .home-form button.wpgb-locate-button:hover {
  background: #cc6160 !important;
  border-color: #cc6160 !important;
}
.bsald-page section.hero .home-form button.wpgb-reset .fef-visible-button-label,
.bsald-page section.hero .home-form button.wpgb-locate-button .fef-visible-button-label {
  display: inline !important;
  position: static !important;
  overflow: visible !important;
  clip: auto !important;
  clip-path: none !important;
  width: auto !important;
  height: auto !important;
  color: #fff !important;
  font: 700 15px/1.3 'Raleway', sans-serif !important;
  white-space: nowrap;
}
.bsald-page section.hero .home-form button.wpgb-reset { display: inline-flex !important; align-items: center; justify-content: center; margin-top: 8px; }
.bsald-page section.hero .home-form button.wpgb-locate-button {
  position: static !important;
  width: auto !important;
  max-height: none !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  margin: 0 !important;
  flex-shrink: 0;
}
.bsald-page section.hero .home-form .wpgb-geolocation-input {
  display: flex !important;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  position: relative;
}
.bsald-page section.hero .home-form .wpgb-geolocation-input > label {
  display: block;
  flex: 0 1 340px;
  min-width: 180px;
  margin: 0;
  position: relative;
}
.bsald-page section.hero .home-form .wpgb-geolocation-input input[type="search"] {
  padding-left: 18px !important;
  padding-right: 18px !important;
}
.bsald-page section.hero .home-form .wpgb-geolocation-input .wpgb-geo-radius { display: none !important; }
/* Vraies cases à cocher, pas les barres verticales provoquées par les styles concurrents. */
.bsald-page section.hero .home-form .wpgb-checkbox {
  display: flex !important;
  align-items: center !important;
  gap: 10px;
  min-height: 27px;
}
.bsald-page section.hero .home-form .wpgb-checkbox-control {
  display: inline-flex !important;
  width: 19px !important;
  height: 19px !important;
  min-width: 19px !important;
  min-height: 19px !important;
  border: 2px solid #858585 !important;
  border-radius: 5px !important;
  background: #fff;
  vertical-align: middle;
}
.bsald-page section.hero .home-form .wpgb-facet ul,
.bsald-page section.hero .home-form .wpgb-facet li {
  list-style: none !important;
  padding-left: 0;
}
/* Éviter qu'un style très large réaffiche les textes destinés aux lecteurs d'écran. */
.bsald-page .wpgb-sr-only,
.bsald-page .screen-reader-text {
  border: 0 !important;
  clip: rect(1px, 1px, 1px, 1px) !important;
  clip-path: inset(50%) !important;
  height: 1px !important;
  width: 1px !important;
  margin: -1px !important;
  overflow: hidden !important;
  padding: 0 !important;
  position: absolute !important;
  white-space: nowrap !important;
}
/* Composition du formulaire sur grand écran. L'ordre WPGB d'origine est préservé. */
@media (min-width: 1024px) {
  .bsald-page section.hero .home-form.row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 19px 30px;
    padding: 30px 38px 32px !important;
    margin: 30px 0 !important;
    align-items: start;
  }
  .bsald-page section.hero .home-form.row > .wpgb-facet {
    flex: none !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0;
    margin: 0 !important;
    padding: 0 !important;
  }
  .bsald-page section.hero .home-form.row > .wpgb-facet:nth-child(3) { grid-column: 1 / -1; }
  .bsald-page section.hero .home-form.row > .wpgb-facet:nth-child(6) {
    grid-column: 1 / -1;
    justify-self: end;
  }
  .bsald-page section.hero .home-form .wpgb-facet.wpgb-submit button {
    margin: 0 !important;
    transform: none !important;
    padding: 12px 32px !important;
  }
}
@media (max-width: 1023px) {
  .bsald-page section.hero .home-form .wpgb-geolocation-input > label { flex: 1 1 230px; }
}
/* Choix géographiques : sous la ligne de saisie, pas sur toute la largeur du cadre. */
.bsald-page .wpgb-geolocation-input .fef-geo-suggestions {
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  width: min(375px, calc(100vw - 45px));
  max-height: 260px;
  overflow-y: auto;
  margin: 0;
  padding: 4px;
  list-style: none;
  background: #fff;
  color: #272727;
  border: 1px solid #ddd;
  border-radius: 12px;
  box-shadow: 0 8px 24px #0003;
  z-index: 10050;
}
.bsald-page .fef-geo-suggestions:empty { display: none; }
.bsald-page .fef-geo-suggestions li { list-style: none !important; }
.bsald-page .fef-geo-suggestions .fef-geo-choice,
.bsald-page .fef-geo-suggestions .fef-geo-info {
  display: block;
  margin: 0;
  color: #272727;
  font-size: 14px;
  line-height: 1.4;
  padding: 10px 12px;
  overflow-wrap: anywhere;
}
.bsald-page .fef-geo-suggestions .fef-geo-choice { cursor: pointer; }
.bsald-page .fef-geo-suggestions .fef-geo-choice:hover,
.bsald-page .fef-geo-suggestions .fef-geo-choice[aria-selected="true"] { background: #f3f3f3; border-radius: 8px; }
.bsald-page .fef-geo-suggestions .fef-geo-attribution {
  color: #666;
  font-size: 11px;
  text-align: right;
  padding: 5px 10px;
}

/* v0.4 : véritable bouton Effacer de la facette « Quoi ? » identifié
 * par son icône SVG ; garder ses gestionnaires WP Grid Builder intacts. */
.bsald-page section.hero .home-form button.fef-annuaire-clear-button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  background: #e87473 !important;
  border: 2px solid #e87473 !important;
  border-radius: 28px !important;
  color: #fff !important;
  min-width: 112px !important;
  width: auto !important;
  height: 46px !important;
  padding: 0 20px !important;
  margin-top: 8px !important;
  text-indent: 0 !important;
  cursor: pointer;
}
.bsald-page section.hero .home-form button.fef-annuaire-clear-button svg {
  display: none !important;
}
.bsald-page section.hero .home-form button.fef-annuaire-clear-button .fef-visible-button-label {
  display: inline !important;
  position: static !important;
  clip: auto !important;
  clip-path: none !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  color: #fff !important;
  font: 700 15px/1.3 'Raleway', sans-serif !important;
  white-space: nowrap !important;
}
