.documents-categories {
  display: flex;
  align-items: flex-start;
  gap: 40px;
  position: relative;
}

/* Navigation */
.documents-categories-navigation {
  max-width: 260px;
  width: 30%;
  flex-shrink: 0;
  position: sticky;
  top: 50px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.category-nav-item {
  display: flex;
  flex-direction: column;
}

.category-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 8px;
  transition: all 0.2s ease;
  color: var(--wp--preset--color--primary);
  font-weight: 500;
}

.category-link:hover,
.category-link.is-active {
  background: var(--wp--preset--color--bleu-clair);
  border-color: var(--wp--preset--color--bleu-ciel);
}

.category-link .arrow-icon {
  transition: transform 0.3s ease;
}

.category-link.is-open .arrow-icon {
  transform: rotate(180deg);
}

.subcategories {
  display: flex;
  flex-direction: column;
  padding-left: 20px;
  gap: 5px;
  margin-top: 5px;
  border-left: 2px solid var(--wp--preset--color--bleu-ciel);
}

.subcategory-link {
  padding: 6px 8px;
  text-decoration: none;
  color: var(--wp--preset--color--primary);
  border-radius: 8px;
  transition: all 0.2s ease;
  font-size: 0.95em;
}

.subcategory-link:hover,
.subcategory-link.is-active {
  background: var(--wp--preset--color--bleu-clair);
}

/* Content */
.documents-categories-content {
  width: 100%;
}

.category-section {
  margin-bottom: 40px;
  scroll-margin-top: 100px;
}

.category-title {
  margin-bottom: 20px;
  color: var(--wp--preset--color--primary);
}

.documents-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* Document Item Styles */
.acf-block-document__item {
  display: flex;
  flex-direction: column;
  padding: 16px;
  gap: 16px;
  background: #ffffff;
  border: 1px solid var(--wp--preset--color--bleu-ciel);
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.acf-block-document__item:hover {
  background: var(--wp--preset--color--bleu-clair);
}

.acf-block-document__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.acf-block-document__title {
  color: var(--wp--preset--color--primary);
  margin: 0;
  font-size: 16px;
  line-height: 1.4;
}

/* Responsive */
@media (max-width: 1024px) {
  .documents-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 880px) {
  .documents-categories {
    flex-direction: column;
  }

  .documents-categories-navigation {
    display: none;
  }
}

@media (max-width: 580px) {
  .documents-grid {
    grid-template-columns: 1fr;
  }
}

.subcategory-section {
  margin-top: 30px;
  margin-bottom: 30px;
  padding-left: 20px;
  border-left: 2px solid var(--wp--preset--color--bleu-ciel);
  scroll-margin-top: 100px;
}

.subcategory-title {
  font-size: 1.2em;
  color: var(--wp--preset--color--primary);
  margin-bottom: 15px;
  position: relative;
}

.subcategory-title::before {
  content: "";
  position: absolute;
  left: -22px;
  top: 50%;
  width: 12px;
  height: 2px;
  background-color: var(--wp--preset--color--bleu-ciel);
}

/* Responsive adjustments */
@media (max-width: 580px) {
  .subcategory-section {
    padding-left: 15px;
    margin-top: 20px;
    margin-bottom: 20px;
  }
}

.block-editor-block-list__block.wp-block-acf-documents-categories .acf-block-document__item{
  width:100%;
}
