/* =====================================
   STYLES FAQ PAGE RESPONSIVE & SIDEBAR
   ===================================== */

/* Accordion */
.faq-accordion .faq-item {
  margin-bottom: 1em;
}

.faq-question {
  border: none;
  padding: 1em;
  width: 100%;
  text-align: left;
  font-weight: bold;
  cursor: pointer;
}

.famille .faq-question {
  background: #FFE880;
}

.enseignant .faq-question {
  background: #ABA1FF;
}

.faq-answer {
  display: none;
  padding: 1em;
  background: #fff;
  border: 1px solid #ddd;
}

.faq-answer.open {
  display: block;
}

/* Page Container */
.faq-page {
  max-width: 850px;
  margin: 0 auto;
  padding: 1rem;
}

.faq-page h1 {
  padding: 100px;
  font-size: clamp(28px, 3vw, 51px);
  margin-bottom: 1rem;
  background-image: url(https://www.anacours.com/wp-content/uploads/2021/12/symbole-anacours-bandeau-jaune.svg);
  background-repeat: no-repeat;
  background-size: cover;
  font-family: "Texta";
  font-weight: 900;
}

.famille .faq-page h1 {
  background-color: #FED000;
}

.enseignant .faq-page h1 {
  background-color: #5743FF;
  color: #fff;
}

.faq-page p {
  font-family: "Texta";
  color: #333;
}

.faq-sidebar a {
  text-decoration: none;
  color: #333;
}
.famille button:hover,
.famille button:focus,
.famille button:active {
  background-color: #FED000;
}

.enseignant button:hover,
.enseignant button:focus,
.enseignant button:active {
  background-color: #5743FF;
  color: #fff;
}

.enseignant button:hover h3,
.enseignant button:focus h3,
.enseignant button:active h3 {
  color: #fff;
}

.faq-page h1,
.faq-page h2,
.faq-page h3 {
  font-family: 'Texta';
  font-weight: 900;
  color: #333;
}

.faq-page h2 {
  font-size: clamp(16px, 2vw, 30px);
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.faq-page h3 {
  font-size: clamp(12px, 2vw, 20px);
}
.faq-page .fil-ariane {
  margin-bottom: 1rem;
  font-size: 14px;
  font-family: 'Texta';
}

.faq-page .fil-ariane a {
  text-decoration: none;
  color: #333;
}
.faq-page .fil-ariane a:hover {
  text-decoration: underline;
  color: #333; /* Ajuste selon ton design */
}

.faq-subcategory {
  margin: 1em 0;
  padding: 1em;
  background: #fff;
  box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px;
}

/* Layout */

body.tax-faq_category {
  background-color: #f7f7f7;
}
.content-faq {
  display: flex;
  flex-direction: row;
  max-width: 1140px;
  margin: auto;
}

/* Sidebar */
.faq-sidebar-full {
  z-index: 1000;
  position: sticky;
  top: 150px; 
  left: 1%;
  align-self: flex-start;
  height: fit-content;
}

.faq-sidebar {
  max-height: calc(100vh - 140px); /* évite de dépasser l'écran */
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px;
  padding: 0;
  border-right: 1px solid #ddd;
  z-index: 1000;
}

.faq-sidebar button {
  font-size: 15px;
  font-family: 'Texta';
  padding: 15px;
  border-bottom: 1px solid #333;
}

.faq-sidebar-full .back-center {
  display: block;
  font-family: 'Texta';
  margin-bottom: 20px;
  padding: 10px;
  font-weight: bold;
  text-decoration: none;
  color: #333;
}

.faq-sidebar-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}

.faq-sidebar-toggle {
  width: 100%;
  background: none;
  border: none;
  font-weight: bold;
  text-align: left;
  padding: 3px;
  font-size: 16px;
  cursor: pointer;
}

.faq-sidebar-sub {
  list-style: none;
  padding-left: 15px;
  display: none;
}

.faq-sidebar-sub li {
  margin: 4px 0;
}

.faq-sidebar-sub li a {
  text-decoration: none;
  color: #333;
  font-size: 14px;
  font-family: "texta";
}

.faq-sidebar-sub li a:hover {
  text-decoration: underline;
}

/* Responsive */
@media screen and (max-width: 768px) {
  .content-faq {
    flex-direction: column;
  }

  .faq-sidebar-full {
    display: none;
  }

  .faq-page {
    padding: 1rem;
  }

  .faq-question,
  .faq-answer,
  .faq-subcategory {
    font-size: 1rem;
  }

  .faq-page h1 {
    padding: 60px 20px;
    background-size: contain;
  }
}



/* Page FAQ */

.faq-hero-inner {
  display: flex;
  flex-direction: row;
  align-items: center;
  background-color: #FED000;
  background-image: url(https://www.anacours.com/wp-content/uploads/2021/12/symbole-anacours-bandeau-jaune.svg);
  background-repeat: no-repeat;
  background-size: cover;
  min-height: 150px;
  justify-content: center;
  gap: 15%;
  font-family: 'Texta';
  transition: background-color 0.3s ease;
}

.faq-hero-content {
  display: flex;
  flex-direction: column;
}

.faq-hero-content h1 {
  font-size: clamp(25px, 2vw, 30px);
  font-weight: 900;
  margin-bottom: 0;
}
#faq-toggle {
  display: flex;
  justify-content: center;
  margin: 2rem 0;
  border: 1px solid #ccc;
}
.faq-toggle-btn {
  padding: 0.5rem 1rem;
  border: 1px solid #ccc;
  background: white;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}
.faq-toggle-btn.active {
  background: #FED000;
  border-color: #FED000;
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;

}

/* 🎨 Thème FAMILLE (par défaut) */
body.audience-famille .faq-hero-inner,
body.audience-famille .faq-toggle-btn.active {
  background-color: #FFD400;
  border-color: #FFD400;
}

/* 🎨 Thème ENSEIGNANT */
body.audience-enseignant .faq-hero-inner,
body.audience-enseignant .faq-toggle-btn.active {
  background-color: #5743FF;
  border-color: #5743FF;
  color: #fff;
}

.faq-blocks-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.faq-block {
  background-color: #FFEA80;
  padding: 1.5rem;
  border-radius: 0px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  transition: background-color 0.3s ease;
}

body.audience-enseignant .faq-block {
  background-color: #ABA1FF;
}

#faq-content {
  display: flex;
  flex-direction: column;
  max-width: 1400px;
  margin: 0 auto;
  font-family: "texta";
  padding: 15px;
}

#faq-content h2 {
  font-size: clamp(20px, 3vw, 36px);
  margin-bottom: 1rem;
  margin-top: 1rem;
  font-weight: 900;
  font-family: 'Texta';
}


#faq-content .faq-block h2 {
  font-size: clamp(20px, 3vw, 20px);
    margin-bottom: 1rem;
    margin-top: 1rem;
    font-weight: 900;
    font-family: 'Texta';
    text-align: center;

}

.faq-subcategory-list {
  list-style: none;
  padding-left: 1em;
}

.faq-subcategory-item {
  position: relative;
  padding-left: 1.2em;
  margin-bottom: 0.5em;
}

.faq-subcategory-item a:hover {
  text-decoration: underline;
  color: #333; /* Ajuste selon ton design */
}
.faq-subcategory-item::before {
  content: "➔"; /* Tu peux remplacer par "→", "➤", "›", "▶" selon ton style préféré */
  position: absolute;
  left: 0;
  color: #333; /* Ajuste selon ton design */
  font-weight: bold;
}

.faq-block-icon {
    text-align: center;
  }

.faq-block-icon img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    margin: 0 auto;
    background-color: #FED000;
    border-radius: 99999px;
    display: block; 
}

body.audience-enseignant .faq-block-icon img{
    background-color: #5743FF;
}

@media screen and (max-width: 768px) {
 .faq-hero-inner {
    flex-direction: column;
    align-items: center;
    padding: 1rem;
  }

  #faq-toggle {
    margin: 0;
  }
}