#corps.lettres-index {
  overflow-x: clip;
}

body.page-lettres {
  overflow-x: hidden;
}

body.page-lettres .publicite1 {
  max-width: 100vw;
  overflow: hidden;
}

.lettres-index > :where(h1, h2, #chemin, .lettres-intro, #lettres-ressources) {
  box-sizing: border-box;
  width: 100%;
  max-width: 68rem;
  margin-left: 0;
  margin-right: auto;
}

.lettres-index > :where(h1, h2) {
  padding-left: 0;
}

#corps.lettres-index > #chemin {
  margin-left: 0;
  margin-right: auto;
  padding-left: 0.7em;
}

.lettres-intro {
  margin: 0;
  padding: 0;
  max-width: 48em;
  color: #6b7280;
  font-size: 1.05em;
  overflow-wrap: break-word;
  text-align: left;
}

#lettres-ressources {
  border-top: 1px solid var(--couleur-bordure);
  margin-top: 3em;
  margin-bottom: 2em;
  font-size: 0.95em;
}

#lettres-ressources .accordion::before {
  display: none;
}

#lettres-ressources .accordion {
  gap: 0.85em;
}

#lettres-ressources .accordion.active {
  color: var(--couleur-texte);
}

.lettres-accordion-icon {
  align-items: center;
  background: color-mix(in srgb, var(--couleur-texte) 8%, transparent);
  border-radius: 8px;
  color: var(--couleur-texte);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 0.82em;
  height: 2.15em;
  justify-content: center;
  width: 2.15em;
}

.lettres-panel-inner {
  padding: 1.2rem 0 1.6rem;
}

.lettres-description {
  color: #6b7280;
  font-size: 1em;
  line-height: 1.55;
  margin: 0 0 1rem;
  overflow-wrap: break-word;
  padding: 0;
  text-align: left;
}

.lettres-entrees {
  display: grid;
  gap: 0.55rem;
  line-height: 1.5;
  list-style: none;
  margin: 0;
  overflow-wrap: break-word;
  padding: 0;
}

.lettres-entrees li {
  text-align: left;
}

.lettres-entrees li > a {
  font-weight: 600;
  text-decoration: none;
}

.lettres-entrees li > a:hover,
.lettres-entrees li > a:focus-visible {
  text-decoration: underline;
}

.lettres-niveaux {
  color: #9ca3af;
}

.lettres-niveaux a {
  text-decoration: none;
}

.lettres-niveaux a:hover,
.lettres-niveaux a:focus-visible {
  text-decoration: underline;
}

@media (max-width: 640px) {
  #corps.lettres-index {
    margin-left: 1rem;
    margin-right: 1rem;
    max-width: min(23rem, calc(100vw - 2rem));
    width: min(23rem, calc(100vw - 2rem));
  }

  .lettres-index > :where(h1, h2, #chemin, .lettres-intro, #lettres-ressources) {
    max-width: min(21rem, calc(100vw - 2rem));
    width: min(21rem, calc(100vw - 2rem));
  }

  #lettres-ressources .accordion {
    align-items: flex-start;
    font-size: 1.12em;
    padding-right: 0.45em;
  }

  .lettres-accordion-icon {
    margin-top: 0.1em;
  }

  .lettres-niveaux {
    display: block;
    margin-top: 0.15rem;
  }
}

html[data-theme="dark"] .lettres-intro,
html[data-theme="dark"] .lettres-description {
  color: #cbd5e1;
}

html[data-theme="dark"] .lettres-accordion-icon {
  background: color-mix(in srgb, var(--couleur-texte) 12%, transparent);
}

html[data-theme="dark"] .lettres-niveaux {
  color: #64748b;
}
