/* Menu déroulant aux couleurs du site (js/dropdown.js), à la place des <select> du navigateur : un bouton sombre à
   liseré doré, un panneau qui descend, des groupes en petits titres, une pastille et un nombre par choix. */
.dropdown {
  position: relative;
  min-width: 0;
}
.dropdown__button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line-gold);
  background: rgba(0, 0, 0, 0.28);
  color: var(--parchment);
  font: 600 0.84rem Roboto, sans-serif;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.dropdown__button:hover,
.dropdown.is-open .dropdown__button {
  border-color: var(--gold);
  background: rgba(221, 162, 62, 0.08);
}
.dropdown__value {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.dropdown__button svg {
  flex: none;
  width: 10px;
  height: 6px;
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.6;
  transition: transform 0.2s;
}
.dropdown.is-open .dropdown__button svg {
  transform: rotate(180deg);
}
.dropdown__label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dropdown__dot {
  flex: none;
  width: 8px;
  height: 8px;
  background: var(--dot);
}
.dropdown__count {
  flex: none;
  min-width: 24px;
  padding: 0 6px;
  background: rgba(221, 162, 62, 0.16);
  color: var(--gold);
  font: 800 0.8rem/1.6 "Roboto Condensed", sans-serif;
  text-align: center;
}
.dropdown__menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 4px);
  left: 0;
  min-width: 100%;
  width: max-content;
  max-width: 320px;
  max-height: 340px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--gold);
  background: linear-gradient(160deg, #2a2219, #17130e);
  box-shadow: 0 18px 40px #000c;
  scrollbar-width: thin;
  animation: dropdown-in 0.16s ease-out;
}
.dropdown__menu[hidden] {
  display: none;
}
.dropdown__group {
  margin: 8px 6px 4px;
  color: var(--gold);
  font: 900 0.8rem "Roboto Condensed", sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.dropdown__group:first-child {
  margin-top: 2px;
}
.dropdown__item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 8px;
  border: 0;
  border-left: 2px solid transparent;
  background: transparent;
  color: var(--text);
  font: 500 0.85rem Roboto, sans-serif;
  text-align: left;
  cursor: pointer;
}
.dropdown__item:hover,
.dropdown__item:focus-visible {
  background: #ffffff0d;
  color: var(--parchment);
  outline: none;
}
.dropdown__item[aria-selected="true"] {
  border-left-color: var(--gold);
  background: rgba(221, 162, 62, 0.12);
  color: var(--parchment);
  font-weight: 700;
}
@keyframes dropdown-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .dropdown__menu {
    animation: none;
  }
}

/* Le dernier menu d'une rangée (« Trier ») s'ouvre vers la gauche : il ne déborde pas de sa colonne */
.monument-tools > :last-child .dropdown__menu {
  right: 0;
  left: auto;
}
/* Désactivé (un <select> grisé qu'on habille) : visible, inerte */
.dropdown__button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
