.rf-filters{
  display:flex;
  gap:16px;
  flex-wrap:wrap;
  align-items:flex-end;
}

/*.rf-filter{
  min-width:220px;
}*/

.rf-label{
  display:block;
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.04em;
  margin-bottom:6px;
}

.rf-select.rf-select{
  min-height: 40px;
  width:100%;
  max-width: 100%;
  padding:12px 30px 12px 12px;
  border:1px solid #BF5627;
  background:#fff;
  appearance:none;
  -webkit-appearance:none;
  -moz-appearance:none;
  position:relative;
  text-transform: uppercase;
  color: #BF5627;
  font-size: 12px;
  font-weight: 400;
  cursor: pointer;
  outline: none;
  box-shadow: none;
  transition: all 0.3s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
}

/* Masquer les options disabled dans les listes déroulantes */
.rf-select option[disabled] {
  display: none;
}

/* Limiter la largeur des options pour éviter l'élargissement du select */
.rf-select option {
  max-width: 100%;
  white-space: normal;
  word-wrap: break-word;
}

.rf-filter{ 
  position:relative; 
  min-width: 0;
}
.rf-filter::after{
  content: "";
  position:absolute;
  right:12px;
  bottom:12px;
  width: 12px;
  height: 12px;
  display: block;
  background-color: #BF5627;
  mask-image: url(/wp-content/uploads/2025/09/intact-chevron-b.svg);
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-image: url(/wp-content/uploads/2025/09/intact-chevron-b.svg);
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  transition: all 0.3s ease;
  pointer-events:none;
}

.rf-filter::after svg .st0,
.rf-filter svg .st0 {
  fill: #BF5627;
}

.rf-reset{
  padding:12px 20px;
  border:1px dashed #BF5627;
  background:transparent;
  text-transform: uppercase;
  color: #BF5627;
  font-size: 12px;
  font-weight: 400;
  cursor: pointer;
  outline: none;
  box-shadow: none;
  transition: all 0.3s ease;
  position: relative;
  padding-left: 36px;
  white-space: nowrap;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.rf-reset::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  display: block;
  background-color: #BF5627;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8'/%3E%3Cpath d='M21 3v5h-5'/%3E%3Cpath d='M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16'/%3E%3Cpath d='M3 21v-5h5'/%3E%3C/svg%3E");
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8'/%3E%3Cpath d='M21 3v5h-5'/%3E%3Cpath d='M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16'/%3E%3Cpath d='M3 21v-5h5'/%3E%3C/svg%3E");
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  transition: all 0.3s ease;
}

.rf-reset:hover{
  background: rgba(191, 86, 39, 0.1);
  border-color: #BF5627;
  border-style: solid;
  color: #BF5627;
}

.rf-reset:hover::before {
  transform: translateY(-50%) rotate(180deg);
}

.rf-results.is-loading{ opacity:.6; pointer-events:none; }

.rf-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:18px;
  margin-top:18px;
}

@media (max-width: 1024px){
  .rf-grid{ grid-template-columns:repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px){
  .rf-grid{ grid-template-columns:1fr; }
}

.rf-pager{
  display:flex;
  gap:12px;
  align-items:center;
  justify-content:center;
  margin-top:16px;
}

/* Composant personnalisé pour la teneur en protéines */
.rf-filter-proteine {
  position: relative;
}

.rf-proteine-trigger {
  width: 100%;
  padding: 12px 30px 12px 12px;
  border: 1px solid #BF5627;
  background: #fff;
  text-transform: uppercase;
  color: #BF5627;
  font-size: 12px;
  font-weight: 400;
  cursor: pointer;
  outline: none;
  box-shadow: none;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.rf-proteine-trigger.has-icons-only {
  justify-content: flex-start;
  padding: 9px 30px 9px 12px;
}

.rf-proteine-label {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
}

.rf-proteine-icons {
  display: flex;
  align-items: center;
  gap: 4px;
}

.rf-proteine-icon {
  width: 20px;
  height: 20px;
  display: block;
  background-color: #BF5627;
  mask-image: url(/wp-content/uploads/2025/10/intact-food-service-recette-picto-proteine.svg);
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-image: url(/wp-content/uploads/2025/10/intact-food-service-recette-picto-proteine.svg);
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
}

.rf-proteine-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #BF5627;
  border-top: none;
  margin-top: -1px;
  z-index: 1000;
  display: none;
  flex-direction: column;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.rf-filter-proteine.is-open .rf-proteine-dropdown {
  display: flex;
}

.rf-filter-proteine.is-open .rf-proteine-trigger {
  border-bottom-color: transparent;
}

.rf-proteine-option {
  padding: 12px;
  border: none;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  color: #BF5627;
  font-size: 12px;
  font-weight: 400;
  border-bottom: 1px solid #f0f0f0;
}

.rf-proteine-option:first-child {
  border-top: 1px solid #f0f0f0;
}

.rf-proteine-option:last-child {
  border-bottom: none;
}

.rf-proteine-option:hover {
  background: #f8f8f8;
}

.rf-proteine-option[data-value=""] .rf-proteine-icons {
  display: none;
}

.rf-proteine-label-text {
  flex: 1;
}

/* Masquer la flèche par défaut pour le filtre protéine */
.rf-filter-proteine::after {
  display: none;
}

.rf-filter-proteine .rf-proteine-trigger::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  display: block;
  background-color: #BF5627;
  mask-image: url(/wp-content/uploads/2025/09/intact-chevron-b.svg);
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-image: url(/wp-content/uploads/2025/09/intact-chevron-b.svg);
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  transition: all 0.3s ease;
  pointer-events: none;
}

.rf-filter-proteine.is-open .rf-proteine-trigger::after {
  transform: translateY(-50%) rotate(180deg);
}

/* Wrapper des filtres */
.rf-filters-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Zone des tags de filtres actifs */
.rf-tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rf-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background-color: #7E9F894D;
  border: 1px solid #7E9F89;
  border-radius: 4px;
  font-size: 12px;
  color: #27463B;
  text-transform: uppercase;
  font-weight: 400;
}

.rf-tag-label {
  flex: 1;
}

.rf-tag-close {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  color: #27463B;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  border-radius: 2px;
  flex-shrink: 0;
  position: relative;
}

.rf-tag-close::before {
  content: '×';
  display: block;
  font-size: 20px;
  line-height: 1;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -55%);
}

.rf-tag:hover {
  background-color: rgba(126, 159, 137, 0.2);
}

.rf-tag-close:focus {
  outline: 2px solid #7E9F89;
  outline-offset: 2px;
}

/* Icônes de protéines dans les tags */
.rf-tag .rf-proteine-icon {
  background-color: #27463B;
}
