/* Custom Select Styles - Réutilisable */
.custom-select-container {
  position: relative;
  display: inline-block;
  width: 100%;
  margin-bottom: var(--gap-s, 1.25rem);
}
.custom-select-growing-parent.open {
  background: var(--blanc);
  color: var(--primary);
}
.custom-select-button {
  position: relative;
  font-size: 1rem;
  font-style: normal;
  font-weight: 700;
  line-height: 1rem; /* 100% */
  text-transform: uppercase;
  width: 100%;
  padding: var(--gap-s, 1.25rem);
  border-radius: var(--gap-xs, 0.625rem);
  border: 1px solid var(--blanc);
  appearance: none;
  background: none;
  color: var(--blanc);
  padding-right: 3em;
}
.custom-select-button:after {
  background: url("../../images/custom/select.svg") no-repeat center;
  content: "";
  position: absolute;
  top: vaar(--gaps-xs);
  right: 10px;
  width: 1.25rem;
  height: 1.25rem;
  transition: transform 0.2s ease;
  transform-origin: center;
  transform: rotate(0deg);
}

.custom-select-growing-parent.open .custom-select-button {
  border-radius: var(--gap-xs) var(--gap-xs) 0 0;
}
.custom-select-growing-parent.open .custom-select-button:after {
  transform: rotate(180deg);
}
.custom-select-dropdown {
  width: 100%;
  /*position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: #fff;
  border: 1px solid var(--blanc);
  border-top: none;
  z-index: 1000;
  max-height: 200px;
  overflow-y: auto;*/

  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  display: none;
  align-items: flex-start;
  gap: 15px;
  flex-wrap: wrap;
}

.custom-select-growing-parent.open .custom-select-dropdown {
  display: flex;
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}
.custom-select-growing-parent.open #titre_besoins {
  color: var(--primary);
}
.custom-select-growing-parent.open .custom-select-button,
.custom-select-growing-parent.open .custom-select-option:first-child {
  display: none;
}
.custom-select-option {
  padding: 10px 15px;
  min-height: 60px;
  transition: background-color 0.2s;
  cursor: pointer;
  background: var(--blanc);
  border-radius: 5px;
  border: 1px solid var(--primary);
  color: var(--primary);
  display: flex;
  align-items: center;
}
@media (min-width: 980px) {
  .custom-select-option {
    width: calc((100% - 15px) / 2);
  }
}

.custom-select-option:hover {
  background-color: #cecfec;
}

.custom-select-option.selected {
  background-color: var(--primary);
  color: var(--blanc);
}

/* Cache le select original sur desktop uniquement */
@media (min-width: 769px) {
  .custom-select-target {
    display: none !important;
  }
}

/* Assure que le select custom n'apparaît que sur desktop */
@media (max-width: 768px) {
  .custom-select-container {
    display: none !important;
  }
}
