/* ==========================================================================
   EXPERIENCES FILTERS — SAFARI SAFE
========================================================================== */

.filter--wrapper {
  position: relative;
  z-index: 20;
}


/* ==========================================================================
   FILTER BUTTONS
========================================================================== */

.filter--btn {
  position: relative;
  cursor: pointer;

  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;

  transition:
    background-color 0.35s ease,
    color 0.35s ease;
}

.filter--btn:not(.is--reset) {
  isolation: isolate;
}

.filter--btn.is--open {
  z-index: 50;
  background-color: rgba(0, 0, 0, 0.06);
}

.filter--btn.is--active {
  background-color: rgba(53, 53, 53, 0.65);
  color: #fdfdfd;
}

.filter--btn.is--reset {
  transition:
    opacity 0.35s ease,
    background-color 0.35s ease,
    color 0.35s ease;
}

.filter--btn.is--reset:not(.is--available) {
  opacity: 0.4;
  pointer-events: none;
}

.filter--btn.is--reset.is--available {
  opacity: 1;
  pointer-events: auto;
}


/* ==========================================================================
   FILTER ARROW
========================================================================== */

.filter--btn .arrow--8 {
  pointer-events: none;
  transform-origin: center;
  transition: transform 0.35s ease;
}

.filter--btn.is--open .arrow--8 {
  transform: rotate(180deg);
}


/* ==========================================================================
   FILTER DROPDOWN
========================================================================== */

/*
 * display:none / display:block est volontaire.
 * C'est plus robuste sur Safari que visibility + pointer-events animés.
 */
.filter--drop {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  z-index: 60;

  display: none;
  min-width: 100%;
  overflow: hidden;

  background-color: #fdfdfd;
}

.filter--btn.is--open > .filter--drop {
  display: block;
}


/* ==========================================================================
   FILTER LINKS
========================================================================== */

.filter--link {
  position: relative;
  display: flex;
  align-items: center;

  width: 100%;
  padding: 0.75rem 1rem;

  background-color: #fdfdfd;
  color: rgba(53, 53, 53, 0.65);

  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;

  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;

  transition:
    background-color 0.3s ease,
    color 0.3s ease,
    padding-left 0.3s ease;
}

@media (hover: hover) and (pointer: fine) {
  .filter--link:hover {
    padding-left: 1.25rem;
    background-color: #ecebe7;
  }
}

.filter--link.is--active {
  background-color: rgba(53, 53, 53, 0.65);
  color: #fdfdfd;
}

.filter--link::before {
  content: "";
  display: block;

  width: 0;
  height: 0.375rem;
  margin-right: 0;

  flex: 0 0 auto;

  border-radius: 50%;
  background-color: currentColor;
  opacity: 0;

  transition:
    width 0.3s ease,
    margin-right 0.3s ease,
    opacity 0.25s ease;
}

.filter--link.is--active::before {
  width: 0.375rem;
  margin-right: 0.5rem;
  opacity: 1;
}


/* ==========================================================================
   FILTERED ITEMS
========================================================================== */

.experiences--list > .w-dyn-item {
  opacity: 1;
  visibility: visible;

  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}

.experiences--list > .w-dyn-item.is--filtering-out {
  opacity: 0;
  transform: translateY(1rem);
  pointer-events: none;
}

.experiences--list > .w-dyn-item.is--filtered-out {
  display: none !important;
}


/* ==========================================================================
   EXPERIENCES LAYOUT — FILTERED ORDER
========================================================================== */

.experiences--list > .w-dyn-item > .experience--content,
.experiences--list .experience-text,
.experiences--list .experience--image-wrapper {
  min-width: 0;
}

@media screen and (min-width: 992px) {

  /* Résultats visibles 1, 3, 5... : image à gauche */
  .experiences--list
    > .w-dyn-item.is--visible-odd
    > .experience--content {
    display: grid !important;
    grid-template-columns: 0.658fr 0.342fr !important;
  }

  .experiences--list
    > .w-dyn-item.is--visible-odd
    > .experience--content
    > .experience--image-wrapper {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }

  .experiences--list
    > .w-dyn-item.is--visible-odd
    > .experience--content
    > .experience-text {
    grid-column: 2 !important;
    grid-row: 1 !important;
  }

  /* Résultats visibles 2, 4, 6... : image à droite */
  .experiences--list
    > .w-dyn-item.is--visible-even
    > .experience--content {
    display: grid !important;
    grid-template-columns: 0.342fr 0.658fr !important;
  }

  .experiences--list
    > .w-dyn-item.is--visible-even
    > .experience--content
    > .experience-text {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }

  .experiences--list
    > .w-dyn-item.is--visible-even
    > .experience--content
    > .experience--image-wrapper {
    grid-column: 2 !important;
    grid-row: 1 !important;
  }
}


/* ==========================================================================
   EMPTY RESULTS
========================================================================== */

.empty--results {
  display: none;
  align-items: center;
  justify-content: center;

  width: 100%;
  padding: 4rem 1rem;

  text-align: center;
}

.empty--results.is--visible {
  display: flex;
}


/* ==========================================================================
   FILTER CMS VALUES
========================================================================== */

.filter--parent {
  display: none !important;
}


/* ==========================================================================
   RESPONSIVE
========================================================================== */

@media screen and (max-width: 767px) {
  .filter--drop {
    min-width: max-content;
  }

  .filter--link {
    padding: 0.875rem 1rem;
  }
}


/* ==========================================================================
   REDUCED MOTION
========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .filter--btn,
  .filter--link,
  .filter--link::before,
  .experiences--list > .w-dyn-item {
    transition: none !important;
  }
}