/* Lisibilité contenus SPIP — APENF */

:root {
  --ap-text: #5c6570;
  --ap-heading: #040916;
  --ap-text-max: 72ch;
  --ap-leading: 1.75;
  --ap-leading-tight: 1.35;
}

body,
body p {
  word-break: normal;
  overflow-wrap: break-word;
  hyphens: auto;
  -webkit-hyphens: auto;
  text-rendering: optimizeLegibility;
}

.readable-content,
.spip-texte {
  max-width: var(--ap-text-max);
  line-height: var(--ap-leading);
  font-size: 1.0625rem;
  color: var(--ap-text);
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: auto;
  -webkit-hyphens: auto;
  text-wrap: pretty;
}

.readable-content > :first-child,
.spip-texte > :first-child {
  margin-top: 0;
}

.readable-content p,
.spip-texte p {
  margin-bottom: 1.15em;
}

.readable-content h2,
.readable-content h3,
.spip-texte h2,
.spip-texte h3 {
  color: var(--ap-heading);
  line-height: var(--ap-leading-tight);
  margin: 1.6em 0 0.65em;
  word-break: normal;
  overflow-wrap: break-word;
  text-wrap: balance;
}

.readable-content h2,
.spip-texte h2 { font-size: 1.5rem; }

.readable-content h3,
.spip-texte h3 { font-size: 1.25rem; }

.readable-content ul,
.readable-content ol,
.spip-texte ul,
.spip-texte ol {
  margin: 0 0 1.15em 1.25em;
  padding: 0;
  list-style: disc;
}

.readable-content ol,
.spip-texte ol { list-style: decimal; }

.readable-content li,
.spip-texte li {
  margin-bottom: 0.45em;
  line-height: var(--ap-leading);
}

.readable-content a,
.spip-texte a {
  color: var(--ap-green, #009018);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.readable-content a:hover,
.spip-texte a:hover {
  color: var(--ap-green-deep, #0a2f18);
}

.readable-content img,
.spip-texte img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1rem 0;
}

.readable-content table,
.spip-texte table {
  width: 100%;
  margin: 1.25em 0;
  border-collapse: collapse;
  font-size: 0.95rem;
  display: block;
  overflow-x: auto;
}

.readable-content th,
.readable-content td,
.spip-texte th,
.spip-texte td {
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--ap-line, #e8ecef);
  text-align: left;
  vertical-align: top;
}

.readable-content blockquote,
.spip-texte blockquote {
  margin: 1.25em 0;
  padding: 0.85em 1.15em;
  border-left: 4px solid var(--ap-gold, #e8c21a);
  background: var(--ap-surface, #f5f7f5);
  border-radius: 0 8px 8px 0;
  font-style: italic;
}
