.bbct-filters {
  display: flex;
  flex-direction: column;
  font-family: "Poppins", "Inter", "Nunito Sans", sans-serif;
}

/* — Section (Niveau / Notion / Besoin) */
.bbct-level {
  background: #fafafa;
  border-radius: 14px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  padding: 12px;
}

.bbct-level > div:first-child {
  font-size: 15px;
  font-weight: 600;
  color: #333;
  margin-bottom: 12px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

/* — Badges — Base commune — */
.bbct-badge-filter,
.bbct-badge {
  display: inline-block;
  border-radius: 25px;
  color: #fff;
  padding: 12px 18px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s ease;
  margin-left: 3px;
  margin-right: 3px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  user-select: none;
  min-width: 65px;
  text-align: center;
}

.bbct-selected-badge {
  position: relative;
  display: inline-block;
  text-align: center;
  color: #fff;
  font-weight: 500;
  border-radius: 25px;
  padding: 12px 18px;
  margin-left: 3px;
  margin-right: 3px;
  font-size: 13px;
  cursor: default;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  user-select: none;
  min-width: 65px;
   animation: bbct-bounce-in 0.3s ease-out, bbct-shake 0.4s ease-in-out 0.3s;
}

@keyframes bbct-shake {
  0% { transform: translateX(0); }
  20% { transform: translateX(-2px); }
  40% { transform: translateX(2px); }
  60% { transform: translateX(-1px); }
  80% { transform: translateX(1px); }
  100% { transform: translateX(0); }
}

/* Petit effet rebond d’apparition */
@keyframes bbct-bounce-in {
  0% { transform: scale(0.8); opacity: 0; }
  60% { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(1); }
}

/* — Taille et couleurs par niveau — */
.bbct-level[data-level="0"] .bbct-badge-filter,
.bbct-level[data-level="0"] .bbct-badge,
.bbct-selected-badge[data-level="0"] {
  font-size: 16px;
  background: linear-gradient(135deg, #4a6cf7, #3a56d4);
}

.bbct-level[data-level="1"] .bbct-badge-filter,
.bbct-level[data-level="1"] .bbct-badge,
.bbct-selected-badge[data-level="1"] {
  font-size: 14px;
  background: linear-gradient(135deg, #37c7ab, #2ea893);
}

.bbct-level[data-level="2"] .bbct-badge-filter,
.bbct-level[data-level="2"] .bbct-badge,
.bbct-selected-badge[data-level="2"] {
  font-size: 13px;
  background: linear-gradient(135deg, #ffd75a, #ffc94d);
  color: #333; /* meilleur contraste sur fond clair */
}

.bbct-level[data-level="3"] .bbct-badge-filter,
.bbct-level[data-level="3"] .bbct-badge,
.bbct-selected-badge[data-level="3"] {
  font-size: 13px;
  background: linear-gradient(135deg, #9efd38, #adff2f);
  color: #333; /* meilleur contraste sur fond clair */
}

.bbct-level[data-level="4"] .bbct-badge-filter,
.bbct-level[data-level="4"] .bbct-badge,
.bbct-selected-badge[data-level="4"] {
  font-size: 13px;
  background: linear-gradient(135deg, #7c0ad3, #2e006c);
}

/* — Hover : effet rebond, ombre renforcée — */
.bbct-badge-filter:hover,
.bbct-badge:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
  filter: brightness(0.95);
}

/* — Actif : effet pressé — */
.bbct-badge-filter.bbct-badge-active,
.bbct-badge-filter.bbct-badge {
  transform: scale(0.97);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.25);
  filter: brightness(0.9);
}

/* — Espacements horizontaux et verticaux entre badges — */
.bbct-level {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 15px;
}

/* — Bouton Reset — */
.bbct-badge-reset {
  display: inline-block;
  background: #555;
  color: #fff;
  padding: 10px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.25s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.bbct-badge-reset:hover {
  background: #333;
  transform: scale(1.05);
}

/* Animation d’apparition fluide d’un nouveau niveau de badges */
.bbct-level {
  transform-origin: left top;
  animation: bbctLevelFadeIn 0.5s ease-in-out;
}

@keyframes bbctLevelFadeIn {
  from {
    transform: scaleY(0);
  }
  to {
    transform: scaleY(1);
  }
}

div.bbct-filters > div.bbct-level:last-child {
  margin-bottom: 15px;
}

.bbct-badge-filter,
.bbct-badge {
  transition: all 0.25s ease-in-out;
}

.bbct-badge-filter.selected,
.bbct-badge.selected {
  transform: scale(1.05);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.bbct-badge-filter[style*="pointer-events: none"] {
  filter: grayscale(0.3);
}

@keyframes slideOutUp {
  0% {
    transform: scaleY(1);
  }
  100% {
    transform: scaleY(0);
  }
}

.bbct-level.slide-out-up {
  transform-origin: left top;
  animation: slideOutUp 0.5s ease-in-out;
}

.bbct-selected-badge::after {
  content: "✔";
  position: absolute;
  top: 0px;
  right: 0px;
  background-color: #22c55e;
  color: white;
  font-size: 10px;
  font-weight: bold;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.bbct-selected-badge::after {
  animation: bbct-check-appear 0.25s ease-out;
}

@keyframes bbct-check-appear {
  from {
    transform: scale(0) rotate(-30deg);
    opacity: 0;
  }
  to {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

/* PARTIE MOBILE*/
@media (max-width: 799px) {
  .bbct-level[data-level="0"] .bbct-badge-filter,
  .bbct-level[data-level="0"] .bbct-badge,
  .bbct-selected-badge[data-level="0"] {
    font-size: 14px;
  }

  .bbct-level[data-level="1"] .bbct-badge-filter,
  .bbct-level[data-level="1"] .bbct-badge,
  .bbct-selected-badge[data-level="1"] {
    font-size: 12px;
  }

  .bbct-badge-filter,
  .bbct-badge {
    padding: 4px 12px;
    margin-left: 0px;
    margin-right: 0px;
  }

  .bbct-level[data-level="2"] .bbct-badge-filter,
  .bbct-level[data-level="2"] .bbct-badge,
  .bbct-selected-badge[data-level="2"] {
    font-size: 11px;
  }

  .bbct-level[data-level="3"] .bbct-badge-filter,
  .bbct-level[data-level="3"] .bbct-badge,
  .bbct-selected-badge[data-level="3"] {
    font-size: 11px;
  }

  .bbct-level[data-level="4"] .bbct-badge-filter,
  .bbct-level[data-level="4"] .bbct-badge,
  .bbct-selected-badge[data-level="4"] {
    font-size: 11px;
  }

  .bbct-level {
    gap: 5px 5px;
  }

  div.bbct-level > strong {
    margin-right: 10px;
  }

  .bbct-badge-filter,
  .bbct-badge {
    min-width: 50px;
  }
}
