/* =========================================================================
   Listing filters (Figma "Rechercher un communiqué", 1139:8002)
   ========================================================================= */
.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border: 1px solid #d5e0d1;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 12px 30px -12px rgba(5, 20, 8, 0.09);
}
.filters__search { flex: 0 0 320px; }
.filters__search .form-item { margin: 0; }
.filters__search label { display: none; }
.filters__search input {
  width: 100%;
  height: 56px;
  padding-block: 0; padding-inline: 47px 18px;
  border: 1px solid #d5e0d1;
  border-radius: 14px;
  background: #f7f9f6 var(--icon-search) 18px center / 19px no-repeat;
  font: inherit;
  font-size: 0.875rem;
  color: var(--syn-ink);
}
.filters__search input::placeholder { color: #636e85; }
.filters__search input:focus { outline: none; border-color: var(--syn-green-500); }

/* Tinted strip holding the filter pills. */
.filters__cluster {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-height: 56px;
  padding: 6px;
  border-radius: 14px;
  background: #f7f9f6;
}
.filters__cluster .form-item { margin: 0; }
.filters__cluster label { display: none; }

.filters__pill,
.filters__cluster select {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 16px;
  border: 1px solid #d5e0d1;
  border-radius: 10px;
  background: #fff;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #29362b;
  cursor: pointer;
}
.filters__pill:hover,
.filters__cluster select:hover { text-decoration: none; border-color: var(--syn-green-500); }
.filters__pill.is-active {
  border-color: transparent;
  background: #EBFAF0;
  color: #007329;
}

/* The chevron of the design, since the native arrow cannot be styled. */
.filters__cluster select {
  padding-inline-end: 40px;
  -webkit-appearance: none;
  appearance: none;
  background: #fff var(--icon-chevron) right 16px center / 16px no-repeat;
}
.filters__cluster select:focus { outline: none; border-color: var(--syn-green-500); }

/* Kept for visitors without JavaScript, where the form needs a submit. */
.filters__actions .form-actions { margin: 0; }
.filters__actions input[type="submit"] {
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: var(--r-sm);
  background: var(--syn-green-500);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
}
.filters__actions input[type="submit"]:hover { background: var(--syn-green-600); }
.filters__actions [id*="edit-reset"] { display: none; }
.js .filters__actions { display: none; }

@media (max-width: 720px) {
  .filters { padding: 12px; gap: 12px; }
  .filters__search { flex: 1 1 100%; }
  .filters__cluster { flex: 1 1 100%; }
  .filters__cluster select { flex: 1 1 100%; }
}

/* Recette: categories as tabs (Figma "Recherche et filtres", 1139:7578):
   plain labels on the tinted strip, the selected one on a light green chip. */
.filters__tabs { display: flex; flex-wrap: wrap; gap: 4px; }
.filters__tab {
  border-color: transparent;
  background: none;
  /* SemiBold dark green-grey, like the year dropdown (Figma 1139:7780). */
  font-weight: 600;
  color: #29362b;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.filters__tab:hover { border-color: transparent; background: #fff; color: #007329; }
.filters__tab.is-active { font-weight: 600; }
@media (max-width: 720px) {
  /* The tabs scroll sideways rather than wrapping onto several lines. */
  .filters__tabs { flex-wrap: nowrap; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .filters__tabs::-webkit-scrollbar { display: none; }
  .filters__tab { flex: none; height: 38px; padding: 0 12px; }
}

/* Recette: "Afficher plus" under a listing (Figma 1139:7599), a green
   button with a white arrow disc. */
.load-more {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 48px auto 0;
  padding: 16px 26px;
  border: 0;
  border-radius: 16px;
  background: var(--syn-green-500);
  box-shadow: 0 8px 18px -6px rgba(0, 153, 51, 0.45);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #fff;
  cursor: pointer;
  /* Hover (Figma, images/button-hover.mp4): a white fill sweeps in from the
     right under a green outline, the label and arrow turn green, the arrow
     loses its disc, and the button opens out on both sides: the label stays
     put while the arrow travels to the far right. */
  position: relative;
  isolation: isolate;
  overflow: hidden;
  outline: 2px solid transparent;
  outline-offset: -2px;
  transition: color 0.2s ease, padding 0.3s ease, gap 0.3s ease, outline-color 0.2s ease, box-shadow 0.3s ease;
}
.load-more::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: #fff;
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 0.25s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.load-more:hover,
.load-more:focus-visible {
  gap: 90px;
  padding-inline: 114px 34px;
  outline-color: var(--syn-green-500);
  box-shadow: 0 8px 20px -8px rgba(17, 24, 39, 0.22);
  color: var(--syn-green-500);
}
.load-more:hover::before,
.load-more:focus-visible::before { transform: scaleX(1); }
.load-more__icon { transition: background-color 0.2s ease; }
.load-more:hover .load-more__icon,
.load-more:focus-visible .load-more__icon { background-color: transparent; }
@media (prefers-reduced-motion: reduce) {
  .load-more,
  .load-more::before,
  .load-more__icon { transition: none; }
}
.load-more:disabled { cursor: progress; opacity: 0.7; }
.load-more__icon {
  flex: none;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: #fff;
  -webkit-mask: none;
}
.load-more__icon::before {
  content: "";
  display: block;
  width: 100%; height: 100%;
  background: var(--syn-green-500);
  /* The design's right arrow (it reads as "more"), at rest in the disc. */
  -webkit-mask: var(--icon-arrow) center / 14px no-repeat;
  mask: var(--icon-arrow) center / 14px no-repeat;
}
.load-more.is-loading .load-more__icon::before { animation: load-more-spin 0.8s linear infinite; }
@keyframes load-more-spin { to { transform: rotate(360deg); } }
/* Rows added by the button fade in. */
.views-row.is-appended { animation: load-more-in 0.45s ease both; }
@keyframes load-more-in { from { opacity: 0; transform: translateY(14px); } }
@media (prefers-reduced-motion: reduce) {
  .views-row.is-appended,
  .load-more.is-loading .load-more__icon::before { animation: none; }
}
.block-ref__content .load-more,
.block-ref__content .pager { grid-column: 1 / -1; }
.block-ref__content .pager[hidden] { display: none; }
@media (max-width: 480px) {
  /* Recette (xs): the category tabs two per row instead of a sideways
     scroll; an odd last tab spans the row. */
  .filters__tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; overflow: visible; }
  .filters__tab { justify-content: center; height: auto; min-height: 40px; padding: 8px 10px; white-space: normal; text-align: center; line-height: 1.3; }
  .filters__tab:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
