.ksc-widget {
  padding: 1rem 1.25rem 1.1rem;
  background: rgb(255, 255, 255);
  border-radius: 0.5rem;
  box-shadow: 0 12px 30px rgba(16, 31, 53, 0.08);
  position: relative;
  z-index: 9;
  margin-bottom: 2rem;
  width: 75%;
  margin: -2rem auto 1rem auto;
}

.ksc-widget__title {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.85rem;
}

.ksc-widget__title h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1d2a3b;
}

.ksc-widget__icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #0f2742;
}

.ksc-widget__icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.ksc-widget__grid {
  display: grid;
  grid-template-columns:
    minmax(0, 1.15fr) minmax(0, 1.15fr) minmax(0, 1.15fr)
    auto;
  gap: 1rem;
  align-items: center;
}

.ksc-combobox {
  position: relative;
}

.ksc-combobox__control {
  position: relative;
}

.ksc-combobox__input {
  min-height: 46px;
  width: 100%;
  padding: 0 2.8rem 0 1rem;
  border: 1px solid #d7dfe8;
  border-radius: 999px;
  background: #fff;
  color: #1d2a3b;
  box-shadow: none;
}

.ksc-combobox__input::placeholder {
  color: #334155;
  opacity: 1;
}

.ksc-combobox__toggle {
  position: absolute;
  top: 50%;
  right: 0.75rem;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  background: transparent;
  transform: translateY(-50%);
  cursor: pointer;
}

.ksc-combobox__loader {
  position: absolute;
  top: 50%;
  right: 0.85rem;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  border: 2px solid rgba(16, 40, 67, 0.18);
  border-top-color: #102843;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.85);
  transition: opacity 0.18s ease;
}

.ksc-combobox__toggle::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  border-right: 1.5px solid #3f5063;
  border-bottom: 1.5px solid #3f5063;
  transform: translate(-50%, -70%) rotate(45deg);
}

.ksc-combobox.is-loading .ksc-combobox__loader {
  opacity: 1;
  animation: ksc-spin 0.7s linear infinite;
}

.ksc-combobox.is-loading .ksc-combobox__toggle {
  opacity: 0;
}

.ksc-combobox.is-loading .ksc-combobox__input {
  padding-right: 2.9rem;
  background: linear-gradient(90deg, rgba(255, 255, 255, 1) 0%, rgba(246, 249, 252, 1) 100%);
}

.ksc-combobox__dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 30;
  display: none;
  background: #fff;
  border: 1px solid #d7dfe8;
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(16, 31, 53, 0.14);
  overflow: hidden;
}

.ksc-combobox.is-open .ksc-combobox__dropdown {
  display: block;
}

.ksc-combobox.is-open .ksc-combobox__input {
  border-color: #8bb5ff;
  box-shadow: 0 0 0 3px rgba(139, 181, 255, 0.18);
}

.ksc-combobox__options {
  max-height: 260px;
  margin: 0;
  padding: 0.4rem 0;
  list-style: none;
  overflow-y: auto;
}

.ksc-combobox__option {
  padding: 0.7rem 0.9rem;
  color: #1d2a3b;
  cursor: pointer;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}

.ksc-combobox__option:hover,
.ksc-combobox__option.is-selected {
  background: #102843;
  color: #fff;
}

.ksc-combobox__empty {
  display: block;
  padding: 0.8rem 0.9rem;
  color: #6c7a89;
}

.ksc-combobox__empty[hidden] {
  display: none;
}

.ksc-combobox--disabled .ksc-combobox__input {
  background: #f5f7fa;
  color: #8a95a3;
  cursor: not-allowed;
}

.ksc-combobox--disabled .ksc-combobox__input::placeholder {
  color: #8a95a3;
}

.ksc-combobox--disabled .ksc-combobox__toggle {
  cursor: not-allowed;
  opacity: 0.5;
}

.ksc-combobox--disabled.is-loading .ksc-combobox__toggle {
  opacity: 0;
}

.ksc-widget__submit {
  min-height: 46px;
  padding: 0 1.45rem;
  border: 0;
  border-radius: 999px;
  background: #102843;
  color: #fff;
  font-weight: 600;
  white-space: nowrap;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.ksc-widget__submit:hover:not(:disabled) {
  opacity: 0.92;
  transform: translateY(-1px);
}

.ksc-widget__submit:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.ksc-widget__source {
  display: none;
}

.ksc-front__links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
  list-style: none;
  padding: 0;
}

.ksc-front__links a {
  display: block;
  padding: 0.9rem 1rem;
  background: #faf7f2;
  border: 1px solid #e5ddd2;
  border-radius: 10px;
}

@media (max-width: 900px) {
  .ksc-widget__grid {
    grid-template-columns: 1fr;
  }

  .ksc-widget__submit {
    width: 100%;
  }
}

@keyframes ksc-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* Croix de réinitialisation par champ (apparaît quand le champ a une valeur) */
.ksc-combobox__clear {
  position: absolute;
  top: 50%;
  right: 2.25rem;
  transform: translateY(-50%);
  display: none;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(16, 40, 67, 0.08);
  color: #3f5063;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.ksc-combobox__clear:hover {
  background: rgba(16, 40, 67, 0.16);
  color: #102843;
}
.ksc-combobox.has-value .ksc-combobox__clear {
  display: flex;
}
.ksc-combobox.has-value .ksc-combobox__input {
  padding-right: 3.7rem;
}
.ksc-combobox.is-loading .ksc-combobox__clear,
.ksc-combobox--disabled .ksc-combobox__clear {
  display: none !important;
}

/* Filtres cliquables (modèles / types) sur la page compatibilité */
.ksc-front__filters {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 0.75rem;
  margin: 1rem 0 1.25rem;
}

.ksc-front__filters-label {
  font-weight: 600;
  color: #1d2a3b;
}

.ksc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ksc-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.9rem;
  background: #fff;
  border: 1px solid #d7dfe8;
  border-radius: 999px;
  color: #102843;
  font-weight: 600;
  font-size: 0.92rem;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease,
    transform 0.15s ease, box-shadow 0.15s ease;
}

.ksc-chip::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  opacity: 0.45;
  transition: opacity 0.15s ease;
}

.ksc-chip:hover,
.ksc-chip:focus-visible {
  background: #102843;
  border-color: #102843;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(16, 40, 67, 0.16);
}

.ksc-chip:hover::after,
.ksc-chip:focus-visible::after {
  opacity: 1;
}

.ksc-chip.is-active {
  background: #102843;
  border-color: #102843;
  color: #fff;
}

/* Bouton "Voir plus (X)" / "Voir moins" */
.ksc-chips__more-item {
  display: inline-flex;
}

.ksc-chip--more {
  font-family: inherit;
  background: #eef2f7;
  border-color: #cbd5e1;
  color: #102843;
}

.ksc-chip--more::after {
  content: none;
}

.ksc-chip--more:hover,
.ksc-chip--more:focus-visible {
  background: #102843;
  border-color: #102843;
  color: #fff;
}
