/**
 * Table of content
 */

.table-of-content {
  background-color: var(--color-brand--1);
  border-radius: 10px;
  margin: 2rem 0;
}
.table-of-content .view-title {
  margin: 0;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  user-select: none;
  color: var(--color-neutral--6);
}
.table-of-content .view-title::after {
  content: '';
  display: block;
  position: relative;
  width: 33px;
  height: 33px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  background-image: url("../../images/table-of-content/arrow.svg");
}


.view-title h3 {
  position: relative;
  padding-left: 0; /* Supprime le padding à gauche */
  margin-left: 5px; /* Décale le texte pour laisser de la place au trait */
  display: inline-block; /* Assure que le trait ne prend que la hauteur du texte */
}

.view-title h3::before {
  content: '';
  position: absolute;
  left: -17px;
  top: 0;
  bottom: 0;
  width: 4px;
  background-color: #B7CC34;
}



.table-of-content.js-active .view-title::after {
  transform: rotate(180deg);
}
.table-of-content .view-title h3 {
  margin: 0;
}
.table-of-content .view-content {
  height: 0;
  overflow: hidden;
  transition: 0.2s;
}
.table-of-content .view-content ul {
  list-style: none;
  margin: 0;
  padding: 0.5rem 1rem;
}
.table-of-content .view-content li {
  margin: 0;
}
.table-of-content__item {
  display: flex;
  gap: 1rem;
  align-items: center;
  padding: 12px 4px;
  color: var(--color-neutral--6);
}
.table-of-content .view-content li:last-child .table-of-content__item {
  border-bottom: none;
}
.table-of-content__item::before {
  content: '';
  display: block;
  position: relative;
  width: 8px;
  height: 8px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  background-image: url("../../images/table-of-content/round-summary.svg");
  flex-shrink: 0;
}

@media screen and (min-width: 1000px){
  .table-of-content {
    background-color: var(--color-brand--1);
    max-width: 300px;
    margin: 4rem 0 0;
    padding: 2rem;
  }
  .table-of-content .view-title {
    padding: 0.5rem 0 ;
  }
  .table-of-content .view-content ul {
    padding: 0;
  }
  .table-of-content .view-title::after {
    content: none;
  }
  .table-of-content .view-content {
    height: max-content !important;
  }

  .table-of-content__item:hover {
    background-color: var(--tertiary-light);
  }
}

@media screen and (min-width: 1000px){
  .view-title h3::before {
    left: -34px;
    height: 43px;
    top: -10px;
  }
}
