:root {
  /* COLORS */
  --faq-color-taxonomy-text: #949494;
  --faq-color-taxonomy-background: #fff;
  --faq-color-taxonomy-text-hover: #a1bb8d;
  --faq-color-taxonomy-background-hover: #fff;
  --faq-color-faq-background: white;
  --faq-color-faq-background-hover: #f6f1eb;
  --faq-color-faq-question: #181818;
  --faq-color-faq-answer: #808080;
	

  /* FONTS */
  --faq-font-primary: 'Century Gothic';
  --faq-font-secondary: '';
  --faq-font-text-small: 16px;
  --faq-font-text-medium: 20px;

  /* Inputs height */
  --faq-input-height: 48px;

  /* BORDER */
  --faq-border-taxonomy: 1px solid #418f92;
  --faq-border: 1px solid #606262;
  --faq-border-hover: 1px solid #e74a37;

  /* BORDER RADIUS & SPACING */
  --faq-border-radius: 10px;
  --faq-border-radius-taxonomy: 8px;
  --faq-padding: 30px;
  --faq-padding-taxonomy: 11px 20px 9px 20px;
}

.faq-wrapper details[open] {
  --faq-color-faq-background:#e7ede0!important;
}

.faq-item {
  display: none;
}

.faq-container {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.faq-filters {
  display: flex;
  justify-content: space-between;
  /* flex-direction: column;
  flex-wrap: wrap; */
  gap: 8px;
  /* margin-bottom: 1.5em; */
}

.faq-filter {
  background: var(--faq-color-taxonomy-background);
  border: #a1bb8d solid 1px !important;
  border-radius: var(--faq-border-radius-taxonomy);
  padding: var(--faq-padding-taxonomy);
  color: #a1bb8d;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  font-family: var(--e-global-typography-accent-font-family), Sans-serif;
  font-size: var(--e-global-typography-accent-font-size);
  font-weight: var(--e-global-typography-accent-font-weight);
  text-transform: var(--e-global-typography-accent-text-transform);
  line-height: var(--e-global-typography-accent-line-height);
  text-align: center;
  flex: 1;
}

.faq-filter.active {
  background: var(--e-global-color-primary);
  color: white !important;
  border: var(--e-global-color-primary) solid 1px !important;
}

.faq-filter:hover {
  background: var(--e-global-color-primary) !important;
  color: white !important;
  border: var(--e-global-color-primary) solid 1px !important;
}

.faq-wrapper {
  flex: 1;
}

.faq-wrapper details {
  border-radius: var(--faq-border-radius);
  margin-bottom: 10px;
  padding: var(--faq-padding);
  background: var(--faq-color-faq-background);
  border: solid 1px var(--e-global-color-secondary);
  transition: all 0.2s ease-in-out;
  font-family: var(--faq-font-primary);
}

.faq-wrapper summary {
  font-weight: 700;
  font-size: var(--faq-font-text-medium);
  color: var(--faq-color-faq-question);
  cursor: pointer;
  list-style: none;
  position: relative;
  text-transform: uppercase;
  font-family: var(--e-global-typography-accent-font-family), Sans-serif;
  font-size: var(--e-global-typography-accent-font-size);
  font-weight: var(--e-global-typography-accent-font-weight);
  text-transform: var(--e-global-typography-accent-text-transform);
  line-height: var(--e-global-typography-accent-line-height);

  /* padding: var(--faq-padding); */
}

.faq-wrapper summary::after {
  content: '+';
  position: absolute;
  right: 0;
  transition: transform 0.3s ease;
  font-size: 32px !important;
  font-weight: 300 !important;
}

.faq-wrapper details[open] summary::after {
  content: '-';
}

.faq-answer {
  margin-top: 10px;
  color: var(--faq-color-faq-answer);
  font-size: var(--faq-font-text-small);
  line-height: 1.6;
  font-family: var(--e-global-typography-text-font-family), Sans-serif;
  font-size: var(--e-global-typography-text-font-size);
  font-weight: var(--e-global-typography-text-font-weight);
  text-transform: var(--e-global-typography-text-text-transform);
  line-height: var(--e-global-typography-text-line-height);
  color: var(--e-global-color-text);
}

@media all and (max-width: 1024px) {
  summary.faq-question {
    font-size: 16px;
  }
  .faq-wrapper details {
    padding: 20px;
  }
}

@media all and (max-width: 767px) {
  .faq-container {
    gap: 30px;
  }
  .faq-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding-bottom: 5px;
  }

  .faq-filters::-webkit-scrollbar {
    height: 6px;
  }

  .faq-filters::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
  }

  .faq-filters::-webkit-scrollbar-thumb {
    background: #418f92;
    border-radius: 10px;
  }

  .faq-filter {
    flex-shrink: 0;
    white-space: nowrap;
  }

  .faq-wrapper summary::after {
    position: relative;
  }

  summary.faq-question {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 15px;
  }
}

details {
  interpolate-size: allow-keywords;

  &::details-content {
    transition: block-size 0.3s, content-visibility 1s allow-discrete;
    overflow: hidden;
    block-size: 0;
  }

  &[open]::details-content {
    block-size: auto;
  }
}

summary.faq-question {
  /* border-bottom: var(--faq-border); */
  /* padding: 0px 0px 15px 0px; */

  font-family: var(--e-global-typography-accent-font-family), Sans-serif;
  font-size: var(--e-global-typography-accent-font-size);
  font-weight: var(--e-global-typography-accent-font-weight);
  text-transform: var(--e-global-typography-accent-text-transform);
  line-height: var(--e-global-typography-accent-line-height);
  fill: var(--e-global-color-text);
}

.faq-answer p {
  margin-bottom: 0;
}

/* 
LOADER
*/

.faq-loader {
  width: 40px;
  height: 40px;
  border: 4px solid #ddd;
  border-top: 4px solid #66794f; /* couleur de ton site */
  border-radius: 50%;
  animation: faq-spin 0.8s linear infinite;
  margin: 40px auto;
}

@keyframes faq-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.faq-item {
  animation: customOpacity 0.3s ease;
}

@keyframes customOpacity {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
