#search_widget {
  position: relative;
}
#search_widget .btn {
  padding: 0;
  width: 66px;
  height: 66px;
  aspect-ratio: 1;
  border-radius: 0;
  background-color: var(--color-orange);
  color: #fff;
  position: relative;
}

#search_widget .btn::before {
  content: "";
  inset: 0;
  border: 11px solid #fff;
  position: absolute;
}

#search_widget .input-group-overlay {
  background: #fff;
  border: 2px solid #bcbcbc;
  border-radius: 0;
  align-items: center;
}

#search_widget input {
  all: unset;
  width: 500px;
  flex-shrink: 0;
  border-right: none;
  font-size: 1.3125rem;
  color: #1e1f22;
  box-sizing: border-box;
  border-radius: 0 !important;
  height: 66px;
  padding-left: 11px;
  text-align: left;
  font-weight: 500;
  padding-right: 5px;
}

#search_widget .input-group-overlay:focus-within {
  border-color: var(--color-orange);
}

#search_widget .input-group-overlay:has(input:focus-visible, input:focus) {
  border-color: var(--color-orange);
}

/* Placeholder plus foncé */
#search_widget input::placeholder {
  color: var(--color-grey);
  font-weight: 500;
}

#toggle-search {
  display: none;
  border-radius: 0;
}

.searchbar-autocomplete {
  border-radius: 0;
  color: var(--color-orange) !important;
  max-height: 60vh;
  overflow-y: auto;
  width: 100%;
  overflow-x: hidden;
}

.searchbar-autocomplete::-webkit-scrollbar {
  width: 5px; /* width of the entire scrollbar */
}

.searchbar-autocomplete::-webkit-scrollbar-track {
  border-radius: 0;
}

.searchbar-autocomplete::-webkit-scrollbar-thumb {
  border-radius: 0;
  background-color: var(--color-grey-50);
}

.searchbar-autocomplete .ui-menu-item a {
  padding: 10px 20px;
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--color-orange);
  font-family: var(--font-family-space-grotesk);
  font-size: var(--font-size-body);
  gap: 10px;
  border-radius: 0;
  transition: all 0.2s ease-in-out;
  outline: 2px solid transparent;
  background: none !important;
  line-height: 1;
  border: none !important;
}

.searchbar-autocomplete .ui-menu-item a.ui-state-focus,
.searchbar-autocomplete li.ui-menu-item:focus-visible a {
  outline: 2px solid var(--color-orange);
  border: none !important;
}

.searchbar-autocomplete .autocomplete-thumbnail {
  border-radius: 0;
}

@media screen and (max-width: 992px) {
  #toggle-search {
    display: block;
  }

  #search_widget .input-group-overlay {
    border: none;
  }

  #search_widget {
    position: fixed;
    inset: 0;
    height: 100dvh;
    background-color: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.3s ease-in-out;
    opacity: 0;
    padding: 15px;
    visibility: hidden;
    transform: translateY(-100%);
    margin: 0 !important;
  }

  #search_widget::after {
    content: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJsdWNpZGUgbHVjaWRlLXgiPjxwYXRoIGQ9Ik0xOCA2IDYgMTgiLz48cGF0aCBkPSJtNiA2IDEyIDEyIi8+PC9zdmc+");
    position: absolute;
    bottom: 25px;
    right: 25px;
    line-height: 0;
  }

  #search_widget[aria-expanded="true"] {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: all 0.3s ease-in-out;
  }

  #toggle-search {
    color: #fff;
    padding: 0.75rem;
  }

  #search_widget input {
    width: 50%;
    flex-grow: 1;
  }

  #search_widget form {
    margin-block: 50px;
  }
}
@media(max-width:550px){
  #toggle-search{
    flex: auto;
  }
}