/* ============================================================
   Agenda — Dropdowns avec checkboxes
   Même style que les filtres membres
   ============================================================ */

/* --- Wrapper --- */
.agenda-custom-dropdown {
  position: relative;
  display: inline-block;
  width: fit-content;
  z-index: 100;
  margin-right: 10px;
}

/* --- Bouton déclencheur --- */
.agenda-custom-dropdown__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 2px 10px;
  min-height: 24px;
  width: 192px;
  line-height: 1.45;
  font-size: 13px;
  text-transform: uppercase;
  border-radius: 25px;
  border: 1px solid #000;
  color: #000;
  cursor: pointer;
  transition: 0.2s;
  background: transparent;
  font-family: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-decoration: none;
}

.agenda-custom-dropdown__trigger:hover,
.agenda-custom-dropdown__trigger.is-active {
  background: #000;
  color: #fff;
}

.agenda-custom-dropdown__trigger:hover .agenda-custom-dropdown__arrow,
.agenda-custom-dropdown__trigger.is-active .agenda-custom-dropdown__arrow {
  border-color: #fff;
}

/* Groupe flèche + compteur */
.agenda-custom-dropdown__right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* Badge compteur */
.agenda-custom-dropdown__count {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: #fff;
  color: #000;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
}

.agenda-custom-dropdown__count:not([hidden]) {
  display: inline-flex;
}

.agenda-custom-dropdown__trigger:not(.is-active) .agenda-custom-dropdown__count {
  background: #000;
  color: #fff;
}

/* Flèche */
.agenda-custom-dropdown__arrow {
  display: block;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid #000;
  border-bottom: 1.5px solid #000;
  transform: rotate(45deg) translateY(-1px);
  transition: transform 0.2s, border-color 0.2s;
  flex-shrink: 0;
}

.agenda-custom-dropdown.is-open .agenda-custom-dropdown__arrow {
  transform: rotate(-135deg) translateY(1px);
}

/* --- Panneau déroulant --- */
.agenda-custom-dropdown__panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 194px;
  background: #fff;
  border: 1px solid #000;
  border-radius: 12px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  max-height: 280px;
  list-style: none;
  margin: 0;
  padding: 10px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.18s, transform 0.18s, visibility 0s linear 0.18s;
}

.agenda-custom-dropdown.is-open .agenda-custom-dropdown__panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity 0.18s, transform 0.18s;
}

/* Scrollbar */
.agenda-custom-dropdown__panel::-webkit-scrollbar { width: 4px; }
.agenda-custom-dropdown__panel::-webkit-scrollbar-track {
  background: transparent;
  margin-top: 10px;
  margin-bottom: 10px;
}
.agenda-custom-dropdown__panel::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 2px;
}
.agenda-custom-dropdown__item {
    display: flex !important;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 5px 0px;
    font-size: 13px;
    text-transform: uppercase;
    color: #000;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s;
    line-height: 1.45;
}

.agenda-custom-dropdown__item:hover {
  background: #f3f3f3;
}

/* Options non disponibles (dépendance) */
li.is-unavailable .agenda-custom-dropdown__item {
  opacity: 0.35;
  cursor: not-allowed;
}

li.is-unavailable .agenda-custom-dropdown__item:hover {
  background: transparent;
}

/* Checkboxes custom */
.agenda-custom-dropdown__cb {
  appearance: none;
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  min-width: 14px;
  border:1px solid #000 !important;
  border-radius: 3px;
  background: #fff;
  cursor: pointer;
  position: relative;
  transition: background 0.15s;
  flex-shrink: 0;
}

.agenda-custom-dropdown__cb:checked {
  background: #000;
  border-color: #000;
}

.agenda-custom-dropdown__cb:checked::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 0;
  width: 5px;
  height: 8px;
  border: 1.5px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

.agenda-custom-dropdown__cb:focus-visible {
  outline: 2px solid #000;
  outline-offset: 1px;
}

li.is-unavailable .agenda-custom-dropdown__cb {
  cursor: not-allowed;
}
