/* Styles pour la shadowbox */
#search-shadowbox {
  display: none; /* Par défaut, caché */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

#search-shadowbox.active {
  display: flex; /* Affiche la shadowbox lorsqu'elle est active */
}

.shadowbox-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
}

.shadowbox-content {
  position: relative;
  background: #fff;
  padding: 50px;
  max-width: 600px;
  width: 90%;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  z-index: 10001;
}

.shadowbox-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
}

#search-icon button {
  background: none;
  border: none;
  cursor: pointer;
  display: block;
  margin: 0;
  padding: 0;
}

#search-icon .dashicons-search {
  font-size: 32px;
  color: #000000;
  width: 100%;
  height: 100%;
}

/* Position de la loupe en mobile */
@media screen and (max-width: 1100px) {
  #search-icon .dashicons-search {
    font-size: 26px;
  }

  #search-icon {
    position: fixed;
    top: 10px; /* Ajustez l'espacement par rapport au haut */
    right: 60px; /* Ajustez l'espacement par rapport à la droite */
    z-index: 9999;
    background-color: white; /* Optionnel : ajouter une couleur de fond */
    border-radius: 50%; /* Optionnel : style arrondi */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Optionnel : ombre */
    width: 40px;
    height: 40px;
    box-sizing: border-box; /* Opera/IE 8+ */
    -moz-box-sizing: border-box; /* Firefox, autres Gecko */
    -webkit-box-sizing: border-box; /* Safari/Chrome, autres WebKit */
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* Ajout d'animations */
.shadowbox-content {
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Formulaire de recherche minimaliste */
.custom-search-form {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 500px;
  margin: 0 auto;
  border: 1px solid #ccc;
  border-radius: 5px;
  overflow: hidden;
}

.custom-search-input {
  flex: 1;
  padding: 10px 15px;
  border: none;
  font-size: 16px;
  outline: none;
}

.custom-search-button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 15px;
  background-color: #000; /* Fond noir */
  color: #fff; /* Icône blanche */
  border: none;
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.3s ease;
}

.custom-search-button:hover {
  background-color: #333; /* Gris foncé au survol */
}

.custom-search-button svg {
  width: 20px;
  height: 20px;
  stroke: #fff; /* Couleur blanche pour l'icône */
}

/* Accessibilité pour les lecteurs d'écran */
.screen-reader-text {
  position: absolute;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  width: 1px;
  overflow: hidden;
  white-space: nowrap;
}



/* Alignement du bouton de recherche dans le menu */
.menu-item.search-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 10px; /* Espacement avec les autres éléments du menu */
}

.menu-item.search-icon button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.menu-item.search-icon .dashicons-search {
  font-size: 24px; /* Taille ajustée pour le menu */
  color: #333; /* Couleur de l'icône dans le menu */
  transition: color 0.3s ease;
}

.menu-item.search-icon button:hover .dashicons-search {
  color: #0073aa; /* Couleur au survol */
}