/* Menus déroulants du site (pc_select.js) : bouton pilule + liste au style de la recherche principale */
.pc-select {
  position: relative;
  display: inline-block;
}

.pc-select-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.pc-select-btn {
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0.5rem 2.2rem 0.5rem 0.95rem;
  border: 1px solid var(--pc-color-line, #E2E8F0);
  border-radius: 999px;
  background: #fff url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23034AAA' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") no-repeat right 0.85rem center / 12px 12px;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--pc-color-ink, #0B1B3A);
  white-space: nowrap;
  cursor: pointer;
}

.pc-select-btn:hover {
  border-color: #CBD5E1;
}

.pc-select-btn:focus-visible,
.pc-select-btn[aria-expanded="true"] {
  outline: none;
  border-color: rgba(3, 74, 170, 0.45);
  box-shadow: 0 0 0 3px rgba(3, 74, 170, 0.12);
}

.pc-select-btn[aria-expanded="true"] {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23034AAA' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 11 6-6 6 6'/%3e%3c/svg%3e");
}

.pc-select-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 1060;
  min-width: 100%;
  width: max-content;
  max-height: min(60vh, 320px);
  overflow: auto;
  margin: 0;
  padding: 0.35rem 0;
  list-style: none;
  background: #fff;
  border: 1.5px solid #E2E4E9;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
}

.pc-select-menu[hidden] {
  display: none !important;
}

.pc-select-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.9rem;
  font-size: 0.875rem;
  color: #111;
  white-space: nowrap;
  cursor: pointer;
}

.pc-select-item.is-active {
  background: #F4F6FC;
}

.pc-select-item.is-selected {
  color: var(--pc-color-blue, #034AAA);
  font-weight: 700;
}

.pc-select-item.is-selected::after {
  content: "✓";
  font-weight: 700;
}

/* Titres de groupe (« Les plus présentes », « Toutes les marques (A-Z) ») comme les rubriques de la recherche principale */
.pc-select-heading {
  padding: 0.55rem 0.9rem 0.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #8a9098;
}

.pc-select-btn:disabled {
  border-color: var(--pc-color-line, #E2E8F0);
  background-color: #F1F5F9;
  color: #94A3B8;
  box-shadow: none;
  cursor: not-allowed;
}

/* Pleine largeur (filtres) */
.pc-select--block {
  display: block;
}

.pc-select--block .pc-select-btn {
  display: block;
  width: 100%;
  min-height: 40px;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  font-size: 0.9rem;
  font-weight: 500;
}

.pc-select--block .pc-select-menu {
  width: 100%;
}

.pc-select--block .pc-select-item {
  white-space: normal;
}

/* Sans bordure (rayon dans la barre de recherche) */
.pc-select--bare .pc-select-btn,
.pc-select--bare .pc-select-btn:focus-visible,
.pc-select--bare .pc-select-btn[aria-expanded="true"] {
  padding: 0.25rem 1.5rem 0.25rem 0.35rem;
  border: 0;
  background-color: transparent;
  background-position: right 0.3rem center;
  box-shadow: none;
  font-weight: 500;
}

.pc-select--bare .pc-select-btn:focus-visible {
  outline: 2px solid rgba(3, 74, 170, 0.45);
  outline-offset: 2px;
}

.pc-select--bare .pc-select-menu {
  left: auto;
  right: 0;
  top: calc(100% + 14px);
}

/* Ouverture vers le haut quand la place manque en bas */
.pc-select--up .pc-select-menu {
  top: auto;
  bottom: calc(100% + 6px);
}

/* Liste alignée sur le bord droit du bouton quand elle dépasserait à droite (bouton en bout de ligne) */
.pc-select--end .pc-select-menu {
  left: auto;
  right: 0;
}
