/**
 * nectar-cpt-filters.css  v2.1
 * Barre de filtres — ajustements visuels :
 *  - Champ texte limité en largeur, ne prend plus tout l'espace
 *  - Dropdowns plus larges et mieux équilibrés
 *  - Fond et bordures harmonisés avec le thème chaud du site
 * Emplacement : salient-child/css/nectar-cpt-filters.css
 */

/* ═══════════════════════════════════════════════════════════════
   BARRE PRINCIPALE
   ═══════════════════════════════════════════════════════════════ */
.nectar-cpt-filter-bar {
  margin-bottom: 36px;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #FFF7EA;
  overflow: visible;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

/* Ligne du haut : champ texte + dropdowns + bouton */
.nectar-cpt-filter-bar__top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  flex-wrap: wrap;
}

/* Ligne du bas : tags actifs */
.nectar-cpt-filter-bar__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 20px 16px;
}
.nectar-cpt-filter-bar__tags:empty {
  display: none;
}

/* ═══════════════════════════════════════════════════════════════
   CHAMP RECHERCHE TEXTE
   ═══════════════════════════════════════════════════════════════ */
.nectar-cpt-search-input {
  flex: 1 1 200px;
  min-width: 160px;
  height: 44px;
  padding: 0 16px;
  border: 1px solid #e4ddd4;
  border-radius: 22px;
  font-size: 14px;
  color: #333;
  background: #faf8f5;
  outline: none;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.nectar-cpt-search-input::placeholder {
  color: #b0a89e;
}
.nectar-cpt-search-input:focus {
  border-color: #c8bfb4;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(200, 185, 170, 0.2);
}

/* ═══════════════════════════════════════════════════════════════
   DROPDOWN CUSTOM
   ═══════════════════════════════════════════════════════════════ */
.nectar-cpt-dropdown {
  position: relative;
  flex-shrink: 0;
}

/* Bouton déclencheur*/
.nectar-cpt-dropdown__trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border: 1px solid #e4ddd4;
  border-radius: 22px;
  background: #faf8f5;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  user-select: none;
  min-width: 130px;          /* largeur minimale pour que le label respire */
}
.nectar-cpt-dropdown__trigger:hover {
  border-color: #c8bfb4;
  background: #fff;
}
.nectar-cpt-dropdown.is-open .nectar-cpt-dropdown__trigger {
  border-color: #c8bfb4;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(200, 185, 170, 0.2);
}

/* Badge compteur */
.nectar-cpt-dropdown__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: #3a3228;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}
.nectar-cpt-dropdown__count:empty,
.nectar-cpt-dropdown__count[data-count="0"] {
  display: none;
}

/* Chevron */
.nectar-cpt-dropdown__chevron {
  width: 14px;
  height: 14px;
  opacity: 0.45;
  transition: transform 0.2s;
  flex-shrink: 0;
  margin-left: auto;
}
.nectar-cpt-dropdown.is-open .nectar-cpt-dropdown__chevron {
  transform: rotate(180deg);
  opacity: 0.7;
}

/* Panel flottant */
.nectar-cpt-dropdown__panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 200px;
  background: #fff;
  border: 1px solid #e4ddd4;
  border-radius: 14px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.10);
  padding: 8px 0;
  z-index: 1000;
  display: none;
}
.nectar-cpt-dropdown.is-open .nectar-cpt-dropdown__panel {
  display: block;
}

/* Options */
.nectar-cpt-dropdown__option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  font-size: 14px;
  color: #333;
  cursor: pointer;
  transition: background 0.15s;
  user-select: none;
}
.nectar-cpt-dropdown__option:hover {
  background: #faf8f5;
}

/* Checkbox */
.nectar-cpt-dropdown__option input[type="checkbox"] {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  accent-color: #3a3228;
  cursor: pointer;
}

/* ═══════════════════════════════════════════════════════════════
   BOUTON RECHERCHER
   ═══════════════════════════════════════════════════════════════ */
.nectar-cpt-filter-btn--apply {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 26px;
  border: none;
  border-radius: 22px;
  background: #1e1a16;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, transform 0.1s;
  flex-shrink: 0;
  margin-left: auto;
}
.nectar-cpt-filter-btn--apply:hover {
  background: #0d0b09;
}
.nectar-cpt-filter-btn--apply:active {
  transform: scale(0.97);
}

/* ═══════════════════════════════════════════════════════════════
   TAGS FILTRES ACTIFS
   ═══════════════════════════════════════════════════════════════ */
.nectar-cpt-active-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 10px 0 14px;
  border-radius: 15px;
  background: #f0ebe4;
  font-size: 13px;
  color: #3a3228;
  font-weight: 500;
  cursor: default;
}

.nectar-cpt-active-tag__remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #d5cdc4;
  border: none;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  color: #555;
  padding: 0;
  transition: background 0.15s, color 0.15s;
}
.nectar-cpt-active-tag__remove:hover {
  background: #8b7d6e;
  color: #fff;
}

/* Bouton "Tout effacer" */
.nectar-cpt-tag-reset-all {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 12px;
  border-radius: 15px;
  border: 1px solid #ddd6ce;
  background: transparent;
  font-size: 13px;
  color: #8b7d6e;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.nectar-cpt-tag-reset-all:hover {
  background: #f0ebe4;
  color: #3a3228;
}

/* ═══════════════════════════════════════════════════════════════
   ZONE RÉSULTATS
   ═══════════════════════════════════════════════════════════════ */
.nectar-post-grid.is-loading {
  opacity: 0.4;
  pointer-events: none;
  transition: opacity 0.2s;
  position: relative;
  min-height: 120px;
}

/* Message aucun résultat */
.nectar-cpt-no-results {
  grid-column: 1 / -1;
  padding: 50px 20px;
  text-align: center;
}
.nectar-cpt-no-results__icon {
  font-size: 2rem;
  margin-bottom: 12px;
}
.nectar-cpt-no-results__title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin: 0 0 6px;
}
.nectar-cpt-no-results__sub {
  font-size: 14px;
  color: #8b7d6e;
  margin: 0 0 20px;
}
.nectar-cpt-no-results__widen {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 20px;
  border-radius: 19px;
  border: 1px solid #ddd6ce;
  background: #fff;
  font-size: 13px;
  font-weight: 500;
  color: #3a3228;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.nectar-cpt-no-results__widen:hover {
  background: #f0ebe4;
  border-color: #c8bfb4;
}

/* Spinner */
.nectar-cpt-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  gap: 6px;
  z-index: 10;
}
.nectar-cpt-spinner span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #3a3228;
  animation: nectar-cpt-bounce 0.8s infinite alternate;
}
.nectar-cpt-spinner span:nth-child(2) { animation-delay: 0.15s; }
.nectar-cpt-spinner span:nth-child(3) { animation-delay: 0.30s; }

@keyframes nectar-cpt-bounce {
  from { opacity: 0.3; transform: translateY(0); }
  to   { opacity: 1;   transform: translateY(-8px); }
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .nectar-cpt-filter-bar__top {
    flex-wrap: wrap;
    gap: 8px;
  }
  .nectar-cpt-search-input {
    flex: 1 1 100%;
    max-width: 100%;
  }
  .nectar-cpt-filter-btn--apply {
    flex: 1;
    justify-content: center;
    margin-left: 0;
  }
.nectar-cpt-dropdown__panel {
  left: 0;
  right: auto;
  width: calc(100vw - 40px);
  min-width: unset;
}
  .nectar-cpt-dropdown__trigger {
    min-width: unset;
  }
}