/* ── TOOLBAR ── */
.toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.search-wrapper {
  display: flex;
  align-items: center;
  background: #fff;
  border: 2px solid #ccc;
  border-radius: 30px;
  padding: 8px 14px;
  gap: 8px;
  width: 380px;
  transition: border-color 0.2s;
}
.search-wrapper:focus-within {
  border-color: var(--teal-light, #15908a);
  box-shadow: 0 0 0 3px rgba(21, 144, 138, 0.15);
}

.search-icon { font-size: 16px; color: #888; flex-shrink: 0; }

.search-input {
  flex: 1;
  border: none;
  outline: none;
  font-family: 'Nunito', sans-serif;
  font-size: 15px;
  color: #333;
  background: transparent;
}

.search-clear {
  background: none;
  border: none;
  color: #999;
  font-size: 14px;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
  transition: color 0.2s;
}
.search-clear:hover { color: #333; }

.btn-create {
  background: var(--teal-dark, #0d4a4a);
  color: #fff;
  border: none;
  border-radius: 30px;
  padding: 11px 26px;
  font-family: 'Nunito', sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  display: inline-block;
  transition: background 0.2s, transform 0.15s;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
}
.btn-create:hover {
  background: var(--teal-light, #15908a);
  transform: translateY(-2px);
}

/* ── BOUTON FILTRER + DROPDOWN ── */
.filter-wrapper {
  position: relative;
}

.btn-filter {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--teal-dark, #0d4a4a);
  color: #fff;
  border: none;
  border-radius: 30px;
  padding: 11px 20px;
  font-family: 'Nunito', sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, transform 0.15s;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
  user-select: none;
}
.btn-filter:hover {
  background: var(--teal-light, #15908a);
  transform: translateY(-2px);
}
.btn-filter .filter-icon {
  font-size: 18px;
  line-height: 1;
}

/* Dropdown rareté */
.filter-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  padding: 10px;
  z-index: 200;
  min-width: 200px;
  flex-direction: column;
  gap: 4px;
}
.filter-dropdown.open {
  display: flex;
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #0d4a4a;
  transition: background 0.15s;
  user-select: none;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}
.filter-option:hover {
  background: #f0f4f4;
}
.filter-option.selected {
  background: #0d4a4a;
  color: #fff;
}
.filter-option .rarity-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Couleurs des raretés */
.rarity-dot.commun      { background: #9e9e9e; }
.rarity-dot.rare        { background: #2196f3; }
.rarity-dot.epique      { background: #9c27b0; }
.rarity-dot.legendaire  { background: #ff9800; }
.rarity-dot.mythique    { background: #f44336; }
.rarity-dot.god         { background: #ffd700; }
.rarity-dot.secret      { background: #00bcd4; }
.rarity-dot.eternal     { background: #e91e63; }
.rarity-dot.gratuit     { background: #4caf50; }
.rarity-dot.payant      { background: #ff5722; }
.rarity-dot.admin       { background: #607d8b; }

/* ── PILLS DE FILTRES ACTIFS ── */
.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  min-height: 0;
}
.active-filters:empty {
  display: none;
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--teal-dark, #0d4a4a);
  color: #fff;
  border-radius: 30px;
  padding: 6px 14px;
  font-family: 'Nunito', sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.3px;
  animation: pill-in 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes pill-in {
  from { transform: scale(0.7); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

.pill-check {
  font-size: 14px;
  line-height: 1;
}

.pill-remove {
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  font-size: 13px;
  padding: 0;
  line-height: 1;
  transition: color 0.15s;
  display: flex;
  align-items: center;
}
.pill-remove:hover { color: #ff6b8a; }

.rarity-section {
  margin-bottom: 32px;
}
.rarity-section[style*="display: none"] {
  display: none !important;
}

.rarity-title {
  font-family: 'Nunito', sans-serif;
  font-size: 1.6rem;
  font-weight: 900;
  color: #0d4a4a;
  margin: 0 0 12px 0;
  padding-bottom: 8px;
  border-bottom: 2px solid #dce8e8;
}

.brainrots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}

.brainrot-card {
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  aspect-ratio: 1 / 1.1;
  cursor: pointer;
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.13);
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.22s;
  background: #e8f0f0;
  text-decoration: none;
  display: block;
}
.brainrot-card:hover {
  transform: translateY(-5px) scale(1.03);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.brainrot-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.brainrot-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 10px 12px 12px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, transparent 100%);
}

.brainrot-name {
  font-family: 'Nunito', sans-serif;
  font-size: 14px;
  font-weight: 900;
  color: #fff;
  line-height: 1.2;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
  text-transform: lowercase;
}

.brainrot-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  font-family: 'Nunito', sans-serif;
  font-size: 15px;
  font-weight: 800;
  padding: 5px 10px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-luckyblock {
  background: rgba(230, 180, 0, 0.95);
  color: #6b4200;
}

.badge-obby {
  background: rgba(226, 23, 23, 0.92);
  color: #0e0101;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #7a9a9a;
  font-family: 'Nunito', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  display: none;
}
.empty-state.visible {
  display: block;
}
