/* Custom select Keytech — remplace l’apparence native */

.kt-cs {
  position: relative;
  display: block;
  width: 100%;
  font-family: "Montserrat", "IBM Plex Sans", sans-serif;
}

.kt-cs__native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.kt-cs__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(30, 43, 80, 0.14);
  border-radius: 12px;
  background: #fff;
  color: var(--kt-header-bg, #1e2b50);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.kt-cs__trigger:hover {
  border-color: rgba(0, 24, 180, 0.35);
}

.kt-cs.is-open .kt-cs__trigger,
.kt-cs__trigger:focus-visible {
  outline: none;
  border-color: var(--kt-green, #00ae01);
  box-shadow: 0 0 0 3px rgba(0, 174, 1, 0.16);
}

.kt-cs.is-invalid .kt-cs__trigger {
  border-color: #c53030;
  box-shadow: 0 0 0 3px rgba(197, 48, 48, 0.12);
}

.kt-cs__label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kt-cs__label.is-placeholder {
  color: #8a95a3;
  font-weight: 500;
}

.kt-cs__chevron {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  opacity: 0.65;
  transition: transform 0.2s ease;
}

.kt-cs.is-open .kt-cs__chevron {
  transform: rotate(-135deg) translateY(-1px);
}

.kt-cs__menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 10100;
  max-height: min(280px, 50vh);
  margin: 0;
  padding: 6px;
  overflow: auto;
  list-style: none;
  border-radius: 14px;
  border: 1px solid rgba(30, 43, 80, 0.1);
  background: #fff;
  box-shadow: 0 16px 40px rgba(16, 24, 48, 0.16);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  pointer-events: none;
  transition:
    opacity 0.18s ease,
    transform 0.18s ease,
    visibility 0.18s ease;
}

.kt-cs.is-open .kt-cs__menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.kt-cs__option {
  display: block;
  width: 100%;
  padding: 11px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--kt-header-bg, #1e2b50);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.kt-cs__option:hover,
.kt-cs__option.is-active {
  background: rgba(0, 24, 180, 0.06);
}

.kt-cs__option.is-selected {
  background: rgba(0, 174, 1, 0.1);
  color: var(--kt-green, #00ae01);
}

.kt-cs__option:disabled,
.kt-cs__option.is-disabled {
  opacity: 0.45;
  cursor: default;
}

/* Variante barre de recherche header — plat, blanc, pas de pastille verte */
.kt-search__univers {
  position: relative;
  z-index: 2;
}

.kt-search__univers .kt-cs {
  height: 100%;
  width: 100%;
}

.kt-search__univers .kt-cs__trigger {
  position: relative;
  height: 100%;
  min-height: 48px;
  padding: 0 2.1rem 0 1rem;
  border: 0 !important;
  border-radius: 999px 0 0 999px !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #1b2430 !important;
}

.kt-search__univers .kt-cs.is-open .kt-cs__trigger,
.kt-search__univers .kt-cs__trigger:hover,
.kt-search__univers .kt-cs__trigger:focus,
.kt-search__univers .kt-cs__trigger:focus-visible,
.kt-search__univers .kt-cs__trigger:active {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  color: #1b2430 !important;
}

.kt-search__univers .kt-cs__label,
.kt-search__univers .kt-cs__label.is-placeholder {
  color: #1b2430 !important;
  font-weight: 700;
  opacity: 1;
}

.kt-search__univers .kt-cs__chevron {
  position: absolute;
  right: 0.85rem;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-top: -5px;
  color: #1b2430;
  opacity: 0.7;
}

.kt-search__univers .kt-cs__menu {
  top: calc(100% + 12px);
  left: 0;
  right: auto;
  min-width: 240px;
  width: max(100%, 260px);
  z-index: 2147483000;
  text-transform: none;
}

/* Portail body : au-dessus de la barre de menu navy */
.kt-cs__menu.is-portal {
  position: fixed !important;
  right: auto !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
  pointer-events: auto !important;
  z-index: 2147483000 !important;
}

/* Panneau univers / résultats : bande top au-dessus de la nav */
.kt-header-top:has(.kt-cs.is-open),
.kt-header-top:has(.kt-search__results:not([hidden])) {
  z-index: 20;
}

.kt-search__univers .kt-cs__option {
  text-transform: none;
  font-size: 13px;
  color: #1b2430;
}

.kt-search__univers .kt-cs__option.is-selected {
  background: rgba(30, 43, 80, 0.06);
  color: #1b2430;
}

.kt-search__univers .kt-cs__option:hover,
.kt-search__univers .kt-cs__option.is-active {
  background: rgba(0, 24, 180, 0.07);
  color: var(--kt-blue, #0018b4);
}

/* Plus besoin du chevron CSS natif */
.kt-search__univers:has(.kt-cs)::after,
.kt-search__univers::after {
  display: none !important;
}

/* Variante page recherche */
.kt-search-page-form .kt-cs__trigger {
  min-height: 48px;
  background: #f8fafc;
}

.kt-search-page-form .kt-cs.is-open .kt-cs__trigger,
.kt-search-page-form .kt-cs__trigger:focus-visible {
  background: #fff;
}

/* Variante champs modal devis */
.kt-devis__field .kt-cs__trigger {
  background: #fff;
}
