/* =========================================================
   Personnalisation des couleurs
   Modifie uniquement les valeurs ci-dessous.
   ========================================================= */
:root {
  /* Bouton flottant */
  --fs-button-bg: #bbc935;       /* fond du bouton flottant */
  --fs-button-color: #45515b;    /* couleur de la loupe      */

  /* Bouton « Rechercher » dans la modale */
  --fs-submit-bg: #0062cc;       /* fond                     */
  --fs-submit-bg-hover: #004f9e; /* fond au survol           */
  --fs-submit-color: #fff;       /* texte                    */

  /* Bouton du shortcode [barre_de_recherche] */
  --fs-bar-bg: transparent;          /* fond                     */
  --fs-bar-bg-hover: rgba(255,255,255,0.14);    /* fond au survol           */
  --fs-bar-color: #0185af;          /* texte + loupe            */
}

.floating-search-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--fs-button-bg, #bbc935);
  color: var(--fs-button-color, #45515b);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  z-index: 999;
  transition: transform 0.2s;
}

.floating-search-button:hover {
  transform: scale(1.1);
}

.floating-search-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.floating-search-modal.active {
  display: flex;
}

.floating-search-modal-content {
  background: #fff;
  padding: 30px;
  border-radius: 8px;
  width: 90%;
  max-width: 600px;
  position: relative;
}

.floating-search-close {
  position: absolute;
  top: 10px;
  right: 10px;
  border: none;
  background: none;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 5px;
}

.search-form {
  display: flex;
  gap: 10px;
}

.search-field {
  flex: 1;
  padding: 10px;
  /* RGAA 3.2 : bordure ≥ 3:1 sur fond blanc (#949494 ≈ 3:1) */
  border: 1px solid #949494;
  border-radius: 4px;
  font-size: 16px;
}

.search-submit {
  padding: 10px 20px;
  /* RGAA 3.2 : texte blanc sur ce bleu ≈ 5,8:1 (#007bff échouait à ~3,9:1) */
  background: var(--fs-submit-bg, #0062cc);
  color: var(--fs-submit-color, #fff);
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.search-submit:hover {
  background: var(--fs-submit-bg-hover, #004f9e);
}

/* RGAA 10.7 : indicateur de prise de focus visible et explicite */
.floating-search-button:focus-visible,
.floating-search-close:focus-visible,
.search-field:focus-visible,
.search-submit:focus-visible,
.ricom-search-form__submit:focus-visible {
  outline: 2px solid #45515b;
  outline-offset: 2px;
}

/* =========================================================
   Bouton du shortcode [barre_de_recherche]
   Ces règles prennent la main sur le style du thème pour ce bouton.
   ========================================================= */

.ricom-search-form input {
  font-size: 22px;
  border: 0;
    border-bottom-width: 0px;
    border-bottom-style: none;
    border-bottom-color: currentcolor;
  border-bottom: 1px solid var(--couleur4);
  background: transparent;
  padding: 35px 0px 15px 15px;
}

.ricom-search-form__submit {
  padding: 5px;
  background: var(--fs-bar-bg, transparent);
  color: var(--fs-bar-color, #fff);
  border-radius: 40px;
  cursor: pointer;
    border: 2px solid transparent;
}U

.ricom-search-form__submit:hover {
  background: var(--fs-bar-bg-hover, #004f9e);
    border: 2px solid var(--fs-bar-color, #fff);
}

/* Variante icône : centre la loupe (qui hérite de --fs-bar-color via currentColor) */
.ricom-search-form__submit--icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
    bottom: 15px;
  position: absolute;
}

@media(max-width:680px){
    .ricom-search-form__field {
  max-width: 85%;
  font-size: 18px !important;
}
    .ricom-search-form__submit--icon {
  bottom: 7px;
}
}

/* Respect de la préférence « mouvement réduit » */
@media (prefers-reduced-motion: reduce) {
  .floating-search-button {
    transition: none;
  }
  .floating-search-button:hover {
    transform: none;
  }
}
