/* ==========================================================================
   Kit AD83 — Singular : texte des articles, événements et collectes, commun aux sites AD83
   Conteneurs : .af_kit_singular (classe posée sur le contenu, ex. module HTML d'un gabarit Themer)
   et .af_event_content (contenu d'un événement de l'agenda).
   « html body » en tête : passe devant les titres du Customizer Beaver et du thème.
   Titres sans classe seulement (ou .wp-block-heading) : ceux des shortcodes gardent leur style.
   ========================================================================== */

html body :is(.af_kit_singular, .af_event_content) {
  --af-s-h2: 26px;
  --af-s-h3: 21px;
  --af-s-h4: 18px;
  font-family: var(--af-kit-font-text);
  font-size: 16px;
  line-height: 1.7;
  color: var(--af-kit-color-text);
}
html body :is(.af_kit_singular, .af_event_content) p {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
  margin: 0 0 1em;
}

/* Titres */
html body :is(.af_kit_singular, .af_event_content) :is(h2, h3, h4, h5, h6):where(:not([class]), .wp-block-heading) {
  font-family: var(--af-kit-font-title);
  font-weight: 700;
  color: var(--af-kit-color-text) !important;
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.4;
  margin: 1.2em 0 .3em;
}
html body :is(.af_kit_singular, .af_event_content) h2:where(:not([class]), .wp-block-heading) { font-size: var(--af-s-h2); line-height: 1.3; margin: 1.6em 0 .5em; }
html body :is(.af_kit_singular, .af_event_content) h3:where(:not([class]), .wp-block-heading) { font-size: var(--af-s-h3); line-height: 1.35; margin: 1.4em 0 .4em; }
html body :is(.af_kit_singular, .af_event_content) h4:where(:not([class]), .wp-block-heading) { font-size: var(--af-s-h4); }
html body :is(.af_kit_singular, .af_event_content) h5:where(:not([class]), .wp-block-heading) { font-size: 16px; }
html body :is(.af_kit_singular, .af_event_content) h6:where(:not([class]), .wp-block-heading) { font-size: 14px; text-transform: uppercase; letter-spacing: .08em; }
html body :is(.af_kit_singular, .af_event_content) :is(h2 + h3, h3 + h4) { margin-top: .4em; }
html body :is(.af_kit_singular, .af_event_content) > :is(h2, h3, h4):first-child { margin-top: 0; }

/* Citation : Georgia italique, guillemet --af-kit-color-primary */
html body :is(.af_kit_singular, .af_event_content) blockquote {
  position: relative;
  margin: 1.8em 0;
  padding: 0 0 0 38px;
  border: 0;
  background: none;
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-size: 20px;
  line-height: 1.55;
  color: var(--af-kit-color-text);
}
html body :is(.af_kit_singular, .af_event_content) blockquote::before {
  content: "\201C";
  position: absolute;
  left: 0;
  top: -.15em;
  font-family: Georgia, serif;
  font-style: normal;
  font-size: 54px;
  line-height: 1;
  color: var(--af-kit-color-primary);
}
html body :is(.af_kit_singular, .af_event_content) blockquote p { font: inherit; color: inherit; margin: 0 0 .5em; }
html body :is(.af_kit_singular, .af_event_content) blockquote p:last-child { margin-bottom: 0; }

/* Listes sans classe : petits disques --af-kit-color-primary, cercles en sous-liste, numéros en police des titres */
html body :is(.af_kit_singular, .af_event_content) :is(ul, ol):not([class]) {
  margin: 0 0 1em;
  padding: 0;
  list-style: none;
}
html body :is(.af_kit_singular, .af_event_content) :is(ul, ol):not([class]) > li {
  position: relative;
  margin: 0;
  padding-left: 1.6em;
}
html body :is(.af_kit_singular, .af_event_content) :is(ul, ol):not([class]) > li + li { margin-top: .35em; }
html body :is(.af_kit_singular, .af_event_content) ul:not([class]) > li::before {
  content: "";
  position: absolute;
  left: .4em;
  top: .68em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--af-kit-color-primary);
}
html body :is(.af_kit_singular, .af_event_content) ul:not([class]) ul:not([class]) > li::before {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--af-kit-color-primary);
}
html body :is(.af_kit_singular, .af_event_content) ol:not([class]) { counter-reset: af-ol; }
html body :is(.af_kit_singular, .af_event_content) ol:not([class]) > li { counter-increment: af-ol; padding-left: 1.8em; }
html body :is(.af_kit_singular, .af_event_content) ol:not([class]) > li::before {
  content: counter(af-ol) ".";
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--af-kit-font-title);
  font-weight: 700;
  color: var(--af-kit-color-dark);
}
html body :is(.af_kit_singular, .af_event_content) li > :is(ul, ol) { margin: .35em 0 0; }

/* Liens du texte, code */
html body :is(.af_kit_singular, .af_event_content) a:not([class]) {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--af-kit-color-primary);
  text-underline-offset: 3px;
}
html body :is(.af_kit_singular, .af_event_content) :not(pre) > code {
  padding: .1em .3em;
  border-radius: 4px;
  background: none;
  color: var(--af-kit-color-pink-600);
  font-size: .85em;
}
html body :is(.af_kit_singular, .af_event_content) pre {
  background: color-mix(in srgb, var(--af-kit-color-dark) 5%, transparent);
  border: 0;
  border-radius: 8px;
  padding: .7em 1em;
  font-size: 13px;
  white-space: pre-wrap;
}

@media (max-width: 1024px) {
  html body :is(.af_kit_singular, .af_event_content) { --af-s-h2: 25px; }
}
@media (max-width: 768px) {
  html body :is(.af_kit_singular, .af_event_content) { --af-s-h2: 23px; --af-s-h3: 20px; --af-s-h4: 17px; }
}
