/* Protection contre le défilement horizontal */
html, body { 
  overflow-x: hidden; 
  max-width: 100vw; 
}

/* Adaptation au thème du site */
.bg-light {
  background-color: var(--light-card) !important;
  color: var(--text-dark) !important;
}

.bg-dark {
  background-color: var(--dark-card) !important;
  color: var(--text-primary) !important;
}

/* Sections juridiques */
.legal-section {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-color, rgba(0,0,0,0.1));
}

.legal-section:last-child {
  border-bottom: none;
}

.legal-section h2 {
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
}

.legal-section h3 {
  font-size: 1.35rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.legal-section h4 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-top: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--text-secondary);
}

.legal-section p {
  line-height: 1.8;
  margin-bottom: 1rem;
}

.legal-section ul,
.legal-section ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.legal-section li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

/* Blocs d'information importants */
.info-box {
  background: var(--light-card, #f8f9fa);
  border-left: 4px solid var(--primary);
  padding: 1.25rem;
  margin: 1.5rem 0;
  border-radius: 0.25rem;
}

.info-box strong {
  color: var(--primary);
}

/* Tableaux de ressources */
.table-responsive {
  margin: 1.5rem 0;
}

.table {
  color: var(--text-primary);
  border-color: var(--border-color, rgba(0,0,0,0.1));
}

.table thead {
  background: var(--light-card, #f8f9fa);
  border-bottom: 2px solid var(--border-color, rgba(0,0,0,0.1));
}

.table tbody tr {
  border-bottom: 1px solid var(--border-color, rgba(0,0,0,0.1));
}

.table-striped tbody tr:nth-of-type(odd) {
  background-color: rgba(0,0,0,0.02);
}

/* Listes numérotées principales */
.main-list {
  counter-reset: section;
  list-style: none;
  padding-left: 0;
}

.main-list > li {
  counter-increment: section;
  margin-bottom: 2rem;
}

.main-list > li::before {
  content: counter(section) ". ";
  font-weight: 700;
  color: var(--primary);
  font-size: 1.1rem;
}

/* Footer de document */
.document-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--border-color, rgba(0,0,0,0.1));
  font-size: 0.95rem;
  color: var(--text-secondary);
}