/* =============================================================================
   Styles pour la table des matières dépliable
   ============================================================================= */

.toc-wrapper {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  margin-bottom: 2rem;
  overflow: hidden;
  transition: all 0.3s ease;
}

.toc-wrapper:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.toc-header {
  background: #0AA8A7;
  color: white;
  padding: 1rem 1.5rem;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease;
}

.toc-header:hover {
  background: #089a99;
}

.toc-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.toc-icon {
  transition: transform 0.3s ease;
  font-size: 0.9rem;
}

.toc-content {
  padding: 1.5rem;
  background: white;
  transition: all 0.3s ease;
}

.toc-content ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.toc-content li {
  margin-bottom: 0.5rem;
}

.toc-content a {
  color: #495057;
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s ease;
  display: block;
  padding: 0.25rem 0;
}

.toc-content a:hover {
  color: #0AA8A7;
  text-decoration: none;
}

.toc-content ul ul {
  padding-left: 1.5rem;
  margin-top: 0.5rem;
}

.toc-content ul ul li {
  margin-bottom: 0.3rem;
}

.toc-content ul ul a {
  font-size: 0.9rem;
  color: #6c757d;
}

/* Animation pour l'icône */
.toc-icon.rotated {
  transform: rotate(-90deg);
}

/* Responsive design */
@media (max-width: 768px) {
  .toc-wrapper {
    margin-bottom: 1.5rem;
  }
  
  .toc-header {
    padding: 0.75rem 1rem;
  }
  
  .toc-content {
    padding: 1rem;
  }
  
  .toc-content ul ul {
    padding-left: 1rem;
  }
}

/* Mode sombre */
.dark .toc-wrapper {
  background: #2d3748;
  border-color: #4a5568;
}

.dark .toc-header {
  background: #0AA8A7;
}

.dark .toc-content {
  background: #2d3748;
  color: #e2e8f0;
}

.dark .toc-content a {
  color: #e2e8f0;
}

.dark .toc-content a:hover {
  color: #0AA8A7;
}

.dark .toc-content ul ul a {
  color: #a0aec0;
}
